From 95e37ac3185eb2e5ef538583132fcc1b729d3cd8 Mon Sep 17 00:00:00 2001 From: fish <920886811@163.com> Date: Thu, 18 Aug 2022 16:30:41 +0800 Subject: [PATCH] test v4 --- Makefile | 7 +- config/common.go | 30 +- crypto/crypto_test.go | 117 - go.mod | 1 - js/protos/escrow/escrow_pb.js | 12631 ----------- js/protos/exchange/exchange_message_pb.js | 5612 ----- js/protos/exchange/exchange_pb.js | 16 - js/protos/guard/guard_admin_pb.js | 1744 -- js/protos/guard/guard_pb.js | 13910 ------------ js/protos/hub/hub_pb.js | 4835 ---- js/protos/ledger/ledger_pb.js | 4223 ---- js/protos/node/node_pb.js | 7833 ------- js/protos/online/online_pb.js | 1217 - js/protos/protocol/api/api_pb.js | 7120 ------ js/protos/protocol/core/Contract_pb.js | 8876 -------- js/protos/protocol/core/Discover_pb.js | 1494 -- .../protocol/core/TronInventoryItems_pb.js | 247 - js/protos/protocol/core/Tron_pb.js | 14928 ------------ js/protos/score/score_pb.js | 3839 +++- js/protos/status/status_pb.js | 2789 --- ledger/escrow.go | 99 - ledger/ledger.go | 167 - ledger/sample/demo.go | 82 - protos/escrow/escrow.pb.go | 15321 ------------- protos/escrow/escrow.proto | 454 - protos/exchange/exchange.pb.go | 344 - protos/exchange/exchange.proto | 15 - protos/exchange/exchange_message.pb.go | 1653 -- protos/exchange/exchange_message.proto | 220 - protos/guard/guard.pb.go | 18919 ---------------- protos/guard/guard.proto | 608 - protos/hub/hub.pb.go | 6369 ------ protos/hub/hub.proto | 218 - protos/ledger/ledger.pb.go | 5685 ----- protos/ledger/ledger.proto | 140 - protos/node/node.pb.go | 10645 --------- protos/node/node.proto | 330 - protos/online/online.pb.go | 1744 -- protos/online/online.proto | 66 - protos/protocol/api/api.pb.go | 6225 ----- protos/protocol/api/api.proto | 860 - protos/protocol/core/Contract.pb.go | 2063 -- protos/protocol/core/Contract.proto | 237 - protos/protocol/core/Discover.pb.go | 383 - protos/protocol/core/Discover.proto | 41 - protos/protocol/core/Tron.pb.go | 4078 ---- protos/protocol/core/Tron.proto | 526 - protos/protocol/core/TronInventoryItems.pb.go | 87 - protos/protocol/core/TronInventoryItems.proto | 10 - protos/score/score.pb.go | 9364 ++++++-- protos/score/score.proto | 149 +- protos/status/status.pb.go | 4107 ---- protos/status/status.proto | 123 - utils/convert_test.go | 63 - utils/grpc/client.go | 35 - utils/grpc/escrow.go | 19 - utils/grpc/exchange.go | 19 - utils/grpc/guard.go | 19 - utils/grpc/hub.go | 34 - utils/grpc/ledger.go | 19 - utils/grpc/online.go | 19 - utils/grpc/setup_server.go | 29 - utils/grpc/setup_server_test.go | 28 +- utils/grpc/solidity.go | 19 - utils/grpc/status.go | 19 - utils/grpc/wallet.go | 19 - 66 files changed, 10963 insertions(+), 172179 deletions(-) delete mode 100644 crypto/crypto_test.go delete mode 100644 js/protos/escrow/escrow_pb.js delete mode 100644 js/protos/exchange/exchange_message_pb.js delete mode 100644 js/protos/exchange/exchange_pb.js delete mode 100644 js/protos/guard/guard_admin_pb.js delete mode 100644 js/protos/guard/guard_pb.js delete mode 100644 js/protos/hub/hub_pb.js delete mode 100644 js/protos/ledger/ledger_pb.js delete mode 100644 js/protos/node/node_pb.js delete mode 100644 js/protos/online/online_pb.js delete mode 100644 js/protos/protocol/api/api_pb.js delete mode 100644 js/protos/protocol/core/Contract_pb.js delete mode 100644 js/protos/protocol/core/Discover_pb.js delete mode 100644 js/protos/protocol/core/TronInventoryItems_pb.js delete mode 100644 js/protos/protocol/core/Tron_pb.js delete mode 100644 js/protos/status/status_pb.js delete mode 100644 ledger/escrow.go delete mode 100644 ledger/ledger.go delete mode 100644 ledger/sample/demo.go delete mode 100644 protos/escrow/escrow.pb.go delete mode 100644 protos/escrow/escrow.proto delete mode 100644 protos/exchange/exchange.pb.go delete mode 100644 protos/exchange/exchange.proto delete mode 100644 protos/exchange/exchange_message.pb.go delete mode 100644 protos/exchange/exchange_message.proto delete mode 100644 protos/guard/guard.pb.go delete mode 100644 protos/guard/guard.proto delete mode 100644 protos/hub/hub.pb.go delete mode 100644 protos/hub/hub.proto delete mode 100644 protos/ledger/ledger.pb.go delete mode 100755 protos/ledger/ledger.proto delete mode 100644 protos/node/node.pb.go delete mode 100644 protos/node/node.proto delete mode 100644 protos/online/online.pb.go delete mode 100644 protos/online/online.proto delete mode 100644 protos/protocol/api/api.pb.go delete mode 100644 protos/protocol/api/api.proto delete mode 100644 protos/protocol/core/Contract.pb.go delete mode 100644 protos/protocol/core/Contract.proto delete mode 100644 protos/protocol/core/Discover.pb.go delete mode 100644 protos/protocol/core/Discover.proto delete mode 100644 protos/protocol/core/Tron.pb.go delete mode 100644 protos/protocol/core/Tron.proto delete mode 100644 protos/protocol/core/TronInventoryItems.pb.go delete mode 100644 protos/protocol/core/TronInventoryItems.proto delete mode 100644 protos/status/status.pb.go delete mode 100644 protos/status/status.proto delete mode 100644 utils/convert_test.go delete mode 100644 utils/grpc/escrow.go delete mode 100644 utils/grpc/exchange.go delete mode 100644 utils/grpc/guard.go delete mode 100644 utils/grpc/hub.go delete mode 100644 utils/grpc/ledger.go delete mode 100644 utils/grpc/online.go delete mode 100644 utils/grpc/solidity.go delete mode 100644 utils/grpc/status.go delete mode 100644 utils/grpc/wallet.go diff --git a/Makefile b/Makefile index 7c74e3c..a103fd2 100644 --- a/Makefile +++ b/Makefile @@ -17,12 +17,7 @@ TEST_RD_PORT ?= 6379 TEST_RD_URL="redis://$(TEST_RD_USER):@$(TEST_RD_HOSTNAME):$(TEST_RD_PORT)/$(TEST_RD_NAME)" DOCKER_TEST_RD_URL="redis://$(TEST_RD_HOSTNAME):$(TEST_RD_PORT)" -PG_FIX_CANDIDATES=./protos/node/node.pb.go \ - ./protos/status/status.pb.go \ - ./protos/escrow/escrow.pb.go \ - ./protos/guard/guard.pb.go \ - ./protos/online/online.pb.go \ - ./protos/score/score.pb.go \ +PG_FIX_CANDIDATES=./protos/score/score.pb.go \ install: brew trongogo diff --git a/config/common.go b/config/common.go index 623ee51..f6a4927 100644 --- a/config/common.go +++ b/config/common.go @@ -3,7 +3,7 @@ package config import ( "strconv" - "github.com/bittorrent/go-btfs-common/protos/guard" + //"github.com/bittorrent/go-btfs-common/protos/guard" "github.com/tron-us/go-common/v2/env" "github.com/tron-us/go-common/v2/log" @@ -27,17 +27,17 @@ func init() { } } -func GetMinimumQuestionsCountPerShard(status *guard.FileStoreStatus) (val int) { - //Below comment codes were reserved here - //if status == nil || status.FileStoreMeta.CheckFrequency == 0 { - // //if it is 0 or status is nil, means using default frequency - // return ConstMinQuestionsCountPerChallenge * 52 - //} - // - //return int(status.FileStoreMeta.CheckFrequency) * ConstMinQuestionsCountPerChallenge - return ConstMinQuestionsCountPerShard -} - -func GetRenewContingencyPercentage() (percent int) { - return 10 -} +//func GetMinimumQuestionsCountPerShard(status *guard.FileStoreStatus) (val int) { +// //Below comment codes were reserved here +// //if status == nil || status.FileStoreMeta.CheckFrequency == 0 { +// // //if it is 0 or status is nil, means using default frequency +// // return ConstMinQuestionsCountPerChallenge * 52 +// //} +// // +// //return int(status.FileStoreMeta.CheckFrequency) * ConstMinQuestionsCountPerChallenge +// return ConstMinQuestionsCountPerShard +//} +// +//func GetRenewContingencyPercentage() (percent int) { +// return 10 +//} diff --git a/crypto/crypto_test.go b/crypto/crypto_test.go deleted file mode 100644 index ff83206..0000000 --- a/crypto/crypto_test.go +++ /dev/null @@ -1,117 +0,0 @@ -package crypto - -import ( - "bytes" - "testing" - - ledgerPb "github.com/bittorrent/go-btfs-common/protos/ledger" -) - -const ( - KeyString = "CAISIJFNZZd5ZSvi9OlJP/mz/vvUobvlrr2//QN4DzX/EShP" - EncryptKey = "Tron2theMoon1234" -) - -func TestSignVerify(t *testing.T) { - // test get privKey and pubKey - privKey, err := ToPrivKey(KeyString) - if err != nil { - t.Fatal("ToPrivKey failed", err) - } - - rawPubKey, err := privKey.GetPublic().Raw() - if err != nil { - t.Fatal("Get raw public key from privKey failed", err) - } - pubKey, err := ToPubKeyRaw(rawPubKey) - if err != nil { - t.Fatal("ToPubKeyRaw failed", err) - } - - // test sign and verify the key string - message := &ledgerPb.PublicKey{ - Key: rawPubKey, - } - - sign, err := Sign(privKey, message) - if err != nil { - t.Fatal("Sign with private key failed", err) - } - ret, err := Verify(pubKey, message, sign) - if err != nil || !ret { - t.Fatal("Verify with public key failed", err) - } -} - -func TestEncryptDecrypt(t *testing.T) { - origin := "Hello World" - key := []byte(EncryptKey) - encryptMsg, _ := Encrypt(key, []byte(origin)) - msg, err := Decrypt(key, []byte(encryptMsg)) - if err != nil { - t.Fatal("Decrypt failed", err) - } - if string(msg) != origin { - t.Fatal("Decrypt failed") - } -} - -func TestSerializeDeserializeKey(t *testing.T) { - privKey, err := ToPrivKey(KeyString) - if err != nil { - t.Fatal("ToPrivKey failed", err) - } - privKeyString, err := FromPrivKey(privKey) - if err != nil { - t.Fatal("FromPrivKey failed", err) - } - if privKeyString != KeyString { - t.Fatal("Serialize and deserialize private key failed", err) - } - - pubKey := privKey.GetPublic() - pubKeyString, err := FromPubKey(pubKey) - if err != nil { - t.Fatal("FromPubKey failed", err) - } - - nPubKey, err := ToPubKey(pubKeyString) - if err != nil { - t.Fatal("ToPubKey failed", err) - } - - pubkeyRaw, err := pubKey.Raw() - if err != nil { - t.Fatal("Get pubkey raw failed", err) - } - nPubkeyRaw, err := nPubKey.Raw() - if err != nil { - t.Fatal("Get PubKey raw failed", err) - } - - if bytes.Compare(pubkeyRaw, nPubkeyRaw) != 0 { - t.Fatal("Serialize and deserialize pub key failed", err) - } -} - -func TestHex64ToBase64(t *testing.T) { - keyHex64 := "da146374a75310b9666e834ee4ad0866d6f4035967bfc76217c5a495fff9f0d0" - privKey, err := Hex64ToBase64(keyHex64) - if err != nil { - t.Fatal("Decode hex64 private key failed", err) - } - - priv, err := ToPrivKey(privKey) - if err != nil { - t.Fatal("Get private key failed", err) - } - pubKey := priv.GetPublic() - pub, err := FromPubKey(pubKey) - if err != nil { - t.Fatal("From public key failed", err) - } - keyBase64 := "CAISIQJ/5o1cuJslw3ySQMIsbnMrvM/H/j5d3+N4rkNz48WCYw==" - if pub != keyBase64 { - t.Fatal("Base64 public key decode failed") - } -} diff --git a/go.mod b/go.mod index a42416a..2637efa 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,6 @@ require ( github.com/tron-us/go-common/v2 v2.3.0 github.com/tron-us/protobuf v1.3.4 go.uber.org/zap v1.16.0 - google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 google.golang.org/grpc v1.34.0 ) diff --git a/js/protos/escrow/escrow_pb.js b/js/protos/escrow/escrow_pb.js deleted file mode 100644 index 8483c90..0000000 --- a/js/protos/escrow/escrow_pb.js +++ /dev/null @@ -1,12631 +0,0 @@ -// source: protos/escrow/escrow.proto -/** - * @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 github_com_tron$us_protobuf_gogoproto_gogo_pb = require('../../github.com/tron-us/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_tron$us_protobuf_gogoproto_gogo_pb); -var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); -goog.object.extend(proto, google_protobuf_timestamp_pb); -var protos_ledger_ledger_pb = require('../../protos/ledger/ledger_pb.js'); -goog.object.extend(proto, protos_ledger_ledger_pb); -goog.exportSymbol('proto.escrow.BalanceResult', null, global); -goog.exportSymbol('proto.escrow.CancelContractRequest', null, global); -goog.exportSymbol('proto.escrow.CancelContractResult', null, global); -goog.exportSymbol('proto.escrow.ContractID', null, global); -goog.exportSymbol('proto.escrow.ContractIDBatch', null, global); -goog.exportSymbol('proto.escrow.ContractType', null, global); -goog.exportSymbol('proto.escrow.Escrow', null, global); -goog.exportSymbol('proto.escrow.EscrowContract', null, global); -goog.exportSymbol('proto.escrow.EscrowContractRequest', null, global); -goog.exportSymbol('proto.escrow.EscrowStatus', null, global); -goog.exportSymbol('proto.escrow.OperationType', null, global); -goog.exportSymbol('proto.escrow.PayinRequest', null, global); -goog.exportSymbol('proto.escrow.PayinResult', null, global); -goog.exportSymbol('proto.escrow.PayinStatus', null, global); -goog.exportSymbol('proto.escrow.Payment', null, global); -goog.exportSymbol('proto.escrow.PaymentResult', null, global); -goog.exportSymbol('proto.escrow.PayoutAddress', null, global); -goog.exportSymbol('proto.escrow.PayoutStatus', null, global); -goog.exportSymbol('proto.escrow.Schedule', null, global); -goog.exportSymbol('proto.escrow.SignedBalanceResult', null, global); -goog.exportSymbol('proto.escrow.SignedCancelContractResult', null, global); -goog.exportSymbol('proto.escrow.SignedCancelRequest', null, global); -goog.exportSymbol('proto.escrow.SignedContractID', null, global); -goog.exportSymbol('proto.escrow.SignedContractIDBatch', null, global); -goog.exportSymbol('proto.escrow.SignedEscrowContract', null, global); -goog.exportSymbol('proto.escrow.SignedModifyContractIDBatch', null, global); -goog.exportSymbol('proto.escrow.SignedPayinRequest', null, global); -goog.exportSymbol('proto.escrow.SignedPayinResult', null, global); -goog.exportSymbol('proto.escrow.SignedPayinStatus', null, global); -goog.exportSymbol('proto.escrow.SignedPaymentResult', null, global); -goog.exportSymbol('proto.escrow.SignedPayoutAddress', null, global); -goog.exportSymbol('proto.escrow.SignedPayoutStatus', null, global); -goog.exportSymbol('proto.escrow.SignedPayoutStatusBatch', null, global); -goog.exportSymbol('proto.escrow.SignedStakePenaltyRequest', null, global); -goog.exportSymbol('proto.escrow.SignedStakePenaltyResult', null, global); -goog.exportSymbol('proto.escrow.SignedStakeRequest', null, global); -goog.exportSymbol('proto.escrow.SignedStakeResult', null, global); -goog.exportSymbol('proto.escrow.SignedStartEscrowResult', null, global); -goog.exportSymbol('proto.escrow.SignedSubmitContractResult', null, global); -goog.exportSymbol('proto.escrow.StakeLedger', null, global); -goog.exportSymbol('proto.escrow.StakePenaltyRequest', null, global); -goog.exportSymbol('proto.escrow.StakePenaltyResult', null, global); -goog.exportSymbol('proto.escrow.StakeRequest', null, global); -goog.exportSymbol('proto.escrow.StakeResult', null, global); -goog.exportSymbol('proto.escrow.StakeStatus', null, global); -goog.exportSymbol('proto.escrow.StartEscrowResult', null, global); -goog.exportSymbol('proto.escrow.SubmitContractResult', null, global); -goog.exportSymbol('proto.escrow.TokenType', null, global); -goog.exportSymbol('proto.escrow.UnfinishStakeLedger', 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.escrow.ContractID = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.ContractID, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.ContractID.displayName = 'proto.escrow.ContractID'; -} -/** - * 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.escrow.ContractIDBatch = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.escrow.ContractIDBatch.repeatedFields_, null); -}; -goog.inherits(proto.escrow.ContractIDBatch, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.ContractIDBatch.displayName = 'proto.escrow.ContractIDBatch'; -} -/** - * 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.escrow.SignedContractID = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.SignedContractID, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.SignedContractID.displayName = 'proto.escrow.SignedContractID'; -} -/** - * 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.escrow.SignedContractIDBatch = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.SignedContractIDBatch, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.SignedContractIDBatch.displayName = 'proto.escrow.SignedContractIDBatch'; -} -/** - * 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.escrow.SignedModifyContractIDBatch = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.SignedModifyContractIDBatch, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.SignedModifyContractIDBatch.displayName = 'proto.escrow.SignedModifyContractIDBatch'; -} -/** - * 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.escrow.EscrowContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.EscrowContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.EscrowContract.displayName = 'proto.escrow.EscrowContract'; -} -/** - * 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.escrow.SignedEscrowContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.SignedEscrowContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.SignedEscrowContract.displayName = 'proto.escrow.SignedEscrowContract'; -} -/** - * 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.escrow.EscrowContractRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.escrow.EscrowContractRequest.repeatedFields_, null); -}; -goog.inherits(proto.escrow.EscrowContractRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.EscrowContractRequest.displayName = 'proto.escrow.EscrowContractRequest'; -} -/** - * 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.escrow.Escrow = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.Escrow, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.Escrow.displayName = 'proto.escrow.Escrow'; -} -/** - * 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.escrow.SubmitContractResult = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.escrow.SubmitContractResult.repeatedFields_, null); -}; -goog.inherits(proto.escrow.SubmitContractResult, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.SubmitContractResult.displayName = 'proto.escrow.SubmitContractResult'; -} -/** - * 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.escrow.SignedSubmitContractResult = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.SignedSubmitContractResult, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.SignedSubmitContractResult.displayName = 'proto.escrow.SignedSubmitContractResult'; -} -/** - * 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.escrow.StartEscrowResult = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.escrow.StartEscrowResult.repeatedFields_, null); -}; -goog.inherits(proto.escrow.StartEscrowResult, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.StartEscrowResult.displayName = 'proto.escrow.StartEscrowResult'; -} -/** - * 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.escrow.SignedStartEscrowResult = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.SignedStartEscrowResult, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.SignedStartEscrowResult.displayName = 'proto.escrow.SignedStartEscrowResult'; -} -/** - * 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.escrow.PayinRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.PayinRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.PayinRequest.displayName = 'proto.escrow.PayinRequest'; -} -/** - * 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.escrow.SignedPayinRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.SignedPayinRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.SignedPayinRequest.displayName = 'proto.escrow.SignedPayinRequest'; -} -/** - * 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.escrow.PayinResult = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.PayinResult, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.PayinResult.displayName = 'proto.escrow.PayinResult'; -} -/** - * 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.escrow.SignedPayinResult = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.SignedPayinResult, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.SignedPayinResult.displayName = 'proto.escrow.SignedPayinResult'; -} -/** - * 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.escrow.PayinStatus = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.PayinStatus, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.PayinStatus.displayName = 'proto.escrow.PayinStatus'; -} -/** - * 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.escrow.SignedPayinStatus = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.SignedPayinStatus, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.SignedPayinStatus.displayName = 'proto.escrow.SignedPayinStatus'; -} -/** - * 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.escrow.PayoutStatus = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.PayoutStatus, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.PayoutStatus.displayName = 'proto.escrow.PayoutStatus'; -} -/** - * 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.escrow.SignedPayoutStatus = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.SignedPayoutStatus, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.SignedPayoutStatus.displayName = 'proto.escrow.SignedPayoutStatus'; -} -/** - * 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.escrow.SignedPayoutStatusBatch = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.escrow.SignedPayoutStatusBatch.repeatedFields_, null); -}; -goog.inherits(proto.escrow.SignedPayoutStatusBatch, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.SignedPayoutStatusBatch.displayName = 'proto.escrow.SignedPayoutStatusBatch'; -} -/** - * 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.escrow.CancelContractRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.CancelContractRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.CancelContractRequest.displayName = 'proto.escrow.CancelContractRequest'; -} -/** - * 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.escrow.SignedCancelRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.SignedCancelRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.SignedCancelRequest.displayName = 'proto.escrow.SignedCancelRequest'; -} -/** - * 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.escrow.CancelContractResult = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.CancelContractResult, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.CancelContractResult.displayName = 'proto.escrow.CancelContractResult'; -} -/** - * 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.escrow.SignedCancelContractResult = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.SignedCancelContractResult, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.SignedCancelContractResult.displayName = 'proto.escrow.SignedCancelContractResult'; -} -/** - * 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.escrow.PayoutAddress = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.PayoutAddress, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.PayoutAddress.displayName = 'proto.escrow.PayoutAddress'; -} -/** - * 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.escrow.SignedPayoutAddress = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.SignedPayoutAddress, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.SignedPayoutAddress.displayName = 'proto.escrow.SignedPayoutAddress'; -} -/** - * 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.escrow.Payment = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.Payment, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.Payment.displayName = 'proto.escrow.Payment'; -} -/** - * 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.escrow.PaymentResult = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.escrow.PaymentResult.repeatedFields_, null); -}; -goog.inherits(proto.escrow.PaymentResult, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.PaymentResult.displayName = 'proto.escrow.PaymentResult'; -} -/** - * 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.escrow.SignedPaymentResult = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.SignedPaymentResult, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.SignedPaymentResult.displayName = 'proto.escrow.SignedPaymentResult'; -} -/** - * 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.escrow.BalanceResult = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.BalanceResult, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.BalanceResult.displayName = 'proto.escrow.BalanceResult'; -} -/** - * 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.escrow.SignedBalanceResult = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.SignedBalanceResult, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.SignedBalanceResult.displayName = 'proto.escrow.SignedBalanceResult'; -} -/** - * 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.escrow.SignedStakeRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.SignedStakeRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.SignedStakeRequest.displayName = 'proto.escrow.SignedStakeRequest'; -} -/** - * 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.escrow.StakeRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.StakeRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.StakeRequest.displayName = 'proto.escrow.StakeRequest'; -} -/** - * 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.escrow.StakeResult = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.escrow.StakeResult.repeatedFields_, null); -}; -goog.inherits(proto.escrow.StakeResult, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.StakeResult.displayName = 'proto.escrow.StakeResult'; -} -/** - * 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.escrow.SignedStakeResult = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.SignedStakeResult, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.SignedStakeResult.displayName = 'proto.escrow.SignedStakeResult'; -} -/** - * 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.escrow.StakeLedger = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.StakeLedger, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.StakeLedger.displayName = 'proto.escrow.StakeLedger'; -} -/** - * 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.escrow.UnfinishStakeLedger = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.UnfinishStakeLedger, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.UnfinishStakeLedger.displayName = 'proto.escrow.UnfinishStakeLedger'; -} -/** - * 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.escrow.SignedStakePenaltyRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.SignedStakePenaltyRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.SignedStakePenaltyRequest.displayName = 'proto.escrow.SignedStakePenaltyRequest'; -} -/** - * 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.escrow.StakePenaltyRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.StakePenaltyRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.StakePenaltyRequest.displayName = 'proto.escrow.StakePenaltyRequest'; -} -/** - * 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.escrow.StakePenaltyResult = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.StakePenaltyResult, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.StakePenaltyResult.displayName = 'proto.escrow.StakePenaltyResult'; -} -/** - * 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.escrow.SignedStakePenaltyResult = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.escrow.SignedStakePenaltyResult, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.escrow.SignedStakePenaltyResult.displayName = 'proto.escrow.SignedStakePenaltyResult'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.ContractID.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.ContractID.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.ContractID} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.ContractID.toObject = function(includeInstance, msg) { - var f, obj = { - contractId: jspb.Message.getFieldWithDefault(msg, 1, ""), - address: msg.getAddress_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.escrow.ContractID} - */ -proto.escrow.ContractID.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.ContractID; - return proto.escrow.ContractID.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.ContractID} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.ContractID} - */ -proto.escrow.ContractID.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.setContractId(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.ContractID.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.ContractID.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.ContractID} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.ContractID.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getContractId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional string contract_id = 1; - * @return {string} - */ -proto.escrow.ContractID.prototype.getContractId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.escrow.ContractID} returns this - */ -proto.escrow.ContractID.prototype.setContractId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional bytes address = 2; - * @return {!(string|Uint8Array)} - */ -proto.escrow.ContractID.prototype.getAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes address = 2; - * This is a type-conversion wrapper around `getAddress()` - * @return {string} - */ -proto.escrow.ContractID.prototype.getAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAddress())); -}; - - -/** - * optional bytes address = 2; - * 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.escrow.ContractID.prototype.getAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.ContractID} returns this - */ -proto.escrow.ContractID.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.escrow.ContractIDBatch.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.ContractIDBatch.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.ContractIDBatch.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.ContractIDBatch} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.ContractIDBatch.toObject = function(includeInstance, msg) { - var f, obj = { - contractIdList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, - address: msg.getAddress_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.escrow.ContractIDBatch} - */ -proto.escrow.ContractIDBatch.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.ContractIDBatch; - return proto.escrow.ContractIDBatch.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.ContractIDBatch} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.ContractIDBatch} - */ -proto.escrow.ContractIDBatch.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.addContractId(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.ContractIDBatch.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.ContractIDBatch.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.ContractIDBatch} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.ContractIDBatch.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getContractIdList(); - if (f.length > 0) { - writer.writeRepeatedString( - 1, - f - ); - } - f = message.getAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * repeated string contract_id = 1; - * @return {!Array} - */ -proto.escrow.ContractIDBatch.prototype.getContractIdList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.escrow.ContractIDBatch} returns this - */ -proto.escrow.ContractIDBatch.prototype.setContractIdList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.escrow.ContractIDBatch} returns this - */ -proto.escrow.ContractIDBatch.prototype.addContractId = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.escrow.ContractIDBatch} returns this - */ -proto.escrow.ContractIDBatch.prototype.clearContractIdList = function() { - return this.setContractIdList([]); -}; - - -/** - * optional bytes address = 2; - * @return {!(string|Uint8Array)} - */ -proto.escrow.ContractIDBatch.prototype.getAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes address = 2; - * This is a type-conversion wrapper around `getAddress()` - * @return {string} - */ -proto.escrow.ContractIDBatch.prototype.getAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAddress())); -}; - - -/** - * optional bytes address = 2; - * 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.escrow.ContractIDBatch.prototype.getAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.ContractIDBatch} returns this - */ -proto.escrow.ContractIDBatch.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.SignedContractID.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.SignedContractID.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.SignedContractID} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedContractID.toObject = function(includeInstance, msg) { - var f, obj = { - data: (f = msg.getData()) && proto.escrow.ContractID.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.escrow.SignedContractID} - */ -proto.escrow.SignedContractID.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.SignedContractID; - return proto.escrow.SignedContractID.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.SignedContractID} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.SignedContractID} - */ -proto.escrow.SignedContractID.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.escrow.ContractID; - reader.readMessage(value,proto.escrow.ContractID.deserializeBinaryFromReader); - msg.setData(value); - break; - case 2: - 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.escrow.SignedContractID.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.SignedContractID.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.SignedContractID} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedContractID.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getData(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.escrow.ContractID.serializeBinaryToWriter - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional ContractID data = 1; - * @return {?proto.escrow.ContractID} - */ -proto.escrow.SignedContractID.prototype.getData = function() { - return /** @type{?proto.escrow.ContractID} */ ( - jspb.Message.getWrapperField(this, proto.escrow.ContractID, 1)); -}; - - -/** - * @param {?proto.escrow.ContractID|undefined} value - * @return {!proto.escrow.SignedContractID} returns this -*/ -proto.escrow.SignedContractID.prototype.setData = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.SignedContractID} returns this - */ -proto.escrow.SignedContractID.prototype.clearData = function() { - return this.setData(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.SignedContractID.prototype.hasData = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes signature = 2; - * @return {!(string|Uint8Array)} - */ -proto.escrow.SignedContractID.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes signature = 2; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.escrow.SignedContractID.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 2; - * 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.escrow.SignedContractID.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.SignedContractID} returns this - */ -proto.escrow.SignedContractID.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.SignedContractIDBatch.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.SignedContractIDBatch.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.SignedContractIDBatch} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedContractIDBatch.toObject = function(includeInstance, msg) { - var f, obj = { - data: (f = msg.getData()) && proto.escrow.ContractIDBatch.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.escrow.SignedContractIDBatch} - */ -proto.escrow.SignedContractIDBatch.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.SignedContractIDBatch; - return proto.escrow.SignedContractIDBatch.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.SignedContractIDBatch} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.SignedContractIDBatch} - */ -proto.escrow.SignedContractIDBatch.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.escrow.ContractIDBatch; - reader.readMessage(value,proto.escrow.ContractIDBatch.deserializeBinaryFromReader); - msg.setData(value); - break; - case 2: - 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.escrow.SignedContractIDBatch.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.SignedContractIDBatch.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.SignedContractIDBatch} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedContractIDBatch.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getData(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.escrow.ContractIDBatch.serializeBinaryToWriter - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional ContractIDBatch data = 1; - * @return {?proto.escrow.ContractIDBatch} - */ -proto.escrow.SignedContractIDBatch.prototype.getData = function() { - return /** @type{?proto.escrow.ContractIDBatch} */ ( - jspb.Message.getWrapperField(this, proto.escrow.ContractIDBatch, 1)); -}; - - -/** - * @param {?proto.escrow.ContractIDBatch|undefined} value - * @return {!proto.escrow.SignedContractIDBatch} returns this -*/ -proto.escrow.SignedContractIDBatch.prototype.setData = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.SignedContractIDBatch} returns this - */ -proto.escrow.SignedContractIDBatch.prototype.clearData = function() { - return this.setData(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.SignedContractIDBatch.prototype.hasData = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes signature = 2; - * @return {!(string|Uint8Array)} - */ -proto.escrow.SignedContractIDBatch.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes signature = 2; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.escrow.SignedContractIDBatch.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 2; - * 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.escrow.SignedContractIDBatch.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.SignedContractIDBatch} returns this - */ -proto.escrow.SignedContractIDBatch.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.SignedModifyContractIDBatch.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.SignedModifyContractIDBatch.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.SignedModifyContractIDBatch} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedModifyContractIDBatch.toObject = function(includeInstance, msg) { - var f, obj = { - data: (f = msg.getData()) && proto.escrow.ContractIDBatch.toObject(includeInstance, f), - lastModifyTime: (f = msg.getLastModifyTime()) && google_protobuf_timestamp_pb.Timestamp.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.escrow.SignedModifyContractIDBatch} - */ -proto.escrow.SignedModifyContractIDBatch.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.SignedModifyContractIDBatch; - return proto.escrow.SignedModifyContractIDBatch.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.SignedModifyContractIDBatch} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.SignedModifyContractIDBatch} - */ -proto.escrow.SignedModifyContractIDBatch.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.escrow.ContractIDBatch; - reader.readMessage(value,proto.escrow.ContractIDBatch.deserializeBinaryFromReader); - msg.setData(value); - break; - case 2: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setLastModifyTime(value); - break; - case 3: - 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.escrow.SignedModifyContractIDBatch.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.SignedModifyContractIDBatch.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.SignedModifyContractIDBatch} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedModifyContractIDBatch.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getData(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.escrow.ContractIDBatch.serializeBinaryToWriter - ); - } - f = message.getLastModifyTime(); - if (f != null) { - writer.writeMessage( - 2, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } -}; - - -/** - * optional ContractIDBatch data = 1; - * @return {?proto.escrow.ContractIDBatch} - */ -proto.escrow.SignedModifyContractIDBatch.prototype.getData = function() { - return /** @type{?proto.escrow.ContractIDBatch} */ ( - jspb.Message.getWrapperField(this, proto.escrow.ContractIDBatch, 1)); -}; - - -/** - * @param {?proto.escrow.ContractIDBatch|undefined} value - * @return {!proto.escrow.SignedModifyContractIDBatch} returns this -*/ -proto.escrow.SignedModifyContractIDBatch.prototype.setData = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.SignedModifyContractIDBatch} returns this - */ -proto.escrow.SignedModifyContractIDBatch.prototype.clearData = function() { - return this.setData(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.SignedModifyContractIDBatch.prototype.hasData = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional google.protobuf.Timestamp last_modify_time = 2; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.escrow.SignedModifyContractIDBatch.prototype.getLastModifyTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.escrow.SignedModifyContractIDBatch} returns this -*/ -proto.escrow.SignedModifyContractIDBatch.prototype.setLastModifyTime = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.SignedModifyContractIDBatch} returns this - */ -proto.escrow.SignedModifyContractIDBatch.prototype.clearLastModifyTime = function() { - return this.setLastModifyTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.SignedModifyContractIDBatch.prototype.hasLastModifyTime = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional bytes signature = 3; - * @return {!(string|Uint8Array)} - */ -proto.escrow.SignedModifyContractIDBatch.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes signature = 3; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.escrow.SignedModifyContractIDBatch.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 3; - * 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.escrow.SignedModifyContractIDBatch.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.SignedModifyContractIDBatch} returns this - */ -proto.escrow.SignedModifyContractIDBatch.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.EscrowContract.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.EscrowContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.EscrowContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.EscrowContract.toObject = function(includeInstance, msg) { - var f, obj = { - contractId: jspb.Message.getFieldWithDefault(msg, 1, ""), - buyerAddress: msg.getBuyerAddress_asB64(), - sellerAddress: msg.getSellerAddress_asB64(), - authAddress: msg.getAuthAddress_asB64(), - amount: jspb.Message.getFieldWithDefault(msg, 5, 0), - collateralAmount: jspb.Message.getFieldWithDefault(msg, 6, 0), - withholdAmount: jspb.Message.getFieldWithDefault(msg, 7, 0), - tokenType: jspb.Message.getFieldWithDefault(msg, 8, 0), - payoutSchedule: jspb.Message.getFieldWithDefault(msg, 9, 0), - numPayouts: jspb.Message.getFieldWithDefault(msg, 10, 0), - reference: msg.getReference_asB64(), - customizePayoutPeriod: jspb.Message.getFieldWithDefault(msg, 12, 0), - type: jspb.Message.getFieldWithDefault(msg, 13, 0), - contingentAmount: jspb.Message.getFieldWithDefault(msg, 14, 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.escrow.EscrowContract} - */ -proto.escrow.EscrowContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.EscrowContract; - return proto.escrow.EscrowContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.EscrowContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.EscrowContract} - */ -proto.escrow.EscrowContract.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.setContractId(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setBuyerAddress(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSellerAddress(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAuthAddress(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCollateralAmount(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setWithholdAmount(value); - break; - case 8: - var value = /** @type {!proto.escrow.TokenType} */ (reader.readEnum()); - msg.setTokenType(value); - break; - case 9: - var value = /** @type {!proto.escrow.Schedule} */ (reader.readEnum()); - msg.setPayoutSchedule(value); - break; - case 10: - var value = /** @type {number} */ (reader.readInt32()); - msg.setNumPayouts(value); - break; - case 11: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setReference(value); - break; - case 12: - var value = /** @type {number} */ (reader.readInt32()); - msg.setCustomizePayoutPeriod(value); - break; - case 13: - var value = /** @type {!proto.escrow.ContractType} */ (reader.readEnum()); - msg.setType(value); - break; - case 14: - var value = /** @type {number} */ (reader.readInt64()); - msg.setContingentAmount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.EscrowContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.EscrowContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.EscrowContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.EscrowContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getContractId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getBuyerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getSellerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getAuthAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getCollateralAmount(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getWithholdAmount(); - if (f !== 0) { - writer.writeInt64( - 7, - f - ); - } - f = message.getTokenType(); - if (f !== 0.0) { - writer.writeEnum( - 8, - f - ); - } - f = message.getPayoutSchedule(); - if (f !== 0.0) { - writer.writeEnum( - 9, - f - ); - } - f = message.getNumPayouts(); - if (f !== 0) { - writer.writeInt32( - 10, - f - ); - } - f = message.getReference_asU8(); - if (f.length > 0) { - writer.writeBytes( - 11, - f - ); - } - f = message.getCustomizePayoutPeriod(); - if (f !== 0) { - writer.writeInt32( - 12, - f - ); - } - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 13, - f - ); - } - f = message.getContingentAmount(); - if (f !== 0) { - writer.writeInt64( - 14, - f - ); - } -}; - - -/** - * optional string contract_id = 1; - * @return {string} - */ -proto.escrow.EscrowContract.prototype.getContractId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.escrow.EscrowContract} returns this - */ -proto.escrow.EscrowContract.prototype.setContractId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional bytes buyer_address = 2; - * @return {!(string|Uint8Array)} - */ -proto.escrow.EscrowContract.prototype.getBuyerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes buyer_address = 2; - * This is a type-conversion wrapper around `getBuyerAddress()` - * @return {string} - */ -proto.escrow.EscrowContract.prototype.getBuyerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBuyerAddress())); -}; - - -/** - * optional bytes buyer_address = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getBuyerAddress()` - * @return {!Uint8Array} - */ -proto.escrow.EscrowContract.prototype.getBuyerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getBuyerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.EscrowContract} returns this - */ -proto.escrow.EscrowContract.prototype.setBuyerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional bytes seller_address = 3; - * @return {!(string|Uint8Array)} - */ -proto.escrow.EscrowContract.prototype.getSellerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes seller_address = 3; - * This is a type-conversion wrapper around `getSellerAddress()` - * @return {string} - */ -proto.escrow.EscrowContract.prototype.getSellerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSellerAddress())); -}; - - -/** - * optional bytes seller_address = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSellerAddress()` - * @return {!Uint8Array} - */ -proto.escrow.EscrowContract.prototype.getSellerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSellerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.EscrowContract} returns this - */ -proto.escrow.EscrowContract.prototype.setSellerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional bytes auth_address = 4; - * @return {!(string|Uint8Array)} - */ -proto.escrow.EscrowContract.prototype.getAuthAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes auth_address = 4; - * This is a type-conversion wrapper around `getAuthAddress()` - * @return {string} - */ -proto.escrow.EscrowContract.prototype.getAuthAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAuthAddress())); -}; - - -/** - * optional bytes auth_address = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAuthAddress()` - * @return {!Uint8Array} - */ -proto.escrow.EscrowContract.prototype.getAuthAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAuthAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.EscrowContract} returns this - */ -proto.escrow.EscrowContract.prototype.setAuthAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional int64 amount = 5; - * @return {number} - */ -proto.escrow.EscrowContract.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.EscrowContract} returns this - */ -proto.escrow.EscrowContract.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 collateral_amount = 6; - * @return {number} - */ -proto.escrow.EscrowContract.prototype.getCollateralAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.EscrowContract} returns this - */ -proto.escrow.EscrowContract.prototype.setCollateralAmount = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional int64 withhold_amount = 7; - * @return {number} - */ -proto.escrow.EscrowContract.prototype.getWithholdAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.EscrowContract} returns this - */ -proto.escrow.EscrowContract.prototype.setWithholdAmount = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional TokenType token_type = 8; - * @return {!proto.escrow.TokenType} - */ -proto.escrow.EscrowContract.prototype.getTokenType = function() { - return /** @type {!proto.escrow.TokenType} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {!proto.escrow.TokenType} value - * @return {!proto.escrow.EscrowContract} returns this - */ -proto.escrow.EscrowContract.prototype.setTokenType = function(value) { - return jspb.Message.setProto3EnumField(this, 8, value); -}; - - -/** - * optional Schedule payout_schedule = 9; - * @return {!proto.escrow.Schedule} - */ -proto.escrow.EscrowContract.prototype.getPayoutSchedule = function() { - return /** @type {!proto.escrow.Schedule} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {!proto.escrow.Schedule} value - * @return {!proto.escrow.EscrowContract} returns this - */ -proto.escrow.EscrowContract.prototype.setPayoutSchedule = function(value) { - return jspb.Message.setProto3EnumField(this, 9, value); -}; - - -/** - * optional int32 num_payouts = 10; - * @return {number} - */ -proto.escrow.EscrowContract.prototype.getNumPayouts = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.EscrowContract} returns this - */ -proto.escrow.EscrowContract.prototype.setNumPayouts = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); -}; - - -/** - * optional bytes reference = 11; - * @return {!(string|Uint8Array)} - */ -proto.escrow.EscrowContract.prototype.getReference = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 11, "")); -}; - - -/** - * optional bytes reference = 11; - * This is a type-conversion wrapper around `getReference()` - * @return {string} - */ -proto.escrow.EscrowContract.prototype.getReference_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getReference())); -}; - - -/** - * optional bytes reference = 11; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getReference()` - * @return {!Uint8Array} - */ -proto.escrow.EscrowContract.prototype.getReference_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getReference())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.EscrowContract} returns this - */ -proto.escrow.EscrowContract.prototype.setReference = function(value) { - return jspb.Message.setProto3BytesField(this, 11, value); -}; - - -/** - * optional int32 customize_payout_period = 12; - * @return {number} - */ -proto.escrow.EscrowContract.prototype.getCustomizePayoutPeriod = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.EscrowContract} returns this - */ -proto.escrow.EscrowContract.prototype.setCustomizePayoutPeriod = function(value) { - return jspb.Message.setProto3IntField(this, 12, value); -}; - - -/** - * optional ContractType type = 13; - * @return {!proto.escrow.ContractType} - */ -proto.escrow.EscrowContract.prototype.getType = function() { - return /** @type {!proto.escrow.ContractType} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); -}; - - -/** - * @param {!proto.escrow.ContractType} value - * @return {!proto.escrow.EscrowContract} returns this - */ -proto.escrow.EscrowContract.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 13, value); -}; - - -/** - * optional int64 contingent_amount = 14; - * @return {number} - */ -proto.escrow.EscrowContract.prototype.getContingentAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.EscrowContract} returns this - */ -proto.escrow.EscrowContract.prototype.setContingentAmount = function(value) { - return jspb.Message.setProto3IntField(this, 14, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.SignedEscrowContract.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.SignedEscrowContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.SignedEscrowContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedEscrowContract.toObject = function(includeInstance, msg) { - var f, obj = { - contract: (f = msg.getContract()) && proto.escrow.EscrowContract.toObject(includeInstance, f), - buyerSignature: msg.getBuyerSignature_asB64(), - sellerSignature: msg.getSellerSignature_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.escrow.SignedEscrowContract} - */ -proto.escrow.SignedEscrowContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.SignedEscrowContract; - return proto.escrow.SignedEscrowContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.SignedEscrowContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.SignedEscrowContract} - */ -proto.escrow.SignedEscrowContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.escrow.EscrowContract; - reader.readMessage(value,proto.escrow.EscrowContract.deserializeBinaryFromReader); - msg.setContract(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setBuyerSignature(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSellerSignature(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.SignedEscrowContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.SignedEscrowContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.SignedEscrowContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedEscrowContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getContract(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.escrow.EscrowContract.serializeBinaryToWriter - ); - } - f = message.getBuyerSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getSellerSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } -}; - - -/** - * optional EscrowContract contract = 1; - * @return {?proto.escrow.EscrowContract} - */ -proto.escrow.SignedEscrowContract.prototype.getContract = function() { - return /** @type{?proto.escrow.EscrowContract} */ ( - jspb.Message.getWrapperField(this, proto.escrow.EscrowContract, 1)); -}; - - -/** - * @param {?proto.escrow.EscrowContract|undefined} value - * @return {!proto.escrow.SignedEscrowContract} returns this -*/ -proto.escrow.SignedEscrowContract.prototype.setContract = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.SignedEscrowContract} returns this - */ -proto.escrow.SignedEscrowContract.prototype.clearContract = function() { - return this.setContract(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.SignedEscrowContract.prototype.hasContract = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes buyer_signature = 2; - * @return {!(string|Uint8Array)} - */ -proto.escrow.SignedEscrowContract.prototype.getBuyerSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes buyer_signature = 2; - * This is a type-conversion wrapper around `getBuyerSignature()` - * @return {string} - */ -proto.escrow.SignedEscrowContract.prototype.getBuyerSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBuyerSignature())); -}; - - -/** - * optional bytes buyer_signature = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getBuyerSignature()` - * @return {!Uint8Array} - */ -proto.escrow.SignedEscrowContract.prototype.getBuyerSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getBuyerSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.SignedEscrowContract} returns this - */ -proto.escrow.SignedEscrowContract.prototype.setBuyerSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional bytes seller_signature = 3; - * @return {!(string|Uint8Array)} - */ -proto.escrow.SignedEscrowContract.prototype.getSellerSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes seller_signature = 3; - * This is a type-conversion wrapper around `getSellerSignature()` - * @return {string} - */ -proto.escrow.SignedEscrowContract.prototype.getSellerSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSellerSignature())); -}; - - -/** - * optional bytes seller_signature = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSellerSignature()` - * @return {!Uint8Array} - */ -proto.escrow.SignedEscrowContract.prototype.getSellerSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSellerSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.SignedEscrowContract} returns this - */ -proto.escrow.SignedEscrowContract.prototype.setSellerSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.escrow.EscrowContractRequest.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.EscrowContractRequest.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.EscrowContractRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.EscrowContractRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.EscrowContractRequest.toObject = function(includeInstance, msg) { - var f, obj = { - contractList: jspb.Message.toObjectList(msg.getContractList(), - proto.escrow.SignedEscrowContract.toObject, includeInstance), - buyerChannel: (f = msg.getBuyerChannel()) && protos_ledger_ledger_pb.SignedChannelCommit.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.escrow.EscrowContractRequest} - */ -proto.escrow.EscrowContractRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.EscrowContractRequest; - return proto.escrow.EscrowContractRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.EscrowContractRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.EscrowContractRequest} - */ -proto.escrow.EscrowContractRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.escrow.SignedEscrowContract; - reader.readMessage(value,proto.escrow.SignedEscrowContract.deserializeBinaryFromReader); - msg.addContract(value); - break; - case 2: - var value = new protos_ledger_ledger_pb.SignedChannelCommit; - reader.readMessage(value,protos_ledger_ledger_pb.SignedChannelCommit.deserializeBinaryFromReader); - msg.setBuyerChannel(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.EscrowContractRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.EscrowContractRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.EscrowContractRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.EscrowContractRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getContractList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.escrow.SignedEscrowContract.serializeBinaryToWriter - ); - } - f = message.getBuyerChannel(); - if (f != null) { - writer.writeMessage( - 2, - f, - protos_ledger_ledger_pb.SignedChannelCommit.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated SignedEscrowContract contract = 1; - * @return {!Array} - */ -proto.escrow.EscrowContractRequest.prototype.getContractList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.escrow.SignedEscrowContract, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.escrow.EscrowContractRequest} returns this -*/ -proto.escrow.EscrowContractRequest.prototype.setContractList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.escrow.SignedEscrowContract=} opt_value - * @param {number=} opt_index - * @return {!proto.escrow.SignedEscrowContract} - */ -proto.escrow.EscrowContractRequest.prototype.addContract = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.escrow.SignedEscrowContract, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.escrow.EscrowContractRequest} returns this - */ -proto.escrow.EscrowContractRequest.prototype.clearContractList = function() { - return this.setContractList([]); -}; - - -/** - * optional ledger.SignedChannelCommit buyer_channel = 2; - * @return {?proto.ledger.SignedChannelCommit} - */ -proto.escrow.EscrowContractRequest.prototype.getBuyerChannel = function() { - return /** @type{?proto.ledger.SignedChannelCommit} */ ( - jspb.Message.getWrapperField(this, protos_ledger_ledger_pb.SignedChannelCommit, 2)); -}; - - -/** - * @param {?proto.ledger.SignedChannelCommit|undefined} value - * @return {!proto.escrow.EscrowContractRequest} returns this -*/ -proto.escrow.EscrowContractRequest.prototype.setBuyerChannel = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.EscrowContractRequest} returns this - */ -proto.escrow.EscrowContractRequest.prototype.clearBuyerChannel = function() { - return this.setBuyerChannel(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.EscrowContractRequest.prototype.hasBuyerChannel = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.Escrow.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.Escrow.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.Escrow} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.Escrow.toObject = function(includeInstance, msg) { - var f, obj = { - contractId: jspb.Message.getFieldWithDefault(msg, 1, ""), - escrowId: jspb.Message.getFieldWithDefault(msg, 2, 0), - fromAddress: msg.getFromAddress_asB64(), - toAddress: msg.getToAddress_asB64(), - amount: jspb.Message.getFieldWithDefault(msg, 5, 0), - collateralAmount: jspb.Message.getFieldWithDefault(msg, 6, 0), - errorCode: jspb.Message.getFieldWithDefault(msg, 7, 0), - errorMessage: jspb.Message.getFieldWithDefault(msg, 8, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.escrow.Escrow} - */ -proto.escrow.Escrow.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.Escrow; - return proto.escrow.Escrow.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.Escrow} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.Escrow} - */ -proto.escrow.Escrow.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.setContractId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setEscrowId(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setFromAddress(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setToAddress(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCollateralAmount(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt32()); - msg.setErrorCode(value); - break; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.setErrorMessage(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.Escrow.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.Escrow.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.Escrow} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.Escrow.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getContractId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getEscrowId(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getFromAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getToAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getCollateralAmount(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getErrorCode(); - if (f !== 0) { - writer.writeInt32( - 7, - f - ); - } - f = message.getErrorMessage(); - if (f.length > 0) { - writer.writeString( - 8, - f - ); - } -}; - - -/** - * optional string contract_id = 1; - * @return {string} - */ -proto.escrow.Escrow.prototype.getContractId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.escrow.Escrow} returns this - */ -proto.escrow.Escrow.prototype.setContractId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional int64 escrow_id = 2; - * @return {number} - */ -proto.escrow.Escrow.prototype.getEscrowId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.Escrow} returns this - */ -proto.escrow.Escrow.prototype.setEscrowId = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bytes from_address = 3; - * @return {!(string|Uint8Array)} - */ -proto.escrow.Escrow.prototype.getFromAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes from_address = 3; - * This is a type-conversion wrapper around `getFromAddress()` - * @return {string} - */ -proto.escrow.Escrow.prototype.getFromAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getFromAddress())); -}; - - -/** - * optional bytes from_address = 3; - * 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.escrow.Escrow.prototype.getFromAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getFromAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.Escrow} returns this - */ -proto.escrow.Escrow.prototype.setFromAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional bytes to_address = 4; - * @return {!(string|Uint8Array)} - */ -proto.escrow.Escrow.prototype.getToAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes to_address = 4; - * This is a type-conversion wrapper around `getToAddress()` - * @return {string} - */ -proto.escrow.Escrow.prototype.getToAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getToAddress())); -}; - - -/** - * optional bytes to_address = 4; - * 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.escrow.Escrow.prototype.getToAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getToAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.Escrow} returns this - */ -proto.escrow.Escrow.prototype.setToAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional int64 amount = 5; - * @return {number} - */ -proto.escrow.Escrow.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.Escrow} returns this - */ -proto.escrow.Escrow.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 collateral_amount = 6; - * @return {number} - */ -proto.escrow.Escrow.prototype.getCollateralAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.Escrow} returns this - */ -proto.escrow.Escrow.prototype.setCollateralAmount = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional int32 error_code = 7; - * @return {number} - */ -proto.escrow.Escrow.prototype.getErrorCode = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.Escrow} returns this - */ -proto.escrow.Escrow.prototype.setErrorCode = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional string error_message = 8; - * @return {string} - */ -proto.escrow.Escrow.prototype.getErrorMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** - * @param {string} value - * @return {!proto.escrow.Escrow} returns this - */ -proto.escrow.Escrow.prototype.setErrorMessage = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.escrow.SubmitContractResult.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.SubmitContractResult.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.SubmitContractResult.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.SubmitContractResult} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SubmitContractResult.toObject = function(includeInstance, msg) { - var f, obj = { - payinId: jspb.Message.getFieldWithDefault(msg, 1, ""), - escrowList: jspb.Message.toObjectList(msg.getEscrowList(), - proto.escrow.Escrow.toObject, includeInstance), - escrowAddress: msg.getEscrowAddress_asB64(), - escrowSignedTime: (f = msg.getEscrowSignedTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - buyerChannelState: (f = msg.getBuyerChannelState()) && protos_ledger_ledger_pb.SignedChannelState.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.escrow.SubmitContractResult} - */ -proto.escrow.SubmitContractResult.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.SubmitContractResult; - return proto.escrow.SubmitContractResult.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.SubmitContractResult} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.SubmitContractResult} - */ -proto.escrow.SubmitContractResult.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.setPayinId(value); - break; - case 2: - var value = new proto.escrow.Escrow; - reader.readMessage(value,proto.escrow.Escrow.deserializeBinaryFromReader); - msg.addEscrow(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setEscrowAddress(value); - break; - case 4: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setEscrowSignedTime(value); - break; - case 5: - var value = new protos_ledger_ledger_pb.SignedChannelState; - reader.readMessage(value,protos_ledger_ledger_pb.SignedChannelState.deserializeBinaryFromReader); - msg.setBuyerChannelState(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.SubmitContractResult.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.SubmitContractResult.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.SubmitContractResult} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SubmitContractResult.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPayinId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getEscrowList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.escrow.Escrow.serializeBinaryToWriter - ); - } - f = message.getEscrowAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getEscrowSignedTime(); - if (f != null) { - writer.writeMessage( - 4, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getBuyerChannelState(); - if (f != null) { - writer.writeMessage( - 5, - f, - protos_ledger_ledger_pb.SignedChannelState.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string payin_id = 1; - * @return {string} - */ -proto.escrow.SubmitContractResult.prototype.getPayinId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.escrow.SubmitContractResult} returns this - */ -proto.escrow.SubmitContractResult.prototype.setPayinId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * repeated Escrow escrow = 2; - * @return {!Array} - */ -proto.escrow.SubmitContractResult.prototype.getEscrowList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.escrow.Escrow, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.escrow.SubmitContractResult} returns this -*/ -proto.escrow.SubmitContractResult.prototype.setEscrowList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.escrow.Escrow=} opt_value - * @param {number=} opt_index - * @return {!proto.escrow.Escrow} - */ -proto.escrow.SubmitContractResult.prototype.addEscrow = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.escrow.Escrow, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.escrow.SubmitContractResult} returns this - */ -proto.escrow.SubmitContractResult.prototype.clearEscrowList = function() { - return this.setEscrowList([]); -}; - - -/** - * optional bytes escrow_address = 3; - * @return {!(string|Uint8Array)} - */ -proto.escrow.SubmitContractResult.prototype.getEscrowAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes escrow_address = 3; - * This is a type-conversion wrapper around `getEscrowAddress()` - * @return {string} - */ -proto.escrow.SubmitContractResult.prototype.getEscrowAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getEscrowAddress())); -}; - - -/** - * optional bytes escrow_address = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEscrowAddress()` - * @return {!Uint8Array} - */ -proto.escrow.SubmitContractResult.prototype.getEscrowAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getEscrowAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.SubmitContractResult} returns this - */ -proto.escrow.SubmitContractResult.prototype.setEscrowAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional google.protobuf.Timestamp escrow_signed_time = 4; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.escrow.SubmitContractResult.prototype.getEscrowSignedTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.escrow.SubmitContractResult} returns this -*/ -proto.escrow.SubmitContractResult.prototype.setEscrowSignedTime = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.SubmitContractResult} returns this - */ -proto.escrow.SubmitContractResult.prototype.clearEscrowSignedTime = function() { - return this.setEscrowSignedTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.SubmitContractResult.prototype.hasEscrowSignedTime = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional ledger.SignedChannelState buyer_channel_state = 5; - * @return {?proto.ledger.SignedChannelState} - */ -proto.escrow.SubmitContractResult.prototype.getBuyerChannelState = function() { - return /** @type{?proto.ledger.SignedChannelState} */ ( - jspb.Message.getWrapperField(this, protos_ledger_ledger_pb.SignedChannelState, 5)); -}; - - -/** - * @param {?proto.ledger.SignedChannelState|undefined} value - * @return {!proto.escrow.SubmitContractResult} returns this -*/ -proto.escrow.SubmitContractResult.prototype.setBuyerChannelState = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.SubmitContractResult} returns this - */ -proto.escrow.SubmitContractResult.prototype.clearBuyerChannelState = function() { - return this.setBuyerChannelState(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.SubmitContractResult.prototype.hasBuyerChannelState = function() { - return jspb.Message.getField(this, 5) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.SignedSubmitContractResult.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.SignedSubmitContractResult.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.SignedSubmitContractResult} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedSubmitContractResult.toObject = function(includeInstance, msg) { - var f, obj = { - result: (f = msg.getResult()) && proto.escrow.SubmitContractResult.toObject(includeInstance, f), - escrowSignature: msg.getEscrowSignature_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.escrow.SignedSubmitContractResult} - */ -proto.escrow.SignedSubmitContractResult.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.SignedSubmitContractResult; - return proto.escrow.SignedSubmitContractResult.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.SignedSubmitContractResult} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.SignedSubmitContractResult} - */ -proto.escrow.SignedSubmitContractResult.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.escrow.SubmitContractResult; - reader.readMessage(value,proto.escrow.SubmitContractResult.deserializeBinaryFromReader); - msg.setResult(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setEscrowSignature(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.SignedSubmitContractResult.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.SignedSubmitContractResult.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.SignedSubmitContractResult} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedSubmitContractResult.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getResult(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.escrow.SubmitContractResult.serializeBinaryToWriter - ); - } - f = message.getEscrowSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional SubmitContractResult result = 1; - * @return {?proto.escrow.SubmitContractResult} - */ -proto.escrow.SignedSubmitContractResult.prototype.getResult = function() { - return /** @type{?proto.escrow.SubmitContractResult} */ ( - jspb.Message.getWrapperField(this, proto.escrow.SubmitContractResult, 1)); -}; - - -/** - * @param {?proto.escrow.SubmitContractResult|undefined} value - * @return {!proto.escrow.SignedSubmitContractResult} returns this -*/ -proto.escrow.SignedSubmitContractResult.prototype.setResult = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.SignedSubmitContractResult} returns this - */ -proto.escrow.SignedSubmitContractResult.prototype.clearResult = function() { - return this.setResult(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.SignedSubmitContractResult.prototype.hasResult = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes escrow_signature = 2; - * @return {!(string|Uint8Array)} - */ -proto.escrow.SignedSubmitContractResult.prototype.getEscrowSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes escrow_signature = 2; - * This is a type-conversion wrapper around `getEscrowSignature()` - * @return {string} - */ -proto.escrow.SignedSubmitContractResult.prototype.getEscrowSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getEscrowSignature())); -}; - - -/** - * optional bytes escrow_signature = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEscrowSignature()` - * @return {!Uint8Array} - */ -proto.escrow.SignedSubmitContractResult.prototype.getEscrowSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getEscrowSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.SignedSubmitContractResult} returns this - */ -proto.escrow.SignedSubmitContractResult.prototype.setEscrowSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.escrow.StartEscrowResult.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.StartEscrowResult.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.StartEscrowResult.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.StartEscrowResult} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.StartEscrowResult.toObject = function(includeInstance, msg) { - var f, obj = { - escrowList: jspb.Message.toObjectList(msg.getEscrowList(), - proto.escrow.Escrow.toObject, includeInstance), - escrowAddress: msg.getEscrowAddress_asB64(), - escrowSignedTime: (f = msg.getEscrowSignedTime()) && google_protobuf_timestamp_pb.Timestamp.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.escrow.StartEscrowResult} - */ -proto.escrow.StartEscrowResult.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.StartEscrowResult; - return proto.escrow.StartEscrowResult.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.StartEscrowResult} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.StartEscrowResult} - */ -proto.escrow.StartEscrowResult.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.escrow.Escrow; - reader.readMessage(value,proto.escrow.Escrow.deserializeBinaryFromReader); - msg.addEscrow(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setEscrowAddress(value); - break; - case 3: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setEscrowSignedTime(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.StartEscrowResult.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.StartEscrowResult.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.StartEscrowResult} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.StartEscrowResult.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getEscrowList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.escrow.Escrow.serializeBinaryToWriter - ); - } - f = message.getEscrowAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getEscrowSignedTime(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Escrow escrow = 1; - * @return {!Array} - */ -proto.escrow.StartEscrowResult.prototype.getEscrowList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.escrow.Escrow, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.escrow.StartEscrowResult} returns this -*/ -proto.escrow.StartEscrowResult.prototype.setEscrowList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.escrow.Escrow=} opt_value - * @param {number=} opt_index - * @return {!proto.escrow.Escrow} - */ -proto.escrow.StartEscrowResult.prototype.addEscrow = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.escrow.Escrow, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.escrow.StartEscrowResult} returns this - */ -proto.escrow.StartEscrowResult.prototype.clearEscrowList = function() { - return this.setEscrowList([]); -}; - - -/** - * optional bytes escrow_address = 2; - * @return {!(string|Uint8Array)} - */ -proto.escrow.StartEscrowResult.prototype.getEscrowAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes escrow_address = 2; - * This is a type-conversion wrapper around `getEscrowAddress()` - * @return {string} - */ -proto.escrow.StartEscrowResult.prototype.getEscrowAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getEscrowAddress())); -}; - - -/** - * optional bytes escrow_address = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEscrowAddress()` - * @return {!Uint8Array} - */ -proto.escrow.StartEscrowResult.prototype.getEscrowAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getEscrowAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.StartEscrowResult} returns this - */ -proto.escrow.StartEscrowResult.prototype.setEscrowAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional google.protobuf.Timestamp escrow_signed_time = 3; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.escrow.StartEscrowResult.prototype.getEscrowSignedTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.escrow.StartEscrowResult} returns this -*/ -proto.escrow.StartEscrowResult.prototype.setEscrowSignedTime = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.StartEscrowResult} returns this - */ -proto.escrow.StartEscrowResult.prototype.clearEscrowSignedTime = function() { - return this.setEscrowSignedTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.StartEscrowResult.prototype.hasEscrowSignedTime = function() { - return jspb.Message.getField(this, 3) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.SignedStartEscrowResult.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.SignedStartEscrowResult.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.SignedStartEscrowResult} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedStartEscrowResult.toObject = function(includeInstance, msg) { - var f, obj = { - result: (f = msg.getResult()) && proto.escrow.StartEscrowResult.toObject(includeInstance, f), - escrowSignature: msg.getEscrowSignature_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.escrow.SignedStartEscrowResult} - */ -proto.escrow.SignedStartEscrowResult.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.SignedStartEscrowResult; - return proto.escrow.SignedStartEscrowResult.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.SignedStartEscrowResult} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.SignedStartEscrowResult} - */ -proto.escrow.SignedStartEscrowResult.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.escrow.StartEscrowResult; - reader.readMessage(value,proto.escrow.StartEscrowResult.deserializeBinaryFromReader); - msg.setResult(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setEscrowSignature(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.SignedStartEscrowResult.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.SignedStartEscrowResult.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.SignedStartEscrowResult} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedStartEscrowResult.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getResult(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.escrow.StartEscrowResult.serializeBinaryToWriter - ); - } - f = message.getEscrowSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional StartEscrowResult result = 1; - * @return {?proto.escrow.StartEscrowResult} - */ -proto.escrow.SignedStartEscrowResult.prototype.getResult = function() { - return /** @type{?proto.escrow.StartEscrowResult} */ ( - jspb.Message.getWrapperField(this, proto.escrow.StartEscrowResult, 1)); -}; - - -/** - * @param {?proto.escrow.StartEscrowResult|undefined} value - * @return {!proto.escrow.SignedStartEscrowResult} returns this -*/ -proto.escrow.SignedStartEscrowResult.prototype.setResult = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.SignedStartEscrowResult} returns this - */ -proto.escrow.SignedStartEscrowResult.prototype.clearResult = function() { - return this.setResult(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.SignedStartEscrowResult.prototype.hasResult = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes escrow_signature = 2; - * @return {!(string|Uint8Array)} - */ -proto.escrow.SignedStartEscrowResult.prototype.getEscrowSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes escrow_signature = 2; - * This is a type-conversion wrapper around `getEscrowSignature()` - * @return {string} - */ -proto.escrow.SignedStartEscrowResult.prototype.getEscrowSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getEscrowSignature())); -}; - - -/** - * optional bytes escrow_signature = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEscrowSignature()` - * @return {!Uint8Array} - */ -proto.escrow.SignedStartEscrowResult.prototype.getEscrowSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getEscrowSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.SignedStartEscrowResult} returns this - */ -proto.escrow.SignedStartEscrowResult.prototype.setEscrowSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.PayinRequest.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.PayinRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.PayinRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.PayinRequest.toObject = function(includeInstance, msg) { - var f, obj = { - payinId: jspb.Message.getFieldWithDefault(msg, 1, ""), - buyerAddress: msg.getBuyerAddress_asB64(), - buyerChannelState: (f = msg.getBuyerChannelState()) && protos_ledger_ledger_pb.SignedChannelState.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.escrow.PayinRequest} - */ -proto.escrow.PayinRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.PayinRequest; - return proto.escrow.PayinRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.PayinRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.PayinRequest} - */ -proto.escrow.PayinRequest.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.setPayinId(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setBuyerAddress(value); - break; - case 3: - var value = new protos_ledger_ledger_pb.SignedChannelState; - reader.readMessage(value,protos_ledger_ledger_pb.SignedChannelState.deserializeBinaryFromReader); - msg.setBuyerChannelState(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.PayinRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.PayinRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.PayinRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.PayinRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPayinId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getBuyerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getBuyerChannelState(); - if (f != null) { - writer.writeMessage( - 3, - f, - protos_ledger_ledger_pb.SignedChannelState.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string payin_id = 1; - * @return {string} - */ -proto.escrow.PayinRequest.prototype.getPayinId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.escrow.PayinRequest} returns this - */ -proto.escrow.PayinRequest.prototype.setPayinId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional bytes buyer_address = 2; - * @return {!(string|Uint8Array)} - */ -proto.escrow.PayinRequest.prototype.getBuyerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes buyer_address = 2; - * This is a type-conversion wrapper around `getBuyerAddress()` - * @return {string} - */ -proto.escrow.PayinRequest.prototype.getBuyerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBuyerAddress())); -}; - - -/** - * optional bytes buyer_address = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getBuyerAddress()` - * @return {!Uint8Array} - */ -proto.escrow.PayinRequest.prototype.getBuyerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getBuyerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.PayinRequest} returns this - */ -proto.escrow.PayinRequest.prototype.setBuyerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional ledger.SignedChannelState buyer_channel_state = 3; - * @return {?proto.ledger.SignedChannelState} - */ -proto.escrow.PayinRequest.prototype.getBuyerChannelState = function() { - return /** @type{?proto.ledger.SignedChannelState} */ ( - jspb.Message.getWrapperField(this, protos_ledger_ledger_pb.SignedChannelState, 3)); -}; - - -/** - * @param {?proto.ledger.SignedChannelState|undefined} value - * @return {!proto.escrow.PayinRequest} returns this -*/ -proto.escrow.PayinRequest.prototype.setBuyerChannelState = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.PayinRequest} returns this - */ -proto.escrow.PayinRequest.prototype.clearBuyerChannelState = function() { - return this.setBuyerChannelState(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.PayinRequest.prototype.hasBuyerChannelState = function() { - return jspb.Message.getField(this, 3) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.SignedPayinRequest.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.SignedPayinRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.SignedPayinRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedPayinRequest.toObject = function(includeInstance, msg) { - var f, obj = { - request: (f = msg.getRequest()) && proto.escrow.PayinRequest.toObject(includeInstance, f), - buyerSignature: msg.getBuyerSignature_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.escrow.SignedPayinRequest} - */ -proto.escrow.SignedPayinRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.SignedPayinRequest; - return proto.escrow.SignedPayinRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.SignedPayinRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.SignedPayinRequest} - */ -proto.escrow.SignedPayinRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.escrow.PayinRequest; - reader.readMessage(value,proto.escrow.PayinRequest.deserializeBinaryFromReader); - msg.setRequest(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setBuyerSignature(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.SignedPayinRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.SignedPayinRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.SignedPayinRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedPayinRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRequest(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.escrow.PayinRequest.serializeBinaryToWriter - ); - } - f = message.getBuyerSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional PayinRequest request = 1; - * @return {?proto.escrow.PayinRequest} - */ -proto.escrow.SignedPayinRequest.prototype.getRequest = function() { - return /** @type{?proto.escrow.PayinRequest} */ ( - jspb.Message.getWrapperField(this, proto.escrow.PayinRequest, 1)); -}; - - -/** - * @param {?proto.escrow.PayinRequest|undefined} value - * @return {!proto.escrow.SignedPayinRequest} returns this -*/ -proto.escrow.SignedPayinRequest.prototype.setRequest = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.SignedPayinRequest} returns this - */ -proto.escrow.SignedPayinRequest.prototype.clearRequest = function() { - return this.setRequest(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.SignedPayinRequest.prototype.hasRequest = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes buyer_signature = 2; - * @return {!(string|Uint8Array)} - */ -proto.escrow.SignedPayinRequest.prototype.getBuyerSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes buyer_signature = 2; - * This is a type-conversion wrapper around `getBuyerSignature()` - * @return {string} - */ -proto.escrow.SignedPayinRequest.prototype.getBuyerSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBuyerSignature())); -}; - - -/** - * optional bytes buyer_signature = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getBuyerSignature()` - * @return {!Uint8Array} - */ -proto.escrow.SignedPayinRequest.prototype.getBuyerSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getBuyerSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.SignedPayinRequest} returns this - */ -proto.escrow.SignedPayinRequest.prototype.setBuyerSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.PayinResult.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.PayinResult.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.PayinResult} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.PayinResult.toObject = function(includeInstance, msg) { - var f, obj = { - payinId: jspb.Message.getFieldWithDefault(msg, 1, ""), - amount: jspb.Message.getFieldWithDefault(msg, 2, 0), - channelId: jspb.Message.getFieldWithDefault(msg, 3, 0), - escrowAddress: msg.getEscrowAddress_asB64(), - escrowSignedTime: (f = msg.getEscrowSignedTime()) && google_protobuf_timestamp_pb.Timestamp.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.escrow.PayinResult} - */ -proto.escrow.PayinResult.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.PayinResult; - return proto.escrow.PayinResult.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.PayinResult} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.PayinResult} - */ -proto.escrow.PayinResult.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.setPayinId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setChannelId(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setEscrowAddress(value); - break; - case 5: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setEscrowSignedTime(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.PayinResult.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.PayinResult.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.PayinResult} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.PayinResult.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPayinId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getChannelId(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getEscrowAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getEscrowSignedTime(); - if (f != null) { - writer.writeMessage( - 5, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string payin_id = 1; - * @return {string} - */ -proto.escrow.PayinResult.prototype.getPayinId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.escrow.PayinResult} returns this - */ -proto.escrow.PayinResult.prototype.setPayinId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional int64 amount = 2; - * @return {number} - */ -proto.escrow.PayinResult.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.PayinResult} returns this - */ -proto.escrow.PayinResult.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int64 channel_id = 3; - * @return {number} - */ -proto.escrow.PayinResult.prototype.getChannelId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.PayinResult} returns this - */ -proto.escrow.PayinResult.prototype.setChannelId = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional bytes escrow_address = 4; - * @return {!(string|Uint8Array)} - */ -proto.escrow.PayinResult.prototype.getEscrowAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes escrow_address = 4; - * This is a type-conversion wrapper around `getEscrowAddress()` - * @return {string} - */ -proto.escrow.PayinResult.prototype.getEscrowAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getEscrowAddress())); -}; - - -/** - * optional bytes escrow_address = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEscrowAddress()` - * @return {!Uint8Array} - */ -proto.escrow.PayinResult.prototype.getEscrowAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getEscrowAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.PayinResult} returns this - */ -proto.escrow.PayinResult.prototype.setEscrowAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional google.protobuf.Timestamp escrow_signed_time = 5; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.escrow.PayinResult.prototype.getEscrowSignedTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.escrow.PayinResult} returns this -*/ -proto.escrow.PayinResult.prototype.setEscrowSignedTime = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.PayinResult} returns this - */ -proto.escrow.PayinResult.prototype.clearEscrowSignedTime = function() { - return this.setEscrowSignedTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.PayinResult.prototype.hasEscrowSignedTime = function() { - return jspb.Message.getField(this, 5) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.SignedPayinResult.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.SignedPayinResult.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.SignedPayinResult} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedPayinResult.toObject = function(includeInstance, msg) { - var f, obj = { - result: (f = msg.getResult()) && proto.escrow.PayinResult.toObject(includeInstance, f), - escrowSignature: msg.getEscrowSignature_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.escrow.SignedPayinResult} - */ -proto.escrow.SignedPayinResult.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.SignedPayinResult; - return proto.escrow.SignedPayinResult.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.SignedPayinResult} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.SignedPayinResult} - */ -proto.escrow.SignedPayinResult.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.escrow.PayinResult; - reader.readMessage(value,proto.escrow.PayinResult.deserializeBinaryFromReader); - msg.setResult(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setEscrowSignature(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.SignedPayinResult.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.SignedPayinResult.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.SignedPayinResult} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedPayinResult.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getResult(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.escrow.PayinResult.serializeBinaryToWriter - ); - } - f = message.getEscrowSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional PayinResult result = 1; - * @return {?proto.escrow.PayinResult} - */ -proto.escrow.SignedPayinResult.prototype.getResult = function() { - return /** @type{?proto.escrow.PayinResult} */ ( - jspb.Message.getWrapperField(this, proto.escrow.PayinResult, 1)); -}; - - -/** - * @param {?proto.escrow.PayinResult|undefined} value - * @return {!proto.escrow.SignedPayinResult} returns this -*/ -proto.escrow.SignedPayinResult.prototype.setResult = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.SignedPayinResult} returns this - */ -proto.escrow.SignedPayinResult.prototype.clearResult = function() { - return this.setResult(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.SignedPayinResult.prototype.hasResult = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes escrow_signature = 2; - * @return {!(string|Uint8Array)} - */ -proto.escrow.SignedPayinResult.prototype.getEscrowSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes escrow_signature = 2; - * This is a type-conversion wrapper around `getEscrowSignature()` - * @return {string} - */ -proto.escrow.SignedPayinResult.prototype.getEscrowSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getEscrowSignature())); -}; - - -/** - * optional bytes escrow_signature = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEscrowSignature()` - * @return {!Uint8Array} - */ -proto.escrow.SignedPayinResult.prototype.getEscrowSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getEscrowSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.SignedPayinResult} returns this - */ -proto.escrow.SignedPayinResult.prototype.setEscrowSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.PayinStatus.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.PayinStatus.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.PayinStatus} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.PayinStatus.toObject = function(includeInstance, msg) { - var f, obj = { - paid: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - channelId: jspb.Message.getFieldWithDefault(msg, 2, 0), - escrowAddress: msg.getEscrowAddress_asB64(), - escrowSignedTime: (f = msg.getEscrowSignedTime()) && google_protobuf_timestamp_pb.Timestamp.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.escrow.PayinStatus} - */ -proto.escrow.PayinStatus.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.PayinStatus; - return proto.escrow.PayinStatus.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.PayinStatus} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.PayinStatus} - */ -proto.escrow.PayinStatus.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.setPaid(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setChannelId(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setEscrowAddress(value); - break; - case 4: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setEscrowSignedTime(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.PayinStatus.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.PayinStatus.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.PayinStatus} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.PayinStatus.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPaid(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getChannelId(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getEscrowAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getEscrowSignedTime(); - if (f != null) { - writer.writeMessage( - 4, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bool paid = 1; - * @return {boolean} - */ -proto.escrow.PayinStatus.prototype.getPaid = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.escrow.PayinStatus} returns this - */ -proto.escrow.PayinStatus.prototype.setPaid = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - -/** - * optional int64 channel_id = 2; - * @return {number} - */ -proto.escrow.PayinStatus.prototype.getChannelId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.PayinStatus} returns this - */ -proto.escrow.PayinStatus.prototype.setChannelId = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bytes escrow_address = 3; - * @return {!(string|Uint8Array)} - */ -proto.escrow.PayinStatus.prototype.getEscrowAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes escrow_address = 3; - * This is a type-conversion wrapper around `getEscrowAddress()` - * @return {string} - */ -proto.escrow.PayinStatus.prototype.getEscrowAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getEscrowAddress())); -}; - - -/** - * optional bytes escrow_address = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEscrowAddress()` - * @return {!Uint8Array} - */ -proto.escrow.PayinStatus.prototype.getEscrowAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getEscrowAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.PayinStatus} returns this - */ -proto.escrow.PayinStatus.prototype.setEscrowAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional google.protobuf.Timestamp escrow_signed_time = 4; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.escrow.PayinStatus.prototype.getEscrowSignedTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.escrow.PayinStatus} returns this -*/ -proto.escrow.PayinStatus.prototype.setEscrowSignedTime = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.PayinStatus} returns this - */ -proto.escrow.PayinStatus.prototype.clearEscrowSignedTime = function() { - return this.setEscrowSignedTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.PayinStatus.prototype.hasEscrowSignedTime = function() { - return jspb.Message.getField(this, 4) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.SignedPayinStatus.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.SignedPayinStatus.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.SignedPayinStatus} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedPayinStatus.toObject = function(includeInstance, msg) { - var f, obj = { - status: (f = msg.getStatus()) && proto.escrow.PayinStatus.toObject(includeInstance, f), - escrowSignature: msg.getEscrowSignature_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.escrow.SignedPayinStatus} - */ -proto.escrow.SignedPayinStatus.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.SignedPayinStatus; - return proto.escrow.SignedPayinStatus.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.SignedPayinStatus} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.SignedPayinStatus} - */ -proto.escrow.SignedPayinStatus.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.escrow.PayinStatus; - reader.readMessage(value,proto.escrow.PayinStatus.deserializeBinaryFromReader); - msg.setStatus(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setEscrowSignature(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.SignedPayinStatus.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.SignedPayinStatus.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.SignedPayinStatus} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedPayinStatus.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStatus(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.escrow.PayinStatus.serializeBinaryToWriter - ); - } - f = message.getEscrowSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional PayinStatus status = 1; - * @return {?proto.escrow.PayinStatus} - */ -proto.escrow.SignedPayinStatus.prototype.getStatus = function() { - return /** @type{?proto.escrow.PayinStatus} */ ( - jspb.Message.getWrapperField(this, proto.escrow.PayinStatus, 1)); -}; - - -/** - * @param {?proto.escrow.PayinStatus|undefined} value - * @return {!proto.escrow.SignedPayinStatus} returns this -*/ -proto.escrow.SignedPayinStatus.prototype.setStatus = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.SignedPayinStatus} returns this - */ -proto.escrow.SignedPayinStatus.prototype.clearStatus = function() { - return this.setStatus(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.SignedPayinStatus.prototype.hasStatus = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes escrow_signature = 2; - * @return {!(string|Uint8Array)} - */ -proto.escrow.SignedPayinStatus.prototype.getEscrowSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes escrow_signature = 2; - * This is a type-conversion wrapper around `getEscrowSignature()` - * @return {string} - */ -proto.escrow.SignedPayinStatus.prototype.getEscrowSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getEscrowSignature())); -}; - - -/** - * optional bytes escrow_signature = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEscrowSignature()` - * @return {!Uint8Array} - */ -proto.escrow.SignedPayinStatus.prototype.getEscrowSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getEscrowSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.SignedPayinStatus} returns this - */ -proto.escrow.SignedPayinStatus.prototype.setEscrowSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.PayoutStatus.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.PayoutStatus.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.PayoutStatus} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.PayoutStatus.toObject = function(includeInstance, msg) { - var f, obj = { - contractId: jspb.Message.getFieldWithDefault(msg, 1, ""), - escrowId: jspb.Message.getFieldWithDefault(msg, 2, 0), - fromAddress: msg.getFromAddress_asB64(), - toAddress: msg.getToAddress_asB64(), - authAddress: msg.getAuthAddress_asB64(), - status: jspb.Message.getFieldWithDefault(msg, 6, 0), - amount: jspb.Message.getFieldWithDefault(msg, 7, 0), - collateral: jspb.Message.getFieldWithDefault(msg, 8, 0), - withhold: jspb.Message.getFieldWithDefault(msg, 9, 0), - paidAmount: jspb.Message.getFieldWithDefault(msg, 10, 0), - numPaid: jspb.Message.getFieldWithDefault(msg, 11, 0), - leftAmount: jspb.Message.getFieldWithDefault(msg, 12, 0), - numLeft: jspb.Message.getFieldWithDefault(msg, 13, 0), - nextAmount: jspb.Message.getFieldWithDefault(msg, 14, 0), - lastPayoutTime: (f = msg.getLastPayoutTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - nextPayoutTime: (f = msg.getNextPayoutTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - escrowAddress: msg.getEscrowAddress_asB64(), - escrowSignTime: (f = msg.getEscrowSignTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - errorMsg: jspb.Message.getFieldWithDefault(msg, 19, ""), - lastModifyTime: (f = msg.getLastModifyTime()) && google_protobuf_timestamp_pb.Timestamp.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.escrow.PayoutStatus} - */ -proto.escrow.PayoutStatus.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.PayoutStatus; - return proto.escrow.PayoutStatus.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.PayoutStatus} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.PayoutStatus} - */ -proto.escrow.PayoutStatus.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.setContractId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setEscrowId(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setFromAddress(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setToAddress(value); - break; - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAuthAddress(value); - break; - case 6: - var value = /** @type {!proto.escrow.EscrowStatus} */ (reader.readEnum()); - msg.setStatus(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; - case 8: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCollateral(value); - break; - case 9: - var value = /** @type {number} */ (reader.readInt64()); - msg.setWithhold(value); - break; - case 10: - var value = /** @type {number} */ (reader.readInt64()); - msg.setPaidAmount(value); - break; - case 11: - var value = /** @type {number} */ (reader.readInt32()); - msg.setNumPaid(value); - break; - case 12: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLeftAmount(value); - break; - case 13: - var value = /** @type {number} */ (reader.readInt32()); - msg.setNumLeft(value); - break; - case 14: - var value = /** @type {number} */ (reader.readInt64()); - msg.setNextAmount(value); - break; - case 15: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setLastPayoutTime(value); - break; - case 16: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setNextPayoutTime(value); - break; - case 17: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setEscrowAddress(value); - break; - case 18: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setEscrowSignTime(value); - break; - case 19: - var value = /** @type {string} */ (reader.readString()); - msg.setErrorMsg(value); - break; - case 20: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setLastModifyTime(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.PayoutStatus.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.PayoutStatus.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.PayoutStatus} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.PayoutStatus.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getContractId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getEscrowId(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getFromAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getToAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getAuthAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 5, - f - ); - } - f = message.getStatus(); - if (f !== 0.0) { - writer.writeEnum( - 6, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 7, - f - ); - } - f = message.getCollateral(); - if (f !== 0) { - writer.writeInt64( - 8, - f - ); - } - f = message.getWithhold(); - if (f !== 0) { - writer.writeInt64( - 9, - f - ); - } - f = message.getPaidAmount(); - if (f !== 0) { - writer.writeInt64( - 10, - f - ); - } - f = message.getNumPaid(); - if (f !== 0) { - writer.writeInt32( - 11, - f - ); - } - f = message.getLeftAmount(); - if (f !== 0) { - writer.writeInt64( - 12, - f - ); - } - f = message.getNumLeft(); - if (f !== 0) { - writer.writeInt32( - 13, - f - ); - } - f = message.getNextAmount(); - if (f !== 0) { - writer.writeInt64( - 14, - f - ); - } - f = message.getLastPayoutTime(); - if (f != null) { - writer.writeMessage( - 15, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getNextPayoutTime(); - if (f != null) { - writer.writeMessage( - 16, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getEscrowAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 17, - f - ); - } - f = message.getEscrowSignTime(); - if (f != null) { - writer.writeMessage( - 18, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getErrorMsg(); - if (f.length > 0) { - writer.writeString( - 19, - f - ); - } - f = message.getLastModifyTime(); - if (f != null) { - writer.writeMessage( - 20, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string contract_id = 1; - * @return {string} - */ -proto.escrow.PayoutStatus.prototype.getContractId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.escrow.PayoutStatus} returns this - */ -proto.escrow.PayoutStatus.prototype.setContractId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional int64 escrow_id = 2; - * @return {number} - */ -proto.escrow.PayoutStatus.prototype.getEscrowId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.PayoutStatus} returns this - */ -proto.escrow.PayoutStatus.prototype.setEscrowId = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bytes from_address = 3; - * @return {!(string|Uint8Array)} - */ -proto.escrow.PayoutStatus.prototype.getFromAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes from_address = 3; - * This is a type-conversion wrapper around `getFromAddress()` - * @return {string} - */ -proto.escrow.PayoutStatus.prototype.getFromAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getFromAddress())); -}; - - -/** - * optional bytes from_address = 3; - * 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.escrow.PayoutStatus.prototype.getFromAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getFromAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.PayoutStatus} returns this - */ -proto.escrow.PayoutStatus.prototype.setFromAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional bytes to_address = 4; - * @return {!(string|Uint8Array)} - */ -proto.escrow.PayoutStatus.prototype.getToAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes to_address = 4; - * This is a type-conversion wrapper around `getToAddress()` - * @return {string} - */ -proto.escrow.PayoutStatus.prototype.getToAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getToAddress())); -}; - - -/** - * optional bytes to_address = 4; - * 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.escrow.PayoutStatus.prototype.getToAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getToAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.PayoutStatus} returns this - */ -proto.escrow.PayoutStatus.prototype.setToAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional bytes auth_address = 5; - * @return {!(string|Uint8Array)} - */ -proto.escrow.PayoutStatus.prototype.getAuthAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * optional bytes auth_address = 5; - * This is a type-conversion wrapper around `getAuthAddress()` - * @return {string} - */ -proto.escrow.PayoutStatus.prototype.getAuthAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAuthAddress())); -}; - - -/** - * optional bytes auth_address = 5; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAuthAddress()` - * @return {!Uint8Array} - */ -proto.escrow.PayoutStatus.prototype.getAuthAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAuthAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.PayoutStatus} returns this - */ -proto.escrow.PayoutStatus.prototype.setAuthAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); -}; - - -/** - * optional EscrowStatus status = 6; - * @return {!proto.escrow.EscrowStatus} - */ -proto.escrow.PayoutStatus.prototype.getStatus = function() { - return /** @type {!proto.escrow.EscrowStatus} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {!proto.escrow.EscrowStatus} value - * @return {!proto.escrow.PayoutStatus} returns this - */ -proto.escrow.PayoutStatus.prototype.setStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 6, value); -}; - - -/** - * optional int64 amount = 7; - * @return {number} - */ -proto.escrow.PayoutStatus.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.PayoutStatus} returns this - */ -proto.escrow.PayoutStatus.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional int64 collateral = 8; - * @return {number} - */ -proto.escrow.PayoutStatus.prototype.getCollateral = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.PayoutStatus} returns this - */ -proto.escrow.PayoutStatus.prototype.setCollateral = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional int64 withhold = 9; - * @return {number} - */ -proto.escrow.PayoutStatus.prototype.getWithhold = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.PayoutStatus} returns this - */ -proto.escrow.PayoutStatus.prototype.setWithhold = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * optional int64 paid_amount = 10; - * @return {number} - */ -proto.escrow.PayoutStatus.prototype.getPaidAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.PayoutStatus} returns this - */ -proto.escrow.PayoutStatus.prototype.setPaidAmount = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); -}; - - -/** - * optional int32 num_paid = 11; - * @return {number} - */ -proto.escrow.PayoutStatus.prototype.getNumPaid = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.PayoutStatus} returns this - */ -proto.escrow.PayoutStatus.prototype.setNumPaid = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); -}; - - -/** - * optional int64 left_amount = 12; - * @return {number} - */ -proto.escrow.PayoutStatus.prototype.getLeftAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.PayoutStatus} returns this - */ -proto.escrow.PayoutStatus.prototype.setLeftAmount = function(value) { - return jspb.Message.setProto3IntField(this, 12, value); -}; - - -/** - * optional int32 num_left = 13; - * @return {number} - */ -proto.escrow.PayoutStatus.prototype.getNumLeft = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.PayoutStatus} returns this - */ -proto.escrow.PayoutStatus.prototype.setNumLeft = function(value) { - return jspb.Message.setProto3IntField(this, 13, value); -}; - - -/** - * optional int64 next_amount = 14; - * @return {number} - */ -proto.escrow.PayoutStatus.prototype.getNextAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.PayoutStatus} returns this - */ -proto.escrow.PayoutStatus.prototype.setNextAmount = function(value) { - return jspb.Message.setProto3IntField(this, 14, value); -}; - - -/** - * optional google.protobuf.Timestamp last_payout_time = 15; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.escrow.PayoutStatus.prototype.getLastPayoutTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 15)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.escrow.PayoutStatus} returns this -*/ -proto.escrow.PayoutStatus.prototype.setLastPayoutTime = function(value) { - return jspb.Message.setWrapperField(this, 15, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.PayoutStatus} returns this - */ -proto.escrow.PayoutStatus.prototype.clearLastPayoutTime = function() { - return this.setLastPayoutTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.PayoutStatus.prototype.hasLastPayoutTime = function() { - return jspb.Message.getField(this, 15) != null; -}; - - -/** - * optional google.protobuf.Timestamp next_payout_time = 16; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.escrow.PayoutStatus.prototype.getNextPayoutTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 16)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.escrow.PayoutStatus} returns this -*/ -proto.escrow.PayoutStatus.prototype.setNextPayoutTime = function(value) { - return jspb.Message.setWrapperField(this, 16, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.PayoutStatus} returns this - */ -proto.escrow.PayoutStatus.prototype.clearNextPayoutTime = function() { - return this.setNextPayoutTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.PayoutStatus.prototype.hasNextPayoutTime = function() { - return jspb.Message.getField(this, 16) != null; -}; - - -/** - * optional bytes escrow_address = 17; - * @return {!(string|Uint8Array)} - */ -proto.escrow.PayoutStatus.prototype.getEscrowAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 17, "")); -}; - - -/** - * optional bytes escrow_address = 17; - * This is a type-conversion wrapper around `getEscrowAddress()` - * @return {string} - */ -proto.escrow.PayoutStatus.prototype.getEscrowAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getEscrowAddress())); -}; - - -/** - * optional bytes escrow_address = 17; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEscrowAddress()` - * @return {!Uint8Array} - */ -proto.escrow.PayoutStatus.prototype.getEscrowAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getEscrowAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.PayoutStatus} returns this - */ -proto.escrow.PayoutStatus.prototype.setEscrowAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 17, value); -}; - - -/** - * optional google.protobuf.Timestamp escrow_sign_time = 18; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.escrow.PayoutStatus.prototype.getEscrowSignTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 18)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.escrow.PayoutStatus} returns this -*/ -proto.escrow.PayoutStatus.prototype.setEscrowSignTime = function(value) { - return jspb.Message.setWrapperField(this, 18, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.PayoutStatus} returns this - */ -proto.escrow.PayoutStatus.prototype.clearEscrowSignTime = function() { - return this.setEscrowSignTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.PayoutStatus.prototype.hasEscrowSignTime = function() { - return jspb.Message.getField(this, 18) != null; -}; - - -/** - * optional string error_msg = 19; - * @return {string} - */ -proto.escrow.PayoutStatus.prototype.getErrorMsg = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 19, "")); -}; - - -/** - * @param {string} value - * @return {!proto.escrow.PayoutStatus} returns this - */ -proto.escrow.PayoutStatus.prototype.setErrorMsg = function(value) { - return jspb.Message.setProto3StringField(this, 19, value); -}; - - -/** - * optional google.protobuf.Timestamp last_modify_time = 20; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.escrow.PayoutStatus.prototype.getLastModifyTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 20)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.escrow.PayoutStatus} returns this -*/ -proto.escrow.PayoutStatus.prototype.setLastModifyTime = function(value) { - return jspb.Message.setWrapperField(this, 20, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.PayoutStatus} returns this - */ -proto.escrow.PayoutStatus.prototype.clearLastModifyTime = function() { - return this.setLastModifyTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.PayoutStatus.prototype.hasLastModifyTime = function() { - return jspb.Message.getField(this, 20) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.SignedPayoutStatus.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.SignedPayoutStatus.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.SignedPayoutStatus} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedPayoutStatus.toObject = function(includeInstance, msg) { - var f, obj = { - status: (f = msg.getStatus()) && proto.escrow.PayoutStatus.toObject(includeInstance, f), - escrowSignature: msg.getEscrowSignature_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.escrow.SignedPayoutStatus} - */ -proto.escrow.SignedPayoutStatus.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.SignedPayoutStatus; - return proto.escrow.SignedPayoutStatus.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.SignedPayoutStatus} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.SignedPayoutStatus} - */ -proto.escrow.SignedPayoutStatus.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.escrow.PayoutStatus; - reader.readMessage(value,proto.escrow.PayoutStatus.deserializeBinaryFromReader); - msg.setStatus(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setEscrowSignature(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.SignedPayoutStatus.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.SignedPayoutStatus.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.SignedPayoutStatus} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedPayoutStatus.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStatus(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.escrow.PayoutStatus.serializeBinaryToWriter - ); - } - f = message.getEscrowSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional PayoutStatus status = 1; - * @return {?proto.escrow.PayoutStatus} - */ -proto.escrow.SignedPayoutStatus.prototype.getStatus = function() { - return /** @type{?proto.escrow.PayoutStatus} */ ( - jspb.Message.getWrapperField(this, proto.escrow.PayoutStatus, 1)); -}; - - -/** - * @param {?proto.escrow.PayoutStatus|undefined} value - * @return {!proto.escrow.SignedPayoutStatus} returns this -*/ -proto.escrow.SignedPayoutStatus.prototype.setStatus = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.SignedPayoutStatus} returns this - */ -proto.escrow.SignedPayoutStatus.prototype.clearStatus = function() { - return this.setStatus(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.SignedPayoutStatus.prototype.hasStatus = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes escrow_signature = 2; - * @return {!(string|Uint8Array)} - */ -proto.escrow.SignedPayoutStatus.prototype.getEscrowSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes escrow_signature = 2; - * This is a type-conversion wrapper around `getEscrowSignature()` - * @return {string} - */ -proto.escrow.SignedPayoutStatus.prototype.getEscrowSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getEscrowSignature())); -}; - - -/** - * optional bytes escrow_signature = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEscrowSignature()` - * @return {!Uint8Array} - */ -proto.escrow.SignedPayoutStatus.prototype.getEscrowSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getEscrowSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.SignedPayoutStatus} returns this - */ -proto.escrow.SignedPayoutStatus.prototype.setEscrowSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.escrow.SignedPayoutStatusBatch.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.SignedPayoutStatusBatch.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.SignedPayoutStatusBatch.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.SignedPayoutStatusBatch} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedPayoutStatusBatch.toObject = function(includeInstance, msg) { - var f, obj = { - statusList: jspb.Message.toObjectList(msg.getStatusList(), - proto.escrow.PayoutStatus.toObject, includeInstance), - escrowSignature: msg.getEscrowSignature_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.escrow.SignedPayoutStatusBatch} - */ -proto.escrow.SignedPayoutStatusBatch.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.SignedPayoutStatusBatch; - return proto.escrow.SignedPayoutStatusBatch.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.SignedPayoutStatusBatch} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.SignedPayoutStatusBatch} - */ -proto.escrow.SignedPayoutStatusBatch.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.escrow.PayoutStatus; - reader.readMessage(value,proto.escrow.PayoutStatus.deserializeBinaryFromReader); - msg.addStatus(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setEscrowSignature(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.SignedPayoutStatusBatch.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.SignedPayoutStatusBatch.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.SignedPayoutStatusBatch} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedPayoutStatusBatch.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStatusList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.escrow.PayoutStatus.serializeBinaryToWriter - ); - } - f = message.getEscrowSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * repeated PayoutStatus status = 1; - * @return {!Array} - */ -proto.escrow.SignedPayoutStatusBatch.prototype.getStatusList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.escrow.PayoutStatus, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.escrow.SignedPayoutStatusBatch} returns this -*/ -proto.escrow.SignedPayoutStatusBatch.prototype.setStatusList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.escrow.PayoutStatus=} opt_value - * @param {number=} opt_index - * @return {!proto.escrow.PayoutStatus} - */ -proto.escrow.SignedPayoutStatusBatch.prototype.addStatus = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.escrow.PayoutStatus, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.escrow.SignedPayoutStatusBatch} returns this - */ -proto.escrow.SignedPayoutStatusBatch.prototype.clearStatusList = function() { - return this.setStatusList([]); -}; - - -/** - * optional bytes escrow_signature = 2; - * @return {!(string|Uint8Array)} - */ -proto.escrow.SignedPayoutStatusBatch.prototype.getEscrowSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes escrow_signature = 2; - * This is a type-conversion wrapper around `getEscrowSignature()` - * @return {string} - */ -proto.escrow.SignedPayoutStatusBatch.prototype.getEscrowSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getEscrowSignature())); -}; - - -/** - * optional bytes escrow_signature = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEscrowSignature()` - * @return {!Uint8Array} - */ -proto.escrow.SignedPayoutStatusBatch.prototype.getEscrowSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getEscrowSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.SignedPayoutStatusBatch} returns this - */ -proto.escrow.SignedPayoutStatusBatch.prototype.setEscrowSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.CancelContractRequest.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.CancelContractRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.CancelContractRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.CancelContractRequest.toObject = function(includeInstance, msg) { - var f, obj = { - contractId: jspb.Message.getFieldWithDefault(msg, 1, ""), - authAddress: msg.getAuthAddress_asB64(), - authSignedTime: (f = msg.getAuthSignedTime()) && google_protobuf_timestamp_pb.Timestamp.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.escrow.CancelContractRequest} - */ -proto.escrow.CancelContractRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.CancelContractRequest; - return proto.escrow.CancelContractRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.CancelContractRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.CancelContractRequest} - */ -proto.escrow.CancelContractRequest.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.setContractId(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAuthAddress(value); - break; - case 3: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setAuthSignedTime(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.CancelContractRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.CancelContractRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.CancelContractRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.CancelContractRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getContractId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAuthAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getAuthSignedTime(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string contract_id = 1; - * @return {string} - */ -proto.escrow.CancelContractRequest.prototype.getContractId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.escrow.CancelContractRequest} returns this - */ -proto.escrow.CancelContractRequest.prototype.setContractId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional bytes auth_address = 2; - * @return {!(string|Uint8Array)} - */ -proto.escrow.CancelContractRequest.prototype.getAuthAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes auth_address = 2; - * This is a type-conversion wrapper around `getAuthAddress()` - * @return {string} - */ -proto.escrow.CancelContractRequest.prototype.getAuthAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAuthAddress())); -}; - - -/** - * optional bytes auth_address = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAuthAddress()` - * @return {!Uint8Array} - */ -proto.escrow.CancelContractRequest.prototype.getAuthAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAuthAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.CancelContractRequest} returns this - */ -proto.escrow.CancelContractRequest.prototype.setAuthAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional google.protobuf.Timestamp auth_signed_time = 3; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.escrow.CancelContractRequest.prototype.getAuthSignedTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.escrow.CancelContractRequest} returns this -*/ -proto.escrow.CancelContractRequest.prototype.setAuthSignedTime = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.CancelContractRequest} returns this - */ -proto.escrow.CancelContractRequest.prototype.clearAuthSignedTime = function() { - return this.setAuthSignedTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.CancelContractRequest.prototype.hasAuthSignedTime = function() { - return jspb.Message.getField(this, 3) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.SignedCancelRequest.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.SignedCancelRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.SignedCancelRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedCancelRequest.toObject = function(includeInstance, msg) { - var f, obj = { - request: (f = msg.getRequest()) && proto.escrow.CancelContractRequest.toObject(includeInstance, f), - authSignature: msg.getAuthSignature_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.escrow.SignedCancelRequest} - */ -proto.escrow.SignedCancelRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.SignedCancelRequest; - return proto.escrow.SignedCancelRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.SignedCancelRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.SignedCancelRequest} - */ -proto.escrow.SignedCancelRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.escrow.CancelContractRequest; - reader.readMessage(value,proto.escrow.CancelContractRequest.deserializeBinaryFromReader); - msg.setRequest(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAuthSignature(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.SignedCancelRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.SignedCancelRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.SignedCancelRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedCancelRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRequest(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.escrow.CancelContractRequest.serializeBinaryToWriter - ); - } - f = message.getAuthSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional CancelContractRequest request = 1; - * @return {?proto.escrow.CancelContractRequest} - */ -proto.escrow.SignedCancelRequest.prototype.getRequest = function() { - return /** @type{?proto.escrow.CancelContractRequest} */ ( - jspb.Message.getWrapperField(this, proto.escrow.CancelContractRequest, 1)); -}; - - -/** - * @param {?proto.escrow.CancelContractRequest|undefined} value - * @return {!proto.escrow.SignedCancelRequest} returns this -*/ -proto.escrow.SignedCancelRequest.prototype.setRequest = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.SignedCancelRequest} returns this - */ -proto.escrow.SignedCancelRequest.prototype.clearRequest = function() { - return this.setRequest(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.SignedCancelRequest.prototype.hasRequest = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes auth_signature = 2; - * @return {!(string|Uint8Array)} - */ -proto.escrow.SignedCancelRequest.prototype.getAuthSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes auth_signature = 2; - * This is a type-conversion wrapper around `getAuthSignature()` - * @return {string} - */ -proto.escrow.SignedCancelRequest.prototype.getAuthSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAuthSignature())); -}; - - -/** - * optional bytes auth_signature = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAuthSignature()` - * @return {!Uint8Array} - */ -proto.escrow.SignedCancelRequest.prototype.getAuthSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAuthSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.SignedCancelRequest} returns this - */ -proto.escrow.SignedCancelRequest.prototype.setAuthSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.CancelContractResult.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.CancelContractResult.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.CancelContractResult} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.CancelContractResult.toObject = function(includeInstance, msg) { - var f, obj = { - contractId: jspb.Message.getFieldWithDefault(msg, 1, ""), - escrowId: jspb.Message.getFieldWithDefault(msg, 2, 0), - canceled: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), - escrowAddress: msg.getEscrowAddress_asB64(), - escrowSignedTime: (f = msg.getEscrowSignedTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - amount: jspb.Message.getFieldWithDefault(msg, 6, 0), - paid: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), - reference: jspb.Message.getFieldWithDefault(msg, 8, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.escrow.CancelContractResult} - */ -proto.escrow.CancelContractResult.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.CancelContractResult; - return proto.escrow.CancelContractResult.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.CancelContractResult} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.CancelContractResult} - */ -proto.escrow.CancelContractResult.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.setContractId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setEscrowId(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setCanceled(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setEscrowAddress(value); - break; - case 5: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setEscrowSignedTime(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; - case 7: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPaid(value); - break; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.setReference(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.CancelContractResult.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.CancelContractResult.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.CancelContractResult} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.CancelContractResult.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getContractId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getEscrowId(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getCanceled(); - if (f) { - writer.writeBool( - 3, - f - ); - } - f = message.getEscrowAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getEscrowSignedTime(); - if (f != null) { - writer.writeMessage( - 5, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getPaid(); - if (f) { - writer.writeBool( - 7, - f - ); - } - f = message.getReference(); - if (f.length > 0) { - writer.writeString( - 8, - f - ); - } -}; - - -/** - * optional string contract_id = 1; - * @return {string} - */ -proto.escrow.CancelContractResult.prototype.getContractId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.escrow.CancelContractResult} returns this - */ -proto.escrow.CancelContractResult.prototype.setContractId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional int64 escrow_id = 2; - * @return {number} - */ -proto.escrow.CancelContractResult.prototype.getEscrowId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.CancelContractResult} returns this - */ -proto.escrow.CancelContractResult.prototype.setEscrowId = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bool canceled = 3; - * @return {boolean} - */ -proto.escrow.CancelContractResult.prototype.getCanceled = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.escrow.CancelContractResult} returns this - */ -proto.escrow.CancelContractResult.prototype.setCanceled = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - -/** - * optional bytes escrow_address = 4; - * @return {!(string|Uint8Array)} - */ -proto.escrow.CancelContractResult.prototype.getEscrowAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes escrow_address = 4; - * This is a type-conversion wrapper around `getEscrowAddress()` - * @return {string} - */ -proto.escrow.CancelContractResult.prototype.getEscrowAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getEscrowAddress())); -}; - - -/** - * optional bytes escrow_address = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEscrowAddress()` - * @return {!Uint8Array} - */ -proto.escrow.CancelContractResult.prototype.getEscrowAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getEscrowAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.CancelContractResult} returns this - */ -proto.escrow.CancelContractResult.prototype.setEscrowAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional google.protobuf.Timestamp escrow_signed_time = 5; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.escrow.CancelContractResult.prototype.getEscrowSignedTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.escrow.CancelContractResult} returns this -*/ -proto.escrow.CancelContractResult.prototype.setEscrowSignedTime = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.CancelContractResult} returns this - */ -proto.escrow.CancelContractResult.prototype.clearEscrowSignedTime = function() { - return this.setEscrowSignedTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.CancelContractResult.prototype.hasEscrowSignedTime = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional int64 amount = 6; - * @return {number} - */ -proto.escrow.CancelContractResult.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.CancelContractResult} returns this - */ -proto.escrow.CancelContractResult.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional bool paid = 7; - * @return {boolean} - */ -proto.escrow.CancelContractResult.prototype.getPaid = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.escrow.CancelContractResult} returns this - */ -proto.escrow.CancelContractResult.prototype.setPaid = function(value) { - return jspb.Message.setProto3BooleanField(this, 7, value); -}; - - -/** - * optional string reference = 8; - * @return {string} - */ -proto.escrow.CancelContractResult.prototype.getReference = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** - * @param {string} value - * @return {!proto.escrow.CancelContractResult} returns this - */ -proto.escrow.CancelContractResult.prototype.setReference = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.SignedCancelContractResult.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.SignedCancelContractResult.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.SignedCancelContractResult} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedCancelContractResult.toObject = function(includeInstance, msg) { - var f, obj = { - result: (f = msg.getResult()) && proto.escrow.CancelContractResult.toObject(includeInstance, f), - escrowSignature: msg.getEscrowSignature_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.escrow.SignedCancelContractResult} - */ -proto.escrow.SignedCancelContractResult.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.SignedCancelContractResult; - return proto.escrow.SignedCancelContractResult.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.SignedCancelContractResult} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.SignedCancelContractResult} - */ -proto.escrow.SignedCancelContractResult.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.escrow.CancelContractResult; - reader.readMessage(value,proto.escrow.CancelContractResult.deserializeBinaryFromReader); - msg.setResult(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setEscrowSignature(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.SignedCancelContractResult.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.SignedCancelContractResult.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.SignedCancelContractResult} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedCancelContractResult.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getResult(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.escrow.CancelContractResult.serializeBinaryToWriter - ); - } - f = message.getEscrowSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional CancelContractResult result = 1; - * @return {?proto.escrow.CancelContractResult} - */ -proto.escrow.SignedCancelContractResult.prototype.getResult = function() { - return /** @type{?proto.escrow.CancelContractResult} */ ( - jspb.Message.getWrapperField(this, proto.escrow.CancelContractResult, 1)); -}; - - -/** - * @param {?proto.escrow.CancelContractResult|undefined} value - * @return {!proto.escrow.SignedCancelContractResult} returns this -*/ -proto.escrow.SignedCancelContractResult.prototype.setResult = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.SignedCancelContractResult} returns this - */ -proto.escrow.SignedCancelContractResult.prototype.clearResult = function() { - return this.setResult(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.SignedCancelContractResult.prototype.hasResult = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes escrow_signature = 2; - * @return {!(string|Uint8Array)} - */ -proto.escrow.SignedCancelContractResult.prototype.getEscrowSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes escrow_signature = 2; - * This is a type-conversion wrapper around `getEscrowSignature()` - * @return {string} - */ -proto.escrow.SignedCancelContractResult.prototype.getEscrowSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getEscrowSignature())); -}; - - -/** - * optional bytes escrow_signature = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEscrowSignature()` - * @return {!Uint8Array} - */ -proto.escrow.SignedCancelContractResult.prototype.getEscrowSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getEscrowSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.SignedCancelContractResult} returns this - */ -proto.escrow.SignedCancelContractResult.prototype.setEscrowSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.PayoutAddress.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.PayoutAddress.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.PayoutAddress} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.PayoutAddress.toObject = function(includeInstance, msg) { - var f, obj = { - toAddress: msg.getToAddress_asB64(), - signedTime: (f = msg.getSignedTime()) && google_protobuf_timestamp_pb.Timestamp.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.escrow.PayoutAddress} - */ -proto.escrow.PayoutAddress.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.PayoutAddress; - return proto.escrow.PayoutAddress.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.PayoutAddress} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.PayoutAddress} - */ -proto.escrow.PayoutAddress.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.setToAddress(value); - break; - case 2: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setSignedTime(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.PayoutAddress.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.PayoutAddress.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.PayoutAddress} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.PayoutAddress.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getToAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getSignedTime(); - if (f != null) { - writer.writeMessage( - 2, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bytes to_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.escrow.PayoutAddress.prototype.getToAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes to_address = 1; - * This is a type-conversion wrapper around `getToAddress()` - * @return {string} - */ -proto.escrow.PayoutAddress.prototype.getToAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getToAddress())); -}; - - -/** - * optional bytes to_address = 1; - * 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.escrow.PayoutAddress.prototype.getToAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getToAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.PayoutAddress} returns this - */ -proto.escrow.PayoutAddress.prototype.setToAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional google.protobuf.Timestamp signed_time = 2; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.escrow.PayoutAddress.prototype.getSignedTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.escrow.PayoutAddress} returns this -*/ -proto.escrow.PayoutAddress.prototype.setSignedTime = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.PayoutAddress} returns this - */ -proto.escrow.PayoutAddress.prototype.clearSignedTime = function() { - return this.setSignedTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.PayoutAddress.prototype.hasSignedTime = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.SignedPayoutAddress.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.SignedPayoutAddress.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.SignedPayoutAddress} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedPayoutAddress.toObject = function(includeInstance, msg) { - var f, obj = { - address: (f = msg.getAddress()) && proto.escrow.PayoutAddress.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.escrow.SignedPayoutAddress} - */ -proto.escrow.SignedPayoutAddress.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.SignedPayoutAddress; - return proto.escrow.SignedPayoutAddress.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.SignedPayoutAddress} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.SignedPayoutAddress} - */ -proto.escrow.SignedPayoutAddress.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.escrow.PayoutAddress; - reader.readMessage(value,proto.escrow.PayoutAddress.deserializeBinaryFromReader); - msg.setAddress(value); - break; - case 2: - 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.escrow.SignedPayoutAddress.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.SignedPayoutAddress.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.SignedPayoutAddress} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedPayoutAddress.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddress(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.escrow.PayoutAddress.serializeBinaryToWriter - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional PayoutAddress address = 1; - * @return {?proto.escrow.PayoutAddress} - */ -proto.escrow.SignedPayoutAddress.prototype.getAddress = function() { - return /** @type{?proto.escrow.PayoutAddress} */ ( - jspb.Message.getWrapperField(this, proto.escrow.PayoutAddress, 1)); -}; - - -/** - * @param {?proto.escrow.PayoutAddress|undefined} value - * @return {!proto.escrow.SignedPayoutAddress} returns this -*/ -proto.escrow.SignedPayoutAddress.prototype.setAddress = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.SignedPayoutAddress} returns this - */ -proto.escrow.SignedPayoutAddress.prototype.clearAddress = function() { - return this.setAddress(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.SignedPayoutAddress.prototype.hasAddress = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes signature = 2; - * @return {!(string|Uint8Array)} - */ -proto.escrow.SignedPayoutAddress.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes signature = 2; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.escrow.SignedPayoutAddress.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 2; - * 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.escrow.SignedPayoutAddress.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.SignedPayoutAddress} returns this - */ -proto.escrow.SignedPayoutAddress.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.Payment.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.Payment.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.Payment} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.Payment.toObject = function(includeInstance, msg) { - var f, obj = { - contractId: jspb.Message.getFieldWithDefault(msg, 1, ""), - escrowId: jspb.Message.getFieldWithDefault(msg, 2, 0), - fromAddress: msg.getFromAddress_asB64(), - toAddress: msg.getToAddress_asB64(), - amount: jspb.Message.getFieldWithDefault(msg, 5, 0), - index: jspb.Message.getFieldWithDefault(msg, 6, 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.escrow.Payment} - */ -proto.escrow.Payment.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.Payment; - return proto.escrow.Payment.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.Payment} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.Payment} - */ -proto.escrow.Payment.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.setContractId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setEscrowId(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setFromAddress(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setToAddress(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt32()); - msg.setIndex(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.Payment.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.Payment.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.Payment} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.Payment.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getContractId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getEscrowId(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getFromAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getToAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getIndex(); - if (f !== 0) { - writer.writeInt32( - 6, - f - ); - } -}; - - -/** - * optional string contract_id = 1; - * @return {string} - */ -proto.escrow.Payment.prototype.getContractId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.escrow.Payment} returns this - */ -proto.escrow.Payment.prototype.setContractId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional int64 escrow_id = 2; - * @return {number} - */ -proto.escrow.Payment.prototype.getEscrowId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.Payment} returns this - */ -proto.escrow.Payment.prototype.setEscrowId = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bytes from_address = 3; - * @return {!(string|Uint8Array)} - */ -proto.escrow.Payment.prototype.getFromAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes from_address = 3; - * This is a type-conversion wrapper around `getFromAddress()` - * @return {string} - */ -proto.escrow.Payment.prototype.getFromAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getFromAddress())); -}; - - -/** - * optional bytes from_address = 3; - * 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.escrow.Payment.prototype.getFromAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getFromAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.Payment} returns this - */ -proto.escrow.Payment.prototype.setFromAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional bytes to_address = 4; - * @return {!(string|Uint8Array)} - */ -proto.escrow.Payment.prototype.getToAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes to_address = 4; - * This is a type-conversion wrapper around `getToAddress()` - * @return {string} - */ -proto.escrow.Payment.prototype.getToAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getToAddress())); -}; - - -/** - * optional bytes to_address = 4; - * 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.escrow.Payment.prototype.getToAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getToAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.Payment} returns this - */ -proto.escrow.Payment.prototype.setToAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional int64 amount = 5; - * @return {number} - */ -proto.escrow.Payment.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.Payment} returns this - */ -proto.escrow.Payment.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int32 index = 6; - * @return {number} - */ -proto.escrow.Payment.prototype.getIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.Payment} returns this - */ -proto.escrow.Payment.prototype.setIndex = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.escrow.PaymentResult.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.PaymentResult.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.PaymentResult.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.PaymentResult} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.PaymentResult.toObject = function(includeInstance, msg) { - var f, obj = { - paymentList: jspb.Message.toObjectList(msg.getPaymentList(), - proto.escrow.Payment.toObject, includeInstance), - escrowAddress: msg.getEscrowAddress_asB64(), - escrowSignedTime: (f = msg.getEscrowSignedTime()) && google_protobuf_timestamp_pb.Timestamp.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.escrow.PaymentResult} - */ -proto.escrow.PaymentResult.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.PaymentResult; - return proto.escrow.PaymentResult.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.PaymentResult} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.PaymentResult} - */ -proto.escrow.PaymentResult.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.escrow.Payment; - reader.readMessage(value,proto.escrow.Payment.deserializeBinaryFromReader); - msg.addPayment(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setEscrowAddress(value); - break; - case 3: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setEscrowSignedTime(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.PaymentResult.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.PaymentResult.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.PaymentResult} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.PaymentResult.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPaymentList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.escrow.Payment.serializeBinaryToWriter - ); - } - f = message.getEscrowAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getEscrowSignedTime(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Payment payment = 1; - * @return {!Array} - */ -proto.escrow.PaymentResult.prototype.getPaymentList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.escrow.Payment, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.escrow.PaymentResult} returns this -*/ -proto.escrow.PaymentResult.prototype.setPaymentList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.escrow.Payment=} opt_value - * @param {number=} opt_index - * @return {!proto.escrow.Payment} - */ -proto.escrow.PaymentResult.prototype.addPayment = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.escrow.Payment, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.escrow.PaymentResult} returns this - */ -proto.escrow.PaymentResult.prototype.clearPaymentList = function() { - return this.setPaymentList([]); -}; - - -/** - * optional bytes escrow_address = 2; - * @return {!(string|Uint8Array)} - */ -proto.escrow.PaymentResult.prototype.getEscrowAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes escrow_address = 2; - * This is a type-conversion wrapper around `getEscrowAddress()` - * @return {string} - */ -proto.escrow.PaymentResult.prototype.getEscrowAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getEscrowAddress())); -}; - - -/** - * optional bytes escrow_address = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEscrowAddress()` - * @return {!Uint8Array} - */ -proto.escrow.PaymentResult.prototype.getEscrowAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getEscrowAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.PaymentResult} returns this - */ -proto.escrow.PaymentResult.prototype.setEscrowAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional google.protobuf.Timestamp escrow_signed_time = 3; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.escrow.PaymentResult.prototype.getEscrowSignedTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.escrow.PaymentResult} returns this -*/ -proto.escrow.PaymentResult.prototype.setEscrowSignedTime = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.PaymentResult} returns this - */ -proto.escrow.PaymentResult.prototype.clearEscrowSignedTime = function() { - return this.setEscrowSignedTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.PaymentResult.prototype.hasEscrowSignedTime = function() { - return jspb.Message.getField(this, 3) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.SignedPaymentResult.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.SignedPaymentResult.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.SignedPaymentResult} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedPaymentResult.toObject = function(includeInstance, msg) { - var f, obj = { - result: (f = msg.getResult()) && proto.escrow.PaymentResult.toObject(includeInstance, f), - escrowSignature: msg.getEscrowSignature_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.escrow.SignedPaymentResult} - */ -proto.escrow.SignedPaymentResult.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.SignedPaymentResult; - return proto.escrow.SignedPaymentResult.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.SignedPaymentResult} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.SignedPaymentResult} - */ -proto.escrow.SignedPaymentResult.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.escrow.PaymentResult; - reader.readMessage(value,proto.escrow.PaymentResult.deserializeBinaryFromReader); - msg.setResult(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setEscrowSignature(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.SignedPaymentResult.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.SignedPaymentResult.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.SignedPaymentResult} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedPaymentResult.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getResult(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.escrow.PaymentResult.serializeBinaryToWriter - ); - } - f = message.getEscrowSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional PaymentResult result = 1; - * @return {?proto.escrow.PaymentResult} - */ -proto.escrow.SignedPaymentResult.prototype.getResult = function() { - return /** @type{?proto.escrow.PaymentResult} */ ( - jspb.Message.getWrapperField(this, proto.escrow.PaymentResult, 1)); -}; - - -/** - * @param {?proto.escrow.PaymentResult|undefined} value - * @return {!proto.escrow.SignedPaymentResult} returns this -*/ -proto.escrow.SignedPaymentResult.prototype.setResult = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.SignedPaymentResult} returns this - */ -proto.escrow.SignedPaymentResult.prototype.clearResult = function() { - return this.setResult(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.SignedPaymentResult.prototype.hasResult = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes escrow_signature = 2; - * @return {!(string|Uint8Array)} - */ -proto.escrow.SignedPaymentResult.prototype.getEscrowSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes escrow_signature = 2; - * This is a type-conversion wrapper around `getEscrowSignature()` - * @return {string} - */ -proto.escrow.SignedPaymentResult.prototype.getEscrowSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getEscrowSignature())); -}; - - -/** - * optional bytes escrow_signature = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEscrowSignature()` - * @return {!Uint8Array} - */ -proto.escrow.SignedPaymentResult.prototype.getEscrowSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getEscrowSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.SignedPaymentResult} returns this - */ -proto.escrow.SignedPaymentResult.prototype.setEscrowSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.BalanceResult.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.BalanceResult.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.BalanceResult} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.BalanceResult.toObject = function(includeInstance, msg) { - var f, obj = { - balance: jspb.Message.getFieldWithDefault(msg, 1, 0), - escrowAddress: msg.getEscrowAddress_asB64(), - escrowSignedTime: (f = msg.getEscrowSignedTime()) && google_protobuf_timestamp_pb.Timestamp.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.escrow.BalanceResult} - */ -proto.escrow.BalanceResult.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.BalanceResult; - return proto.escrow.BalanceResult.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.BalanceResult} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.BalanceResult} - */ -proto.escrow.BalanceResult.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.setBalance(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setEscrowAddress(value); - break; - case 3: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setEscrowSignedTime(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.BalanceResult.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.BalanceResult.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.BalanceResult} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.BalanceResult.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getBalance(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getEscrowAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getEscrowSignedTime(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } -}; - - -/** - * optional int64 balance = 1; - * @return {number} - */ -proto.escrow.BalanceResult.prototype.getBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.BalanceResult} returns this - */ -proto.escrow.BalanceResult.prototype.setBalance = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional bytes escrow_address = 2; - * @return {!(string|Uint8Array)} - */ -proto.escrow.BalanceResult.prototype.getEscrowAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes escrow_address = 2; - * This is a type-conversion wrapper around `getEscrowAddress()` - * @return {string} - */ -proto.escrow.BalanceResult.prototype.getEscrowAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getEscrowAddress())); -}; - - -/** - * optional bytes escrow_address = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEscrowAddress()` - * @return {!Uint8Array} - */ -proto.escrow.BalanceResult.prototype.getEscrowAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getEscrowAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.BalanceResult} returns this - */ -proto.escrow.BalanceResult.prototype.setEscrowAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional google.protobuf.Timestamp escrow_signed_time = 3; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.escrow.BalanceResult.prototype.getEscrowSignedTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.escrow.BalanceResult} returns this -*/ -proto.escrow.BalanceResult.prototype.setEscrowSignedTime = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.BalanceResult} returns this - */ -proto.escrow.BalanceResult.prototype.clearEscrowSignedTime = function() { - return this.setEscrowSignedTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.BalanceResult.prototype.hasEscrowSignedTime = function() { - return jspb.Message.getField(this, 3) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.SignedBalanceResult.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.SignedBalanceResult.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.SignedBalanceResult} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedBalanceResult.toObject = function(includeInstance, msg) { - var f, obj = { - result: (f = msg.getResult()) && proto.escrow.BalanceResult.toObject(includeInstance, f), - escrowSignature: msg.getEscrowSignature_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.escrow.SignedBalanceResult} - */ -proto.escrow.SignedBalanceResult.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.SignedBalanceResult; - return proto.escrow.SignedBalanceResult.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.SignedBalanceResult} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.SignedBalanceResult} - */ -proto.escrow.SignedBalanceResult.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.escrow.BalanceResult; - reader.readMessage(value,proto.escrow.BalanceResult.deserializeBinaryFromReader); - msg.setResult(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setEscrowSignature(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.SignedBalanceResult.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.SignedBalanceResult.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.SignedBalanceResult} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedBalanceResult.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getResult(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.escrow.BalanceResult.serializeBinaryToWriter - ); - } - f = message.getEscrowSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional BalanceResult result = 1; - * @return {?proto.escrow.BalanceResult} - */ -proto.escrow.SignedBalanceResult.prototype.getResult = function() { - return /** @type{?proto.escrow.BalanceResult} */ ( - jspb.Message.getWrapperField(this, proto.escrow.BalanceResult, 1)); -}; - - -/** - * @param {?proto.escrow.BalanceResult|undefined} value - * @return {!proto.escrow.SignedBalanceResult} returns this -*/ -proto.escrow.SignedBalanceResult.prototype.setResult = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.SignedBalanceResult} returns this - */ -proto.escrow.SignedBalanceResult.prototype.clearResult = function() { - return this.setResult(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.SignedBalanceResult.prototype.hasResult = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes escrow_signature = 2; - * @return {!(string|Uint8Array)} - */ -proto.escrow.SignedBalanceResult.prototype.getEscrowSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes escrow_signature = 2; - * This is a type-conversion wrapper around `getEscrowSignature()` - * @return {string} - */ -proto.escrow.SignedBalanceResult.prototype.getEscrowSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getEscrowSignature())); -}; - - -/** - * optional bytes escrow_signature = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEscrowSignature()` - * @return {!Uint8Array} - */ -proto.escrow.SignedBalanceResult.prototype.getEscrowSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getEscrowSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.SignedBalanceResult} returns this - */ -proto.escrow.SignedBalanceResult.prototype.setEscrowSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.SignedStakeRequest.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.SignedStakeRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.SignedStakeRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedStakeRequest.toObject = function(includeInstance, msg) { - var f, obj = { - data: (f = msg.getData()) && proto.escrow.StakeRequest.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.escrow.SignedStakeRequest} - */ -proto.escrow.SignedStakeRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.SignedStakeRequest; - return proto.escrow.SignedStakeRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.SignedStakeRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.SignedStakeRequest} - */ -proto.escrow.SignedStakeRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.escrow.StakeRequest; - reader.readMessage(value,proto.escrow.StakeRequest.deserializeBinaryFromReader); - msg.setData(value); - break; - case 2: - 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.escrow.SignedStakeRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.SignedStakeRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.SignedStakeRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedStakeRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getData(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.escrow.StakeRequest.serializeBinaryToWriter - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional StakeRequest data = 1; - * @return {?proto.escrow.StakeRequest} - */ -proto.escrow.SignedStakeRequest.prototype.getData = function() { - return /** @type{?proto.escrow.StakeRequest} */ ( - jspb.Message.getWrapperField(this, proto.escrow.StakeRequest, 1)); -}; - - -/** - * @param {?proto.escrow.StakeRequest|undefined} value - * @return {!proto.escrow.SignedStakeRequest} returns this -*/ -proto.escrow.SignedStakeRequest.prototype.setData = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.SignedStakeRequest} returns this - */ -proto.escrow.SignedStakeRequest.prototype.clearData = function() { - return this.setData(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.SignedStakeRequest.prototype.hasData = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes signature = 2; - * @return {!(string|Uint8Array)} - */ -proto.escrow.SignedStakeRequest.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes signature = 2; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.escrow.SignedStakeRequest.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 2; - * 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.escrow.SignedStakeRequest.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.SignedStakeRequest} returns this - */ -proto.escrow.SignedStakeRequest.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.StakeRequest.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.StakeRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.StakeRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.StakeRequest.toObject = function(includeInstance, msg) { - var f, obj = { - stakerId: jspb.Message.getFieldWithDefault(msg, 1, ""), - stakeAmount: jspb.Message.getFieldWithDefault(msg, 2, 0), - transferRequest: (f = msg.getTransferRequest()) && protos_ledger_ledger_pb.SignedTransferRequest.toObject(includeInstance, f), - requestTime: (f = msg.getRequestTime()) && google_protobuf_timestamp_pb.Timestamp.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.escrow.StakeRequest} - */ -proto.escrow.StakeRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.StakeRequest; - return proto.escrow.StakeRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.StakeRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.StakeRequest} - */ -proto.escrow.StakeRequest.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.setStakerId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setStakeAmount(value); - break; - case 3: - var value = new protos_ledger_ledger_pb.SignedTransferRequest; - reader.readMessage(value,protos_ledger_ledger_pb.SignedTransferRequest.deserializeBinaryFromReader); - msg.setTransferRequest(value); - break; - case 4: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setRequestTime(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.StakeRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.StakeRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.StakeRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.StakeRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStakerId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getStakeAmount(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getTransferRequest(); - if (f != null) { - writer.writeMessage( - 3, - f, - protos_ledger_ledger_pb.SignedTransferRequest.serializeBinaryToWriter - ); - } - f = message.getRequestTime(); - if (f != null) { - writer.writeMessage( - 4, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string staker_id = 1; - * @return {string} - */ -proto.escrow.StakeRequest.prototype.getStakerId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.escrow.StakeRequest} returns this - */ -proto.escrow.StakeRequest.prototype.setStakerId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional int64 stake_amount = 2; - * @return {number} - */ -proto.escrow.StakeRequest.prototype.getStakeAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.StakeRequest} returns this - */ -proto.escrow.StakeRequest.prototype.setStakeAmount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional ledger.SignedTransferRequest transfer_request = 3; - * @return {?proto.ledger.SignedTransferRequest} - */ -proto.escrow.StakeRequest.prototype.getTransferRequest = function() { - return /** @type{?proto.ledger.SignedTransferRequest} */ ( - jspb.Message.getWrapperField(this, protos_ledger_ledger_pb.SignedTransferRequest, 3)); -}; - - -/** - * @param {?proto.ledger.SignedTransferRequest|undefined} value - * @return {!proto.escrow.StakeRequest} returns this -*/ -proto.escrow.StakeRequest.prototype.setTransferRequest = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.StakeRequest} returns this - */ -proto.escrow.StakeRequest.prototype.clearTransferRequest = function() { - return this.setTransferRequest(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.StakeRequest.prototype.hasTransferRequest = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional google.protobuf.Timestamp request_time = 4; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.escrow.StakeRequest.prototype.getRequestTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.escrow.StakeRequest} returns this -*/ -proto.escrow.StakeRequest.prototype.setRequestTime = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.StakeRequest} returns this - */ -proto.escrow.StakeRequest.prototype.clearRequestTime = function() { - return this.setRequestTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.StakeRequest.prototype.hasRequestTime = function() { - return jspb.Message.getField(this, 4) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.escrow.StakeResult.repeatedFields_ = [5,6]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.StakeResult.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.StakeResult.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.StakeResult} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.StakeResult.toObject = function(includeInstance, msg) { - var f, obj = { - stakerId: jspb.Message.getFieldWithDefault(msg, 1, ""), - balance: jspb.Message.getFieldWithDefault(msg, 2, 0), - matureAmount: jspb.Message.getFieldWithDefault(msg, 3, 0), - pendingAmount: jspb.Message.getFieldWithDefault(msg, 4, 0), - ledgersList: jspb.Message.toObjectList(msg.getLedgersList(), - proto.escrow.StakeLedger.toObject, includeInstance), - unfinishLedgersList: jspb.Message.toObjectList(msg.getUnfinishLedgersList(), - proto.escrow.UnfinishStakeLedger.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.escrow.StakeResult} - */ -proto.escrow.StakeResult.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.StakeResult; - return proto.escrow.StakeResult.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.StakeResult} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.StakeResult} - */ -proto.escrow.StakeResult.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.setStakerId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setBalance(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setMatureAmount(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setPendingAmount(value); - break; - case 5: - var value = new proto.escrow.StakeLedger; - reader.readMessage(value,proto.escrow.StakeLedger.deserializeBinaryFromReader); - msg.addLedgers(value); - break; - case 6: - var value = new proto.escrow.UnfinishStakeLedger; - reader.readMessage(value,proto.escrow.UnfinishStakeLedger.deserializeBinaryFromReader); - msg.addUnfinishLedgers(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.StakeResult.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.StakeResult.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.StakeResult} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.StakeResult.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStakerId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getBalance(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getMatureAmount(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getPendingAmount(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getLedgersList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 5, - f, - proto.escrow.StakeLedger.serializeBinaryToWriter - ); - } - f = message.getUnfinishLedgersList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 6, - f, - proto.escrow.UnfinishStakeLedger.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string staker_id = 1; - * @return {string} - */ -proto.escrow.StakeResult.prototype.getStakerId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.escrow.StakeResult} returns this - */ -proto.escrow.StakeResult.prototype.setStakerId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional int64 balance = 2; - * @return {number} - */ -proto.escrow.StakeResult.prototype.getBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.StakeResult} returns this - */ -proto.escrow.StakeResult.prototype.setBalance = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int64 mature_amount = 3; - * @return {number} - */ -proto.escrow.StakeResult.prototype.getMatureAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.StakeResult} returns this - */ -proto.escrow.StakeResult.prototype.setMatureAmount = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int64 pending_amount = 4; - * @return {number} - */ -proto.escrow.StakeResult.prototype.getPendingAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.StakeResult} returns this - */ -proto.escrow.StakeResult.prototype.setPendingAmount = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * repeated StakeLedger ledgers = 5; - * @return {!Array} - */ -proto.escrow.StakeResult.prototype.getLedgersList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.escrow.StakeLedger, 5)); -}; - - -/** - * @param {!Array} value - * @return {!proto.escrow.StakeResult} returns this -*/ -proto.escrow.StakeResult.prototype.setLedgersList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 5, value); -}; - - -/** - * @param {!proto.escrow.StakeLedger=} opt_value - * @param {number=} opt_index - * @return {!proto.escrow.StakeLedger} - */ -proto.escrow.StakeResult.prototype.addLedgers = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.escrow.StakeLedger, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.escrow.StakeResult} returns this - */ -proto.escrow.StakeResult.prototype.clearLedgersList = function() { - return this.setLedgersList([]); -}; - - -/** - * repeated UnfinishStakeLedger unfinish_ledgers = 6; - * @return {!Array} - */ -proto.escrow.StakeResult.prototype.getUnfinishLedgersList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.escrow.UnfinishStakeLedger, 6)); -}; - - -/** - * @param {!Array} value - * @return {!proto.escrow.StakeResult} returns this -*/ -proto.escrow.StakeResult.prototype.setUnfinishLedgersList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 6, value); -}; - - -/** - * @param {!proto.escrow.UnfinishStakeLedger=} opt_value - * @param {number=} opt_index - * @return {!proto.escrow.UnfinishStakeLedger} - */ -proto.escrow.StakeResult.prototype.addUnfinishLedgers = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.escrow.UnfinishStakeLedger, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.escrow.StakeResult} returns this - */ -proto.escrow.StakeResult.prototype.clearUnfinishLedgersList = function() { - return this.setUnfinishLedgersList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.SignedStakeResult.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.SignedStakeResult.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.SignedStakeResult} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedStakeResult.toObject = function(includeInstance, msg) { - var f, obj = { - data: (f = msg.getData()) && proto.escrow.StakeResult.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.escrow.SignedStakeResult} - */ -proto.escrow.SignedStakeResult.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.SignedStakeResult; - return proto.escrow.SignedStakeResult.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.SignedStakeResult} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.SignedStakeResult} - */ -proto.escrow.SignedStakeResult.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.escrow.StakeResult; - reader.readMessage(value,proto.escrow.StakeResult.deserializeBinaryFromReader); - msg.setData(value); - break; - case 2: - 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.escrow.SignedStakeResult.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.SignedStakeResult.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.SignedStakeResult} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedStakeResult.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getData(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.escrow.StakeResult.serializeBinaryToWriter - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional StakeResult data = 1; - * @return {?proto.escrow.StakeResult} - */ -proto.escrow.SignedStakeResult.prototype.getData = function() { - return /** @type{?proto.escrow.StakeResult} */ ( - jspb.Message.getWrapperField(this, proto.escrow.StakeResult, 1)); -}; - - -/** - * @param {?proto.escrow.StakeResult|undefined} value - * @return {!proto.escrow.SignedStakeResult} returns this -*/ -proto.escrow.SignedStakeResult.prototype.setData = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.SignedStakeResult} returns this - */ -proto.escrow.SignedStakeResult.prototype.clearData = function() { - return this.setData(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.SignedStakeResult.prototype.hasData = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes signature = 2; - * @return {!(string|Uint8Array)} - */ -proto.escrow.SignedStakeResult.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes signature = 2; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.escrow.SignedStakeResult.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 2; - * 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.escrow.SignedStakeResult.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.SignedStakeResult} returns this - */ -proto.escrow.SignedStakeResult.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.StakeLedger.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.StakeLedger.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.StakeLedger} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.StakeLedger.toObject = function(includeInstance, msg) { - var f, obj = { - stakerId: jspb.Message.getFieldWithDefault(msg, 1, ""), - amount: jspb.Message.getFieldWithDefault(msg, 2, 0), - startTime: (f = msg.getStartTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - matureTime: (f = msg.getMatureTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - operatorId: jspb.Message.getFieldWithDefault(msg, 5, ""), - type: jspb.Message.getFieldWithDefault(msg, 6, 0), - operationLog: jspb.Message.getFieldWithDefault(msg, 7, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.escrow.StakeLedger} - */ -proto.escrow.StakeLedger.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.StakeLedger; - return proto.escrow.StakeLedger.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.StakeLedger} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.StakeLedger} - */ -proto.escrow.StakeLedger.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.setStakerId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; - case 3: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setStartTime(value); - break; - case 4: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setMatureTime(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setOperatorId(value); - break; - case 6: - var value = /** @type {!proto.escrow.OperationType} */ (reader.readEnum()); - msg.setType(value); - break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setOperationLog(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.StakeLedger.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.StakeLedger.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.StakeLedger} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.StakeLedger.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStakerId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getStartTime(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getMatureTime(); - if (f != null) { - writer.writeMessage( - 4, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getOperatorId(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 6, - f - ); - } - f = message.getOperationLog(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } -}; - - -/** - * optional string staker_id = 1; - * @return {string} - */ -proto.escrow.StakeLedger.prototype.getStakerId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.escrow.StakeLedger} returns this - */ -proto.escrow.StakeLedger.prototype.setStakerId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional int64 amount = 2; - * @return {number} - */ -proto.escrow.StakeLedger.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.StakeLedger} returns this - */ -proto.escrow.StakeLedger.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional google.protobuf.Timestamp start_time = 3; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.escrow.StakeLedger.prototype.getStartTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.escrow.StakeLedger} returns this -*/ -proto.escrow.StakeLedger.prototype.setStartTime = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.StakeLedger} returns this - */ -proto.escrow.StakeLedger.prototype.clearStartTime = function() { - return this.setStartTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.StakeLedger.prototype.hasStartTime = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional google.protobuf.Timestamp mature_time = 4; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.escrow.StakeLedger.prototype.getMatureTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.escrow.StakeLedger} returns this -*/ -proto.escrow.StakeLedger.prototype.setMatureTime = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.StakeLedger} returns this - */ -proto.escrow.StakeLedger.prototype.clearMatureTime = function() { - return this.setMatureTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.StakeLedger.prototype.hasMatureTime = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional string operator_id = 5; - * @return {string} - */ -proto.escrow.StakeLedger.prototype.getOperatorId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.escrow.StakeLedger} returns this - */ -proto.escrow.StakeLedger.prototype.setOperatorId = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * optional OperationType type = 6; - * @return {!proto.escrow.OperationType} - */ -proto.escrow.StakeLedger.prototype.getType = function() { - return /** @type {!proto.escrow.OperationType} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {!proto.escrow.OperationType} value - * @return {!proto.escrow.StakeLedger} returns this - */ -proto.escrow.StakeLedger.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 6, value); -}; - - -/** - * optional string operation_log = 7; - * @return {string} - */ -proto.escrow.StakeLedger.prototype.getOperationLog = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * @param {string} value - * @return {!proto.escrow.StakeLedger} returns this - */ -proto.escrow.StakeLedger.prototype.setOperationLog = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.UnfinishStakeLedger.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.UnfinishStakeLedger.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.UnfinishStakeLedger} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.UnfinishStakeLedger.toObject = function(includeInstance, msg) { - var f, obj = { - stakerId: jspb.Message.getFieldWithDefault(msg, 1, ""), - amount: jspb.Message.getFieldWithDefault(msg, 2, 0), - status: jspb.Message.getFieldWithDefault(msg, 3, 0), - failReason: jspb.Message.getFieldWithDefault(msg, 4, ""), - submitTime: (f = msg.getSubmitTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - failTime: (f = msg.getFailTime()) && google_protobuf_timestamp_pb.Timestamp.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.escrow.UnfinishStakeLedger} - */ -proto.escrow.UnfinishStakeLedger.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.UnfinishStakeLedger; - return proto.escrow.UnfinishStakeLedger.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.UnfinishStakeLedger} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.UnfinishStakeLedger} - */ -proto.escrow.UnfinishStakeLedger.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.setStakerId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; - case 3: - var value = /** @type {!proto.escrow.StakeStatus} */ (reader.readEnum()); - msg.setStatus(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setFailReason(value); - break; - case 5: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setSubmitTime(value); - break; - case 6: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setFailTime(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.UnfinishStakeLedger.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.UnfinishStakeLedger.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.UnfinishStakeLedger} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.UnfinishStakeLedger.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStakerId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getStatus(); - if (f !== 0.0) { - writer.writeEnum( - 3, - f - ); - } - f = message.getFailReason(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getSubmitTime(); - if (f != null) { - writer.writeMessage( - 5, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getFailTime(); - if (f != null) { - writer.writeMessage( - 6, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string staker_id = 1; - * @return {string} - */ -proto.escrow.UnfinishStakeLedger.prototype.getStakerId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.escrow.UnfinishStakeLedger} returns this - */ -proto.escrow.UnfinishStakeLedger.prototype.setStakerId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional int64 amount = 2; - * @return {number} - */ -proto.escrow.UnfinishStakeLedger.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.UnfinishStakeLedger} returns this - */ -proto.escrow.UnfinishStakeLedger.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional StakeStatus status = 3; - * @return {!proto.escrow.StakeStatus} - */ -proto.escrow.UnfinishStakeLedger.prototype.getStatus = function() { - return /** @type {!proto.escrow.StakeStatus} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {!proto.escrow.StakeStatus} value - * @return {!proto.escrow.UnfinishStakeLedger} returns this - */ -proto.escrow.UnfinishStakeLedger.prototype.setStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 3, value); -}; - - -/** - * optional string fail_reason = 4; - * @return {string} - */ -proto.escrow.UnfinishStakeLedger.prototype.getFailReason = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.escrow.UnfinishStakeLedger} returns this - */ -proto.escrow.UnfinishStakeLedger.prototype.setFailReason = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional google.protobuf.Timestamp submit_time = 5; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.escrow.UnfinishStakeLedger.prototype.getSubmitTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.escrow.UnfinishStakeLedger} returns this -*/ -proto.escrow.UnfinishStakeLedger.prototype.setSubmitTime = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.UnfinishStakeLedger} returns this - */ -proto.escrow.UnfinishStakeLedger.prototype.clearSubmitTime = function() { - return this.setSubmitTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.UnfinishStakeLedger.prototype.hasSubmitTime = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional google.protobuf.Timestamp fail_time = 6; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.escrow.UnfinishStakeLedger.prototype.getFailTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.escrow.UnfinishStakeLedger} returns this -*/ -proto.escrow.UnfinishStakeLedger.prototype.setFailTime = function(value) { - return jspb.Message.setWrapperField(this, 6, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.UnfinishStakeLedger} returns this - */ -proto.escrow.UnfinishStakeLedger.prototype.clearFailTime = function() { - return this.setFailTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.UnfinishStakeLedger.prototype.hasFailTime = function() { - return jspb.Message.getField(this, 6) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.SignedStakePenaltyRequest.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.SignedStakePenaltyRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.SignedStakePenaltyRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedStakePenaltyRequest.toObject = function(includeInstance, msg) { - var f, obj = { - data: (f = msg.getData()) && proto.escrow.StakePenaltyRequest.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.escrow.SignedStakePenaltyRequest} - */ -proto.escrow.SignedStakePenaltyRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.SignedStakePenaltyRequest; - return proto.escrow.SignedStakePenaltyRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.SignedStakePenaltyRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.SignedStakePenaltyRequest} - */ -proto.escrow.SignedStakePenaltyRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.escrow.StakePenaltyRequest; - reader.readMessage(value,proto.escrow.StakePenaltyRequest.deserializeBinaryFromReader); - msg.setData(value); - break; - case 2: - 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.escrow.SignedStakePenaltyRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.SignedStakePenaltyRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.SignedStakePenaltyRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedStakePenaltyRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getData(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.escrow.StakePenaltyRequest.serializeBinaryToWriter - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional StakePenaltyRequest data = 1; - * @return {?proto.escrow.StakePenaltyRequest} - */ -proto.escrow.SignedStakePenaltyRequest.prototype.getData = function() { - return /** @type{?proto.escrow.StakePenaltyRequest} */ ( - jspb.Message.getWrapperField(this, proto.escrow.StakePenaltyRequest, 1)); -}; - - -/** - * @param {?proto.escrow.StakePenaltyRequest|undefined} value - * @return {!proto.escrow.SignedStakePenaltyRequest} returns this -*/ -proto.escrow.SignedStakePenaltyRequest.prototype.setData = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.SignedStakePenaltyRequest} returns this - */ -proto.escrow.SignedStakePenaltyRequest.prototype.clearData = function() { - return this.setData(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.SignedStakePenaltyRequest.prototype.hasData = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes signature = 2; - * @return {!(string|Uint8Array)} - */ -proto.escrow.SignedStakePenaltyRequest.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes signature = 2; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.escrow.SignedStakePenaltyRequest.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 2; - * 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.escrow.SignedStakePenaltyRequest.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.SignedStakePenaltyRequest} returns this - */ -proto.escrow.SignedStakePenaltyRequest.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.StakePenaltyRequest.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.StakePenaltyRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.StakePenaltyRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.StakePenaltyRequest.toObject = function(includeInstance, msg) { - var f, obj = { - stakerId: jspb.Message.getFieldWithDefault(msg, 1, ""), - operatorId: jspb.Message.getFieldWithDefault(msg, 2, ""), - reason: jspb.Message.getFieldWithDefault(msg, 3, 0), - operationLog: jspb.Message.getFieldWithDefault(msg, 4, ""), - amount: jspb.Message.getFieldWithDefault(msg, 5, 0), - submitTime: (f = msg.getSubmitTime()) && google_protobuf_timestamp_pb.Timestamp.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.escrow.StakePenaltyRequest} - */ -proto.escrow.StakePenaltyRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.StakePenaltyRequest; - return proto.escrow.StakePenaltyRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.StakePenaltyRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.StakePenaltyRequest} - */ -proto.escrow.StakePenaltyRequest.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.setStakerId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setOperatorId(value); - break; - case 3: - var value = /** @type {!proto.escrow.OperationType} */ (reader.readEnum()); - msg.setReason(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setOperationLog(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; - case 6: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setSubmitTime(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.StakePenaltyRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.StakePenaltyRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.StakePenaltyRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.StakePenaltyRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStakerId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getOperatorId(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getReason(); - if (f !== 0.0) { - writer.writeEnum( - 3, - f - ); - } - f = message.getOperationLog(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getSubmitTime(); - if (f != null) { - writer.writeMessage( - 6, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string staker_id = 1; - * @return {string} - */ -proto.escrow.StakePenaltyRequest.prototype.getStakerId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.escrow.StakePenaltyRequest} returns this - */ -proto.escrow.StakePenaltyRequest.prototype.setStakerId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string operator_id = 2; - * @return {string} - */ -proto.escrow.StakePenaltyRequest.prototype.getOperatorId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.escrow.StakePenaltyRequest} returns this - */ -proto.escrow.StakePenaltyRequest.prototype.setOperatorId = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional OperationType reason = 3; - * @return {!proto.escrow.OperationType} - */ -proto.escrow.StakePenaltyRequest.prototype.getReason = function() { - return /** @type {!proto.escrow.OperationType} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {!proto.escrow.OperationType} value - * @return {!proto.escrow.StakePenaltyRequest} returns this - */ -proto.escrow.StakePenaltyRequest.prototype.setReason = function(value) { - return jspb.Message.setProto3EnumField(this, 3, value); -}; - - -/** - * optional string operation_log = 4; - * @return {string} - */ -proto.escrow.StakePenaltyRequest.prototype.getOperationLog = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.escrow.StakePenaltyRequest} returns this - */ -proto.escrow.StakePenaltyRequest.prototype.setOperationLog = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional int64 amount = 5; - * @return {number} - */ -proto.escrow.StakePenaltyRequest.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.StakePenaltyRequest} returns this - */ -proto.escrow.StakePenaltyRequest.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional google.protobuf.Timestamp submit_time = 6; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.escrow.StakePenaltyRequest.prototype.getSubmitTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.escrow.StakePenaltyRequest} returns this -*/ -proto.escrow.StakePenaltyRequest.prototype.setSubmitTime = function(value) { - return jspb.Message.setWrapperField(this, 6, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.StakePenaltyRequest} returns this - */ -proto.escrow.StakePenaltyRequest.prototype.clearSubmitTime = function() { - return this.setSubmitTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.StakePenaltyRequest.prototype.hasSubmitTime = function() { - return jspb.Message.getField(this, 6) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.StakePenaltyResult.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.StakePenaltyResult.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.StakePenaltyResult} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.StakePenaltyResult.toObject = function(includeInstance, msg) { - var f, obj = { - stakerId: jspb.Message.getFieldWithDefault(msg, 1, ""), - requestPenaltyAmount: jspb.Message.getFieldWithDefault(msg, 2, 0), - operatePenaltyAmount: jspb.Message.getFieldWithDefault(msg, 3, 0), - operatorId: jspb.Message.getFieldWithDefault(msg, 4, ""), - receiveTime: (f = msg.getReceiveTime()) && google_protobuf_timestamp_pb.Timestamp.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.escrow.StakePenaltyResult} - */ -proto.escrow.StakePenaltyResult.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.StakePenaltyResult; - return proto.escrow.StakePenaltyResult.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.StakePenaltyResult} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.StakePenaltyResult} - */ -proto.escrow.StakePenaltyResult.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.setStakerId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setRequestPenaltyAmount(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setOperatePenaltyAmount(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setOperatorId(value); - break; - case 5: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setReceiveTime(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.escrow.StakePenaltyResult.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.StakePenaltyResult.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.StakePenaltyResult} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.StakePenaltyResult.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStakerId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getRequestPenaltyAmount(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getOperatePenaltyAmount(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getOperatorId(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getReceiveTime(); - if (f != null) { - writer.writeMessage( - 5, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string staker_id = 1; - * @return {string} - */ -proto.escrow.StakePenaltyResult.prototype.getStakerId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.escrow.StakePenaltyResult} returns this - */ -proto.escrow.StakePenaltyResult.prototype.setStakerId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional int64 request_penalty_amount = 2; - * @return {number} - */ -proto.escrow.StakePenaltyResult.prototype.getRequestPenaltyAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.StakePenaltyResult} returns this - */ -proto.escrow.StakePenaltyResult.prototype.setRequestPenaltyAmount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int64 operate_penalty_amount = 3; - * @return {number} - */ -proto.escrow.StakePenaltyResult.prototype.getOperatePenaltyAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.escrow.StakePenaltyResult} returns this - */ -proto.escrow.StakePenaltyResult.prototype.setOperatePenaltyAmount = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional string operator_id = 4; - * @return {string} - */ -proto.escrow.StakePenaltyResult.prototype.getOperatorId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.escrow.StakePenaltyResult} returns this - */ -proto.escrow.StakePenaltyResult.prototype.setOperatorId = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional google.protobuf.Timestamp receive_time = 5; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.escrow.StakePenaltyResult.prototype.getReceiveTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.escrow.StakePenaltyResult} returns this -*/ -proto.escrow.StakePenaltyResult.prototype.setReceiveTime = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.StakePenaltyResult} returns this - */ -proto.escrow.StakePenaltyResult.prototype.clearReceiveTime = function() { - return this.setReceiveTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.StakePenaltyResult.prototype.hasReceiveTime = function() { - return jspb.Message.getField(this, 5) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.escrow.SignedStakePenaltyResult.prototype.toObject = function(opt_includeInstance) { - return proto.escrow.SignedStakePenaltyResult.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.escrow.SignedStakePenaltyResult} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedStakePenaltyResult.toObject = function(includeInstance, msg) { - var f, obj = { - data: (f = msg.getData()) && proto.escrow.StakePenaltyResult.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.escrow.SignedStakePenaltyResult} - */ -proto.escrow.SignedStakePenaltyResult.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.escrow.SignedStakePenaltyResult; - return proto.escrow.SignedStakePenaltyResult.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.escrow.SignedStakePenaltyResult} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.escrow.SignedStakePenaltyResult} - */ -proto.escrow.SignedStakePenaltyResult.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.escrow.StakePenaltyResult; - reader.readMessage(value,proto.escrow.StakePenaltyResult.deserializeBinaryFromReader); - msg.setData(value); - break; - case 2: - 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.escrow.SignedStakePenaltyResult.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.escrow.SignedStakePenaltyResult.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.escrow.SignedStakePenaltyResult} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.escrow.SignedStakePenaltyResult.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getData(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.escrow.StakePenaltyResult.serializeBinaryToWriter - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional StakePenaltyResult data = 1; - * @return {?proto.escrow.StakePenaltyResult} - */ -proto.escrow.SignedStakePenaltyResult.prototype.getData = function() { - return /** @type{?proto.escrow.StakePenaltyResult} */ ( - jspb.Message.getWrapperField(this, proto.escrow.StakePenaltyResult, 1)); -}; - - -/** - * @param {?proto.escrow.StakePenaltyResult|undefined} value - * @return {!proto.escrow.SignedStakePenaltyResult} returns this -*/ -proto.escrow.SignedStakePenaltyResult.prototype.setData = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.escrow.SignedStakePenaltyResult} returns this - */ -proto.escrow.SignedStakePenaltyResult.prototype.clearData = function() { - return this.setData(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.escrow.SignedStakePenaltyResult.prototype.hasData = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes signature = 2; - * @return {!(string|Uint8Array)} - */ -proto.escrow.SignedStakePenaltyResult.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes signature = 2; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.escrow.SignedStakePenaltyResult.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 2; - * 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.escrow.SignedStakePenaltyResult.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.escrow.SignedStakePenaltyResult} returns this - */ -proto.escrow.SignedStakePenaltyResult.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * @enum {number} - */ -proto.escrow.TokenType = { - BTT: 0 -}; - -/** - * @enum {number} - */ -proto.escrow.Schedule = { - MONTHLY: 0, - QUARTERLY: 1, - ANNUALLY: 2, - CUSTOMIZED: 3 -}; - -/** - * @enum {number} - */ -proto.escrow.ContractType = { - REGULAR: 0, - PLAN: 1, - REVISE: 2 -}; - -/** - * @enum {number} - */ -proto.escrow.EscrowStatus = { - INITIATED: 0, - ACTIVE: 1, - CANCELED: 2, - CLOSED: 3, - NOTSTART: 4, - NOTSTART_PAID: 5 -}; - -/** - * @enum {number} - */ -proto.escrow.StakeStatus = { - PROCEEDING: 0, - FAIL: 1 -}; - -/** - * @enum {number} - */ -proto.escrow.OperationType = { - STAKE: 0, - CHEAT_PENALTY: 1, - LOST_SHARD_PENALTY: 2 -}; - -goog.object.extend(exports, proto.escrow); diff --git a/js/protos/exchange/exchange_message_pb.js b/js/protos/exchange/exchange_message_pb.js deleted file mode 100644 index ac6eb89..0000000 --- a/js/protos/exchange/exchange_message_pb.js +++ /dev/null @@ -1,5612 +0,0 @@ -// source: protos/exchange/exchange_message.proto -/** - * @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 google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); -goog.object.extend(proto, google_protobuf_any_pb); -var protos_ledger_ledger_pb = require('../../protos/ledger/ledger_pb.js'); -goog.object.extend(proto, protos_ledger_ledger_pb); -goog.exportSymbol('proto.protocol.ActivateAccountRequest', null, global); -goog.exportSymbol('proto.protocol.ActivateAccountResponse', null, global); -goog.exportSymbol('proto.protocol.ConfirmDepositRequest', null, global); -goog.exportSymbol('proto.protocol.ConfirmDepositResponse', null, global); -goog.exportSymbol('proto.protocol.DepositRequest', null, global); -goog.exportSymbol('proto.protocol.DepositResponse', null, global); -goog.exportSymbol('proto.protocol.PrepareDepositRequest', null, global); -goog.exportSymbol('proto.protocol.PrepareDepositResponse', null, global); -goog.exportSymbol('proto.protocol.PrepareWithdrawRequest', null, global); -goog.exportSymbol('proto.protocol.PrepareWithdrawResponse', null, global); -goog.exportSymbol('proto.protocol.QueryTransactionRequest', null, global); -goog.exportSymbol('proto.protocol.QueryTransactionResponse', null, global); -goog.exportSymbol('proto.protocol.Response', null, global); -goog.exportSymbol('proto.protocol.Response.return_code', null, global); -goog.exportSymbol('proto.protocol.TronAccountId', null, global); -goog.exportSymbol('proto.protocol.TronAuthority', null, global); -goog.exportSymbol('proto.protocol.TronTransaction', null, global); -goog.exportSymbol('proto.protocol.TronTransaction.TronContract', null, global); -goog.exportSymbol('proto.protocol.TronTransaction.TronContract.TronContractType', null, global); -goog.exportSymbol('proto.protocol.TronTransaction.TronRaw', null, global); -goog.exportSymbol('proto.protocol.TronTransaction.TronResult', null, global); -goog.exportSymbol('proto.protocol.TronTransaction.TronResult.TronCode', null, global); -goog.exportSymbol('proto.protocol.TronTransaction.TronResult.TronContractResult', null, global); -goog.exportSymbol('proto.protocol.WithdrawRequest', null, global); -goog.exportSymbol('proto.protocol.WithdrawResponse', 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.PrepareWithdrawRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.PrepareWithdrawRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.PrepareWithdrawRequest.displayName = 'proto.protocol.PrepareWithdrawRequest'; -} -/** - * 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.PrepareWithdrawResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.PrepareWithdrawResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.PrepareWithdrawResponse.displayName = 'proto.protocol.PrepareWithdrawResponse'; -} -/** - * 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.WithdrawRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.WithdrawRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.WithdrawRequest.displayName = 'proto.protocol.WithdrawRequest'; -} -/** - * 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.WithdrawResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.WithdrawResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.WithdrawResponse.displayName = 'proto.protocol.WithdrawResponse'; -} -/** - * 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.PrepareDepositRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.PrepareDepositRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.PrepareDepositRequest.displayName = 'proto.protocol.PrepareDepositRequest'; -} -/** - * 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.PrepareDepositResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.PrepareDepositResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.PrepareDepositResponse.displayName = 'proto.protocol.PrepareDepositResponse'; -} -/** - * 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.DepositRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.DepositRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.DepositRequest.displayName = 'proto.protocol.DepositRequest'; -} -/** - * 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.DepositResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.DepositResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.DepositResponse.displayName = 'proto.protocol.DepositResponse'; -} -/** - * 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.ConfirmDepositRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.ConfirmDepositRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.ConfirmDepositRequest.displayName = 'proto.protocol.ConfirmDepositRequest'; -} -/** - * 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.ConfirmDepositResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.ConfirmDepositResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.ConfirmDepositResponse.displayName = 'proto.protocol.ConfirmDepositResponse'; -} -/** - * 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.QueryTransactionRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.QueryTransactionRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.QueryTransactionRequest.displayName = 'proto.protocol.QueryTransactionRequest'; -} -/** - * 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.QueryTransactionResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.QueryTransactionResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.QueryTransactionResponse.displayName = 'proto.protocol.QueryTransactionResponse'; -} -/** - * 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.ActivateAccountRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.ActivateAccountRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.ActivateAccountRequest.displayName = 'proto.protocol.ActivateAccountRequest'; -} -/** - * 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.ActivateAccountResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.ActivateAccountResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.ActivateAccountResponse.displayName = 'proto.protocol.ActivateAccountResponse'; -} -/** - * 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.Response = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.Response, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.Response.displayName = 'proto.protocol.Response'; -} -/** - * 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.TronTransaction = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.TronTransaction.repeatedFields_, null); -}; -goog.inherits(proto.protocol.TronTransaction, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.TronTransaction.displayName = 'proto.protocol.TronTransaction'; -} -/** - * 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.TronTransaction.TronContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.TronTransaction.TronContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.TronTransaction.TronContract.displayName = 'proto.protocol.TronTransaction.TronContract'; -} -/** - * 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.TronTransaction.TronResult = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.TronTransaction.TronResult, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.TronTransaction.TronResult.displayName = 'proto.protocol.TronTransaction.TronResult'; -} -/** - * 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.TronTransaction.TronRaw = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.TronTransaction.TronRaw.repeatedFields_, null); -}; -goog.inherits(proto.protocol.TronTransaction.TronRaw, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.TronTransaction.TronRaw.displayName = 'proto.protocol.TronTransaction.TronRaw'; -} -/** - * 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.TronAuthority = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.TronAuthority, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.TronAuthority.displayName = 'proto.protocol.TronAuthority'; -} -/** - * 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.TronAccountId = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.TronAccountId, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.TronAccountId.displayName = 'proto.protocol.TronAccountId'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.PrepareWithdrawRequest.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.PrepareWithdrawRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.PrepareWithdrawRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.PrepareWithdrawRequest.toObject = function(includeInstance, msg) { - var f, obj = { - amount: jspb.Message.getFieldWithDefault(msg, 1, 0), - outTxId: jspb.Message.getFieldWithDefault(msg, 2, 0), - userAddress: msg.getUserAddress_asB64(), - userExternalAddress: msg.getUserExternalAddress_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.PrepareWithdrawRequest} - */ -proto.protocol.PrepareWithdrawRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.PrepareWithdrawRequest; - return proto.protocol.PrepareWithdrawRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.PrepareWithdrawRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.PrepareWithdrawRequest} - */ -proto.protocol.PrepareWithdrawRequest.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.setAmount(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setOutTxId(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setUserAddress(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setUserExternalAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.PrepareWithdrawRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.PrepareWithdrawRequest.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.PrepareWithdrawRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.PrepareWithdrawRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getOutTxId(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getUserAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getUserExternalAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } -}; - - -/** - * optional int64 amount = 1; - * @return {number} - */ -proto.protocol.PrepareWithdrawRequest.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.PrepareWithdrawRequest} returns this - */ -proto.protocol.PrepareWithdrawRequest.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int64 out_tx_id = 2; - * @return {number} - */ -proto.protocol.PrepareWithdrawRequest.prototype.getOutTxId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.PrepareWithdrawRequest} returns this - */ -proto.protocol.PrepareWithdrawRequest.prototype.setOutTxId = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bytes user_address = 3; - * @return {!(string|Uint8Array)} - */ -proto.protocol.PrepareWithdrawRequest.prototype.getUserAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes user_address = 3; - * This is a type-conversion wrapper around `getUserAddress()` - * @return {string} - */ -proto.protocol.PrepareWithdrawRequest.prototype.getUserAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getUserAddress())); -}; - - -/** - * optional bytes user_address = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getUserAddress()` - * @return {!Uint8Array} - */ -proto.protocol.PrepareWithdrawRequest.prototype.getUserAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getUserAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.PrepareWithdrawRequest} returns this - */ -proto.protocol.PrepareWithdrawRequest.prototype.setUserAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional bytes user_external_address = 4; - * @return {!(string|Uint8Array)} - */ -proto.protocol.PrepareWithdrawRequest.prototype.getUserExternalAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes user_external_address = 4; - * This is a type-conversion wrapper around `getUserExternalAddress()` - * @return {string} - */ -proto.protocol.PrepareWithdrawRequest.prototype.getUserExternalAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getUserExternalAddress())); -}; - - -/** - * optional bytes user_external_address = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getUserExternalAddress()` - * @return {!Uint8Array} - */ -proto.protocol.PrepareWithdrawRequest.prototype.getUserExternalAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getUserExternalAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.PrepareWithdrawRequest} returns this - */ -proto.protocol.PrepareWithdrawRequest.prototype.setUserExternalAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.PrepareWithdrawResponse.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.PrepareWithdrawResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.PrepareWithdrawResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.PrepareWithdrawResponse.toObject = function(includeInstance, msg) { - var f, obj = { - response: (f = msg.getResponse()) && proto.protocol.Response.toObject(includeInstance, f), - ledgerExchangeAddress: msg.getLedgerExchangeAddress_asB64(), - id: 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.PrepareWithdrawResponse} - */ -proto.protocol.PrepareWithdrawResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.PrepareWithdrawResponse; - return proto.protocol.PrepareWithdrawResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.PrepareWithdrawResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.PrepareWithdrawResponse} - */ -proto.protocol.PrepareWithdrawResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.protocol.Response; - reader.readMessage(value,proto.protocol.Response.deserializeBinaryFromReader); - msg.setResponse(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setLedgerExchangeAddress(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.PrepareWithdrawResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.PrepareWithdrawResponse.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.PrepareWithdrawResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.PrepareWithdrawResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getResponse(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.protocol.Response.serializeBinaryToWriter - ); - } - f = message.getLedgerExchangeAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getId(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } -}; - - -/** - * optional Response response = 1; - * @return {?proto.protocol.Response} - */ -proto.protocol.PrepareWithdrawResponse.prototype.getResponse = function() { - return /** @type{?proto.protocol.Response} */ ( - jspb.Message.getWrapperField(this, proto.protocol.Response, 1)); -}; - - -/** - * @param {?proto.protocol.Response|undefined} value - * @return {!proto.protocol.PrepareWithdrawResponse} returns this -*/ -proto.protocol.PrepareWithdrawResponse.prototype.setResponse = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.PrepareWithdrawResponse} returns this - */ -proto.protocol.PrepareWithdrawResponse.prototype.clearResponse = function() { - return this.setResponse(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.PrepareWithdrawResponse.prototype.hasResponse = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes ledger_exchange_address = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.PrepareWithdrawResponse.prototype.getLedgerExchangeAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes ledger_exchange_address = 2; - * This is a type-conversion wrapper around `getLedgerExchangeAddress()` - * @return {string} - */ -proto.protocol.PrepareWithdrawResponse.prototype.getLedgerExchangeAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getLedgerExchangeAddress())); -}; - - -/** - * optional bytes ledger_exchange_address = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getLedgerExchangeAddress()` - * @return {!Uint8Array} - */ -proto.protocol.PrepareWithdrawResponse.prototype.getLedgerExchangeAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getLedgerExchangeAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.PrepareWithdrawResponse} returns this - */ -proto.protocol.PrepareWithdrawResponse.prototype.setLedgerExchangeAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional int64 id = 3; - * @return {number} - */ -proto.protocol.PrepareWithdrawResponse.prototype.getId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.PrepareWithdrawResponse} returns this - */ -proto.protocol.PrepareWithdrawResponse.prototype.setId = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.WithdrawRequest.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.WithdrawRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.WithdrawRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.WithdrawRequest.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, 0), - successChannelState: (f = msg.getSuccessChannelState()) && protos_ledger_ledger_pb.SignedChannelState.toObject(includeInstance, f), - failureChannelState: (f = msg.getFailureChannelState()) && protos_ledger_ledger_pb.SignedChannelState.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.WithdrawRequest} - */ -proto.protocol.WithdrawRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.WithdrawRequest; - return proto.protocol.WithdrawRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.WithdrawRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.WithdrawRequest} - */ -proto.protocol.WithdrawRequest.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.setId(value); - break; - case 2: - var value = new protos_ledger_ledger_pb.SignedChannelState; - reader.readMessage(value,protos_ledger_ledger_pb.SignedChannelState.deserializeBinaryFromReader); - msg.setSuccessChannelState(value); - break; - case 3: - var value = new protos_ledger_ledger_pb.SignedChannelState; - reader.readMessage(value,protos_ledger_ledger_pb.SignedChannelState.deserializeBinaryFromReader); - msg.setFailureChannelState(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.WithdrawRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.WithdrawRequest.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.WithdrawRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.WithdrawRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getSuccessChannelState(); - if (f != null) { - writer.writeMessage( - 2, - f, - protos_ledger_ledger_pb.SignedChannelState.serializeBinaryToWriter - ); - } - f = message.getFailureChannelState(); - if (f != null) { - writer.writeMessage( - 3, - f, - protos_ledger_ledger_pb.SignedChannelState.serializeBinaryToWriter - ); - } -}; - - -/** - * optional int64 id = 1; - * @return {number} - */ -proto.protocol.WithdrawRequest.prototype.getId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.WithdrawRequest} returns this - */ -proto.protocol.WithdrawRequest.prototype.setId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional ledger.SignedChannelState success_channel_state = 2; - * @return {?proto.ledger.SignedChannelState} - */ -proto.protocol.WithdrawRequest.prototype.getSuccessChannelState = function() { - return /** @type{?proto.ledger.SignedChannelState} */ ( - jspb.Message.getWrapperField(this, protos_ledger_ledger_pb.SignedChannelState, 2)); -}; - - -/** - * @param {?proto.ledger.SignedChannelState|undefined} value - * @return {!proto.protocol.WithdrawRequest} returns this -*/ -proto.protocol.WithdrawRequest.prototype.setSuccessChannelState = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.WithdrawRequest} returns this - */ -proto.protocol.WithdrawRequest.prototype.clearSuccessChannelState = function() { - return this.setSuccessChannelState(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.WithdrawRequest.prototype.hasSuccessChannelState = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional ledger.SignedChannelState failure_channel_state = 3; - * @return {?proto.ledger.SignedChannelState} - */ -proto.protocol.WithdrawRequest.prototype.getFailureChannelState = function() { - return /** @type{?proto.ledger.SignedChannelState} */ ( - jspb.Message.getWrapperField(this, protos_ledger_ledger_pb.SignedChannelState, 3)); -}; - - -/** - * @param {?proto.ledger.SignedChannelState|undefined} value - * @return {!proto.protocol.WithdrawRequest} returns this -*/ -proto.protocol.WithdrawRequest.prototype.setFailureChannelState = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.WithdrawRequest} returns this - */ -proto.protocol.WithdrawRequest.prototype.clearFailureChannelState = function() { - return this.setFailureChannelState(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.WithdrawRequest.prototype.hasFailureChannelState = function() { - return jspb.Message.getField(this, 3) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.WithdrawResponse.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.WithdrawResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.WithdrawResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.WithdrawResponse.toObject = function(includeInstance, msg) { - var f, obj = { - response: (f = msg.getResponse()) && proto.protocol.Response.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.WithdrawResponse} - */ -proto.protocol.WithdrawResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.WithdrawResponse; - return proto.protocol.WithdrawResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.WithdrawResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.WithdrawResponse} - */ -proto.protocol.WithdrawResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.protocol.Response; - reader.readMessage(value,proto.protocol.Response.deserializeBinaryFromReader); - msg.setResponse(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.WithdrawResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.WithdrawResponse.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.WithdrawResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.WithdrawResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getResponse(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.protocol.Response.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Response response = 1; - * @return {?proto.protocol.Response} - */ -proto.protocol.WithdrawResponse.prototype.getResponse = function() { - return /** @type{?proto.protocol.Response} */ ( - jspb.Message.getWrapperField(this, proto.protocol.Response, 1)); -}; - - -/** - * @param {?proto.protocol.Response|undefined} value - * @return {!proto.protocol.WithdrawResponse} returns this -*/ -proto.protocol.WithdrawResponse.prototype.setResponse = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.WithdrawResponse} returns this - */ -proto.protocol.WithdrawResponse.prototype.clearResponse = function() { - return this.setResponse(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.WithdrawResponse.prototype.hasResponse = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.PrepareDepositRequest.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.PrepareDepositRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.PrepareDepositRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.PrepareDepositRequest.toObject = function(includeInstance, msg) { - var f, obj = { - amount: jspb.Message.getFieldWithDefault(msg, 1, 0), - outTxId: jspb.Message.getFieldWithDefault(msg, 2, 0), - userAddress: msg.getUserAddress_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.PrepareDepositRequest} - */ -proto.protocol.PrepareDepositRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.PrepareDepositRequest; - return proto.protocol.PrepareDepositRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.PrepareDepositRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.PrepareDepositRequest} - */ -proto.protocol.PrepareDepositRequest.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.setAmount(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setOutTxId(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setUserAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.PrepareDepositRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.PrepareDepositRequest.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.PrepareDepositRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.PrepareDepositRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getOutTxId(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getUserAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } -}; - - -/** - * optional int64 amount = 1; - * @return {number} - */ -proto.protocol.PrepareDepositRequest.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.PrepareDepositRequest} returns this - */ -proto.protocol.PrepareDepositRequest.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int64 out_tx_id = 2; - * @return {number} - */ -proto.protocol.PrepareDepositRequest.prototype.getOutTxId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.PrepareDepositRequest} returns this - */ -proto.protocol.PrepareDepositRequest.prototype.setOutTxId = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bytes user_address = 3; - * @return {!(string|Uint8Array)} - */ -proto.protocol.PrepareDepositRequest.prototype.getUserAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes user_address = 3; - * This is a type-conversion wrapper around `getUserAddress()` - * @return {string} - */ -proto.protocol.PrepareDepositRequest.prototype.getUserAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getUserAddress())); -}; - - -/** - * optional bytes user_address = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getUserAddress()` - * @return {!Uint8Array} - */ -proto.protocol.PrepareDepositRequest.prototype.getUserAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getUserAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.PrepareDepositRequest} returns this - */ -proto.protocol.PrepareDepositRequest.prototype.setUserAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.PrepareDepositResponse.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.PrepareDepositResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.PrepareDepositResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.PrepareDepositResponse.toObject = function(includeInstance, msg) { - var f, obj = { - response: (f = msg.getResponse()) && proto.protocol.Response.toObject(includeInstance, f), - id: jspb.Message.getFieldWithDefault(msg, 2, 0), - tronTransaction: (f = msg.getTronTransaction()) && proto.protocol.TronTransaction.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.PrepareDepositResponse} - */ -proto.protocol.PrepareDepositResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.PrepareDepositResponse; - return proto.protocol.PrepareDepositResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.PrepareDepositResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.PrepareDepositResponse} - */ -proto.protocol.PrepareDepositResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.protocol.Response; - reader.readMessage(value,proto.protocol.Response.deserializeBinaryFromReader); - msg.setResponse(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setId(value); - break; - case 3: - var value = new proto.protocol.TronTransaction; - reader.readMessage(value,proto.protocol.TronTransaction.deserializeBinaryFromReader); - msg.setTronTransaction(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.PrepareDepositResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.PrepareDepositResponse.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.PrepareDepositResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.PrepareDepositResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getResponse(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.protocol.Response.serializeBinaryToWriter - ); - } - f = message.getId(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getTronTransaction(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.protocol.TronTransaction.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Response response = 1; - * @return {?proto.protocol.Response} - */ -proto.protocol.PrepareDepositResponse.prototype.getResponse = function() { - return /** @type{?proto.protocol.Response} */ ( - jspb.Message.getWrapperField(this, proto.protocol.Response, 1)); -}; - - -/** - * @param {?proto.protocol.Response|undefined} value - * @return {!proto.protocol.PrepareDepositResponse} returns this -*/ -proto.protocol.PrepareDepositResponse.prototype.setResponse = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.PrepareDepositResponse} returns this - */ -proto.protocol.PrepareDepositResponse.prototype.clearResponse = function() { - return this.setResponse(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.PrepareDepositResponse.prototype.hasResponse = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional int64 id = 2; - * @return {number} - */ -proto.protocol.PrepareDepositResponse.prototype.getId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.PrepareDepositResponse} returns this - */ -proto.protocol.PrepareDepositResponse.prototype.setId = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional TronTransaction tron_transaction = 3; - * @return {?proto.protocol.TronTransaction} - */ -proto.protocol.PrepareDepositResponse.prototype.getTronTransaction = function() { - return /** @type{?proto.protocol.TronTransaction} */ ( - jspb.Message.getWrapperField(this, proto.protocol.TronTransaction, 3)); -}; - - -/** - * @param {?proto.protocol.TronTransaction|undefined} value - * @return {!proto.protocol.PrepareDepositResponse} returns this -*/ -proto.protocol.PrepareDepositResponse.prototype.setTronTransaction = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.PrepareDepositResponse} returns this - */ -proto.protocol.PrepareDepositResponse.prototype.clearTronTransaction = function() { - return this.setTronTransaction(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.PrepareDepositResponse.prototype.hasTronTransaction = function() { - return jspb.Message.getField(this, 3) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.DepositRequest.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.DepositRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.DepositRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.DepositRequest.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, 0), - signedTronTransaction: (f = msg.getSignedTronTransaction()) && proto.protocol.TronTransaction.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.DepositRequest} - */ -proto.protocol.DepositRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.DepositRequest; - return proto.protocol.DepositRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.DepositRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.DepositRequest} - */ -proto.protocol.DepositRequest.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.setId(value); - break; - case 4: - var value = new proto.protocol.TronTransaction; - reader.readMessage(value,proto.protocol.TronTransaction.deserializeBinaryFromReader); - msg.setSignedTronTransaction(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.DepositRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.DepositRequest.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.DepositRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.DepositRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getSignedTronTransaction(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.protocol.TronTransaction.serializeBinaryToWriter - ); - } -}; - - -/** - * optional int64 id = 1; - * @return {number} - */ -proto.protocol.DepositRequest.prototype.getId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.DepositRequest} returns this - */ -proto.protocol.DepositRequest.prototype.setId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional TronTransaction signed_tron_transaction = 4; - * @return {?proto.protocol.TronTransaction} - */ -proto.protocol.DepositRequest.prototype.getSignedTronTransaction = function() { - return /** @type{?proto.protocol.TronTransaction} */ ( - jspb.Message.getWrapperField(this, proto.protocol.TronTransaction, 4)); -}; - - -/** - * @param {?proto.protocol.TronTransaction|undefined} value - * @return {!proto.protocol.DepositRequest} returns this -*/ -proto.protocol.DepositRequest.prototype.setSignedTronTransaction = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.DepositRequest} returns this - */ -proto.protocol.DepositRequest.prototype.clearSignedTronTransaction = function() { - return this.setSignedTronTransaction(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.DepositRequest.prototype.hasSignedTronTransaction = function() { - return jspb.Message.getField(this, 4) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.DepositResponse.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.DepositResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.DepositResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.DepositResponse.toObject = function(includeInstance, msg) { - var f, obj = { - response: (f = msg.getResponse()) && proto.protocol.Response.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.DepositResponse} - */ -proto.protocol.DepositResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.DepositResponse; - return proto.protocol.DepositResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.DepositResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.DepositResponse} - */ -proto.protocol.DepositResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.protocol.Response; - reader.readMessage(value,proto.protocol.Response.deserializeBinaryFromReader); - msg.setResponse(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.DepositResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.DepositResponse.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.DepositResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.DepositResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getResponse(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.protocol.Response.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Response response = 1; - * @return {?proto.protocol.Response} - */ -proto.protocol.DepositResponse.prototype.getResponse = function() { - return /** @type{?proto.protocol.Response} */ ( - jspb.Message.getWrapperField(this, proto.protocol.Response, 1)); -}; - - -/** - * @param {?proto.protocol.Response|undefined} value - * @return {!proto.protocol.DepositResponse} returns this -*/ -proto.protocol.DepositResponse.prototype.setResponse = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.DepositResponse} returns this - */ -proto.protocol.DepositResponse.prototype.clearResponse = function() { - return this.setResponse(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.DepositResponse.prototype.hasResponse = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.ConfirmDepositRequest.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.ConfirmDepositRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.ConfirmDepositRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.ConfirmDepositRequest.toObject = function(includeInstance, msg) { - var f, obj = { - id: 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.ConfirmDepositRequest} - */ -proto.protocol.ConfirmDepositRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.ConfirmDepositRequest; - return proto.protocol.ConfirmDepositRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.ConfirmDepositRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.ConfirmDepositRequest} - */ -proto.protocol.ConfirmDepositRequest.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.setId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.ConfirmDepositRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.ConfirmDepositRequest.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.ConfirmDepositRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.ConfirmDepositRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } -}; - - -/** - * optional int64 id = 1; - * @return {number} - */ -proto.protocol.ConfirmDepositRequest.prototype.getId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.ConfirmDepositRequest} returns this - */ -proto.protocol.ConfirmDepositRequest.prototype.setId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.ConfirmDepositResponse.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.ConfirmDepositResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.ConfirmDepositResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.ConfirmDepositResponse.toObject = function(includeInstance, msg) { - var f, obj = { - response: (f = msg.getResponse()) && proto.protocol.Response.toObject(includeInstance, f), - successChannelState: (f = msg.getSuccessChannelState()) && protos_ledger_ledger_pb.SignedChannelState.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.ConfirmDepositResponse} - */ -proto.protocol.ConfirmDepositResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.ConfirmDepositResponse; - return proto.protocol.ConfirmDepositResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.ConfirmDepositResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.ConfirmDepositResponse} - */ -proto.protocol.ConfirmDepositResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.protocol.Response; - reader.readMessage(value,proto.protocol.Response.deserializeBinaryFromReader); - msg.setResponse(value); - break; - case 2: - var value = new protos_ledger_ledger_pb.SignedChannelState; - reader.readMessage(value,protos_ledger_ledger_pb.SignedChannelState.deserializeBinaryFromReader); - msg.setSuccessChannelState(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.ConfirmDepositResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.ConfirmDepositResponse.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.ConfirmDepositResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.ConfirmDepositResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getResponse(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.protocol.Response.serializeBinaryToWriter - ); - } - f = message.getSuccessChannelState(); - if (f != null) { - writer.writeMessage( - 2, - f, - protos_ledger_ledger_pb.SignedChannelState.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Response response = 1; - * @return {?proto.protocol.Response} - */ -proto.protocol.ConfirmDepositResponse.prototype.getResponse = function() { - return /** @type{?proto.protocol.Response} */ ( - jspb.Message.getWrapperField(this, proto.protocol.Response, 1)); -}; - - -/** - * @param {?proto.protocol.Response|undefined} value - * @return {!proto.protocol.ConfirmDepositResponse} returns this -*/ -proto.protocol.ConfirmDepositResponse.prototype.setResponse = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.ConfirmDepositResponse} returns this - */ -proto.protocol.ConfirmDepositResponse.prototype.clearResponse = function() { - return this.setResponse(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.ConfirmDepositResponse.prototype.hasResponse = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional ledger.SignedChannelState success_channel_state = 2; - * @return {?proto.ledger.SignedChannelState} - */ -proto.protocol.ConfirmDepositResponse.prototype.getSuccessChannelState = function() { - return /** @type{?proto.ledger.SignedChannelState} */ ( - jspb.Message.getWrapperField(this, protos_ledger_ledger_pb.SignedChannelState, 2)); -}; - - -/** - * @param {?proto.ledger.SignedChannelState|undefined} value - * @return {!proto.protocol.ConfirmDepositResponse} returns this -*/ -proto.protocol.ConfirmDepositResponse.prototype.setSuccessChannelState = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.ConfirmDepositResponse} returns this - */ -proto.protocol.ConfirmDepositResponse.prototype.clearSuccessChannelState = function() { - return this.setSuccessChannelState(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.ConfirmDepositResponse.prototype.hasSuccessChannelState = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.QueryTransactionRequest.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.QueryTransactionRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.QueryTransactionRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.QueryTransactionRequest.toObject = function(includeInstance, msg) { - var f, obj = { - id: 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.QueryTransactionRequest} - */ -proto.protocol.QueryTransactionRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.QueryTransactionRequest; - return proto.protocol.QueryTransactionRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.QueryTransactionRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.QueryTransactionRequest} - */ -proto.protocol.QueryTransactionRequest.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.setId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.QueryTransactionRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.QueryTransactionRequest.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.QueryTransactionRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.QueryTransactionRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } -}; - - -/** - * optional int64 id = 1; - * @return {number} - */ -proto.protocol.QueryTransactionRequest.prototype.getId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.QueryTransactionRequest} returns this - */ -proto.protocol.QueryTransactionRequest.prototype.setId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.QueryTransactionResponse.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.QueryTransactionResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.QueryTransactionResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.QueryTransactionResponse.toObject = function(includeInstance, msg) { - var f, obj = { - response: (f = msg.getResponse()) && proto.protocol.Response.toObject(includeInstance, f), - type: msg.getType_asB64(), - amount: jspb.Message.getFieldWithDefault(msg, 3, 0), - tokenName: msg.getTokenName_asB64(), - userAddress: msg.getUserAddress_asB64(), - tronStatus: msg.getTronStatus_asB64(), - channelStatus: msg.getChannelStatus_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.QueryTransactionResponse} - */ -proto.protocol.QueryTransactionResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.QueryTransactionResponse; - return proto.protocol.QueryTransactionResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.QueryTransactionResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.QueryTransactionResponse} - */ -proto.protocol.QueryTransactionResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.protocol.Response; - reader.readMessage(value,proto.protocol.Response.deserializeBinaryFromReader); - msg.setResponse(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setType(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTokenName(value); - break; - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setUserAddress(value); - break; - case 6: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTronStatus(value); - break; - case 7: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setChannelStatus(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.QueryTransactionResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.QueryTransactionResponse.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.QueryTransactionResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.QueryTransactionResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getResponse(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.protocol.Response.serializeBinaryToWriter - ); - } - f = message.getType_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getTokenName_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getUserAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 5, - f - ); - } - f = message.getTronStatus_asU8(); - if (f.length > 0) { - writer.writeBytes( - 6, - f - ); - } - f = message.getChannelStatus_asU8(); - if (f.length > 0) { - writer.writeBytes( - 7, - f - ); - } -}; - - -/** - * optional Response response = 1; - * @return {?proto.protocol.Response} - */ -proto.protocol.QueryTransactionResponse.prototype.getResponse = function() { - return /** @type{?proto.protocol.Response} */ ( - jspb.Message.getWrapperField(this, proto.protocol.Response, 1)); -}; - - -/** - * @param {?proto.protocol.Response|undefined} value - * @return {!proto.protocol.QueryTransactionResponse} returns this -*/ -proto.protocol.QueryTransactionResponse.prototype.setResponse = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.QueryTransactionResponse} returns this - */ -proto.protocol.QueryTransactionResponse.prototype.clearResponse = function() { - return this.setResponse(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.QueryTransactionResponse.prototype.hasResponse = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes type = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.QueryTransactionResponse.prototype.getType = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes type = 2; - * This is a type-conversion wrapper around `getType()` - * @return {string} - */ -proto.protocol.QueryTransactionResponse.prototype.getType_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getType())); -}; - - -/** - * optional bytes type = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getType()` - * @return {!Uint8Array} - */ -proto.protocol.QueryTransactionResponse.prototype.getType_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getType())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.QueryTransactionResponse} returns this - */ -proto.protocol.QueryTransactionResponse.prototype.setType = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional int64 amount = 3; - * @return {number} - */ -proto.protocol.QueryTransactionResponse.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.QueryTransactionResponse} returns this - */ -proto.protocol.QueryTransactionResponse.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional bytes token_name = 4; - * @return {!(string|Uint8Array)} - */ -proto.protocol.QueryTransactionResponse.prototype.getTokenName = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes token_name = 4; - * This is a type-conversion wrapper around `getTokenName()` - * @return {string} - */ -proto.protocol.QueryTransactionResponse.prototype.getTokenName_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTokenName())); -}; - - -/** - * optional bytes token_name = 4; - * 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.QueryTransactionResponse.prototype.getTokenName_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTokenName())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.QueryTransactionResponse} returns this - */ -proto.protocol.QueryTransactionResponse.prototype.setTokenName = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional bytes user_address = 5; - * @return {!(string|Uint8Array)} - */ -proto.protocol.QueryTransactionResponse.prototype.getUserAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * optional bytes user_address = 5; - * This is a type-conversion wrapper around `getUserAddress()` - * @return {string} - */ -proto.protocol.QueryTransactionResponse.prototype.getUserAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getUserAddress())); -}; - - -/** - * optional bytes user_address = 5; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getUserAddress()` - * @return {!Uint8Array} - */ -proto.protocol.QueryTransactionResponse.prototype.getUserAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getUserAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.QueryTransactionResponse} returns this - */ -proto.protocol.QueryTransactionResponse.prototype.setUserAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); -}; - - -/** - * optional bytes tron_status = 6; - * @return {!(string|Uint8Array)} - */ -proto.protocol.QueryTransactionResponse.prototype.getTronStatus = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * optional bytes tron_status = 6; - * This is a type-conversion wrapper around `getTronStatus()` - * @return {string} - */ -proto.protocol.QueryTransactionResponse.prototype.getTronStatus_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTronStatus())); -}; - - -/** - * optional bytes tron_status = 6; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTronStatus()` - * @return {!Uint8Array} - */ -proto.protocol.QueryTransactionResponse.prototype.getTronStatus_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTronStatus())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.QueryTransactionResponse} returns this - */ -proto.protocol.QueryTransactionResponse.prototype.setTronStatus = function(value) { - return jspb.Message.setProto3BytesField(this, 6, value); -}; - - -/** - * optional bytes channel_status = 7; - * @return {!(string|Uint8Array)} - */ -proto.protocol.QueryTransactionResponse.prototype.getChannelStatus = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * optional bytes channel_status = 7; - * This is a type-conversion wrapper around `getChannelStatus()` - * @return {string} - */ -proto.protocol.QueryTransactionResponse.prototype.getChannelStatus_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getChannelStatus())); -}; - - -/** - * optional bytes channel_status = 7; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getChannelStatus()` - * @return {!Uint8Array} - */ -proto.protocol.QueryTransactionResponse.prototype.getChannelStatus_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getChannelStatus())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.QueryTransactionResponse} returns this - */ -proto.protocol.QueryTransactionResponse.prototype.setChannelStatus = function(value) { - return jspb.Message.setProto3BytesField(this, 7, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.ActivateAccountRequest.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.ActivateAccountRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.ActivateAccountRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.ActivateAccountRequest.toObject = function(includeInstance, msg) { - var f, obj = { - address: msg.getAddress_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.ActivateAccountRequest} - */ -proto.protocol.ActivateAccountRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.ActivateAccountRequest; - return proto.protocol.ActivateAccountRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.ActivateAccountRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.ActivateAccountRequest} - */ -proto.protocol.ActivateAccountRequest.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; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.ActivateAccountRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.ActivateAccountRequest.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.ActivateAccountRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.ActivateAccountRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.ActivateAccountRequest.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.ActivateAccountRequest.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.ActivateAccountRequest.prototype.getAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.ActivateAccountRequest} returns this - */ -proto.protocol.ActivateAccountRequest.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.ActivateAccountResponse.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.ActivateAccountResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.ActivateAccountResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.ActivateAccountResponse.toObject = function(includeInstance, msg) { - var f, obj = { - response: (f = msg.getResponse()) && proto.protocol.Response.toObject(includeInstance, f), - txid: 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.ActivateAccountResponse} - */ -proto.protocol.ActivateAccountResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.ActivateAccountResponse; - return proto.protocol.ActivateAccountResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.ActivateAccountResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.ActivateAccountResponse} - */ -proto.protocol.ActivateAccountResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.protocol.Response; - reader.readMessage(value,proto.protocol.Response.deserializeBinaryFromReader); - msg.setResponse(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setTxid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.ActivateAccountResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.ActivateAccountResponse.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.ActivateAccountResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.ActivateAccountResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getResponse(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.protocol.Response.serializeBinaryToWriter - ); - } - f = message.getTxid(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional Response response = 1; - * @return {?proto.protocol.Response} - */ -proto.protocol.ActivateAccountResponse.prototype.getResponse = function() { - return /** @type{?proto.protocol.Response} */ ( - jspb.Message.getWrapperField(this, proto.protocol.Response, 1)); -}; - - -/** - * @param {?proto.protocol.Response|undefined} value - * @return {!proto.protocol.ActivateAccountResponse} returns this -*/ -proto.protocol.ActivateAccountResponse.prototype.setResponse = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.ActivateAccountResponse} returns this - */ -proto.protocol.ActivateAccountResponse.prototype.clearResponse = function() { - return this.setResponse(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.ActivateAccountResponse.prototype.hasResponse = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string txId = 2; - * @return {string} - */ -proto.protocol.ActivateAccountResponse.prototype.getTxid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.protocol.ActivateAccountResponse} returns this - */ -proto.protocol.ActivateAccountResponse.prototype.setTxid = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.Response.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Response.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.Response} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Response.toObject = function(includeInstance, msg) { - var f, obj = { - code: jspb.Message.getFieldWithDefault(msg, 1, 0), - returnMessage: msg.getReturnMessage_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.Response} - */ -proto.protocol.Response.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Response; - return proto.protocol.Response.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.Response} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Response} - */ -proto.protocol.Response.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.protocol.Response.return_code} */ (reader.readEnum()); - msg.setCode(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setReturnMessage(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.Response.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.Response.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.Response} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Response.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getCode(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getReturnMessage_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * @enum {number} - */ -proto.protocol.Response.return_code = { - SUCCESS: 0, - AMOUNT_ILLEGAL: 1, - REMOTE_CALL_ERROR: 2, - INACTIVATED_ACCOUNT: 3, - TRON_BALANCE_INSUFFICIENT: 4, - CHANNEL_CLOSED: 5, - CHANNEL_ADDRESS_ILLEGAL: 6, - REQUEST_PARAM_ILLEGAL: 7, - TRANSFER_ADDRESS_FAILED: 8, - SIGN_FAILED: 9, - MARSHAL_FAILED: 10, - DATABASE_ERROR: 11, - TRANSACTION_EXIST: 12, - BROADCAST_ERROR: 13, - HASH_FAILED: 14, - USER_TRON_BALANCE_INSUFFICIENT: 15, - LEDGER_BALANCE_INSUFFICIENT: 16, - TRANSACTION_NOT_EXIST: 17, - TRANSACTION_STATUS_ILLEGAL: 18, - UNMARSHAL_FAILED: 19, - TRANSACTION_FAILED: 20, - TRANSACTION_PENDING: 21, - DECODE_STRING_FAILED: 22, - TRANSACTION_TYPE_ILLEGAL: 23, - IP_ACCESS_DENIED: 24, - ADDRESS_ACCESS_DENIED: 25, - OTHER_ERROR: 99 -}; - -/** - * optional return_code code = 1; - * @return {!proto.protocol.Response.return_code} - */ -proto.protocol.Response.prototype.getCode = function() { - return /** @type {!proto.protocol.Response.return_code} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.protocol.Response.return_code} value - * @return {!proto.protocol.Response} returns this - */ -proto.protocol.Response.prototype.setCode = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional bytes return_message = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Response.prototype.getReturnMessage = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes return_message = 2; - * This is a type-conversion wrapper around `getReturnMessage()` - * @return {string} - */ -proto.protocol.Response.prototype.getReturnMessage_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getReturnMessage())); -}; - - -/** - * optional bytes return_message = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getReturnMessage()` - * @return {!Uint8Array} - */ -proto.protocol.Response.prototype.getReturnMessage_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getReturnMessage())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Response} returns this - */ -proto.protocol.Response.prototype.setReturnMessage = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.TronTransaction.repeatedFields_ = [2,5]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.TronTransaction.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.TronTransaction.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.TronTransaction} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.TronTransaction.toObject = function(includeInstance, msg) { - var f, obj = { - rawData: (f = msg.getRawData()) && proto.protocol.TronTransaction.TronRaw.toObject(includeInstance, f), - signatureList: msg.getSignatureList_asB64(), - retList: jspb.Message.toObjectList(msg.getRetList(), - proto.protocol.TronTransaction.TronResult.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.TronTransaction} - */ -proto.protocol.TronTransaction.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.TronTransaction; - return proto.protocol.TronTransaction.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.TronTransaction} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.TronTransaction} - */ -proto.protocol.TronTransaction.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.protocol.TronTransaction.TronRaw; - reader.readMessage(value,proto.protocol.TronTransaction.TronRaw.deserializeBinaryFromReader); - msg.setRawData(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addSignature(value); - break; - case 5: - var value = new proto.protocol.TronTransaction.TronResult; - reader.readMessage(value,proto.protocol.TronTransaction.TronResult.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.TronTransaction.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.TronTransaction.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.TronTransaction} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.TronTransaction.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRawData(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.protocol.TronTransaction.TronRaw.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.TronTransaction.TronResult.serializeBinaryToWriter - ); - } -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.TronTransaction.TronContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.TronTransaction.TronContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.TronTransaction.TronContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.TronTransaction.TronContract.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.TronTransaction.TronContract} - */ -proto.protocol.TronTransaction.TronContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.TronTransaction.TronContract; - return proto.protocol.TronTransaction.TronContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.TronTransaction.TronContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.TronTransaction.TronContract} - */ -proto.protocol.TronTransaction.TronContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.protocol.TronTransaction.TronContract.TronContractType} */ (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.TronTransaction.TronContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.TronTransaction.TronContract.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.TronTransaction.TronContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.TronTransaction.TronContract.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 - ); - } -}; - - -/** - * @enum {number} - */ -proto.protocol.TronTransaction.TronContract.TronContractType = { - 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, - UPDATEENERGYLIMITCONTRACT: 45 -}; - -/** - * optional TronContractType type = 1; - * @return {!proto.protocol.TronTransaction.TronContract.TronContractType} - */ -proto.protocol.TronTransaction.TronContract.prototype.getType = function() { - return /** @type {!proto.protocol.TronTransaction.TronContract.TronContractType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.protocol.TronTransaction.TronContract.TronContractType} value - * @return {!proto.protocol.TronTransaction.TronContract} returns this - */ -proto.protocol.TronTransaction.TronContract.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional google.protobuf.Any parameter = 2; - * @return {?proto.google.protobuf.Any} - */ -proto.protocol.TronTransaction.TronContract.prototype.getParameter = function() { - return /** @type{?proto.google.protobuf.Any} */ ( - jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 2)); -}; - - -/** - * @param {?proto.google.protobuf.Any|undefined} value - * @return {!proto.protocol.TronTransaction.TronContract} returns this -*/ -proto.protocol.TronTransaction.TronContract.prototype.setParameter = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.TronTransaction.TronContract} returns this - */ -proto.protocol.TronTransaction.TronContract.prototype.clearParameter = function() { - return this.setParameter(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.TronTransaction.TronContract.prototype.hasParameter = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional bytes provider = 3; - * @return {!(string|Uint8Array)} - */ -proto.protocol.TronTransaction.TronContract.prototype.getProvider = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes provider = 3; - * This is a type-conversion wrapper around `getProvider()` - * @return {string} - */ -proto.protocol.TronTransaction.TronContract.prototype.getProvider_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getProvider())); -}; - - -/** - * 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} - */ -proto.protocol.TronTransaction.TronContract.prototype.getProvider_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getProvider())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.TronTransaction.TronContract} returns this - */ -proto.protocol.TronTransaction.TronContract.prototype.setProvider = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional bytes ContractName = 4; - * @return {!(string|Uint8Array)} - */ -proto.protocol.TronTransaction.TronContract.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.TronTransaction.TronContract.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.TronTransaction.TronContract.prototype.getContractname_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getContractname())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.TronTransaction.TronContract} returns this - */ -proto.protocol.TronTransaction.TronContract.prototype.setContractname = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.TronTransaction.TronResult.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.TronTransaction.TronResult.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.TronTransaction.TronResult} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.TronTransaction.TronResult.toObject = function(includeInstance, msg) { - var f, obj = { - 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) - }; - - 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.TronTransaction.TronResult} - */ -proto.protocol.TronTransaction.TronResult.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.TronTransaction.TronResult; - return proto.protocol.TronTransaction.TronResult.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.TronTransaction.TronResult} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.TronTransaction.TronResult} - */ -proto.protocol.TronTransaction.TronResult.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.setFee(value); - break; - case 2: - var value = /** @type {!proto.protocol.TronTransaction.TronResult.TronCode} */ (reader.readEnum()); - msg.setRet(value); - break; - case 3: - var value = /** @type {!proto.protocol.TronTransaction.TronResult.TronContractResult} */ (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); - break; - case 16: - 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; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.TronTransaction.TronResult.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.TronTransaction.TronResult.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.TronTransaction.TronResult} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.TronTransaction.TronResult.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFee(); - if (f !== 0) { - writer.writeInt64( - 1, - 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.getAssetissueid(); - if (f.length > 0) { - writer.writeString( - 14, - f - ); - } - f = message.getWithdrawAmount(); - if (f !== 0) { - writer.writeInt64( - 15, - f - ); - } - f = message.getUnfreezeAmount(); - if (f !== 0) { - writer.writeInt64( - 16, - 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 - ); - } -}; - - -/** - * @enum {number} - */ -proto.protocol.TronTransaction.TronResult.TronCode = { - SUCESS: 0, - FAILED: 1 -}; - -/** - * @enum {number} - */ -proto.protocol.TronTransaction.TronResult.TronContractResult = { - 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 -}; - -/** - * optional int64 fee = 1; - * @return {number} - */ -proto.protocol.TronTransaction.TronResult.prototype.getFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.TronTransaction.TronResult} returns this - */ -proto.protocol.TronTransaction.TronResult.prototype.setFee = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional TronCode ret = 2; - * @return {!proto.protocol.TronTransaction.TronResult.TronCode} - */ -proto.protocol.TronTransaction.TronResult.prototype.getRet = function() { - return /** @type {!proto.protocol.TronTransaction.TronResult.TronCode} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.protocol.TronTransaction.TronResult.TronCode} value - * @return {!proto.protocol.TronTransaction.TronResult} returns this - */ -proto.protocol.TronTransaction.TronResult.prototype.setRet = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - -/** - * optional TronContractResult contractRet = 3; - * @return {!proto.protocol.TronTransaction.TronResult.TronContractResult} - */ -proto.protocol.TronTransaction.TronResult.prototype.getContractret = function() { - return /** @type {!proto.protocol.TronTransaction.TronResult.TronContractResult} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {!proto.protocol.TronTransaction.TronResult.TronContractResult} value - * @return {!proto.protocol.TronTransaction.TronResult} returns this - */ -proto.protocol.TronTransaction.TronResult.prototype.setContractret = function(value) { - return jspb.Message.setProto3EnumField(this, 3, value); -}; - - -/** - * optional string assetIssueID = 14; - * @return {string} - */ -proto.protocol.TronTransaction.TronResult.prototype.getAssetissueid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "")); -}; - - -/** - * @param {string} value - * @return {!proto.protocol.TronTransaction.TronResult} returns this - */ -proto.protocol.TronTransaction.TronResult.prototype.setAssetissueid = function(value) { - return jspb.Message.setProto3StringField(this, 14, value); -}; - - -/** - * optional int64 withdraw_amount = 15; - * @return {number} - */ -proto.protocol.TronTransaction.TronResult.prototype.getWithdrawAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.TronTransaction.TronResult} returns this - */ -proto.protocol.TronTransaction.TronResult.prototype.setWithdrawAmount = function(value) { - return jspb.Message.setProto3IntField(this, 15, value); -}; - - -/** - * optional int64 unfreeze_amount = 16; - * @return {number} - */ -proto.protocol.TronTransaction.TronResult.prototype.getUnfreezeAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.TronTransaction.TronResult} returns this - */ -proto.protocol.TronTransaction.TronResult.prototype.setUnfreezeAmount = function(value) { - return jspb.Message.setProto3IntField(this, 16, value); -}; - - -/** - * optional int64 exchange_received_amount = 18; - * @return {number} - */ -proto.protocol.TronTransaction.TronResult.prototype.getExchangeReceivedAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 18, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.TronTransaction.TronResult} returns this - */ -proto.protocol.TronTransaction.TronResult.prototype.setExchangeReceivedAmount = function(value) { - return jspb.Message.setProto3IntField(this, 18, value); -}; - - -/** - * optional int64 exchange_inject_another_amount = 19; - * @return {number} - */ -proto.protocol.TronTransaction.TronResult.prototype.getExchangeInjectAnotherAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.TronTransaction.TronResult} returns this - */ -proto.protocol.TronTransaction.TronResult.prototype.setExchangeInjectAnotherAmount = function(value) { - return jspb.Message.setProto3IntField(this, 19, value); -}; - - -/** - * optional int64 exchange_withdraw_another_amount = 20; - * @return {number} - */ -proto.protocol.TronTransaction.TronResult.prototype.getExchangeWithdrawAnotherAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.TronTransaction.TronResult} returns this - */ -proto.protocol.TronTransaction.TronResult.prototype.setExchangeWithdrawAnotherAmount = function(value) { - return jspb.Message.setProto3IntField(this, 20, value); -}; - - -/** - * optional int64 exchange_id = 21; - * @return {number} - */ -proto.protocol.TronTransaction.TronResult.prototype.getExchangeId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.TronTransaction.TronResult} returns this - */ -proto.protocol.TronTransaction.TronResult.prototype.setExchangeId = function(value) { - return jspb.Message.setProto3IntField(this, 21, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.TronTransaction.TronRaw.repeatedFields_ = [9,11]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.TronTransaction.TronRaw.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.TronTransaction.TronRaw.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.TronTransaction.TronRaw} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.TronTransaction.TronRaw.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.TronAuthority.toObject, includeInstance), - data: msg.getData_asB64(), - contractList: jspb.Message.toObjectList(msg.getContractList(), - proto.protocol.TronTransaction.TronContract.toObject, includeInstance), - scripts: msg.getScripts_asB64(), - timestamp: jspb.Message.getFieldWithDefault(msg, 14, 0), - feeLimit: jspb.Message.getFieldWithDefault(msg, 18, 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.TronTransaction.TronRaw} - */ -proto.protocol.TronTransaction.TronRaw.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.TronTransaction.TronRaw; - return proto.protocol.TronTransaction.TronRaw.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.TronTransaction.TronRaw} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.TronTransaction.TronRaw} - */ -proto.protocol.TronTransaction.TronRaw.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.setRefBlockBytes(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); - break; - case 8: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExpiration(value); - break; - case 9: - var value = new proto.protocol.TronAuthority; - reader.readMessage(value,proto.protocol.TronAuthority.deserializeBinaryFromReader); - msg.addAuths(value); - break; - case 10: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setData(value); - break; - case 11: - var value = new proto.protocol.TronTransaction.TronContract; - reader.readMessage(value,proto.protocol.TronTransaction.TronContract.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.setTimestamp(value); - break; - case 18: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFeeLimit(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.TronTransaction.TronRaw.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.TronTransaction.TronRaw.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.TronTransaction.TronRaw} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.TronTransaction.TronRaw.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRefBlockBytes_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getRefBlockNum(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getRefBlockHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getExpiration(); - if (f !== 0) { - writer.writeInt64( - 8, - f - ); - } - f = message.getAuthsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 9, - f, - proto.protocol.TronAuthority.serializeBinaryToWriter - ); - } - f = message.getData_asU8(); - if (f.length > 0) { - writer.writeBytes( - 10, - f - ); - } - f = message.getContractList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 11, - f, - proto.protocol.TronTransaction.TronContract.serializeBinaryToWriter - ); - } - f = message.getScripts_asU8(); - if (f.length > 0) { - writer.writeBytes( - 12, - f - ); - } - f = message.getTimestamp(); - if (f !== 0) { - writer.writeInt64( - 14, - f - ); - } - f = message.getFeeLimit(); - if (f !== 0) { - writer.writeInt64( - 18, - f - ); - } -}; - - -/** - * optional bytes ref_block_bytes = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.TronTransaction.TronRaw.prototype.getRefBlockBytes = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes ref_block_bytes = 1; - * This is a type-conversion wrapper around `getRefBlockBytes()` - * @return {string} - */ -proto.protocol.TronTransaction.TronRaw.prototype.getRefBlockBytes_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRefBlockBytes())); -}; - - -/** - * 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 `getRefBlockBytes()` - * @return {!Uint8Array} - */ -proto.protocol.TronTransaction.TronRaw.prototype.getRefBlockBytes_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRefBlockBytes())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.TronTransaction.TronRaw} returns this - */ -proto.protocol.TronTransaction.TronRaw.prototype.setRefBlockBytes = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int64 ref_block_num = 3; - * @return {number} - */ -proto.protocol.TronTransaction.TronRaw.prototype.getRefBlockNum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.TronTransaction.TronRaw} returns this - */ -proto.protocol.TronTransaction.TronRaw.prototype.setRefBlockNum = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional bytes ref_block_hash = 4; - * @return {!(string|Uint8Array)} - */ -proto.protocol.TronTransaction.TronRaw.prototype.getRefBlockHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes ref_block_hash = 4; - * This is a type-conversion wrapper around `getRefBlockHash()` - * @return {string} - */ -proto.protocol.TronTransaction.TronRaw.prototype.getRefBlockHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRefBlockHash())); -}; - - -/** - * 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 `getRefBlockHash()` - * @return {!Uint8Array} - */ -proto.protocol.TronTransaction.TronRaw.prototype.getRefBlockHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRefBlockHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.TronTransaction.TronRaw} returns this - */ -proto.protocol.TronTransaction.TronRaw.prototype.setRefBlockHash = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional int64 expiration = 8; - * @return {number} - */ -proto.protocol.TronTransaction.TronRaw.prototype.getExpiration = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.TronTransaction.TronRaw} returns this - */ -proto.protocol.TronTransaction.TronRaw.prototype.setExpiration = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * repeated TronAuthority auths = 9; - * @return {!Array} - */ -proto.protocol.TronTransaction.TronRaw.prototype.getAuthsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.TronAuthority, 9)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.TronTransaction.TronRaw} returns this -*/ -proto.protocol.TronTransaction.TronRaw.prototype.setAuthsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 9, value); -}; - - -/** - * @param {!proto.protocol.TronAuthority=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.TronAuthority} - */ -proto.protocol.TronTransaction.TronRaw.prototype.addAuths = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.protocol.TronAuthority, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.TronTransaction.TronRaw} returns this - */ -proto.protocol.TronTransaction.TronRaw.prototype.clearAuthsList = function() { - return this.setAuthsList([]); -}; - - -/** - * optional bytes data = 10; - * @return {!(string|Uint8Array)} - */ -proto.protocol.TronTransaction.TronRaw.prototype.getData = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, "")); -}; - - -/** - * optional bytes data = 10; - * This is a type-conversion wrapper around `getData()` - * @return {string} - */ -proto.protocol.TronTransaction.TronRaw.prototype.getData_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getData())); -}; - - -/** - * 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.TronTransaction.TronRaw.prototype.getData_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getData())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.TronTransaction.TronRaw} returns this - */ -proto.protocol.TronTransaction.TronRaw.prototype.setData = function(value) { - return jspb.Message.setProto3BytesField(this, 10, value); -}; - - -/** - * repeated TronContract contract = 11; - * @return {!Array} - */ -proto.protocol.TronTransaction.TronRaw.prototype.getContractList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.TronTransaction.TronContract, 11)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.TronTransaction.TronRaw} returns this -*/ -proto.protocol.TronTransaction.TronRaw.prototype.setContractList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 11, value); -}; - - -/** - * @param {!proto.protocol.TronTransaction.TronContract=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.TronTransaction.TronContract} - */ -proto.protocol.TronTransaction.TronRaw.prototype.addContract = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.protocol.TronTransaction.TronContract, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.TronTransaction.TronRaw} returns this - */ -proto.protocol.TronTransaction.TronRaw.prototype.clearContractList = function() { - return this.setContractList([]); -}; - - -/** - * optional bytes scripts = 12; - * @return {!(string|Uint8Array)} - */ -proto.protocol.TronTransaction.TronRaw.prototype.getScripts = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 12, "")); -}; - - -/** - * optional bytes scripts = 12; - * This is a type-conversion wrapper around `getScripts()` - * @return {string} - */ -proto.protocol.TronTransaction.TronRaw.prototype.getScripts_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getScripts())); -}; - - -/** - * 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} - */ -proto.protocol.TronTransaction.TronRaw.prototype.getScripts_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getScripts())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.TronTransaction.TronRaw} returns this - */ -proto.protocol.TronTransaction.TronRaw.prototype.setScripts = function(value) { - return jspb.Message.setProto3BytesField(this, 12, value); -}; - - -/** - * optional int64 timestamp = 14; - * @return {number} - */ -proto.protocol.TronTransaction.TronRaw.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.TronTransaction.TronRaw} returns this - */ -proto.protocol.TronTransaction.TronRaw.prototype.setTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 14, value); -}; - - -/** - * optional int64 fee_limit = 18; - * @return {number} - */ -proto.protocol.TronTransaction.TronRaw.prototype.getFeeLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 18, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.TronTransaction.TronRaw} returns this - */ -proto.protocol.TronTransaction.TronRaw.prototype.setFeeLimit = function(value) { - return jspb.Message.setProto3IntField(this, 18, value); -}; - - -/** - * optional TronRaw raw_data = 1; - * @return {?proto.protocol.TronTransaction.TronRaw} - */ -proto.protocol.TronTransaction.prototype.getRawData = function() { - return /** @type{?proto.protocol.TronTransaction.TronRaw} */ ( - jspb.Message.getWrapperField(this, proto.protocol.TronTransaction.TronRaw, 1)); -}; - - -/** - * @param {?proto.protocol.TronTransaction.TronRaw|undefined} value - * @return {!proto.protocol.TronTransaction} returns this -*/ -proto.protocol.TronTransaction.prototype.setRawData = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.TronTransaction} returns this - */ -proto.protocol.TronTransaction.prototype.clearRawData = function() { - return this.setRawData(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.TronTransaction.prototype.hasRawData = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * repeated bytes signature = 2; - * @return {!(Array|Array)} - */ -proto.protocol.TronTransaction.prototype.getSignatureList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 2)); -}; - - -/** - * repeated bytes signature = 2; - * This is a type-conversion wrapper around `getSignatureList()` - * @return {!Array} - */ -proto.protocol.TronTransaction.prototype.getSignatureList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getSignatureList())); -}; - - -/** - * 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.TronTransaction.prototype.getSignatureList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getSignatureList())); -}; - - -/** - * @param {!(Array|Array)} value - * @return {!proto.protocol.TronTransaction} returns this - */ -proto.protocol.TronTransaction.prototype.setSignatureList = function(value) { - return jspb.Message.setField(this, 2, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.protocol.TronTransaction} returns this - */ -proto.protocol.TronTransaction.prototype.addSignature = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.TronTransaction} returns this - */ -proto.protocol.TronTransaction.prototype.clearSignatureList = function() { - return this.setSignatureList([]); -}; - - -/** - * repeated TronResult ret = 5; - * @return {!Array} - */ -proto.protocol.TronTransaction.prototype.getRetList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.TronTransaction.TronResult, 5)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.TronTransaction} returns this -*/ -proto.protocol.TronTransaction.prototype.setRetList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 5, value); -}; - - -/** - * @param {!proto.protocol.TronTransaction.TronResult=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.TronTransaction.TronResult} - */ -proto.protocol.TronTransaction.prototype.addRet = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.protocol.TronTransaction.TronResult, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.TronTransaction} returns this - */ -proto.protocol.TronTransaction.prototype.clearRetList = function() { - return this.setRetList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.TronAuthority.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.TronAuthority.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.TronAuthority} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.TronAuthority.toObject = function(includeInstance, msg) { - var f, obj = { - account: (f = msg.getAccount()) && proto.protocol.TronAccountId.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.TronAuthority} - */ -proto.protocol.TronAuthority.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.TronAuthority; - return proto.protocol.TronAuthority.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.TronAuthority} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.TronAuthority} - */ -proto.protocol.TronAuthority.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.protocol.TronAccountId; - reader.readMessage(value,proto.protocol.TronAccountId.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.TronAuthority.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.TronAuthority.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.TronAuthority} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.TronAuthority.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAccount(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.protocol.TronAccountId.serializeBinaryToWriter - ); - } - f = message.getPermissionName_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional TronAccountId account = 1; - * @return {?proto.protocol.TronAccountId} - */ -proto.protocol.TronAuthority.prototype.getAccount = function() { - return /** @type{?proto.protocol.TronAccountId} */ ( - jspb.Message.getWrapperField(this, proto.protocol.TronAccountId, 1)); -}; - - -/** - * @param {?proto.protocol.TronAccountId|undefined} value - * @return {!proto.protocol.TronAuthority} returns this -*/ -proto.protocol.TronAuthority.prototype.setAccount = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.TronAuthority} returns this - */ -proto.protocol.TronAuthority.prototype.clearAccount = function() { - return this.setAccount(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.TronAuthority.prototype.hasAccount = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes permission_name = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.TronAuthority.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.TronAuthority.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.TronAuthority.prototype.getPermissionName_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPermissionName())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.TronAuthority} returns this - */ -proto.protocol.TronAuthority.prototype.setPermissionName = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.TronAccountId.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.TronAccountId.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.TronAccountId} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.TronAccountId.toObject = function(includeInstance, msg) { - var f, obj = { - name: msg.getName_asB64(), - address: msg.getAddress_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.TronAccountId} - */ -proto.protocol.TronAccountId.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.TronAccountId; - return proto.protocol.TronAccountId.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.TronAccountId} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.TronAccountId} - */ -proto.protocol.TronAccountId.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.setName(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.TronAccountId.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.TronAccountId.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.TronAccountId} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.TronAccountId.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getName_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional bytes name = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.TronAccountId.prototype.getName = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes name = 1; - * This is a type-conversion wrapper around `getName()` - * @return {string} - */ -proto.protocol.TronAccountId.prototype.getName_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getName())); -}; - - -/** - * optional bytes name = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getName()` - * @return {!Uint8Array} - */ -proto.protocol.TronAccountId.prototype.getName_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getName())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.TronAccountId} returns this - */ -proto.protocol.TronAccountId.prototype.setName = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes address = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.TronAccountId.prototype.getAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes address = 2; - * This is a type-conversion wrapper around `getAddress()` - * @return {string} - */ -proto.protocol.TronAccountId.prototype.getAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAddress())); -}; - - -/** - * optional bytes address = 2; - * 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.TronAccountId.prototype.getAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.TronAccountId} returns this - */ -proto.protocol.TronAccountId.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -goog.object.extend(exports, proto.protocol); diff --git a/js/protos/exchange/exchange_pb.js b/js/protos/exchange/exchange_pb.js deleted file mode 100644 index 1584951..0000000 --- a/js/protos/exchange/exchange_pb.js +++ /dev/null @@ -1,16 +0,0 @@ -// source: protos/exchange/exchange.proto -/** - * @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 protos_exchange_exchange_message_pb = require('../../protos/exchange/exchange_message_pb.js'); -goog.object.extend(proto, protos_exchange_exchange_message_pb); diff --git a/js/protos/guard/guard_admin_pb.js b/js/protos/guard/guard_admin_pb.js deleted file mode 100644 index 6c2ca02..0000000 --- a/js/protos/guard/guard_admin_pb.js +++ /dev/null @@ -1,1744 +0,0 @@ -// source: protos/guard/guard_admin.proto -/** - * @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 github_com_tron$us_protobuf_gogoproto_gogo_pb = require('../../github.com/tron-us/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_tron$us_protobuf_gogoproto_gogo_pb); -var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); -goog.object.extend(proto, google_protobuf_timestamp_pb); -var protos_guard_guard_pb = require('../../protos/guard/guard_pb.js'); -goog.object.extend(proto, protos_guard_guard_pb); -goog.exportSymbol('proto.guard.AuthenticateRequest', null, global); -goog.exportSymbol('proto.guard.K8sRepairNodesRequest', null, global); -goog.exportSymbol('proto.guard.RepairNodeDesc', null, global); -goog.exportSymbol('proto.guard.RepairNodeDesc.NodeType', null, global); -goog.exportSymbol('proto.guard.RepairNodeDescRequest', null, global); -goog.exportSymbol('proto.guard.RepairNodesResponse', 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.guard.K8sRepairNodesRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.guard.K8sRepairNodesRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.K8sRepairNodesRequest.displayName = 'proto.guard.K8sRepairNodesRequest'; -} -/** - * 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.guard.RepairNodeDesc = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.guard.RepairNodeDesc, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.RepairNodeDesc.displayName = 'proto.guard.RepairNodeDesc'; -} -/** - * 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.guard.RepairNodeDescRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.guard.RepairNodeDescRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.RepairNodeDescRequest.displayName = 'proto.guard.RepairNodeDescRequest'; -} -/** - * 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.guard.AuthenticateRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.guard.AuthenticateRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.AuthenticateRequest.displayName = 'proto.guard.AuthenticateRequest'; -} -/** - * 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.guard.RepairNodesResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.guard.RepairNodesResponse.repeatedFields_, null); -}; -goog.inherits(proto.guard.RepairNodesResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.RepairNodesResponse.displayName = 'proto.guard.RepairNodesResponse'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.K8sRepairNodesRequest.prototype.toObject = function(opt_includeInstance) { - return proto.guard.K8sRepairNodesRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.K8sRepairNodesRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.K8sRepairNodesRequest.toObject = function(includeInstance, msg) { - var f, obj = { - region: jspb.Message.getFieldWithDefault(msg, 1, ""), - country: jspb.Message.getFieldWithDefault(msg, 2, ""), - namespace: jspb.Message.getFieldWithDefault(msg, 3, ""), - label: jspb.Message.getFieldWithDefault(msg, 4, ""), - servicePrefix: jspb.Message.getFieldWithDefault(msg, 5, ""), - hostnameSuffix: jspb.Message.getFieldWithDefault(msg, 6, ""), - requesterPid: jspb.Message.getFieldWithDefault(msg, 7, ""), - requestTime: (f = msg.getRequestTime()) && google_protobuf_timestamp_pb.Timestamp.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.guard.K8sRepairNodesRequest} - */ -proto.guard.K8sRepairNodesRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.K8sRepairNodesRequest; - return proto.guard.K8sRepairNodesRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.K8sRepairNodesRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.K8sRepairNodesRequest} - */ -proto.guard.K8sRepairNodesRequest.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.setRegion(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setCountry(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setNamespace(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setLabel(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setServicePrefix(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setHostnameSuffix(value); - break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setRequesterPid(value); - break; - case 8: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setRequestTime(value); - break; - case 9: - 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.guard.K8sRepairNodesRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.K8sRepairNodesRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.K8sRepairNodesRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.K8sRepairNodesRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRegion(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getCountry(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getNamespace(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getLabel(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getServicePrefix(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getHostnameSuffix(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } - f = message.getRequesterPid(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } - f = message.getRequestTime(); - if (f != null) { - writer.writeMessage( - 8, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 9, - f - ); - } -}; - - -/** - * optional string region = 1; - * @return {string} - */ -proto.guard.K8sRepairNodesRequest.prototype.getRegion = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.K8sRepairNodesRequest} returns this - */ -proto.guard.K8sRepairNodesRequest.prototype.setRegion = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string country = 2; - * @return {string} - */ -proto.guard.K8sRepairNodesRequest.prototype.getCountry = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.K8sRepairNodesRequest} returns this - */ -proto.guard.K8sRepairNodesRequest.prototype.setCountry = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string namespace = 3; - * @return {string} - */ -proto.guard.K8sRepairNodesRequest.prototype.getNamespace = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.K8sRepairNodesRequest} returns this - */ -proto.guard.K8sRepairNodesRequest.prototype.setNamespace = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string label = 4; - * @return {string} - */ -proto.guard.K8sRepairNodesRequest.prototype.getLabel = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.K8sRepairNodesRequest} returns this - */ -proto.guard.K8sRepairNodesRequest.prototype.setLabel = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional string service_prefix = 5; - * @return {string} - */ -proto.guard.K8sRepairNodesRequest.prototype.getServicePrefix = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.K8sRepairNodesRequest} returns this - */ -proto.guard.K8sRepairNodesRequest.prototype.setServicePrefix = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * optional string hostname_suffix = 6; - * @return {string} - */ -proto.guard.K8sRepairNodesRequest.prototype.getHostnameSuffix = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.K8sRepairNodesRequest} returns this - */ -proto.guard.K8sRepairNodesRequest.prototype.setHostnameSuffix = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); -}; - - -/** - * optional string requester_pid = 7; - * @return {string} - */ -proto.guard.K8sRepairNodesRequest.prototype.getRequesterPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.K8sRepairNodesRequest} returns this - */ -proto.guard.K8sRepairNodesRequest.prototype.setRequesterPid = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); -}; - - -/** - * optional google.protobuf.Timestamp request_time = 8; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.K8sRepairNodesRequest.prototype.getRequestTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 8)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.K8sRepairNodesRequest} returns this -*/ -proto.guard.K8sRepairNodesRequest.prototype.setRequestTime = function(value) { - return jspb.Message.setWrapperField(this, 8, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.K8sRepairNodesRequest} returns this - */ -proto.guard.K8sRepairNodesRequest.prototype.clearRequestTime = function() { - return this.setRequestTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.K8sRepairNodesRequest.prototype.hasRequestTime = function() { - return jspb.Message.getField(this, 8) != null; -}; - - -/** - * optional bytes signature = 9; - * @return {!(string|Uint8Array)} - */ -proto.guard.K8sRepairNodesRequest.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, "")); -}; - - -/** - * optional bytes signature = 9; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.guard.K8sRepairNodesRequest.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 9; - * 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.guard.K8sRepairNodesRequest.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.K8sRepairNodesRequest} returns this - */ -proto.guard.K8sRepairNodesRequest.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 9, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.RepairNodeDesc.prototype.toObject = function(opt_includeInstance) { - return proto.guard.RepairNodeDesc.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.RepairNodeDesc} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.RepairNodeDesc.toObject = function(includeInstance, msg) { - var f, obj = { - region: jspb.Message.getFieldWithDefault(msg, 1, ""), - country: jspb.Message.getFieldWithDefault(msg, 2, ""), - latitude: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0), - longitude: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0), - hostAddress: jspb.Message.getFieldWithDefault(msg, 5, ""), - name: jspb.Message.getFieldWithDefault(msg, 6, ""), - version: jspb.Message.getFieldWithDefault(msg, 7, ""), - type: jspb.Message.getFieldWithDefault(msg, 8, 0), - isActive: jspb.Message.getBooleanFieldWithDefault(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.guard.RepairNodeDesc} - */ -proto.guard.RepairNodeDesc.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.RepairNodeDesc; - return proto.guard.RepairNodeDesc.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.RepairNodeDesc} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.RepairNodeDesc} - */ -proto.guard.RepairNodeDesc.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.setRegion(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setCountry(value); - break; - case 3: - var value = /** @type {number} */ (reader.readFloat()); - msg.setLatitude(value); - break; - case 4: - var value = /** @type {number} */ (reader.readFloat()); - msg.setLongitude(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setHostAddress(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setVersion(value); - break; - case 8: - var value = /** @type {!proto.guard.RepairNodeDesc.NodeType} */ (reader.readEnum()); - msg.setType(value); - break; - case 9: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsActive(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.guard.RepairNodeDesc.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.RepairNodeDesc.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.RepairNodeDesc} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.RepairNodeDesc.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRegion(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getCountry(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getLatitude(); - if (f !== 0.0) { - writer.writeFloat( - 3, - f - ); - } - f = message.getLongitude(); - if (f !== 0.0) { - writer.writeFloat( - 4, - f - ); - } - f = message.getHostAddress(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } - f = message.getVersion(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 8, - f - ); - } - f = message.getIsActive(); - if (f) { - writer.writeBool( - 9, - f - ); - } -}; - - -/** - * @enum {number} - */ -proto.guard.RepairNodeDesc.NodeType = { - SINGLE_NODE: 0, - KUBERNETES: 1, - DOCKER: 2, - VM: 3, - OTHER: 4 -}; - -/** - * optional string region = 1; - * @return {string} - */ -proto.guard.RepairNodeDesc.prototype.getRegion = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.RepairNodeDesc} returns this - */ -proto.guard.RepairNodeDesc.prototype.setRegion = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string country = 2; - * @return {string} - */ -proto.guard.RepairNodeDesc.prototype.getCountry = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.RepairNodeDesc} returns this - */ -proto.guard.RepairNodeDesc.prototype.setCountry = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional float latitude = 3; - * @return {number} - */ -proto.guard.RepairNodeDesc.prototype.getLatitude = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.RepairNodeDesc} returns this - */ -proto.guard.RepairNodeDesc.prototype.setLatitude = function(value) { - return jspb.Message.setProto3FloatField(this, 3, value); -}; - - -/** - * optional float longitude = 4; - * @return {number} - */ -proto.guard.RepairNodeDesc.prototype.getLongitude = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.RepairNodeDesc} returns this - */ -proto.guard.RepairNodeDesc.prototype.setLongitude = function(value) { - return jspb.Message.setProto3FloatField(this, 4, value); -}; - - -/** - * optional string host_address = 5; - * @return {string} - */ -proto.guard.RepairNodeDesc.prototype.getHostAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.RepairNodeDesc} returns this - */ -proto.guard.RepairNodeDesc.prototype.setHostAddress = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * optional string name = 6; - * @return {string} - */ -proto.guard.RepairNodeDesc.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.RepairNodeDesc} returns this - */ -proto.guard.RepairNodeDesc.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); -}; - - -/** - * optional string version = 7; - * @return {string} - */ -proto.guard.RepairNodeDesc.prototype.getVersion = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.RepairNodeDesc} returns this - */ -proto.guard.RepairNodeDesc.prototype.setVersion = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); -}; - - -/** - * optional NodeType type = 8; - * @return {!proto.guard.RepairNodeDesc.NodeType} - */ -proto.guard.RepairNodeDesc.prototype.getType = function() { - return /** @type {!proto.guard.RepairNodeDesc.NodeType} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {!proto.guard.RepairNodeDesc.NodeType} value - * @return {!proto.guard.RepairNodeDesc} returns this - */ -proto.guard.RepairNodeDesc.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 8, value); -}; - - -/** - * optional bool is_active = 9; - * @return {boolean} - */ -proto.guard.RepairNodeDesc.prototype.getIsActive = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.guard.RepairNodeDesc} returns this - */ -proto.guard.RepairNodeDesc.prototype.setIsActive = function(value) { - return jspb.Message.setProto3BooleanField(this, 9, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.RepairNodeDescRequest.prototype.toObject = function(opt_includeInstance) { - return proto.guard.RepairNodeDescRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.RepairNodeDescRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.RepairNodeDescRequest.toObject = function(includeInstance, msg) { - var f, obj = { - node: (f = msg.getNode()) && proto.guard.RepairNodeDesc.toObject(includeInstance, f), - requesterPid: jspb.Message.getFieldWithDefault(msg, 2, ""), - requestTime: (f = msg.getRequestTime()) && google_protobuf_timestamp_pb.Timestamp.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.guard.RepairNodeDescRequest} - */ -proto.guard.RepairNodeDescRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.RepairNodeDescRequest; - return proto.guard.RepairNodeDescRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.RepairNodeDescRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.RepairNodeDescRequest} - */ -proto.guard.RepairNodeDescRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.guard.RepairNodeDesc; - reader.readMessage(value,proto.guard.RepairNodeDesc.deserializeBinaryFromReader); - msg.setNode(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setRequesterPid(value); - break; - case 3: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setRequestTime(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.guard.RepairNodeDescRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.RepairNodeDescRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.RepairNodeDescRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.RepairNodeDescRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNode(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.guard.RepairNodeDesc.serializeBinaryToWriter - ); - } - f = message.getRequesterPid(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getRequestTime(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } -}; - - -/** - * optional RepairNodeDesc node = 1; - * @return {?proto.guard.RepairNodeDesc} - */ -proto.guard.RepairNodeDescRequest.prototype.getNode = function() { - return /** @type{?proto.guard.RepairNodeDesc} */ ( - jspb.Message.getWrapperField(this, proto.guard.RepairNodeDesc, 1)); -}; - - -/** - * @param {?proto.guard.RepairNodeDesc|undefined} value - * @return {!proto.guard.RepairNodeDescRequest} returns this -*/ -proto.guard.RepairNodeDescRequest.prototype.setNode = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.RepairNodeDescRequest} returns this - */ -proto.guard.RepairNodeDescRequest.prototype.clearNode = function() { - return this.setNode(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.RepairNodeDescRequest.prototype.hasNode = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string requester_pid = 2; - * @return {string} - */ -proto.guard.RepairNodeDescRequest.prototype.getRequesterPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.RepairNodeDescRequest} returns this - */ -proto.guard.RepairNodeDescRequest.prototype.setRequesterPid = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional google.protobuf.Timestamp request_time = 3; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.RepairNodeDescRequest.prototype.getRequestTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.RepairNodeDescRequest} returns this -*/ -proto.guard.RepairNodeDescRequest.prototype.setRequestTime = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.RepairNodeDescRequest} returns this - */ -proto.guard.RepairNodeDescRequest.prototype.clearRequestTime = function() { - return this.setRequestTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.RepairNodeDescRequest.prototype.hasRequestTime = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional bytes signature = 4; - * @return {!(string|Uint8Array)} - */ -proto.guard.RepairNodeDescRequest.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.guard.RepairNodeDescRequest.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.guard.RepairNodeDescRequest.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.RepairNodeDescRequest} returns this - */ -proto.guard.RepairNodeDescRequest.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.AuthenticateRequest.prototype.toObject = function(opt_includeInstance) { - return proto.guard.AuthenticateRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.AuthenticateRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.AuthenticateRequest.toObject = function(includeInstance, msg) { - var f, obj = { - requesterPid: jspb.Message.getFieldWithDefault(msg, 1, ""), - requestTime: (f = msg.getRequestTime()) && google_protobuf_timestamp_pb.Timestamp.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.guard.AuthenticateRequest} - */ -proto.guard.AuthenticateRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.AuthenticateRequest; - return proto.guard.AuthenticateRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.AuthenticateRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.AuthenticateRequest} - */ -proto.guard.AuthenticateRequest.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.setRequesterPid(value); - break; - case 2: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setRequestTime(value); - break; - case 3: - 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.guard.AuthenticateRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.AuthenticateRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.AuthenticateRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.AuthenticateRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRequesterPid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getRequestTime(); - if (f != null) { - writer.writeMessage( - 2, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } -}; - - -/** - * optional string requester_pid = 1; - * @return {string} - */ -proto.guard.AuthenticateRequest.prototype.getRequesterPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.AuthenticateRequest} returns this - */ -proto.guard.AuthenticateRequest.prototype.setRequesterPid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional google.protobuf.Timestamp request_time = 2; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.AuthenticateRequest.prototype.getRequestTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.AuthenticateRequest} returns this -*/ -proto.guard.AuthenticateRequest.prototype.setRequestTime = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.AuthenticateRequest} returns this - */ -proto.guard.AuthenticateRequest.prototype.clearRequestTime = function() { - return this.setRequestTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.AuthenticateRequest.prototype.hasRequestTime = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional bytes signature = 3; - * @return {!(string|Uint8Array)} - */ -proto.guard.AuthenticateRequest.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes signature = 3; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.guard.AuthenticateRequest.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 3; - * 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.guard.AuthenticateRequest.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.AuthenticateRequest} returns this - */ -proto.guard.AuthenticateRequest.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.guard.RepairNodesResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.RepairNodesResponse.prototype.toObject = function(opt_includeInstance) { - return proto.guard.RepairNodesResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.RepairNodesResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.RepairNodesResponse.toObject = function(includeInstance, msg) { - var f, obj = { - nodesList: jspb.Message.toObjectList(msg.getNodesList(), - proto.guard.RepairNodeDesc.toObject, includeInstance), - generatePid: jspb.Message.getFieldWithDefault(msg, 2, ""), - generateTime: (f = msg.getGenerateTime()) && google_protobuf_timestamp_pb.Timestamp.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.guard.RepairNodesResponse} - */ -proto.guard.RepairNodesResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.RepairNodesResponse; - return proto.guard.RepairNodesResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.RepairNodesResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.RepairNodesResponse} - */ -proto.guard.RepairNodesResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.guard.RepairNodeDesc; - reader.readMessage(value,proto.guard.RepairNodeDesc.deserializeBinaryFromReader); - msg.addNodes(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setGeneratePid(value); - break; - case 3: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setGenerateTime(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.guard.RepairNodesResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.RepairNodesResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.RepairNodesResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.RepairNodesResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNodesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.guard.RepairNodeDesc.serializeBinaryToWriter - ); - } - f = message.getGeneratePid(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getGenerateTime(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } -}; - - -/** - * repeated RepairNodeDesc nodes = 1; - * @return {!Array} - */ -proto.guard.RepairNodesResponse.prototype.getNodesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.guard.RepairNodeDesc, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.guard.RepairNodesResponse} returns this -*/ -proto.guard.RepairNodesResponse.prototype.setNodesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.guard.RepairNodeDesc=} opt_value - * @param {number=} opt_index - * @return {!proto.guard.RepairNodeDesc} - */ -proto.guard.RepairNodesResponse.prototype.addNodes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.guard.RepairNodeDesc, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.guard.RepairNodesResponse} returns this - */ -proto.guard.RepairNodesResponse.prototype.clearNodesList = function() { - return this.setNodesList([]); -}; - - -/** - * optional string generate_pid = 2; - * @return {string} - */ -proto.guard.RepairNodesResponse.prototype.getGeneratePid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.RepairNodesResponse} returns this - */ -proto.guard.RepairNodesResponse.prototype.setGeneratePid = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional google.protobuf.Timestamp generate_time = 3; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.RepairNodesResponse.prototype.getGenerateTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.RepairNodesResponse} returns this -*/ -proto.guard.RepairNodesResponse.prototype.setGenerateTime = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.RepairNodesResponse} returns this - */ -proto.guard.RepairNodesResponse.prototype.clearGenerateTime = function() { - return this.setGenerateTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.RepairNodesResponse.prototype.hasGenerateTime = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional bytes signature = 4; - * @return {!(string|Uint8Array)} - */ -proto.guard.RepairNodesResponse.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.guard.RepairNodesResponse.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.guard.RepairNodesResponse.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.RepairNodesResponse} returns this - */ -proto.guard.RepairNodesResponse.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -goog.object.extend(exports, proto.guard); diff --git a/js/protos/guard/guard_pb.js b/js/protos/guard/guard_pb.js deleted file mode 100644 index d5ce094..0000000 --- a/js/protos/guard/guard_pb.js +++ /dev/null @@ -1,13910 +0,0 @@ -// source: protos/guard/guard.proto -/** - * @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 github_com_tron$us_protobuf_gogoproto_gogo_pb = require('../../github.com/tron-us/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_tron$us_protobuf_gogoproto_gogo_pb); -var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); -goog.object.extend(proto, google_protobuf_timestamp_pb); -goog.exportSymbol('proto.guard.AdminQuery', null, global); -goog.exportSymbol('proto.guard.CancelContractRequest', null, global); -goog.exportSymbol('proto.guard.CancelContractRequest.CancelReason', null, global); -goog.exportSymbol('proto.guard.ChallengeJobRequest', null, global); -goog.exportSymbol('proto.guard.ChallengeJobResponse', null, global); -goog.exportSymbol('proto.guard.ChallengeJobResult', null, global); -goog.exportSymbol('proto.guard.ChallengeQuestion', null, global); -goog.exportSymbol('proto.guard.CheckFileStoreMetaRequest', null, global); -goog.exportSymbol('proto.guard.Contract', null, global); -goog.exportSymbol('proto.guard.Contract.ContractState', null, global); -goog.exportSymbol('proto.guard.ContractMeta', null, global); -goog.exportSymbol('proto.guard.ContractMeta.Schedule', null, global); -goog.exportSymbol('proto.guard.ContractsList', null, global); -goog.exportSymbol('proto.guard.DailySummary', null, global); -goog.exportSymbol('proto.guard.DeCentralQuestions', null, global); -goog.exportSymbol('proto.guard.DeQuestion', null, global); -goog.exportSymbol('proto.guard.FileChallengeQuestions', null, global); -goog.exportSymbol('proto.guard.FileStoreListResponse', null, global); -goog.exportSymbol('proto.guard.FileStoreMeta', null, global); -goog.exportSymbol('proto.guard.FileStoreStatus', null, global); -goog.exportSymbol('proto.guard.FileStoreStatus.MetaState', null, global); -goog.exportSymbol('proto.guard.FileStoreStatus.RentalState', null, global); -goog.exportSymbol('proto.guard.ForceRepairRequest', null, global); -goog.exportSymbol('proto.guard.HostStatus', null, global); -goog.exportSymbol('proto.guard.HostSummary', null, global); -goog.exportSymbol('proto.guard.ListHostContractsRequest', null, global); -goog.exportSymbol('proto.guard.ListHostContractsRequest.SelectState', null, global); -goog.exportSymbol('proto.guard.ListRenterFileInfoRequest', null, global); -goog.exportSymbol('proto.guard.Log', null, global); -goog.exportSymbol('proto.guard.ProofOfReplicateChallenge', null, global); -goog.exportSymbol('proto.guard.ReadyForChallengeRequest', null, global); -goog.exportSymbol('proto.guard.RepairContract', null, global); -goog.exportSymbol('proto.guard.RepairContractResponse', null, global); -goog.exportSymbol('proto.guard.RepairContractResponse.ContractResponseStatus', null, global); -goog.exportSymbol('proto.guard.RequestChallengeQuestion', null, global); -goog.exportSymbol('proto.guard.RequestRepairContracts', null, global); -goog.exportSymbol('proto.guard.ResponseChallengeQuestion', null, global); -goog.exportSymbol('proto.guard.ResponseCode', null, global); -goog.exportSymbol('proto.guard.ResponseRepairContracts', null, global); -goog.exportSymbol('proto.guard.ResponseRepairContracts.RepairStat', null, global); -goog.exportSymbol('proto.guard.Result', null, global); -goog.exportSymbol('proto.guard.ShardChallengeQuestions', null, global); -goog.exportSymbol('proto.guard.ShardChallengeResult', null, global); -goog.exportSymbol('proto.guard.TotalStateSummary', 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.guard.AdminQuery = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.guard.AdminQuery, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.AdminQuery.displayName = 'proto.guard.AdminQuery'; -} -/** - * 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.guard.DailySummary = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.guard.DailySummary, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.DailySummary.displayName = 'proto.guard.DailySummary'; -} -/** - * 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.guard.HostSummary = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.guard.HostSummary.repeatedFields_, null); -}; -goog.inherits(proto.guard.HostSummary, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.HostSummary.displayName = 'proto.guard.HostSummary'; -} -/** - * 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.guard.TotalStateSummary = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.guard.TotalStateSummary, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.TotalStateSummary.displayName = 'proto.guard.TotalStateSummary'; -} -/** - * 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.guard.HostStatus = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.guard.HostStatus, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.HostStatus.displayName = 'proto.guard.HostStatus'; -} -/** - * 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.guard.Log = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.guard.Log, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.Log.displayName = 'proto.guard.Log'; -} -/** - * 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.guard.ContractMeta = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.guard.ContractMeta, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.ContractMeta.displayName = 'proto.guard.ContractMeta'; -} -/** - * 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.guard.Contract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.guard.Contract.repeatedFields_, null); -}; -goog.inherits(proto.guard.Contract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.Contract.displayName = 'proto.guard.Contract'; -} -/** - * 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.guard.FileStoreListResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.guard.FileStoreListResponse.repeatedFields_, null); -}; -goog.inherits(proto.guard.FileStoreListResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.FileStoreListResponse.displayName = 'proto.guard.FileStoreListResponse'; -} -/** - * 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.guard.FileStoreMeta = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.guard.FileStoreMeta, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.FileStoreMeta.displayName = 'proto.guard.FileStoreMeta'; -} -/** - * 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.guard.FileStoreStatus = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.guard.FileStoreStatus.repeatedFields_, null); -}; -goog.inherits(proto.guard.FileStoreStatus, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.FileStoreStatus.displayName = 'proto.guard.FileStoreStatus'; -} -/** - * 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.guard.ChallengeQuestion = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.guard.ChallengeQuestion, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.ChallengeQuestion.displayName = 'proto.guard.ChallengeQuestion'; -} -/** - * 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.guard.ProofOfReplicateChallenge = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.guard.ProofOfReplicateChallenge, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.ProofOfReplicateChallenge.displayName = 'proto.guard.ProofOfReplicateChallenge'; -} -/** - * 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.guard.FileChallengeQuestions = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.guard.FileChallengeQuestions.repeatedFields_, null); -}; -goog.inherits(proto.guard.FileChallengeQuestions, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.FileChallengeQuestions.displayName = 'proto.guard.FileChallengeQuestions'; -} -/** - * 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.guard.ShardChallengeQuestions = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.guard.ShardChallengeQuestions.repeatedFields_, null); -}; -goog.inherits(proto.guard.ShardChallengeQuestions, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.ShardChallengeQuestions.displayName = 'proto.guard.ShardChallengeQuestions'; -} -/** - * 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.guard.CheckFileStoreMetaRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.guard.CheckFileStoreMetaRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.CheckFileStoreMetaRequest.displayName = 'proto.guard.CheckFileStoreMetaRequest'; -} -/** - * 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.guard.ListRenterFileInfoRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.guard.ListRenterFileInfoRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.ListRenterFileInfoRequest.displayName = 'proto.guard.ListRenterFileInfoRequest'; -} -/** - * 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.guard.ListHostContractsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.guard.ListHostContractsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.ListHostContractsRequest.displayName = 'proto.guard.ListHostContractsRequest'; -} -/** - * 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.guard.ContractsList = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.guard.ContractsList.repeatedFields_, null); -}; -goog.inherits(proto.guard.ContractsList, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.ContractsList.displayName = 'proto.guard.ContractsList'; -} -/** - * 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.guard.ReadyForChallengeRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.guard.ReadyForChallengeRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.ReadyForChallengeRequest.displayName = 'proto.guard.ReadyForChallengeRequest'; -} -/** - * 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.guard.RequestChallengeQuestion = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.guard.RequestChallengeQuestion, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.RequestChallengeQuestion.displayName = 'proto.guard.RequestChallengeQuestion'; -} -/** - * 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.guard.ResponseChallengeQuestion = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.guard.ResponseChallengeQuestion, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.ResponseChallengeQuestion.displayName = 'proto.guard.ResponseChallengeQuestion'; -} -/** - * 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.guard.ForceRepairRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.guard.ForceRepairRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.ForceRepairRequest.displayName = 'proto.guard.ForceRepairRequest'; -} -/** - * 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.guard.Result = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.guard.Result, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.Result.displayName = 'proto.guard.Result'; -} -/** - * 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.guard.RepairContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.guard.RepairContract.repeatedFields_, null); -}; -goog.inherits(proto.guard.RepairContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.RepairContract.displayName = 'proto.guard.RepairContract'; -} -/** - * 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.guard.RepairContractResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.guard.RepairContractResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.RepairContractResponse.displayName = 'proto.guard.RepairContractResponse'; -} -/** - * 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.guard.RequestRepairContracts = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.guard.RequestRepairContracts, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.RequestRepairContracts.displayName = 'proto.guard.RequestRepairContracts'; -} -/** - * 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.guard.ResponseRepairContracts = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.guard.ResponseRepairContracts, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.ResponseRepairContracts.displayName = 'proto.guard.ResponseRepairContracts'; -} -/** - * 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.guard.CancelContractRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.guard.CancelContractRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.CancelContractRequest.displayName = 'proto.guard.CancelContractRequest'; -} -/** - * 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.guard.ChallengeJobRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.guard.ChallengeJobRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.ChallengeJobRequest.displayName = 'proto.guard.ChallengeJobRequest'; -} -/** - * 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.guard.ChallengeJobResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.guard.ChallengeJobResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.ChallengeJobResponse.displayName = 'proto.guard.ChallengeJobResponse'; -} -/** - * 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.guard.ChallengeJobResult = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.guard.ChallengeJobResult.repeatedFields_, null); -}; -goog.inherits(proto.guard.ChallengeJobResult, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.ChallengeJobResult.displayName = 'proto.guard.ChallengeJobResult'; -} -/** - * 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.guard.ShardChallengeResult = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.guard.ShardChallengeResult, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.ShardChallengeResult.displayName = 'proto.guard.ShardChallengeResult'; -} -/** - * 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.guard.DeCentralQuestions = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.guard.DeCentralQuestions.repeatedFields_, null); -}; -goog.inherits(proto.guard.DeCentralQuestions, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.DeCentralQuestions.displayName = 'proto.guard.DeCentralQuestions'; -} -/** - * 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.guard.DeQuestion = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.guard.DeQuestion, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.guard.DeQuestion.displayName = 'proto.guard.DeQuestion'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.AdminQuery.prototype.toObject = function(opt_includeInstance) { - return proto.guard.AdminQuery.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.AdminQuery} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.AdminQuery.toObject = function(includeInstance, msg) { - var f, obj = { - requesterPid: jspb.Message.getFieldWithDefault(msg, 1, ""), - queryDate: (f = msg.getQueryDate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - queryCount: jspb.Message.getFieldWithDefault(msg, 3, 0), - requestTime: (f = msg.getRequestTime()) && google_protobuf_timestamp_pb.Timestamp.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.guard.AdminQuery} - */ -proto.guard.AdminQuery.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.AdminQuery; - return proto.guard.AdminQuery.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.AdminQuery} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.AdminQuery} - */ -proto.guard.AdminQuery.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.setRequesterPid(value); - break; - case 2: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setQueryDate(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt32()); - msg.setQueryCount(value); - break; - case 4: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setRequestTime(value); - break; - case 5: - 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.guard.AdminQuery.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.AdminQuery.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.AdminQuery} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.AdminQuery.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRequesterPid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getQueryDate(); - if (f != null) { - writer.writeMessage( - 2, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getQueryCount(); - if (f !== 0) { - writer.writeInt32( - 3, - f - ); - } - f = message.getRequestTime(); - if (f != null) { - writer.writeMessage( - 4, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 5, - f - ); - } -}; - - -/** - * optional string requester_pid = 1; - * @return {string} - */ -proto.guard.AdminQuery.prototype.getRequesterPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.AdminQuery} returns this - */ -proto.guard.AdminQuery.prototype.setRequesterPid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional google.protobuf.Timestamp query_date = 2; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.AdminQuery.prototype.getQueryDate = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.AdminQuery} returns this -*/ -proto.guard.AdminQuery.prototype.setQueryDate = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.AdminQuery} returns this - */ -proto.guard.AdminQuery.prototype.clearQueryDate = function() { - return this.setQueryDate(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.AdminQuery.prototype.hasQueryDate = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional int32 query_count = 3; - * @return {number} - */ -proto.guard.AdminQuery.prototype.getQueryCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.AdminQuery} returns this - */ -proto.guard.AdminQuery.prototype.setQueryCount = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional google.protobuf.Timestamp request_time = 4; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.AdminQuery.prototype.getRequestTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.AdminQuery} returns this -*/ -proto.guard.AdminQuery.prototype.setRequestTime = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.AdminQuery} returns this - */ -proto.guard.AdminQuery.prototype.clearRequestTime = function() { - return this.setRequestTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.AdminQuery.prototype.hasRequestTime = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional bytes signature = 5; - * @return {!(string|Uint8Array)} - */ -proto.guard.AdminQuery.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * optional bytes signature = 5; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.guard.AdminQuery.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 5; - * 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.guard.AdminQuery.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.AdminQuery} returns this - */ -proto.guard.AdminQuery.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.DailySummary.prototype.toObject = function(opt_includeInstance) { - return proto.guard.DailySummary.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.DailySummary} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.DailySummary.toObject = function(includeInstance, msg) { - var f, obj = { - queryDate: (f = msg.getQueryDate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - responseTime: (f = msg.getResponseTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - preparerPid: jspb.Message.getFieldWithDefault(msg, 3, ""), - signature: msg.getSignature_asB64(), - workingStorageSize: jspb.Message.getFieldWithDefault(msg, 5, 0), - newContracts: jspb.Message.getFieldWithDefault(msg, 6, 0), - newContractsHost: jspb.Message.getFieldWithDefault(msg, 7, 0), - newContractsRenter: jspb.Message.getFieldWithDefault(msg, 8, 0), - newContractsAveragePrice: jspb.Message.getFieldWithDefault(msg, 9, 0), - newFiles: jspb.Message.getFieldWithDefault(msg, 10, 0), - newShardsSize: jspb.Message.getFieldWithDefault(msg, 11, 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.guard.DailySummary} - */ -proto.guard.DailySummary.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.DailySummary; - return proto.guard.DailySummary.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.DailySummary} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.DailySummary} - */ -proto.guard.DailySummary.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setQueryDate(value); - break; - case 2: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setResponseTime(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setPreparerPid(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSignature(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setWorkingStorageSize(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setNewContracts(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setNewContractsHost(value); - break; - case 8: - var value = /** @type {number} */ (reader.readInt64()); - msg.setNewContractsRenter(value); - break; - case 9: - var value = /** @type {number} */ (reader.readInt64()); - msg.setNewContractsAveragePrice(value); - break; - case 10: - var value = /** @type {number} */ (reader.readInt64()); - msg.setNewFiles(value); - break; - case 11: - var value = /** @type {number} */ (reader.readInt64()); - msg.setNewShardsSize(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.guard.DailySummary.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.DailySummary.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.DailySummary} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.DailySummary.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getQueryDate(); - if (f != null) { - writer.writeMessage( - 1, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getResponseTime(); - if (f != null) { - writer.writeMessage( - 2, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getPreparerPid(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getWorkingStorageSize(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getNewContracts(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getNewContractsHost(); - if (f !== 0) { - writer.writeInt64( - 7, - f - ); - } - f = message.getNewContractsRenter(); - if (f !== 0) { - writer.writeInt64( - 8, - f - ); - } - f = message.getNewContractsAveragePrice(); - if (f !== 0) { - writer.writeInt64( - 9, - f - ); - } - f = message.getNewFiles(); - if (f !== 0) { - writer.writeInt64( - 10, - f - ); - } - f = message.getNewShardsSize(); - if (f !== 0) { - writer.writeInt64( - 11, - f - ); - } -}; - - -/** - * optional google.protobuf.Timestamp query_date = 1; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.DailySummary.prototype.getQueryDate = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.DailySummary} returns this -*/ -proto.guard.DailySummary.prototype.setQueryDate = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.DailySummary} returns this - */ -proto.guard.DailySummary.prototype.clearQueryDate = function() { - return this.setQueryDate(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.DailySummary.prototype.hasQueryDate = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional google.protobuf.Timestamp response_time = 2; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.DailySummary.prototype.getResponseTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.DailySummary} returns this -*/ -proto.guard.DailySummary.prototype.setResponseTime = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.DailySummary} returns this - */ -proto.guard.DailySummary.prototype.clearResponseTime = function() { - return this.setResponseTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.DailySummary.prototype.hasResponseTime = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional string preparer_pid = 3; - * @return {string} - */ -proto.guard.DailySummary.prototype.getPreparerPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.DailySummary} returns this - */ -proto.guard.DailySummary.prototype.setPreparerPid = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional bytes signature = 4; - * @return {!(string|Uint8Array)} - */ -proto.guard.DailySummary.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.guard.DailySummary.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.guard.DailySummary.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.DailySummary} returns this - */ -proto.guard.DailySummary.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional int64 working_storage_size = 5; - * @return {number} - */ -proto.guard.DailySummary.prototype.getWorkingStorageSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.DailySummary} returns this - */ -proto.guard.DailySummary.prototype.setWorkingStorageSize = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 new_contracts = 6; - * @return {number} - */ -proto.guard.DailySummary.prototype.getNewContracts = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.DailySummary} returns this - */ -proto.guard.DailySummary.prototype.setNewContracts = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional int64 new_contracts_host = 7; - * @return {number} - */ -proto.guard.DailySummary.prototype.getNewContractsHost = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.DailySummary} returns this - */ -proto.guard.DailySummary.prototype.setNewContractsHost = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional int64 new_contracts_renter = 8; - * @return {number} - */ -proto.guard.DailySummary.prototype.getNewContractsRenter = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.DailySummary} returns this - */ -proto.guard.DailySummary.prototype.setNewContractsRenter = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional int64 new_contracts_average_price = 9; - * @return {number} - */ -proto.guard.DailySummary.prototype.getNewContractsAveragePrice = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.DailySummary} returns this - */ -proto.guard.DailySummary.prototype.setNewContractsAveragePrice = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * optional int64 new_files = 10; - * @return {number} - */ -proto.guard.DailySummary.prototype.getNewFiles = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.DailySummary} returns this - */ -proto.guard.DailySummary.prototype.setNewFiles = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); -}; - - -/** - * optional int64 new_shards_size = 11; - * @return {number} - */ -proto.guard.DailySummary.prototype.getNewShardsSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.DailySummary} returns this - */ -proto.guard.DailySummary.prototype.setNewShardsSize = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.guard.HostSummary.repeatedFields_ = [6]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.HostSummary.prototype.toObject = function(opt_includeInstance) { - return proto.guard.HostSummary.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.HostSummary} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.HostSummary.toObject = function(includeInstance, msg) { - var f, obj = { - queryDate: (f = msg.getQueryDate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - responseTime: (f = msg.getResponseTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - preparerPid: jspb.Message.getFieldWithDefault(msg, 3, ""), - signature: msg.getSignature_asB64(), - recordCount: jspb.Message.getFieldWithDefault(msg, 5, 0), - statusList: jspb.Message.toObjectList(msg.getStatusList(), - proto.guard.HostStatus.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.guard.HostSummary} - */ -proto.guard.HostSummary.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.HostSummary; - return proto.guard.HostSummary.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.HostSummary} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.HostSummary} - */ -proto.guard.HostSummary.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setQueryDate(value); - break; - case 2: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setResponseTime(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setPreparerPid(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSignature(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt32()); - msg.setRecordCount(value); - break; - case 6: - var value = new proto.guard.HostStatus; - reader.readMessage(value,proto.guard.HostStatus.deserializeBinaryFromReader); - msg.addStatus(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.guard.HostSummary.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.HostSummary.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.HostSummary} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.HostSummary.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getQueryDate(); - if (f != null) { - writer.writeMessage( - 1, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getResponseTime(); - if (f != null) { - writer.writeMessage( - 2, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getPreparerPid(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getRecordCount(); - if (f !== 0) { - writer.writeInt32( - 5, - f - ); - } - f = message.getStatusList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 6, - f, - proto.guard.HostStatus.serializeBinaryToWriter - ); - } -}; - - -/** - * optional google.protobuf.Timestamp query_date = 1; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.HostSummary.prototype.getQueryDate = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.HostSummary} returns this -*/ -proto.guard.HostSummary.prototype.setQueryDate = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.HostSummary} returns this - */ -proto.guard.HostSummary.prototype.clearQueryDate = function() { - return this.setQueryDate(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.HostSummary.prototype.hasQueryDate = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional google.protobuf.Timestamp response_time = 2; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.HostSummary.prototype.getResponseTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.HostSummary} returns this -*/ -proto.guard.HostSummary.prototype.setResponseTime = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.HostSummary} returns this - */ -proto.guard.HostSummary.prototype.clearResponseTime = function() { - return this.setResponseTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.HostSummary.prototype.hasResponseTime = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional string preparer_pid = 3; - * @return {string} - */ -proto.guard.HostSummary.prototype.getPreparerPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.HostSummary} returns this - */ -proto.guard.HostSummary.prototype.setPreparerPid = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional bytes signature = 4; - * @return {!(string|Uint8Array)} - */ -proto.guard.HostSummary.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.guard.HostSummary.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.guard.HostSummary.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.HostSummary} returns this - */ -proto.guard.HostSummary.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional int32 record_count = 5; - * @return {number} - */ -proto.guard.HostSummary.prototype.getRecordCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.HostSummary} returns this - */ -proto.guard.HostSummary.prototype.setRecordCount = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * repeated HostStatus status = 6; - * @return {!Array} - */ -proto.guard.HostSummary.prototype.getStatusList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.guard.HostStatus, 6)); -}; - - -/** - * @param {!Array} value - * @return {!proto.guard.HostSummary} returns this -*/ -proto.guard.HostSummary.prototype.setStatusList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 6, value); -}; - - -/** - * @param {!proto.guard.HostStatus=} opt_value - * @param {number=} opt_index - * @return {!proto.guard.HostStatus} - */ -proto.guard.HostSummary.prototype.addStatus = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.guard.HostStatus, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.guard.HostSummary} returns this - */ -proto.guard.HostSummary.prototype.clearStatusList = function() { - return this.setStatusList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.TotalStateSummary.prototype.toObject = function(opt_includeInstance) { - return proto.guard.TotalStateSummary.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.TotalStateSummary} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.TotalStateSummary.toObject = function(includeInstance, msg) { - var f, obj = { - queryDate: (f = msg.getQueryDate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - responseTime: (f = msg.getResponseTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - preparerPid: jspb.Message.getFieldWithDefault(msg, 3, ""), - signature: msg.getSignature_asB64(), - validContractCount: jspb.Message.getFieldWithDefault(msg, 5, 0), - existedShardSize: jspb.Message.getFieldWithDefault(msg, 6, 0), - invalidContractCount: jspb.Message.getFieldWithDefault(msg, 7, 0), - lostShardSize: jspb.Message.getFieldWithDefault(msg, 8, 0), - totalHostReward: jspb.Message.getFieldWithDefault(msg, 9, 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.guard.TotalStateSummary} - */ -proto.guard.TotalStateSummary.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.TotalStateSummary; - return proto.guard.TotalStateSummary.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.TotalStateSummary} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.TotalStateSummary} - */ -proto.guard.TotalStateSummary.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setQueryDate(value); - break; - case 2: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setResponseTime(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setPreparerPid(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSignature(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setValidContractCount(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExistedShardSize(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setInvalidContractCount(value); - break; - case 8: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLostShardSize(value); - break; - case 9: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalHostReward(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.guard.TotalStateSummary.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.TotalStateSummary.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.TotalStateSummary} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.TotalStateSummary.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getQueryDate(); - if (f != null) { - writer.writeMessage( - 1, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getResponseTime(); - if (f != null) { - writer.writeMessage( - 2, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getPreparerPid(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getValidContractCount(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getExistedShardSize(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getInvalidContractCount(); - if (f !== 0) { - writer.writeInt64( - 7, - f - ); - } - f = message.getLostShardSize(); - if (f !== 0) { - writer.writeInt64( - 8, - f - ); - } - f = message.getTotalHostReward(); - if (f !== 0) { - writer.writeInt64( - 9, - f - ); - } -}; - - -/** - * optional google.protobuf.Timestamp query_date = 1; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.TotalStateSummary.prototype.getQueryDate = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.TotalStateSummary} returns this -*/ -proto.guard.TotalStateSummary.prototype.setQueryDate = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.TotalStateSummary} returns this - */ -proto.guard.TotalStateSummary.prototype.clearQueryDate = function() { - return this.setQueryDate(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.TotalStateSummary.prototype.hasQueryDate = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional google.protobuf.Timestamp response_time = 2; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.TotalStateSummary.prototype.getResponseTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.TotalStateSummary} returns this -*/ -proto.guard.TotalStateSummary.prototype.setResponseTime = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.TotalStateSummary} returns this - */ -proto.guard.TotalStateSummary.prototype.clearResponseTime = function() { - return this.setResponseTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.TotalStateSummary.prototype.hasResponseTime = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional string preparer_pid = 3; - * @return {string} - */ -proto.guard.TotalStateSummary.prototype.getPreparerPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.TotalStateSummary} returns this - */ -proto.guard.TotalStateSummary.prototype.setPreparerPid = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional bytes signature = 4; - * @return {!(string|Uint8Array)} - */ -proto.guard.TotalStateSummary.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.guard.TotalStateSummary.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.guard.TotalStateSummary.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.TotalStateSummary} returns this - */ -proto.guard.TotalStateSummary.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional int64 valid_contract_count = 5; - * @return {number} - */ -proto.guard.TotalStateSummary.prototype.getValidContractCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.TotalStateSummary} returns this - */ -proto.guard.TotalStateSummary.prototype.setValidContractCount = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 existed_shard_size = 6; - * @return {number} - */ -proto.guard.TotalStateSummary.prototype.getExistedShardSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.TotalStateSummary} returns this - */ -proto.guard.TotalStateSummary.prototype.setExistedShardSize = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional int64 invalid_contract_count = 7; - * @return {number} - */ -proto.guard.TotalStateSummary.prototype.getInvalidContractCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.TotalStateSummary} returns this - */ -proto.guard.TotalStateSummary.prototype.setInvalidContractCount = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional int64 lost_shard_size = 8; - * @return {number} - */ -proto.guard.TotalStateSummary.prototype.getLostShardSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.TotalStateSummary} returns this - */ -proto.guard.TotalStateSummary.prototype.setLostShardSize = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional int64 total_host_reward = 9; - * @return {number} - */ -proto.guard.TotalStateSummary.prototype.getTotalHostReward = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.TotalStateSummary} returns this - */ -proto.guard.TotalStateSummary.prototype.setTotalHostReward = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.HostStatus.prototype.toObject = function(opt_includeInstance) { - return proto.guard.HostStatus.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.HostStatus} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.HostStatus.toObject = function(includeInstance, msg) { - var f, obj = { - hostPid: jspb.Message.getFieldWithDefault(msg, 1, ""), - fileSize: jspb.Message.getFieldWithDefault(msg, 2, 0), - workAmount: jspb.Message.getFieldWithDefault(msg, 3, 0), - rewardBtt: jspb.Message.getFieldWithDefault(msg, 4, 0), - suspectCheat: jspb.Message.getBooleanFieldWithDefault(msg, 5, 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.guard.HostStatus} - */ -proto.guard.HostStatus.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.HostStatus; - return proto.guard.HostStatus.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.HostStatus} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.HostStatus} - */ -proto.guard.HostStatus.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.setHostPid(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFileSize(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setWorkAmount(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setRewardBtt(value); - break; - case 5: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSuspectCheat(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.guard.HostStatus.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.HostStatus.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.HostStatus} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.HostStatus.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getHostPid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getFileSize(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getWorkAmount(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getRewardBtt(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getSuspectCheat(); - if (f) { - writer.writeBool( - 5, - f - ); - } -}; - - -/** - * optional string host_pid = 1; - * @return {string} - */ -proto.guard.HostStatus.prototype.getHostPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.HostStatus} returns this - */ -proto.guard.HostStatus.prototype.setHostPid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional int64 file_size = 2; - * @return {number} - */ -proto.guard.HostStatus.prototype.getFileSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.HostStatus} returns this - */ -proto.guard.HostStatus.prototype.setFileSize = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int64 work_amount = 3; - * @return {number} - */ -proto.guard.HostStatus.prototype.getWorkAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.HostStatus} returns this - */ -proto.guard.HostStatus.prototype.setWorkAmount = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int64 reward_btt = 4; - * @return {number} - */ -proto.guard.HostStatus.prototype.getRewardBtt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.HostStatus} returns this - */ -proto.guard.HostStatus.prototype.setRewardBtt = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional bool suspect_cheat = 5; - * @return {boolean} - */ -proto.guard.HostStatus.prototype.getSuspectCheat = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.guard.HostStatus} returns this - */ -proto.guard.HostStatus.prototype.setSuspectCheat = function(value) { - return jspb.Message.setProto3BooleanField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.Log.prototype.toObject = function(opt_includeInstance) { - return proto.guard.Log.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.Log} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.Log.toObject = function(includeInstance, msg) { - var f, obj = { - changeTime: (f = msg.getChangeTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - originatorPid: jspb.Message.getFieldWithDefault(msg, 2, ""), - change: 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.guard.Log} - */ -proto.guard.Log.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.Log; - return proto.guard.Log.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.Log} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.Log} - */ -proto.guard.Log.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setChangeTime(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setOriginatorPid(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setChange(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.guard.Log.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.Log.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.Log} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.Log.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChangeTime(); - if (f != null) { - writer.writeMessage( - 1, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getOriginatorPid(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getChange(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional google.protobuf.Timestamp change_time = 1; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.Log.prototype.getChangeTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.Log} returns this -*/ -proto.guard.Log.prototype.setChangeTime = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.Log} returns this - */ -proto.guard.Log.prototype.clearChangeTime = function() { - return this.setChangeTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.Log.prototype.hasChangeTime = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string originator_pid = 2; - * @return {string} - */ -proto.guard.Log.prototype.getOriginatorPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.Log} returns this - */ -proto.guard.Log.prototype.setOriginatorPid = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string change = 3; - * @return {string} - */ -proto.guard.Log.prototype.getChange = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.Log} returns this - */ -proto.guard.Log.prototype.setChange = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.ContractMeta.prototype.toObject = function(opt_includeInstance) { - return proto.guard.ContractMeta.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.ContractMeta} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.ContractMeta.toObject = function(includeInstance, msg) { - var f, obj = { - contractId: jspb.Message.getFieldWithDefault(msg, 1, ""), - renterPid: jspb.Message.getFieldWithDefault(msg, 2, ""), - hostPid: jspb.Message.getFieldWithDefault(msg, 3, ""), - shardHash: jspb.Message.getFieldWithDefault(msg, 4, ""), - shardIndex: jspb.Message.getFieldWithDefault(msg, 5, 0), - shardFileSize: jspb.Message.getFieldWithDefault(msg, 6, 0), - fileHash: jspb.Message.getFieldWithDefault(msg, 7, ""), - rentStart: (f = msg.getRentStart()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - rentEnd: (f = msg.getRentEnd()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - guardPid: jspb.Message.getFieldWithDefault(msg, 10, ""), - escrowPid: jspb.Message.getFieldWithDefault(msg, 11, ""), - price: jspb.Message.getFieldWithDefault(msg, 12, 0), - amount: jspb.Message.getFieldWithDefault(msg, 13, 0), - collateralAmount: jspb.Message.getFieldWithDefault(msg, 14, 0), - payoutSchedule: jspb.Message.getFieldWithDefault(msg, 15, 0), - numPayouts: jspb.Message.getFieldWithDefault(msg, 16, 0), - contingentAmount: jspb.Message.getFieldWithDefault(msg, 17, 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.guard.ContractMeta} - */ -proto.guard.ContractMeta.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.ContractMeta; - return proto.guard.ContractMeta.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.ContractMeta} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.ContractMeta} - */ -proto.guard.ContractMeta.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.setContractId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setRenterPid(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setHostPid(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setShardHash(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt32()); - msg.setShardIndex(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setShardFileSize(value); - break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setFileHash(value); - break; - case 8: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setRentStart(value); - break; - case 9: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setRentEnd(value); - break; - case 10: - var value = /** @type {string} */ (reader.readString()); - msg.setGuardPid(value); - break; - case 11: - var value = /** @type {string} */ (reader.readString()); - msg.setEscrowPid(value); - break; - case 12: - var value = /** @type {number} */ (reader.readInt64()); - msg.setPrice(value); - break; - case 13: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; - case 14: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCollateralAmount(value); - break; - case 15: - var value = /** @type {!proto.guard.ContractMeta.Schedule} */ (reader.readEnum()); - msg.setPayoutSchedule(value); - break; - case 16: - var value = /** @type {number} */ (reader.readInt32()); - msg.setNumPayouts(value); - break; - case 17: - var value = /** @type {number} */ (reader.readInt64()); - msg.setContingentAmount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.guard.ContractMeta.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.ContractMeta.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.ContractMeta} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.ContractMeta.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getContractId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getRenterPid(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getHostPid(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getShardHash(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getShardIndex(); - if (f !== 0) { - writer.writeInt32( - 5, - f - ); - } - f = message.getShardFileSize(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getFileHash(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } - f = message.getRentStart(); - if (f != null) { - writer.writeMessage( - 8, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getRentEnd(); - if (f != null) { - writer.writeMessage( - 9, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getGuardPid(); - if (f.length > 0) { - writer.writeString( - 10, - f - ); - } - f = message.getEscrowPid(); - if (f.length > 0) { - writer.writeString( - 11, - f - ); - } - f = message.getPrice(); - if (f !== 0) { - writer.writeInt64( - 12, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 13, - f - ); - } - f = message.getCollateralAmount(); - if (f !== 0) { - writer.writeInt64( - 14, - f - ); - } - f = message.getPayoutSchedule(); - if (f !== 0.0) { - writer.writeEnum( - 15, - f - ); - } - f = message.getNumPayouts(); - if (f !== 0) { - writer.writeInt32( - 16, - f - ); - } - f = message.getContingentAmount(); - if (f !== 0) { - writer.writeInt64( - 17, - f - ); - } -}; - - -/** - * @enum {number} - */ -proto.guard.ContractMeta.Schedule = { - MONTHLY: 0, - QUARTERLY: 1, - ANNUALLY: 2 -}; - -/** - * optional string contract_id = 1; - * @return {string} - */ -proto.guard.ContractMeta.prototype.getContractId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ContractMeta} returns this - */ -proto.guard.ContractMeta.prototype.setContractId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string renter_pid = 2; - * @return {string} - */ -proto.guard.ContractMeta.prototype.getRenterPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ContractMeta} returns this - */ -proto.guard.ContractMeta.prototype.setRenterPid = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string host_pid = 3; - * @return {string} - */ -proto.guard.ContractMeta.prototype.getHostPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ContractMeta} returns this - */ -proto.guard.ContractMeta.prototype.setHostPid = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string shard_hash = 4; - * @return {string} - */ -proto.guard.ContractMeta.prototype.getShardHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ContractMeta} returns this - */ -proto.guard.ContractMeta.prototype.setShardHash = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional int32 shard_index = 5; - * @return {number} - */ -proto.guard.ContractMeta.prototype.getShardIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.ContractMeta} returns this - */ -proto.guard.ContractMeta.prototype.setShardIndex = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 shard_file_size = 6; - * @return {number} - */ -proto.guard.ContractMeta.prototype.getShardFileSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.ContractMeta} returns this - */ -proto.guard.ContractMeta.prototype.setShardFileSize = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional string file_hash = 7; - * @return {string} - */ -proto.guard.ContractMeta.prototype.getFileHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ContractMeta} returns this - */ -proto.guard.ContractMeta.prototype.setFileHash = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); -}; - - -/** - * optional google.protobuf.Timestamp rent_start = 8; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.ContractMeta.prototype.getRentStart = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 8)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.ContractMeta} returns this -*/ -proto.guard.ContractMeta.prototype.setRentStart = function(value) { - return jspb.Message.setWrapperField(this, 8, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.ContractMeta} returns this - */ -proto.guard.ContractMeta.prototype.clearRentStart = function() { - return this.setRentStart(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.ContractMeta.prototype.hasRentStart = function() { - return jspb.Message.getField(this, 8) != null; -}; - - -/** - * optional google.protobuf.Timestamp rent_end = 9; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.ContractMeta.prototype.getRentEnd = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 9)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.ContractMeta} returns this -*/ -proto.guard.ContractMeta.prototype.setRentEnd = function(value) { - return jspb.Message.setWrapperField(this, 9, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.ContractMeta} returns this - */ -proto.guard.ContractMeta.prototype.clearRentEnd = function() { - return this.setRentEnd(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.ContractMeta.prototype.hasRentEnd = function() { - return jspb.Message.getField(this, 9) != null; -}; - - -/** - * optional string guard_pid = 10; - * @return {string} - */ -proto.guard.ContractMeta.prototype.getGuardPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ContractMeta} returns this - */ -proto.guard.ContractMeta.prototype.setGuardPid = function(value) { - return jspb.Message.setProto3StringField(this, 10, value); -}; - - -/** - * optional string escrow_pid = 11; - * @return {string} - */ -proto.guard.ContractMeta.prototype.getEscrowPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ContractMeta} returns this - */ -proto.guard.ContractMeta.prototype.setEscrowPid = function(value) { - return jspb.Message.setProto3StringField(this, 11, value); -}; - - -/** - * optional int64 price = 12; - * @return {number} - */ -proto.guard.ContractMeta.prototype.getPrice = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.ContractMeta} returns this - */ -proto.guard.ContractMeta.prototype.setPrice = function(value) { - return jspb.Message.setProto3IntField(this, 12, value); -}; - - -/** - * optional int64 amount = 13; - * @return {number} - */ -proto.guard.ContractMeta.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.ContractMeta} returns this - */ -proto.guard.ContractMeta.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 13, value); -}; - - -/** - * optional int64 collateral_amount = 14; - * @return {number} - */ -proto.guard.ContractMeta.prototype.getCollateralAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.ContractMeta} returns this - */ -proto.guard.ContractMeta.prototype.setCollateralAmount = function(value) { - return jspb.Message.setProto3IntField(this, 14, value); -}; - - -/** - * optional Schedule payout_schedule = 15; - * @return {!proto.guard.ContractMeta.Schedule} - */ -proto.guard.ContractMeta.prototype.getPayoutSchedule = function() { - return /** @type {!proto.guard.ContractMeta.Schedule} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); -}; - - -/** - * @param {!proto.guard.ContractMeta.Schedule} value - * @return {!proto.guard.ContractMeta} returns this - */ -proto.guard.ContractMeta.prototype.setPayoutSchedule = function(value) { - return jspb.Message.setProto3EnumField(this, 15, value); -}; - - -/** - * optional int32 num_payouts = 16; - * @return {number} - */ -proto.guard.ContractMeta.prototype.getNumPayouts = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.ContractMeta} returns this - */ -proto.guard.ContractMeta.prototype.setNumPayouts = function(value) { - return jspb.Message.setProto3IntField(this, 16, value); -}; - - -/** - * optional int64 contingent_amount = 17; - * @return {number} - */ -proto.guard.ContractMeta.prototype.getContingentAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 17, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.ContractMeta} returns this - */ -proto.guard.ContractMeta.prototype.setContingentAmount = function(value) { - return jspb.Message.setProto3IntField(this, 17, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.guard.Contract.repeatedFields_ = [7]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.Contract.prototype.toObject = function(opt_includeInstance) { - return proto.guard.Contract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.Contract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.Contract.toObject = function(includeInstance, msg) { - var f, obj = { - contract: (f = msg.getContract()) && proto.guard.ContractMeta.toObject(includeInstance, f), - state: jspb.Message.getFieldWithDefault(msg, 2, 0), - renterSignature: msg.getRenterSignature_asB64(), - hostSignature: msg.getHostSignature_asB64(), - escrowSignedTime: (f = msg.getEscrowSignedTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - escrowSignature: msg.getEscrowSignature_asB64(), - changeLogList: jspb.Message.toObjectList(msg.getChangeLogList(), - proto.guard.Log.toObject, includeInstance), - lastModifyTime: (f = msg.getLastModifyTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - guardSignature: msg.getGuardSignature_asB64(), - preparerPid: jspb.Message.getFieldWithDefault(msg, 10, ""), - preparerSignature: msg.getPreparerSignature_asB64(), - lastSuccessChallengeTime: (f = msg.getLastSuccessChallengeTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - lastChallengeTime: (f = msg.getLastChallengeTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - challengeTimes: jspb.Message.getFieldWithDefault(msg, 14, 0), - challengeWarnTimes: jspb.Message.getFieldWithDefault(msg, 15, 0), - challengeSuccessTimes: jspb.Message.getFieldWithDefault(msg, 16, 0), - firstChallengeSuccess: (f = msg.getFirstChallengeSuccess()) && google_protobuf_timestamp_pb.Timestamp.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.guard.Contract} - */ -proto.guard.Contract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.Contract; - return proto.guard.Contract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.Contract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.Contract} - */ -proto.guard.Contract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.guard.ContractMeta; - reader.readMessage(value,proto.guard.ContractMeta.deserializeBinaryFromReader); - msg.setContract(value); - break; - case 2: - var value = /** @type {!proto.guard.Contract.ContractState} */ (reader.readEnum()); - msg.setState(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRenterSignature(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setHostSignature(value); - break; - case 5: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setEscrowSignedTime(value); - break; - case 6: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setEscrowSignature(value); - break; - case 7: - var value = new proto.guard.Log; - reader.readMessage(value,proto.guard.Log.deserializeBinaryFromReader); - msg.addChangeLog(value); - break; - case 8: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setLastModifyTime(value); - break; - case 9: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setGuardSignature(value); - break; - case 10: - var value = /** @type {string} */ (reader.readString()); - msg.setPreparerPid(value); - break; - case 11: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPreparerSignature(value); - break; - case 12: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setLastSuccessChallengeTime(value); - break; - case 13: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setLastChallengeTime(value); - break; - case 14: - var value = /** @type {number} */ (reader.readInt32()); - msg.setChallengeTimes(value); - break; - case 15: - var value = /** @type {number} */ (reader.readInt32()); - msg.setChallengeWarnTimes(value); - break; - case 16: - var value = /** @type {number} */ (reader.readInt32()); - msg.setChallengeSuccessTimes(value); - break; - case 17: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setFirstChallengeSuccess(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.guard.Contract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.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.guard.Contract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.Contract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getContract(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.guard.ContractMeta.serializeBinaryToWriter - ); - } - f = message.getState(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } - f = message.getRenterSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getHostSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getEscrowSignedTime(); - if (f != null) { - writer.writeMessage( - 5, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getEscrowSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 6, - f - ); - } - f = message.getChangeLogList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 7, - f, - proto.guard.Log.serializeBinaryToWriter - ); - } - f = message.getLastModifyTime(); - if (f != null) { - writer.writeMessage( - 8, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getGuardSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 9, - f - ); - } - f = message.getPreparerPid(); - if (f.length > 0) { - writer.writeString( - 10, - f - ); - } - f = message.getPreparerSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 11, - f - ); - } - f = message.getLastSuccessChallengeTime(); - if (f != null) { - writer.writeMessage( - 12, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getLastChallengeTime(); - if (f != null) { - writer.writeMessage( - 13, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getChallengeTimes(); - if (f !== 0) { - writer.writeInt32( - 14, - f - ); - } - f = message.getChallengeWarnTimes(); - if (f !== 0) { - writer.writeInt32( - 15, - f - ); - } - f = message.getChallengeSuccessTimes(); - if (f !== 0) { - writer.writeInt32( - 16, - f - ); - } - f = message.getFirstChallengeSuccess(); - if (f != null) { - writer.writeMessage( - 17, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } -}; - - -/** - * @enum {number} - */ -proto.guard.Contract.ContractState = { - DRAFT: 0, - SIGNED: 1, - UPLOADED: 2, - LOST: 3, - CANCELED: 4, - CLOSED: 5, - RENEWED: 6, - OBSOLETE: 7, - WARN: 8, - DRAFT_WARN: 9, - READY_CHALLENGE: 10, - RECREATED: 11, - REQUEST_CHALLENGE: 12 -}; - -/** - * optional ContractMeta contract = 1; - * @return {?proto.guard.ContractMeta} - */ -proto.guard.Contract.prototype.getContract = function() { - return /** @type{?proto.guard.ContractMeta} */ ( - jspb.Message.getWrapperField(this, proto.guard.ContractMeta, 1)); -}; - - -/** - * @param {?proto.guard.ContractMeta|undefined} value - * @return {!proto.guard.Contract} returns this -*/ -proto.guard.Contract.prototype.setContract = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.Contract} returns this - */ -proto.guard.Contract.prototype.clearContract = function() { - return this.setContract(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.Contract.prototype.hasContract = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional ContractState state = 2; - * @return {!proto.guard.Contract.ContractState} - */ -proto.guard.Contract.prototype.getState = function() { - return /** @type {!proto.guard.Contract.ContractState} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.guard.Contract.ContractState} value - * @return {!proto.guard.Contract} returns this - */ -proto.guard.Contract.prototype.setState = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - -/** - * optional bytes renter_signature = 3; - * @return {!(string|Uint8Array)} - */ -proto.guard.Contract.prototype.getRenterSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes renter_signature = 3; - * This is a type-conversion wrapper around `getRenterSignature()` - * @return {string} - */ -proto.guard.Contract.prototype.getRenterSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRenterSignature())); -}; - - -/** - * optional bytes renter_signature = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRenterSignature()` - * @return {!Uint8Array} - */ -proto.guard.Contract.prototype.getRenterSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRenterSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.Contract} returns this - */ -proto.guard.Contract.prototype.setRenterSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional bytes host_signature = 4; - * @return {!(string|Uint8Array)} - */ -proto.guard.Contract.prototype.getHostSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes host_signature = 4; - * This is a type-conversion wrapper around `getHostSignature()` - * @return {string} - */ -proto.guard.Contract.prototype.getHostSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getHostSignature())); -}; - - -/** - * optional bytes host_signature = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getHostSignature()` - * @return {!Uint8Array} - */ -proto.guard.Contract.prototype.getHostSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getHostSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.Contract} returns this - */ -proto.guard.Contract.prototype.setHostSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional google.protobuf.Timestamp escrow_signed_time = 5; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.Contract.prototype.getEscrowSignedTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.Contract} returns this -*/ -proto.guard.Contract.prototype.setEscrowSignedTime = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.Contract} returns this - */ -proto.guard.Contract.prototype.clearEscrowSignedTime = function() { - return this.setEscrowSignedTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.Contract.prototype.hasEscrowSignedTime = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional bytes escrow_signature = 6; - * @return {!(string|Uint8Array)} - */ -proto.guard.Contract.prototype.getEscrowSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * optional bytes escrow_signature = 6; - * This is a type-conversion wrapper around `getEscrowSignature()` - * @return {string} - */ -proto.guard.Contract.prototype.getEscrowSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getEscrowSignature())); -}; - - -/** - * optional bytes escrow_signature = 6; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEscrowSignature()` - * @return {!Uint8Array} - */ -proto.guard.Contract.prototype.getEscrowSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getEscrowSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.Contract} returns this - */ -proto.guard.Contract.prototype.setEscrowSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 6, value); -}; - - -/** - * repeated Log change_log = 7; - * @return {!Array} - */ -proto.guard.Contract.prototype.getChangeLogList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.guard.Log, 7)); -}; - - -/** - * @param {!Array} value - * @return {!proto.guard.Contract} returns this -*/ -proto.guard.Contract.prototype.setChangeLogList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 7, value); -}; - - -/** - * @param {!proto.guard.Log=} opt_value - * @param {number=} opt_index - * @return {!proto.guard.Log} - */ -proto.guard.Contract.prototype.addChangeLog = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.guard.Log, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.guard.Contract} returns this - */ -proto.guard.Contract.prototype.clearChangeLogList = function() { - return this.setChangeLogList([]); -}; - - -/** - * optional google.protobuf.Timestamp last_modify_time = 8; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.Contract.prototype.getLastModifyTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 8)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.Contract} returns this -*/ -proto.guard.Contract.prototype.setLastModifyTime = function(value) { - return jspb.Message.setWrapperField(this, 8, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.Contract} returns this - */ -proto.guard.Contract.prototype.clearLastModifyTime = function() { - return this.setLastModifyTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.Contract.prototype.hasLastModifyTime = function() { - return jspb.Message.getField(this, 8) != null; -}; - - -/** - * optional bytes guard_signature = 9; - * @return {!(string|Uint8Array)} - */ -proto.guard.Contract.prototype.getGuardSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, "")); -}; - - -/** - * optional bytes guard_signature = 9; - * This is a type-conversion wrapper around `getGuardSignature()` - * @return {string} - */ -proto.guard.Contract.prototype.getGuardSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getGuardSignature())); -}; - - -/** - * optional bytes guard_signature = 9; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getGuardSignature()` - * @return {!Uint8Array} - */ -proto.guard.Contract.prototype.getGuardSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getGuardSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.Contract} returns this - */ -proto.guard.Contract.prototype.setGuardSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 9, value); -}; - - -/** - * optional string preparer_pid = 10; - * @return {string} - */ -proto.guard.Contract.prototype.getPreparerPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.Contract} returns this - */ -proto.guard.Contract.prototype.setPreparerPid = function(value) { - return jspb.Message.setProto3StringField(this, 10, value); -}; - - -/** - * optional bytes preparer_signature = 11; - * @return {!(string|Uint8Array)} - */ -proto.guard.Contract.prototype.getPreparerSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 11, "")); -}; - - -/** - * optional bytes preparer_signature = 11; - * This is a type-conversion wrapper around `getPreparerSignature()` - * @return {string} - */ -proto.guard.Contract.prototype.getPreparerSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPreparerSignature())); -}; - - -/** - * optional bytes preparer_signature = 11; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPreparerSignature()` - * @return {!Uint8Array} - */ -proto.guard.Contract.prototype.getPreparerSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPreparerSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.Contract} returns this - */ -proto.guard.Contract.prototype.setPreparerSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 11, value); -}; - - -/** - * optional google.protobuf.Timestamp last_success_challenge_time = 12; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.Contract.prototype.getLastSuccessChallengeTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 12)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.Contract} returns this -*/ -proto.guard.Contract.prototype.setLastSuccessChallengeTime = function(value) { - return jspb.Message.setWrapperField(this, 12, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.Contract} returns this - */ -proto.guard.Contract.prototype.clearLastSuccessChallengeTime = function() { - return this.setLastSuccessChallengeTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.Contract.prototype.hasLastSuccessChallengeTime = function() { - return jspb.Message.getField(this, 12) != null; -}; - - -/** - * optional google.protobuf.Timestamp last_challenge_time = 13; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.Contract.prototype.getLastChallengeTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 13)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.Contract} returns this -*/ -proto.guard.Contract.prototype.setLastChallengeTime = function(value) { - return jspb.Message.setWrapperField(this, 13, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.Contract} returns this - */ -proto.guard.Contract.prototype.clearLastChallengeTime = function() { - return this.setLastChallengeTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.Contract.prototype.hasLastChallengeTime = function() { - return jspb.Message.getField(this, 13) != null; -}; - - -/** - * optional int32 challenge_times = 14; - * @return {number} - */ -proto.guard.Contract.prototype.getChallengeTimes = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.Contract} returns this - */ -proto.guard.Contract.prototype.setChallengeTimes = function(value) { - return jspb.Message.setProto3IntField(this, 14, value); -}; - - -/** - * optional int32 challenge_warn_times = 15; - * @return {number} - */ -proto.guard.Contract.prototype.getChallengeWarnTimes = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.Contract} returns this - */ -proto.guard.Contract.prototype.setChallengeWarnTimes = function(value) { - return jspb.Message.setProto3IntField(this, 15, value); -}; - - -/** - * optional int32 challenge_success_times = 16; - * @return {number} - */ -proto.guard.Contract.prototype.getChallengeSuccessTimes = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.Contract} returns this - */ -proto.guard.Contract.prototype.setChallengeSuccessTimes = function(value) { - return jspb.Message.setProto3IntField(this, 16, value); -}; - - -/** - * optional google.protobuf.Timestamp first_challenge_success = 17; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.Contract.prototype.getFirstChallengeSuccess = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 17)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.Contract} returns this -*/ -proto.guard.Contract.prototype.setFirstChallengeSuccess = function(value) { - return jspb.Message.setWrapperField(this, 17, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.Contract} returns this - */ -proto.guard.Contract.prototype.clearFirstChallengeSuccess = function() { - return this.setFirstChallengeSuccess(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.Contract.prototype.hasFirstChallengeSuccess = function() { - return jspb.Message.getField(this, 17) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.guard.FileStoreListResponse.repeatedFields_ = [3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.FileStoreListResponse.prototype.toObject = function(opt_includeInstance) { - return proto.guard.FileStoreListResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.FileStoreListResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.FileStoreListResponse.toObject = function(includeInstance, msg) { - var f, obj = { - request: (f = msg.getRequest()) && proto.guard.ListRenterFileInfoRequest.toObject(includeInstance, f), - currentTime: (f = msg.getCurrentTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - fileStoreMetaList: jspb.Message.toObjectList(msg.getFileStoreMetaList(), - proto.guard.FileStoreMeta.toObject, includeInstance), - count: jspb.Message.getFieldWithDefault(msg, 4, 0), - 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.guard.FileStoreListResponse} - */ -proto.guard.FileStoreListResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.FileStoreListResponse; - return proto.guard.FileStoreListResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.FileStoreListResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.FileStoreListResponse} - */ -proto.guard.FileStoreListResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.guard.ListRenterFileInfoRequest; - reader.readMessage(value,proto.guard.ListRenterFileInfoRequest.deserializeBinaryFromReader); - msg.setRequest(value); - break; - case 2: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setCurrentTime(value); - break; - case 3: - var value = new proto.guard.FileStoreMeta; - reader.readMessage(value,proto.guard.FileStoreMeta.deserializeBinaryFromReader); - msg.addFileStoreMeta(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt32()); - msg.setCount(value); - break; - case 5: - 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.guard.FileStoreListResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.FileStoreListResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.FileStoreListResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.FileStoreListResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRequest(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.guard.ListRenterFileInfoRequest.serializeBinaryToWriter - ); - } - f = message.getCurrentTime(); - if (f != null) { - writer.writeMessage( - 2, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getFileStoreMetaList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.guard.FileStoreMeta.serializeBinaryToWriter - ); - } - f = message.getCount(); - if (f !== 0) { - writer.writeInt32( - 4, - f - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 5, - f - ); - } -}; - - -/** - * optional ListRenterFileInfoRequest request = 1; - * @return {?proto.guard.ListRenterFileInfoRequest} - */ -proto.guard.FileStoreListResponse.prototype.getRequest = function() { - return /** @type{?proto.guard.ListRenterFileInfoRequest} */ ( - jspb.Message.getWrapperField(this, proto.guard.ListRenterFileInfoRequest, 1)); -}; - - -/** - * @param {?proto.guard.ListRenterFileInfoRequest|undefined} value - * @return {!proto.guard.FileStoreListResponse} returns this -*/ -proto.guard.FileStoreListResponse.prototype.setRequest = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.FileStoreListResponse} returns this - */ -proto.guard.FileStoreListResponse.prototype.clearRequest = function() { - return this.setRequest(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.FileStoreListResponse.prototype.hasRequest = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional google.protobuf.Timestamp current_time = 2; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.FileStoreListResponse.prototype.getCurrentTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.FileStoreListResponse} returns this -*/ -proto.guard.FileStoreListResponse.prototype.setCurrentTime = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.FileStoreListResponse} returns this - */ -proto.guard.FileStoreListResponse.prototype.clearCurrentTime = function() { - return this.setCurrentTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.FileStoreListResponse.prototype.hasCurrentTime = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * repeated FileStoreMeta file_store_meta = 3; - * @return {!Array} - */ -proto.guard.FileStoreListResponse.prototype.getFileStoreMetaList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.guard.FileStoreMeta, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.guard.FileStoreListResponse} returns this -*/ -proto.guard.FileStoreListResponse.prototype.setFileStoreMetaList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.guard.FileStoreMeta=} opt_value - * @param {number=} opt_index - * @return {!proto.guard.FileStoreMeta} - */ -proto.guard.FileStoreListResponse.prototype.addFileStoreMeta = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.guard.FileStoreMeta, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.guard.FileStoreListResponse} returns this - */ -proto.guard.FileStoreListResponse.prototype.clearFileStoreMetaList = function() { - return this.setFileStoreMetaList([]); -}; - - -/** - * optional int32 count = 4; - * @return {number} - */ -proto.guard.FileStoreListResponse.prototype.getCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.FileStoreListResponse} returns this - */ -proto.guard.FileStoreListResponse.prototype.setCount = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional bytes signature = 5; - * @return {!(string|Uint8Array)} - */ -proto.guard.FileStoreListResponse.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * optional bytes signature = 5; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.guard.FileStoreListResponse.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 5; - * 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.guard.FileStoreListResponse.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.FileStoreListResponse} returns this - */ -proto.guard.FileStoreListResponse.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.FileStoreMeta.prototype.toObject = function(opt_includeInstance) { - return proto.guard.FileStoreMeta.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.FileStoreMeta} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.FileStoreMeta.toObject = function(includeInstance, msg) { - var f, obj = { - renterPid: jspb.Message.getFieldWithDefault(msg, 1, ""), - fileHash: jspb.Message.getFieldWithDefault(msg, 2, ""), - fileSize: jspb.Message.getFieldWithDefault(msg, 3, 0), - rentStart: (f = msg.getRentStart()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - rentEnd: (f = msg.getRentEnd()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - checkFrequency: jspb.Message.getFieldWithDefault(msg, 6, 0), - guardFee: jspb.Message.getFieldWithDefault(msg, 7, 0), - escrowFee: jspb.Message.getFieldWithDefault(msg, 8, 0), - shardCount: jspb.Message.getFieldWithDefault(msg, 9, 0), - minimumShards: jspb.Message.getFieldWithDefault(msg, 10, 0), - recoverThreshold: jspb.Message.getFieldWithDefault(msg, 11, 0), - escrowPid: jspb.Message.getFieldWithDefault(msg, 12, ""), - guardPid: jspb.Message.getFieldWithDefault(msg, 13, ""), - warnChallengeTimesLimit: jspb.Message.getFieldWithDefault(msg, 14, 0), - successChallengeTimesLimit: jspb.Message.getFieldWithDefault(msg, 15, 0), - checkFrequencyWarn: jspb.Message.getFieldWithDefault(msg, 16, 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.guard.FileStoreMeta} - */ -proto.guard.FileStoreMeta.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.FileStoreMeta; - return proto.guard.FileStoreMeta.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.FileStoreMeta} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.FileStoreMeta} - */ -proto.guard.FileStoreMeta.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.setRenterPid(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setFileHash(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFileSize(value); - break; - case 4: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setRentStart(value); - break; - case 5: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setRentEnd(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt32()); - msg.setCheckFrequency(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setGuardFee(value); - break; - case 8: - var value = /** @type {number} */ (reader.readInt64()); - msg.setEscrowFee(value); - break; - case 9: - var value = /** @type {number} */ (reader.readInt32()); - msg.setShardCount(value); - break; - case 10: - var value = /** @type {number} */ (reader.readInt32()); - msg.setMinimumShards(value); - break; - case 11: - var value = /** @type {number} */ (reader.readInt32()); - msg.setRecoverThreshold(value); - break; - case 12: - var value = /** @type {string} */ (reader.readString()); - msg.setEscrowPid(value); - break; - case 13: - var value = /** @type {string} */ (reader.readString()); - msg.setGuardPid(value); - break; - case 14: - var value = /** @type {number} */ (reader.readInt32()); - msg.setWarnChallengeTimesLimit(value); - break; - case 15: - var value = /** @type {number} */ (reader.readInt32()); - msg.setSuccessChallengeTimesLimit(value); - break; - case 16: - var value = /** @type {number} */ (reader.readInt32()); - msg.setCheckFrequencyWarn(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.guard.FileStoreMeta.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.FileStoreMeta.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.FileStoreMeta} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.FileStoreMeta.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRenterPid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getFileHash(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getFileSize(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getRentStart(); - if (f != null) { - writer.writeMessage( - 4, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getRentEnd(); - if (f != null) { - writer.writeMessage( - 5, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getCheckFrequency(); - if (f !== 0) { - writer.writeInt32( - 6, - f - ); - } - f = message.getGuardFee(); - if (f !== 0) { - writer.writeInt64( - 7, - f - ); - } - f = message.getEscrowFee(); - if (f !== 0) { - writer.writeInt64( - 8, - f - ); - } - f = message.getShardCount(); - if (f !== 0) { - writer.writeInt32( - 9, - f - ); - } - f = message.getMinimumShards(); - if (f !== 0) { - writer.writeInt32( - 10, - f - ); - } - f = message.getRecoverThreshold(); - if (f !== 0) { - writer.writeInt32( - 11, - f - ); - } - f = message.getEscrowPid(); - if (f.length > 0) { - writer.writeString( - 12, - f - ); - } - f = message.getGuardPid(); - if (f.length > 0) { - writer.writeString( - 13, - f - ); - } - f = message.getWarnChallengeTimesLimit(); - if (f !== 0) { - writer.writeInt32( - 14, - f - ); - } - f = message.getSuccessChallengeTimesLimit(); - if (f !== 0) { - writer.writeInt32( - 15, - f - ); - } - f = message.getCheckFrequencyWarn(); - if (f !== 0) { - writer.writeInt32( - 16, - f - ); - } -}; - - -/** - * optional string renter_pid = 1; - * @return {string} - */ -proto.guard.FileStoreMeta.prototype.getRenterPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.FileStoreMeta} returns this - */ -proto.guard.FileStoreMeta.prototype.setRenterPid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string file_hash = 2; - * @return {string} - */ -proto.guard.FileStoreMeta.prototype.getFileHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.FileStoreMeta} returns this - */ -proto.guard.FileStoreMeta.prototype.setFileHash = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional int64 file_size = 3; - * @return {number} - */ -proto.guard.FileStoreMeta.prototype.getFileSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.FileStoreMeta} returns this - */ -proto.guard.FileStoreMeta.prototype.setFileSize = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional google.protobuf.Timestamp rent_start = 4; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.FileStoreMeta.prototype.getRentStart = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.FileStoreMeta} returns this -*/ -proto.guard.FileStoreMeta.prototype.setRentStart = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.FileStoreMeta} returns this - */ -proto.guard.FileStoreMeta.prototype.clearRentStart = function() { - return this.setRentStart(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.FileStoreMeta.prototype.hasRentStart = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional google.protobuf.Timestamp rent_end = 5; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.FileStoreMeta.prototype.getRentEnd = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.FileStoreMeta} returns this -*/ -proto.guard.FileStoreMeta.prototype.setRentEnd = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.FileStoreMeta} returns this - */ -proto.guard.FileStoreMeta.prototype.clearRentEnd = function() { - return this.setRentEnd(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.FileStoreMeta.prototype.hasRentEnd = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional int32 check_frequency = 6; - * @return {number} - */ -proto.guard.FileStoreMeta.prototype.getCheckFrequency = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.FileStoreMeta} returns this - */ -proto.guard.FileStoreMeta.prototype.setCheckFrequency = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional int64 guard_fee = 7; - * @return {number} - */ -proto.guard.FileStoreMeta.prototype.getGuardFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.FileStoreMeta} returns this - */ -proto.guard.FileStoreMeta.prototype.setGuardFee = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional int64 escrow_fee = 8; - * @return {number} - */ -proto.guard.FileStoreMeta.prototype.getEscrowFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.FileStoreMeta} returns this - */ -proto.guard.FileStoreMeta.prototype.setEscrowFee = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional int32 shard_count = 9; - * @return {number} - */ -proto.guard.FileStoreMeta.prototype.getShardCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.FileStoreMeta} returns this - */ -proto.guard.FileStoreMeta.prototype.setShardCount = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * optional int32 minimum_shards = 10; - * @return {number} - */ -proto.guard.FileStoreMeta.prototype.getMinimumShards = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.FileStoreMeta} returns this - */ -proto.guard.FileStoreMeta.prototype.setMinimumShards = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); -}; - - -/** - * optional int32 recover_threshold = 11; - * @return {number} - */ -proto.guard.FileStoreMeta.prototype.getRecoverThreshold = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.FileStoreMeta} returns this - */ -proto.guard.FileStoreMeta.prototype.setRecoverThreshold = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); -}; - - -/** - * optional string escrow_pid = 12; - * @return {string} - */ -proto.guard.FileStoreMeta.prototype.getEscrowPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.FileStoreMeta} returns this - */ -proto.guard.FileStoreMeta.prototype.setEscrowPid = function(value) { - return jspb.Message.setProto3StringField(this, 12, value); -}; - - -/** - * optional string guard_pid = 13; - * @return {string} - */ -proto.guard.FileStoreMeta.prototype.getGuardPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.FileStoreMeta} returns this - */ -proto.guard.FileStoreMeta.prototype.setGuardPid = function(value) { - return jspb.Message.setProto3StringField(this, 13, value); -}; - - -/** - * optional int32 warn_challenge_times_limit = 14; - * @return {number} - */ -proto.guard.FileStoreMeta.prototype.getWarnChallengeTimesLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.FileStoreMeta} returns this - */ -proto.guard.FileStoreMeta.prototype.setWarnChallengeTimesLimit = function(value) { - return jspb.Message.setProto3IntField(this, 14, value); -}; - - -/** - * optional int32 success_challenge_times_limit = 15; - * @return {number} - */ -proto.guard.FileStoreMeta.prototype.getSuccessChallengeTimesLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.FileStoreMeta} returns this - */ -proto.guard.FileStoreMeta.prototype.setSuccessChallengeTimesLimit = function(value) { - return jspb.Message.setProto3IntField(this, 15, value); -}; - - -/** - * optional int32 check_frequency_warn = 16; - * @return {number} - */ -proto.guard.FileStoreMeta.prototype.getCheckFrequencyWarn = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.FileStoreMeta} returns this - */ -proto.guard.FileStoreMeta.prototype.setCheckFrequencyWarn = function(value) { - return jspb.Message.setProto3IntField(this, 16, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.guard.FileStoreStatus.repeatedFields_ = [3,6]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.FileStoreStatus.prototype.toObject = function(opt_includeInstance) { - return proto.guard.FileStoreStatus.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.FileStoreStatus} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.FileStoreStatus.toObject = function(includeInstance, msg) { - var f, obj = { - fileStoreMeta: (f = msg.getFileStoreMeta()) && proto.guard.FileStoreMeta.toObject(includeInstance, f), - state: jspb.Message.getFieldWithDefault(msg, 2, 0), - contractsList: jspb.Message.toObjectList(msg.getContractsList(), - proto.guard.Contract.toObject, includeInstance), - renterSignature: msg.getRenterSignature_asB64(), - guardReceiveTime: (f = msg.getGuardReceiveTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - changeLogList: jspb.Message.toObjectList(msg.getChangeLogList(), - proto.guard.Log.toObject, includeInstance), - currentTime: (f = msg.getCurrentTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - guardSignature: msg.getGuardSignature_asB64(), - rentalState: jspb.Message.getFieldWithDefault(msg, 9, 0), - preparerPid: jspb.Message.getFieldWithDefault(msg, 10, ""), - preparerSignature: msg.getPreparerSignature_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.guard.FileStoreStatus} - */ -proto.guard.FileStoreStatus.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.FileStoreStatus; - return proto.guard.FileStoreStatus.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.FileStoreStatus} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.FileStoreStatus} - */ -proto.guard.FileStoreStatus.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.guard.FileStoreMeta; - reader.readMessage(value,proto.guard.FileStoreMeta.deserializeBinaryFromReader); - msg.setFileStoreMeta(value); - break; - case 2: - var value = /** @type {!proto.guard.FileStoreStatus.MetaState} */ (reader.readEnum()); - msg.setState(value); - break; - case 3: - var value = new proto.guard.Contract; - reader.readMessage(value,proto.guard.Contract.deserializeBinaryFromReader); - msg.addContracts(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRenterSignature(value); - break; - case 5: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setGuardReceiveTime(value); - break; - case 6: - var value = new proto.guard.Log; - reader.readMessage(value,proto.guard.Log.deserializeBinaryFromReader); - msg.addChangeLog(value); - break; - case 7: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setCurrentTime(value); - break; - case 8: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setGuardSignature(value); - break; - case 9: - var value = /** @type {!proto.guard.FileStoreStatus.RentalState} */ (reader.readEnum()); - msg.setRentalState(value); - break; - case 10: - var value = /** @type {string} */ (reader.readString()); - msg.setPreparerPid(value); - break; - case 11: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPreparerSignature(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.guard.FileStoreStatus.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.FileStoreStatus.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.FileStoreStatus} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.FileStoreStatus.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFileStoreMeta(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.guard.FileStoreMeta.serializeBinaryToWriter - ); - } - f = message.getState(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } - f = message.getContractsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.guard.Contract.serializeBinaryToWriter - ); - } - f = message.getRenterSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getGuardReceiveTime(); - if (f != null) { - writer.writeMessage( - 5, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getChangeLogList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 6, - f, - proto.guard.Log.serializeBinaryToWriter - ); - } - f = message.getCurrentTime(); - if (f != null) { - writer.writeMessage( - 7, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getGuardSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 8, - f - ); - } - f = message.getRentalState(); - if (f !== 0.0) { - writer.writeEnum( - 9, - f - ); - } - f = message.getPreparerPid(); - if (f.length > 0) { - writer.writeString( - 10, - f - ); - } - f = message.getPreparerSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 11, - f - ); - } -}; - - -/** - * @enum {number} - */ -proto.guard.FileStoreStatus.MetaState = { - DRAFT: 0, - UPLOADING: 1, - RUNNING: 2, - PARTIAL_LOST: 3, - LOST: 4, - DONE: 5, - CANCELED: 6, - RECREATED: 7 -}; - -/** - * @enum {number} - */ -proto.guard.FileStoreStatus.RentalState = { - NEW: 0, - PARTIAL_NEW: 1, - EXPIRED: 2, - RENEW: 3, - RECREATE: 4 -}; - -/** - * optional FileStoreMeta file_store_meta = 1; - * @return {?proto.guard.FileStoreMeta} - */ -proto.guard.FileStoreStatus.prototype.getFileStoreMeta = function() { - return /** @type{?proto.guard.FileStoreMeta} */ ( - jspb.Message.getWrapperField(this, proto.guard.FileStoreMeta, 1)); -}; - - -/** - * @param {?proto.guard.FileStoreMeta|undefined} value - * @return {!proto.guard.FileStoreStatus} returns this -*/ -proto.guard.FileStoreStatus.prototype.setFileStoreMeta = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.FileStoreStatus} returns this - */ -proto.guard.FileStoreStatus.prototype.clearFileStoreMeta = function() { - return this.setFileStoreMeta(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.FileStoreStatus.prototype.hasFileStoreMeta = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional MetaState state = 2; - * @return {!proto.guard.FileStoreStatus.MetaState} - */ -proto.guard.FileStoreStatus.prototype.getState = function() { - return /** @type {!proto.guard.FileStoreStatus.MetaState} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.guard.FileStoreStatus.MetaState} value - * @return {!proto.guard.FileStoreStatus} returns this - */ -proto.guard.FileStoreStatus.prototype.setState = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - -/** - * repeated Contract contracts = 3; - * @return {!Array} - */ -proto.guard.FileStoreStatus.prototype.getContractsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.guard.Contract, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.guard.FileStoreStatus} returns this -*/ -proto.guard.FileStoreStatus.prototype.setContractsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.guard.Contract=} opt_value - * @param {number=} opt_index - * @return {!proto.guard.Contract} - */ -proto.guard.FileStoreStatus.prototype.addContracts = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.guard.Contract, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.guard.FileStoreStatus} returns this - */ -proto.guard.FileStoreStatus.prototype.clearContractsList = function() { - return this.setContractsList([]); -}; - - -/** - * optional bytes renter_signature = 4; - * @return {!(string|Uint8Array)} - */ -proto.guard.FileStoreStatus.prototype.getRenterSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes renter_signature = 4; - * This is a type-conversion wrapper around `getRenterSignature()` - * @return {string} - */ -proto.guard.FileStoreStatus.prototype.getRenterSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRenterSignature())); -}; - - -/** - * optional bytes renter_signature = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRenterSignature()` - * @return {!Uint8Array} - */ -proto.guard.FileStoreStatus.prototype.getRenterSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRenterSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.FileStoreStatus} returns this - */ -proto.guard.FileStoreStatus.prototype.setRenterSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional google.protobuf.Timestamp guard_receive_time = 5; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.FileStoreStatus.prototype.getGuardReceiveTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.FileStoreStatus} returns this -*/ -proto.guard.FileStoreStatus.prototype.setGuardReceiveTime = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.FileStoreStatus} returns this - */ -proto.guard.FileStoreStatus.prototype.clearGuardReceiveTime = function() { - return this.setGuardReceiveTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.FileStoreStatus.prototype.hasGuardReceiveTime = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * repeated Log change_log = 6; - * @return {!Array} - */ -proto.guard.FileStoreStatus.prototype.getChangeLogList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.guard.Log, 6)); -}; - - -/** - * @param {!Array} value - * @return {!proto.guard.FileStoreStatus} returns this -*/ -proto.guard.FileStoreStatus.prototype.setChangeLogList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 6, value); -}; - - -/** - * @param {!proto.guard.Log=} opt_value - * @param {number=} opt_index - * @return {!proto.guard.Log} - */ -proto.guard.FileStoreStatus.prototype.addChangeLog = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.guard.Log, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.guard.FileStoreStatus} returns this - */ -proto.guard.FileStoreStatus.prototype.clearChangeLogList = function() { - return this.setChangeLogList([]); -}; - - -/** - * optional google.protobuf.Timestamp current_time = 7; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.FileStoreStatus.prototype.getCurrentTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 7)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.FileStoreStatus} returns this -*/ -proto.guard.FileStoreStatus.prototype.setCurrentTime = function(value) { - return jspb.Message.setWrapperField(this, 7, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.FileStoreStatus} returns this - */ -proto.guard.FileStoreStatus.prototype.clearCurrentTime = function() { - return this.setCurrentTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.FileStoreStatus.prototype.hasCurrentTime = function() { - return jspb.Message.getField(this, 7) != null; -}; - - -/** - * optional bytes guard_signature = 8; - * @return {!(string|Uint8Array)} - */ -proto.guard.FileStoreStatus.prototype.getGuardSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** - * optional bytes guard_signature = 8; - * This is a type-conversion wrapper around `getGuardSignature()` - * @return {string} - */ -proto.guard.FileStoreStatus.prototype.getGuardSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getGuardSignature())); -}; - - -/** - * optional bytes guard_signature = 8; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getGuardSignature()` - * @return {!Uint8Array} - */ -proto.guard.FileStoreStatus.prototype.getGuardSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getGuardSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.FileStoreStatus} returns this - */ -proto.guard.FileStoreStatus.prototype.setGuardSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 8, value); -}; - - -/** - * optional RentalState rental_state = 9; - * @return {!proto.guard.FileStoreStatus.RentalState} - */ -proto.guard.FileStoreStatus.prototype.getRentalState = function() { - return /** @type {!proto.guard.FileStoreStatus.RentalState} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {!proto.guard.FileStoreStatus.RentalState} value - * @return {!proto.guard.FileStoreStatus} returns this - */ -proto.guard.FileStoreStatus.prototype.setRentalState = function(value) { - return jspb.Message.setProto3EnumField(this, 9, value); -}; - - -/** - * optional string preparer_pid = 10; - * @return {string} - */ -proto.guard.FileStoreStatus.prototype.getPreparerPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.FileStoreStatus} returns this - */ -proto.guard.FileStoreStatus.prototype.setPreparerPid = function(value) { - return jspb.Message.setProto3StringField(this, 10, value); -}; - - -/** - * optional bytes preparer_signature = 11; - * @return {!(string|Uint8Array)} - */ -proto.guard.FileStoreStatus.prototype.getPreparerSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 11, "")); -}; - - -/** - * optional bytes preparer_signature = 11; - * This is a type-conversion wrapper around `getPreparerSignature()` - * @return {string} - */ -proto.guard.FileStoreStatus.prototype.getPreparerSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPreparerSignature())); -}; - - -/** - * optional bytes preparer_signature = 11; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPreparerSignature()` - * @return {!Uint8Array} - */ -proto.guard.FileStoreStatus.prototype.getPreparerSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPreparerSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.FileStoreStatus} returns this - */ -proto.guard.FileStoreStatus.prototype.setPreparerSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 11, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.ChallengeQuestion.prototype.toObject = function(opt_includeInstance) { - return proto.guard.ChallengeQuestion.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.ChallengeQuestion} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.ChallengeQuestion.toObject = function(includeInstance, msg) { - var f, obj = { - shardHash: jspb.Message.getFieldWithDefault(msg, 1, ""), - hostPid: jspb.Message.getFieldWithDefault(msg, 2, ""), - chunkIndex: jspb.Message.getFieldWithDefault(msg, 3, 0), - nonce: jspb.Message.getFieldWithDefault(msg, 4, ""), - expectAnswer: jspb.Message.getFieldWithDefault(msg, 5, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.guard.ChallengeQuestion} - */ -proto.guard.ChallengeQuestion.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.ChallengeQuestion; - return proto.guard.ChallengeQuestion.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.ChallengeQuestion} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.ChallengeQuestion} - */ -proto.guard.ChallengeQuestion.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.setShardHash(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setHostPid(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt32()); - msg.setChunkIndex(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setNonce(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setExpectAnswer(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.guard.ChallengeQuestion.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.ChallengeQuestion.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.ChallengeQuestion} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.ChallengeQuestion.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getShardHash(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getHostPid(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getChunkIndex(); - if (f !== 0) { - writer.writeInt32( - 3, - f - ); - } - f = message.getNonce(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getExpectAnswer(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } -}; - - -/** - * optional string shard_hash = 1; - * @return {string} - */ -proto.guard.ChallengeQuestion.prototype.getShardHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ChallengeQuestion} returns this - */ -proto.guard.ChallengeQuestion.prototype.setShardHash = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string host_pid = 2; - * @return {string} - */ -proto.guard.ChallengeQuestion.prototype.getHostPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ChallengeQuestion} returns this - */ -proto.guard.ChallengeQuestion.prototype.setHostPid = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional int32 chunk_index = 3; - * @return {number} - */ -proto.guard.ChallengeQuestion.prototype.getChunkIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.ChallengeQuestion} returns this - */ -proto.guard.ChallengeQuestion.prototype.setChunkIndex = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional string nonce = 4; - * @return {string} - */ -proto.guard.ChallengeQuestion.prototype.getNonce = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ChallengeQuestion} returns this - */ -proto.guard.ChallengeQuestion.prototype.setNonce = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional string expect_answer = 5; - * @return {string} - */ -proto.guard.ChallengeQuestion.prototype.getExpectAnswer = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ChallengeQuestion} returns this - */ -proto.guard.ChallengeQuestion.prototype.setExpectAnswer = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.ProofOfReplicateChallenge.prototype.toObject = function(opt_includeInstance) { - return proto.guard.ProofOfReplicateChallenge.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.ProofOfReplicateChallenge} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.ProofOfReplicateChallenge.toObject = function(includeInstance, msg) { - var f, obj = { - question: (f = msg.getQuestion()) && proto.guard.ChallengeQuestion.toObject(includeInstance, f), - challengeTime: (f = msg.getChallengeTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - guardPid: jspb.Message.getFieldWithDefault(msg, 3, ""), - guardSignature: msg.getGuardSignature_asB64(), - hostAnswer: jspb.Message.getFieldWithDefault(msg, 5, ""), - hostSignTime: (f = msg.getHostSignTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - hostSignature: msg.getHostSignature_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.guard.ProofOfReplicateChallenge} - */ -proto.guard.ProofOfReplicateChallenge.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.ProofOfReplicateChallenge; - return proto.guard.ProofOfReplicateChallenge.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.ProofOfReplicateChallenge} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.ProofOfReplicateChallenge} - */ -proto.guard.ProofOfReplicateChallenge.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.guard.ChallengeQuestion; - reader.readMessage(value,proto.guard.ChallengeQuestion.deserializeBinaryFromReader); - msg.setQuestion(value); - break; - case 2: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setChallengeTime(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setGuardPid(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setGuardSignature(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setHostAnswer(value); - break; - case 6: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setHostSignTime(value); - break; - case 7: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setHostSignature(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.guard.ProofOfReplicateChallenge.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.ProofOfReplicateChallenge.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.ProofOfReplicateChallenge} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.ProofOfReplicateChallenge.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getQuestion(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.guard.ChallengeQuestion.serializeBinaryToWriter - ); - } - f = message.getChallengeTime(); - if (f != null) { - writer.writeMessage( - 2, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getGuardPid(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getGuardSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getHostAnswer(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getHostSignTime(); - if (f != null) { - writer.writeMessage( - 6, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getHostSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 7, - f - ); - } -}; - - -/** - * optional ChallengeQuestion question = 1; - * @return {?proto.guard.ChallengeQuestion} - */ -proto.guard.ProofOfReplicateChallenge.prototype.getQuestion = function() { - return /** @type{?proto.guard.ChallengeQuestion} */ ( - jspb.Message.getWrapperField(this, proto.guard.ChallengeQuestion, 1)); -}; - - -/** - * @param {?proto.guard.ChallengeQuestion|undefined} value - * @return {!proto.guard.ProofOfReplicateChallenge} returns this -*/ -proto.guard.ProofOfReplicateChallenge.prototype.setQuestion = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.ProofOfReplicateChallenge} returns this - */ -proto.guard.ProofOfReplicateChallenge.prototype.clearQuestion = function() { - return this.setQuestion(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.ProofOfReplicateChallenge.prototype.hasQuestion = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional google.protobuf.Timestamp challenge_time = 2; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.ProofOfReplicateChallenge.prototype.getChallengeTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.ProofOfReplicateChallenge} returns this -*/ -proto.guard.ProofOfReplicateChallenge.prototype.setChallengeTime = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.ProofOfReplicateChallenge} returns this - */ -proto.guard.ProofOfReplicateChallenge.prototype.clearChallengeTime = function() { - return this.setChallengeTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.ProofOfReplicateChallenge.prototype.hasChallengeTime = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional string guard_pid = 3; - * @return {string} - */ -proto.guard.ProofOfReplicateChallenge.prototype.getGuardPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ProofOfReplicateChallenge} returns this - */ -proto.guard.ProofOfReplicateChallenge.prototype.setGuardPid = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional bytes guard_signature = 4; - * @return {!(string|Uint8Array)} - */ -proto.guard.ProofOfReplicateChallenge.prototype.getGuardSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes guard_signature = 4; - * This is a type-conversion wrapper around `getGuardSignature()` - * @return {string} - */ -proto.guard.ProofOfReplicateChallenge.prototype.getGuardSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getGuardSignature())); -}; - - -/** - * optional bytes guard_signature = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getGuardSignature()` - * @return {!Uint8Array} - */ -proto.guard.ProofOfReplicateChallenge.prototype.getGuardSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getGuardSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.ProofOfReplicateChallenge} returns this - */ -proto.guard.ProofOfReplicateChallenge.prototype.setGuardSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional string host_answer = 5; - * @return {string} - */ -proto.guard.ProofOfReplicateChallenge.prototype.getHostAnswer = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ProofOfReplicateChallenge} returns this - */ -proto.guard.ProofOfReplicateChallenge.prototype.setHostAnswer = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * optional google.protobuf.Timestamp host_sign_time = 6; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.ProofOfReplicateChallenge.prototype.getHostSignTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.ProofOfReplicateChallenge} returns this -*/ -proto.guard.ProofOfReplicateChallenge.prototype.setHostSignTime = function(value) { - return jspb.Message.setWrapperField(this, 6, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.ProofOfReplicateChallenge} returns this - */ -proto.guard.ProofOfReplicateChallenge.prototype.clearHostSignTime = function() { - return this.setHostSignTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.ProofOfReplicateChallenge.prototype.hasHostSignTime = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * optional bytes host_signature = 7; - * @return {!(string|Uint8Array)} - */ -proto.guard.ProofOfReplicateChallenge.prototype.getHostSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * optional bytes host_signature = 7; - * This is a type-conversion wrapper around `getHostSignature()` - * @return {string} - */ -proto.guard.ProofOfReplicateChallenge.prototype.getHostSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getHostSignature())); -}; - - -/** - * optional bytes host_signature = 7; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getHostSignature()` - * @return {!Uint8Array} - */ -proto.guard.ProofOfReplicateChallenge.prototype.getHostSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getHostSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.ProofOfReplicateChallenge} returns this - */ -proto.guard.ProofOfReplicateChallenge.prototype.setHostSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 7, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.guard.FileChallengeQuestions.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.FileChallengeQuestions.prototype.toObject = function(opt_includeInstance) { - return proto.guard.FileChallengeQuestions.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.FileChallengeQuestions} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.FileChallengeQuestions.toObject = function(includeInstance, msg) { - var f, obj = { - fileHash: jspb.Message.getFieldWithDefault(msg, 1, ""), - shardQuestionsList: jspb.Message.toObjectList(msg.getShardQuestionsList(), - proto.guard.ShardChallengeQuestions.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.guard.FileChallengeQuestions} - */ -proto.guard.FileChallengeQuestions.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.FileChallengeQuestions; - return proto.guard.FileChallengeQuestions.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.FileChallengeQuestions} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.FileChallengeQuestions} - */ -proto.guard.FileChallengeQuestions.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.setFileHash(value); - break; - case 2: - var value = new proto.guard.ShardChallengeQuestions; - reader.readMessage(value,proto.guard.ShardChallengeQuestions.deserializeBinaryFromReader); - msg.addShardQuestions(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.guard.FileChallengeQuestions.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.FileChallengeQuestions.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.FileChallengeQuestions} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.FileChallengeQuestions.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFileHash(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getShardQuestionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.guard.ShardChallengeQuestions.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string file_hash = 1; - * @return {string} - */ -proto.guard.FileChallengeQuestions.prototype.getFileHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.FileChallengeQuestions} returns this - */ -proto.guard.FileChallengeQuestions.prototype.setFileHash = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * repeated ShardChallengeQuestions shard_questions = 2; - * @return {!Array} - */ -proto.guard.FileChallengeQuestions.prototype.getShardQuestionsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.guard.ShardChallengeQuestions, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.guard.FileChallengeQuestions} returns this -*/ -proto.guard.FileChallengeQuestions.prototype.setShardQuestionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.guard.ShardChallengeQuestions=} opt_value - * @param {number=} opt_index - * @return {!proto.guard.ShardChallengeQuestions} - */ -proto.guard.FileChallengeQuestions.prototype.addShardQuestions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.guard.ShardChallengeQuestions, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.guard.FileChallengeQuestions} returns this - */ -proto.guard.FileChallengeQuestions.prototype.clearShardQuestionsList = function() { - return this.setShardQuestionsList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.guard.ShardChallengeQuestions.repeatedFields_ = [5]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.ShardChallengeQuestions.prototype.toObject = function(opt_includeInstance) { - return proto.guard.ShardChallengeQuestions.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.ShardChallengeQuestions} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.ShardChallengeQuestions.toObject = function(includeInstance, msg) { - var f, obj = { - fileHash: jspb.Message.getFieldWithDefault(msg, 1, ""), - shardHash: jspb.Message.getFieldWithDefault(msg, 2, ""), - preparerPid: jspb.Message.getFieldWithDefault(msg, 3, ""), - questionCount: jspb.Message.getFieldWithDefault(msg, 4, 0), - questionsList: jspb.Message.toObjectList(msg.getQuestionsList(), - proto.guard.ChallengeQuestion.toObject, includeInstance), - prepareTime: (f = msg.getPrepareTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - preparerSignature: msg.getPreparerSignature_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.guard.ShardChallengeQuestions} - */ -proto.guard.ShardChallengeQuestions.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.ShardChallengeQuestions; - return proto.guard.ShardChallengeQuestions.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.ShardChallengeQuestions} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.ShardChallengeQuestions} - */ -proto.guard.ShardChallengeQuestions.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.setFileHash(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setShardHash(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setPreparerPid(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt32()); - msg.setQuestionCount(value); - break; - case 5: - var value = new proto.guard.ChallengeQuestion; - reader.readMessage(value,proto.guard.ChallengeQuestion.deserializeBinaryFromReader); - msg.addQuestions(value); - break; - case 6: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setPrepareTime(value); - break; - case 7: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPreparerSignature(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.guard.ShardChallengeQuestions.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.ShardChallengeQuestions.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.ShardChallengeQuestions} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.ShardChallengeQuestions.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFileHash(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getShardHash(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getPreparerPid(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getQuestionCount(); - if (f !== 0) { - writer.writeInt32( - 4, - f - ); - } - f = message.getQuestionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 5, - f, - proto.guard.ChallengeQuestion.serializeBinaryToWriter - ); - } - f = message.getPrepareTime(); - if (f != null) { - writer.writeMessage( - 6, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getPreparerSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 7, - f - ); - } -}; - - -/** - * optional string file_hash = 1; - * @return {string} - */ -proto.guard.ShardChallengeQuestions.prototype.getFileHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ShardChallengeQuestions} returns this - */ -proto.guard.ShardChallengeQuestions.prototype.setFileHash = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string shard_hash = 2; - * @return {string} - */ -proto.guard.ShardChallengeQuestions.prototype.getShardHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ShardChallengeQuestions} returns this - */ -proto.guard.ShardChallengeQuestions.prototype.setShardHash = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string preparer_pid = 3; - * @return {string} - */ -proto.guard.ShardChallengeQuestions.prototype.getPreparerPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ShardChallengeQuestions} returns this - */ -proto.guard.ShardChallengeQuestions.prototype.setPreparerPid = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional int32 question_count = 4; - * @return {number} - */ -proto.guard.ShardChallengeQuestions.prototype.getQuestionCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.ShardChallengeQuestions} returns this - */ -proto.guard.ShardChallengeQuestions.prototype.setQuestionCount = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * repeated ChallengeQuestion questions = 5; - * @return {!Array} - */ -proto.guard.ShardChallengeQuestions.prototype.getQuestionsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.guard.ChallengeQuestion, 5)); -}; - - -/** - * @param {!Array} value - * @return {!proto.guard.ShardChallengeQuestions} returns this -*/ -proto.guard.ShardChallengeQuestions.prototype.setQuestionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 5, value); -}; - - -/** - * @param {!proto.guard.ChallengeQuestion=} opt_value - * @param {number=} opt_index - * @return {!proto.guard.ChallengeQuestion} - */ -proto.guard.ShardChallengeQuestions.prototype.addQuestions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.guard.ChallengeQuestion, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.guard.ShardChallengeQuestions} returns this - */ -proto.guard.ShardChallengeQuestions.prototype.clearQuestionsList = function() { - return this.setQuestionsList([]); -}; - - -/** - * optional google.protobuf.Timestamp prepare_time = 6; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.ShardChallengeQuestions.prototype.getPrepareTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.ShardChallengeQuestions} returns this -*/ -proto.guard.ShardChallengeQuestions.prototype.setPrepareTime = function(value) { - return jspb.Message.setWrapperField(this, 6, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.ShardChallengeQuestions} returns this - */ -proto.guard.ShardChallengeQuestions.prototype.clearPrepareTime = function() { - return this.setPrepareTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.ShardChallengeQuestions.prototype.hasPrepareTime = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * optional bytes preparer_signature = 7; - * @return {!(string|Uint8Array)} - */ -proto.guard.ShardChallengeQuestions.prototype.getPreparerSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * optional bytes preparer_signature = 7; - * This is a type-conversion wrapper around `getPreparerSignature()` - * @return {string} - */ -proto.guard.ShardChallengeQuestions.prototype.getPreparerSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPreparerSignature())); -}; - - -/** - * optional bytes preparer_signature = 7; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPreparerSignature()` - * @return {!Uint8Array} - */ -proto.guard.ShardChallengeQuestions.prototype.getPreparerSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPreparerSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.ShardChallengeQuestions} returns this - */ -proto.guard.ShardChallengeQuestions.prototype.setPreparerSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 7, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.CheckFileStoreMetaRequest.prototype.toObject = function(opt_includeInstance) { - return proto.guard.CheckFileStoreMetaRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.CheckFileStoreMetaRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.CheckFileStoreMetaRequest.toObject = function(includeInstance, msg) { - var f, obj = { - fileHash: jspb.Message.getFieldWithDefault(msg, 1, ""), - renterPid: jspb.Message.getFieldWithDefault(msg, 2, ""), - requesterPid: jspb.Message.getFieldWithDefault(msg, 3, ""), - requestTime: (f = msg.getRequestTime()) && google_protobuf_timestamp_pb.Timestamp.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.guard.CheckFileStoreMetaRequest} - */ -proto.guard.CheckFileStoreMetaRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.CheckFileStoreMetaRequest; - return proto.guard.CheckFileStoreMetaRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.CheckFileStoreMetaRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.CheckFileStoreMetaRequest} - */ -proto.guard.CheckFileStoreMetaRequest.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.setFileHash(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setRenterPid(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setRequesterPid(value); - break; - case 4: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setRequestTime(value); - break; - case 5: - 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.guard.CheckFileStoreMetaRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.CheckFileStoreMetaRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.CheckFileStoreMetaRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.CheckFileStoreMetaRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFileHash(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getRenterPid(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getRequesterPid(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getRequestTime(); - if (f != null) { - writer.writeMessage( - 4, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 5, - f - ); - } -}; - - -/** - * optional string file_hash = 1; - * @return {string} - */ -proto.guard.CheckFileStoreMetaRequest.prototype.getFileHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.CheckFileStoreMetaRequest} returns this - */ -proto.guard.CheckFileStoreMetaRequest.prototype.setFileHash = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string renter_pid = 2; - * @return {string} - */ -proto.guard.CheckFileStoreMetaRequest.prototype.getRenterPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.CheckFileStoreMetaRequest} returns this - */ -proto.guard.CheckFileStoreMetaRequest.prototype.setRenterPid = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string requester_pid = 3; - * @return {string} - */ -proto.guard.CheckFileStoreMetaRequest.prototype.getRequesterPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.CheckFileStoreMetaRequest} returns this - */ -proto.guard.CheckFileStoreMetaRequest.prototype.setRequesterPid = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional google.protobuf.Timestamp request_time = 4; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.CheckFileStoreMetaRequest.prototype.getRequestTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.CheckFileStoreMetaRequest} returns this -*/ -proto.guard.CheckFileStoreMetaRequest.prototype.setRequestTime = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.CheckFileStoreMetaRequest} returns this - */ -proto.guard.CheckFileStoreMetaRequest.prototype.clearRequestTime = function() { - return this.setRequestTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.CheckFileStoreMetaRequest.prototype.hasRequestTime = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional bytes signature = 5; - * @return {!(string|Uint8Array)} - */ -proto.guard.CheckFileStoreMetaRequest.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * optional bytes signature = 5; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.guard.CheckFileStoreMetaRequest.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 5; - * 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.guard.CheckFileStoreMetaRequest.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.CheckFileStoreMetaRequest} returns this - */ -proto.guard.CheckFileStoreMetaRequest.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.ListRenterFileInfoRequest.prototype.toObject = function(opt_includeInstance) { - return proto.guard.ListRenterFileInfoRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.ListRenterFileInfoRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.ListRenterFileInfoRequest.toObject = function(includeInstance, msg) { - var f, obj = { - renterPid: jspb.Message.getFieldWithDefault(msg, 1, ""), - requesterPid: jspb.Message.getFieldWithDefault(msg, 2, ""), - requestPageSize: jspb.Message.getFieldWithDefault(msg, 3, 0), - requestPageIndex: jspb.Message.getFieldWithDefault(msg, 4, 0), - requestTime: (f = msg.getRequestTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - lastModifyTime: (f = msg.getLastModifyTime()) && google_protobuf_timestamp_pb.Timestamp.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.guard.ListRenterFileInfoRequest} - */ -proto.guard.ListRenterFileInfoRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.ListRenterFileInfoRequest; - return proto.guard.ListRenterFileInfoRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.ListRenterFileInfoRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.ListRenterFileInfoRequest} - */ -proto.guard.ListRenterFileInfoRequest.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.setRenterPid(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setRequesterPid(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt32()); - msg.setRequestPageSize(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt32()); - msg.setRequestPageIndex(value); - break; - case 5: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setRequestTime(value); - break; - case 6: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setLastModifyTime(value); - break; - case 7: - 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.guard.ListRenterFileInfoRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.ListRenterFileInfoRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.ListRenterFileInfoRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.ListRenterFileInfoRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRenterPid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getRequesterPid(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getRequestPageSize(); - if (f !== 0) { - writer.writeInt32( - 3, - f - ); - } - f = message.getRequestPageIndex(); - if (f !== 0) { - writer.writeInt32( - 4, - f - ); - } - f = message.getRequestTime(); - if (f != null) { - writer.writeMessage( - 5, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getLastModifyTime(); - if (f != null) { - writer.writeMessage( - 6, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 7, - f - ); - } -}; - - -/** - * optional string renter_pid = 1; - * @return {string} - */ -proto.guard.ListRenterFileInfoRequest.prototype.getRenterPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ListRenterFileInfoRequest} returns this - */ -proto.guard.ListRenterFileInfoRequest.prototype.setRenterPid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string requester_pid = 2; - * @return {string} - */ -proto.guard.ListRenterFileInfoRequest.prototype.getRequesterPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ListRenterFileInfoRequest} returns this - */ -proto.guard.ListRenterFileInfoRequest.prototype.setRequesterPid = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional int32 request_page_size = 3; - * @return {number} - */ -proto.guard.ListRenterFileInfoRequest.prototype.getRequestPageSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.ListRenterFileInfoRequest} returns this - */ -proto.guard.ListRenterFileInfoRequest.prototype.setRequestPageSize = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int32 request_page_index = 4; - * @return {number} - */ -proto.guard.ListRenterFileInfoRequest.prototype.getRequestPageIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.ListRenterFileInfoRequest} returns this - */ -proto.guard.ListRenterFileInfoRequest.prototype.setRequestPageIndex = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional google.protobuf.Timestamp request_time = 5; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.ListRenterFileInfoRequest.prototype.getRequestTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.ListRenterFileInfoRequest} returns this -*/ -proto.guard.ListRenterFileInfoRequest.prototype.setRequestTime = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.ListRenterFileInfoRequest} returns this - */ -proto.guard.ListRenterFileInfoRequest.prototype.clearRequestTime = function() { - return this.setRequestTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.ListRenterFileInfoRequest.prototype.hasRequestTime = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional google.protobuf.Timestamp last_modify_time = 6; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.ListRenterFileInfoRequest.prototype.getLastModifyTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.ListRenterFileInfoRequest} returns this -*/ -proto.guard.ListRenterFileInfoRequest.prototype.setLastModifyTime = function(value) { - return jspb.Message.setWrapperField(this, 6, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.ListRenterFileInfoRequest} returns this - */ -proto.guard.ListRenterFileInfoRequest.prototype.clearLastModifyTime = function() { - return this.setLastModifyTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.ListRenterFileInfoRequest.prototype.hasLastModifyTime = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * optional bytes signature = 7; - * @return {!(string|Uint8Array)} - */ -proto.guard.ListRenterFileInfoRequest.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * optional bytes signature = 7; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.guard.ListRenterFileInfoRequest.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 7; - * 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.guard.ListRenterFileInfoRequest.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.ListRenterFileInfoRequest} returns this - */ -proto.guard.ListRenterFileInfoRequest.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 7, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.ListHostContractsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.guard.ListHostContractsRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.ListHostContractsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.ListHostContractsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - hostPid: jspb.Message.getFieldWithDefault(msg, 1, ""), - requesterPid: jspb.Message.getFieldWithDefault(msg, 2, ""), - requestPageSize: jspb.Message.getFieldWithDefault(msg, 3, 0), - requestPageIndex: jspb.Message.getFieldWithDefault(msg, 4, 0), - lastModifyTimeSince: (f = msg.getLastModifyTimeSince()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - lastModifyTimeTo: (f = msg.getLastModifyTimeTo()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - state: jspb.Message.getFieldWithDefault(msg, 7, 0), - requestTime: (f = msg.getRequestTime()) && google_protobuf_timestamp_pb.Timestamp.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.guard.ListHostContractsRequest} - */ -proto.guard.ListHostContractsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.ListHostContractsRequest; - return proto.guard.ListHostContractsRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.ListHostContractsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.ListHostContractsRequest} - */ -proto.guard.ListHostContractsRequest.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.setHostPid(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setRequesterPid(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt32()); - msg.setRequestPageSize(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt32()); - msg.setRequestPageIndex(value); - break; - case 5: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setLastModifyTimeSince(value); - break; - case 6: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setLastModifyTimeTo(value); - break; - case 7: - var value = /** @type {!proto.guard.ListHostContractsRequest.SelectState} */ (reader.readEnum()); - msg.setState(value); - break; - case 8: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setRequestTime(value); - break; - case 9: - 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.guard.ListHostContractsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.ListHostContractsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.ListHostContractsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.ListHostContractsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getHostPid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getRequesterPid(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getRequestPageSize(); - if (f !== 0) { - writer.writeInt32( - 3, - f - ); - } - f = message.getRequestPageIndex(); - if (f !== 0) { - writer.writeInt32( - 4, - f - ); - } - f = message.getLastModifyTimeSince(); - if (f != null) { - writer.writeMessage( - 5, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getLastModifyTimeTo(); - if (f != null) { - writer.writeMessage( - 6, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getState(); - if (f !== 0.0) { - writer.writeEnum( - 7, - f - ); - } - f = message.getRequestTime(); - if (f != null) { - writer.writeMessage( - 8, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 9, - f - ); - } -}; - - -/** - * @enum {number} - */ -proto.guard.ListHostContractsRequest.SelectState = { - ALL: 0, - ACTIVE: 1, - CLOSED: 2 -}; - -/** - * optional string host_pid = 1; - * @return {string} - */ -proto.guard.ListHostContractsRequest.prototype.getHostPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ListHostContractsRequest} returns this - */ -proto.guard.ListHostContractsRequest.prototype.setHostPid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string requester_pid = 2; - * @return {string} - */ -proto.guard.ListHostContractsRequest.prototype.getRequesterPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ListHostContractsRequest} returns this - */ -proto.guard.ListHostContractsRequest.prototype.setRequesterPid = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional int32 request_page_size = 3; - * @return {number} - */ -proto.guard.ListHostContractsRequest.prototype.getRequestPageSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.ListHostContractsRequest} returns this - */ -proto.guard.ListHostContractsRequest.prototype.setRequestPageSize = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int32 request_page_index = 4; - * @return {number} - */ -proto.guard.ListHostContractsRequest.prototype.getRequestPageIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.ListHostContractsRequest} returns this - */ -proto.guard.ListHostContractsRequest.prototype.setRequestPageIndex = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional google.protobuf.Timestamp last_modify_time_since = 5; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.ListHostContractsRequest.prototype.getLastModifyTimeSince = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.ListHostContractsRequest} returns this -*/ -proto.guard.ListHostContractsRequest.prototype.setLastModifyTimeSince = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.ListHostContractsRequest} returns this - */ -proto.guard.ListHostContractsRequest.prototype.clearLastModifyTimeSince = function() { - return this.setLastModifyTimeSince(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.ListHostContractsRequest.prototype.hasLastModifyTimeSince = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional google.protobuf.Timestamp last_modify_time_to = 6; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.ListHostContractsRequest.prototype.getLastModifyTimeTo = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.ListHostContractsRequest} returns this -*/ -proto.guard.ListHostContractsRequest.prototype.setLastModifyTimeTo = function(value) { - return jspb.Message.setWrapperField(this, 6, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.ListHostContractsRequest} returns this - */ -proto.guard.ListHostContractsRequest.prototype.clearLastModifyTimeTo = function() { - return this.setLastModifyTimeTo(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.ListHostContractsRequest.prototype.hasLastModifyTimeTo = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * optional SelectState state = 7; - * @return {!proto.guard.ListHostContractsRequest.SelectState} - */ -proto.guard.ListHostContractsRequest.prototype.getState = function() { - return /** @type {!proto.guard.ListHostContractsRequest.SelectState} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {!proto.guard.ListHostContractsRequest.SelectState} value - * @return {!proto.guard.ListHostContractsRequest} returns this - */ -proto.guard.ListHostContractsRequest.prototype.setState = function(value) { - return jspb.Message.setProto3EnumField(this, 7, value); -}; - - -/** - * optional google.protobuf.Timestamp request_time = 8; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.ListHostContractsRequest.prototype.getRequestTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 8)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.ListHostContractsRequest} returns this -*/ -proto.guard.ListHostContractsRequest.prototype.setRequestTime = function(value) { - return jspb.Message.setWrapperField(this, 8, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.ListHostContractsRequest} returns this - */ -proto.guard.ListHostContractsRequest.prototype.clearRequestTime = function() { - return this.setRequestTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.ListHostContractsRequest.prototype.hasRequestTime = function() { - return jspb.Message.getField(this, 8) != null; -}; - - -/** - * optional bytes signature = 9; - * @return {!(string|Uint8Array)} - */ -proto.guard.ListHostContractsRequest.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, "")); -}; - - -/** - * optional bytes signature = 9; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.guard.ListHostContractsRequest.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 9; - * 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.guard.ListHostContractsRequest.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.ListHostContractsRequest} returns this - */ -proto.guard.ListHostContractsRequest.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 9, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.guard.ContractsList.repeatedFields_ = [3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.ContractsList.prototype.toObject = function(opt_includeInstance) { - return proto.guard.ContractsList.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.ContractsList} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.ContractsList.toObject = function(includeInstance, msg) { - var f, obj = { - request: (f = msg.getRequest()) && proto.guard.ListHostContractsRequest.toObject(includeInstance, f), - generateTime: (f = msg.getGenerateTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - contractsList: jspb.Message.toObjectList(msg.getContractsList(), - proto.guard.Contract.toObject, includeInstance), - count: jspb.Message.getFieldWithDefault(msg, 4, 0), - 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.guard.ContractsList} - */ -proto.guard.ContractsList.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.ContractsList; - return proto.guard.ContractsList.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.ContractsList} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.ContractsList} - */ -proto.guard.ContractsList.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.guard.ListHostContractsRequest; - reader.readMessage(value,proto.guard.ListHostContractsRequest.deserializeBinaryFromReader); - msg.setRequest(value); - break; - case 2: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setGenerateTime(value); - break; - case 3: - var value = new proto.guard.Contract; - reader.readMessage(value,proto.guard.Contract.deserializeBinaryFromReader); - msg.addContracts(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt32()); - msg.setCount(value); - break; - case 5: - 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.guard.ContractsList.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.ContractsList.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.ContractsList} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.ContractsList.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRequest(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.guard.ListHostContractsRequest.serializeBinaryToWriter - ); - } - f = message.getGenerateTime(); - if (f != null) { - writer.writeMessage( - 2, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getContractsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.guard.Contract.serializeBinaryToWriter - ); - } - f = message.getCount(); - if (f !== 0) { - writer.writeInt32( - 4, - f - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 5, - f - ); - } -}; - - -/** - * optional ListHostContractsRequest request = 1; - * @return {?proto.guard.ListHostContractsRequest} - */ -proto.guard.ContractsList.prototype.getRequest = function() { - return /** @type{?proto.guard.ListHostContractsRequest} */ ( - jspb.Message.getWrapperField(this, proto.guard.ListHostContractsRequest, 1)); -}; - - -/** - * @param {?proto.guard.ListHostContractsRequest|undefined} value - * @return {!proto.guard.ContractsList} returns this -*/ -proto.guard.ContractsList.prototype.setRequest = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.ContractsList} returns this - */ -proto.guard.ContractsList.prototype.clearRequest = function() { - return this.setRequest(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.ContractsList.prototype.hasRequest = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional google.protobuf.Timestamp generate_time = 2; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.ContractsList.prototype.getGenerateTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.ContractsList} returns this -*/ -proto.guard.ContractsList.prototype.setGenerateTime = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.ContractsList} returns this - */ -proto.guard.ContractsList.prototype.clearGenerateTime = function() { - return this.setGenerateTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.ContractsList.prototype.hasGenerateTime = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * repeated Contract contracts = 3; - * @return {!Array} - */ -proto.guard.ContractsList.prototype.getContractsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.guard.Contract, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.guard.ContractsList} returns this -*/ -proto.guard.ContractsList.prototype.setContractsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.guard.Contract=} opt_value - * @param {number=} opt_index - * @return {!proto.guard.Contract} - */ -proto.guard.ContractsList.prototype.addContracts = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.guard.Contract, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.guard.ContractsList} returns this - */ -proto.guard.ContractsList.prototype.clearContractsList = function() { - return this.setContractsList([]); -}; - - -/** - * optional int32 count = 4; - * @return {number} - */ -proto.guard.ContractsList.prototype.getCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.ContractsList} returns this - */ -proto.guard.ContractsList.prototype.setCount = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional bytes signature = 5; - * @return {!(string|Uint8Array)} - */ -proto.guard.ContractsList.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * optional bytes signature = 5; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.guard.ContractsList.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 5; - * 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.guard.ContractsList.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.ContractsList} returns this - */ -proto.guard.ContractsList.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.ReadyForChallengeRequest.prototype.toObject = function(opt_includeInstance) { - return proto.guard.ReadyForChallengeRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.ReadyForChallengeRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.ReadyForChallengeRequest.toObject = function(includeInstance, msg) { - var f, obj = { - renterPid: jspb.Message.getFieldWithDefault(msg, 1, ""), - fileHash: jspb.Message.getFieldWithDefault(msg, 2, ""), - shardHash: jspb.Message.getFieldWithDefault(msg, 3, ""), - contractId: jspb.Message.getFieldWithDefault(msg, 4, ""), - hostPid: jspb.Message.getFieldWithDefault(msg, 5, ""), - prepareTime: (f = msg.getPrepareTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - signature: msg.getSignature_asB64(), - isRepair: jspb.Message.getBooleanFieldWithDefault(msg, 8, 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.guard.ReadyForChallengeRequest} - */ -proto.guard.ReadyForChallengeRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.ReadyForChallengeRequest; - return proto.guard.ReadyForChallengeRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.ReadyForChallengeRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.ReadyForChallengeRequest} - */ -proto.guard.ReadyForChallengeRequest.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.setRenterPid(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setFileHash(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setShardHash(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setContractId(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setHostPid(value); - break; - case 6: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setPrepareTime(value); - break; - case 7: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSignature(value); - break; - case 8: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsRepair(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.guard.ReadyForChallengeRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.ReadyForChallengeRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.ReadyForChallengeRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.ReadyForChallengeRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRenterPid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getFileHash(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getShardHash(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getContractId(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getHostPid(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getPrepareTime(); - if (f != null) { - writer.writeMessage( - 6, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 7, - f - ); - } - f = message.getIsRepair(); - if (f) { - writer.writeBool( - 8, - f - ); - } -}; - - -/** - * optional string renter_pid = 1; - * @return {string} - */ -proto.guard.ReadyForChallengeRequest.prototype.getRenterPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ReadyForChallengeRequest} returns this - */ -proto.guard.ReadyForChallengeRequest.prototype.setRenterPid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string file_hash = 2; - * @return {string} - */ -proto.guard.ReadyForChallengeRequest.prototype.getFileHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ReadyForChallengeRequest} returns this - */ -proto.guard.ReadyForChallengeRequest.prototype.setFileHash = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string shard_hash = 3; - * @return {string} - */ -proto.guard.ReadyForChallengeRequest.prototype.getShardHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ReadyForChallengeRequest} returns this - */ -proto.guard.ReadyForChallengeRequest.prototype.setShardHash = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string contract_id = 4; - * @return {string} - */ -proto.guard.ReadyForChallengeRequest.prototype.getContractId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ReadyForChallengeRequest} returns this - */ -proto.guard.ReadyForChallengeRequest.prototype.setContractId = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional string host_pid = 5; - * @return {string} - */ -proto.guard.ReadyForChallengeRequest.prototype.getHostPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ReadyForChallengeRequest} returns this - */ -proto.guard.ReadyForChallengeRequest.prototype.setHostPid = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * optional google.protobuf.Timestamp prepare_time = 6; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.ReadyForChallengeRequest.prototype.getPrepareTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.ReadyForChallengeRequest} returns this -*/ -proto.guard.ReadyForChallengeRequest.prototype.setPrepareTime = function(value) { - return jspb.Message.setWrapperField(this, 6, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.ReadyForChallengeRequest} returns this - */ -proto.guard.ReadyForChallengeRequest.prototype.clearPrepareTime = function() { - return this.setPrepareTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.ReadyForChallengeRequest.prototype.hasPrepareTime = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * optional bytes signature = 7; - * @return {!(string|Uint8Array)} - */ -proto.guard.ReadyForChallengeRequest.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * optional bytes signature = 7; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.guard.ReadyForChallengeRequest.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 7; - * 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.guard.ReadyForChallengeRequest.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.ReadyForChallengeRequest} returns this - */ -proto.guard.ReadyForChallengeRequest.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 7, value); -}; - - -/** - * optional bool is_repair = 8; - * @return {boolean} - */ -proto.guard.ReadyForChallengeRequest.prototype.getIsRepair = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.guard.ReadyForChallengeRequest} returns this - */ -proto.guard.ReadyForChallengeRequest.prototype.setIsRepair = function(value) { - return jspb.Message.setProto3BooleanField(this, 8, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.RequestChallengeQuestion.prototype.toObject = function(opt_includeInstance) { - return proto.guard.RequestChallengeQuestion.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.RequestChallengeQuestion} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.RequestChallengeQuestion.toObject = function(includeInstance, msg) { - var f, obj = { - question: (f = msg.getQuestion()) && proto.guard.ChallengeQuestion.toObject(includeInstance, f), - prepareTime: (f = msg.getPrepareTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - signature: msg.getSignature_asB64(), - isRepair: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), - fileHash: jspb.Message.getFieldWithDefault(msg, 5, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.guard.RequestChallengeQuestion} - */ -proto.guard.RequestChallengeQuestion.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.RequestChallengeQuestion; - return proto.guard.RequestChallengeQuestion.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.RequestChallengeQuestion} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.RequestChallengeQuestion} - */ -proto.guard.RequestChallengeQuestion.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.guard.ChallengeQuestion; - reader.readMessage(value,proto.guard.ChallengeQuestion.deserializeBinaryFromReader); - msg.setQuestion(value); - break; - case 2: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setPrepareTime(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSignature(value); - break; - case 4: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsRepair(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setFileHash(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.guard.RequestChallengeQuestion.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.RequestChallengeQuestion.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.RequestChallengeQuestion} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.RequestChallengeQuestion.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getQuestion(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.guard.ChallengeQuestion.serializeBinaryToWriter - ); - } - f = message.getPrepareTime(); - if (f != null) { - writer.writeMessage( - 2, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getIsRepair(); - if (f) { - writer.writeBool( - 4, - f - ); - } - f = message.getFileHash(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } -}; - - -/** - * optional ChallengeQuestion question = 1; - * @return {?proto.guard.ChallengeQuestion} - */ -proto.guard.RequestChallengeQuestion.prototype.getQuestion = function() { - return /** @type{?proto.guard.ChallengeQuestion} */ ( - jspb.Message.getWrapperField(this, proto.guard.ChallengeQuestion, 1)); -}; - - -/** - * @param {?proto.guard.ChallengeQuestion|undefined} value - * @return {!proto.guard.RequestChallengeQuestion} returns this -*/ -proto.guard.RequestChallengeQuestion.prototype.setQuestion = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.RequestChallengeQuestion} returns this - */ -proto.guard.RequestChallengeQuestion.prototype.clearQuestion = function() { - return this.setQuestion(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.RequestChallengeQuestion.prototype.hasQuestion = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional google.protobuf.Timestamp prepare_time = 2; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.RequestChallengeQuestion.prototype.getPrepareTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.RequestChallengeQuestion} returns this -*/ -proto.guard.RequestChallengeQuestion.prototype.setPrepareTime = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.RequestChallengeQuestion} returns this - */ -proto.guard.RequestChallengeQuestion.prototype.clearPrepareTime = function() { - return this.setPrepareTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.RequestChallengeQuestion.prototype.hasPrepareTime = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional bytes signature = 3; - * @return {!(string|Uint8Array)} - */ -proto.guard.RequestChallengeQuestion.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes signature = 3; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.guard.RequestChallengeQuestion.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 3; - * 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.guard.RequestChallengeQuestion.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.RequestChallengeQuestion} returns this - */ -proto.guard.RequestChallengeQuestion.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional bool is_repair = 4; - * @return {boolean} - */ -proto.guard.RequestChallengeQuestion.prototype.getIsRepair = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.guard.RequestChallengeQuestion} returns this - */ -proto.guard.RequestChallengeQuestion.prototype.setIsRepair = function(value) { - return jspb.Message.setProto3BooleanField(this, 4, value); -}; - - -/** - * optional string file_hash = 5; - * @return {string} - */ -proto.guard.RequestChallengeQuestion.prototype.getFileHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.RequestChallengeQuestion} returns this - */ -proto.guard.RequestChallengeQuestion.prototype.setFileHash = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.ResponseChallengeQuestion.prototype.toObject = function(opt_includeInstance) { - return proto.guard.ResponseChallengeQuestion.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.ResponseChallengeQuestion} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.ResponseChallengeQuestion.toObject = function(includeInstance, msg) { - var f, obj = { - answer: (f = msg.getAnswer()) && proto.guard.ChallengeQuestion.toObject(includeInstance, f), - hostPid: jspb.Message.getFieldWithDefault(msg, 2, ""), - resolveTime: (f = msg.getResolveTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - signature: msg.getSignature_asB64(), - isRepair: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), - fileHash: jspb.Message.getFieldWithDefault(msg, 6, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.guard.ResponseChallengeQuestion} - */ -proto.guard.ResponseChallengeQuestion.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.ResponseChallengeQuestion; - return proto.guard.ResponseChallengeQuestion.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.ResponseChallengeQuestion} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.ResponseChallengeQuestion} - */ -proto.guard.ResponseChallengeQuestion.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.guard.ChallengeQuestion; - reader.readMessage(value,proto.guard.ChallengeQuestion.deserializeBinaryFromReader); - msg.setAnswer(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setHostPid(value); - break; - case 3: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setResolveTime(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSignature(value); - break; - case 5: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsRepair(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setFileHash(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.guard.ResponseChallengeQuestion.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.ResponseChallengeQuestion.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.ResponseChallengeQuestion} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.ResponseChallengeQuestion.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAnswer(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.guard.ChallengeQuestion.serializeBinaryToWriter - ); - } - f = message.getHostPid(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getResolveTime(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getIsRepair(); - if (f) { - writer.writeBool( - 5, - f - ); - } - f = message.getFileHash(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } -}; - - -/** - * optional ChallengeQuestion answer = 1; - * @return {?proto.guard.ChallengeQuestion} - */ -proto.guard.ResponseChallengeQuestion.prototype.getAnswer = function() { - return /** @type{?proto.guard.ChallengeQuestion} */ ( - jspb.Message.getWrapperField(this, proto.guard.ChallengeQuestion, 1)); -}; - - -/** - * @param {?proto.guard.ChallengeQuestion|undefined} value - * @return {!proto.guard.ResponseChallengeQuestion} returns this -*/ -proto.guard.ResponseChallengeQuestion.prototype.setAnswer = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.ResponseChallengeQuestion} returns this - */ -proto.guard.ResponseChallengeQuestion.prototype.clearAnswer = function() { - return this.setAnswer(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.ResponseChallengeQuestion.prototype.hasAnswer = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string host_pid = 2; - * @return {string} - */ -proto.guard.ResponseChallengeQuestion.prototype.getHostPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ResponseChallengeQuestion} returns this - */ -proto.guard.ResponseChallengeQuestion.prototype.setHostPid = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional google.protobuf.Timestamp resolve_time = 3; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.ResponseChallengeQuestion.prototype.getResolveTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.ResponseChallengeQuestion} returns this -*/ -proto.guard.ResponseChallengeQuestion.prototype.setResolveTime = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.ResponseChallengeQuestion} returns this - */ -proto.guard.ResponseChallengeQuestion.prototype.clearResolveTime = function() { - return this.setResolveTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.ResponseChallengeQuestion.prototype.hasResolveTime = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional bytes signature = 4; - * @return {!(string|Uint8Array)} - */ -proto.guard.ResponseChallengeQuestion.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.guard.ResponseChallengeQuestion.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.guard.ResponseChallengeQuestion.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.ResponseChallengeQuestion} returns this - */ -proto.guard.ResponseChallengeQuestion.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional bool is_repair = 5; - * @return {boolean} - */ -proto.guard.ResponseChallengeQuestion.prototype.getIsRepair = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.guard.ResponseChallengeQuestion} returns this - */ -proto.guard.ResponseChallengeQuestion.prototype.setIsRepair = function(value) { - return jspb.Message.setProto3BooleanField(this, 5, value); -}; - - -/** - * optional string file_hash = 6; - * @return {string} - */ -proto.guard.ResponseChallengeQuestion.prototype.getFileHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ResponseChallengeQuestion} returns this - */ -proto.guard.ResponseChallengeQuestion.prototype.setFileHash = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.ForceRepairRequest.prototype.toObject = function(opt_includeInstance) { - return proto.guard.ForceRepairRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.ForceRepairRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.ForceRepairRequest.toObject = function(includeInstance, msg) { - var f, obj = { - renterPid: jspb.Message.getFieldWithDefault(msg, 1, ""), - fileHash: jspb.Message.getFieldWithDefault(msg, 2, ""), - authPid: jspb.Message.getFieldWithDefault(msg, 3, ""), - 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.guard.ForceRepairRequest} - */ -proto.guard.ForceRepairRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.ForceRepairRequest; - return proto.guard.ForceRepairRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.ForceRepairRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.ForceRepairRequest} - */ -proto.guard.ForceRepairRequest.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.setRenterPid(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setFileHash(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setAuthPid(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.guard.ForceRepairRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.ForceRepairRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.ForceRepairRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.ForceRepairRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRenterPid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getFileHash(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getAuthPid(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } -}; - - -/** - * optional string renter_pid = 1; - * @return {string} - */ -proto.guard.ForceRepairRequest.prototype.getRenterPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ForceRepairRequest} returns this - */ -proto.guard.ForceRepairRequest.prototype.setRenterPid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string file_hash = 2; - * @return {string} - */ -proto.guard.ForceRepairRequest.prototype.getFileHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ForceRepairRequest} returns this - */ -proto.guard.ForceRepairRequest.prototype.setFileHash = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string auth_pid = 3; - * @return {string} - */ -proto.guard.ForceRepairRequest.prototype.getAuthPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ForceRepairRequest} returns this - */ -proto.guard.ForceRepairRequest.prototype.setAuthPid = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional bytes signature = 4; - * @return {!(string|Uint8Array)} - */ -proto.guard.ForceRepairRequest.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.guard.ForceRepairRequest.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.guard.ForceRepairRequest.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.ForceRepairRequest} returns this - */ -proto.guard.ForceRepairRequest.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.Result.prototype.toObject = function(opt_includeInstance) { - return proto.guard.Result.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.Result} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.Result.toObject = function(includeInstance, msg) { - var f, obj = { - code: jspb.Message.getFieldWithDefault(msg, 1, 0), - message: jspb.Message.getFieldWithDefault(msg, 2, ""), - responseTime: (f = msg.getResponseTime()) && google_protobuf_timestamp_pb.Timestamp.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.guard.Result} - */ -proto.guard.Result.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.Result; - return proto.guard.Result.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.Result} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.Result} - */ -proto.guard.Result.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.guard.ResponseCode} */ (reader.readEnum()); - msg.setCode(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setMessage(value); - break; - case 3: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setResponseTime(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.guard.Result.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.Result.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.Result} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.Result.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getCode(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getMessage(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getResponseTime(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } -}; - - -/** - * optional ResponseCode code = 1; - * @return {!proto.guard.ResponseCode} - */ -proto.guard.Result.prototype.getCode = function() { - return /** @type {!proto.guard.ResponseCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.guard.ResponseCode} value - * @return {!proto.guard.Result} returns this - */ -proto.guard.Result.prototype.setCode = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional string message = 2; - * @return {string} - */ -proto.guard.Result.prototype.getMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.Result} returns this - */ -proto.guard.Result.prototype.setMessage = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional google.protobuf.Timestamp response_time = 3; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.Result.prototype.getResponseTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.Result} returns this -*/ -proto.guard.Result.prototype.setResponseTime = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.Result} returns this - */ -proto.guard.Result.prototype.clearResponseTime = function() { - return this.setResponseTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.Result.prototype.hasResponseTime = function() { - return jspb.Message.getField(this, 3) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.guard.RepairContract.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.RepairContract.prototype.toObject = function(opt_includeInstance) { - return proto.guard.RepairContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.RepairContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.RepairContract.toObject = function(includeInstance, msg) { - var f, obj = { - fileHash: jspb.Message.getFieldWithDefault(msg, 1, ""), - lostShardHashList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, - fileSize: jspb.Message.getFieldWithDefault(msg, 3, 0), - downloadRewardAmount: jspb.Message.getFieldWithDefault(msg, 4, 0), - repairRewardAmount: jspb.Message.getFieldWithDefault(msg, 5, 0), - repairPid: jspb.Message.getFieldWithDefault(msg, 6, ""), - repairSignTime: (f = msg.getRepairSignTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - repairSignature: msg.getRepairSignature_asB64(), - downloadContractId: jspb.Message.getFieldWithDefault(msg, 9, ""), - repairContractId: jspb.Message.getFieldWithDefault(msg, 10, ""), - guardSignTime: (f = msg.getGuardSignTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - guardSignature: msg.getGuardSignature_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.guard.RepairContract} - */ -proto.guard.RepairContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.RepairContract; - return proto.guard.RepairContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.RepairContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.RepairContract} - */ -proto.guard.RepairContract.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.setFileHash(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.addLostShardHash(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFileSize(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setDownloadRewardAmount(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setRepairRewardAmount(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setRepairPid(value); - break; - case 7: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setRepairSignTime(value); - break; - case 8: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRepairSignature(value); - break; - case 9: - var value = /** @type {string} */ (reader.readString()); - msg.setDownloadContractId(value); - break; - case 10: - var value = /** @type {string} */ (reader.readString()); - msg.setRepairContractId(value); - break; - case 11: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setGuardSignTime(value); - break; - case 12: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setGuardSignature(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.guard.RepairContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.RepairContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.RepairContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.RepairContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFileHash(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getLostShardHashList(); - if (f.length > 0) { - writer.writeRepeatedString( - 2, - f - ); - } - f = message.getFileSize(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getDownloadRewardAmount(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getRepairRewardAmount(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getRepairPid(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } - f = message.getRepairSignTime(); - if (f != null) { - writer.writeMessage( - 7, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getRepairSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 8, - f - ); - } - f = message.getDownloadContractId(); - if (f.length > 0) { - writer.writeString( - 9, - f - ); - } - f = message.getRepairContractId(); - if (f.length > 0) { - writer.writeString( - 10, - f - ); - } - f = message.getGuardSignTime(); - if (f != null) { - writer.writeMessage( - 11, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getGuardSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 12, - f - ); - } -}; - - -/** - * optional string file_hash = 1; - * @return {string} - */ -proto.guard.RepairContract.prototype.getFileHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.RepairContract} returns this - */ -proto.guard.RepairContract.prototype.setFileHash = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * repeated string lost_shard_hash = 2; - * @return {!Array} - */ -proto.guard.RepairContract.prototype.getLostShardHashList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.guard.RepairContract} returns this - */ -proto.guard.RepairContract.prototype.setLostShardHashList = function(value) { - return jspb.Message.setField(this, 2, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.guard.RepairContract} returns this - */ -proto.guard.RepairContract.prototype.addLostShardHash = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.guard.RepairContract} returns this - */ -proto.guard.RepairContract.prototype.clearLostShardHashList = function() { - return this.setLostShardHashList([]); -}; - - -/** - * optional int64 file_size = 3; - * @return {number} - */ -proto.guard.RepairContract.prototype.getFileSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.RepairContract} returns this - */ -proto.guard.RepairContract.prototype.setFileSize = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int64 download_reward_amount = 4; - * @return {number} - */ -proto.guard.RepairContract.prototype.getDownloadRewardAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.RepairContract} returns this - */ -proto.guard.RepairContract.prototype.setDownloadRewardAmount = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional int64 repair_reward_amount = 5; - * @return {number} - */ -proto.guard.RepairContract.prototype.getRepairRewardAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.RepairContract} returns this - */ -proto.guard.RepairContract.prototype.setRepairRewardAmount = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional string repair_pid = 6; - * @return {string} - */ -proto.guard.RepairContract.prototype.getRepairPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.RepairContract} returns this - */ -proto.guard.RepairContract.prototype.setRepairPid = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); -}; - - -/** - * optional google.protobuf.Timestamp repair_sign_time = 7; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.RepairContract.prototype.getRepairSignTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 7)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.RepairContract} returns this -*/ -proto.guard.RepairContract.prototype.setRepairSignTime = function(value) { - return jspb.Message.setWrapperField(this, 7, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.RepairContract} returns this - */ -proto.guard.RepairContract.prototype.clearRepairSignTime = function() { - return this.setRepairSignTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.RepairContract.prototype.hasRepairSignTime = function() { - return jspb.Message.getField(this, 7) != null; -}; - - -/** - * optional bytes repair_signature = 8; - * @return {!(string|Uint8Array)} - */ -proto.guard.RepairContract.prototype.getRepairSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** - * optional bytes repair_signature = 8; - * This is a type-conversion wrapper around `getRepairSignature()` - * @return {string} - */ -proto.guard.RepairContract.prototype.getRepairSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRepairSignature())); -}; - - -/** - * optional bytes repair_signature = 8; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRepairSignature()` - * @return {!Uint8Array} - */ -proto.guard.RepairContract.prototype.getRepairSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRepairSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.RepairContract} returns this - */ -proto.guard.RepairContract.prototype.setRepairSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 8, value); -}; - - -/** - * optional string download_contract_id = 9; - * @return {string} - */ -proto.guard.RepairContract.prototype.getDownloadContractId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.RepairContract} returns this - */ -proto.guard.RepairContract.prototype.setDownloadContractId = function(value) { - return jspb.Message.setProto3StringField(this, 9, value); -}; - - -/** - * optional string repair_contract_id = 10; - * @return {string} - */ -proto.guard.RepairContract.prototype.getRepairContractId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.RepairContract} returns this - */ -proto.guard.RepairContract.prototype.setRepairContractId = function(value) { - return jspb.Message.setProto3StringField(this, 10, value); -}; - - -/** - * optional google.protobuf.Timestamp guard_sign_time = 11; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.RepairContract.prototype.getGuardSignTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 11)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.RepairContract} returns this -*/ -proto.guard.RepairContract.prototype.setGuardSignTime = function(value) { - return jspb.Message.setWrapperField(this, 11, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.RepairContract} returns this - */ -proto.guard.RepairContract.prototype.clearGuardSignTime = function() { - return this.setGuardSignTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.RepairContract.prototype.hasGuardSignTime = function() { - return jspb.Message.getField(this, 11) != null; -}; - - -/** - * optional bytes guard_signature = 12; - * @return {!(string|Uint8Array)} - */ -proto.guard.RepairContract.prototype.getGuardSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 12, "")); -}; - - -/** - * optional bytes guard_signature = 12; - * This is a type-conversion wrapper around `getGuardSignature()` - * @return {string} - */ -proto.guard.RepairContract.prototype.getGuardSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getGuardSignature())); -}; - - -/** - * optional bytes guard_signature = 12; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getGuardSignature()` - * @return {!Uint8Array} - */ -proto.guard.RepairContract.prototype.getGuardSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getGuardSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.RepairContract} returns this - */ -proto.guard.RepairContract.prototype.setGuardSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 12, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.RepairContractResponse.prototype.toObject = function(opt_includeInstance) { - return proto.guard.RepairContractResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.RepairContractResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.RepairContractResponse.toObject = function(includeInstance, msg) { - var f, obj = { - contract: (f = msg.getContract()) && proto.guard.RepairContract.toObject(includeInstance, f), - status: 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.guard.RepairContractResponse} - */ -proto.guard.RepairContractResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.RepairContractResponse; - return proto.guard.RepairContractResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.RepairContractResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.RepairContractResponse} - */ -proto.guard.RepairContractResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.guard.RepairContract; - reader.readMessage(value,proto.guard.RepairContract.deserializeBinaryFromReader); - msg.setContract(value); - break; - case 2: - var value = /** @type {!proto.guard.RepairContractResponse.ContractResponseStatus} */ (reader.readEnum()); - msg.setStatus(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.guard.RepairContractResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.RepairContractResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.RepairContractResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.RepairContractResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getContract(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.guard.RepairContract.serializeBinaryToWriter - ); - } - f = message.getStatus(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } -}; - - -/** - * @enum {number} - */ -proto.guard.RepairContractResponse.ContractResponseStatus = { - BOTH_SIGNED: 0, - WAIT_LIST: 1, - REJECTED: 2 -}; - -/** - * optional RepairContract contract = 1; - * @return {?proto.guard.RepairContract} - */ -proto.guard.RepairContractResponse.prototype.getContract = function() { - return /** @type{?proto.guard.RepairContract} */ ( - jspb.Message.getWrapperField(this, proto.guard.RepairContract, 1)); -}; - - -/** - * @param {?proto.guard.RepairContract|undefined} value - * @return {!proto.guard.RepairContractResponse} returns this -*/ -proto.guard.RepairContractResponse.prototype.setContract = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.RepairContractResponse} returns this - */ -proto.guard.RepairContractResponse.prototype.clearContract = function() { - return this.setContract(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.RepairContractResponse.prototype.hasContract = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional ContractResponseStatus status = 2; - * @return {!proto.guard.RepairContractResponse.ContractResponseStatus} - */ -proto.guard.RepairContractResponse.prototype.getStatus = function() { - return /** @type {!proto.guard.RepairContractResponse.ContractResponseStatus} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.guard.RepairContractResponse.ContractResponseStatus} value - * @return {!proto.guard.RepairContractResponse} returns this - */ -proto.guard.RepairContractResponse.prototype.setStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.RequestRepairContracts.prototype.toObject = function(opt_includeInstance) { - return proto.guard.RequestRepairContracts.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.RequestRepairContracts} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.RequestRepairContracts.toObject = function(includeInstance, msg) { - var f, obj = { - fileHash: jspb.Message.getFieldWithDefault(msg, 1, ""), - repairNode: jspb.Message.getFieldWithDefault(msg, 2, ""), - repairSignTime: (f = msg.getRepairSignTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - repairSignature: msg.getRepairSignature_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.guard.RequestRepairContracts} - */ -proto.guard.RequestRepairContracts.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.RequestRepairContracts; - return proto.guard.RequestRepairContracts.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.RequestRepairContracts} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.RequestRepairContracts} - */ -proto.guard.RequestRepairContracts.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.setFileHash(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setRepairNode(value); - break; - case 3: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setRepairSignTime(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRepairSignature(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.guard.RequestRepairContracts.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.RequestRepairContracts.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.RequestRepairContracts} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.RequestRepairContracts.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFileHash(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getRepairNode(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getRepairSignTime(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getRepairSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } -}; - - -/** - * optional string file_hash = 1; - * @return {string} - */ -proto.guard.RequestRepairContracts.prototype.getFileHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.RequestRepairContracts} returns this - */ -proto.guard.RequestRepairContracts.prototype.setFileHash = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string repair_node = 2; - * @return {string} - */ -proto.guard.RequestRepairContracts.prototype.getRepairNode = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.RequestRepairContracts} returns this - */ -proto.guard.RequestRepairContracts.prototype.setRepairNode = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional google.protobuf.Timestamp repair_sign_time = 3; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.RequestRepairContracts.prototype.getRepairSignTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.RequestRepairContracts} returns this -*/ -proto.guard.RequestRepairContracts.prototype.setRepairSignTime = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.RequestRepairContracts} returns this - */ -proto.guard.RequestRepairContracts.prototype.clearRepairSignTime = function() { - return this.setRepairSignTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.RequestRepairContracts.prototype.hasRepairSignTime = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional bytes repair_signature = 4; - * @return {!(string|Uint8Array)} - */ -proto.guard.RequestRepairContracts.prototype.getRepairSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes repair_signature = 4; - * This is a type-conversion wrapper around `getRepairSignature()` - * @return {string} - */ -proto.guard.RequestRepairContracts.prototype.getRepairSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRepairSignature())); -}; - - -/** - * optional bytes repair_signature = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRepairSignature()` - * @return {!Uint8Array} - */ -proto.guard.RequestRepairContracts.prototype.getRepairSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRepairSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.RequestRepairContracts} returns this - */ -proto.guard.RequestRepairContracts.prototype.setRepairSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.ResponseRepairContracts.prototype.toObject = function(opt_includeInstance) { - return proto.guard.ResponseRepairContracts.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.ResponseRepairContracts} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.ResponseRepairContracts.toObject = function(includeInstance, msg) { - var f, obj = { - fileHash: jspb.Message.getFieldWithDefault(msg, 1, ""), - repairNode: jspb.Message.getFieldWithDefault(msg, 2, ""), - state: jspb.Message.getFieldWithDefault(msg, 3, 0), - status: (f = msg.getStatus()) && proto.guard.FileStoreStatus.toObject(includeInstance, f), - guardPid: jspb.Message.getFieldWithDefault(msg, 5, ""), - signTime: (f = msg.getSignTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - guardSignature: msg.getGuardSignature_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.guard.ResponseRepairContracts} - */ -proto.guard.ResponseRepairContracts.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.ResponseRepairContracts; - return proto.guard.ResponseRepairContracts.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.ResponseRepairContracts} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.ResponseRepairContracts} - */ -proto.guard.ResponseRepairContracts.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.setFileHash(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setRepairNode(value); - break; - case 3: - var value = /** @type {!proto.guard.ResponseRepairContracts.RepairStat} */ (reader.readEnum()); - msg.setState(value); - break; - case 4: - var value = new proto.guard.FileStoreStatus; - reader.readMessage(value,proto.guard.FileStoreStatus.deserializeBinaryFromReader); - msg.setStatus(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setGuardPid(value); - break; - case 6: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setSignTime(value); - break; - case 7: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setGuardSignature(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.guard.ResponseRepairContracts.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.ResponseRepairContracts.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.ResponseRepairContracts} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.ResponseRepairContracts.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFileHash(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getRepairNode(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getState(); - if (f !== 0.0) { - writer.writeEnum( - 3, - f - ); - } - f = message.getStatus(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.guard.FileStoreStatus.serializeBinaryToWriter - ); - } - f = message.getGuardPid(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getSignTime(); - if (f != null) { - writer.writeMessage( - 6, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getGuardSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 7, - f - ); - } -}; - - -/** - * @enum {number} - */ -proto.guard.ResponseRepairContracts.RepairStat = { - CONTRACT_READY: 0, - DOWNLOAD_NOT_DONE: 1, - REQUEST_AGAIN: 2, - CONTRACT_CLOSED: 3 -}; - -/** - * optional string file_hash = 1; - * @return {string} - */ -proto.guard.ResponseRepairContracts.prototype.getFileHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ResponseRepairContracts} returns this - */ -proto.guard.ResponseRepairContracts.prototype.setFileHash = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string repair_node = 2; - * @return {string} - */ -proto.guard.ResponseRepairContracts.prototype.getRepairNode = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ResponseRepairContracts} returns this - */ -proto.guard.ResponseRepairContracts.prototype.setRepairNode = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional RepairStat state = 3; - * @return {!proto.guard.ResponseRepairContracts.RepairStat} - */ -proto.guard.ResponseRepairContracts.prototype.getState = function() { - return /** @type {!proto.guard.ResponseRepairContracts.RepairStat} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {!proto.guard.ResponseRepairContracts.RepairStat} value - * @return {!proto.guard.ResponseRepairContracts} returns this - */ -proto.guard.ResponseRepairContracts.prototype.setState = function(value) { - return jspb.Message.setProto3EnumField(this, 3, value); -}; - - -/** - * optional FileStoreStatus status = 4; - * @return {?proto.guard.FileStoreStatus} - */ -proto.guard.ResponseRepairContracts.prototype.getStatus = function() { - return /** @type{?proto.guard.FileStoreStatus} */ ( - jspb.Message.getWrapperField(this, proto.guard.FileStoreStatus, 4)); -}; - - -/** - * @param {?proto.guard.FileStoreStatus|undefined} value - * @return {!proto.guard.ResponseRepairContracts} returns this -*/ -proto.guard.ResponseRepairContracts.prototype.setStatus = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.ResponseRepairContracts} returns this - */ -proto.guard.ResponseRepairContracts.prototype.clearStatus = function() { - return this.setStatus(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.ResponseRepairContracts.prototype.hasStatus = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional string guard_pid = 5; - * @return {string} - */ -proto.guard.ResponseRepairContracts.prototype.getGuardPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ResponseRepairContracts} returns this - */ -proto.guard.ResponseRepairContracts.prototype.setGuardPid = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * optional google.protobuf.Timestamp sign_time = 6; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.ResponseRepairContracts.prototype.getSignTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.ResponseRepairContracts} returns this -*/ -proto.guard.ResponseRepairContracts.prototype.setSignTime = function(value) { - return jspb.Message.setWrapperField(this, 6, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.ResponseRepairContracts} returns this - */ -proto.guard.ResponseRepairContracts.prototype.clearSignTime = function() { - return this.setSignTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.ResponseRepairContracts.prototype.hasSignTime = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * optional bytes guard_signature = 7; - * @return {!(string|Uint8Array)} - */ -proto.guard.ResponseRepairContracts.prototype.getGuardSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * optional bytes guard_signature = 7; - * This is a type-conversion wrapper around `getGuardSignature()` - * @return {string} - */ -proto.guard.ResponseRepairContracts.prototype.getGuardSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getGuardSignature())); -}; - - -/** - * optional bytes guard_signature = 7; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getGuardSignature()` - * @return {!Uint8Array} - */ -proto.guard.ResponseRepairContracts.prototype.getGuardSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getGuardSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.ResponseRepairContracts} returns this - */ -proto.guard.ResponseRepairContracts.prototype.setGuardSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 7, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.CancelContractRequest.prototype.toObject = function(opt_includeInstance) { - return proto.guard.CancelContractRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.CancelContractRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.CancelContractRequest.toObject = function(includeInstance, msg) { - var f, obj = { - fileHash: jspb.Message.getFieldWithDefault(msg, 1, ""), - shardHash: jspb.Message.getFieldWithDefault(msg, 2, ""), - contractId: jspb.Message.getFieldWithDefault(msg, 3, ""), - renterPid: jspb.Message.getFieldWithDefault(msg, 4, ""), - hostPid: jspb.Message.getFieldWithDefault(msg, 5, ""), - reason: jspb.Message.getFieldWithDefault(msg, 6, 0), - signTime: (f = msg.getSignTime()) && google_protobuf_timestamp_pb.Timestamp.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.guard.CancelContractRequest} - */ -proto.guard.CancelContractRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.CancelContractRequest; - return proto.guard.CancelContractRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.CancelContractRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.CancelContractRequest} - */ -proto.guard.CancelContractRequest.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.setFileHash(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setShardHash(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setContractId(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setRenterPid(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setHostPid(value); - break; - case 6: - var value = /** @type {!proto.guard.CancelContractRequest.CancelReason} */ (reader.readEnum()); - msg.setReason(value); - break; - case 7: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setSignTime(value); - break; - case 8: - 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.guard.CancelContractRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.CancelContractRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.CancelContractRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.CancelContractRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFileHash(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getShardHash(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getContractId(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getRenterPid(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getHostPid(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getReason(); - if (f !== 0.0) { - writer.writeEnum( - 6, - f - ); - } - f = message.getSignTime(); - if (f != null) { - writer.writeMessage( - 7, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 8, - f - ); - } -}; - - -/** - * @enum {number} - */ -proto.guard.CancelContractRequest.CancelReason = { - HOST_REQUEST: 0, - DOWNLOAD_FAIL: 1, - RENTER_REQUEST: 2, - OTHER: 3 -}; - -/** - * optional string file_hash = 1; - * @return {string} - */ -proto.guard.CancelContractRequest.prototype.getFileHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.CancelContractRequest} returns this - */ -proto.guard.CancelContractRequest.prototype.setFileHash = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string shard_hash = 2; - * @return {string} - */ -proto.guard.CancelContractRequest.prototype.getShardHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.CancelContractRequest} returns this - */ -proto.guard.CancelContractRequest.prototype.setShardHash = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string contract_id = 3; - * @return {string} - */ -proto.guard.CancelContractRequest.prototype.getContractId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.CancelContractRequest} returns this - */ -proto.guard.CancelContractRequest.prototype.setContractId = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string renter_pid = 4; - * @return {string} - */ -proto.guard.CancelContractRequest.prototype.getRenterPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.CancelContractRequest} returns this - */ -proto.guard.CancelContractRequest.prototype.setRenterPid = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional string host_pid = 5; - * @return {string} - */ -proto.guard.CancelContractRequest.prototype.getHostPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.CancelContractRequest} returns this - */ -proto.guard.CancelContractRequest.prototype.setHostPid = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * optional CancelReason reason = 6; - * @return {!proto.guard.CancelContractRequest.CancelReason} - */ -proto.guard.CancelContractRequest.prototype.getReason = function() { - return /** @type {!proto.guard.CancelContractRequest.CancelReason} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {!proto.guard.CancelContractRequest.CancelReason} value - * @return {!proto.guard.CancelContractRequest} returns this - */ -proto.guard.CancelContractRequest.prototype.setReason = function(value) { - return jspb.Message.setProto3EnumField(this, 6, value); -}; - - -/** - * optional google.protobuf.Timestamp sign_time = 7; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.CancelContractRequest.prototype.getSignTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 7)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.CancelContractRequest} returns this -*/ -proto.guard.CancelContractRequest.prototype.setSignTime = function(value) { - return jspb.Message.setWrapperField(this, 7, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.CancelContractRequest} returns this - */ -proto.guard.CancelContractRequest.prototype.clearSignTime = function() { - return this.setSignTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.CancelContractRequest.prototype.hasSignTime = function() { - return jspb.Message.getField(this, 7) != null; -}; - - -/** - * optional bytes signature = 8; - * @return {!(string|Uint8Array)} - */ -proto.guard.CancelContractRequest.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** - * optional bytes signature = 8; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.guard.CancelContractRequest.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 8; - * 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.guard.CancelContractRequest.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.CancelContractRequest} returns this - */ -proto.guard.CancelContractRequest.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 8, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.ChallengeJobRequest.prototype.toObject = function(opt_includeInstance) { - return proto.guard.ChallengeJobRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.ChallengeJobRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.ChallengeJobRequest.toObject = function(includeInstance, msg) { - var f, obj = { - nodePid: jspb.Message.getFieldWithDefault(msg, 1, ""), - requestTime: (f = msg.getRequestTime()) && google_protobuf_timestamp_pb.Timestamp.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.guard.ChallengeJobRequest} - */ -proto.guard.ChallengeJobRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.ChallengeJobRequest; - return proto.guard.ChallengeJobRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.ChallengeJobRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.ChallengeJobRequest} - */ -proto.guard.ChallengeJobRequest.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.setNodePid(value); - break; - case 2: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setRequestTime(value); - break; - case 3: - 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.guard.ChallengeJobRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.ChallengeJobRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.ChallengeJobRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.ChallengeJobRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNodePid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getRequestTime(); - if (f != null) { - writer.writeMessage( - 2, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } -}; - - -/** - * optional string node_pid = 1; - * @return {string} - */ -proto.guard.ChallengeJobRequest.prototype.getNodePid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ChallengeJobRequest} returns this - */ -proto.guard.ChallengeJobRequest.prototype.setNodePid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional google.protobuf.Timestamp request_time = 2; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.ChallengeJobRequest.prototype.getRequestTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.ChallengeJobRequest} returns this -*/ -proto.guard.ChallengeJobRequest.prototype.setRequestTime = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.ChallengeJobRequest} returns this - */ -proto.guard.ChallengeJobRequest.prototype.clearRequestTime = function() { - return this.setRequestTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.ChallengeJobRequest.prototype.hasRequestTime = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional bytes signature = 3; - * @return {!(string|Uint8Array)} - */ -proto.guard.ChallengeJobRequest.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes signature = 3; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.guard.ChallengeJobRequest.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 3; - * 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.guard.ChallengeJobRequest.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.ChallengeJobRequest} returns this - */ -proto.guard.ChallengeJobRequest.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.ChallengeJobResponse.prototype.toObject = function(opt_includeInstance) { - return proto.guard.ChallengeJobResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.ChallengeJobResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.ChallengeJobResponse.toObject = function(includeInstance, msg) { - var f, obj = { - nodePid: jspb.Message.getFieldWithDefault(msg, 1, ""), - issuerPid: jspb.Message.getFieldWithDefault(msg, 2, ""), - jobId: jspb.Message.getFieldWithDefault(msg, 3, ""), - packageUrl: jspb.Message.getFieldWithDefault(msg, 4, ""), - packageQuestionsCount: jspb.Message.getFieldWithDefault(msg, 5, 0), - sendTime: (f = msg.getSendTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - jobFinishDeadline: (f = msg.getJobFinishDeadline()) && google_protobuf_timestamp_pb.Timestamp.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.guard.ChallengeJobResponse} - */ -proto.guard.ChallengeJobResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.ChallengeJobResponse; - return proto.guard.ChallengeJobResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.ChallengeJobResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.ChallengeJobResponse} - */ -proto.guard.ChallengeJobResponse.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.setNodePid(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setIssuerPid(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setJobId(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setPackageUrl(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt32()); - msg.setPackageQuestionsCount(value); - break; - case 6: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setSendTime(value); - break; - case 7: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setJobFinishDeadline(value); - break; - case 8: - 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.guard.ChallengeJobResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.ChallengeJobResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.ChallengeJobResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.ChallengeJobResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNodePid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getIssuerPid(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getJobId(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getPackageUrl(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getPackageQuestionsCount(); - if (f !== 0) { - writer.writeInt32( - 5, - f - ); - } - f = message.getSendTime(); - if (f != null) { - writer.writeMessage( - 6, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getJobFinishDeadline(); - if (f != null) { - writer.writeMessage( - 7, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 8, - f - ); - } -}; - - -/** - * optional string node_pid = 1; - * @return {string} - */ -proto.guard.ChallengeJobResponse.prototype.getNodePid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ChallengeJobResponse} returns this - */ -proto.guard.ChallengeJobResponse.prototype.setNodePid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string issuer_pid = 2; - * @return {string} - */ -proto.guard.ChallengeJobResponse.prototype.getIssuerPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ChallengeJobResponse} returns this - */ -proto.guard.ChallengeJobResponse.prototype.setIssuerPid = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string job_id = 3; - * @return {string} - */ -proto.guard.ChallengeJobResponse.prototype.getJobId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ChallengeJobResponse} returns this - */ -proto.guard.ChallengeJobResponse.prototype.setJobId = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string package_url = 4; - * @return {string} - */ -proto.guard.ChallengeJobResponse.prototype.getPackageUrl = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ChallengeJobResponse} returns this - */ -proto.guard.ChallengeJobResponse.prototype.setPackageUrl = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional int32 package_questions_count = 5; - * @return {number} - */ -proto.guard.ChallengeJobResponse.prototype.getPackageQuestionsCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.ChallengeJobResponse} returns this - */ -proto.guard.ChallengeJobResponse.prototype.setPackageQuestionsCount = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional google.protobuf.Timestamp send_time = 6; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.ChallengeJobResponse.prototype.getSendTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.ChallengeJobResponse} returns this -*/ -proto.guard.ChallengeJobResponse.prototype.setSendTime = function(value) { - return jspb.Message.setWrapperField(this, 6, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.ChallengeJobResponse} returns this - */ -proto.guard.ChallengeJobResponse.prototype.clearSendTime = function() { - return this.setSendTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.ChallengeJobResponse.prototype.hasSendTime = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * optional google.protobuf.Timestamp job_finish_deadline = 7; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.ChallengeJobResponse.prototype.getJobFinishDeadline = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 7)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.ChallengeJobResponse} returns this -*/ -proto.guard.ChallengeJobResponse.prototype.setJobFinishDeadline = function(value) { - return jspb.Message.setWrapperField(this, 7, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.ChallengeJobResponse} returns this - */ -proto.guard.ChallengeJobResponse.prototype.clearJobFinishDeadline = function() { - return this.setJobFinishDeadline(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.ChallengeJobResponse.prototype.hasJobFinishDeadline = function() { - return jspb.Message.getField(this, 7) != null; -}; - - -/** - * optional bytes signature = 8; - * @return {!(string|Uint8Array)} - */ -proto.guard.ChallengeJobResponse.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** - * optional bytes signature = 8; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.guard.ChallengeJobResponse.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 8; - * 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.guard.ChallengeJobResponse.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.ChallengeJobResponse} returns this - */ -proto.guard.ChallengeJobResponse.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 8, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.guard.ChallengeJobResult.repeatedFields_ = [3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.ChallengeJobResult.prototype.toObject = function(opt_includeInstance) { - return proto.guard.ChallengeJobResult.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.ChallengeJobResult} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.ChallengeJobResult.toObject = function(includeInstance, msg) { - var f, obj = { - nodePid: jspb.Message.getFieldWithDefault(msg, 1, ""), - jobId: jspb.Message.getFieldWithDefault(msg, 2, ""), - resultList: jspb.Message.toObjectList(msg.getResultList(), - proto.guard.ShardChallengeResult.toObject, includeInstance), - submitTime: (f = msg.getSubmitTime()) && google_protobuf_timestamp_pb.Timestamp.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.guard.ChallengeJobResult} - */ -proto.guard.ChallengeJobResult.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.ChallengeJobResult; - return proto.guard.ChallengeJobResult.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.ChallengeJobResult} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.ChallengeJobResult} - */ -proto.guard.ChallengeJobResult.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.setNodePid(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setJobId(value); - break; - case 3: - var value = new proto.guard.ShardChallengeResult; - reader.readMessage(value,proto.guard.ShardChallengeResult.deserializeBinaryFromReader); - msg.addResult(value); - break; - case 4: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setSubmitTime(value); - break; - case 5: - 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.guard.ChallengeJobResult.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.ChallengeJobResult.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.ChallengeJobResult} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.ChallengeJobResult.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNodePid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getJobId(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getResultList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.guard.ShardChallengeResult.serializeBinaryToWriter - ); - } - f = message.getSubmitTime(); - if (f != null) { - writer.writeMessage( - 4, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 5, - f - ); - } -}; - - -/** - * optional string node_pid = 1; - * @return {string} - */ -proto.guard.ChallengeJobResult.prototype.getNodePid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ChallengeJobResult} returns this - */ -proto.guard.ChallengeJobResult.prototype.setNodePid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string job_id = 2; - * @return {string} - */ -proto.guard.ChallengeJobResult.prototype.getJobId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ChallengeJobResult} returns this - */ -proto.guard.ChallengeJobResult.prototype.setJobId = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * repeated ShardChallengeResult result = 3; - * @return {!Array} - */ -proto.guard.ChallengeJobResult.prototype.getResultList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.guard.ShardChallengeResult, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.guard.ChallengeJobResult} returns this -*/ -proto.guard.ChallengeJobResult.prototype.setResultList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.guard.ShardChallengeResult=} opt_value - * @param {number=} opt_index - * @return {!proto.guard.ShardChallengeResult} - */ -proto.guard.ChallengeJobResult.prototype.addResult = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.guard.ShardChallengeResult, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.guard.ChallengeJobResult} returns this - */ -proto.guard.ChallengeJobResult.prototype.clearResultList = function() { - return this.setResultList([]); -}; - - -/** - * optional google.protobuf.Timestamp submit_time = 4; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.ChallengeJobResult.prototype.getSubmitTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.ChallengeJobResult} returns this -*/ -proto.guard.ChallengeJobResult.prototype.setSubmitTime = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.ChallengeJobResult} returns this - */ -proto.guard.ChallengeJobResult.prototype.clearSubmitTime = function() { - return this.setSubmitTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.ChallengeJobResult.prototype.hasSubmitTime = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional bytes signature = 5; - * @return {!(string|Uint8Array)} - */ -proto.guard.ChallengeJobResult.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * optional bytes signature = 5; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.guard.ChallengeJobResult.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 5; - * 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.guard.ChallengeJobResult.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.guard.ChallengeJobResult} returns this - */ -proto.guard.ChallengeJobResult.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.ShardChallengeResult.prototype.toObject = function(opt_includeInstance) { - return proto.guard.ShardChallengeResult.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.ShardChallengeResult} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.ShardChallengeResult.toObject = function(includeInstance, msg) { - var f, obj = { - hostPid: jspb.Message.getFieldWithDefault(msg, 1, ""), - fileHash: jspb.Message.getFieldWithDefault(msg, 2, ""), - shardHash: jspb.Message.getFieldWithDefault(msg, 3, ""), - nonce: jspb.Message.getFieldWithDefault(msg, 4, ""), - result: jspb.Message.getFieldWithDefault(msg, 5, ""), - isTimeout: jspb.Message.getBooleanFieldWithDefault(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.guard.ShardChallengeResult} - */ -proto.guard.ShardChallengeResult.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.ShardChallengeResult; - return proto.guard.ShardChallengeResult.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.ShardChallengeResult} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.ShardChallengeResult} - */ -proto.guard.ShardChallengeResult.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.setHostPid(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setFileHash(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setShardHash(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setNonce(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setResult(value); - break; - case 6: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsTimeout(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.guard.ShardChallengeResult.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.ShardChallengeResult.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.ShardChallengeResult} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.ShardChallengeResult.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getHostPid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getFileHash(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getShardHash(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getNonce(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getResult(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getIsTimeout(); - if (f) { - writer.writeBool( - 6, - f - ); - } -}; - - -/** - * optional string host_pid = 1; - * @return {string} - */ -proto.guard.ShardChallengeResult.prototype.getHostPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ShardChallengeResult} returns this - */ -proto.guard.ShardChallengeResult.prototype.setHostPid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string file_hash = 2; - * @return {string} - */ -proto.guard.ShardChallengeResult.prototype.getFileHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ShardChallengeResult} returns this - */ -proto.guard.ShardChallengeResult.prototype.setFileHash = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string shard_hash = 3; - * @return {string} - */ -proto.guard.ShardChallengeResult.prototype.getShardHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ShardChallengeResult} returns this - */ -proto.guard.ShardChallengeResult.prototype.setShardHash = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string nonce = 4; - * @return {string} - */ -proto.guard.ShardChallengeResult.prototype.getNonce = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ShardChallengeResult} returns this - */ -proto.guard.ShardChallengeResult.prototype.setNonce = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional string result = 5; - * @return {string} - */ -proto.guard.ShardChallengeResult.prototype.getResult = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.ShardChallengeResult} returns this - */ -proto.guard.ShardChallengeResult.prototype.setResult = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * optional bool is_timeout = 6; - * @return {boolean} - */ -proto.guard.ShardChallengeResult.prototype.getIsTimeout = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.guard.ShardChallengeResult} returns this - */ -proto.guard.ShardChallengeResult.prototype.setIsTimeout = function(value) { - return jspb.Message.setProto3BooleanField(this, 6, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.guard.DeCentralQuestions.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.DeCentralQuestions.prototype.toObject = function(opt_includeInstance) { - return proto.guard.DeCentralQuestions.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.DeCentralQuestions} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.DeCentralQuestions.toObject = function(includeInstance, msg) { - var f, obj = { - qsList: jspb.Message.toObjectList(msg.getQsList(), - proto.guard.DeQuestion.toObject, includeInstance), - count: jspb.Message.getFieldWithDefault(msg, 2, 0), - uuid: jspb.Message.getFieldWithDefault(msg, 3, ""), - url: jspb.Message.getFieldWithDefault(msg, 4, ""), - endTime: (f = msg.getEndTime()) && google_protobuf_timestamp_pb.Timestamp.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.guard.DeCentralQuestions} - */ -proto.guard.DeCentralQuestions.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.DeCentralQuestions; - return proto.guard.DeCentralQuestions.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.DeCentralQuestions} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.DeCentralQuestions} - */ -proto.guard.DeCentralQuestions.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.guard.DeQuestion; - reader.readMessage(value,proto.guard.DeQuestion.deserializeBinaryFromReader); - msg.addQs(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setCount(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setUuid(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setUrl(value); - break; - case 5: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setEndTime(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.guard.DeCentralQuestions.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.DeCentralQuestions.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.DeCentralQuestions} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.DeCentralQuestions.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getQsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.guard.DeQuestion.serializeBinaryToWriter - ); - } - f = message.getCount(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } - f = message.getUuid(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getUrl(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getEndTime(); - if (f != null) { - writer.writeMessage( - 5, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated DeQuestion qs = 1; - * @return {!Array} - */ -proto.guard.DeCentralQuestions.prototype.getQsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.guard.DeQuestion, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.guard.DeCentralQuestions} returns this -*/ -proto.guard.DeCentralQuestions.prototype.setQsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.guard.DeQuestion=} opt_value - * @param {number=} opt_index - * @return {!proto.guard.DeQuestion} - */ -proto.guard.DeCentralQuestions.prototype.addQs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.guard.DeQuestion, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.guard.DeCentralQuestions} returns this - */ -proto.guard.DeCentralQuestions.prototype.clearQsList = function() { - return this.setQsList([]); -}; - - -/** - * optional int32 count = 2; - * @return {number} - */ -proto.guard.DeCentralQuestions.prototype.getCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.DeCentralQuestions} returns this - */ -proto.guard.DeCentralQuestions.prototype.setCount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional string uuid = 3; - * @return {string} - */ -proto.guard.DeCentralQuestions.prototype.getUuid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.DeCentralQuestions} returns this - */ -proto.guard.DeCentralQuestions.prototype.setUuid = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string url = 4; - * @return {string} - */ -proto.guard.DeCentralQuestions.prototype.getUrl = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.DeCentralQuestions} returns this - */ -proto.guard.DeCentralQuestions.prototype.setUrl = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional google.protobuf.Timestamp end_time = 5; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.guard.DeCentralQuestions.prototype.getEndTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.guard.DeCentralQuestions} returns this -*/ -proto.guard.DeCentralQuestions.prototype.setEndTime = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.guard.DeCentralQuestions} returns this - */ -proto.guard.DeCentralQuestions.prototype.clearEndTime = function() { - return this.setEndTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.guard.DeCentralQuestions.prototype.hasEndTime = function() { - return jspb.Message.getField(this, 5) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.guard.DeQuestion.prototype.toObject = function(opt_includeInstance) { - return proto.guard.DeQuestion.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.guard.DeQuestion} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.DeQuestion.toObject = function(includeInstance, msg) { - var f, obj = { - shardHash: jspb.Message.getFieldWithDefault(msg, 1, ""), - hostPid: jspb.Message.getFieldWithDefault(msg, 2, ""), - chunkIndex: jspb.Message.getFieldWithDefault(msg, 3, 0), - nonce: jspb.Message.getFieldWithDefault(msg, 4, ""), - fileHash: jspb.Message.getFieldWithDefault(msg, 5, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.guard.DeQuestion} - */ -proto.guard.DeQuestion.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.guard.DeQuestion; - return proto.guard.DeQuestion.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.guard.DeQuestion} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.guard.DeQuestion} - */ -proto.guard.DeQuestion.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.setShardHash(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setHostPid(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt32()); - msg.setChunkIndex(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setNonce(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setFileHash(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.guard.DeQuestion.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.guard.DeQuestion.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.guard.DeQuestion} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.guard.DeQuestion.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getShardHash(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getHostPid(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getChunkIndex(); - if (f !== 0) { - writer.writeInt32( - 3, - f - ); - } - f = message.getNonce(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getFileHash(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } -}; - - -/** - * optional string shard_hash = 1; - * @return {string} - */ -proto.guard.DeQuestion.prototype.getShardHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.DeQuestion} returns this - */ -proto.guard.DeQuestion.prototype.setShardHash = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string host_pid = 2; - * @return {string} - */ -proto.guard.DeQuestion.prototype.getHostPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.DeQuestion} returns this - */ -proto.guard.DeQuestion.prototype.setHostPid = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional int32 chunk_index = 3; - * @return {number} - */ -proto.guard.DeQuestion.prototype.getChunkIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.guard.DeQuestion} returns this - */ -proto.guard.DeQuestion.prototype.setChunkIndex = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional string nonce = 4; - * @return {string} - */ -proto.guard.DeQuestion.prototype.getNonce = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.DeQuestion} returns this - */ -proto.guard.DeQuestion.prototype.setNonce = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional string file_hash = 5; - * @return {string} - */ -proto.guard.DeQuestion.prototype.getFileHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.guard.DeQuestion} returns this - */ -proto.guard.DeQuestion.prototype.setFileHash = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * @enum {number} - */ -proto.guard.ResponseCode = { - SUCCESS: 0, - SIGNATURE_FORMAT_ERROR: 1, - COMPUTE_ADDRESS_ERROR: 2, - OTHER_ERROR: 20 -}; - -goog.object.extend(exports, proto.guard); diff --git a/js/protos/hub/hub_pb.js b/js/protos/hub/hub_pb.js deleted file mode 100644 index 92b9c60..0000000 --- a/js/protos/hub/hub_pb.js +++ /dev/null @@ -1,4835 +0,0 @@ -// source: protos/hub/hub.proto -/** - * @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 github_com_bittorrent_go$btfs$common_protos_node_node_pb = require('../../github.com/bittorrent/go-btfs-common/protos/node/node_pb.js'); -goog.object.extend(proto, github_com_bittorrent_go$btfs$common_protos_node_node_pb); -var github_com_tron$us_protobuf_gogoproto_gogo_pb = require('../../github.com/tron-us/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_tron$us_protobuf_gogoproto_gogo_pb); -var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); -goog.object.extend(proto, google_protobuf_timestamp_pb); -goog.exportSymbol('proto.hub.Candidate', null, global); -goog.exportSymbol('proto.hub.Host', null, global); -goog.exportSymbol('proto.hub.HostsData', null, global); -goog.exportSymbol('proto.hub.HostsReq', null, global); -goog.exportSymbol('proto.hub.HostsReq.Mode', null, global); -goog.exportSymbol('proto.hub.HostsResp', null, global); -goog.exportSymbol('proto.hub.Location', null, global); -goog.exportSymbol('proto.hub.NodesReq', null, global); -goog.exportSymbol('proto.hub.ParseReq', null, global); -goog.exportSymbol('proto.hub.ParseResp', null, global); -goog.exportSymbol('proto.hub.RecycleReq', null, global); -goog.exportSymbol('proto.hub.RecycleReq.ESIndex', null, global); -goog.exportSymbol('proto.hub.ResponseCode', null, global); -goog.exportSymbol('proto.hub.RolesHostsReq', null, global); -goog.exportSymbol('proto.hub.SettingsData', null, global); -goog.exportSymbol('proto.hub.SettingsReq', null, global); -goog.exportSymbol('proto.hub.SettingsResp', null, global); -goog.exportSymbol('proto.hub.StatsReq', null, global); -goog.exportSymbol('proto.hub.StatsResp', 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.hub.NodesReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.hub.NodesReq.repeatedFields_, null); -}; -goog.inherits(proto.hub.NodesReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.hub.NodesReq.displayName = 'proto.hub.NodesReq'; -} -/** - * 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.hub.SettingsReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.hub.SettingsReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.hub.SettingsReq.displayName = 'proto.hub.SettingsReq'; -} -/** - * 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.hub.SettingsResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.hub.SettingsResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.hub.SettingsResp.displayName = 'proto.hub.SettingsResp'; -} -/** - * 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.hub.SettingsData = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.hub.SettingsData, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.hub.SettingsData.displayName = 'proto.hub.SettingsData'; -} -/** - * 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.hub.HostsReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.hub.HostsReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.hub.HostsReq.displayName = 'proto.hub.HostsReq'; -} -/** - * 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.hub.RolesHostsReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.hub.RolesHostsReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.hub.RolesHostsReq.displayName = 'proto.hub.RolesHostsReq'; -} -/** - * 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.hub.HostsResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.hub.HostsResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.hub.HostsResp.displayName = 'proto.hub.HostsResp'; -} -/** - * 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.hub.StatsReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.hub.StatsReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.hub.StatsReq.displayName = 'proto.hub.StatsReq'; -} -/** - * 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.hub.StatsResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.hub.StatsResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.hub.StatsResp.displayName = 'proto.hub.StatsResp'; -} -/** - * 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.hub.Candidate = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.hub.Candidate, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.hub.Candidate.displayName = 'proto.hub.Candidate'; -} -/** - * 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.hub.ParseReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.hub.ParseReq.repeatedFields_, null); -}; -goog.inherits(proto.hub.ParseReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.hub.ParseReq.displayName = 'proto.hub.ParseReq'; -} -/** - * 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.hub.RecycleReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.hub.RecycleReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.hub.RecycleReq.displayName = 'proto.hub.RecycleReq'; -} -/** - * 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.hub.ParseResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.hub.ParseResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.hub.ParseResp.displayName = 'proto.hub.ParseResp'; -} -/** - * 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.hub.HostsData = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.hub.HostsData.repeatedFields_, null); -}; -goog.inherits(proto.hub.HostsData, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.hub.HostsData.displayName = 'proto.hub.HostsData'; -} -/** - * 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.hub.Host = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.hub.Host.repeatedFields_, null); -}; -goog.inherits(proto.hub.Host, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.hub.Host.displayName = 'proto.hub.Host'; -} -/** - * 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.hub.Location = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.hub.Location, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.hub.Location.displayName = 'proto.hub.Location'; -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.hub.NodesReq.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.hub.NodesReq.prototype.toObject = function(opt_includeInstance) { - return proto.hub.NodesReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.hub.NodesReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.hub.NodesReq.toObject = function(includeInstance, msg) { - var f, obj = { - nodeIdList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, - requesterId: jspb.Message.getFieldWithDefault(msg, 2, ""), - 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.hub.NodesReq} - */ -proto.hub.NodesReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.hub.NodesReq; - return proto.hub.NodesReq.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.hub.NodesReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.hub.NodesReq} - */ -proto.hub.NodesReq.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.addNodeId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setRequesterId(value); - break; - case 3: - 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.hub.NodesReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.hub.NodesReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.hub.NodesReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.hub.NodesReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNodeIdList(); - if (f.length > 0) { - writer.writeRepeatedString( - 1, - f - ); - } - f = message.getRequesterId(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } -}; - - -/** - * repeated string node_id = 1; - * @return {!Array} - */ -proto.hub.NodesReq.prototype.getNodeIdList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.hub.NodesReq} returns this - */ -proto.hub.NodesReq.prototype.setNodeIdList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.hub.NodesReq} returns this - */ -proto.hub.NodesReq.prototype.addNodeId = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.hub.NodesReq} returns this - */ -proto.hub.NodesReq.prototype.clearNodeIdList = function() { - return this.setNodeIdList([]); -}; - - -/** - * optional string requester_id = 2; - * @return {string} - */ -proto.hub.NodesReq.prototype.getRequesterId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.hub.NodesReq} returns this - */ -proto.hub.NodesReq.prototype.setRequesterId = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional bytes signature = 3; - * @return {!(string|Uint8Array)} - */ -proto.hub.NodesReq.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes signature = 3; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.hub.NodesReq.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 3; - * 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.hub.NodesReq.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.hub.NodesReq} returns this - */ -proto.hub.NodesReq.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.hub.SettingsReq.prototype.toObject = function(opt_includeInstance) { - return proto.hub.SettingsReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.hub.SettingsReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.hub.SettingsReq.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - respSize: 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.hub.SettingsReq} - */ -proto.hub.SettingsReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.hub.SettingsReq; - return proto.hub.SettingsReq.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.hub.SettingsReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.hub.SettingsReq} - */ -proto.hub.SettingsReq.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.setId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setRespSize(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.hub.SettingsReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.hub.SettingsReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.hub.SettingsReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.hub.SettingsReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getRespSize(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } -}; - - -/** - * optional string id = 1; - * @return {string} - */ -proto.hub.SettingsReq.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.hub.SettingsReq} returns this - */ -proto.hub.SettingsReq.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional int32 resp_size = 2; - * @return {number} - */ -proto.hub.SettingsReq.prototype.getRespSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.SettingsReq} returns this - */ -proto.hub.SettingsReq.prototype.setRespSize = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.hub.SettingsResp.prototype.toObject = function(opt_includeInstance) { - return proto.hub.SettingsResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.hub.SettingsResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.hub.SettingsResp.toObject = function(includeInstance, msg) { - var f, obj = { - code: jspb.Message.getFieldWithDefault(msg, 1, 0), - message: jspb.Message.getFieldWithDefault(msg, 2, ""), - responseTime: (f = msg.getResponseTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - settingsData: (f = msg.getSettingsData()) && proto.hub.SettingsData.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.hub.SettingsResp} - */ -proto.hub.SettingsResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.hub.SettingsResp; - return proto.hub.SettingsResp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.hub.SettingsResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.hub.SettingsResp} - */ -proto.hub.SettingsResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.hub.ResponseCode} */ (reader.readEnum()); - msg.setCode(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setMessage(value); - break; - case 3: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setResponseTime(value); - break; - case 4: - var value = new proto.hub.SettingsData; - reader.readMessage(value,proto.hub.SettingsData.deserializeBinaryFromReader); - msg.setSettingsData(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.hub.SettingsResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.hub.SettingsResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.hub.SettingsResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.hub.SettingsResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getCode(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getMessage(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getResponseTime(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getSettingsData(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.hub.SettingsData.serializeBinaryToWriter - ); - } -}; - - -/** - * optional ResponseCode code = 1; - * @return {!proto.hub.ResponseCode} - */ -proto.hub.SettingsResp.prototype.getCode = function() { - return /** @type {!proto.hub.ResponseCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.hub.ResponseCode} value - * @return {!proto.hub.SettingsResp} returns this - */ -proto.hub.SettingsResp.prototype.setCode = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional string message = 2; - * @return {string} - */ -proto.hub.SettingsResp.prototype.getMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.hub.SettingsResp} returns this - */ -proto.hub.SettingsResp.prototype.setMessage = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional google.protobuf.Timestamp response_time = 3; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.hub.SettingsResp.prototype.getResponseTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.hub.SettingsResp} returns this -*/ -proto.hub.SettingsResp.prototype.setResponseTime = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.hub.SettingsResp} returns this - */ -proto.hub.SettingsResp.prototype.clearResponseTime = function() { - return this.setResponseTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.hub.SettingsResp.prototype.hasResponseTime = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional SettingsData settings_data = 4; - * @return {?proto.hub.SettingsData} - */ -proto.hub.SettingsResp.prototype.getSettingsData = function() { - return /** @type{?proto.hub.SettingsData} */ ( - jspb.Message.getWrapperField(this, proto.hub.SettingsData, 4)); -}; - - -/** - * @param {?proto.hub.SettingsData|undefined} value - * @return {!proto.hub.SettingsResp} returns this -*/ -proto.hub.SettingsResp.prototype.setSettingsData = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.hub.SettingsResp} returns this - */ -proto.hub.SettingsResp.prototype.clearSettingsData = function() { - return this.setSettingsData(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.hub.SettingsResp.prototype.hasSettingsData = function() { - return jspb.Message.getField(this, 4) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.hub.SettingsData.prototype.toObject = function(opt_includeInstance) { - return proto.hub.SettingsData.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.hub.SettingsData} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.hub.SettingsData.toObject = function(includeInstance, msg) { - var f, obj = { - storagePriceAsk: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0), - bandwidthPriceAsk: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), - storageTimeMin: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0), - bandwidthLimit: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0), - collateralStake: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.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.hub.SettingsData} - */ -proto.hub.SettingsData.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.hub.SettingsData; - return proto.hub.SettingsData.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.hub.SettingsData} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.hub.SettingsData} - */ -proto.hub.SettingsData.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readDouble()); - msg.setStoragePriceAsk(value); - break; - case 2: - var value = /** @type {number} */ (reader.readDouble()); - msg.setBandwidthPriceAsk(value); - break; - case 3: - var value = /** @type {number} */ (reader.readDouble()); - msg.setStorageTimeMin(value); - break; - case 4: - var value = /** @type {number} */ (reader.readDouble()); - msg.setBandwidthLimit(value); - break; - case 5: - var value = /** @type {number} */ (reader.readDouble()); - msg.setCollateralStake(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.hub.SettingsData.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.hub.SettingsData.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.hub.SettingsData} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.hub.SettingsData.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStoragePriceAsk(); - if (f !== 0.0) { - writer.writeDouble( - 1, - f - ); - } - f = message.getBandwidthPriceAsk(); - if (f !== 0.0) { - writer.writeDouble( - 2, - f - ); - } - f = message.getStorageTimeMin(); - if (f !== 0.0) { - writer.writeDouble( - 3, - f - ); - } - f = message.getBandwidthLimit(); - if (f !== 0.0) { - writer.writeDouble( - 4, - f - ); - } - f = message.getCollateralStake(); - if (f !== 0.0) { - writer.writeDouble( - 5, - f - ); - } -}; - - -/** - * optional double storage_price_ask = 1; - * @return {number} - */ -proto.hub.SettingsData.prototype.getStoragePriceAsk = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.SettingsData} returns this - */ -proto.hub.SettingsData.prototype.setStoragePriceAsk = function(value) { - return jspb.Message.setProto3FloatField(this, 1, value); -}; - - -/** - * optional double bandwidth_price_ask = 2; - * @return {number} - */ -proto.hub.SettingsData.prototype.getBandwidthPriceAsk = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.SettingsData} returns this - */ -proto.hub.SettingsData.prototype.setBandwidthPriceAsk = function(value) { - return jspb.Message.setProto3FloatField(this, 2, value); -}; - - -/** - * optional double storage_time_min = 3; - * @return {number} - */ -proto.hub.SettingsData.prototype.getStorageTimeMin = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.SettingsData} returns this - */ -proto.hub.SettingsData.prototype.setStorageTimeMin = function(value) { - return jspb.Message.setProto3FloatField(this, 3, value); -}; - - -/** - * optional double bandwidth_limit = 4; - * @return {number} - */ -proto.hub.SettingsData.prototype.getBandwidthLimit = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.SettingsData} returns this - */ -proto.hub.SettingsData.prototype.setBandwidthLimit = function(value) { - return jspb.Message.setProto3FloatField(this, 4, value); -}; - - -/** - * optional double collateral_stake = 5; - * @return {number} - */ -proto.hub.SettingsData.prototype.getCollateralStake = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.SettingsData} returns this - */ -proto.hub.SettingsData.prototype.setCollateralStake = function(value) { - return jspb.Message.setProto3FloatField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.hub.HostsReq.prototype.toObject = function(opt_includeInstance) { - return proto.hub.HostsReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.hub.HostsReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.hub.HostsReq.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - respSize: jspb.Message.getFieldWithDefault(msg, 2, 0), - mode: jspb.Message.getFieldWithDefault(msg, 3, 0), - version: jspb.Message.getFieldWithDefault(msg, 4, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.hub.HostsReq} - */ -proto.hub.HostsReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.hub.HostsReq; - return proto.hub.HostsReq.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.hub.HostsReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.hub.HostsReq} - */ -proto.hub.HostsReq.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.setId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setRespSize(value); - break; - case 3: - var value = /** @type {!proto.hub.HostsReq.Mode} */ (reader.readEnum()); - msg.setMode(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setVersion(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.hub.HostsReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.hub.HostsReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.hub.HostsReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.hub.HostsReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getRespSize(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } - f = message.getMode(); - if (f !== 0.0) { - writer.writeEnum( - 3, - f - ); - } - f = message.getVersion(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } -}; - - -/** - * @enum {number} - */ -proto.hub.HostsReq.Mode = { - SCORE: 0, - GEO: 1, - REP: 2, - PRICE: 3, - SPEED: 4, - TESTNET: 5 -}; - -/** - * optional string id = 1; - * @return {string} - */ -proto.hub.HostsReq.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.hub.HostsReq} returns this - */ -proto.hub.HostsReq.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional int32 resp_size = 2; - * @return {number} - */ -proto.hub.HostsReq.prototype.getRespSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.HostsReq} returns this - */ -proto.hub.HostsReq.prototype.setRespSize = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional Mode mode = 3; - * @return {!proto.hub.HostsReq.Mode} - */ -proto.hub.HostsReq.prototype.getMode = function() { - return /** @type {!proto.hub.HostsReq.Mode} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {!proto.hub.HostsReq.Mode} value - * @return {!proto.hub.HostsReq} returns this - */ -proto.hub.HostsReq.prototype.setMode = function(value) { - return jspb.Message.setProto3EnumField(this, 3, value); -}; - - -/** - * optional string version = 4; - * @return {string} - */ -proto.hub.HostsReq.prototype.getVersion = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.hub.HostsReq} returns this - */ -proto.hub.HostsReq.prototype.setVersion = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.hub.RolesHostsReq.prototype.toObject = function(opt_includeInstance) { - return proto.hub.RolesHostsReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.hub.RolesHostsReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.hub.RolesHostsReq.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - respSize: jspb.Message.getFieldWithDefault(msg, 2, 0), - role: 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.hub.RolesHostsReq} - */ -proto.hub.RolesHostsReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.hub.RolesHostsReq; - return proto.hub.RolesHostsReq.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.hub.RolesHostsReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.hub.RolesHostsReq} - */ -proto.hub.RolesHostsReq.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.setId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setRespSize(value); - break; - case 3: - var value = /** @type {!proto.node.NodeRole} */ (reader.readEnum()); - msg.setRole(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.hub.RolesHostsReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.hub.RolesHostsReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.hub.RolesHostsReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.hub.RolesHostsReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getRespSize(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } - f = message.getRole(); - if (f !== 0.0) { - writer.writeEnum( - 3, - f - ); - } -}; - - -/** - * optional string id = 1; - * @return {string} - */ -proto.hub.RolesHostsReq.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.hub.RolesHostsReq} returns this - */ -proto.hub.RolesHostsReq.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional int32 resp_size = 2; - * @return {number} - */ -proto.hub.RolesHostsReq.prototype.getRespSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.RolesHostsReq} returns this - */ -proto.hub.RolesHostsReq.prototype.setRespSize = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional node.NodeRole role = 3; - * @return {!proto.node.NodeRole} - */ -proto.hub.RolesHostsReq.prototype.getRole = function() { - return /** @type {!proto.node.NodeRole} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {!proto.node.NodeRole} value - * @return {!proto.hub.RolesHostsReq} returns this - */ -proto.hub.RolesHostsReq.prototype.setRole = function(value) { - return jspb.Message.setProto3EnumField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.hub.HostsResp.prototype.toObject = function(opt_includeInstance) { - return proto.hub.HostsResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.hub.HostsResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.hub.HostsResp.toObject = function(includeInstance, msg) { - var f, obj = { - code: jspb.Message.getFieldWithDefault(msg, 1, 0), - message: jspb.Message.getFieldWithDefault(msg, 2, ""), - hosts: (f = msg.getHosts()) && proto.hub.HostsData.toObject(includeInstance, f), - respSize: jspb.Message.getFieldWithDefault(msg, 4, 0), - mode: jspb.Message.getFieldWithDefault(msg, 5, ""), - responseTime: (f = msg.getResponseTime()) && google_protobuf_timestamp_pb.Timestamp.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.hub.HostsResp} - */ -proto.hub.HostsResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.hub.HostsResp; - return proto.hub.HostsResp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.hub.HostsResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.hub.HostsResp} - */ -proto.hub.HostsResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.hub.ResponseCode} */ (reader.readEnum()); - msg.setCode(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setMessage(value); - break; - case 3: - var value = new proto.hub.HostsData; - reader.readMessage(value,proto.hub.HostsData.deserializeBinaryFromReader); - msg.setHosts(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt32()); - msg.setRespSize(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setMode(value); - break; - case 6: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setResponseTime(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.hub.HostsResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.hub.HostsResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.hub.HostsResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.hub.HostsResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getCode(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getMessage(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getHosts(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.hub.HostsData.serializeBinaryToWriter - ); - } - f = message.getRespSize(); - if (f !== 0) { - writer.writeInt32( - 4, - f - ); - } - f = message.getMode(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getResponseTime(); - if (f != null) { - writer.writeMessage( - 6, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } -}; - - -/** - * optional ResponseCode code = 1; - * @return {!proto.hub.ResponseCode} - */ -proto.hub.HostsResp.prototype.getCode = function() { - return /** @type {!proto.hub.ResponseCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.hub.ResponseCode} value - * @return {!proto.hub.HostsResp} returns this - */ -proto.hub.HostsResp.prototype.setCode = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional string message = 2; - * @return {string} - */ -proto.hub.HostsResp.prototype.getMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.hub.HostsResp} returns this - */ -proto.hub.HostsResp.prototype.setMessage = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional HostsData hosts = 3; - * @return {?proto.hub.HostsData} - */ -proto.hub.HostsResp.prototype.getHosts = function() { - return /** @type{?proto.hub.HostsData} */ ( - jspb.Message.getWrapperField(this, proto.hub.HostsData, 3)); -}; - - -/** - * @param {?proto.hub.HostsData|undefined} value - * @return {!proto.hub.HostsResp} returns this -*/ -proto.hub.HostsResp.prototype.setHosts = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.hub.HostsResp} returns this - */ -proto.hub.HostsResp.prototype.clearHosts = function() { - return this.setHosts(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.hub.HostsResp.prototype.hasHosts = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional int32 resp_size = 4; - * @return {number} - */ -proto.hub.HostsResp.prototype.getRespSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.HostsResp} returns this - */ -proto.hub.HostsResp.prototype.setRespSize = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional string mode = 5; - * @return {string} - */ -proto.hub.HostsResp.prototype.getMode = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.hub.HostsResp} returns this - */ -proto.hub.HostsResp.prototype.setMode = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * optional google.protobuf.Timestamp response_time = 6; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.hub.HostsResp.prototype.getResponseTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.hub.HostsResp} returns this -*/ -proto.hub.HostsResp.prototype.setResponseTime = function(value) { - return jspb.Message.setWrapperField(this, 6, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.hub.HostsResp} returns this - */ -proto.hub.HostsResp.prototype.clearResponseTime = function() { - return this.setResponseTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.hub.HostsResp.prototype.hasResponseTime = function() { - return jspb.Message.getField(this, 6) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.hub.StatsReq.prototype.toObject = function(opt_includeInstance) { - return proto.hub.StatsReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.hub.StatsReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.hub.StatsReq.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.hub.StatsReq} - */ -proto.hub.StatsReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.hub.StatsReq; - return proto.hub.StatsReq.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.hub.StatsReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.hub.StatsReq} - */ -proto.hub.StatsReq.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.setId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.hub.StatsReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.hub.StatsReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.hub.StatsReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.hub.StatsReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string id = 1; - * @return {string} - */ -proto.hub.StatsReq.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.hub.StatsReq} returns this - */ -proto.hub.StatsReq.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.hub.StatsResp.prototype.toObject = function(opt_includeInstance) { - return proto.hub.StatsResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.hub.StatsResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.hub.StatsResp.toObject = function(includeInstance, msg) { - var f, obj = { - code: jspb.Message.getFieldWithDefault(msg, 1, 0), - message: jspb.Message.getFieldWithDefault(msg, 2, ""), - responseTime: (f = msg.getResponseTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - stats: (f = msg.getStats()) && github_com_bittorrent_go$btfs$common_protos_node_node_pb.StorageStat.HostStats.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.hub.StatsResp} - */ -proto.hub.StatsResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.hub.StatsResp; - return proto.hub.StatsResp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.hub.StatsResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.hub.StatsResp} - */ -proto.hub.StatsResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.hub.ResponseCode} */ (reader.readEnum()); - msg.setCode(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setMessage(value); - break; - case 3: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setResponseTime(value); - break; - case 4: - var value = new github_com_bittorrent_go$btfs$common_protos_node_node_pb.StorageStat.HostStats; - reader.readMessage(value,github_com_bittorrent_go$btfs$common_protos_node_node_pb.StorageStat.HostStats.deserializeBinaryFromReader); - msg.setStats(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.hub.StatsResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.hub.StatsResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.hub.StatsResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.hub.StatsResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getCode(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getMessage(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getResponseTime(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getStats(); - if (f != null) { - writer.writeMessage( - 4, - f, - github_com_bittorrent_go$btfs$common_protos_node_node_pb.StorageStat.HostStats.serializeBinaryToWriter - ); - } -}; - - -/** - * optional ResponseCode code = 1; - * @return {!proto.hub.ResponseCode} - */ -proto.hub.StatsResp.prototype.getCode = function() { - return /** @type {!proto.hub.ResponseCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.hub.ResponseCode} value - * @return {!proto.hub.StatsResp} returns this - */ -proto.hub.StatsResp.prototype.setCode = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional string message = 2; - * @return {string} - */ -proto.hub.StatsResp.prototype.getMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.hub.StatsResp} returns this - */ -proto.hub.StatsResp.prototype.setMessage = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional google.protobuf.Timestamp response_time = 3; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.hub.StatsResp.prototype.getResponseTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.hub.StatsResp} returns this -*/ -proto.hub.StatsResp.prototype.setResponseTime = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.hub.StatsResp} returns this - */ -proto.hub.StatsResp.prototype.clearResponseTime = function() { - return this.setResponseTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.hub.StatsResp.prototype.hasResponseTime = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional node.StorageStat.HostStats stats = 4; - * @return {?proto.node.StorageStat.HostStats} - */ -proto.hub.StatsResp.prototype.getStats = function() { - return /** @type{?proto.node.StorageStat.HostStats} */ ( - jspb.Message.getWrapperField(this, github_com_bittorrent_go$btfs$common_protos_node_node_pb.StorageStat.HostStats, 4)); -}; - - -/** - * @param {?proto.node.StorageStat.HostStats|undefined} value - * @return {!proto.hub.StatsResp} returns this -*/ -proto.hub.StatsResp.prototype.setStats = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.hub.StatsResp} returns this - */ -proto.hub.StatsResp.prototype.clearStats = function() { - return this.setStats(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.hub.StatsResp.prototype.hasStats = function() { - return jspb.Message.getField(this, 4) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.hub.Candidate.prototype.toObject = function(opt_includeInstance) { - return proto.hub.Candidate.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.hub.Candidate} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.hub.Candidate.toObject = function(includeInstance, msg) { - var f, obj = { - nodeId: jspb.Message.getFieldWithDefault(msg, 1, ""), - heartBeats: jspb.Message.getFieldWithDefault(msg, 2, 0), - uploadAverage: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0), - uploadVariance: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0), - downloadAverage: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.0), - downloadVariance: jspb.Message.getFloatingPointFieldWithDefault(msg, 6, 0.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.hub.Candidate} - */ -proto.hub.Candidate.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.hub.Candidate; - return proto.hub.Candidate.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.hub.Candidate} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.hub.Candidate} - */ -proto.hub.Candidate.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.setNodeId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setHeartBeats(value); - break; - case 3: - var value = /** @type {number} */ (reader.readFloat()); - msg.setUploadAverage(value); - break; - case 4: - var value = /** @type {number} */ (reader.readFloat()); - msg.setUploadVariance(value); - break; - case 5: - var value = /** @type {number} */ (reader.readFloat()); - msg.setDownloadAverage(value); - break; - case 6: - var value = /** @type {number} */ (reader.readFloat()); - msg.setDownloadVariance(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.hub.Candidate.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.hub.Candidate.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.hub.Candidate} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.hub.Candidate.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNodeId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getHeartBeats(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getUploadAverage(); - if (f !== 0.0) { - writer.writeFloat( - 3, - f - ); - } - f = message.getUploadVariance(); - if (f !== 0.0) { - writer.writeFloat( - 4, - f - ); - } - f = message.getDownloadAverage(); - if (f !== 0.0) { - writer.writeFloat( - 5, - f - ); - } - f = message.getDownloadVariance(); - if (f !== 0.0) { - writer.writeFloat( - 6, - f - ); - } -}; - - -/** - * optional string node_id = 1; - * @return {string} - */ -proto.hub.Candidate.prototype.getNodeId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.hub.Candidate} returns this - */ -proto.hub.Candidate.prototype.setNodeId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional uint64 heart_beats = 2; - * @return {number} - */ -proto.hub.Candidate.prototype.getHeartBeats = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.Candidate} returns this - */ -proto.hub.Candidate.prototype.setHeartBeats = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional float upload_average = 3; - * @return {number} - */ -proto.hub.Candidate.prototype.getUploadAverage = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.Candidate} returns this - */ -proto.hub.Candidate.prototype.setUploadAverage = function(value) { - return jspb.Message.setProto3FloatField(this, 3, value); -}; - - -/** - * optional float upload_variance = 4; - * @return {number} - */ -proto.hub.Candidate.prototype.getUploadVariance = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.Candidate} returns this - */ -proto.hub.Candidate.prototype.setUploadVariance = function(value) { - return jspb.Message.setProto3FloatField(this, 4, value); -}; - - -/** - * optional float download_average = 5; - * @return {number} - */ -proto.hub.Candidate.prototype.getDownloadAverage = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.Candidate} returns this - */ -proto.hub.Candidate.prototype.setDownloadAverage = function(value) { - return jspb.Message.setProto3FloatField(this, 5, value); -}; - - -/** - * optional float download_variance = 6; - * @return {number} - */ -proto.hub.Candidate.prototype.getDownloadVariance = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 6, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.Candidate} returns this - */ -proto.hub.Candidate.prototype.setDownloadVariance = function(value) { - return jspb.Message.setProto3FloatField(this, 6, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.hub.ParseReq.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.hub.ParseReq.prototype.toObject = function(opt_includeInstance) { - return proto.hub.ParseReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.hub.ParseReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.hub.ParseReq.toObject = function(includeInstance, msg) { - var f, obj = { - candidatesList: jspb.Message.toObjectList(msg.getCandidatesList(), - proto.hub.Candidate.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.hub.ParseReq} - */ -proto.hub.ParseReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.hub.ParseReq; - return proto.hub.ParseReq.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.hub.ParseReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.hub.ParseReq} - */ -proto.hub.ParseReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.hub.Candidate; - reader.readMessage(value,proto.hub.Candidate.deserializeBinaryFromReader); - msg.addCandidates(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.hub.ParseReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.hub.ParseReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.hub.ParseReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.hub.ParseReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getCandidatesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.hub.Candidate.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Candidate candidates = 1; - * @return {!Array} - */ -proto.hub.ParseReq.prototype.getCandidatesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.hub.Candidate, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.hub.ParseReq} returns this -*/ -proto.hub.ParseReq.prototype.setCandidatesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.hub.Candidate=} opt_value - * @param {number=} opt_index - * @return {!proto.hub.Candidate} - */ -proto.hub.ParseReq.prototype.addCandidates = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.hub.Candidate, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.hub.ParseReq} returns this - */ -proto.hub.ParseReq.prototype.clearCandidatesList = function() { - return this.setCandidatesList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.hub.RecycleReq.prototype.toObject = function(opt_includeInstance) { - return proto.hub.RecycleReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.hub.RecycleReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.hub.RecycleReq.toObject = function(includeInstance, msg) { - var f, obj = { - esIndex: jspb.Message.getFieldWithDefault(msg, 1, 0), - timeScopeInHours: 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.hub.RecycleReq} - */ -proto.hub.RecycleReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.hub.RecycleReq; - return proto.hub.RecycleReq.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.hub.RecycleReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.hub.RecycleReq} - */ -proto.hub.RecycleReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.hub.RecycleReq.ESIndex} */ (reader.readEnum()); - msg.setEsIndex(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTimeScopeInHours(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.hub.RecycleReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.hub.RecycleReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.hub.RecycleReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.hub.RecycleReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getEsIndex(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getTimeScopeInHours(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } -}; - - -/** - * @enum {number} - */ -proto.hub.RecycleReq.ESIndex = { - NODES: 0, - NETWORK: 1, - TESTNET_NODES: 2 -}; - -/** - * optional ESIndex es_index = 1; - * @return {!proto.hub.RecycleReq.ESIndex} - */ -proto.hub.RecycleReq.prototype.getEsIndex = function() { - return /** @type {!proto.hub.RecycleReq.ESIndex} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.hub.RecycleReq.ESIndex} value - * @return {!proto.hub.RecycleReq} returns this - */ -proto.hub.RecycleReq.prototype.setEsIndex = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional int64 time_scope_in_hours = 2; - * @return {number} - */ -proto.hub.RecycleReq.prototype.getTimeScopeInHours = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.RecycleReq} returns this - */ -proto.hub.RecycleReq.prototype.setTimeScopeInHours = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.hub.ParseResp.prototype.toObject = function(opt_includeInstance) { - return proto.hub.ParseResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.hub.ParseResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.hub.ParseResp.toObject = function(includeInstance, msg) { - var f, obj = { - code: jspb.Message.getFieldWithDefault(msg, 1, 0), - message: jspb.Message.getFieldWithDefault(msg, 2, ""), - responseTime: (f = msg.getResponseTime()) && google_protobuf_timestamp_pb.Timestamp.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.hub.ParseResp} - */ -proto.hub.ParseResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.hub.ParseResp; - return proto.hub.ParseResp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.hub.ParseResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.hub.ParseResp} - */ -proto.hub.ParseResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.hub.ResponseCode} */ (reader.readEnum()); - msg.setCode(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setMessage(value); - break; - case 3: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setResponseTime(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.hub.ParseResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.hub.ParseResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.hub.ParseResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.hub.ParseResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getCode(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getMessage(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getResponseTime(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } -}; - - -/** - * optional ResponseCode code = 1; - * @return {!proto.hub.ResponseCode} - */ -proto.hub.ParseResp.prototype.getCode = function() { - return /** @type {!proto.hub.ResponseCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.hub.ResponseCode} value - * @return {!proto.hub.ParseResp} returns this - */ -proto.hub.ParseResp.prototype.setCode = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional string message = 2; - * @return {string} - */ -proto.hub.ParseResp.prototype.getMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.hub.ParseResp} returns this - */ -proto.hub.ParseResp.prototype.setMessage = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional google.protobuf.Timestamp response_time = 3; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.hub.ParseResp.prototype.getResponseTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.hub.ParseResp} returns this -*/ -proto.hub.ParseResp.prototype.setResponseTime = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.hub.ParseResp} returns this - */ -proto.hub.ParseResp.prototype.clearResponseTime = function() { - return this.setResponseTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.hub.ParseResp.prototype.hasResponseTime = function() { - return jspb.Message.getField(this, 3) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.hub.HostsData.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.hub.HostsData.prototype.toObject = function(opt_includeInstance) { - return proto.hub.HostsData.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.hub.HostsData} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.hub.HostsData.toObject = function(includeInstance, msg) { - var f, obj = { - hostsList: jspb.Message.toObjectList(msg.getHostsList(), - proto.hub.Host.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.hub.HostsData} - */ -proto.hub.HostsData.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.hub.HostsData; - return proto.hub.HostsData.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.hub.HostsData} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.hub.HostsData} - */ -proto.hub.HostsData.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.hub.Host; - reader.readMessage(value,proto.hub.Host.deserializeBinaryFromReader); - msg.addHosts(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.hub.HostsData.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.hub.HostsData.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.hub.HostsData} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.hub.HostsData.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getHostsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.hub.Host.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Host hosts = 1; - * @return {!Array} - */ -proto.hub.HostsData.prototype.getHostsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.hub.Host, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.hub.HostsData} returns this -*/ -proto.hub.HostsData.prototype.setHostsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.hub.Host=} opt_value - * @param {number=} opt_index - * @return {!proto.hub.Host} - */ -proto.hub.HostsData.prototype.addHosts = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.hub.Host, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.hub.HostsData} returns this - */ -proto.hub.HostsData.prototype.clearHostsList = function() { - return this.setHostsList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.hub.Host.repeatedFields_ = [35]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.hub.Host.prototype.toObject = function(opt_includeInstance) { - return proto.hub.Host.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.hub.Host} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.hub.Host.toObject = function(includeInstance, msg) { - var f, obj = { - nodeId: jspb.Message.getFieldWithDefault(msg, 1, ""), - createTimestamp: (f = msg.getCreateTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - updateTimestamp: (f = msg.getUpdateTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - region: jspb.Message.getFieldWithDefault(msg, 4, ""), - btfsVersion: jspb.Message.getFieldWithDefault(msg, 5, ""), - score: jspb.Message.getFloatingPointFieldWithDefault(msg, 6, 0.0), - heartBeats: jspb.Message.getFieldWithDefault(msg, 7, 0), - uptime: jspb.Message.getFloatingPointFieldWithDefault(msg, 8, 0.0), - age: jspb.Message.getFieldWithDefault(msg, 9, 0), - reputation: jspb.Message.getFloatingPointFieldWithDefault(msg, 10, 0.0), - uploadAverage: jspb.Message.getFloatingPointFieldWithDefault(msg, 11, 0.0), - uploadVariance: jspb.Message.getFloatingPointFieldWithDefault(msg, 12, 0.0), - downloadAverage: jspb.Message.getFloatingPointFieldWithDefault(msg, 13, 0.0), - downloadVariance: jspb.Message.getFloatingPointFieldWithDefault(msg, 14, 0.0), - location: (f = msg.getLocation()) && proto.hub.Location.toObject(includeInstance, f), - storageVolumeCap: jspb.Message.getFloatingPointFieldWithDefault(msg, 16, 0.0), - storageVolumeLeft: jspb.Message.getFloatingPointFieldWithDefault(msg, 17, 0.0), - storageTimeMin: jspb.Message.getFieldWithDefault(msg, 18, 0), - storagePriceAsk: jspb.Message.getFieldWithDefault(msg, 19, 0), - storagePriceEst: jspb.Message.getFieldWithDefault(msg, 20, 0), - bandwidthLimit: jspb.Message.getFloatingPointFieldWithDefault(msg, 21, 0.0), - bandwidthPriceAsk: jspb.Message.getFieldWithDefault(msg, 22, 0), - bandwidthPriceEst: jspb.Message.getFieldWithDefault(msg, 23, 0), - collateralStake: jspb.Message.getFieldWithDefault(msg, 24, 0), - collateralLost: jspb.Message.getFieldWithDefault(msg, 25, 0), - collateralBurn: jspb.Message.getFieldWithDefault(msg, 26, 0), - countryShort: jspb.Message.getFieldWithDefault(msg, 27, ""), - flg: (f = msg.getFlg()) && github_com_bittorrent_go$btfs$common_protos_node_node_pb.Node.ExperimentalFlags.toObject(includeInstance, f), - discovery: jspb.Message.getFloatingPointFieldWithDefault(msg, 29, 0.0), - uptimeScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 30, 0.0), - ageScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 31, 0.0), - versionScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 32, 0.0), - uploadSpeedScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 33, 0.0), - downloadSpeedScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 34, 0.0), - rolesList: (f = jspb.Message.getRepeatedField(msg, 35)) == null ? undefined : 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.hub.Host} - */ -proto.hub.Host.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.hub.Host; - return proto.hub.Host.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.hub.Host} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.hub.Host} - */ -proto.hub.Host.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.setNodeId(value); - break; - case 2: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setCreateTimestamp(value); - break; - case 3: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setUpdateTimestamp(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setRegion(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setBtfsVersion(value); - break; - case 6: - var value = /** @type {number} */ (reader.readFloat()); - msg.setScore(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint64()); - msg.setHeartBeats(value); - break; - case 8: - var value = /** @type {number} */ (reader.readFloat()); - msg.setUptime(value); - break; - case 9: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAge(value); - break; - case 10: - var value = /** @type {number} */ (reader.readFloat()); - msg.setReputation(value); - break; - case 11: - var value = /** @type {number} */ (reader.readFloat()); - msg.setUploadAverage(value); - break; - case 12: - var value = /** @type {number} */ (reader.readFloat()); - msg.setUploadVariance(value); - break; - case 13: - var value = /** @type {number} */ (reader.readFloat()); - msg.setDownloadAverage(value); - break; - case 14: - var value = /** @type {number} */ (reader.readFloat()); - msg.setDownloadVariance(value); - break; - case 15: - var value = new proto.hub.Location; - reader.readMessage(value,proto.hub.Location.deserializeBinaryFromReader); - msg.setLocation(value); - break; - case 16: - var value = /** @type {number} */ (reader.readFloat()); - msg.setStorageVolumeCap(value); - break; - case 17: - var value = /** @type {number} */ (reader.readFloat()); - msg.setStorageVolumeLeft(value); - break; - case 18: - var value = /** @type {number} */ (reader.readUint64()); - msg.setStorageTimeMin(value); - break; - case 19: - var value = /** @type {number} */ (reader.readUint64()); - msg.setStoragePriceAsk(value); - break; - case 20: - var value = /** @type {number} */ (reader.readUint64()); - msg.setStoragePriceEst(value); - break; - case 21: - var value = /** @type {number} */ (reader.readDouble()); - msg.setBandwidthLimit(value); - break; - case 22: - var value = /** @type {number} */ (reader.readUint64()); - msg.setBandwidthPriceAsk(value); - break; - case 23: - var value = /** @type {number} */ (reader.readUint64()); - msg.setBandwidthPriceEst(value); - break; - case 24: - var value = /** @type {number} */ (reader.readUint64()); - msg.setCollateralStake(value); - break; - case 25: - var value = /** @type {number} */ (reader.readUint64()); - msg.setCollateralLost(value); - break; - case 26: - var value = /** @type {number} */ (reader.readUint64()); - msg.setCollateralBurn(value); - break; - case 27: - var value = /** @type {string} */ (reader.readString()); - msg.setCountryShort(value); - break; - case 28: - var value = new github_com_bittorrent_go$btfs$common_protos_node_node_pb.Node.ExperimentalFlags; - reader.readMessage(value,github_com_bittorrent_go$btfs$common_protos_node_node_pb.Node.ExperimentalFlags.deserializeBinaryFromReader); - msg.setFlg(value); - break; - case 29: - var value = /** @type {number} */ (reader.readFloat()); - msg.setDiscovery(value); - break; - case 30: - var value = /** @type {number} */ (reader.readFloat()); - msg.setUptimeScore(value); - break; - case 31: - var value = /** @type {number} */ (reader.readFloat()); - msg.setAgeScore(value); - break; - case 32: - var value = /** @type {number} */ (reader.readFloat()); - msg.setVersionScore(value); - break; - case 33: - var value = /** @type {number} */ (reader.readFloat()); - msg.setUploadSpeedScore(value); - break; - case 34: - var value = /** @type {number} */ (reader.readFloat()); - msg.setDownloadSpeedScore(value); - break; - case 35: - var value = /** @type {!Array} */ (reader.readPackedEnum()); - msg.setRolesList(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.hub.Host.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.hub.Host.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.hub.Host} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.hub.Host.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNodeId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getCreateTimestamp(); - if (f != null) { - writer.writeMessage( - 2, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getUpdateTimestamp(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getRegion(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getBtfsVersion(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getScore(); - if (f !== 0.0) { - writer.writeFloat( - 6, - f - ); - } - f = message.getHeartBeats(); - if (f !== 0) { - writer.writeUint64( - 7, - f - ); - } - f = message.getUptime(); - if (f !== 0.0) { - writer.writeFloat( - 8, - f - ); - } - f = message.getAge(); - if (f !== 0) { - writer.writeUint64( - 9, - f - ); - } - f = message.getReputation(); - if (f !== 0.0) { - writer.writeFloat( - 10, - f - ); - } - f = message.getUploadAverage(); - if (f !== 0.0) { - writer.writeFloat( - 11, - f - ); - } - f = message.getUploadVariance(); - if (f !== 0.0) { - writer.writeFloat( - 12, - f - ); - } - f = message.getDownloadAverage(); - if (f !== 0.0) { - writer.writeFloat( - 13, - f - ); - } - f = message.getDownloadVariance(); - if (f !== 0.0) { - writer.writeFloat( - 14, - f - ); - } - f = message.getLocation(); - if (f != null) { - writer.writeMessage( - 15, - f, - proto.hub.Location.serializeBinaryToWriter - ); - } - f = message.getStorageVolumeCap(); - if (f !== 0.0) { - writer.writeFloat( - 16, - f - ); - } - f = message.getStorageVolumeLeft(); - if (f !== 0.0) { - writer.writeFloat( - 17, - f - ); - } - f = message.getStorageTimeMin(); - if (f !== 0) { - writer.writeUint64( - 18, - f - ); - } - f = message.getStoragePriceAsk(); - if (f !== 0) { - writer.writeUint64( - 19, - f - ); - } - f = message.getStoragePriceEst(); - if (f !== 0) { - writer.writeUint64( - 20, - f - ); - } - f = message.getBandwidthLimit(); - if (f !== 0.0) { - writer.writeDouble( - 21, - f - ); - } - f = message.getBandwidthPriceAsk(); - if (f !== 0) { - writer.writeUint64( - 22, - f - ); - } - f = message.getBandwidthPriceEst(); - if (f !== 0) { - writer.writeUint64( - 23, - f - ); - } - f = message.getCollateralStake(); - if (f !== 0) { - writer.writeUint64( - 24, - f - ); - } - f = message.getCollateralLost(); - if (f !== 0) { - writer.writeUint64( - 25, - f - ); - } - f = message.getCollateralBurn(); - if (f !== 0) { - writer.writeUint64( - 26, - f - ); - } - f = message.getCountryShort(); - if (f.length > 0) { - writer.writeString( - 27, - f - ); - } - f = message.getFlg(); - if (f != null) { - writer.writeMessage( - 28, - f, - github_com_bittorrent_go$btfs$common_protos_node_node_pb.Node.ExperimentalFlags.serializeBinaryToWriter - ); - } - f = message.getDiscovery(); - if (f !== 0.0) { - writer.writeFloat( - 29, - f - ); - } - f = message.getUptimeScore(); - if (f !== 0.0) { - writer.writeFloat( - 30, - f - ); - } - f = message.getAgeScore(); - if (f !== 0.0) { - writer.writeFloat( - 31, - f - ); - } - f = message.getVersionScore(); - if (f !== 0.0) { - writer.writeFloat( - 32, - f - ); - } - f = message.getUploadSpeedScore(); - if (f !== 0.0) { - writer.writeFloat( - 33, - f - ); - } - f = message.getDownloadSpeedScore(); - if (f !== 0.0) { - writer.writeFloat( - 34, - f - ); - } - f = message.getRolesList(); - if (f.length > 0) { - writer.writePackedEnum( - 35, - f - ); - } -}; - - -/** - * optional string node_id = 1; - * @return {string} - */ -proto.hub.Host.prototype.getNodeId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.setNodeId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional google.protobuf.Timestamp create_timestamp = 2; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.hub.Host.prototype.getCreateTimestamp = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.hub.Host} returns this -*/ -proto.hub.Host.prototype.setCreateTimestamp = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.clearCreateTimestamp = function() { - return this.setCreateTimestamp(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.hub.Host.prototype.hasCreateTimestamp = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional google.protobuf.Timestamp update_timestamp = 3; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.hub.Host.prototype.getUpdateTimestamp = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.hub.Host} returns this -*/ -proto.hub.Host.prototype.setUpdateTimestamp = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.clearUpdateTimestamp = function() { - return this.setUpdateTimestamp(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.hub.Host.prototype.hasUpdateTimestamp = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional string region = 4; - * @return {string} - */ -proto.hub.Host.prototype.getRegion = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.setRegion = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional string btfs_version = 5; - * @return {string} - */ -proto.hub.Host.prototype.getBtfsVersion = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.setBtfsVersion = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * optional float score = 6; - * @return {number} - */ -proto.hub.Host.prototype.getScore = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 6, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.setScore = function(value) { - return jspb.Message.setProto3FloatField(this, 6, value); -}; - - -/** - * optional uint64 heart_beats = 7; - * @return {number} - */ -proto.hub.Host.prototype.getHeartBeats = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.setHeartBeats = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional float uptime = 8; - * @return {number} - */ -proto.hub.Host.prototype.getUptime = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 8, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.setUptime = function(value) { - return jspb.Message.setProto3FloatField(this, 8, value); -}; - - -/** - * optional uint64 age = 9; - * @return {number} - */ -proto.hub.Host.prototype.getAge = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.setAge = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * optional float reputation = 10; - * @return {number} - */ -proto.hub.Host.prototype.getReputation = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 10, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.setReputation = function(value) { - return jspb.Message.setProto3FloatField(this, 10, value); -}; - - -/** - * optional float upload_average = 11; - * @return {number} - */ -proto.hub.Host.prototype.getUploadAverage = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 11, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.setUploadAverage = function(value) { - return jspb.Message.setProto3FloatField(this, 11, value); -}; - - -/** - * optional float upload_variance = 12; - * @return {number} - */ -proto.hub.Host.prototype.getUploadVariance = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 12, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.setUploadVariance = function(value) { - return jspb.Message.setProto3FloatField(this, 12, value); -}; - - -/** - * optional float download_average = 13; - * @return {number} - */ -proto.hub.Host.prototype.getDownloadAverage = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 13, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.setDownloadAverage = function(value) { - return jspb.Message.setProto3FloatField(this, 13, value); -}; - - -/** - * optional float download_variance = 14; - * @return {number} - */ -proto.hub.Host.prototype.getDownloadVariance = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 14, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.setDownloadVariance = function(value) { - return jspb.Message.setProto3FloatField(this, 14, value); -}; - - -/** - * optional Location location = 15; - * @return {?proto.hub.Location} - */ -proto.hub.Host.prototype.getLocation = function() { - return /** @type{?proto.hub.Location} */ ( - jspb.Message.getWrapperField(this, proto.hub.Location, 15)); -}; - - -/** - * @param {?proto.hub.Location|undefined} value - * @return {!proto.hub.Host} returns this -*/ -proto.hub.Host.prototype.setLocation = function(value) { - return jspb.Message.setWrapperField(this, 15, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.clearLocation = function() { - return this.setLocation(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.hub.Host.prototype.hasLocation = function() { - return jspb.Message.getField(this, 15) != null; -}; - - -/** - * optional float storage_volume_cap = 16; - * @return {number} - */ -proto.hub.Host.prototype.getStorageVolumeCap = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 16, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.setStorageVolumeCap = function(value) { - return jspb.Message.setProto3FloatField(this, 16, value); -}; - - -/** - * optional float storage_volume_left = 17; - * @return {number} - */ -proto.hub.Host.prototype.getStorageVolumeLeft = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 17, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.setStorageVolumeLeft = function(value) { - return jspb.Message.setProto3FloatField(this, 17, value); -}; - - -/** - * optional uint64 storage_time_min = 18; - * @return {number} - */ -proto.hub.Host.prototype.getStorageTimeMin = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 18, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.setStorageTimeMin = function(value) { - return jspb.Message.setProto3IntField(this, 18, value); -}; - - -/** - * optional uint64 storage_price_ask = 19; - * @return {number} - */ -proto.hub.Host.prototype.getStoragePriceAsk = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.setStoragePriceAsk = function(value) { - return jspb.Message.setProto3IntField(this, 19, value); -}; - - -/** - * optional uint64 storage_price_est = 20; - * @return {number} - */ -proto.hub.Host.prototype.getStoragePriceEst = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.setStoragePriceEst = function(value) { - return jspb.Message.setProto3IntField(this, 20, value); -}; - - -/** - * optional double bandwidth_limit = 21; - * @return {number} - */ -proto.hub.Host.prototype.getBandwidthLimit = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 21, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.setBandwidthLimit = function(value) { - return jspb.Message.setProto3FloatField(this, 21, value); -}; - - -/** - * optional uint64 bandwidth_price_ask = 22; - * @return {number} - */ -proto.hub.Host.prototype.getBandwidthPriceAsk = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 22, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.setBandwidthPriceAsk = function(value) { - return jspb.Message.setProto3IntField(this, 22, value); -}; - - -/** - * optional uint64 bandwidth_price_est = 23; - * @return {number} - */ -proto.hub.Host.prototype.getBandwidthPriceEst = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 23, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.setBandwidthPriceEst = function(value) { - return jspb.Message.setProto3IntField(this, 23, value); -}; - - -/** - * optional uint64 collateral_stake = 24; - * @return {number} - */ -proto.hub.Host.prototype.getCollateralStake = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 24, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.setCollateralStake = function(value) { - return jspb.Message.setProto3IntField(this, 24, value); -}; - - -/** - * optional uint64 collateral_lost = 25; - * @return {number} - */ -proto.hub.Host.prototype.getCollateralLost = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 25, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.setCollateralLost = function(value) { - return jspb.Message.setProto3IntField(this, 25, value); -}; - - -/** - * optional uint64 collateral_burn = 26; - * @return {number} - */ -proto.hub.Host.prototype.getCollateralBurn = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 26, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.setCollateralBurn = function(value) { - return jspb.Message.setProto3IntField(this, 26, value); -}; - - -/** - * optional string country_short = 27; - * @return {string} - */ -proto.hub.Host.prototype.getCountryShort = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 27, "")); -}; - - -/** - * @param {string} value - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.setCountryShort = function(value) { - return jspb.Message.setProto3StringField(this, 27, value); -}; - - -/** - * optional node.Node.ExperimentalFlags flg = 28; - * @return {?proto.node.Node.ExperimentalFlags} - */ -proto.hub.Host.prototype.getFlg = function() { - return /** @type{?proto.node.Node.ExperimentalFlags} */ ( - jspb.Message.getWrapperField(this, github_com_bittorrent_go$btfs$common_protos_node_node_pb.Node.ExperimentalFlags, 28)); -}; - - -/** - * @param {?proto.node.Node.ExperimentalFlags|undefined} value - * @return {!proto.hub.Host} returns this -*/ -proto.hub.Host.prototype.setFlg = function(value) { - return jspb.Message.setWrapperField(this, 28, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.clearFlg = function() { - return this.setFlg(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.hub.Host.prototype.hasFlg = function() { - return jspb.Message.getField(this, 28) != null; -}; - - -/** - * optional float discovery = 29; - * @return {number} - */ -proto.hub.Host.prototype.getDiscovery = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 29, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.setDiscovery = function(value) { - return jspb.Message.setProto3FloatField(this, 29, value); -}; - - -/** - * optional float uptime_score = 30; - * @return {number} - */ -proto.hub.Host.prototype.getUptimeScore = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 30, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.setUptimeScore = function(value) { - return jspb.Message.setProto3FloatField(this, 30, value); -}; - - -/** - * optional float age_score = 31; - * @return {number} - */ -proto.hub.Host.prototype.getAgeScore = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 31, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.setAgeScore = function(value) { - return jspb.Message.setProto3FloatField(this, 31, value); -}; - - -/** - * optional float version_score = 32; - * @return {number} - */ -proto.hub.Host.prototype.getVersionScore = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 32, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.setVersionScore = function(value) { - return jspb.Message.setProto3FloatField(this, 32, value); -}; - - -/** - * optional float upload_speed_score = 33; - * @return {number} - */ -proto.hub.Host.prototype.getUploadSpeedScore = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 33, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.setUploadSpeedScore = function(value) { - return jspb.Message.setProto3FloatField(this, 33, value); -}; - - -/** - * optional float download_speed_score = 34; - * @return {number} - */ -proto.hub.Host.prototype.getDownloadSpeedScore = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 34, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.setDownloadSpeedScore = function(value) { - return jspb.Message.setProto3FloatField(this, 34, value); -}; - - -/** - * repeated node.NodeRole roles = 35; - * @return {!Array} - */ -proto.hub.Host.prototype.getRolesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 35)); -}; - - -/** - * @param {!Array} value - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.setRolesList = function(value) { - return jspb.Message.setField(this, 35, value || []); -}; - - -/** - * @param {!proto.node.NodeRole} value - * @param {number=} opt_index - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.addRoles = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 35, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.hub.Host} returns this - */ -proto.hub.Host.prototype.clearRolesList = function() { - return this.setRolesList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.hub.Location.prototype.toObject = function(opt_includeInstance) { - return proto.hub.Location.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.hub.Location} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.hub.Location.toObject = function(includeInstance, msg) { - var f, obj = { - lat: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0), - lon: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.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.hub.Location} - */ -proto.hub.Location.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.hub.Location; - return proto.hub.Location.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.hub.Location} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.hub.Location} - */ -proto.hub.Location.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readDouble()); - msg.setLat(value); - break; - case 2: - var value = /** @type {number} */ (reader.readDouble()); - msg.setLon(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.hub.Location.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.hub.Location.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.hub.Location} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.hub.Location.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getLat(); - if (f !== 0.0) { - writer.writeDouble( - 1, - f - ); - } - f = message.getLon(); - if (f !== 0.0) { - writer.writeDouble( - 2, - f - ); - } -}; - - -/** - * optional double lat = 1; - * @return {number} - */ -proto.hub.Location.prototype.getLat = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.Location} returns this - */ -proto.hub.Location.prototype.setLat = function(value) { - return jspb.Message.setProto3FloatField(this, 1, value); -}; - - -/** - * optional double lon = 2; - * @return {number} - */ -proto.hub.Location.prototype.getLon = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.hub.Location} returns this - */ -proto.hub.Location.prototype.setLon = function(value) { - return jspb.Message.setProto3FloatField(this, 2, value); -}; - - -/** - * @enum {number} - */ -proto.hub.ResponseCode = { - SUCCESS: 0, - SIGNATURE_FORMAT_ERROR: 1, - COMPUTE_ADDRESS_ERROR: 2, - TIMEOUT_ERROR: 3, - OTHER_ERROR: 20 -}; - -goog.object.extend(exports, proto.hub); diff --git a/js/protos/ledger/ledger_pb.js b/js/protos/ledger/ledger_pb.js deleted file mode 100644 index fc1b0ae..0000000 --- a/js/protos/ledger/ledger_pb.js +++ /dev/null @@ -1,4223 +0,0 @@ -// source: protos/ledger/ledger.proto -/** - * @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 github_com_tron$us_protobuf_gogoproto_gogo_pb = require('../../github.com/tron-us/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_tron$us_protobuf_gogoproto_gogo_pb); -goog.exportSymbol('proto.ledger.Account', null, global); -goog.exportSymbol('proto.ledger.ChannelClosed', null, global); -goog.exportSymbol('proto.ledger.ChannelCommit', null, global); -goog.exportSymbol('proto.ledger.ChannelID', null, global); -goog.exportSymbol('proto.ledger.ChannelInfo', null, global); -goog.exportSymbol('proto.ledger.ChannelState', null, global); -goog.exportSymbol('proto.ledger.ClosedChannelCursor', null, global); -goog.exportSymbol('proto.ledger.CreateAccountResult', null, global); -goog.exportSymbol('proto.ledger.Null', null, global); -goog.exportSymbol('proto.ledger.PublicKey', null, global); -goog.exportSymbol('proto.ledger.SignedChannelCommit', null, global); -goog.exportSymbol('proto.ledger.SignedChannelState', null, global); -goog.exportSymbol('proto.ledger.SignedCreateAccountRequest', null, global); -goog.exportSymbol('proto.ledger.SignedCreateAccountResult', null, global); -goog.exportSymbol('proto.ledger.SignedPublicKey', null, global); -goog.exportSymbol('proto.ledger.SignedPublicKeyPair', null, global); -goog.exportSymbol('proto.ledger.SignedTransferRequest', null, global); -goog.exportSymbol('proto.ledger.TransferRequest', null, global); -goog.exportSymbol('proto.ledger.TransferResult', 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.ledger.Null = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ledger.Null, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ledger.Null.displayName = 'proto.ledger.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.ledger.PublicKey = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ledger.PublicKey, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ledger.PublicKey.displayName = 'proto.ledger.PublicKey'; -} -/** - * 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.ledger.SignedPublicKey = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ledger.SignedPublicKey, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ledger.SignedPublicKey.displayName = 'proto.ledger.SignedPublicKey'; -} -/** - * 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.ledger.ChannelCommit = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ledger.ChannelCommit, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ledger.ChannelCommit.displayName = 'proto.ledger.ChannelCommit'; -} -/** - * 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.ledger.SignedChannelCommit = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ledger.SignedChannelCommit, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ledger.SignedChannelCommit.displayName = 'proto.ledger.SignedChannelCommit'; -} -/** - * 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.ledger.CreateAccountResult = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ledger.CreateAccountResult, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ledger.CreateAccountResult.displayName = 'proto.ledger.CreateAccountResult'; -} -/** - * 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.ledger.SignedCreateAccountRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ledger.SignedCreateAccountRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ledger.SignedCreateAccountRequest.displayName = 'proto.ledger.SignedCreateAccountRequest'; -} -/** - * 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.ledger.SignedCreateAccountResult = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ledger.SignedCreateAccountResult, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ledger.SignedCreateAccountResult.displayName = 'proto.ledger.SignedCreateAccountResult'; -} -/** - * 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.ledger.Account = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ledger.Account, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ledger.Account.displayName = 'proto.ledger.Account'; -} -/** - * 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.ledger.ChannelID = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ledger.ChannelID, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ledger.ChannelID.displayName = 'proto.ledger.ChannelID'; -} -/** - * 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.ledger.ChannelInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ledger.ChannelInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ledger.ChannelInfo.displayName = 'proto.ledger.ChannelInfo'; -} -/** - * 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.ledger.SignedChannelState = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ledger.SignedChannelState, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ledger.SignedChannelState.displayName = 'proto.ledger.SignedChannelState'; -} -/** - * 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.ledger.ClosedChannelCursor = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ledger.ClosedChannelCursor, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ledger.ClosedChannelCursor.displayName = 'proto.ledger.ClosedChannelCursor'; -} -/** - * 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.ledger.ChannelState = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ledger.ChannelState, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ledger.ChannelState.displayName = 'proto.ledger.ChannelState'; -} -/** - * 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.ledger.ChannelClosed = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ledger.ChannelClosed, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ledger.ChannelClosed.displayName = 'proto.ledger.ChannelClosed'; -} -/** - * 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.ledger.SignedPublicKeyPair = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ledger.SignedPublicKeyPair, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ledger.SignedPublicKeyPair.displayName = 'proto.ledger.SignedPublicKeyPair'; -} -/** - * 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.ledger.TransferRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ledger.TransferRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ledger.TransferRequest.displayName = 'proto.ledger.TransferRequest'; -} -/** - * 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.ledger.SignedTransferRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ledger.SignedTransferRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ledger.SignedTransferRequest.displayName = 'proto.ledger.SignedTransferRequest'; -} -/** - * 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.ledger.TransferResult = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ledger.TransferResult, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ledger.TransferResult.displayName = 'proto.ledger.TransferResult'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ledger.Null.prototype.toObject = function(opt_includeInstance) { - return proto.ledger.Null.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ledger.Null} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.Null.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.ledger.Null} - */ -proto.ledger.Null.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ledger.Null; - return proto.ledger.Null.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ledger.Null} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ledger.Null} - */ -proto.ledger.Null.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.ledger.Null.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ledger.Null.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ledger.Null} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.Null.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ledger.PublicKey.prototype.toObject = function(opt_includeInstance) { - return proto.ledger.PublicKey.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ledger.PublicKey} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.PublicKey.toObject = function(includeInstance, msg) { - var f, obj = { - key: msg.getKey_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.ledger.PublicKey} - */ -proto.ledger.PublicKey.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ledger.PublicKey; - return proto.ledger.PublicKey.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ledger.PublicKey} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ledger.PublicKey} - */ -proto.ledger.PublicKey.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.setKey(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ledger.PublicKey.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ledger.PublicKey.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ledger.PublicKey} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.PublicKey.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes key = 1; - * @return {!(string|Uint8Array)} - */ -proto.ledger.PublicKey.prototype.getKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes key = 1; - * This is a type-conversion wrapper around `getKey()` - * @return {string} - */ -proto.ledger.PublicKey.prototype.getKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getKey())); -}; - - -/** - * optional bytes key = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getKey()` - * @return {!Uint8Array} - */ -proto.ledger.PublicKey.prototype.getKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ledger.PublicKey} returns this - */ -proto.ledger.PublicKey.prototype.setKey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ledger.SignedPublicKey.prototype.toObject = function(opt_includeInstance) { - return proto.ledger.SignedPublicKey.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ledger.SignedPublicKey} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.SignedPublicKey.toObject = function(includeInstance, msg) { - var f, obj = { - key: (f = msg.getKey()) && proto.ledger.PublicKey.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.ledger.SignedPublicKey} - */ -proto.ledger.SignedPublicKey.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ledger.SignedPublicKey; - return proto.ledger.SignedPublicKey.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ledger.SignedPublicKey} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ledger.SignedPublicKey} - */ -proto.ledger.SignedPublicKey.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.ledger.PublicKey; - reader.readMessage(value,proto.ledger.PublicKey.deserializeBinaryFromReader); - msg.setKey(value); - break; - case 2: - 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.ledger.SignedPublicKey.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ledger.SignedPublicKey.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ledger.SignedPublicKey} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.SignedPublicKey.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getKey(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.ledger.PublicKey.serializeBinaryToWriter - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional PublicKey key = 1; - * @return {?proto.ledger.PublicKey} - */ -proto.ledger.SignedPublicKey.prototype.getKey = function() { - return /** @type{?proto.ledger.PublicKey} */ ( - jspb.Message.getWrapperField(this, proto.ledger.PublicKey, 1)); -}; - - -/** - * @param {?proto.ledger.PublicKey|undefined} value - * @return {!proto.ledger.SignedPublicKey} returns this -*/ -proto.ledger.SignedPublicKey.prototype.setKey = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ledger.SignedPublicKey} returns this - */ -proto.ledger.SignedPublicKey.prototype.clearKey = function() { - return this.setKey(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ledger.SignedPublicKey.prototype.hasKey = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes signature = 2; - * @return {!(string|Uint8Array)} - */ -proto.ledger.SignedPublicKey.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes signature = 2; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.ledger.SignedPublicKey.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 2; - * 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.ledger.SignedPublicKey.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ledger.SignedPublicKey} returns this - */ -proto.ledger.SignedPublicKey.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ledger.ChannelCommit.prototype.toObject = function(opt_includeInstance) { - return proto.ledger.ChannelCommit.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ledger.ChannelCommit} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.ChannelCommit.toObject = function(includeInstance, msg) { - var f, obj = { - payer: (f = msg.getPayer()) && proto.ledger.PublicKey.toObject(includeInstance, f), - recipient: (f = msg.getRecipient()) && proto.ledger.PublicKey.toObject(includeInstance, f), - amount: jspb.Message.getFieldWithDefault(msg, 3, 0), - payerId: 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.ledger.ChannelCommit} - */ -proto.ledger.ChannelCommit.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ledger.ChannelCommit; - return proto.ledger.ChannelCommit.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ledger.ChannelCommit} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ledger.ChannelCommit} - */ -proto.ledger.ChannelCommit.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.ledger.PublicKey; - reader.readMessage(value,proto.ledger.PublicKey.deserializeBinaryFromReader); - msg.setPayer(value); - break; - case 2: - var value = new proto.ledger.PublicKey; - reader.readMessage(value,proto.ledger.PublicKey.deserializeBinaryFromReader); - msg.setRecipient(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setPayerId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ledger.ChannelCommit.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ledger.ChannelCommit.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ledger.ChannelCommit} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.ChannelCommit.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPayer(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.ledger.PublicKey.serializeBinaryToWriter - ); - } - f = message.getRecipient(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.ledger.PublicKey.serializeBinaryToWriter - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getPayerId(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } -}; - - -/** - * optional PublicKey payer = 1; - * @return {?proto.ledger.PublicKey} - */ -proto.ledger.ChannelCommit.prototype.getPayer = function() { - return /** @type{?proto.ledger.PublicKey} */ ( - jspb.Message.getWrapperField(this, proto.ledger.PublicKey, 1)); -}; - - -/** - * @param {?proto.ledger.PublicKey|undefined} value - * @return {!proto.ledger.ChannelCommit} returns this -*/ -proto.ledger.ChannelCommit.prototype.setPayer = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ledger.ChannelCommit} returns this - */ -proto.ledger.ChannelCommit.prototype.clearPayer = function() { - return this.setPayer(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ledger.ChannelCommit.prototype.hasPayer = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional PublicKey recipient = 2; - * @return {?proto.ledger.PublicKey} - */ -proto.ledger.ChannelCommit.prototype.getRecipient = function() { - return /** @type{?proto.ledger.PublicKey} */ ( - jspb.Message.getWrapperField(this, proto.ledger.PublicKey, 2)); -}; - - -/** - * @param {?proto.ledger.PublicKey|undefined} value - * @return {!proto.ledger.ChannelCommit} returns this -*/ -proto.ledger.ChannelCommit.prototype.setRecipient = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ledger.ChannelCommit} returns this - */ -proto.ledger.ChannelCommit.prototype.clearRecipient = function() { - return this.setRecipient(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ledger.ChannelCommit.prototype.hasRecipient = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional int64 amount = 3; - * @return {number} - */ -proto.ledger.ChannelCommit.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ledger.ChannelCommit} returns this - */ -proto.ledger.ChannelCommit.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int64 payer_id = 4; - * @return {number} - */ -proto.ledger.ChannelCommit.prototype.getPayerId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ledger.ChannelCommit} returns this - */ -proto.ledger.ChannelCommit.prototype.setPayerId = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ledger.SignedChannelCommit.prototype.toObject = function(opt_includeInstance) { - return proto.ledger.SignedChannelCommit.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ledger.SignedChannelCommit} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.SignedChannelCommit.toObject = function(includeInstance, msg) { - var f, obj = { - channel: (f = msg.getChannel()) && proto.ledger.ChannelCommit.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.ledger.SignedChannelCommit} - */ -proto.ledger.SignedChannelCommit.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ledger.SignedChannelCommit; - return proto.ledger.SignedChannelCommit.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ledger.SignedChannelCommit} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ledger.SignedChannelCommit} - */ -proto.ledger.SignedChannelCommit.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.ledger.ChannelCommit; - reader.readMessage(value,proto.ledger.ChannelCommit.deserializeBinaryFromReader); - msg.setChannel(value); - break; - case 2: - 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.ledger.SignedChannelCommit.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ledger.SignedChannelCommit.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ledger.SignedChannelCommit} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.SignedChannelCommit.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChannel(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.ledger.ChannelCommit.serializeBinaryToWriter - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional ChannelCommit channel = 1; - * @return {?proto.ledger.ChannelCommit} - */ -proto.ledger.SignedChannelCommit.prototype.getChannel = function() { - return /** @type{?proto.ledger.ChannelCommit} */ ( - jspb.Message.getWrapperField(this, proto.ledger.ChannelCommit, 1)); -}; - - -/** - * @param {?proto.ledger.ChannelCommit|undefined} value - * @return {!proto.ledger.SignedChannelCommit} returns this -*/ -proto.ledger.SignedChannelCommit.prototype.setChannel = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ledger.SignedChannelCommit} returns this - */ -proto.ledger.SignedChannelCommit.prototype.clearChannel = function() { - return this.setChannel(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ledger.SignedChannelCommit.prototype.hasChannel = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes signature = 2; - * @return {!(string|Uint8Array)} - */ -proto.ledger.SignedChannelCommit.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes signature = 2; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.ledger.SignedChannelCommit.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 2; - * 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.ledger.SignedChannelCommit.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ledger.SignedChannelCommit} returns this - */ -proto.ledger.SignedChannelCommit.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ledger.CreateAccountResult.prototype.toObject = function(opt_includeInstance) { - return proto.ledger.CreateAccountResult.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ledger.CreateAccountResult} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.CreateAccountResult.toObject = function(includeInstance, msg) { - var f, obj = { - account: (f = msg.getAccount()) && proto.ledger.Account.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.ledger.CreateAccountResult} - */ -proto.ledger.CreateAccountResult.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ledger.CreateAccountResult; - return proto.ledger.CreateAccountResult.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ledger.CreateAccountResult} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ledger.CreateAccountResult} - */ -proto.ledger.CreateAccountResult.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.ledger.Account; - reader.readMessage(value,proto.ledger.Account.deserializeBinaryFromReader); - msg.setAccount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ledger.CreateAccountResult.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ledger.CreateAccountResult.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ledger.CreateAccountResult} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.CreateAccountResult.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAccount(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.ledger.Account.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Account account = 1; - * @return {?proto.ledger.Account} - */ -proto.ledger.CreateAccountResult.prototype.getAccount = function() { - return /** @type{?proto.ledger.Account} */ ( - jspb.Message.getWrapperField(this, proto.ledger.Account, 1)); -}; - - -/** - * @param {?proto.ledger.Account|undefined} value - * @return {!proto.ledger.CreateAccountResult} returns this -*/ -proto.ledger.CreateAccountResult.prototype.setAccount = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ledger.CreateAccountResult} returns this - */ -proto.ledger.CreateAccountResult.prototype.clearAccount = function() { - return this.setAccount(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ledger.CreateAccountResult.prototype.hasAccount = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ledger.SignedCreateAccountRequest.prototype.toObject = function(opt_includeInstance) { - return proto.ledger.SignedCreateAccountRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ledger.SignedCreateAccountRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.SignedCreateAccountRequest.toObject = function(includeInstance, msg) { - var f, obj = { - key: (f = msg.getKey()) && proto.ledger.PublicKey.toObject(includeInstance, f), - signature: msg.getSignature_asB64(), - clientVersionNumber: 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.ledger.SignedCreateAccountRequest} - */ -proto.ledger.SignedCreateAccountRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ledger.SignedCreateAccountRequest; - return proto.ledger.SignedCreateAccountRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ledger.SignedCreateAccountRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ledger.SignedCreateAccountRequest} - */ -proto.ledger.SignedCreateAccountRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.ledger.PublicKey; - reader.readMessage(value,proto.ledger.PublicKey.deserializeBinaryFromReader); - msg.setKey(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSignature(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setClientVersionNumber(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ledger.SignedCreateAccountRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ledger.SignedCreateAccountRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ledger.SignedCreateAccountRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.SignedCreateAccountRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getKey(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.ledger.PublicKey.serializeBinaryToWriter - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getClientVersionNumber(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional PublicKey key = 1; - * @return {?proto.ledger.PublicKey} - */ -proto.ledger.SignedCreateAccountRequest.prototype.getKey = function() { - return /** @type{?proto.ledger.PublicKey} */ ( - jspb.Message.getWrapperField(this, proto.ledger.PublicKey, 1)); -}; - - -/** - * @param {?proto.ledger.PublicKey|undefined} value - * @return {!proto.ledger.SignedCreateAccountRequest} returns this -*/ -proto.ledger.SignedCreateAccountRequest.prototype.setKey = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ledger.SignedCreateAccountRequest} returns this - */ -proto.ledger.SignedCreateAccountRequest.prototype.clearKey = function() { - return this.setKey(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ledger.SignedCreateAccountRequest.prototype.hasKey = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes signature = 2; - * @return {!(string|Uint8Array)} - */ -proto.ledger.SignedCreateAccountRequest.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes signature = 2; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.ledger.SignedCreateAccountRequest.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 2; - * 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.ledger.SignedCreateAccountRequest.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ledger.SignedCreateAccountRequest} returns this - */ -proto.ledger.SignedCreateAccountRequest.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional string client_version_number = 3; - * @return {string} - */ -proto.ledger.SignedCreateAccountRequest.prototype.getClientVersionNumber = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ledger.SignedCreateAccountRequest} returns this - */ -proto.ledger.SignedCreateAccountRequest.prototype.setClientVersionNumber = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ledger.SignedCreateAccountResult.prototype.toObject = function(opt_includeInstance) { - return proto.ledger.SignedCreateAccountResult.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ledger.SignedCreateAccountResult} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.SignedCreateAccountResult.toObject = function(includeInstance, msg) { - var f, obj = { - balance: 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.ledger.SignedCreateAccountResult} - */ -proto.ledger.SignedCreateAccountResult.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ledger.SignedCreateAccountResult; - return proto.ledger.SignedCreateAccountResult.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ledger.SignedCreateAccountResult} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ledger.SignedCreateAccountResult} - */ -proto.ledger.SignedCreateAccountResult.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.setBalance(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ledger.SignedCreateAccountResult.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ledger.SignedCreateAccountResult.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ledger.SignedCreateAccountResult} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.SignedCreateAccountResult.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getBalance(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } -}; - - -/** - * optional int64 balance = 1; - * @return {number} - */ -proto.ledger.SignedCreateAccountResult.prototype.getBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ledger.SignedCreateAccountResult} returns this - */ -proto.ledger.SignedCreateAccountResult.prototype.setBalance = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ledger.Account.prototype.toObject = function(opt_includeInstance) { - return proto.ledger.Account.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ledger.Account} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.Account.toObject = function(includeInstance, msg) { - var f, obj = { - address: (f = msg.getAddress()) && proto.ledger.PublicKey.toObject(includeInstance, f), - balance: 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.ledger.Account} - */ -proto.ledger.Account.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ledger.Account; - return proto.ledger.Account.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ledger.Account} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ledger.Account} - */ -proto.ledger.Account.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.ledger.PublicKey; - reader.readMessage(value,proto.ledger.PublicKey.deserializeBinaryFromReader); - msg.setAddress(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setBalance(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ledger.Account.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ledger.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.ledger.Account} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.Account.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddress(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.ledger.PublicKey.serializeBinaryToWriter - ); - } - f = message.getBalance(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } -}; - - -/** - * optional PublicKey address = 1; - * @return {?proto.ledger.PublicKey} - */ -proto.ledger.Account.prototype.getAddress = function() { - return /** @type{?proto.ledger.PublicKey} */ ( - jspb.Message.getWrapperField(this, proto.ledger.PublicKey, 1)); -}; - - -/** - * @param {?proto.ledger.PublicKey|undefined} value - * @return {!proto.ledger.Account} returns this -*/ -proto.ledger.Account.prototype.setAddress = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ledger.Account} returns this - */ -proto.ledger.Account.prototype.clearAddress = function() { - return this.setAddress(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ledger.Account.prototype.hasAddress = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional int64 balance = 2; - * @return {number} - */ -proto.ledger.Account.prototype.getBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ledger.Account} returns this - */ -proto.ledger.Account.prototype.setBalance = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ledger.ChannelID.prototype.toObject = function(opt_includeInstance) { - return proto.ledger.ChannelID.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ledger.ChannelID} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.ChannelID.toObject = function(includeInstance, msg) { - var f, obj = { - id: 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.ledger.ChannelID} - */ -proto.ledger.ChannelID.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ledger.ChannelID; - return proto.ledger.ChannelID.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ledger.ChannelID} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ledger.ChannelID} - */ -proto.ledger.ChannelID.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.setId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ledger.ChannelID.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ledger.ChannelID.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ledger.ChannelID} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.ChannelID.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } -}; - - -/** - * optional int64 id = 1; - * @return {number} - */ -proto.ledger.ChannelID.prototype.getId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ledger.ChannelID} returns this - */ -proto.ledger.ChannelID.prototype.setId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ledger.ChannelInfo.prototype.toObject = function(opt_includeInstance) { - return proto.ledger.ChannelInfo.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ledger.ChannelInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.ChannelInfo.toObject = function(includeInstance, msg) { - var f, obj = { - id: (f = msg.getId()) && proto.ledger.ChannelID.toObject(includeInstance, f), - fromAccount: (f = msg.getFromAccount()) && proto.ledger.Account.toObject(includeInstance, f), - toAccount: (f = msg.getToAccount()) && proto.ledger.Account.toObject(includeInstance, f), - closeSequence: 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.ledger.ChannelInfo} - */ -proto.ledger.ChannelInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ledger.ChannelInfo; - return proto.ledger.ChannelInfo.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ledger.ChannelInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ledger.ChannelInfo} - */ -proto.ledger.ChannelInfo.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.ledger.ChannelID; - reader.readMessage(value,proto.ledger.ChannelID.deserializeBinaryFromReader); - msg.setId(value); - break; - case 2: - var value = new proto.ledger.Account; - reader.readMessage(value,proto.ledger.Account.deserializeBinaryFromReader); - msg.setFromAccount(value); - break; - case 3: - var value = new proto.ledger.Account; - reader.readMessage(value,proto.ledger.Account.deserializeBinaryFromReader); - msg.setToAccount(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCloseSequence(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ledger.ChannelInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ledger.ChannelInfo.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ledger.ChannelInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.ChannelInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.ledger.ChannelID.serializeBinaryToWriter - ); - } - f = message.getFromAccount(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.ledger.Account.serializeBinaryToWriter - ); - } - f = message.getToAccount(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.ledger.Account.serializeBinaryToWriter - ); - } - f = message.getCloseSequence(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } -}; - - -/** - * optional ChannelID id = 1; - * @return {?proto.ledger.ChannelID} - */ -proto.ledger.ChannelInfo.prototype.getId = function() { - return /** @type{?proto.ledger.ChannelID} */ ( - jspb.Message.getWrapperField(this, proto.ledger.ChannelID, 1)); -}; - - -/** - * @param {?proto.ledger.ChannelID|undefined} value - * @return {!proto.ledger.ChannelInfo} returns this -*/ -proto.ledger.ChannelInfo.prototype.setId = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ledger.ChannelInfo} returns this - */ -proto.ledger.ChannelInfo.prototype.clearId = function() { - return this.setId(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ledger.ChannelInfo.prototype.hasId = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional Account from_account = 2; - * @return {?proto.ledger.Account} - */ -proto.ledger.ChannelInfo.prototype.getFromAccount = function() { - return /** @type{?proto.ledger.Account} */ ( - jspb.Message.getWrapperField(this, proto.ledger.Account, 2)); -}; - - -/** - * @param {?proto.ledger.Account|undefined} value - * @return {!proto.ledger.ChannelInfo} returns this -*/ -proto.ledger.ChannelInfo.prototype.setFromAccount = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ledger.ChannelInfo} returns this - */ -proto.ledger.ChannelInfo.prototype.clearFromAccount = function() { - return this.setFromAccount(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ledger.ChannelInfo.prototype.hasFromAccount = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional Account to_account = 3; - * @return {?proto.ledger.Account} - */ -proto.ledger.ChannelInfo.prototype.getToAccount = function() { - return /** @type{?proto.ledger.Account} */ ( - jspb.Message.getWrapperField(this, proto.ledger.Account, 3)); -}; - - -/** - * @param {?proto.ledger.Account|undefined} value - * @return {!proto.ledger.ChannelInfo} returns this -*/ -proto.ledger.ChannelInfo.prototype.setToAccount = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ledger.ChannelInfo} returns this - */ -proto.ledger.ChannelInfo.prototype.clearToAccount = function() { - return this.setToAccount(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ledger.ChannelInfo.prototype.hasToAccount = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional int64 close_sequence = 4; - * @return {number} - */ -proto.ledger.ChannelInfo.prototype.getCloseSequence = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ledger.ChannelInfo} returns this - */ -proto.ledger.ChannelInfo.prototype.setCloseSequence = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ledger.SignedChannelState.prototype.toObject = function(opt_includeInstance) { - return proto.ledger.SignedChannelState.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ledger.SignedChannelState} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.SignedChannelState.toObject = function(includeInstance, msg) { - var f, obj = { - channel: (f = msg.getChannel()) && proto.ledger.ChannelState.toObject(includeInstance, f), - fromSignature: msg.getFromSignature_asB64(), - toSignature: msg.getToSignature_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.ledger.SignedChannelState} - */ -proto.ledger.SignedChannelState.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ledger.SignedChannelState; - return proto.ledger.SignedChannelState.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ledger.SignedChannelState} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ledger.SignedChannelState} - */ -proto.ledger.SignedChannelState.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.ledger.ChannelState; - reader.readMessage(value,proto.ledger.ChannelState.deserializeBinaryFromReader); - msg.setChannel(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setFromSignature(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setToSignature(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ledger.SignedChannelState.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ledger.SignedChannelState.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ledger.SignedChannelState} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.SignedChannelState.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChannel(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.ledger.ChannelState.serializeBinaryToWriter - ); - } - f = message.getFromSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getToSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } -}; - - -/** - * optional ChannelState channel = 1; - * @return {?proto.ledger.ChannelState} - */ -proto.ledger.SignedChannelState.prototype.getChannel = function() { - return /** @type{?proto.ledger.ChannelState} */ ( - jspb.Message.getWrapperField(this, proto.ledger.ChannelState, 1)); -}; - - -/** - * @param {?proto.ledger.ChannelState|undefined} value - * @return {!proto.ledger.SignedChannelState} returns this -*/ -proto.ledger.SignedChannelState.prototype.setChannel = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ledger.SignedChannelState} returns this - */ -proto.ledger.SignedChannelState.prototype.clearChannel = function() { - return this.setChannel(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ledger.SignedChannelState.prototype.hasChannel = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes from_signature = 2; - * @return {!(string|Uint8Array)} - */ -proto.ledger.SignedChannelState.prototype.getFromSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes from_signature = 2; - * This is a type-conversion wrapper around `getFromSignature()` - * @return {string} - */ -proto.ledger.SignedChannelState.prototype.getFromSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getFromSignature())); -}; - - -/** - * optional bytes from_signature = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getFromSignature()` - * @return {!Uint8Array} - */ -proto.ledger.SignedChannelState.prototype.getFromSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getFromSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ledger.SignedChannelState} returns this - */ -proto.ledger.SignedChannelState.prototype.setFromSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional bytes to_signature = 3; - * @return {!(string|Uint8Array)} - */ -proto.ledger.SignedChannelState.prototype.getToSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes to_signature = 3; - * This is a type-conversion wrapper around `getToSignature()` - * @return {string} - */ -proto.ledger.SignedChannelState.prototype.getToSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getToSignature())); -}; - - -/** - * optional bytes to_signature = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getToSignature()` - * @return {!Uint8Array} - */ -proto.ledger.SignedChannelState.prototype.getToSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getToSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ledger.SignedChannelState} returns this - */ -proto.ledger.SignedChannelState.prototype.setToSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ledger.ClosedChannelCursor.prototype.toObject = function(opt_includeInstance) { - return proto.ledger.ClosedChannelCursor.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ledger.ClosedChannelCursor} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.ClosedChannelCursor.toObject = function(includeInstance, msg) { - var f, obj = { - payer: (f = msg.getPayer()) && proto.ledger.PublicKey.toObject(includeInstance, f), - closeSequence: 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.ledger.ClosedChannelCursor} - */ -proto.ledger.ClosedChannelCursor.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ledger.ClosedChannelCursor; - return proto.ledger.ClosedChannelCursor.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ledger.ClosedChannelCursor} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ledger.ClosedChannelCursor} - */ -proto.ledger.ClosedChannelCursor.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.ledger.PublicKey; - reader.readMessage(value,proto.ledger.PublicKey.deserializeBinaryFromReader); - msg.setPayer(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCloseSequence(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ledger.ClosedChannelCursor.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ledger.ClosedChannelCursor.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ledger.ClosedChannelCursor} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.ClosedChannelCursor.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPayer(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.ledger.PublicKey.serializeBinaryToWriter - ); - } - f = message.getCloseSequence(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } -}; - - -/** - * optional PublicKey payer = 1; - * @return {?proto.ledger.PublicKey} - */ -proto.ledger.ClosedChannelCursor.prototype.getPayer = function() { - return /** @type{?proto.ledger.PublicKey} */ ( - jspb.Message.getWrapperField(this, proto.ledger.PublicKey, 1)); -}; - - -/** - * @param {?proto.ledger.PublicKey|undefined} value - * @return {!proto.ledger.ClosedChannelCursor} returns this -*/ -proto.ledger.ClosedChannelCursor.prototype.setPayer = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ledger.ClosedChannelCursor} returns this - */ -proto.ledger.ClosedChannelCursor.prototype.clearPayer = function() { - return this.setPayer(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ledger.ClosedChannelCursor.prototype.hasPayer = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional int64 close_sequence = 2; - * @return {number} - */ -proto.ledger.ClosedChannelCursor.prototype.getCloseSequence = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ledger.ClosedChannelCursor} returns this - */ -proto.ledger.ClosedChannelCursor.prototype.setCloseSequence = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ledger.ChannelState.prototype.toObject = function(opt_includeInstance) { - return proto.ledger.ChannelState.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ledger.ChannelState} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.ChannelState.toObject = function(includeInstance, msg) { - var f, obj = { - id: (f = msg.getId()) && proto.ledger.ChannelID.toObject(includeInstance, f), - sequence: jspb.Message.getFieldWithDefault(msg, 2, 0), - from: (f = msg.getFrom()) && proto.ledger.Account.toObject(includeInstance, f), - to: (f = msg.getTo()) && proto.ledger.Account.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.ledger.ChannelState} - */ -proto.ledger.ChannelState.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ledger.ChannelState; - return proto.ledger.ChannelState.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ledger.ChannelState} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ledger.ChannelState} - */ -proto.ledger.ChannelState.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.ledger.ChannelID; - reader.readMessage(value,proto.ledger.ChannelID.deserializeBinaryFromReader); - msg.setId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setSequence(value); - break; - case 3: - var value = new proto.ledger.Account; - reader.readMessage(value,proto.ledger.Account.deserializeBinaryFromReader); - msg.setFrom(value); - break; - case 4: - var value = new proto.ledger.Account; - reader.readMessage(value,proto.ledger.Account.deserializeBinaryFromReader); - msg.setTo(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ledger.ChannelState.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ledger.ChannelState.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ledger.ChannelState} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.ChannelState.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.ledger.ChannelID.serializeBinaryToWriter - ); - } - f = message.getSequence(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getFrom(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.ledger.Account.serializeBinaryToWriter - ); - } - f = message.getTo(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.ledger.Account.serializeBinaryToWriter - ); - } -}; - - -/** - * optional ChannelID id = 1; - * @return {?proto.ledger.ChannelID} - */ -proto.ledger.ChannelState.prototype.getId = function() { - return /** @type{?proto.ledger.ChannelID} */ ( - jspb.Message.getWrapperField(this, proto.ledger.ChannelID, 1)); -}; - - -/** - * @param {?proto.ledger.ChannelID|undefined} value - * @return {!proto.ledger.ChannelState} returns this -*/ -proto.ledger.ChannelState.prototype.setId = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ledger.ChannelState} returns this - */ -proto.ledger.ChannelState.prototype.clearId = function() { - return this.setId(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ledger.ChannelState.prototype.hasId = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional int64 sequence = 2; - * @return {number} - */ -proto.ledger.ChannelState.prototype.getSequence = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ledger.ChannelState} returns this - */ -proto.ledger.ChannelState.prototype.setSequence = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional Account from = 3; - * @return {?proto.ledger.Account} - */ -proto.ledger.ChannelState.prototype.getFrom = function() { - return /** @type{?proto.ledger.Account} */ ( - jspb.Message.getWrapperField(this, proto.ledger.Account, 3)); -}; - - -/** - * @param {?proto.ledger.Account|undefined} value - * @return {!proto.ledger.ChannelState} returns this -*/ -proto.ledger.ChannelState.prototype.setFrom = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ledger.ChannelState} returns this - */ -proto.ledger.ChannelState.prototype.clearFrom = function() { - return this.setFrom(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ledger.ChannelState.prototype.hasFrom = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional Account to = 4; - * @return {?proto.ledger.Account} - */ -proto.ledger.ChannelState.prototype.getTo = function() { - return /** @type{?proto.ledger.Account} */ ( - jspb.Message.getWrapperField(this, proto.ledger.Account, 4)); -}; - - -/** - * @param {?proto.ledger.Account|undefined} value - * @return {!proto.ledger.ChannelState} returns this -*/ -proto.ledger.ChannelState.prototype.setTo = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ledger.ChannelState} returns this - */ -proto.ledger.ChannelState.prototype.clearTo = function() { - return this.setTo(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ledger.ChannelState.prototype.hasTo = function() { - return jspb.Message.getField(this, 4) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ledger.ChannelClosed.prototype.toObject = function(opt_includeInstance) { - return proto.ledger.ChannelClosed.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ledger.ChannelClosed} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.ChannelClosed.toObject = function(includeInstance, msg) { - var f, obj = { - state: (f = msg.getState()) && proto.ledger.SignedChannelState.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.ledger.ChannelClosed} - */ -proto.ledger.ChannelClosed.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ledger.ChannelClosed; - return proto.ledger.ChannelClosed.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ledger.ChannelClosed} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ledger.ChannelClosed} - */ -proto.ledger.ChannelClosed.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.ledger.SignedChannelState; - reader.readMessage(value,proto.ledger.SignedChannelState.deserializeBinaryFromReader); - msg.setState(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ledger.ChannelClosed.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ledger.ChannelClosed.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ledger.ChannelClosed} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.ChannelClosed.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getState(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.ledger.SignedChannelState.serializeBinaryToWriter - ); - } -}; - - -/** - * optional SignedChannelState state = 1; - * @return {?proto.ledger.SignedChannelState} - */ -proto.ledger.ChannelClosed.prototype.getState = function() { - return /** @type{?proto.ledger.SignedChannelState} */ ( - jspb.Message.getWrapperField(this, proto.ledger.SignedChannelState, 1)); -}; - - -/** - * @param {?proto.ledger.SignedChannelState|undefined} value - * @return {!proto.ledger.ChannelClosed} returns this -*/ -proto.ledger.ChannelClosed.prototype.setState = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ledger.ChannelClosed} returns this - */ -proto.ledger.ChannelClosed.prototype.clearState = function() { - return this.setState(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ledger.ChannelClosed.prototype.hasState = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ledger.SignedPublicKeyPair.prototype.toObject = function(opt_includeInstance) { - return proto.ledger.SignedPublicKeyPair.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ledger.SignedPublicKeyPair} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.SignedPublicKeyPair.toObject = function(includeInstance, msg) { - var f, obj = { - oldKey: (f = msg.getOldKey()) && proto.ledger.PublicKey.toObject(includeInstance, f), - newKey: (f = msg.getNewKey()) && proto.ledger.PublicKey.toObject(includeInstance, f), - oldSignature: msg.getOldSignature_asB64(), - newSignature: msg.getNewSignature_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.ledger.SignedPublicKeyPair} - */ -proto.ledger.SignedPublicKeyPair.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ledger.SignedPublicKeyPair; - return proto.ledger.SignedPublicKeyPair.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ledger.SignedPublicKeyPair} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ledger.SignedPublicKeyPair} - */ -proto.ledger.SignedPublicKeyPair.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.ledger.PublicKey; - reader.readMessage(value,proto.ledger.PublicKey.deserializeBinaryFromReader); - msg.setOldKey(value); - break; - case 2: - var value = new proto.ledger.PublicKey; - reader.readMessage(value,proto.ledger.PublicKey.deserializeBinaryFromReader); - msg.setNewKey(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOldSignature(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setNewSignature(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ledger.SignedPublicKeyPair.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ledger.SignedPublicKeyPair.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ledger.SignedPublicKeyPair} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.SignedPublicKeyPair.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOldKey(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.ledger.PublicKey.serializeBinaryToWriter - ); - } - f = message.getNewKey(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.ledger.PublicKey.serializeBinaryToWriter - ); - } - f = message.getOldSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getNewSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } -}; - - -/** - * optional PublicKey old_key = 1; - * @return {?proto.ledger.PublicKey} - */ -proto.ledger.SignedPublicKeyPair.prototype.getOldKey = function() { - return /** @type{?proto.ledger.PublicKey} */ ( - jspb.Message.getWrapperField(this, proto.ledger.PublicKey, 1)); -}; - - -/** - * @param {?proto.ledger.PublicKey|undefined} value - * @return {!proto.ledger.SignedPublicKeyPair} returns this -*/ -proto.ledger.SignedPublicKeyPair.prototype.setOldKey = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ledger.SignedPublicKeyPair} returns this - */ -proto.ledger.SignedPublicKeyPair.prototype.clearOldKey = function() { - return this.setOldKey(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ledger.SignedPublicKeyPair.prototype.hasOldKey = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional PublicKey new_key = 2; - * @return {?proto.ledger.PublicKey} - */ -proto.ledger.SignedPublicKeyPair.prototype.getNewKey = function() { - return /** @type{?proto.ledger.PublicKey} */ ( - jspb.Message.getWrapperField(this, proto.ledger.PublicKey, 2)); -}; - - -/** - * @param {?proto.ledger.PublicKey|undefined} value - * @return {!proto.ledger.SignedPublicKeyPair} returns this -*/ -proto.ledger.SignedPublicKeyPair.prototype.setNewKey = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ledger.SignedPublicKeyPair} returns this - */ -proto.ledger.SignedPublicKeyPair.prototype.clearNewKey = function() { - return this.setNewKey(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ledger.SignedPublicKeyPair.prototype.hasNewKey = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional bytes old_signature = 3; - * @return {!(string|Uint8Array)} - */ -proto.ledger.SignedPublicKeyPair.prototype.getOldSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes old_signature = 3; - * This is a type-conversion wrapper around `getOldSignature()` - * @return {string} - */ -proto.ledger.SignedPublicKeyPair.prototype.getOldSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOldSignature())); -}; - - -/** - * optional bytes old_signature = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOldSignature()` - * @return {!Uint8Array} - */ -proto.ledger.SignedPublicKeyPair.prototype.getOldSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOldSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ledger.SignedPublicKeyPair} returns this - */ -proto.ledger.SignedPublicKeyPair.prototype.setOldSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional bytes new_signature = 4; - * @return {!(string|Uint8Array)} - */ -proto.ledger.SignedPublicKeyPair.prototype.getNewSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes new_signature = 4; - * This is a type-conversion wrapper around `getNewSignature()` - * @return {string} - */ -proto.ledger.SignedPublicKeyPair.prototype.getNewSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getNewSignature())); -}; - - -/** - * optional bytes new_signature = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getNewSignature()` - * @return {!Uint8Array} - */ -proto.ledger.SignedPublicKeyPair.prototype.getNewSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getNewSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ledger.SignedPublicKeyPair} returns this - */ -proto.ledger.SignedPublicKeyPair.prototype.setNewSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ledger.TransferRequest.prototype.toObject = function(opt_includeInstance) { - return proto.ledger.TransferRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ledger.TransferRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.TransferRequest.toObject = function(includeInstance, msg) { - var f, obj = { - payer: (f = msg.getPayer()) && proto.ledger.PublicKey.toObject(includeInstance, f), - recipient: (f = msg.getRecipient()) && proto.ledger.PublicKey.toObject(includeInstance, f), - 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.ledger.TransferRequest} - */ -proto.ledger.TransferRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ledger.TransferRequest; - return proto.ledger.TransferRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ledger.TransferRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ledger.TransferRequest} - */ -proto.ledger.TransferRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.ledger.PublicKey; - reader.readMessage(value,proto.ledger.PublicKey.deserializeBinaryFromReader); - msg.setPayer(value); - break; - case 2: - var value = new proto.ledger.PublicKey; - reader.readMessage(value,proto.ledger.PublicKey.deserializeBinaryFromReader); - msg.setRecipient(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.ledger.TransferRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ledger.TransferRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ledger.TransferRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.TransferRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPayer(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.ledger.PublicKey.serializeBinaryToWriter - ); - } - f = message.getRecipient(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.ledger.PublicKey.serializeBinaryToWriter - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } -}; - - -/** - * optional PublicKey payer = 1; - * @return {?proto.ledger.PublicKey} - */ -proto.ledger.TransferRequest.prototype.getPayer = function() { - return /** @type{?proto.ledger.PublicKey} */ ( - jspb.Message.getWrapperField(this, proto.ledger.PublicKey, 1)); -}; - - -/** - * @param {?proto.ledger.PublicKey|undefined} value - * @return {!proto.ledger.TransferRequest} returns this -*/ -proto.ledger.TransferRequest.prototype.setPayer = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ledger.TransferRequest} returns this - */ -proto.ledger.TransferRequest.prototype.clearPayer = function() { - return this.setPayer(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ledger.TransferRequest.prototype.hasPayer = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional PublicKey recipient = 2; - * @return {?proto.ledger.PublicKey} - */ -proto.ledger.TransferRequest.prototype.getRecipient = function() { - return /** @type{?proto.ledger.PublicKey} */ ( - jspb.Message.getWrapperField(this, proto.ledger.PublicKey, 2)); -}; - - -/** - * @param {?proto.ledger.PublicKey|undefined} value - * @return {!proto.ledger.TransferRequest} returns this -*/ -proto.ledger.TransferRequest.prototype.setRecipient = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ledger.TransferRequest} returns this - */ -proto.ledger.TransferRequest.prototype.clearRecipient = function() { - return this.setRecipient(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ledger.TransferRequest.prototype.hasRecipient = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional int64 amount = 3; - * @return {number} - */ -proto.ledger.TransferRequest.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ledger.TransferRequest} returns this - */ -proto.ledger.TransferRequest.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ledger.SignedTransferRequest.prototype.toObject = function(opt_includeInstance) { - return proto.ledger.SignedTransferRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ledger.SignedTransferRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.SignedTransferRequest.toObject = function(includeInstance, msg) { - var f, obj = { - transferRequest: (f = msg.getTransferRequest()) && proto.ledger.TransferRequest.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.ledger.SignedTransferRequest} - */ -proto.ledger.SignedTransferRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ledger.SignedTransferRequest; - return proto.ledger.SignedTransferRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ledger.SignedTransferRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ledger.SignedTransferRequest} - */ -proto.ledger.SignedTransferRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.ledger.TransferRequest; - reader.readMessage(value,proto.ledger.TransferRequest.deserializeBinaryFromReader); - msg.setTransferRequest(value); - break; - case 2: - 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.ledger.SignedTransferRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ledger.SignedTransferRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ledger.SignedTransferRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.SignedTransferRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTransferRequest(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.ledger.TransferRequest.serializeBinaryToWriter - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional TransferRequest transfer_request = 1; - * @return {?proto.ledger.TransferRequest} - */ -proto.ledger.SignedTransferRequest.prototype.getTransferRequest = function() { - return /** @type{?proto.ledger.TransferRequest} */ ( - jspb.Message.getWrapperField(this, proto.ledger.TransferRequest, 1)); -}; - - -/** - * @param {?proto.ledger.TransferRequest|undefined} value - * @return {!proto.ledger.SignedTransferRequest} returns this -*/ -proto.ledger.SignedTransferRequest.prototype.setTransferRequest = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ledger.SignedTransferRequest} returns this - */ -proto.ledger.SignedTransferRequest.prototype.clearTransferRequest = function() { - return this.setTransferRequest(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ledger.SignedTransferRequest.prototype.hasTransferRequest = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes signature = 2; - * @return {!(string|Uint8Array)} - */ -proto.ledger.SignedTransferRequest.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes signature = 2; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.ledger.SignedTransferRequest.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 2; - * 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.ledger.SignedTransferRequest.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.ledger.SignedTransferRequest} returns this - */ -proto.ledger.SignedTransferRequest.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ledger.TransferResult.prototype.toObject = function(opt_includeInstance) { - return proto.ledger.TransferResult.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ledger.TransferResult} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.TransferResult.toObject = function(includeInstance, msg) { - var f, obj = { - balance: 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.ledger.TransferResult} - */ -proto.ledger.TransferResult.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ledger.TransferResult; - return proto.ledger.TransferResult.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ledger.TransferResult} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ledger.TransferResult} - */ -proto.ledger.TransferResult.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.setBalance(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ledger.TransferResult.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ledger.TransferResult.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ledger.TransferResult} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ledger.TransferResult.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getBalance(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } -}; - - -/** - * optional int64 balance = 1; - * @return {number} - */ -proto.ledger.TransferResult.prototype.getBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ledger.TransferResult} returns this - */ -proto.ledger.TransferResult.prototype.setBalance = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -goog.object.extend(exports, proto.ledger); diff --git a/js/protos/node/node_pb.js b/js/protos/node/node_pb.js deleted file mode 100644 index 00ce565..0000000 --- a/js/protos/node/node_pb.js +++ /dev/null @@ -1,7833 +0,0 @@ -// source: protos/node/node.proto -/** - * @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 github_com_bittorrent_go$btfs$common_protos_guard_guard_pb = require('../../github.com/bittorrent/go-btfs-common/protos/guard/guard_pb.js'); -goog.object.extend(proto, github_com_bittorrent_go$btfs$common_protos_guard_guard_pb); -var github_com_tron$us_protobuf_gogoproto_gogo_pb = require('../../github.com/tron-us/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_tron$us_protobuf_gogoproto_gogo_pb); -var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); -goog.object.extend(proto, google_protobuf_timestamp_pb); -goog.exportSymbol('proto.node.AirdropRewardHistoryTab', null, global); -goog.exportSymbol('proto.node.BtfsScanTab', null, global); -goog.exportSymbol('proto.node.ContractStat', null, global); -goog.exportSymbol('proto.node.ContractStat.Role', null, global); -goog.exportSymbol('proto.node.Contracts', null, global); -goog.exportSymbol('proto.node.Contracts.Contract', null, global); -goog.exportSymbol('proto.node.DiscoveryErrorCode', null, global); -goog.exportSymbol('proto.node.DiscoveryNode', null, global); -goog.exportSymbol('proto.node.DiscoveryTab', null, global); -goog.exportSymbol('proto.node.Node', null, global); -goog.exportSymbol('proto.node.Node.ExperimentalFlags', null, global); -goog.exportSymbol('proto.node.Node.Geo', null, global); -goog.exportSymbol('proto.node.Node.Settings', null, global); -goog.exportSymbol('proto.node.NodeContractStat', null, global); -goog.exportSymbol('proto.node.NodeRole', null, global); -goog.exportSymbol('proto.node.PayLoadInfo', null, global); -goog.exportSymbol('proto.node.ScoreHistoryTab', null, global); -goog.exportSymbol('proto.node.StorageStat', null, global); -goog.exportSymbol('proto.node.StorageStat.Host', null, global); -goog.exportSymbol('proto.node.StorageStat.HostStats', null, global); -goog.exportSymbol('proto.node.StorageStat.Renter', 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.node.PayLoadInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.node.PayLoadInfo.repeatedFields_, null); -}; -goog.inherits(proto.node.PayLoadInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.node.PayLoadInfo.displayName = 'proto.node.PayLoadInfo'; -} -/** - * 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.node.DiscoveryNode = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.node.DiscoveryNode, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.node.DiscoveryNode.displayName = 'proto.node.DiscoveryNode'; -} -/** - * 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.node.DiscoveryTab = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.node.DiscoveryTab, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.node.DiscoveryTab.displayName = 'proto.node.DiscoveryTab'; -} -/** - * 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.node.Node = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.node.Node, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.node.Node.displayName = 'proto.node.Node'; -} -/** - * 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.node.Node.Settings = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.node.Node.Settings.repeatedFields_, null); -}; -goog.inherits(proto.node.Node.Settings, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.node.Node.Settings.displayName = 'proto.node.Node.Settings'; -} -/** - * 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.node.Node.Geo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.node.Node.Geo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.node.Node.Geo.displayName = 'proto.node.Node.Geo'; -} -/** - * 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.node.Node.ExperimentalFlags = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.node.Node.ExperimentalFlags, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.node.Node.ExperimentalFlags.displayName = 'proto.node.Node.ExperimentalFlags'; -} -/** - * 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.node.NodeContractStat = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.node.NodeContractStat, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.node.NodeContractStat.displayName = 'proto.node.NodeContractStat'; -} -/** - * 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.node.StorageStat = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.node.StorageStat, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.node.StorageStat.displayName = 'proto.node.StorageStat'; -} -/** - * 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.node.StorageStat.HostStats = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.node.StorageStat.HostStats, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.node.StorageStat.HostStats.displayName = 'proto.node.StorageStat.HostStats'; -} -/** - * 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.node.StorageStat.Host = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.node.StorageStat.Host, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.node.StorageStat.Host.displayName = 'proto.node.StorageStat.Host'; -} -/** - * 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.node.StorageStat.Renter = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.node.StorageStat.Renter, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.node.StorageStat.Renter.displayName = 'proto.node.StorageStat.Renter'; -} -/** - * 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.node.ContractStat = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.node.ContractStat, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.node.ContractStat.displayName = 'proto.node.ContractStat'; -} -/** - * 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.node.Contracts = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.node.Contracts.repeatedFields_, null); -}; -goog.inherits(proto.node.Contracts, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.node.Contracts.displayName = 'proto.node.Contracts'; -} -/** - * 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.node.Contracts.Contract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.node.Contracts.Contract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.node.Contracts.Contract.displayName = 'proto.node.Contracts.Contract'; -} -/** - * 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.node.BtfsScanTab = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.node.BtfsScanTab, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.node.BtfsScanTab.displayName = 'proto.node.BtfsScanTab'; -} -/** - * 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.node.ScoreHistoryTab = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.node.ScoreHistoryTab, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.node.ScoreHistoryTab.displayName = 'proto.node.ScoreHistoryTab'; -} -/** - * 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.node.AirdropRewardHistoryTab = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.node.AirdropRewardHistoryTab, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.node.AirdropRewardHistoryTab.displayName = 'proto.node.AirdropRewardHistoryTab'; -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.node.PayLoadInfo.repeatedFields_ = [3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.node.PayLoadInfo.prototype.toObject = function(opt_includeInstance) { - return proto.node.PayLoadInfo.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.node.PayLoadInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.PayLoadInfo.toObject = function(includeInstance, msg) { - var f, obj = { - nodeId: jspb.Message.getFieldWithDefault(msg, 1, ""), - node: (f = msg.getNode()) && proto.node.Node.toObject(includeInstance, f), - discoveryNodesList: jspb.Message.toObjectList(msg.getDiscoveryNodesList(), - proto.node.DiscoveryNode.toObject, includeInstance), - lastTime: (f = msg.getLastTime()) && google_protobuf_timestamp_pb.Timestamp.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.node.PayLoadInfo} - */ -proto.node.PayLoadInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.node.PayLoadInfo; - return proto.node.PayLoadInfo.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.node.PayLoadInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.node.PayLoadInfo} - */ -proto.node.PayLoadInfo.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.setNodeId(value); - break; - case 2: - var value = new proto.node.Node; - reader.readMessage(value,proto.node.Node.deserializeBinaryFromReader); - msg.setNode(value); - break; - case 3: - var value = new proto.node.DiscoveryNode; - reader.readMessage(value,proto.node.DiscoveryNode.deserializeBinaryFromReader); - msg.addDiscoveryNodes(value); - break; - case 4: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setLastTime(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.node.PayLoadInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.node.PayLoadInfo.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.node.PayLoadInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.PayLoadInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNodeId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getNode(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.node.Node.serializeBinaryToWriter - ); - } - f = message.getDiscoveryNodesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.node.DiscoveryNode.serializeBinaryToWriter - ); - } - f = message.getLastTime(); - if (f != null) { - writer.writeMessage( - 4, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string node_id = 1; - * @return {string} - */ -proto.node.PayLoadInfo.prototype.getNodeId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.node.PayLoadInfo} returns this - */ -proto.node.PayLoadInfo.prototype.setNodeId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional Node node = 2; - * @return {?proto.node.Node} - */ -proto.node.PayLoadInfo.prototype.getNode = function() { - return /** @type{?proto.node.Node} */ ( - jspb.Message.getWrapperField(this, proto.node.Node, 2)); -}; - - -/** - * @param {?proto.node.Node|undefined} value - * @return {!proto.node.PayLoadInfo} returns this -*/ -proto.node.PayLoadInfo.prototype.setNode = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.node.PayLoadInfo} returns this - */ -proto.node.PayLoadInfo.prototype.clearNode = function() { - return this.setNode(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.node.PayLoadInfo.prototype.hasNode = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * repeated DiscoveryNode discovery_nodes = 3; - * @return {!Array} - */ -proto.node.PayLoadInfo.prototype.getDiscoveryNodesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.node.DiscoveryNode, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.node.PayLoadInfo} returns this -*/ -proto.node.PayLoadInfo.prototype.setDiscoveryNodesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.node.DiscoveryNode=} opt_value - * @param {number=} opt_index - * @return {!proto.node.DiscoveryNode} - */ -proto.node.PayLoadInfo.prototype.addDiscoveryNodes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.node.DiscoveryNode, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.node.PayLoadInfo} returns this - */ -proto.node.PayLoadInfo.prototype.clearDiscoveryNodesList = function() { - return this.setDiscoveryNodesList([]); -}; - - -/** - * optional google.protobuf.Timestamp last_time = 4; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.node.PayLoadInfo.prototype.getLastTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.node.PayLoadInfo} returns this -*/ -proto.node.PayLoadInfo.prototype.setLastTime = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.node.PayLoadInfo} returns this - */ -proto.node.PayLoadInfo.prototype.clearLastTime = function() { - return this.setLastTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.node.PayLoadInfo.prototype.hasLastTime = function() { - return jspb.Message.getField(this, 4) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.node.DiscoveryNode.prototype.toObject = function(opt_includeInstance) { - return proto.node.DiscoveryNode.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.node.DiscoveryNode} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.DiscoveryNode.toObject = function(includeInstance, msg) { - var f, obj = { - toNodeId: jspb.Message.getFieldWithDefault(msg, 1, ""), - nodeConnectLatency: jspb.Message.getFieldWithDefault(msg, 2, 0), - errCode: 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.node.DiscoveryNode} - */ -proto.node.DiscoveryNode.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.node.DiscoveryNode; - return proto.node.DiscoveryNode.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.node.DiscoveryNode} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.node.DiscoveryNode} - */ -proto.node.DiscoveryNode.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.setToNodeId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setNodeConnectLatency(value); - break; - case 3: - var value = /** @type {!proto.node.DiscoveryErrorCode} */ (reader.readEnum()); - msg.setErrCode(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.node.DiscoveryNode.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.node.DiscoveryNode.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.node.DiscoveryNode} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.DiscoveryNode.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getToNodeId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getNodeConnectLatency(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } - f = message.getErrCode(); - if (f !== 0.0) { - writer.writeEnum( - 3, - f - ); - } -}; - - -/** - * optional string to_node_id = 1; - * @return {string} - */ -proto.node.DiscoveryNode.prototype.getToNodeId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.node.DiscoveryNode} returns this - */ -proto.node.DiscoveryNode.prototype.setToNodeId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional int32 node_connect_latency = 2; - * @return {number} - */ -proto.node.DiscoveryNode.prototype.getNodeConnectLatency = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.DiscoveryNode} returns this - */ -proto.node.DiscoveryNode.prototype.setNodeConnectLatency = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional DiscoveryErrorCode err_code = 3; - * @return {!proto.node.DiscoveryErrorCode} - */ -proto.node.DiscoveryNode.prototype.getErrCode = function() { - return /** @type {!proto.node.DiscoveryErrorCode} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {!proto.node.DiscoveryErrorCode} value - * @return {!proto.node.DiscoveryNode} returns this - */ -proto.node.DiscoveryNode.prototype.setErrCode = function(value) { - return jspb.Message.setProto3EnumField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.node.DiscoveryTab.prototype.toObject = function(opt_includeInstance) { - return proto.node.DiscoveryTab.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.node.DiscoveryTab} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.DiscoveryTab.toObject = function(includeInstance, msg) { - var f, obj = { - tableName: jspb.Message.getFieldWithDefault(msg, 1, ""), - nodeId: jspb.Message.getFieldWithDefault(msg, 2, ""), - connectCnt: jspb.Message.getFieldWithDefault(msg, 3, 0), - avgConnectLatency: jspb.Message.getFieldWithDefault(msg, 4, 0), - errCode: jspb.Message.getFieldWithDefault(msg, 5, 0), - discoveryLabel: jspb.Message.getFieldWithDefault(msg, 6, 0), - timeCreated: (f = msg.getTimeCreated()) && google_protobuf_timestamp_pb.Timestamp.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.node.DiscoveryTab} - */ -proto.node.DiscoveryTab.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.node.DiscoveryTab; - return proto.node.DiscoveryTab.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.node.DiscoveryTab} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.node.DiscoveryTab} - */ -proto.node.DiscoveryTab.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.setTableName(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setNodeId(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setConnectCnt(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt32()); - msg.setAvgConnectLatency(value); - break; - case 5: - var value = /** @type {!proto.node.DiscoveryErrorCode} */ (reader.readEnum()); - msg.setErrCode(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt32()); - msg.setDiscoveryLabel(value); - break; - case 7: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setTimeCreated(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.node.DiscoveryTab.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.node.DiscoveryTab.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.node.DiscoveryTab} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.DiscoveryTab.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTableName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getNodeId(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getConnectCnt(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } - f = message.getAvgConnectLatency(); - if (f !== 0) { - writer.writeInt32( - 4, - f - ); - } - f = message.getErrCode(); - if (f !== 0.0) { - writer.writeEnum( - 5, - f - ); - } - f = message.getDiscoveryLabel(); - if (f !== 0) { - writer.writeInt32( - 6, - f - ); - } - f = message.getTimeCreated(); - if (f != null) { - writer.writeMessage( - 7, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string table_name = 1; - * @return {string} - */ -proto.node.DiscoveryTab.prototype.getTableName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.node.DiscoveryTab} returns this - */ -proto.node.DiscoveryTab.prototype.setTableName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string node_id = 2; - * @return {string} - */ -proto.node.DiscoveryTab.prototype.getNodeId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.node.DiscoveryTab} returns this - */ -proto.node.DiscoveryTab.prototype.setNodeId = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional uint32 connect_cnt = 3; - * @return {number} - */ -proto.node.DiscoveryTab.prototype.getConnectCnt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.DiscoveryTab} returns this - */ -proto.node.DiscoveryTab.prototype.setConnectCnt = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int32 avg_connect_latency = 4; - * @return {number} - */ -proto.node.DiscoveryTab.prototype.getAvgConnectLatency = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.DiscoveryTab} returns this - */ -proto.node.DiscoveryTab.prototype.setAvgConnectLatency = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional DiscoveryErrorCode err_code = 5; - * @return {!proto.node.DiscoveryErrorCode} - */ -proto.node.DiscoveryTab.prototype.getErrCode = function() { - return /** @type {!proto.node.DiscoveryErrorCode} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {!proto.node.DiscoveryErrorCode} value - * @return {!proto.node.DiscoveryTab} returns this - */ -proto.node.DiscoveryTab.prototype.setErrCode = function(value) { - return jspb.Message.setProto3EnumField(this, 5, value); -}; - - -/** - * optional int32 discovery_label = 6; - * @return {number} - */ -proto.node.DiscoveryTab.prototype.getDiscoveryLabel = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.DiscoveryTab} returns this - */ -proto.node.DiscoveryTab.prototype.setDiscoveryLabel = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional google.protobuf.Timestamp time_created = 7; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.node.DiscoveryTab.prototype.getTimeCreated = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 7)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.node.DiscoveryTab} returns this -*/ -proto.node.DiscoveryTab.prototype.setTimeCreated = function(value) { - return jspb.Message.setWrapperField(this, 7, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.node.DiscoveryTab} returns this - */ -proto.node.DiscoveryTab.prototype.clearTimeCreated = function() { - return this.setTimeCreated(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.node.DiscoveryTab.prototype.hasTimeCreated = function() { - return jspb.Message.getField(this, 7) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.node.Node.prototype.toObject = function(opt_includeInstance) { - return proto.node.Node.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.node.Node} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.Node.toObject = function(includeInstance, msg) { - var f, obj = { - tableName: jspb.Message.getFieldWithDefault(msg, 1, ""), - nodeId: jspb.Message.getFieldWithDefault(msg, 2, ""), - btfsVersion: jspb.Message.getFieldWithDefault(msg, 3, ""), - upTime: jspb.Message.getFieldWithDefault(msg, 4, 0), - storageUsed: jspb.Message.getFieldWithDefault(msg, 5, 0), - storageVolumeCap: jspb.Message.getFieldWithDefault(msg, 6, 0), - memoryUsed: jspb.Message.getFieldWithDefault(msg, 7, 0), - cpuUsed: jspb.Message.getFloatingPointFieldWithDefault(msg, 8, 0.0), - upload: jspb.Message.getFieldWithDefault(msg, 9, 0), - download: jspb.Message.getFieldWithDefault(msg, 10, 0), - totalUpload: jspb.Message.getFieldWithDefault(msg, 11, 0), - totalDownload: jspb.Message.getFieldWithDefault(msg, 12, 0), - storagePriceDeal: jspb.Message.getFieldWithDefault(msg, 13, 0), - bandwidthPriceDeal: jspb.Message.getFieldWithDefault(msg, 14, 0), - settings: (f = msg.getSettings()) && proto.node.Node.Settings.toObject(includeInstance, f), - reputation: jspb.Message.getFloatingPointFieldWithDefault(msg, 16, 0.0), - blocksUp: jspb.Message.getFieldWithDefault(msg, 17, 0), - blocksDown: jspb.Message.getFieldWithDefault(msg, 18, 0), - osType: jspb.Message.getFieldWithDefault(msg, 19, ""), - archType: jspb.Message.getFieldWithDefault(msg, 20, ""), - cpuInfo: jspb.Message.getFieldWithDefault(msg, 21, ""), - peersConnected: jspb.Message.getFieldWithDefault(msg, 23, 0), - timeCreated: (f = msg.getTimeCreated()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - hVal: jspb.Message.getFieldWithDefault(msg, 25, ""), - geo: (f = msg.getGeo()) && proto.node.Node.Geo.toObject(includeInstance, f), - flg: (f = msg.getFlg()) && proto.node.Node.ExperimentalFlags.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.node.Node} - */ -proto.node.Node.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.node.Node; - return proto.node.Node.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.node.Node} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.node.Node} - */ -proto.node.Node.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.setTableName(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setNodeId(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setBtfsVersion(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setUpTime(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setStorageUsed(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint64()); - msg.setStorageVolumeCap(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMemoryUsed(value); - break; - case 8: - var value = /** @type {number} */ (reader.readDouble()); - msg.setCpuUsed(value); - break; - case 9: - var value = /** @type {number} */ (reader.readUint64()); - msg.setUpload(value); - break; - case 10: - var value = /** @type {number} */ (reader.readUint64()); - msg.setDownload(value); - break; - case 11: - var value = /** @type {number} */ (reader.readUint64()); - msg.setTotalUpload(value); - break; - case 12: - var value = /** @type {number} */ (reader.readUint64()); - msg.setTotalDownload(value); - break; - case 13: - var value = /** @type {number} */ (reader.readUint64()); - msg.setStoragePriceDeal(value); - break; - case 14: - var value = /** @type {number} */ (reader.readUint64()); - msg.setBandwidthPriceDeal(value); - break; - case 15: - var value = new proto.node.Node.Settings; - reader.readMessage(value,proto.node.Node.Settings.deserializeBinaryFromReader); - msg.setSettings(value); - break; - case 16: - var value = /** @type {number} */ (reader.readDouble()); - msg.setReputation(value); - break; - case 17: - var value = /** @type {number} */ (reader.readUint64()); - msg.setBlocksUp(value); - break; - case 18: - var value = /** @type {number} */ (reader.readUint64()); - msg.setBlocksDown(value); - break; - case 19: - var value = /** @type {string} */ (reader.readString()); - msg.setOsType(value); - break; - case 20: - var value = /** @type {string} */ (reader.readString()); - msg.setArchType(value); - break; - case 21: - var value = /** @type {string} */ (reader.readString()); - msg.setCpuInfo(value); - break; - case 23: - var value = /** @type {number} */ (reader.readUint64()); - msg.setPeersConnected(value); - break; - case 24: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setTimeCreated(value); - break; - case 25: - var value = /** @type {string} */ (reader.readString()); - msg.setHVal(value); - break; - case 26: - var value = new proto.node.Node.Geo; - reader.readMessage(value,proto.node.Node.Geo.deserializeBinaryFromReader); - msg.setGeo(value); - break; - case 27: - var value = new proto.node.Node.ExperimentalFlags; - reader.readMessage(value,proto.node.Node.ExperimentalFlags.deserializeBinaryFromReader); - msg.setFlg(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.node.Node.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.node.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.node.Node} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.Node.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTableName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getNodeId(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getBtfsVersion(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getUpTime(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getStorageUsed(); - if (f !== 0) { - writer.writeUint64( - 5, - f - ); - } - f = message.getStorageVolumeCap(); - if (f !== 0) { - writer.writeUint64( - 6, - f - ); - } - f = message.getMemoryUsed(); - if (f !== 0) { - writer.writeUint64( - 7, - f - ); - } - f = message.getCpuUsed(); - if (f !== 0.0) { - writer.writeDouble( - 8, - f - ); - } - f = message.getUpload(); - if (f !== 0) { - writer.writeUint64( - 9, - f - ); - } - f = message.getDownload(); - if (f !== 0) { - writer.writeUint64( - 10, - f - ); - } - f = message.getTotalUpload(); - if (f !== 0) { - writer.writeUint64( - 11, - f - ); - } - f = message.getTotalDownload(); - if (f !== 0) { - writer.writeUint64( - 12, - f - ); - } - f = message.getStoragePriceDeal(); - if (f !== 0) { - writer.writeUint64( - 13, - f - ); - } - f = message.getBandwidthPriceDeal(); - if (f !== 0) { - writer.writeUint64( - 14, - f - ); - } - f = message.getSettings(); - if (f != null) { - writer.writeMessage( - 15, - f, - proto.node.Node.Settings.serializeBinaryToWriter - ); - } - f = message.getReputation(); - if (f !== 0.0) { - writer.writeDouble( - 16, - f - ); - } - f = message.getBlocksUp(); - if (f !== 0) { - writer.writeUint64( - 17, - f - ); - } - f = message.getBlocksDown(); - if (f !== 0) { - writer.writeUint64( - 18, - f - ); - } - f = message.getOsType(); - if (f.length > 0) { - writer.writeString( - 19, - f - ); - } - f = message.getArchType(); - if (f.length > 0) { - writer.writeString( - 20, - f - ); - } - f = message.getCpuInfo(); - if (f.length > 0) { - writer.writeString( - 21, - f - ); - } - f = message.getPeersConnected(); - if (f !== 0) { - writer.writeUint64( - 23, - f - ); - } - f = message.getTimeCreated(); - if (f != null) { - writer.writeMessage( - 24, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getHVal(); - if (f.length > 0) { - writer.writeString( - 25, - f - ); - } - f = message.getGeo(); - if (f != null) { - writer.writeMessage( - 26, - f, - proto.node.Node.Geo.serializeBinaryToWriter - ); - } - f = message.getFlg(); - if (f != null) { - writer.writeMessage( - 27, - f, - proto.node.Node.ExperimentalFlags.serializeBinaryToWriter - ); - } -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.node.Node.Settings.repeatedFields_ = [8]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.node.Node.Settings.prototype.toObject = function(opt_includeInstance) { - return proto.node.Node.Settings.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.node.Node.Settings} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.Node.Settings.toObject = function(includeInstance, msg) { - var f, obj = { - storagePriceAsk: jspb.Message.getFieldWithDefault(msg, 1, 0), - bandwidthPriceAsk: jspb.Message.getFieldWithDefault(msg, 2, 0), - storageTimeMin: jspb.Message.getFieldWithDefault(msg, 3, 0), - bandwidthLimit: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0), - collateralStake: jspb.Message.getFieldWithDefault(msg, 5, 0), - storagePriceDefault: jspb.Message.getFieldWithDefault(msg, 6, 0), - customizedPricing: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), - rolesList: (f = jspb.Message.getRepeatedField(msg, 8)) == null ? undefined : f, - repairPriceDefault: jspb.Message.getFieldWithDefault(msg, 9, 0), - repairPriceCustomized: jspb.Message.getFieldWithDefault(msg, 10, 0), - repairCustomizedPricing: jspb.Message.getBooleanFieldWithDefault(msg, 11, false), - challengePriceDefault: jspb.Message.getFieldWithDefault(msg, 12, 0), - challengePriceCustomized: jspb.Message.getFieldWithDefault(msg, 13, 0), - challengeCustomizedPricing: jspb.Message.getBooleanFieldWithDefault(msg, 14, 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.node.Node.Settings} - */ -proto.node.Node.Settings.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.node.Node.Settings; - return proto.node.Node.Settings.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.node.Node.Settings} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.node.Node.Settings} - */ -proto.node.Node.Settings.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setStoragePriceAsk(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setBandwidthPriceAsk(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setStorageTimeMin(value); - break; - case 4: - var value = /** @type {number} */ (reader.readDouble()); - msg.setBandwidthLimit(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setCollateralStake(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint64()); - msg.setStoragePriceDefault(value); - break; - case 7: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setCustomizedPricing(value); - break; - case 8: - var value = /** @type {!Array} */ (reader.readPackedEnum()); - msg.setRolesList(value); - break; - case 9: - var value = /** @type {number} */ (reader.readUint64()); - msg.setRepairPriceDefault(value); - break; - case 10: - var value = /** @type {number} */ (reader.readUint64()); - msg.setRepairPriceCustomized(value); - break; - case 11: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setRepairCustomizedPricing(value); - break; - case 12: - var value = /** @type {number} */ (reader.readUint64()); - msg.setChallengePriceDefault(value); - break; - case 13: - var value = /** @type {number} */ (reader.readUint64()); - msg.setChallengePriceCustomized(value); - break; - case 14: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setChallengeCustomizedPricing(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.node.Node.Settings.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.node.Node.Settings.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.node.Node.Settings} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.Node.Settings.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStoragePriceAsk(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getBandwidthPriceAsk(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getStorageTimeMin(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } - f = message.getBandwidthLimit(); - if (f !== 0.0) { - writer.writeDouble( - 4, - f - ); - } - f = message.getCollateralStake(); - if (f !== 0) { - writer.writeUint64( - 5, - f - ); - } - f = message.getStoragePriceDefault(); - if (f !== 0) { - writer.writeUint64( - 6, - f - ); - } - f = message.getCustomizedPricing(); - if (f) { - writer.writeBool( - 7, - f - ); - } - f = message.getRolesList(); - if (f.length > 0) { - writer.writePackedEnum( - 8, - f - ); - } - f = message.getRepairPriceDefault(); - if (f !== 0) { - writer.writeUint64( - 9, - f - ); - } - f = message.getRepairPriceCustomized(); - if (f !== 0) { - writer.writeUint64( - 10, - f - ); - } - f = message.getRepairCustomizedPricing(); - if (f) { - writer.writeBool( - 11, - f - ); - } - f = message.getChallengePriceDefault(); - if (f !== 0) { - writer.writeUint64( - 12, - f - ); - } - f = message.getChallengePriceCustomized(); - if (f !== 0) { - writer.writeUint64( - 13, - f - ); - } - f = message.getChallengeCustomizedPricing(); - if (f) { - writer.writeBool( - 14, - f - ); - } -}; - - -/** - * optional uint64 storage_price_ask = 1; - * @return {number} - */ -proto.node.Node.Settings.prototype.getStoragePriceAsk = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.Node.Settings} returns this - */ -proto.node.Node.Settings.prototype.setStoragePriceAsk = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint64 bandwidth_price_ask = 2; - * @return {number} - */ -proto.node.Node.Settings.prototype.getBandwidthPriceAsk = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.Node.Settings} returns this - */ -proto.node.Node.Settings.prototype.setBandwidthPriceAsk = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint64 storage_time_min = 3; - * @return {number} - */ -proto.node.Node.Settings.prototype.getStorageTimeMin = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.Node.Settings} returns this - */ -proto.node.Node.Settings.prototype.setStorageTimeMin = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional double bandwidth_limit = 4; - * @return {number} - */ -proto.node.Node.Settings.prototype.getBandwidthLimit = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.Node.Settings} returns this - */ -proto.node.Node.Settings.prototype.setBandwidthLimit = function(value) { - return jspb.Message.setProto3FloatField(this, 4, value); -}; - - -/** - * optional uint64 collateral_stake = 5; - * @return {number} - */ -proto.node.Node.Settings.prototype.getCollateralStake = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.Node.Settings} returns this - */ -proto.node.Node.Settings.prototype.setCollateralStake = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional uint64 storage_price_default = 6; - * @return {number} - */ -proto.node.Node.Settings.prototype.getStoragePriceDefault = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.Node.Settings} returns this - */ -proto.node.Node.Settings.prototype.setStoragePriceDefault = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional bool customized_pricing = 7; - * @return {boolean} - */ -proto.node.Node.Settings.prototype.getCustomizedPricing = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.node.Node.Settings} returns this - */ -proto.node.Node.Settings.prototype.setCustomizedPricing = function(value) { - return jspb.Message.setProto3BooleanField(this, 7, value); -}; - - -/** - * repeated NodeRole roles = 8; - * @return {!Array} - */ -proto.node.Node.Settings.prototype.getRolesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 8)); -}; - - -/** - * @param {!Array} value - * @return {!proto.node.Node.Settings} returns this - */ -proto.node.Node.Settings.prototype.setRolesList = function(value) { - return jspb.Message.setField(this, 8, value || []); -}; - - -/** - * @param {!proto.node.NodeRole} value - * @param {number=} opt_index - * @return {!proto.node.Node.Settings} returns this - */ -proto.node.Node.Settings.prototype.addRoles = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 8, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.node.Node.Settings} returns this - */ -proto.node.Node.Settings.prototype.clearRolesList = function() { - return this.setRolesList([]); -}; - - -/** - * optional uint64 repair_price_default = 9; - * @return {number} - */ -proto.node.Node.Settings.prototype.getRepairPriceDefault = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.Node.Settings} returns this - */ -proto.node.Node.Settings.prototype.setRepairPriceDefault = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * optional uint64 repair_price_customized = 10; - * @return {number} - */ -proto.node.Node.Settings.prototype.getRepairPriceCustomized = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.Node.Settings} returns this - */ -proto.node.Node.Settings.prototype.setRepairPriceCustomized = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); -}; - - -/** - * optional bool repair_customized_pricing = 11; - * @return {boolean} - */ -proto.node.Node.Settings.prototype.getRepairCustomizedPricing = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 11, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.node.Node.Settings} returns this - */ -proto.node.Node.Settings.prototype.setRepairCustomizedPricing = function(value) { - return jspb.Message.setProto3BooleanField(this, 11, value); -}; - - -/** - * optional uint64 challenge_price_default = 12; - * @return {number} - */ -proto.node.Node.Settings.prototype.getChallengePriceDefault = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.Node.Settings} returns this - */ -proto.node.Node.Settings.prototype.setChallengePriceDefault = function(value) { - return jspb.Message.setProto3IntField(this, 12, value); -}; - - -/** - * optional uint64 challenge_price_customized = 13; - * @return {number} - */ -proto.node.Node.Settings.prototype.getChallengePriceCustomized = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.Node.Settings} returns this - */ -proto.node.Node.Settings.prototype.setChallengePriceCustomized = function(value) { - return jspb.Message.setProto3IntField(this, 13, value); -}; - - -/** - * optional bool challenge_customized_pricing = 14; - * @return {boolean} - */ -proto.node.Node.Settings.prototype.getChallengeCustomizedPricing = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 14, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.node.Node.Settings} returns this - */ -proto.node.Node.Settings.prototype.setChallengeCustomizedPricing = function(value) { - return jspb.Message.setProto3BooleanField(this, 14, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.node.Node.Geo.prototype.toObject = function(opt_includeInstance) { - return proto.node.Node.Geo.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.node.Node.Geo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.Node.Geo.toObject = function(includeInstance, msg) { - var f, obj = { - countryShort: jspb.Message.getFieldWithDefault(msg, 1, ""), - region: jspb.Message.getFieldWithDefault(msg, 2, ""), - latitude: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0), - longitude: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.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.node.Node.Geo} - */ -proto.node.Node.Geo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.node.Node.Geo; - return proto.node.Node.Geo.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.node.Node.Geo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.node.Node.Geo} - */ -proto.node.Node.Geo.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.setCountryShort(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setRegion(value); - break; - case 3: - var value = /** @type {number} */ (reader.readFloat()); - msg.setLatitude(value); - break; - case 4: - var value = /** @type {number} */ (reader.readFloat()); - msg.setLongitude(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.node.Node.Geo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.node.Node.Geo.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.node.Node.Geo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.Node.Geo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getCountryShort(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getRegion(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getLatitude(); - if (f !== 0.0) { - writer.writeFloat( - 3, - f - ); - } - f = message.getLongitude(); - if (f !== 0.0) { - writer.writeFloat( - 4, - f - ); - } -}; - - -/** - * optional string country_short = 1; - * @return {string} - */ -proto.node.Node.Geo.prototype.getCountryShort = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.node.Node.Geo} returns this - */ -proto.node.Node.Geo.prototype.setCountryShort = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string region = 2; - * @return {string} - */ -proto.node.Node.Geo.prototype.getRegion = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.node.Node.Geo} returns this - */ -proto.node.Node.Geo.prototype.setRegion = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional float latitude = 3; - * @return {number} - */ -proto.node.Node.Geo.prototype.getLatitude = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.Node.Geo} returns this - */ -proto.node.Node.Geo.prototype.setLatitude = function(value) { - return jspb.Message.setProto3FloatField(this, 3, value); -}; - - -/** - * optional float longitude = 4; - * @return {number} - */ -proto.node.Node.Geo.prototype.getLongitude = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.Node.Geo} returns this - */ -proto.node.Node.Geo.prototype.setLongitude = function(value) { - return jspb.Message.setProto3FloatField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.node.Node.ExperimentalFlags.prototype.toObject = function(opt_includeInstance) { - return proto.node.Node.ExperimentalFlags.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.node.Node.ExperimentalFlags} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.Node.ExperimentalFlags.toObject = function(includeInstance, msg) { - var f, obj = { - analytics: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - filestoreEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - hostsSyncEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), - hostsSyncMode: jspb.Message.getFieldWithDefault(msg, 4, ""), - libp2pStreamMounting: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), - p2pHttpProxy: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), - preferTls: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), - quic: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), - removeOnUnpin: jspb.Message.getBooleanFieldWithDefault(msg, 9, false), - shardingEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 10, false), - storageClientEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 11, false), - storageHostEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 12, false), - strategicProviding: jspb.Message.getBooleanFieldWithDefault(msg, 13, false), - urlStoreEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 14, false), - disableAutoUpdate: jspb.Message.getBooleanFieldWithDefault(msg, 15, false), - graphsyncEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 16, false), - repairHostEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 17, false), - challengeHostEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 18, 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.node.Node.ExperimentalFlags} - */ -proto.node.Node.ExperimentalFlags.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.node.Node.ExperimentalFlags; - return proto.node.Node.ExperimentalFlags.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.node.Node.ExperimentalFlags} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.node.Node.ExperimentalFlags} - */ -proto.node.Node.ExperimentalFlags.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.setAnalytics(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setFilestoreEnabled(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setHostsSyncEnabled(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setHostsSyncMode(value); - break; - case 5: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setLibp2pStreamMounting(value); - break; - case 6: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setP2pHttpProxy(value); - break; - case 7: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPreferTls(value); - break; - case 8: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setQuic(value); - break; - case 9: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setRemoveOnUnpin(value); - break; - case 10: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setShardingEnabled(value); - break; - case 11: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setStorageClientEnabled(value); - break; - case 12: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setStorageHostEnabled(value); - break; - case 13: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setStrategicProviding(value); - break; - case 14: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setUrlStoreEnabled(value); - break; - case 15: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setDisableAutoUpdate(value); - break; - case 16: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setGraphsyncEnabled(value); - break; - case 17: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setRepairHostEnabled(value); - break; - case 18: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setChallengeHostEnabled(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.node.Node.ExperimentalFlags.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.node.Node.ExperimentalFlags.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.node.Node.ExperimentalFlags} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.Node.ExperimentalFlags.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAnalytics(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getFilestoreEnabled(); - if (f) { - writer.writeBool( - 2, - f - ); - } - f = message.getHostsSyncEnabled(); - if (f) { - writer.writeBool( - 3, - f - ); - } - f = message.getHostsSyncMode(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getLibp2pStreamMounting(); - if (f) { - writer.writeBool( - 5, - f - ); - } - f = message.getP2pHttpProxy(); - if (f) { - writer.writeBool( - 6, - f - ); - } - f = message.getPreferTls(); - if (f) { - writer.writeBool( - 7, - f - ); - } - f = message.getQuic(); - if (f) { - writer.writeBool( - 8, - f - ); - } - f = message.getRemoveOnUnpin(); - if (f) { - writer.writeBool( - 9, - f - ); - } - f = message.getShardingEnabled(); - if (f) { - writer.writeBool( - 10, - f - ); - } - f = message.getStorageClientEnabled(); - if (f) { - writer.writeBool( - 11, - f - ); - } - f = message.getStorageHostEnabled(); - if (f) { - writer.writeBool( - 12, - f - ); - } - f = message.getStrategicProviding(); - if (f) { - writer.writeBool( - 13, - f - ); - } - f = message.getUrlStoreEnabled(); - if (f) { - writer.writeBool( - 14, - f - ); - } - f = message.getDisableAutoUpdate(); - if (f) { - writer.writeBool( - 15, - f - ); - } - f = message.getGraphsyncEnabled(); - if (f) { - writer.writeBool( - 16, - f - ); - } - f = message.getRepairHostEnabled(); - if (f) { - writer.writeBool( - 17, - f - ); - } - f = message.getChallengeHostEnabled(); - if (f) { - writer.writeBool( - 18, - f - ); - } -}; - - -/** - * optional bool analytics = 1; - * @return {boolean} - */ -proto.node.Node.ExperimentalFlags.prototype.getAnalytics = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.node.Node.ExperimentalFlags} returns this - */ -proto.node.Node.ExperimentalFlags.prototype.setAnalytics = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - -/** - * optional bool filestore_enabled = 2; - * @return {boolean} - */ -proto.node.Node.ExperimentalFlags.prototype.getFilestoreEnabled = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.node.Node.ExperimentalFlags} returns this - */ -proto.node.Node.ExperimentalFlags.prototype.setFilestoreEnabled = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - -/** - * optional bool hosts_sync_enabled = 3; - * @return {boolean} - */ -proto.node.Node.ExperimentalFlags.prototype.getHostsSyncEnabled = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.node.Node.ExperimentalFlags} returns this - */ -proto.node.Node.ExperimentalFlags.prototype.setHostsSyncEnabled = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - -/** - * optional string hosts_sync_mode = 4; - * @return {string} - */ -proto.node.Node.ExperimentalFlags.prototype.getHostsSyncMode = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.node.Node.ExperimentalFlags} returns this - */ -proto.node.Node.ExperimentalFlags.prototype.setHostsSyncMode = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional bool libp2p_stream_mounting = 5; - * @return {boolean} - */ -proto.node.Node.ExperimentalFlags.prototype.getLibp2pStreamMounting = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.node.Node.ExperimentalFlags} returns this - */ -proto.node.Node.ExperimentalFlags.prototype.setLibp2pStreamMounting = function(value) { - return jspb.Message.setProto3BooleanField(this, 5, value); -}; - - -/** - * optional bool p2p_http_proxy = 6; - * @return {boolean} - */ -proto.node.Node.ExperimentalFlags.prototype.getP2pHttpProxy = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.node.Node.ExperimentalFlags} returns this - */ -proto.node.Node.ExperimentalFlags.prototype.setP2pHttpProxy = function(value) { - return jspb.Message.setProto3BooleanField(this, 6, value); -}; - - -/** - * optional bool prefer_tls = 7; - * @return {boolean} - */ -proto.node.Node.ExperimentalFlags.prototype.getPreferTls = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.node.Node.ExperimentalFlags} returns this - */ -proto.node.Node.ExperimentalFlags.prototype.setPreferTls = function(value) { - return jspb.Message.setProto3BooleanField(this, 7, value); -}; - - -/** - * optional bool quic = 8; - * @return {boolean} - */ -proto.node.Node.ExperimentalFlags.prototype.getQuic = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.node.Node.ExperimentalFlags} returns this - */ -proto.node.Node.ExperimentalFlags.prototype.setQuic = function(value) { - return jspb.Message.setProto3BooleanField(this, 8, value); -}; - - -/** - * optional bool remove_on_unpin = 9; - * @return {boolean} - */ -proto.node.Node.ExperimentalFlags.prototype.getRemoveOnUnpin = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.node.Node.ExperimentalFlags} returns this - */ -proto.node.Node.ExperimentalFlags.prototype.setRemoveOnUnpin = function(value) { - return jspb.Message.setProto3BooleanField(this, 9, value); -}; - - -/** - * optional bool sharding_enabled = 10; - * @return {boolean} - */ -proto.node.Node.ExperimentalFlags.prototype.getShardingEnabled = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.node.Node.ExperimentalFlags} returns this - */ -proto.node.Node.ExperimentalFlags.prototype.setShardingEnabled = function(value) { - return jspb.Message.setProto3BooleanField(this, 10, value); -}; - - -/** - * optional bool storage_client_enabled = 11; - * @return {boolean} - */ -proto.node.Node.ExperimentalFlags.prototype.getStorageClientEnabled = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 11, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.node.Node.ExperimentalFlags} returns this - */ -proto.node.Node.ExperimentalFlags.prototype.setStorageClientEnabled = function(value) { - return jspb.Message.setProto3BooleanField(this, 11, value); -}; - - -/** - * optional bool storage_host_enabled = 12; - * @return {boolean} - */ -proto.node.Node.ExperimentalFlags.prototype.getStorageHostEnabled = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 12, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.node.Node.ExperimentalFlags} returns this - */ -proto.node.Node.ExperimentalFlags.prototype.setStorageHostEnabled = function(value) { - return jspb.Message.setProto3BooleanField(this, 12, value); -}; - - -/** - * optional bool strategic_providing = 13; - * @return {boolean} - */ -proto.node.Node.ExperimentalFlags.prototype.getStrategicProviding = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 13, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.node.Node.ExperimentalFlags} returns this - */ -proto.node.Node.ExperimentalFlags.prototype.setStrategicProviding = function(value) { - return jspb.Message.setProto3BooleanField(this, 13, value); -}; - - -/** - * optional bool url_store_enabled = 14; - * @return {boolean} - */ -proto.node.Node.ExperimentalFlags.prototype.getUrlStoreEnabled = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 14, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.node.Node.ExperimentalFlags} returns this - */ -proto.node.Node.ExperimentalFlags.prototype.setUrlStoreEnabled = function(value) { - return jspb.Message.setProto3BooleanField(this, 14, value); -}; - - -/** - * optional bool disable_auto_update = 15; - * @return {boolean} - */ -proto.node.Node.ExperimentalFlags.prototype.getDisableAutoUpdate = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 15, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.node.Node.ExperimentalFlags} returns this - */ -proto.node.Node.ExperimentalFlags.prototype.setDisableAutoUpdate = function(value) { - return jspb.Message.setProto3BooleanField(this, 15, value); -}; - - -/** - * optional bool graphsync_enabled = 16; - * @return {boolean} - */ -proto.node.Node.ExperimentalFlags.prototype.getGraphsyncEnabled = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 16, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.node.Node.ExperimentalFlags} returns this - */ -proto.node.Node.ExperimentalFlags.prototype.setGraphsyncEnabled = function(value) { - return jspb.Message.setProto3BooleanField(this, 16, value); -}; - - -/** - * optional bool repair_host_enabled = 17; - * @return {boolean} - */ -proto.node.Node.ExperimentalFlags.prototype.getRepairHostEnabled = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 17, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.node.Node.ExperimentalFlags} returns this - */ -proto.node.Node.ExperimentalFlags.prototype.setRepairHostEnabled = function(value) { - return jspb.Message.setProto3BooleanField(this, 17, value); -}; - - -/** - * optional bool challenge_host_enabled = 18; - * @return {boolean} - */ -proto.node.Node.ExperimentalFlags.prototype.getChallengeHostEnabled = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 18, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.node.Node.ExperimentalFlags} returns this - */ -proto.node.Node.ExperimentalFlags.prototype.setChallengeHostEnabled = function(value) { - return jspb.Message.setProto3BooleanField(this, 18, value); -}; - - -/** - * optional string table_name = 1; - * @return {string} - */ -proto.node.Node.prototype.getTableName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.node.Node} returns this - */ -proto.node.Node.prototype.setTableName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string node_id = 2; - * @return {string} - */ -proto.node.Node.prototype.getNodeId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.node.Node} returns this - */ -proto.node.Node.prototype.setNodeId = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string btfs_version = 3; - * @return {string} - */ -proto.node.Node.prototype.getBtfsVersion = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.node.Node} returns this - */ -proto.node.Node.prototype.setBtfsVersion = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional uint64 up_time = 4; - * @return {number} - */ -proto.node.Node.prototype.getUpTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.Node} returns this - */ -proto.node.Node.prototype.setUpTime = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint64 storage_used = 5; - * @return {number} - */ -proto.node.Node.prototype.getStorageUsed = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.Node} returns this - */ -proto.node.Node.prototype.setStorageUsed = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional uint64 storage_volume_cap = 6; - * @return {number} - */ -proto.node.Node.prototype.getStorageVolumeCap = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.Node} returns this - */ -proto.node.Node.prototype.setStorageVolumeCap = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional uint64 memory_used = 7; - * @return {number} - */ -proto.node.Node.prototype.getMemoryUsed = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.Node} returns this - */ -proto.node.Node.prototype.setMemoryUsed = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional double cpu_used = 8; - * @return {number} - */ -proto.node.Node.prototype.getCpuUsed = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 8, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.Node} returns this - */ -proto.node.Node.prototype.setCpuUsed = function(value) { - return jspb.Message.setProto3FloatField(this, 8, value); -}; - - -/** - * optional uint64 upload = 9; - * @return {number} - */ -proto.node.Node.prototype.getUpload = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.Node} returns this - */ -proto.node.Node.prototype.setUpload = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * optional uint64 download = 10; - * @return {number} - */ -proto.node.Node.prototype.getDownload = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.Node} returns this - */ -proto.node.Node.prototype.setDownload = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); -}; - - -/** - * optional uint64 total_upload = 11; - * @return {number} - */ -proto.node.Node.prototype.getTotalUpload = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.Node} returns this - */ -proto.node.Node.prototype.setTotalUpload = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); -}; - - -/** - * optional uint64 total_download = 12; - * @return {number} - */ -proto.node.Node.prototype.getTotalDownload = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.Node} returns this - */ -proto.node.Node.prototype.setTotalDownload = function(value) { - return jspb.Message.setProto3IntField(this, 12, value); -}; - - -/** - * optional uint64 storage_price_deal = 13; - * @return {number} - */ -proto.node.Node.prototype.getStoragePriceDeal = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.Node} returns this - */ -proto.node.Node.prototype.setStoragePriceDeal = function(value) { - return jspb.Message.setProto3IntField(this, 13, value); -}; - - -/** - * optional uint64 bandwidth_price_deal = 14; - * @return {number} - */ -proto.node.Node.prototype.getBandwidthPriceDeal = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.Node} returns this - */ -proto.node.Node.prototype.setBandwidthPriceDeal = function(value) { - return jspb.Message.setProto3IntField(this, 14, value); -}; - - -/** - * optional Settings settings = 15; - * @return {?proto.node.Node.Settings} - */ -proto.node.Node.prototype.getSettings = function() { - return /** @type{?proto.node.Node.Settings} */ ( - jspb.Message.getWrapperField(this, proto.node.Node.Settings, 15)); -}; - - -/** - * @param {?proto.node.Node.Settings|undefined} value - * @return {!proto.node.Node} returns this -*/ -proto.node.Node.prototype.setSettings = function(value) { - return jspb.Message.setWrapperField(this, 15, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.node.Node} returns this - */ -proto.node.Node.prototype.clearSettings = function() { - return this.setSettings(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.node.Node.prototype.hasSettings = function() { - return jspb.Message.getField(this, 15) != null; -}; - - -/** - * optional double reputation = 16; - * @return {number} - */ -proto.node.Node.prototype.getReputation = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 16, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.Node} returns this - */ -proto.node.Node.prototype.setReputation = function(value) { - return jspb.Message.setProto3FloatField(this, 16, value); -}; - - -/** - * optional uint64 blocks_up = 17; - * @return {number} - */ -proto.node.Node.prototype.getBlocksUp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 17, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.Node} returns this - */ -proto.node.Node.prototype.setBlocksUp = function(value) { - return jspb.Message.setProto3IntField(this, 17, value); -}; - - -/** - * optional uint64 blocks_down = 18; - * @return {number} - */ -proto.node.Node.prototype.getBlocksDown = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 18, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.Node} returns this - */ -proto.node.Node.prototype.setBlocksDown = function(value) { - return jspb.Message.setProto3IntField(this, 18, value); -}; - - -/** - * optional string os_type = 19; - * @return {string} - */ -proto.node.Node.prototype.getOsType = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 19, "")); -}; - - -/** - * @param {string} value - * @return {!proto.node.Node} returns this - */ -proto.node.Node.prototype.setOsType = function(value) { - return jspb.Message.setProto3StringField(this, 19, value); -}; - - -/** - * optional string arch_type = 20; - * @return {string} - */ -proto.node.Node.prototype.getArchType = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 20, "")); -}; - - -/** - * @param {string} value - * @return {!proto.node.Node} returns this - */ -proto.node.Node.prototype.setArchType = function(value) { - return jspb.Message.setProto3StringField(this, 20, value); -}; - - -/** - * optional string cpu_info = 21; - * @return {string} - */ -proto.node.Node.prototype.getCpuInfo = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 21, "")); -}; - - -/** - * @param {string} value - * @return {!proto.node.Node} returns this - */ -proto.node.Node.prototype.setCpuInfo = function(value) { - return jspb.Message.setProto3StringField(this, 21, value); -}; - - -/** - * optional uint64 peers_connected = 23; - * @return {number} - */ -proto.node.Node.prototype.getPeersConnected = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 23, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.Node} returns this - */ -proto.node.Node.prototype.setPeersConnected = function(value) { - return jspb.Message.setProto3IntField(this, 23, value); -}; - - -/** - * optional google.protobuf.Timestamp time_created = 24; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.node.Node.prototype.getTimeCreated = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 24)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.node.Node} returns this -*/ -proto.node.Node.prototype.setTimeCreated = function(value) { - return jspb.Message.setWrapperField(this, 24, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.node.Node} returns this - */ -proto.node.Node.prototype.clearTimeCreated = function() { - return this.setTimeCreated(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.node.Node.prototype.hasTimeCreated = function() { - return jspb.Message.getField(this, 24) != null; -}; - - -/** - * optional string h_val = 25; - * @return {string} - */ -proto.node.Node.prototype.getHVal = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 25, "")); -}; - - -/** - * @param {string} value - * @return {!proto.node.Node} returns this - */ -proto.node.Node.prototype.setHVal = function(value) { - return jspb.Message.setProto3StringField(this, 25, value); -}; - - -/** - * optional Geo geo = 26; - * @return {?proto.node.Node.Geo} - */ -proto.node.Node.prototype.getGeo = function() { - return /** @type{?proto.node.Node.Geo} */ ( - jspb.Message.getWrapperField(this, proto.node.Node.Geo, 26)); -}; - - -/** - * @param {?proto.node.Node.Geo|undefined} value - * @return {!proto.node.Node} returns this -*/ -proto.node.Node.prototype.setGeo = function(value) { - return jspb.Message.setWrapperField(this, 26, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.node.Node} returns this - */ -proto.node.Node.prototype.clearGeo = function() { - return this.setGeo(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.node.Node.prototype.hasGeo = function() { - return jspb.Message.getField(this, 26) != null; -}; - - -/** - * optional ExperimentalFlags flg = 27; - * @return {?proto.node.Node.ExperimentalFlags} - */ -proto.node.Node.prototype.getFlg = function() { - return /** @type{?proto.node.Node.ExperimentalFlags} */ ( - jspb.Message.getWrapperField(this, proto.node.Node.ExperimentalFlags, 27)); -}; - - -/** - * @param {?proto.node.Node.ExperimentalFlags|undefined} value - * @return {!proto.node.Node} returns this -*/ -proto.node.Node.prototype.setFlg = function(value) { - return jspb.Message.setWrapperField(this, 27, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.node.Node} returns this - */ -proto.node.Node.prototype.clearFlg = function() { - return this.setFlg(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.node.Node.prototype.hasFlg = function() { - return jspb.Message.getField(this, 27) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.node.NodeContractStat.prototype.toObject = function(opt_includeInstance) { - return proto.node.NodeContractStat.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.node.NodeContractStat} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.NodeContractStat.toObject = function(includeInstance, msg) { - var f, obj = { - tableName: jspb.Message.getFieldWithDefault(msg, 1, ""), - nodeId: jspb.Message.getFieldWithDefault(msg, 2, ""), - bigMiner: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), - lastModifyTime: (f = msg.getLastModifyTime()) && google_protobuf_timestamp_pb.Timestamp.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.node.NodeContractStat} - */ -proto.node.NodeContractStat.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.node.NodeContractStat; - return proto.node.NodeContractStat.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.node.NodeContractStat} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.node.NodeContractStat} - */ -proto.node.NodeContractStat.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.setTableName(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setNodeId(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setBigMiner(value); - break; - case 4: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setLastModifyTime(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.node.NodeContractStat.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.node.NodeContractStat.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.node.NodeContractStat} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.NodeContractStat.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTableName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getNodeId(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getBigMiner(); - if (f) { - writer.writeBool( - 3, - f - ); - } - f = message.getLastModifyTime(); - if (f != null) { - writer.writeMessage( - 4, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string table_name = 1; - * @return {string} - */ -proto.node.NodeContractStat.prototype.getTableName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.node.NodeContractStat} returns this - */ -proto.node.NodeContractStat.prototype.setTableName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string node_id = 2; - * @return {string} - */ -proto.node.NodeContractStat.prototype.getNodeId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.node.NodeContractStat} returns this - */ -proto.node.NodeContractStat.prototype.setNodeId = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional bool big_miner = 3; - * @return {boolean} - */ -proto.node.NodeContractStat.prototype.getBigMiner = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.node.NodeContractStat} returns this - */ -proto.node.NodeContractStat.prototype.setBigMiner = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - -/** - * optional google.protobuf.Timestamp last_modify_time = 4; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.node.NodeContractStat.prototype.getLastModifyTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.node.NodeContractStat} returns this -*/ -proto.node.NodeContractStat.prototype.setLastModifyTime = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.node.NodeContractStat} returns this - */ -proto.node.NodeContractStat.prototype.clearLastModifyTime = function() { - return this.setLastModifyTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.node.NodeContractStat.prototype.hasLastModifyTime = function() { - return jspb.Message.getField(this, 4) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.node.StorageStat.prototype.toObject = function(opt_includeInstance) { - return proto.node.StorageStat.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.node.StorageStat} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.StorageStat.toObject = function(includeInstance, msg) { - var f, obj = { - hostStats: (f = msg.getHostStats()) && proto.node.StorageStat.Host.toObject(includeInstance, f), - renterStats: (f = msg.getRenterStats()) && proto.node.StorageStat.Renter.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.node.StorageStat} - */ -proto.node.StorageStat.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.node.StorageStat; - return proto.node.StorageStat.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.node.StorageStat} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.node.StorageStat} - */ -proto.node.StorageStat.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.node.StorageStat.Host; - reader.readMessage(value,proto.node.StorageStat.Host.deserializeBinaryFromReader); - msg.setHostStats(value); - break; - case 2: - var value = new proto.node.StorageStat.Renter; - reader.readMessage(value,proto.node.StorageStat.Renter.deserializeBinaryFromReader); - msg.setRenterStats(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.node.StorageStat.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.node.StorageStat.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.node.StorageStat} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.StorageStat.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getHostStats(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.node.StorageStat.Host.serializeBinaryToWriter - ); - } - f = message.getRenterStats(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.node.StorageStat.Renter.serializeBinaryToWriter - ); - } -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.node.StorageStat.HostStats.prototype.toObject = function(opt_includeInstance) { - return proto.node.StorageStat.HostStats.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.node.StorageStat.HostStats} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.StorageStat.HostStats.toObject = function(includeInstance, msg) { - var f, obj = { - uptime: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0), - score: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), - uptimeScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0), - ageScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0), - versionScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.0), - speedScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 6, 0.0), - uploadSpeedScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 7, 0.0), - downloadSpeedScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 8, 0.0), - uptimeWeight: jspb.Message.getFloatingPointFieldWithDefault(msg, 9, 0.0), - ageWeight: jspb.Message.getFloatingPointFieldWithDefault(msg, 10, 0.0), - versionWeight: jspb.Message.getFloatingPointFieldWithDefault(msg, 11, 0.0), - speedWeight: jspb.Message.getFloatingPointFieldWithDefault(msg, 12, 0.0), - uploadSpeedWeight: jspb.Message.getFloatingPointFieldWithDefault(msg, 13, 0.0), - downloadSpeedWeight: jspb.Message.getFloatingPointFieldWithDefault(msg, 14, 0.0), - lastUpdated: (f = msg.getLastUpdated()) && google_protobuf_timestamp_pb.Timestamp.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.node.StorageStat.HostStats} - */ -proto.node.StorageStat.HostStats.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.node.StorageStat.HostStats; - return proto.node.StorageStat.HostStats.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.node.StorageStat.HostStats} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.node.StorageStat.HostStats} - */ -proto.node.StorageStat.HostStats.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readFloat()); - msg.setUptime(value); - break; - case 2: - var value = /** @type {number} */ (reader.readFloat()); - msg.setScore(value); - break; - case 3: - var value = /** @type {number} */ (reader.readFloat()); - msg.setUptimeScore(value); - break; - case 4: - var value = /** @type {number} */ (reader.readFloat()); - msg.setAgeScore(value); - break; - case 5: - var value = /** @type {number} */ (reader.readFloat()); - msg.setVersionScore(value); - break; - case 6: - var value = /** @type {number} */ (reader.readFloat()); - msg.setSpeedScore(value); - break; - case 7: - var value = /** @type {number} */ (reader.readFloat()); - msg.setUploadSpeedScore(value); - break; - case 8: - var value = /** @type {number} */ (reader.readFloat()); - msg.setDownloadSpeedScore(value); - break; - case 9: - var value = /** @type {number} */ (reader.readFloat()); - msg.setUptimeWeight(value); - break; - case 10: - var value = /** @type {number} */ (reader.readFloat()); - msg.setAgeWeight(value); - break; - case 11: - var value = /** @type {number} */ (reader.readFloat()); - msg.setVersionWeight(value); - break; - case 12: - var value = /** @type {number} */ (reader.readFloat()); - msg.setSpeedWeight(value); - break; - case 13: - var value = /** @type {number} */ (reader.readFloat()); - msg.setUploadSpeedWeight(value); - break; - case 14: - var value = /** @type {number} */ (reader.readFloat()); - msg.setDownloadSpeedWeight(value); - break; - case 15: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setLastUpdated(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.node.StorageStat.HostStats.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.node.StorageStat.HostStats.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.node.StorageStat.HostStats} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.StorageStat.HostStats.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getUptime(); - if (f !== 0.0) { - writer.writeFloat( - 1, - f - ); - } - f = message.getScore(); - if (f !== 0.0) { - writer.writeFloat( - 2, - f - ); - } - f = message.getUptimeScore(); - if (f !== 0.0) { - writer.writeFloat( - 3, - f - ); - } - f = message.getAgeScore(); - if (f !== 0.0) { - writer.writeFloat( - 4, - f - ); - } - f = message.getVersionScore(); - if (f !== 0.0) { - writer.writeFloat( - 5, - f - ); - } - f = message.getSpeedScore(); - if (f !== 0.0) { - writer.writeFloat( - 6, - f - ); - } - f = message.getUploadSpeedScore(); - if (f !== 0.0) { - writer.writeFloat( - 7, - f - ); - } - f = message.getDownloadSpeedScore(); - if (f !== 0.0) { - writer.writeFloat( - 8, - f - ); - } - f = message.getUptimeWeight(); - if (f !== 0.0) { - writer.writeFloat( - 9, - f - ); - } - f = message.getAgeWeight(); - if (f !== 0.0) { - writer.writeFloat( - 10, - f - ); - } - f = message.getVersionWeight(); - if (f !== 0.0) { - writer.writeFloat( - 11, - f - ); - } - f = message.getSpeedWeight(); - if (f !== 0.0) { - writer.writeFloat( - 12, - f - ); - } - f = message.getUploadSpeedWeight(); - if (f !== 0.0) { - writer.writeFloat( - 13, - f - ); - } - f = message.getDownloadSpeedWeight(); - if (f !== 0.0) { - writer.writeFloat( - 14, - f - ); - } - f = message.getLastUpdated(); - if (f != null) { - writer.writeMessage( - 15, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } -}; - - -/** - * optional float uptime = 1; - * @return {number} - */ -proto.node.StorageStat.HostStats.prototype.getUptime = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.StorageStat.HostStats} returns this - */ -proto.node.StorageStat.HostStats.prototype.setUptime = function(value) { - return jspb.Message.setProto3FloatField(this, 1, value); -}; - - -/** - * optional float score = 2; - * @return {number} - */ -proto.node.StorageStat.HostStats.prototype.getScore = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.StorageStat.HostStats} returns this - */ -proto.node.StorageStat.HostStats.prototype.setScore = function(value) { - return jspb.Message.setProto3FloatField(this, 2, value); -}; - - -/** - * optional float uptime_score = 3; - * @return {number} - */ -proto.node.StorageStat.HostStats.prototype.getUptimeScore = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.StorageStat.HostStats} returns this - */ -proto.node.StorageStat.HostStats.prototype.setUptimeScore = function(value) { - return jspb.Message.setProto3FloatField(this, 3, value); -}; - - -/** - * optional float age_score = 4; - * @return {number} - */ -proto.node.StorageStat.HostStats.prototype.getAgeScore = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.StorageStat.HostStats} returns this - */ -proto.node.StorageStat.HostStats.prototype.setAgeScore = function(value) { - return jspb.Message.setProto3FloatField(this, 4, value); -}; - - -/** - * optional float version_score = 5; - * @return {number} - */ -proto.node.StorageStat.HostStats.prototype.getVersionScore = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.StorageStat.HostStats} returns this - */ -proto.node.StorageStat.HostStats.prototype.setVersionScore = function(value) { - return jspb.Message.setProto3FloatField(this, 5, value); -}; - - -/** - * optional float speed_score = 6; - * @return {number} - */ -proto.node.StorageStat.HostStats.prototype.getSpeedScore = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 6, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.StorageStat.HostStats} returns this - */ -proto.node.StorageStat.HostStats.prototype.setSpeedScore = function(value) { - return jspb.Message.setProto3FloatField(this, 6, value); -}; - - -/** - * optional float upload_speed_score = 7; - * @return {number} - */ -proto.node.StorageStat.HostStats.prototype.getUploadSpeedScore = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 7, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.StorageStat.HostStats} returns this - */ -proto.node.StorageStat.HostStats.prototype.setUploadSpeedScore = function(value) { - return jspb.Message.setProto3FloatField(this, 7, value); -}; - - -/** - * optional float download_speed_score = 8; - * @return {number} - */ -proto.node.StorageStat.HostStats.prototype.getDownloadSpeedScore = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 8, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.StorageStat.HostStats} returns this - */ -proto.node.StorageStat.HostStats.prototype.setDownloadSpeedScore = function(value) { - return jspb.Message.setProto3FloatField(this, 8, value); -}; - - -/** - * optional float uptime_weight = 9; - * @return {number} - */ -proto.node.StorageStat.HostStats.prototype.getUptimeWeight = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 9, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.StorageStat.HostStats} returns this - */ -proto.node.StorageStat.HostStats.prototype.setUptimeWeight = function(value) { - return jspb.Message.setProto3FloatField(this, 9, value); -}; - - -/** - * optional float age_weight = 10; - * @return {number} - */ -proto.node.StorageStat.HostStats.prototype.getAgeWeight = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 10, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.StorageStat.HostStats} returns this - */ -proto.node.StorageStat.HostStats.prototype.setAgeWeight = function(value) { - return jspb.Message.setProto3FloatField(this, 10, value); -}; - - -/** - * optional float version_weight = 11; - * @return {number} - */ -proto.node.StorageStat.HostStats.prototype.getVersionWeight = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 11, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.StorageStat.HostStats} returns this - */ -proto.node.StorageStat.HostStats.prototype.setVersionWeight = function(value) { - return jspb.Message.setProto3FloatField(this, 11, value); -}; - - -/** - * optional float speed_weight = 12; - * @return {number} - */ -proto.node.StorageStat.HostStats.prototype.getSpeedWeight = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 12, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.StorageStat.HostStats} returns this - */ -proto.node.StorageStat.HostStats.prototype.setSpeedWeight = function(value) { - return jspb.Message.setProto3FloatField(this, 12, value); -}; - - -/** - * optional float upload_speed_weight = 13; - * @return {number} - */ -proto.node.StorageStat.HostStats.prototype.getUploadSpeedWeight = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 13, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.StorageStat.HostStats} returns this - */ -proto.node.StorageStat.HostStats.prototype.setUploadSpeedWeight = function(value) { - return jspb.Message.setProto3FloatField(this, 13, value); -}; - - -/** - * optional float download_speed_weight = 14; - * @return {number} - */ -proto.node.StorageStat.HostStats.prototype.getDownloadSpeedWeight = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 14, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.StorageStat.HostStats} returns this - */ -proto.node.StorageStat.HostStats.prototype.setDownloadSpeedWeight = function(value) { - return jspb.Message.setProto3FloatField(this, 14, value); -}; - - -/** - * optional google.protobuf.Timestamp last_updated = 15; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.node.StorageStat.HostStats.prototype.getLastUpdated = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 15)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.node.StorageStat.HostStats} returns this -*/ -proto.node.StorageStat.HostStats.prototype.setLastUpdated = function(value) { - return jspb.Message.setWrapperField(this, 15, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.node.StorageStat.HostStats} returns this - */ -proto.node.StorageStat.HostStats.prototype.clearLastUpdated = function() { - return this.setLastUpdated(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.node.StorageStat.HostStats.prototype.hasLastUpdated = function() { - return jspb.Message.getField(this, 15) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.node.StorageStat.Host.prototype.toObject = function(opt_includeInstance) { - return proto.node.StorageStat.Host.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.node.StorageStat.Host} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.StorageStat.Host.toObject = function(includeInstance, msg) { - var f, obj = { - online: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - storageUsed: jspb.Message.getFieldWithDefault(msg, 2, 0), - storageCap: jspb.Message.getFieldWithDefault(msg, 3, 0), - storageDiskTotal: jspb.Message.getFieldWithDefault(msg, 4, 0), - storageDiskAvailable: jspb.Message.getFieldWithDefault(msg, 5, 0), - stats: (f = msg.getStats()) && proto.node.StorageStat.HostStats.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.node.StorageStat.Host} - */ -proto.node.StorageStat.Host.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.node.StorageStat.Host; - return proto.node.StorageStat.Host.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.node.StorageStat.Host} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.node.StorageStat.Host} - */ -proto.node.StorageStat.Host.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.setOnline(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setStorageUsed(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setStorageCap(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setStorageDiskTotal(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setStorageDiskAvailable(value); - break; - case 6: - var value = new proto.node.StorageStat.HostStats; - reader.readMessage(value,proto.node.StorageStat.HostStats.deserializeBinaryFromReader); - msg.setStats(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.node.StorageStat.Host.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.node.StorageStat.Host.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.node.StorageStat.Host} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.StorageStat.Host.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOnline(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getStorageUsed(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getStorageCap(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getStorageDiskTotal(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getStorageDiskAvailable(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getStats(); - if (f != null) { - writer.writeMessage( - 6, - f, - proto.node.StorageStat.HostStats.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bool online = 1; - * @return {boolean} - */ -proto.node.StorageStat.Host.prototype.getOnline = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.node.StorageStat.Host} returns this - */ -proto.node.StorageStat.Host.prototype.setOnline = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - -/** - * optional int64 storage_used = 2; - * @return {number} - */ -proto.node.StorageStat.Host.prototype.getStorageUsed = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.StorageStat.Host} returns this - */ -proto.node.StorageStat.Host.prototype.setStorageUsed = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int64 storage_cap = 3; - * @return {number} - */ -proto.node.StorageStat.Host.prototype.getStorageCap = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.StorageStat.Host} returns this - */ -proto.node.StorageStat.Host.prototype.setStorageCap = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int64 storage_disk_total = 4; - * @return {number} - */ -proto.node.StorageStat.Host.prototype.getStorageDiskTotal = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.StorageStat.Host} returns this - */ -proto.node.StorageStat.Host.prototype.setStorageDiskTotal = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional int64 storage_disk_available = 5; - * @return {number} - */ -proto.node.StorageStat.Host.prototype.getStorageDiskAvailable = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.StorageStat.Host} returns this - */ -proto.node.StorageStat.Host.prototype.setStorageDiskAvailable = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional HostStats stats = 6; - * @return {?proto.node.StorageStat.HostStats} - */ -proto.node.StorageStat.Host.prototype.getStats = function() { - return /** @type{?proto.node.StorageStat.HostStats} */ ( - jspb.Message.getWrapperField(this, proto.node.StorageStat.HostStats, 6)); -}; - - -/** - * @param {?proto.node.StorageStat.HostStats|undefined} value - * @return {!proto.node.StorageStat.Host} returns this -*/ -proto.node.StorageStat.Host.prototype.setStats = function(value) { - return jspb.Message.setWrapperField(this, 6, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.node.StorageStat.Host} returns this - */ -proto.node.StorageStat.Host.prototype.clearStats = function() { - return this.setStats(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.node.StorageStat.Host.prototype.hasStats = function() { - return jspb.Message.getField(this, 6) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.node.StorageStat.Renter.prototype.toObject = function(opt_includeInstance) { - return proto.node.StorageStat.Renter.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.node.StorageStat.Renter} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.StorageStat.Renter.toObject = function(includeInstance, msg) { - var f, obj = { - reserved: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.node.StorageStat.Renter} - */ -proto.node.StorageStat.Renter.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.node.StorageStat.Renter; - return proto.node.StorageStat.Renter.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.node.StorageStat.Renter} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.node.StorageStat.Renter} - */ -proto.node.StorageStat.Renter.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.setReserved(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.node.StorageStat.Renter.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.node.StorageStat.Renter.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.node.StorageStat.Renter} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.StorageStat.Renter.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getReserved(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string reserved = 1; - * @return {string} - */ -proto.node.StorageStat.Renter.prototype.getReserved = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.node.StorageStat.Renter} returns this - */ -proto.node.StorageStat.Renter.prototype.setReserved = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional Host host_stats = 1; - * @return {?proto.node.StorageStat.Host} - */ -proto.node.StorageStat.prototype.getHostStats = function() { - return /** @type{?proto.node.StorageStat.Host} */ ( - jspb.Message.getWrapperField(this, proto.node.StorageStat.Host, 1)); -}; - - -/** - * @param {?proto.node.StorageStat.Host|undefined} value - * @return {!proto.node.StorageStat} returns this -*/ -proto.node.StorageStat.prototype.setHostStats = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.node.StorageStat} returns this - */ -proto.node.StorageStat.prototype.clearHostStats = function() { - return this.setHostStats(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.node.StorageStat.prototype.hasHostStats = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional Renter renter_stats = 2; - * @return {?proto.node.StorageStat.Renter} - */ -proto.node.StorageStat.prototype.getRenterStats = function() { - return /** @type{?proto.node.StorageStat.Renter} */ ( - jspb.Message.getWrapperField(this, proto.node.StorageStat.Renter, 2)); -}; - - -/** - * @param {?proto.node.StorageStat.Renter|undefined} value - * @return {!proto.node.StorageStat} returns this -*/ -proto.node.StorageStat.prototype.setRenterStats = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.node.StorageStat} returns this - */ -proto.node.StorageStat.prototype.clearRenterStats = function() { - return this.setRenterStats(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.node.StorageStat.prototype.hasRenterStats = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.node.ContractStat.prototype.toObject = function(opt_includeInstance) { - return proto.node.ContractStat.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.node.ContractStat} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.ContractStat.toObject = function(includeInstance, msg) { - var f, obj = { - activeContractNum: jspb.Message.getFieldWithDefault(msg, 1, 0), - compensationPaid: jspb.Message.getFieldWithDefault(msg, 2, 0), - compensationOutstanding: jspb.Message.getFieldWithDefault(msg, 3, 0), - firstContractStart: (f = msg.getFirstContractStart()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - lastContractEnd: (f = msg.getLastContractEnd()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - role: jspb.Message.getFieldWithDefault(msg, 6, 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.node.ContractStat} - */ -proto.node.ContractStat.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.node.ContractStat; - return proto.node.ContractStat.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.node.ContractStat} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.node.ContractStat} - */ -proto.node.ContractStat.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.setActiveContractNum(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCompensationPaid(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCompensationOutstanding(value); - break; - case 4: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setFirstContractStart(value); - break; - case 5: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setLastContractEnd(value); - break; - case 6: - var value = /** @type {!proto.node.ContractStat.Role} */ (reader.readEnum()); - msg.setRole(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.node.ContractStat.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.node.ContractStat.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.node.ContractStat} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.ContractStat.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getActiveContractNum(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getCompensationPaid(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getCompensationOutstanding(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getFirstContractStart(); - if (f != null) { - writer.writeMessage( - 4, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getLastContractEnd(); - if (f != null) { - writer.writeMessage( - 5, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getRole(); - if (f !== 0.0) { - writer.writeEnum( - 6, - f - ); - } -}; - - -/** - * @enum {number} - */ -proto.node.ContractStat.Role = { - HOST: 0, - RENTER: 1, - RESERVED: 2 -}; - -/** - * optional int64 active_contract_num = 1; - * @return {number} - */ -proto.node.ContractStat.prototype.getActiveContractNum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.ContractStat} returns this - */ -proto.node.ContractStat.prototype.setActiveContractNum = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int64 compensation_paid = 2; - * @return {number} - */ -proto.node.ContractStat.prototype.getCompensationPaid = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.ContractStat} returns this - */ -proto.node.ContractStat.prototype.setCompensationPaid = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int64 compensation_outstanding = 3; - * @return {number} - */ -proto.node.ContractStat.prototype.getCompensationOutstanding = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.ContractStat} returns this - */ -proto.node.ContractStat.prototype.setCompensationOutstanding = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional google.protobuf.Timestamp first_contract_start = 4; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.node.ContractStat.prototype.getFirstContractStart = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.node.ContractStat} returns this -*/ -proto.node.ContractStat.prototype.setFirstContractStart = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.node.ContractStat} returns this - */ -proto.node.ContractStat.prototype.clearFirstContractStart = function() { - return this.setFirstContractStart(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.node.ContractStat.prototype.hasFirstContractStart = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional google.protobuf.Timestamp last_contract_end = 5; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.node.ContractStat.prototype.getLastContractEnd = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.node.ContractStat} returns this -*/ -proto.node.ContractStat.prototype.setLastContractEnd = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.node.ContractStat} returns this - */ -proto.node.ContractStat.prototype.clearLastContractEnd = function() { - return this.setLastContractEnd(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.node.ContractStat.prototype.hasLastContractEnd = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional Role role = 6; - * @return {!proto.node.ContractStat.Role} - */ -proto.node.ContractStat.prototype.getRole = function() { - return /** @type {!proto.node.ContractStat.Role} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {!proto.node.ContractStat.Role} value - * @return {!proto.node.ContractStat} returns this - */ -proto.node.ContractStat.prototype.setRole = function(value) { - return jspb.Message.setProto3EnumField(this, 6, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.node.Contracts.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.node.Contracts.prototype.toObject = function(opt_includeInstance) { - return proto.node.Contracts.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.node.Contracts} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.Contracts.toObject = function(includeInstance, msg) { - var f, obj = { - contractsList: jspb.Message.toObjectList(msg.getContractsList(), - proto.node.Contracts.Contract.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.node.Contracts} - */ -proto.node.Contracts.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.node.Contracts; - return proto.node.Contracts.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.node.Contracts} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.node.Contracts} - */ -proto.node.Contracts.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.node.Contracts.Contract; - reader.readMessage(value,proto.node.Contracts.Contract.deserializeBinaryFromReader); - msg.addContracts(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.node.Contracts.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.node.Contracts.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.node.Contracts} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.Contracts.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getContractsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.node.Contracts.Contract.serializeBinaryToWriter - ); - } -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.node.Contracts.Contract.prototype.toObject = function(opt_includeInstance) { - return proto.node.Contracts.Contract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.node.Contracts.Contract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.Contracts.Contract.toObject = function(includeInstance, msg) { - var f, obj = { - contractId: jspb.Message.getFieldWithDefault(msg, 1, ""), - hostId: jspb.Message.getFieldWithDefault(msg, 2, ""), - renterId: jspb.Message.getFieldWithDefault(msg, 3, ""), - status: jspb.Message.getFieldWithDefault(msg, 4, 0), - startTime: (f = msg.getStartTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - endTime: (f = msg.getEndTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - nextEscrowTime: (f = msg.getNextEscrowTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - compensationPaid: jspb.Message.getFieldWithDefault(msg, 8, 0), - compensationOutstanding: jspb.Message.getFieldWithDefault(msg, 9, 0), - unitPrice: jspb.Message.getFieldWithDefault(msg, 10, 0), - shardSize: jspb.Message.getFieldWithDefault(msg, 11, 0), - shardHash: jspb.Message.getFieldWithDefault(msg, 12, ""), - fileHash: jspb.Message.getFieldWithDefault(msg, 13, ""), - lastModifyTime: (f = msg.getLastModifyTime()) && google_protobuf_timestamp_pb.Timestamp.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.node.Contracts.Contract} - */ -proto.node.Contracts.Contract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.node.Contracts.Contract; - return proto.node.Contracts.Contract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.node.Contracts.Contract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.node.Contracts.Contract} - */ -proto.node.Contracts.Contract.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.setContractId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setHostId(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setRenterId(value); - break; - case 4: - var value = /** @type {!proto.guard.Contract.ContractState} */ (reader.readEnum()); - msg.setStatus(value); - break; - case 5: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setStartTime(value); - break; - case 6: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setEndTime(value); - break; - case 7: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setNextEscrowTime(value); - break; - case 8: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCompensationPaid(value); - break; - case 9: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCompensationOutstanding(value); - break; - case 10: - var value = /** @type {number} */ (reader.readInt64()); - msg.setUnitPrice(value); - break; - case 11: - var value = /** @type {number} */ (reader.readInt64()); - msg.setShardSize(value); - break; - case 12: - var value = /** @type {string} */ (reader.readString()); - msg.setShardHash(value); - break; - case 13: - var value = /** @type {string} */ (reader.readString()); - msg.setFileHash(value); - break; - case 14: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setLastModifyTime(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.node.Contracts.Contract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.node.Contracts.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.node.Contracts.Contract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.Contracts.Contract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getContractId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getHostId(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getRenterId(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getStatus(); - if (f !== 0.0) { - writer.writeEnum( - 4, - f - ); - } - f = message.getStartTime(); - if (f != null) { - writer.writeMessage( - 5, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getEndTime(); - if (f != null) { - writer.writeMessage( - 6, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getNextEscrowTime(); - if (f != null) { - writer.writeMessage( - 7, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getCompensationPaid(); - if (f !== 0) { - writer.writeInt64( - 8, - f - ); - } - f = message.getCompensationOutstanding(); - if (f !== 0) { - writer.writeInt64( - 9, - f - ); - } - f = message.getUnitPrice(); - if (f !== 0) { - writer.writeInt64( - 10, - f - ); - } - f = message.getShardSize(); - if (f !== 0) { - writer.writeInt64( - 11, - f - ); - } - f = message.getShardHash(); - if (f.length > 0) { - writer.writeString( - 12, - f - ); - } - f = message.getFileHash(); - if (f.length > 0) { - writer.writeString( - 13, - f - ); - } - f = message.getLastModifyTime(); - if (f != null) { - writer.writeMessage( - 14, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string contract_id = 1; - * @return {string} - */ -proto.node.Contracts.Contract.prototype.getContractId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.node.Contracts.Contract} returns this - */ -proto.node.Contracts.Contract.prototype.setContractId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string host_id = 2; - * @return {string} - */ -proto.node.Contracts.Contract.prototype.getHostId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.node.Contracts.Contract} returns this - */ -proto.node.Contracts.Contract.prototype.setHostId = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string renter_id = 3; - * @return {string} - */ -proto.node.Contracts.Contract.prototype.getRenterId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.node.Contracts.Contract} returns this - */ -proto.node.Contracts.Contract.prototype.setRenterId = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional guard.Contract.ContractState status = 4; - * @return {!proto.guard.Contract.ContractState} - */ -proto.node.Contracts.Contract.prototype.getStatus = function() { - return /** @type {!proto.guard.Contract.ContractState} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {!proto.guard.Contract.ContractState} value - * @return {!proto.node.Contracts.Contract} returns this - */ -proto.node.Contracts.Contract.prototype.setStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 4, value); -}; - - -/** - * optional google.protobuf.Timestamp start_time = 5; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.node.Contracts.Contract.prototype.getStartTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.node.Contracts.Contract} returns this -*/ -proto.node.Contracts.Contract.prototype.setStartTime = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.node.Contracts.Contract} returns this - */ -proto.node.Contracts.Contract.prototype.clearStartTime = function() { - return this.setStartTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.node.Contracts.Contract.prototype.hasStartTime = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional google.protobuf.Timestamp end_time = 6; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.node.Contracts.Contract.prototype.getEndTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.node.Contracts.Contract} returns this -*/ -proto.node.Contracts.Contract.prototype.setEndTime = function(value) { - return jspb.Message.setWrapperField(this, 6, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.node.Contracts.Contract} returns this - */ -proto.node.Contracts.Contract.prototype.clearEndTime = function() { - return this.setEndTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.node.Contracts.Contract.prototype.hasEndTime = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * optional google.protobuf.Timestamp next_escrow_time = 7; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.node.Contracts.Contract.prototype.getNextEscrowTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 7)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.node.Contracts.Contract} returns this -*/ -proto.node.Contracts.Contract.prototype.setNextEscrowTime = function(value) { - return jspb.Message.setWrapperField(this, 7, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.node.Contracts.Contract} returns this - */ -proto.node.Contracts.Contract.prototype.clearNextEscrowTime = function() { - return this.setNextEscrowTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.node.Contracts.Contract.prototype.hasNextEscrowTime = function() { - return jspb.Message.getField(this, 7) != null; -}; - - -/** - * optional int64 compensation_paid = 8; - * @return {number} - */ -proto.node.Contracts.Contract.prototype.getCompensationPaid = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.Contracts.Contract} returns this - */ -proto.node.Contracts.Contract.prototype.setCompensationPaid = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional int64 compensation_outstanding = 9; - * @return {number} - */ -proto.node.Contracts.Contract.prototype.getCompensationOutstanding = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.Contracts.Contract} returns this - */ -proto.node.Contracts.Contract.prototype.setCompensationOutstanding = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * optional int64 unit_price = 10; - * @return {number} - */ -proto.node.Contracts.Contract.prototype.getUnitPrice = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.Contracts.Contract} returns this - */ -proto.node.Contracts.Contract.prototype.setUnitPrice = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); -}; - - -/** - * optional int64 shard_size = 11; - * @return {number} - */ -proto.node.Contracts.Contract.prototype.getShardSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.Contracts.Contract} returns this - */ -proto.node.Contracts.Contract.prototype.setShardSize = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); -}; - - -/** - * optional string shard_hash = 12; - * @return {string} - */ -proto.node.Contracts.Contract.prototype.getShardHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); -}; - - -/** - * @param {string} value - * @return {!proto.node.Contracts.Contract} returns this - */ -proto.node.Contracts.Contract.prototype.setShardHash = function(value) { - return jspb.Message.setProto3StringField(this, 12, value); -}; - - -/** - * optional string file_hash = 13; - * @return {string} - */ -proto.node.Contracts.Contract.prototype.getFileHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, "")); -}; - - -/** - * @param {string} value - * @return {!proto.node.Contracts.Contract} returns this - */ -proto.node.Contracts.Contract.prototype.setFileHash = function(value) { - return jspb.Message.setProto3StringField(this, 13, value); -}; - - -/** - * optional google.protobuf.Timestamp last_modify_time = 14; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.node.Contracts.Contract.prototype.getLastModifyTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 14)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.node.Contracts.Contract} returns this -*/ -proto.node.Contracts.Contract.prototype.setLastModifyTime = function(value) { - return jspb.Message.setWrapperField(this, 14, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.node.Contracts.Contract} returns this - */ -proto.node.Contracts.Contract.prototype.clearLastModifyTime = function() { - return this.setLastModifyTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.node.Contracts.Contract.prototype.hasLastModifyTime = function() { - return jspb.Message.getField(this, 14) != null; -}; - - -/** - * repeated Contract contracts = 1; - * @return {!Array} - */ -proto.node.Contracts.prototype.getContractsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.node.Contracts.Contract, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.node.Contracts} returns this -*/ -proto.node.Contracts.prototype.setContractsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.node.Contracts.Contract=} opt_value - * @param {number=} opt_index - * @return {!proto.node.Contracts.Contract} - */ -proto.node.Contracts.prototype.addContracts = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.node.Contracts.Contract, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.node.Contracts} returns this - */ -proto.node.Contracts.prototype.clearContractsList = function() { - return this.setContractsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.node.BtfsScanTab.prototype.toObject = function(opt_includeInstance) { - return proto.node.BtfsScanTab.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.node.BtfsScanTab} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.BtfsScanTab.toObject = function(includeInstance, msg) { - var f, obj = { - tableName: jspb.Message.getFieldWithDefault(msg, 1, ""), - storageVolumeLeft: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), - onlineMinersNumber: jspb.Message.getFieldWithDefault(msg, 3, 0), - countryDistributeMap: (f = msg.getCountryDistributeMap()) ? f.toObject(includeInstance, undefined) : [], - scoreDistributeMap: (f = msg.getScoreDistributeMap()) ? f.toObject(includeInstance, undefined) : [], - timeCreated: (f = msg.getTimeCreated()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - storageAlreadyUsed: jspb.Message.getFloatingPointFieldWithDefault(msg, 7, 0.0), - price: jspb.Message.getFloatingPointFieldWithDefault(msg, 8, 0.0), - dateCreated: (f = msg.getDateCreated()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - newRank: jspb.Message.getFieldWithDefault(msg, 10, ""), - totalRank: jspb.Message.getFieldWithDefault(msg, 11, ""), - contractAllCount: jspb.Message.getFieldWithDefault(msg, 12, 0), - contractFailCount: jspb.Message.getFieldWithDefault(msg, 13, 0), - contractAllStorage: jspb.Message.getFloatingPointFieldWithDefault(msg, 14, 0.0), - contractFailStorage: jspb.Message.getFloatingPointFieldWithDefault(msg, 15, 0.0), - storageLeftWhenContract: jspb.Message.getFloatingPointFieldWithDefault(msg, 16, 0.0), - superOnlineMinersCount: jspb.Message.getFieldWithDefault(msg, 17, 0), - newOnlineMinersCount: jspb.Message.getFieldWithDefault(msg, 18, 0), - minersAllAmount: jspb.Message.getFieldWithDefault(msg, 19, 0), - totalMiners: jspb.Message.getFieldWithDefault(msg, 20, 0), - bigMiners: jspb.Message.getFieldWithDefault(msg, 21, 0), - versionDistributeMap: (f = msg.getVersionDistributeMap()) ? 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.node.BtfsScanTab} - */ -proto.node.BtfsScanTab.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.node.BtfsScanTab; - return proto.node.BtfsScanTab.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.node.BtfsScanTab} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.node.BtfsScanTab} - */ -proto.node.BtfsScanTab.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.setTableName(value); - break; - case 2: - var value = /** @type {number} */ (reader.readDouble()); - msg.setStorageVolumeLeft(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setOnlineMinersNumber(value); - break; - case 4: - var value = msg.getCountryDistributeMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt32, null, "", 0); - }); - break; - case 5: - var value = msg.getScoreDistributeMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt32, null, "", 0); - }); - break; - case 6: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setTimeCreated(value); - break; - case 7: - var value = /** @type {number} */ (reader.readDouble()); - msg.setStorageAlreadyUsed(value); - break; - case 8: - var value = /** @type {number} */ (reader.readDouble()); - msg.setPrice(value); - break; - case 9: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setDateCreated(value); - break; - case 10: - var value = /** @type {string} */ (reader.readString()); - msg.setNewRank(value); - break; - case 11: - var value = /** @type {string} */ (reader.readString()); - msg.setTotalRank(value); - break; - case 12: - var value = /** @type {number} */ (reader.readUint32()); - msg.setContractAllCount(value); - break; - case 13: - var value = /** @type {number} */ (reader.readUint32()); - msg.setContractFailCount(value); - break; - case 14: - var value = /** @type {number} */ (reader.readDouble()); - msg.setContractAllStorage(value); - break; - case 15: - var value = /** @type {number} */ (reader.readDouble()); - msg.setContractFailStorage(value); - break; - case 16: - var value = /** @type {number} */ (reader.readDouble()); - msg.setStorageLeftWhenContract(value); - break; - case 17: - var value = /** @type {number} */ (reader.readUint32()); - msg.setSuperOnlineMinersCount(value); - break; - case 18: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNewOnlineMinersCount(value); - break; - case 19: - var value = /** @type {number} */ (reader.readInt64()); - msg.setMinersAllAmount(value); - break; - case 20: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalMiners(value); - break; - case 21: - var value = /** @type {number} */ (reader.readInt64()); - msg.setBigMiners(value); - break; - case 22: - var value = msg.getVersionDistributeMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt32, null, "", 0); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.node.BtfsScanTab.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.node.BtfsScanTab.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.node.BtfsScanTab} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.BtfsScanTab.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTableName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getStorageVolumeLeft(); - if (f !== 0.0) { - writer.writeDouble( - 2, - f - ); - } - f = message.getOnlineMinersNumber(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } - f = message.getCountryDistributeMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt32); - } - f = message.getScoreDistributeMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt32); - } - f = message.getTimeCreated(); - if (f != null) { - writer.writeMessage( - 6, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getStorageAlreadyUsed(); - if (f !== 0.0) { - writer.writeDouble( - 7, - f - ); - } - f = message.getPrice(); - if (f !== 0.0) { - writer.writeDouble( - 8, - f - ); - } - f = message.getDateCreated(); - if (f != null) { - writer.writeMessage( - 9, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getNewRank(); - if (f.length > 0) { - writer.writeString( - 10, - f - ); - } - f = message.getTotalRank(); - if (f.length > 0) { - writer.writeString( - 11, - f - ); - } - f = message.getContractAllCount(); - if (f !== 0) { - writer.writeUint32( - 12, - f - ); - } - f = message.getContractFailCount(); - if (f !== 0) { - writer.writeUint32( - 13, - f - ); - } - f = message.getContractAllStorage(); - if (f !== 0.0) { - writer.writeDouble( - 14, - f - ); - } - f = message.getContractFailStorage(); - if (f !== 0.0) { - writer.writeDouble( - 15, - f - ); - } - f = message.getStorageLeftWhenContract(); - if (f !== 0.0) { - writer.writeDouble( - 16, - f - ); - } - f = message.getSuperOnlineMinersCount(); - if (f !== 0) { - writer.writeUint32( - 17, - f - ); - } - f = message.getNewOnlineMinersCount(); - if (f !== 0) { - writer.writeUint32( - 18, - f - ); - } - f = message.getMinersAllAmount(); - if (f !== 0) { - writer.writeInt64( - 19, - f - ); - } - f = message.getTotalMiners(); - if (f !== 0) { - writer.writeInt64( - 20, - f - ); - } - f = message.getBigMiners(); - if (f !== 0) { - writer.writeInt64( - 21, - f - ); - } - f = message.getVersionDistributeMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(22, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt32); - } -}; - - -/** - * optional string table_name = 1; - * @return {string} - */ -proto.node.BtfsScanTab.prototype.getTableName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.node.BtfsScanTab} returns this - */ -proto.node.BtfsScanTab.prototype.setTableName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional double storage_volume_left = 2; - * @return {number} - */ -proto.node.BtfsScanTab.prototype.getStorageVolumeLeft = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.BtfsScanTab} returns this - */ -proto.node.BtfsScanTab.prototype.setStorageVolumeLeft = function(value) { - return jspb.Message.setProto3FloatField(this, 2, value); -}; - - -/** - * optional uint32 online_miners_number = 3; - * @return {number} - */ -proto.node.BtfsScanTab.prototype.getOnlineMinersNumber = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.BtfsScanTab} returns this - */ -proto.node.BtfsScanTab.prototype.setOnlineMinersNumber = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * map country_distribute = 4; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.node.BtfsScanTab.prototype.getCountryDistributeMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 4, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.node.BtfsScanTab} returns this - */ -proto.node.BtfsScanTab.prototype.clearCountryDistributeMap = function() { - this.getCountryDistributeMap().clear(); - return this;}; - - -/** - * map score_distribute = 5; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.node.BtfsScanTab.prototype.getScoreDistributeMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 5, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.node.BtfsScanTab} returns this - */ -proto.node.BtfsScanTab.prototype.clearScoreDistributeMap = function() { - this.getScoreDistributeMap().clear(); - return this;}; - - -/** - * optional google.protobuf.Timestamp time_created = 6; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.node.BtfsScanTab.prototype.getTimeCreated = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.node.BtfsScanTab} returns this -*/ -proto.node.BtfsScanTab.prototype.setTimeCreated = function(value) { - return jspb.Message.setWrapperField(this, 6, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.node.BtfsScanTab} returns this - */ -proto.node.BtfsScanTab.prototype.clearTimeCreated = function() { - return this.setTimeCreated(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.node.BtfsScanTab.prototype.hasTimeCreated = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * optional double storage_already_used = 7; - * @return {number} - */ -proto.node.BtfsScanTab.prototype.getStorageAlreadyUsed = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 7, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.BtfsScanTab} returns this - */ -proto.node.BtfsScanTab.prototype.setStorageAlreadyUsed = function(value) { - return jspb.Message.setProto3FloatField(this, 7, value); -}; - - -/** - * optional double price = 8; - * @return {number} - */ -proto.node.BtfsScanTab.prototype.getPrice = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 8, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.BtfsScanTab} returns this - */ -proto.node.BtfsScanTab.prototype.setPrice = function(value) { - return jspb.Message.setProto3FloatField(this, 8, value); -}; - - -/** - * optional google.protobuf.Timestamp date_created = 9; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.node.BtfsScanTab.prototype.getDateCreated = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 9)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.node.BtfsScanTab} returns this -*/ -proto.node.BtfsScanTab.prototype.setDateCreated = function(value) { - return jspb.Message.setWrapperField(this, 9, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.node.BtfsScanTab} returns this - */ -proto.node.BtfsScanTab.prototype.clearDateCreated = function() { - return this.setDateCreated(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.node.BtfsScanTab.prototype.hasDateCreated = function() { - return jspb.Message.getField(this, 9) != null; -}; - - -/** - * optional string new_rank = 10; - * @return {string} - */ -proto.node.BtfsScanTab.prototype.getNewRank = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); -}; - - -/** - * @param {string} value - * @return {!proto.node.BtfsScanTab} returns this - */ -proto.node.BtfsScanTab.prototype.setNewRank = function(value) { - return jspb.Message.setProto3StringField(this, 10, value); -}; - - -/** - * optional string total_rank = 11; - * @return {string} - */ -proto.node.BtfsScanTab.prototype.getTotalRank = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); -}; - - -/** - * @param {string} value - * @return {!proto.node.BtfsScanTab} returns this - */ -proto.node.BtfsScanTab.prototype.setTotalRank = function(value) { - return jspb.Message.setProto3StringField(this, 11, value); -}; - - -/** - * optional uint32 contract_all_count = 12; - * @return {number} - */ -proto.node.BtfsScanTab.prototype.getContractAllCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.BtfsScanTab} returns this - */ -proto.node.BtfsScanTab.prototype.setContractAllCount = function(value) { - return jspb.Message.setProto3IntField(this, 12, value); -}; - - -/** - * optional uint32 contract_fail_count = 13; - * @return {number} - */ -proto.node.BtfsScanTab.prototype.getContractFailCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.BtfsScanTab} returns this - */ -proto.node.BtfsScanTab.prototype.setContractFailCount = function(value) { - return jspb.Message.setProto3IntField(this, 13, value); -}; - - -/** - * optional double contract_all_storage = 14; - * @return {number} - */ -proto.node.BtfsScanTab.prototype.getContractAllStorage = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 14, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.BtfsScanTab} returns this - */ -proto.node.BtfsScanTab.prototype.setContractAllStorage = function(value) { - return jspb.Message.setProto3FloatField(this, 14, value); -}; - - -/** - * optional double contract_fail_storage = 15; - * @return {number} - */ -proto.node.BtfsScanTab.prototype.getContractFailStorage = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 15, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.BtfsScanTab} returns this - */ -proto.node.BtfsScanTab.prototype.setContractFailStorage = function(value) { - return jspb.Message.setProto3FloatField(this, 15, value); -}; - - -/** - * optional double storage_left_when_contract = 16; - * @return {number} - */ -proto.node.BtfsScanTab.prototype.getStorageLeftWhenContract = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 16, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.BtfsScanTab} returns this - */ -proto.node.BtfsScanTab.prototype.setStorageLeftWhenContract = function(value) { - return jspb.Message.setProto3FloatField(this, 16, value); -}; - - -/** - * optional uint32 super_online_miners_count = 17; - * @return {number} - */ -proto.node.BtfsScanTab.prototype.getSuperOnlineMinersCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 17, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.BtfsScanTab} returns this - */ -proto.node.BtfsScanTab.prototype.setSuperOnlineMinersCount = function(value) { - return jspb.Message.setProto3IntField(this, 17, value); -}; - - -/** - * optional uint32 new_online_miners_count = 18; - * @return {number} - */ -proto.node.BtfsScanTab.prototype.getNewOnlineMinersCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 18, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.BtfsScanTab} returns this - */ -proto.node.BtfsScanTab.prototype.setNewOnlineMinersCount = function(value) { - return jspb.Message.setProto3IntField(this, 18, value); -}; - - -/** - * optional int64 miners_all_amount = 19; - * @return {number} - */ -proto.node.BtfsScanTab.prototype.getMinersAllAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.BtfsScanTab} returns this - */ -proto.node.BtfsScanTab.prototype.setMinersAllAmount = function(value) { - return jspb.Message.setProto3IntField(this, 19, value); -}; - - -/** - * optional int64 total_miners = 20; - * @return {number} - */ -proto.node.BtfsScanTab.prototype.getTotalMiners = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.BtfsScanTab} returns this - */ -proto.node.BtfsScanTab.prototype.setTotalMiners = function(value) { - return jspb.Message.setProto3IntField(this, 20, value); -}; - - -/** - * optional int64 big_miners = 21; - * @return {number} - */ -proto.node.BtfsScanTab.prototype.getBigMiners = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.BtfsScanTab} returns this - */ -proto.node.BtfsScanTab.prototype.setBigMiners = function(value) { - return jspb.Message.setProto3IntField(this, 21, value); -}; - - -/** - * map version_distribute = 22; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.node.BtfsScanTab.prototype.getVersionDistributeMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 22, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.node.BtfsScanTab} returns this - */ -proto.node.BtfsScanTab.prototype.clearVersionDistributeMap = function() { - this.getVersionDistributeMap().clear(); - return this;}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.node.ScoreHistoryTab.prototype.toObject = function(opt_includeInstance) { - return proto.node.ScoreHistoryTab.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.node.ScoreHistoryTab} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.ScoreHistoryTab.toObject = function(includeInstance, msg) { - var f, obj = { - tableName: jspb.Message.getFieldWithDefault(msg, 1, ""), - nodeId: jspb.Message.getFieldWithDefault(msg, 2, ""), - storageVolumeCap: jspb.Message.getFieldWithDefault(msg, 3, 0), - storageVolumeLeft: jspb.Message.getFieldWithDefault(msg, 4, 0), - score: jspb.Message.getFieldWithDefault(msg, 5, 0), - dateCreated: (f = msg.getDateCreated()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - timeCreated: (f = msg.getTimeCreated()) && google_protobuf_timestamp_pb.Timestamp.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.node.ScoreHistoryTab} - */ -proto.node.ScoreHistoryTab.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.node.ScoreHistoryTab; - return proto.node.ScoreHistoryTab.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.node.ScoreHistoryTab} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.node.ScoreHistoryTab} - */ -proto.node.ScoreHistoryTab.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.setTableName(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setNodeId(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setStorageVolumeCap(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setStorageVolumeLeft(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setScore(value); - break; - case 6: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setDateCreated(value); - break; - case 7: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setTimeCreated(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.node.ScoreHistoryTab.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.node.ScoreHistoryTab.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.node.ScoreHistoryTab} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.ScoreHistoryTab.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTableName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getNodeId(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getStorageVolumeCap(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } - f = message.getStorageVolumeLeft(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getScore(); - if (f !== 0) { - writer.writeUint32( - 5, - f - ); - } - f = message.getDateCreated(); - if (f != null) { - writer.writeMessage( - 6, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getTimeCreated(); - if (f != null) { - writer.writeMessage( - 7, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string table_name = 1; - * @return {string} - */ -proto.node.ScoreHistoryTab.prototype.getTableName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.node.ScoreHistoryTab} returns this - */ -proto.node.ScoreHistoryTab.prototype.setTableName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string node_id = 2; - * @return {string} - */ -proto.node.ScoreHistoryTab.prototype.getNodeId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.node.ScoreHistoryTab} returns this - */ -proto.node.ScoreHistoryTab.prototype.setNodeId = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional uint64 storage_volume_cap = 3; - * @return {number} - */ -proto.node.ScoreHistoryTab.prototype.getStorageVolumeCap = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.ScoreHistoryTab} returns this - */ -proto.node.ScoreHistoryTab.prototype.setStorageVolumeCap = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint64 storage_volume_left = 4; - * @return {number} - */ -proto.node.ScoreHistoryTab.prototype.getStorageVolumeLeft = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.ScoreHistoryTab} returns this - */ -proto.node.ScoreHistoryTab.prototype.setStorageVolumeLeft = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint32 score = 5; - * @return {number} - */ -proto.node.ScoreHistoryTab.prototype.getScore = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.ScoreHistoryTab} returns this - */ -proto.node.ScoreHistoryTab.prototype.setScore = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional google.protobuf.Timestamp date_created = 6; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.node.ScoreHistoryTab.prototype.getDateCreated = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.node.ScoreHistoryTab} returns this -*/ -proto.node.ScoreHistoryTab.prototype.setDateCreated = function(value) { - return jspb.Message.setWrapperField(this, 6, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.node.ScoreHistoryTab} returns this - */ -proto.node.ScoreHistoryTab.prototype.clearDateCreated = function() { - return this.setDateCreated(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.node.ScoreHistoryTab.prototype.hasDateCreated = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * optional google.protobuf.Timestamp time_created = 7; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.node.ScoreHistoryTab.prototype.getTimeCreated = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 7)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.node.ScoreHistoryTab} returns this -*/ -proto.node.ScoreHistoryTab.prototype.setTimeCreated = function(value) { - return jspb.Message.setWrapperField(this, 7, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.node.ScoreHistoryTab} returns this - */ -proto.node.ScoreHistoryTab.prototype.clearTimeCreated = function() { - return this.setTimeCreated(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.node.ScoreHistoryTab.prototype.hasTimeCreated = function() { - return jspb.Message.getField(this, 7) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.node.AirdropRewardHistoryTab.prototype.toObject = function(opt_includeInstance) { - return proto.node.AirdropRewardHistoryTab.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.node.AirdropRewardHistoryTab} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.AirdropRewardHistoryTab.toObject = function(includeInstance, msg) { - var f, obj = { - tableName: jspb.Message.getFieldWithDefault(msg, 1, ""), - type: jspb.Message.getFieldWithDefault(msg, 2, 0), - nodeId: jspb.Message.getFieldWithDefault(msg, 3, ""), - isSuspect: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), - weight: jspb.Message.getFieldWithDefault(msg, 6, 0), - stake: jspb.Message.getFieldWithDefault(msg, 7, 0), - dateCreated: (f = msg.getDateCreated()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - timeCreated: (f = msg.getTimeCreated()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - fileCount: jspb.Message.getFieldWithDefault(msg, 10, 0), - fileSize: jspb.Message.getFieldWithDefault(msg, 11, 0), - shouldReward: jspb.Message.getFieldWithDefault(msg, 12, 0), - actualReward: jspb.Message.getFieldWithDefault(msg, 13, 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.node.AirdropRewardHistoryTab} - */ -proto.node.AirdropRewardHistoryTab.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.node.AirdropRewardHistoryTab; - return proto.node.AirdropRewardHistoryTab.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.node.AirdropRewardHistoryTab} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.node.AirdropRewardHistoryTab} - */ -proto.node.AirdropRewardHistoryTab.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.setTableName(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setType(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setNodeId(value); - break; - case 5: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsSuspect(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint32()); - msg.setWeight(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint32()); - msg.setStake(value); - break; - case 8: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setDateCreated(value); - break; - case 9: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setTimeCreated(value); - break; - case 10: - var value = /** @type {number} */ (reader.readUint32()); - msg.setFileCount(value); - break; - case 11: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFileSize(value); - break; - case 12: - var value = /** @type {number} */ (reader.readUint64()); - msg.setShouldReward(value); - break; - case 13: - var value = /** @type {number} */ (reader.readUint64()); - msg.setActualReward(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.node.AirdropRewardHistoryTab.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.node.AirdropRewardHistoryTab.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.node.AirdropRewardHistoryTab} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.node.AirdropRewardHistoryTab.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTableName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getType(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getNodeId(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getIsSuspect(); - if (f) { - writer.writeBool( - 5, - f - ); - } - f = message.getWeight(); - if (f !== 0) { - writer.writeUint32( - 6, - f - ); - } - f = message.getStake(); - if (f !== 0) { - writer.writeUint32( - 7, - f - ); - } - f = message.getDateCreated(); - if (f != null) { - writer.writeMessage( - 8, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getTimeCreated(); - if (f != null) { - writer.writeMessage( - 9, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getFileCount(); - if (f !== 0) { - writer.writeUint32( - 10, - f - ); - } - f = message.getFileSize(); - if (f !== 0) { - writer.writeUint64( - 11, - f - ); - } - f = message.getShouldReward(); - if (f !== 0) { - writer.writeUint64( - 12, - f - ); - } - f = message.getActualReward(); - if (f !== 0) { - writer.writeUint64( - 13, - f - ); - } -}; - - -/** - * optional string table_name = 1; - * @return {string} - */ -proto.node.AirdropRewardHistoryTab.prototype.getTableName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.node.AirdropRewardHistoryTab} returns this - */ -proto.node.AirdropRewardHistoryTab.prototype.setTableName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional uint32 type = 2; - * @return {number} - */ -proto.node.AirdropRewardHistoryTab.prototype.getType = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.AirdropRewardHistoryTab} returns this - */ -proto.node.AirdropRewardHistoryTab.prototype.setType = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional string node_id = 3; - * @return {string} - */ -proto.node.AirdropRewardHistoryTab.prototype.getNodeId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.node.AirdropRewardHistoryTab} returns this - */ -proto.node.AirdropRewardHistoryTab.prototype.setNodeId = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional bool is_suspect = 5; - * @return {boolean} - */ -proto.node.AirdropRewardHistoryTab.prototype.getIsSuspect = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.node.AirdropRewardHistoryTab} returns this - */ -proto.node.AirdropRewardHistoryTab.prototype.setIsSuspect = function(value) { - return jspb.Message.setProto3BooleanField(this, 5, value); -}; - - -/** - * optional uint32 weight = 6; - * @return {number} - */ -proto.node.AirdropRewardHistoryTab.prototype.getWeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.AirdropRewardHistoryTab} returns this - */ -proto.node.AirdropRewardHistoryTab.prototype.setWeight = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional uint32 stake = 7; - * @return {number} - */ -proto.node.AirdropRewardHistoryTab.prototype.getStake = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.AirdropRewardHistoryTab} returns this - */ -proto.node.AirdropRewardHistoryTab.prototype.setStake = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional google.protobuf.Timestamp date_created = 8; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.node.AirdropRewardHistoryTab.prototype.getDateCreated = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 8)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.node.AirdropRewardHistoryTab} returns this -*/ -proto.node.AirdropRewardHistoryTab.prototype.setDateCreated = function(value) { - return jspb.Message.setWrapperField(this, 8, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.node.AirdropRewardHistoryTab} returns this - */ -proto.node.AirdropRewardHistoryTab.prototype.clearDateCreated = function() { - return this.setDateCreated(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.node.AirdropRewardHistoryTab.prototype.hasDateCreated = function() { - return jspb.Message.getField(this, 8) != null; -}; - - -/** - * optional google.protobuf.Timestamp time_created = 9; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.node.AirdropRewardHistoryTab.prototype.getTimeCreated = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 9)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.node.AirdropRewardHistoryTab} returns this -*/ -proto.node.AirdropRewardHistoryTab.prototype.setTimeCreated = function(value) { - return jspb.Message.setWrapperField(this, 9, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.node.AirdropRewardHistoryTab} returns this - */ -proto.node.AirdropRewardHistoryTab.prototype.clearTimeCreated = function() { - return this.setTimeCreated(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.node.AirdropRewardHistoryTab.prototype.hasTimeCreated = function() { - return jspb.Message.getField(this, 9) != null; -}; - - -/** - * optional uint32 file_count = 10; - * @return {number} - */ -proto.node.AirdropRewardHistoryTab.prototype.getFileCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.AirdropRewardHistoryTab} returns this - */ -proto.node.AirdropRewardHistoryTab.prototype.setFileCount = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); -}; - - -/** - * optional uint64 file_size = 11; - * @return {number} - */ -proto.node.AirdropRewardHistoryTab.prototype.getFileSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.AirdropRewardHistoryTab} returns this - */ -proto.node.AirdropRewardHistoryTab.prototype.setFileSize = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); -}; - - -/** - * optional uint64 should_reward = 12; - * @return {number} - */ -proto.node.AirdropRewardHistoryTab.prototype.getShouldReward = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.AirdropRewardHistoryTab} returns this - */ -proto.node.AirdropRewardHistoryTab.prototype.setShouldReward = function(value) { - return jspb.Message.setProto3IntField(this, 12, value); -}; - - -/** - * optional uint64 actual_reward = 13; - * @return {number} - */ -proto.node.AirdropRewardHistoryTab.prototype.getActualReward = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.node.AirdropRewardHistoryTab} returns this - */ -proto.node.AirdropRewardHistoryTab.prototype.setActualReward = function(value) { - return jspb.Message.setProto3IntField(this, 13, value); -}; - - -/** - * @enum {number} - */ -proto.node.NodeRole = { - RENTER: 0, - HOST: 1, - REPAIRER: 2, - CHALLENGER: 3, - NETWORK_CHECKER: 4, - REPUTATION_CHECKER: 5, - CDN_PROVIDER: 6, - OTHER: 20 -}; - -/** - * @enum {number} - */ -proto.node.DiscoveryErrorCode = { - SUCCESS: 0, - UNCONNECTED: 1, - TIMEOUT: 2, - ABSOLUTELY_UNOPEN: 3, - OTHER_REASON: 10 -}; - -goog.object.extend(exports, proto.node); diff --git a/js/protos/online/online_pb.js b/js/protos/online/online_pb.js deleted file mode 100644 index c47f5c8..0000000 --- a/js/protos/online/online_pb.js +++ /dev/null @@ -1,1217 +0,0 @@ -// source: protos/online/online.proto -/** - * @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 github_com_bittorrent_go$btfs$common_protos_node_node_pb = require('../../github.com/bittorrent/go-btfs-common/protos/node/node_pb.js'); -goog.object.extend(proto, github_com_bittorrent_go$btfs$common_protos_node_node_pb); -var github_com_tron$us_protobuf_gogoproto_gogo_pb = require('../../github.com/tron-us/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_tron$us_protobuf_gogoproto_gogo_pb); -var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); -goog.object.extend(proto, google_protobuf_timestamp_pb); -goog.exportSymbol('proto.online.PayLoadInfo', null, global); -goog.exportSymbol('proto.online.ReqSignMetrics', null, global); -goog.exportSymbol('proto.online.RespSignMetrics', null, global); -goog.exportSymbol('proto.online.ResponseCode', null, global); -goog.exportSymbol('proto.online.SignedInfo', 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.online.ReqSignMetrics = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.online.ReqSignMetrics, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.online.ReqSignMetrics.displayName = 'proto.online.ReqSignMetrics'; -} -/** - * 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.online.PayLoadInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.online.PayLoadInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.online.PayLoadInfo.displayName = 'proto.online.PayLoadInfo'; -} -/** - * 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.online.RespSignMetrics = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.online.RespSignMetrics, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.online.RespSignMetrics.displayName = 'proto.online.RespSignMetrics'; -} -/** - * 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.online.SignedInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.online.SignedInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.online.SignedInfo.displayName = 'proto.online.SignedInfo'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.online.ReqSignMetrics.prototype.toObject = function(opt_includeInstance) { - return proto.online.ReqSignMetrics.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.online.ReqSignMetrics} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.online.ReqSignMetrics.toObject = function(includeInstance, msg) { - var f, obj = { - publicKey: msg.getPublicKey_asB64(), - signature: msg.getSignature_asB64(), - payload: msg.getPayload_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.online.ReqSignMetrics} - */ -proto.online.ReqSignMetrics.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.online.ReqSignMetrics; - return proto.online.ReqSignMetrics.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.online.ReqSignMetrics} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.online.ReqSignMetrics} - */ -proto.online.ReqSignMetrics.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.setPublicKey(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSignature(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPayload(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.online.ReqSignMetrics.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.online.ReqSignMetrics.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.online.ReqSignMetrics} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.online.ReqSignMetrics.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPublicKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getPayload_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } -}; - - -/** - * optional bytes public_key = 1; - * @return {!(string|Uint8Array)} - */ -proto.online.ReqSignMetrics.prototype.getPublicKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes public_key = 1; - * This is a type-conversion wrapper around `getPublicKey()` - * @return {string} - */ -proto.online.ReqSignMetrics.prototype.getPublicKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPublicKey())); -}; - - -/** - * optional bytes public_key = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPublicKey()` - * @return {!Uint8Array} - */ -proto.online.ReqSignMetrics.prototype.getPublicKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPublicKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.online.ReqSignMetrics} returns this - */ -proto.online.ReqSignMetrics.prototype.setPublicKey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes signature = 2; - * @return {!(string|Uint8Array)} - */ -proto.online.ReqSignMetrics.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes signature = 2; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.online.ReqSignMetrics.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 2; - * 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.online.ReqSignMetrics.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.online.ReqSignMetrics} returns this - */ -proto.online.ReqSignMetrics.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional bytes payload = 3; - * @return {!(string|Uint8Array)} - */ -proto.online.ReqSignMetrics.prototype.getPayload = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes payload = 3; - * This is a type-conversion wrapper around `getPayload()` - * @return {string} - */ -proto.online.ReqSignMetrics.prototype.getPayload_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPayload())); -}; - - -/** - * optional bytes payload = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPayload()` - * @return {!Uint8Array} - */ -proto.online.ReqSignMetrics.prototype.getPayload_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPayload())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.online.ReqSignMetrics} returns this - */ -proto.online.ReqSignMetrics.prototype.setPayload = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.online.PayLoadInfo.prototype.toObject = function(opt_includeInstance) { - return proto.online.PayLoadInfo.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.online.PayLoadInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.online.PayLoadInfo.toObject = function(includeInstance, msg) { - var f, obj = { - nodeId: jspb.Message.getFieldWithDefault(msg, 1, ""), - node: (f = msg.getNode()) && github_com_bittorrent_go$btfs$common_protos_node_node_pb.Node.toObject(includeInstance, f), - lastSignedInfo: (f = msg.getLastSignedInfo()) && proto.online.SignedInfo.toObject(includeInstance, f), - lastSignature: jspb.Message.getFieldWithDefault(msg, 4, ""), - lastTime: (f = msg.getLastTime()) && google_protobuf_timestamp_pb.Timestamp.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.online.PayLoadInfo} - */ -proto.online.PayLoadInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.online.PayLoadInfo; - return proto.online.PayLoadInfo.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.online.PayLoadInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.online.PayLoadInfo} - */ -proto.online.PayLoadInfo.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.setNodeId(value); - break; - case 2: - var value = new github_com_bittorrent_go$btfs$common_protos_node_node_pb.Node; - reader.readMessage(value,github_com_bittorrent_go$btfs$common_protos_node_node_pb.Node.deserializeBinaryFromReader); - msg.setNode(value); - break; - case 3: - var value = new proto.online.SignedInfo; - reader.readMessage(value,proto.online.SignedInfo.deserializeBinaryFromReader); - msg.setLastSignedInfo(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setLastSignature(value); - break; - case 5: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setLastTime(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.online.PayLoadInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.online.PayLoadInfo.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.online.PayLoadInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.online.PayLoadInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNodeId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getNode(); - if (f != null) { - writer.writeMessage( - 2, - f, - github_com_bittorrent_go$btfs$common_protos_node_node_pb.Node.serializeBinaryToWriter - ); - } - f = message.getLastSignedInfo(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.online.SignedInfo.serializeBinaryToWriter - ); - } - f = message.getLastSignature(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getLastTime(); - if (f != null) { - writer.writeMessage( - 5, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string node_id = 1; - * @return {string} - */ -proto.online.PayLoadInfo.prototype.getNodeId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.online.PayLoadInfo} returns this - */ -proto.online.PayLoadInfo.prototype.setNodeId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional node.Node node = 2; - * @return {?proto.node.Node} - */ -proto.online.PayLoadInfo.prototype.getNode = function() { - return /** @type{?proto.node.Node} */ ( - jspb.Message.getWrapperField(this, github_com_bittorrent_go$btfs$common_protos_node_node_pb.Node, 2)); -}; - - -/** - * @param {?proto.node.Node|undefined} value - * @return {!proto.online.PayLoadInfo} returns this -*/ -proto.online.PayLoadInfo.prototype.setNode = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.online.PayLoadInfo} returns this - */ -proto.online.PayLoadInfo.prototype.clearNode = function() { - return this.setNode(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.online.PayLoadInfo.prototype.hasNode = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional SignedInfo last_signed_info = 3; - * @return {?proto.online.SignedInfo} - */ -proto.online.PayLoadInfo.prototype.getLastSignedInfo = function() { - return /** @type{?proto.online.SignedInfo} */ ( - jspb.Message.getWrapperField(this, proto.online.SignedInfo, 3)); -}; - - -/** - * @param {?proto.online.SignedInfo|undefined} value - * @return {!proto.online.PayLoadInfo} returns this -*/ -proto.online.PayLoadInfo.prototype.setLastSignedInfo = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.online.PayLoadInfo} returns this - */ -proto.online.PayLoadInfo.prototype.clearLastSignedInfo = function() { - return this.setLastSignedInfo(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.online.PayLoadInfo.prototype.hasLastSignedInfo = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional string last_signature = 4; - * @return {string} - */ -proto.online.PayLoadInfo.prototype.getLastSignature = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.online.PayLoadInfo} returns this - */ -proto.online.PayLoadInfo.prototype.setLastSignature = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional google.protobuf.Timestamp last_time = 5; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.online.PayLoadInfo.prototype.getLastTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.online.PayLoadInfo} returns this -*/ -proto.online.PayLoadInfo.prototype.setLastTime = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.online.PayLoadInfo} returns this - */ -proto.online.PayLoadInfo.prototype.clearLastTime = function() { - return this.setLastTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.online.PayLoadInfo.prototype.hasLastTime = function() { - return jspb.Message.getField(this, 5) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.online.RespSignMetrics.prototype.toObject = function(opt_includeInstance) { - return proto.online.RespSignMetrics.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.online.RespSignMetrics} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.online.RespSignMetrics.toObject = function(includeInstance, msg) { - var f, obj = { - code: jspb.Message.getFieldWithDefault(msg, 1, 0), - message: jspb.Message.getFieldWithDefault(msg, 2, ""), - signedInfo: (f = msg.getSignedInfo()) && proto.online.SignedInfo.toObject(includeInstance, f), - signature: jspb.Message.getFieldWithDefault(msg, 4, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.online.RespSignMetrics} - */ -proto.online.RespSignMetrics.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.online.RespSignMetrics; - return proto.online.RespSignMetrics.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.online.RespSignMetrics} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.online.RespSignMetrics} - */ -proto.online.RespSignMetrics.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.online.ResponseCode} */ (reader.readEnum()); - msg.setCode(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setMessage(value); - break; - case 3: - var value = new proto.online.SignedInfo; - reader.readMessage(value,proto.online.SignedInfo.deserializeBinaryFromReader); - msg.setSignedInfo(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setSignature(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.online.RespSignMetrics.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.online.RespSignMetrics.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.online.RespSignMetrics} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.online.RespSignMetrics.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getCode(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getMessage(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getSignedInfo(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.online.SignedInfo.serializeBinaryToWriter - ); - } - f = message.getSignature(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } -}; - - -/** - * optional ResponseCode code = 1; - * @return {!proto.online.ResponseCode} - */ -proto.online.RespSignMetrics.prototype.getCode = function() { - return /** @type {!proto.online.ResponseCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.online.ResponseCode} value - * @return {!proto.online.RespSignMetrics} returns this - */ -proto.online.RespSignMetrics.prototype.setCode = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional string message = 2; - * @return {string} - */ -proto.online.RespSignMetrics.prototype.getMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.online.RespSignMetrics} returns this - */ -proto.online.RespSignMetrics.prototype.setMessage = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional SignedInfo signed_info = 3; - * @return {?proto.online.SignedInfo} - */ -proto.online.RespSignMetrics.prototype.getSignedInfo = function() { - return /** @type{?proto.online.SignedInfo} */ ( - jspb.Message.getWrapperField(this, proto.online.SignedInfo, 3)); -}; - - -/** - * @param {?proto.online.SignedInfo|undefined} value - * @return {!proto.online.RespSignMetrics} returns this -*/ -proto.online.RespSignMetrics.prototype.setSignedInfo = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.online.RespSignMetrics} returns this - */ -proto.online.RespSignMetrics.prototype.clearSignedInfo = function() { - return this.setSignedInfo(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.online.RespSignMetrics.prototype.hasSignedInfo = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional string signature = 4; - * @return {string} - */ -proto.online.RespSignMetrics.prototype.getSignature = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.online.RespSignMetrics} returns this - */ -proto.online.RespSignMetrics.prototype.setSignature = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.online.SignedInfo.prototype.toObject = function(opt_includeInstance) { - return proto.online.SignedInfo.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.online.SignedInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.online.SignedInfo.toObject = function(includeInstance, msg) { - var f, obj = { - peer: jspb.Message.getFieldWithDefault(msg, 1, ""), - createdTime: jspb.Message.getFieldWithDefault(msg, 2, 0), - version: jspb.Message.getFieldWithDefault(msg, 3, ""), - nonce: jspb.Message.getFieldWithDefault(msg, 4, 0), - bttcAddress: jspb.Message.getFieldWithDefault(msg, 5, ""), - signedTime: jspb.Message.getFieldWithDefault(msg, 6, 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.online.SignedInfo} - */ -proto.online.SignedInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.online.SignedInfo; - return proto.online.SignedInfo.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.online.SignedInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.online.SignedInfo} - */ -proto.online.SignedInfo.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.setPeer(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCreatedTime(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setVersion(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNonce(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setBttcAddress(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint32()); - msg.setSignedTime(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.online.SignedInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.online.SignedInfo.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.online.SignedInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.online.SignedInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPeer(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getCreatedTime(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getVersion(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getNonce(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getBttcAddress(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getSignedTime(); - if (f !== 0) { - writer.writeUint32( - 6, - f - ); - } -}; - - -/** - * optional string peer = 1; - * @return {string} - */ -proto.online.SignedInfo.prototype.getPeer = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.online.SignedInfo} returns this - */ -proto.online.SignedInfo.prototype.setPeer = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional uint32 created_time = 2; - * @return {number} - */ -proto.online.SignedInfo.prototype.getCreatedTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.online.SignedInfo} returns this - */ -proto.online.SignedInfo.prototype.setCreatedTime = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional string version = 3; - * @return {string} - */ -proto.online.SignedInfo.prototype.getVersion = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.online.SignedInfo} returns this - */ -proto.online.SignedInfo.prototype.setVersion = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional uint32 nonce = 4; - * @return {number} - */ -proto.online.SignedInfo.prototype.getNonce = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.online.SignedInfo} returns this - */ -proto.online.SignedInfo.prototype.setNonce = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional string bttc_address = 5; - * @return {string} - */ -proto.online.SignedInfo.prototype.getBttcAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.online.SignedInfo} returns this - */ -proto.online.SignedInfo.prototype.setBttcAddress = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * optional uint32 signed_time = 6; - * @return {number} - */ -proto.online.SignedInfo.prototype.getSignedTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.online.SignedInfo} returns this - */ -proto.online.SignedInfo.prototype.setSignedTime = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * @enum {number} - */ -proto.online.ResponseCode = { - SUCCESS: 0, - SIGNATURE_FORMAT_ERROR: 1, - COMPUTE_ADDRESS_ERROR: 2, - TIMEOUT_ERROR: 3, - OTHER_ERROR: 20 -}; - -goog.object.extend(exports, proto.online); diff --git a/js/protos/protocol/api/api_pb.js b/js/protos/protocol/api/api_pb.js deleted file mode 100644 index 466b93a..0000000 --- a/js/protos/protocol/api/api_pb.js +++ /dev/null @@ -1,7120 +0,0 @@ -// source: protos/protocol/api/api.proto -/** - * @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 google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); -goog.object.extend(proto, google_api_annotations_pb); -var protos_protocol_core_Contract_pb = require('../../../protos/protocol/core/Contract_pb.js'); -goog.object.extend(proto, protos_protocol_core_Contract_pb); -var protos_protocol_core_Tron_pb = require('../../../protos/protocol/core/Tron_pb.js'); -goog.object.extend(proto, protos_protocol_core_Tron_pb); -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) { - /** - * @public - * @override - */ - proto.protocol.Return.displayName = 'proto.protocol.Return'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.BlockReference.displayName = 'proto.protocol.BlockReference'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.WitnessList.displayName = 'proto.protocol.WitnessList'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.ProposalList.displayName = 'proto.protocol.ProposalList'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.ExchangeList.displayName = 'proto.protocol.ExchangeList'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.AssetIssueList.displayName = 'proto.protocol.AssetIssueList'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.BlockList.displayName = 'proto.protocol.BlockList'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.TransactionList.displayName = 'proto.protocol.TransactionList'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.DelegatedResourceMessage.displayName = 'proto.protocol.DelegatedResourceMessage'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.DelegatedResourceList.displayName = 'proto.protocol.DelegatedResourceList'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.NodeList.displayName = 'proto.protocol.NodeList'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.Node.displayName = 'proto.protocol.Node'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.Address.displayName = 'proto.protocol.Address'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.EmptyMessage.displayName = 'proto.protocol.EmptyMessage'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.NumberMessage.displayName = 'proto.protocol.NumberMessage'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.BytesMessage.displayName = 'proto.protocol.BytesMessage'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.TimeMessage.displayName = 'proto.protocol.TimeMessage'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.BlockLimit.displayName = 'proto.protocol.BlockLimit'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.TransactionLimit.displayName = 'proto.protocol.TransactionLimit'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.AccountPaginated.displayName = 'proto.protocol.AccountPaginated'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.TimePaginatedMessage.displayName = 'proto.protocol.TimePaginatedMessage'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.AccountNetMessage.displayName = 'proto.protocol.AccountNetMessage'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.AccountResourceMessage.displayName = 'proto.protocol.AccountResourceMessage'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.PaginatedMessage.displayName = 'proto.protocol.PaginatedMessage'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.EasyTransferMessage.displayName = 'proto.protocol.EasyTransferMessage'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.EasyTransferByPrivateMessage.displayName = 'proto.protocol.EasyTransferByPrivateMessage'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.EasyTransferResponse.displayName = 'proto.protocol.EasyTransferResponse'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.AddressPrKeyPairMessage.displayName = 'proto.protocol.AddressPrKeyPairMessage'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.TransactionExtention.displayName = 'proto.protocol.TransactionExtention'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.BlockExtention.displayName = 'proto.protocol.BlockExtention'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.BlockListExtention.displayName = 'proto.protocol.BlockListExtention'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.TransactionListExtention.displayName = 'proto.protocol.TransactionListExtention'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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.getBooleanFieldWithDefault(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; - * @return {boolean} - */ -proto.protocol.Return.prototype.getResult = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.protocol.Return} returns this - */ -proto.protocol.Return.prototype.setResult = function(value) { - return jspb.Message.setProto3BooleanField(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 - * @return {!proto.protocol.Return} returns this - */ -proto.protocol.Return.prototype.setCode = function(value) { - return jspb.Message.setProto3EnumField(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 - * @return {!proto.protocol.Return} returns this - */ -proto.protocol.Return.prototype.setMessage = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.BlockReference} returns this - */ -proto.protocol.BlockReference.prototype.setBlockNum = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.BlockReference} returns this - */ -proto.protocol.BlockReference.prototype.setBlockHash = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - -/** - * 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. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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(), - protos_protocol_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 protos_protocol_core_Tron_pb.Witness; - reader.readMessage(value,protos_protocol_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, - protos_protocol_core_Tron_pb.Witness.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Witness witnesses = 1; - * @return {!Array} - */ -proto.protocol.WitnessList.prototype.getWitnessesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, protos_protocol_core_Tron_pb.Witness, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.WitnessList} returns this -*/ -proto.protocol.WitnessList.prototype.setWitnessesList = function(value) { - return 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); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.WitnessList} returns this - */ -proto.protocol.WitnessList.prototype.clearWitnessesList = function() { - return this.setWitnessesList([]); -}; - - - -/** - * 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. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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(), - protos_protocol_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 protos_protocol_core_Tron_pb.Proposal; - reader.readMessage(value,protos_protocol_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, - protos_protocol_core_Tron_pb.Proposal.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Proposal proposals = 1; - * @return {!Array} - */ -proto.protocol.ProposalList.prototype.getProposalsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, protos_protocol_core_Tron_pb.Proposal, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.ProposalList} returns this -*/ -proto.protocol.ProposalList.prototype.setProposalsList = function(value) { - return 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); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.ProposalList} returns this - */ -proto.protocol.ProposalList.prototype.clearProposalsList = function() { - return this.setProposalsList([]); -}; - - - -/** - * 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. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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(), - protos_protocol_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 protos_protocol_core_Tron_pb.Exchange; - reader.readMessage(value,protos_protocol_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, - protos_protocol_core_Tron_pb.Exchange.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Exchange exchanges = 1; - * @return {!Array} - */ -proto.protocol.ExchangeList.prototype.getExchangesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, protos_protocol_core_Tron_pb.Exchange, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.ExchangeList} returns this -*/ -proto.protocol.ExchangeList.prototype.setExchangesList = function(value) { - return 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); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.ExchangeList} returns this - */ -proto.protocol.ExchangeList.prototype.clearExchangesList = function() { - return this.setExchangesList([]); -}; - - - -/** - * 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. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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(), - protos_protocol_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 protos_protocol_core_Contract_pb.AssetIssueContract; - reader.readMessage(value,protos_protocol_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, - protos_protocol_core_Contract_pb.AssetIssueContract.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated AssetIssueContract assetIssue = 1; - * @return {!Array} - */ -proto.protocol.AssetIssueList.prototype.getAssetissueList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, protos_protocol_core_Contract_pb.AssetIssueContract, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.AssetIssueList} returns this -*/ -proto.protocol.AssetIssueList.prototype.setAssetissueList = function(value) { - return 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); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.AssetIssueList} returns this - */ -proto.protocol.AssetIssueList.prototype.clearAssetissueList = function() { - return this.setAssetissueList([]); -}; - - - -/** - * 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. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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(), - protos_protocol_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 protos_protocol_core_Tron_pb.Block; - reader.readMessage(value,protos_protocol_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, - protos_protocol_core_Tron_pb.Block.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Block block = 1; - * @return {!Array} - */ -proto.protocol.BlockList.prototype.getBlockList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, protos_protocol_core_Tron_pb.Block, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.BlockList} returns this -*/ -proto.protocol.BlockList.prototype.setBlockList = function(value) { - return 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); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.BlockList} returns this - */ -proto.protocol.BlockList.prototype.clearBlockList = function() { - return this.setBlockList([]); -}; - - - -/** - * 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. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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(), - protos_protocol_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 protos_protocol_core_Tron_pb.Transaction; - reader.readMessage(value,protos_protocol_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, - protos_protocol_core_Tron_pb.Transaction.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Transaction transaction = 1; - * @return {!Array} - */ -proto.protocol.TransactionList.prototype.getTransactionList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, protos_protocol_core_Tron_pb.Transaction, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.TransactionList} returns this -*/ -proto.protocol.TransactionList.prototype.setTransactionList = function(value) { - return 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); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.TransactionList} returns this - */ -proto.protocol.TransactionList.prototype.clearTransactionList = function() { - return this.setTransactionList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.DelegatedResourceMessage} returns this - */ -proto.protocol.DelegatedResourceMessage.prototype.setFromaddress = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.DelegatedResourceMessage} returns this - */ -proto.protocol.DelegatedResourceMessage.prototype.setToaddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - -/** - * 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. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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(), - protos_protocol_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 protos_protocol_core_Tron_pb.DelegatedResource; - reader.readMessage(value,protos_protocol_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, - protos_protocol_core_Tron_pb.DelegatedResource.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated DelegatedResource delegatedResource = 1; - * @return {!Array} - */ -proto.protocol.DelegatedResourceList.prototype.getDelegatedresourceList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, protos_protocol_core_Tron_pb.DelegatedResource, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.DelegatedResourceList} returns this -*/ -proto.protocol.DelegatedResourceList.prototype.setDelegatedresourceList = function(value) { - return 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); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.DelegatedResourceList} returns this - */ -proto.protocol.DelegatedResourceList.prototype.clearDelegatedresourceList = function() { - return this.setDelegatedresourceList([]); -}; - - - -/** - * 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. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.NodeList} returns this -*/ -proto.protocol.NodeList.prototype.setNodesList = function(value) { - return 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); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.NodeList} returns this - */ -proto.protocol.NodeList.prototype.clearNodesList = function() { - return this.setNodesList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.Node} returns this -*/ -proto.protocol.Node.prototype.setAddress = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.Node} returns this - */ -proto.protocol.Node.prototype.clearAddress = function() { - return this.setAddress(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.Node.prototype.hasAddress = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.Address} returns this - */ -proto.protocol.Address.prototype.setHost = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.Address} returns this - */ -proto.protocol.Address.prototype.setPort = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.NumberMessage} returns this - */ -proto.protocol.NumberMessage.prototype.setNum = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.BytesMessage} returns this - */ -proto.protocol.BytesMessage.prototype.setValue = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.TimeMessage} returns this - */ -proto.protocol.TimeMessage.prototype.setBegininmilliseconds = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.TimeMessage} returns this - */ -proto.protocol.TimeMessage.prototype.setEndinmilliseconds = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.BlockLimit} returns this - */ -proto.protocol.BlockLimit.prototype.setStartnum = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.BlockLimit} returns this - */ -proto.protocol.BlockLimit.prototype.setEndnum = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.TransactionLimit} returns this - */ -proto.protocol.TransactionLimit.prototype.setTransactionid = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.TransactionLimit} returns this - */ -proto.protocol.TransactionLimit.prototype.setLimitnum = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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()) && protos_protocol_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 protos_protocol_core_Tron_pb.Account; - reader.readMessage(value,protos_protocol_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, - protos_protocol_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, protos_protocol_core_Tron_pb.Account, 1)); -}; - - -/** - * @param {?proto.protocol.Account|undefined} value - * @return {!proto.protocol.AccountPaginated} returns this -*/ -proto.protocol.AccountPaginated.prototype.setAccount = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.AccountPaginated} returns this - */ -proto.protocol.AccountPaginated.prototype.clearAccount = function() { - return 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 - * @return {!proto.protocol.AccountPaginated} returns this - */ -proto.protocol.AccountPaginated.prototype.setOffset = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.AccountPaginated} returns this - */ -proto.protocol.AccountPaginated.prototype.setLimit = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.TimePaginatedMessage} returns this -*/ -proto.protocol.TimePaginatedMessage.prototype.setTimemessage = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.TimePaginatedMessage} returns this - */ -proto.protocol.TimePaginatedMessage.prototype.clearTimemessage = function() { - return 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 - * @return {!proto.protocol.TimePaginatedMessage} returns this - */ -proto.protocol.TimePaginatedMessage.prototype.setOffset = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.TimePaginatedMessage} returns this - */ -proto.protocol.TimePaginatedMessage.prototype.setLimit = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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, null, "", 0); - }); - 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, null, "", 0); - }); - 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 - * @return {!proto.protocol.AccountNetMessage} returns this - */ -proto.protocol.AccountNetMessage.prototype.setFreenetused = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.AccountNetMessage} returns this - */ -proto.protocol.AccountNetMessage.prototype.setFreenetlimit = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.AccountNetMessage} returns this - */ -proto.protocol.AccountNetMessage.prototype.setNetused = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.AccountNetMessage} returns this - */ -proto.protocol.AccountNetMessage.prototype.setNetlimit = function(value) { - return jspb.Message.setProto3IntField(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)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.protocol.AccountNetMessage} returns this - */ -proto.protocol.AccountNetMessage.prototype.clearAssetnetusedMap = function() { - this.getAssetnetusedMap().clear(); - return this;}; - - -/** - * 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)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.protocol.AccountNetMessage} returns this - */ -proto.protocol.AccountNetMessage.prototype.clearAssetnetlimitMap = function() { - this.getAssetnetlimitMap().clear(); - return this;}; - - -/** - * optional int64 TotalNetLimit = 7; - * @return {number} - */ -proto.protocol.AccountNetMessage.prototype.getTotalnetlimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.AccountNetMessage} returns this - */ -proto.protocol.AccountNetMessage.prototype.setTotalnetlimit = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.AccountNetMessage} returns this - */ -proto.protocol.AccountNetMessage.prototype.setTotalnetweight = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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, null, "", 0); - }); - 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, null, "", 0); - }); - 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 - * @return {!proto.protocol.AccountResourceMessage} returns this - */ -proto.protocol.AccountResourceMessage.prototype.setFreenetused = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.AccountResourceMessage} returns this - */ -proto.protocol.AccountResourceMessage.prototype.setFreenetlimit = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.AccountResourceMessage} returns this - */ -proto.protocol.AccountResourceMessage.prototype.setNetused = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.AccountResourceMessage} returns this - */ -proto.protocol.AccountResourceMessage.prototype.setNetlimit = function(value) { - return jspb.Message.setProto3IntField(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)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.protocol.AccountResourceMessage} returns this - */ -proto.protocol.AccountResourceMessage.prototype.clearAssetnetusedMap = function() { - this.getAssetnetusedMap().clear(); - return this;}; - - -/** - * 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)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.protocol.AccountResourceMessage} returns this - */ -proto.protocol.AccountResourceMessage.prototype.clearAssetnetlimitMap = function() { - this.getAssetnetlimitMap().clear(); - return this;}; - - -/** - * optional int64 TotalNetLimit = 7; - * @return {number} - */ -proto.protocol.AccountResourceMessage.prototype.getTotalnetlimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.AccountResourceMessage} returns this - */ -proto.protocol.AccountResourceMessage.prototype.setTotalnetlimit = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.AccountResourceMessage} returns this - */ -proto.protocol.AccountResourceMessage.prototype.setTotalnetweight = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.AccountResourceMessage} returns this - */ -proto.protocol.AccountResourceMessage.prototype.setEnergyused = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.AccountResourceMessage} returns this - */ -proto.protocol.AccountResourceMessage.prototype.setEnergylimit = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.AccountResourceMessage} returns this - */ -proto.protocol.AccountResourceMessage.prototype.setTotalenergylimit = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.AccountResourceMessage} returns this - */ -proto.protocol.AccountResourceMessage.prototype.setTotalenergyweight = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.AccountResourceMessage} returns this - */ -proto.protocol.AccountResourceMessage.prototype.setStorageused = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.AccountResourceMessage} returns this - */ -proto.protocol.AccountResourceMessage.prototype.setStoragelimit = function(value) { - return jspb.Message.setProto3IntField(this, 22, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.PaginatedMessage} returns this - */ -proto.protocol.PaginatedMessage.prototype.setOffset = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.PaginatedMessage} returns this - */ -proto.protocol.PaginatedMessage.prototype.setLimit = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.EasyTransferMessage} returns this - */ -proto.protocol.EasyTransferMessage.prototype.setPassphrase = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.EasyTransferMessage} returns this - */ -proto.protocol.EasyTransferMessage.prototype.setToaddress = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.EasyTransferMessage} returns this - */ -proto.protocol.EasyTransferMessage.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.EasyTransferByPrivateMessage} returns this - */ -proto.protocol.EasyTransferByPrivateMessage.prototype.setPrivatekey = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.EasyTransferByPrivateMessage} returns this - */ -proto.protocol.EasyTransferByPrivateMessage.prototype.setToaddress = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.EasyTransferByPrivateMessage} returns this - */ -proto.protocol.EasyTransferByPrivateMessage.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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()) && protos_protocol_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 protos_protocol_core_Tron_pb.Transaction; - reader.readMessage(value,protos_protocol_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, - protos_protocol_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, protos_protocol_core_Tron_pb.Transaction, 1)); -}; - - -/** - * @param {?proto.protocol.Transaction|undefined} value - * @return {!proto.protocol.EasyTransferResponse} returns this -*/ -proto.protocol.EasyTransferResponse.prototype.setTransaction = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.EasyTransferResponse} returns this - */ -proto.protocol.EasyTransferResponse.prototype.clearTransaction = function() { - return 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 - * @return {!proto.protocol.EasyTransferResponse} returns this -*/ -proto.protocol.EasyTransferResponse.prototype.setResult = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.EasyTransferResponse} returns this - */ -proto.protocol.EasyTransferResponse.prototype.clearResult = function() { - return 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 - * @return {!proto.protocol.EasyTransferResponse} returns this - */ -proto.protocol.EasyTransferResponse.prototype.setTxid = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.AddressPrKeyPairMessage} returns this - */ -proto.protocol.AddressPrKeyPairMessage.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(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 - * @return {!proto.protocol.AddressPrKeyPairMessage} returns this - */ -proto.protocol.AddressPrKeyPairMessage.prototype.setPrivatekey = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - - -/** - * 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. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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()) && protos_protocol_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 protos_protocol_core_Tron_pb.Transaction; - reader.readMessage(value,protos_protocol_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, - protos_protocol_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, protos_protocol_core_Tron_pb.Transaction, 1)); -}; - - -/** - * @param {?proto.protocol.Transaction|undefined} value - * @return {!proto.protocol.TransactionExtention} returns this -*/ -proto.protocol.TransactionExtention.prototype.setTransaction = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.TransactionExtention} returns this - */ -proto.protocol.TransactionExtention.prototype.clearTransaction = function() { - return 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 - * @return {!proto.protocol.TransactionExtention} returns this - */ -proto.protocol.TransactionExtention.prototype.setTxid = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.TransactionExtention} returns this - */ -proto.protocol.TransactionExtention.prototype.setConstantResultList = function(value) { - return jspb.Message.setField(this, 3, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.protocol.TransactionExtention} returns this - */ -proto.protocol.TransactionExtention.prototype.addConstantResult = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 3, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.TransactionExtention} returns this - */ -proto.protocol.TransactionExtention.prototype.clearConstantResultList = function() { - return 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 - * @return {!proto.protocol.TransactionExtention} returns this -*/ -proto.protocol.TransactionExtention.prototype.setResult = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.TransactionExtention} returns this - */ -proto.protocol.TransactionExtention.prototype.clearResult = function() { - return this.setResult(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.TransactionExtention.prototype.hasResult = function() { - return jspb.Message.getField(this, 4) != null; -}; - - - -/** - * 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. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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()) && protos_protocol_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 protos_protocol_core_Tron_pb.BlockHeader; - reader.readMessage(value,protos_protocol_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, - protos_protocol_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 - * @return {!proto.protocol.BlockExtention} returns this -*/ -proto.protocol.BlockExtention.prototype.setTransactionsList = function(value) { - return 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); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.BlockExtention} returns this - */ -proto.protocol.BlockExtention.prototype.clearTransactionsList = function() { - return 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, protos_protocol_core_Tron_pb.BlockHeader, 2)); -}; - - -/** - * @param {?proto.protocol.BlockHeader|undefined} value - * @return {!proto.protocol.BlockExtention} returns this -*/ -proto.protocol.BlockExtention.prototype.setBlockHeader = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.BlockExtention} returns this - */ -proto.protocol.BlockExtention.prototype.clearBlockHeader = function() { - return 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 - * @return {!proto.protocol.BlockExtention} returns this - */ -proto.protocol.BlockExtention.prototype.setBlockid = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - - -/** - * 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. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.BlockListExtention} returns this -*/ -proto.protocol.BlockListExtention.prototype.setBlockList = function(value) { - return 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); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.BlockListExtention} returns this - */ -proto.protocol.BlockListExtention.prototype.clearBlockList = function() { - return this.setBlockList([]); -}; - - - -/** - * 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. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.TransactionListExtention} returns this -*/ -proto.protocol.TransactionListExtention.prototype.setTransactionList = function(value) { - return 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); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.TransactionListExtention} returns this - */ -proto.protocol.TransactionListExtention.prototype.clearTransactionList = function() { - return this.setTransactionList([]); -}; - - -goog.object.extend(exports, proto.protocol); diff --git a/js/protos/protocol/core/Contract_pb.js b/js/protos/protocol/core/Contract_pb.js deleted file mode 100644 index c8568f1..0000000 --- a/js/protos/protocol/core/Contract_pb.js +++ /dev/null @@ -1,8876 +0,0 @@ -// source: protos/protocol/core/Contract.proto -/** - * @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 protos_protocol_core_Tron_pb = require('../../../protos/protocol/core/Tron_pb.js'); -goog.object.extend(proto, protos_protocol_core_Tron_pb); -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.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.UpdateEnergyLimitContract', 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); -goog.exportSymbol('proto.protocol.WithdrawBalanceContract', null, global); -goog.exportSymbol('proto.protocol.WitnessCreateContract', null, global); -goog.exportSymbol('proto.protocol.WitnessUpdateContract', 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.AccountCreateContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.AccountCreateContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.AccountCreateContract.displayName = 'proto.protocol.AccountCreateContract'; -} -/** - * 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.AccountUpdateContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.AccountUpdateContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.AccountUpdateContract.displayName = 'proto.protocol.AccountUpdateContract'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.SetAccountIdContract.displayName = 'proto.protocol.SetAccountIdContract'; -} -/** - * 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.TransferContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.TransferContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.TransferContract.displayName = 'proto.protocol.TransferContract'; -} -/** - * 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.TransferAssetContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.TransferAssetContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.TransferAssetContract.displayName = 'proto.protocol.TransferAssetContract'; -} -/** - * 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.VoteAssetContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.VoteAssetContract.repeatedFields_, null); -}; -goog.inherits(proto.protocol.VoteAssetContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.VoteAssetContract.displayName = 'proto.protocol.VoteAssetContract'; -} -/** - * 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.VoteWitnessContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.VoteWitnessContract.repeatedFields_, null); -}; -goog.inherits(proto.protocol.VoteWitnessContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.VoteWitnessContract.displayName = 'proto.protocol.VoteWitnessContract'; -} -/** - * 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.VoteWitnessContract.Vote = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.VoteWitnessContract.Vote, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.VoteWitnessContract.Vote.displayName = 'proto.protocol.VoteWitnessContract.Vote'; -} -/** - * 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.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) { - /** - * @public - * @override - */ - proto.protocol.UpdateSettingContract.displayName = 'proto.protocol.UpdateSettingContract'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.UpdateEnergyLimitContract.displayName = 'proto.protocol.UpdateEnergyLimitContract'; -} -/** - * 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); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.WitnessCreateContract.displayName = 'proto.protocol.WitnessCreateContract'; -} -/** - * 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.WitnessUpdateContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.WitnessUpdateContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.WitnessUpdateContract.displayName = 'proto.protocol.WitnessUpdateContract'; -} -/** - * 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.AssetIssueContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.AssetIssueContract.repeatedFields_, null); -}; -goog.inherits(proto.protocol.AssetIssueContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.AssetIssueContract.displayName = 'proto.protocol.AssetIssueContract'; -} -/** - * 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.AssetIssueContract.FrozenSupply = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.AssetIssueContract.FrozenSupply, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.AssetIssueContract.FrozenSupply.displayName = 'proto.protocol.AssetIssueContract.FrozenSupply'; -} -/** - * 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.ParticipateAssetIssueContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.ParticipateAssetIssueContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.ParticipateAssetIssueContract.displayName = 'proto.protocol.ParticipateAssetIssueContract'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.FreezeBalanceContract.displayName = 'proto.protocol.FreezeBalanceContract'; -} -/** - * 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.UnfreezeBalanceContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.UnfreezeBalanceContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.UnfreezeBalanceContract.displayName = 'proto.protocol.UnfreezeBalanceContract'; -} -/** - * 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.UnfreezeAssetContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.UnfreezeAssetContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.UnfreezeAssetContract.displayName = 'proto.protocol.UnfreezeAssetContract'; -} -/** - * 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.WithdrawBalanceContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.WithdrawBalanceContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.WithdrawBalanceContract.displayName = 'proto.protocol.WithdrawBalanceContract'; -} -/** - * 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.UpdateAssetContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.UpdateAssetContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.UpdateAssetContract.displayName = 'proto.protocol.UpdateAssetContract'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.ProposalCreateContract.displayName = 'proto.protocol.ProposalCreateContract'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.ProposalApproveContract.displayName = 'proto.protocol.ProposalApproveContract'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.ProposalDeleteContract.displayName = 'proto.protocol.ProposalDeleteContract'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.CreateSmartContract.displayName = 'proto.protocol.CreateSmartContract'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.TriggerSmartContract.displayName = 'proto.protocol.TriggerSmartContract'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.BuyStorageContract.displayName = 'proto.protocol.BuyStorageContract'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.BuyStorageBytesContract.displayName = 'proto.protocol.BuyStorageBytesContract'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.SellStorageContract.displayName = 'proto.protocol.SellStorageContract'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.ExchangeCreateContract.displayName = 'proto.protocol.ExchangeCreateContract'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.ExchangeInjectContract.displayName = 'proto.protocol.ExchangeInjectContract'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.ExchangeWithdrawContract.displayName = 'proto.protocol.ExchangeWithdrawContract'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.ExchangeTransactionContract.displayName = 'proto.protocol.ExchangeTransactionContract'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.AccountCreateContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.AccountCreateContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.AccountCreateContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.AccountCreateContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - accountAddress: msg.getAccountAddress_asB64(), - type: 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.AccountCreateContract} - */ -proto.protocol.AccountCreateContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.AccountCreateContract; - return proto.protocol.AccountCreateContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.AccountCreateContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.AccountCreateContract} - */ -proto.protocol.AccountCreateContract.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.setAccountAddress(value); - break; - case 3: - var value = /** @type {!proto.protocol.AccountType} */ (reader.readEnum()); - msg.setType(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.AccountCreateContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.AccountCreateContract.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.AccountCreateContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.AccountCreateContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getAccountAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 3, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.AccountCreateContract.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.AccountCreateContract.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.AccountCreateContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.AccountCreateContract} returns this - */ -proto.protocol.AccountCreateContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes account_address = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.AccountCreateContract.prototype.getAccountAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes account_address = 2; - * This is a type-conversion wrapper around `getAccountAddress()` - * @return {string} - */ -proto.protocol.AccountCreateContract.prototype.getAccountAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAccountAddress())); -}; - - -/** - * 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 `getAccountAddress()` - * @return {!Uint8Array} - */ -proto.protocol.AccountCreateContract.prototype.getAccountAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAccountAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.AccountCreateContract} returns this - */ -proto.protocol.AccountCreateContract.prototype.setAccountAddress = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.AccountCreateContract} returns this - */ -proto.protocol.AccountCreateContract.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.AccountUpdateContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.AccountUpdateContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.AccountUpdateContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.AccountUpdateContract.toObject = function(includeInstance, msg) { - var f, obj = { - accountName: msg.getAccountName_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.AccountUpdateContract} - */ -proto.protocol.AccountUpdateContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.AccountUpdateContract; - return proto.protocol.AccountUpdateContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.AccountUpdateContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.AccountUpdateContract} - */ -proto.protocol.AccountUpdateContract.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.setAccountName(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.AccountUpdateContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.AccountUpdateContract.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.AccountUpdateContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.AccountUpdateContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAccountName_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional bytes account_name = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.AccountUpdateContract.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.AccountUpdateContract.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.AccountUpdateContract.prototype.getAccountName_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAccountName())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.AccountUpdateContract} returns this - */ -proto.protocol.AccountUpdateContract.prototype.setAccountName = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes owner_address = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.AccountUpdateContract.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.AccountUpdateContract.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.AccountUpdateContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.AccountUpdateContract} returns this - */ -proto.protocol.AccountUpdateContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.SetAccountIdContract} returns this - */ -proto.protocol.SetAccountIdContract.prototype.setAccountId = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.SetAccountIdContract} returns this - */ -proto.protocol.SetAccountIdContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.TransferContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.TransferContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.TransferContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.TransferContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_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.TransferContract} - */ -proto.protocol.TransferContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.TransferContract; - return proto.protocol.TransferContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.TransferContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.TransferContract} - */ -proto.protocol.TransferContract.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.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.TransferContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.TransferContract.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.TransferContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.TransferContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_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 owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.TransferContract.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.TransferContract.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.TransferContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.TransferContract} returns this - */ -proto.protocol.TransferContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes to_address = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.TransferContract.prototype.getToAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes to_address = 2; - * This is a type-conversion wrapper around `getToAddress()` - * @return {string} - */ -proto.protocol.TransferContract.prototype.getToAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getToAddress())); -}; - - -/** - * optional bytes to_address = 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.TransferContract.prototype.getToAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getToAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.TransferContract} returns this - */ -proto.protocol.TransferContract.prototype.setToAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional int64 amount = 3; - * @return {number} - */ -proto.protocol.TransferContract.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.TransferContract} returns this - */ -proto.protocol.TransferContract.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.TransferAssetContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.TransferAssetContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.TransferAssetContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.TransferAssetContract.toObject = function(includeInstance, msg) { - var f, obj = { - assetName: msg.getAssetName_asB64(), - ownerAddress: msg.getOwnerAddress_asB64(), - toAddress: msg.getToAddress_asB64(), - amount: 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.TransferAssetContract} - */ -proto.protocol.TransferAssetContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.TransferAssetContract; - return proto.protocol.TransferAssetContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.TransferAssetContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.TransferAssetContract} - */ -proto.protocol.TransferAssetContract.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.setAssetName(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setToAddress(value); - break; - case 4: - 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.TransferAssetContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.TransferAssetContract.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.TransferAssetContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.TransferAssetContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAssetName_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getToAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } -}; - - -/** - * optional bytes asset_name = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.TransferAssetContract.prototype.getAssetName = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes asset_name = 1; - * This is a type-conversion wrapper around `getAssetName()` - * @return {string} - */ -proto.protocol.TransferAssetContract.prototype.getAssetName_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAssetName())); -}; - - -/** - * optional bytes asset_name = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAssetName()` - * @return {!Uint8Array} - */ -proto.protocol.TransferAssetContract.prototype.getAssetName_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAssetName())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.TransferAssetContract} returns this - */ -proto.protocol.TransferAssetContract.prototype.setAssetName = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes owner_address = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.TransferAssetContract.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.TransferAssetContract.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.TransferAssetContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.TransferAssetContract} returns this - */ -proto.protocol.TransferAssetContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional bytes to_address = 3; - * @return {!(string|Uint8Array)} - */ -proto.protocol.TransferAssetContract.prototype.getToAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes to_address = 3; - * This is a type-conversion wrapper around `getToAddress()` - * @return {string} - */ -proto.protocol.TransferAssetContract.prototype.getToAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getToAddress())); -}; - - -/** - * optional bytes to_address = 3; - * 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.TransferAssetContract.prototype.getToAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getToAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.TransferAssetContract} returns this - */ -proto.protocol.TransferAssetContract.prototype.setToAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional int64 amount = 4; - * @return {number} - */ -proto.protocol.TransferAssetContract.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.TransferAssetContract} returns this - */ -proto.protocol.TransferAssetContract.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.VoteAssetContract.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.VoteAssetContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.VoteAssetContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.VoteAssetContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.VoteAssetContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - voteAddressList: msg.getVoteAddressList_asB64(), - support: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), - count: 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.VoteAssetContract} - */ -proto.protocol.VoteAssetContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.VoteAssetContract; - return proto.protocol.VoteAssetContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.VoteAssetContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.VoteAssetContract} - */ -proto.protocol.VoteAssetContract.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.addVoteAddress(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSupport(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt32()); - msg.setCount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.VoteAssetContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.VoteAssetContract.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.VoteAssetContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.VoteAssetContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getVoteAddressList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 2, - f - ); - } - f = message.getSupport(); - if (f) { - writer.writeBool( - 3, - f - ); - } - f = message.getCount(); - if (f !== 0) { - writer.writeInt32( - 5, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.VoteAssetContract.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.VoteAssetContract.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.VoteAssetContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.VoteAssetContract} returns this - */ -proto.protocol.VoteAssetContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * repeated bytes vote_address = 2; - * @return {!(Array|Array)} - */ -proto.protocol.VoteAssetContract.prototype.getVoteAddressList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 2)); -}; - - -/** - * repeated bytes vote_address = 2; - * This is a type-conversion wrapper around `getVoteAddressList()` - * @return {!Array} - */ -proto.protocol.VoteAssetContract.prototype.getVoteAddressList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getVoteAddressList())); -}; - - -/** - * repeated bytes vote_address = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getVoteAddressList()` - * @return {!Array} - */ -proto.protocol.VoteAssetContract.prototype.getVoteAddressList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getVoteAddressList())); -}; - - -/** - * @param {!(Array|Array)} value - * @return {!proto.protocol.VoteAssetContract} returns this - */ -proto.protocol.VoteAssetContract.prototype.setVoteAddressList = function(value) { - return jspb.Message.setField(this, 2, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.protocol.VoteAssetContract} returns this - */ -proto.protocol.VoteAssetContract.prototype.addVoteAddress = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.VoteAssetContract} returns this - */ -proto.protocol.VoteAssetContract.prototype.clearVoteAddressList = function() { - return this.setVoteAddressList([]); -}; - - -/** - * optional bool support = 3; - * @return {boolean} - */ -proto.protocol.VoteAssetContract.prototype.getSupport = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.protocol.VoteAssetContract} returns this - */ -proto.protocol.VoteAssetContract.prototype.setSupport = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - -/** - * optional int32 count = 5; - * @return {number} - */ -proto.protocol.VoteAssetContract.prototype.getCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.VoteAssetContract} returns this - */ -proto.protocol.VoteAssetContract.prototype.setCount = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.VoteWitnessContract.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.VoteWitnessContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.VoteWitnessContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.VoteWitnessContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.VoteWitnessContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - votesList: jspb.Message.toObjectList(msg.getVotesList(), - proto.protocol.VoteWitnessContract.Vote.toObject, includeInstance), - support: jspb.Message.getBooleanFieldWithDefault(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.VoteWitnessContract} - */ -proto.protocol.VoteWitnessContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.VoteWitnessContract; - return proto.protocol.VoteWitnessContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.VoteWitnessContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.VoteWitnessContract} - */ -proto.protocol.VoteWitnessContract.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 proto.protocol.VoteWitnessContract.Vote; - reader.readMessage(value,proto.protocol.VoteWitnessContract.Vote.deserializeBinaryFromReader); - msg.addVotes(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSupport(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.VoteWitnessContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.VoteWitnessContract.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.VoteWitnessContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.VoteWitnessContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getVotesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.protocol.VoteWitnessContract.Vote.serializeBinaryToWriter - ); - } - f = message.getSupport(); - if (f) { - writer.writeBool( - 3, - f - ); - } -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.VoteWitnessContract.Vote.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.VoteWitnessContract.Vote.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.VoteWitnessContract.Vote} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.VoteWitnessContract.Vote.toObject = function(includeInstance, msg) { - var f, obj = { - voteAddress: msg.getVoteAddress_asB64(), - voteCount: 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.VoteWitnessContract.Vote} - */ -proto.protocol.VoteWitnessContract.Vote.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.VoteWitnessContract.Vote; - return proto.protocol.VoteWitnessContract.Vote.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.VoteWitnessContract.Vote} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.VoteWitnessContract.Vote} - */ -proto.protocol.VoteWitnessContract.Vote.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.setVoteAddress(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setVoteCount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.VoteWitnessContract.Vote.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.VoteWitnessContract.Vote.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.VoteWitnessContract.Vote} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.VoteWitnessContract.Vote.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVoteAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getVoteCount(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } -}; - - -/** - * optional bytes vote_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.VoteWitnessContract.Vote.prototype.getVoteAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes vote_address = 1; - * This is a type-conversion wrapper around `getVoteAddress()` - * @return {string} - */ -proto.protocol.VoteWitnessContract.Vote.prototype.getVoteAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getVoteAddress())); -}; - - -/** - * optional bytes vote_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getVoteAddress()` - * @return {!Uint8Array} - */ -proto.protocol.VoteWitnessContract.Vote.prototype.getVoteAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getVoteAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.VoteWitnessContract.Vote} returns this - */ -proto.protocol.VoteWitnessContract.Vote.prototype.setVoteAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int64 vote_count = 2; - * @return {number} - */ -proto.protocol.VoteWitnessContract.Vote.prototype.getVoteCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.VoteWitnessContract.Vote} returns this - */ -proto.protocol.VoteWitnessContract.Vote.prototype.setVoteCount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.VoteWitnessContract.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.VoteWitnessContract.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.VoteWitnessContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.VoteWitnessContract} returns this - */ -proto.protocol.VoteWitnessContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * repeated Vote votes = 2; - * @return {!Array} - */ -proto.protocol.VoteWitnessContract.prototype.getVotesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.VoteWitnessContract.Vote, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.VoteWitnessContract} returns this -*/ -proto.protocol.VoteWitnessContract.prototype.setVotesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.protocol.VoteWitnessContract.Vote=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.VoteWitnessContract.Vote} - */ -proto.protocol.VoteWitnessContract.prototype.addVotes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.protocol.VoteWitnessContract.Vote, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.VoteWitnessContract} returns this - */ -proto.protocol.VoteWitnessContract.prototype.clearVotesList = function() { - return this.setVotesList([]); -}; - - -/** - * optional bool support = 3; - * @return {boolean} - */ -proto.protocol.VoteWitnessContract.prototype.getSupport = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.protocol.VoteWitnessContract} returns this - */ -proto.protocol.VoteWitnessContract.prototype.setSupport = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.UpdateSettingContract} returns this - */ -proto.protocol.UpdateSettingContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.UpdateSettingContract} returns this - */ -proto.protocol.UpdateSettingContract.prototype.setContractAddress = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.UpdateSettingContract} returns this - */ -proto.protocol.UpdateSettingContract.prototype.setConsumeUserResourcePercent = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.UpdateEnergyLimitContract} returns this - */ -proto.protocol.UpdateEnergyLimitContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.UpdateEnergyLimitContract} returns this - */ -proto.protocol.UpdateEnergyLimitContract.prototype.setContractAddress = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.UpdateEnergyLimitContract} returns this - */ -proto.protocol.UpdateEnergyLimitContract.prototype.setOriginEnergyLimit = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.WitnessCreateContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.WitnessCreateContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.WitnessCreateContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.WitnessCreateContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - url: msg.getUrl_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.WitnessCreateContract} - */ -proto.protocol.WitnessCreateContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.WitnessCreateContract; - return proto.protocol.WitnessCreateContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.WitnessCreateContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.WitnessCreateContract} - */ -proto.protocol.WitnessCreateContract.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.setUrl(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.WitnessCreateContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.WitnessCreateContract.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.WitnessCreateContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.WitnessCreateContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getUrl_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.WitnessCreateContract.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.WitnessCreateContract.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.WitnessCreateContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.WitnessCreateContract} returns this - */ -proto.protocol.WitnessCreateContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes url = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.WitnessCreateContract.prototype.getUrl = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes url = 2; - * This is a type-conversion wrapper around `getUrl()` - * @return {string} - */ -proto.protocol.WitnessCreateContract.prototype.getUrl_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getUrl())); -}; - - -/** - * optional bytes url = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getUrl()` - * @return {!Uint8Array} - */ -proto.protocol.WitnessCreateContract.prototype.getUrl_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getUrl())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.WitnessCreateContract} returns this - */ -proto.protocol.WitnessCreateContract.prototype.setUrl = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.WitnessUpdateContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.WitnessUpdateContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.WitnessUpdateContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.WitnessUpdateContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - updateUrl: msg.getUpdateUrl_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.WitnessUpdateContract} - */ -proto.protocol.WitnessUpdateContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.WitnessUpdateContract; - return proto.protocol.WitnessUpdateContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.WitnessUpdateContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.WitnessUpdateContract} - */ -proto.protocol.WitnessUpdateContract.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 12: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setUpdateUrl(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.WitnessUpdateContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.WitnessUpdateContract.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.WitnessUpdateContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.WitnessUpdateContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getUpdateUrl_asU8(); - if (f.length > 0) { - writer.writeBytes( - 12, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.WitnessUpdateContract.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.WitnessUpdateContract.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.WitnessUpdateContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.WitnessUpdateContract} returns this - */ -proto.protocol.WitnessUpdateContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes update_url = 12; - * @return {!(string|Uint8Array)} - */ -proto.protocol.WitnessUpdateContract.prototype.getUpdateUrl = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 12, "")); -}; - - -/** - * optional bytes update_url = 12; - * This is a type-conversion wrapper around `getUpdateUrl()` - * @return {string} - */ -proto.protocol.WitnessUpdateContract.prototype.getUpdateUrl_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getUpdateUrl())); -}; - - -/** - * optional bytes update_url = 12; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getUpdateUrl()` - * @return {!Uint8Array} - */ -proto.protocol.WitnessUpdateContract.prototype.getUpdateUrl_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getUpdateUrl())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.WitnessUpdateContract} returns this - */ -proto.protocol.WitnessUpdateContract.prototype.setUpdateUrl = function(value) { - return jspb.Message.setProto3BytesField(this, 12, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.AssetIssueContract.repeatedFields_ = [5]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.AssetIssueContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.AssetIssueContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.AssetIssueContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -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(), - totalSupply: jspb.Message.getFieldWithDefault(msg, 4, 0), - 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), - order: jspb.Message.getFieldWithDefault(msg, 11, 0), - voteScore: jspb.Message.getFieldWithDefault(msg, 16, 0), - description: msg.getDescription_asB64(), - url: msg.getUrl_asB64(), - freeAssetNetLimit: jspb.Message.getFieldWithDefault(msg, 22, 0), - publicFreeAssetNetLimit: jspb.Message.getFieldWithDefault(msg, 23, 0), - publicFreeAssetNetUsage: jspb.Message.getFieldWithDefault(msg, 24, 0), - publicLatestFreeNetTime: jspb.Message.getFieldWithDefault(msg, 25, 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.AssetIssueContract} - */ -proto.protocol.AssetIssueContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.AssetIssueContract; - return proto.protocol.AssetIssueContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.AssetIssueContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.AssetIssueContract} - */ -proto.protocol.AssetIssueContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - 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); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setName(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAbbr(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalSupply(value); - break; - case 5: - var value = new proto.protocol.AssetIssueContract.FrozenSupply; - reader.readMessage(value,proto.protocol.AssetIssueContract.FrozenSupply.deserializeBinaryFromReader); - msg.addFrozenSupply(value); - break; - case 6: - 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); - break; - case 9: - var value = /** @type {number} */ (reader.readInt64()); - msg.setStartTime(value); - break; - case 10: - 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); - break; - case 20: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setDescription(value); - break; - case 21: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setUrl(value); - break; - case 22: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFreeAssetNetLimit(value); - break; - case 23: - var value = /** @type {number} */ (reader.readInt64()); - msg.setPublicFreeAssetNetLimit(value); - break; - case 24: - var value = /** @type {number} */ (reader.readInt64()); - msg.setPublicFreeAssetNetUsage(value); - break; - case 25: - var value = /** @type {number} */ (reader.readInt64()); - msg.setPublicLatestFreeNetTime(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.AssetIssueContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.AssetIssueContract.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.AssetIssueContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -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( - 1, - f - ); - } - f = message.getName_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getAbbr_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getTotalSupply(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getFrozenSupplyList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 5, - f, - proto.protocol.AssetIssueContract.FrozenSupply.serializeBinaryToWriter - ); - } - f = message.getTrxNum(); - if (f !== 0) { - writer.writeInt32( - 6, - f - ); - } - f = message.getPrecision(); - if (f !== 0) { - writer.writeInt32( - 7, - f - ); - } - f = message.getNum(); - if (f !== 0) { - writer.writeInt32( - 8, - f - ); - } - f = message.getStartTime(); - if (f !== 0) { - writer.writeInt64( - 9, - f - ); - } - f = message.getEndTime(); - if (f !== 0) { - writer.writeInt64( - 10, - f - ); - } - f = message.getOrder(); - if (f !== 0) { - writer.writeInt64( - 11, - f - ); - } - f = message.getVoteScore(); - if (f !== 0) { - writer.writeInt32( - 16, - f - ); - } - f = message.getDescription_asU8(); - if (f.length > 0) { - writer.writeBytes( - 20, - f - ); - } - f = message.getUrl_asU8(); - if (f.length > 0) { - writer.writeBytes( - 21, - f - ); - } - f = message.getFreeAssetNetLimit(); - if (f !== 0) { - writer.writeInt64( - 22, - f - ); - } - f = message.getPublicFreeAssetNetLimit(); - if (f !== 0) { - writer.writeInt64( - 23, - f - ); - } - f = message.getPublicFreeAssetNetUsage(); - if (f !== 0) { - writer.writeInt64( - 24, - f - ); - } - f = message.getPublicLatestFreeNetTime(); - if (f !== 0) { - writer.writeInt64( - 25, - f - ); - } -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.AssetIssueContract.FrozenSupply.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.AssetIssueContract.FrozenSupply.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.AssetIssueContract.FrozenSupply} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.AssetIssueContract.FrozenSupply.toObject = function(includeInstance, msg) { - var f, obj = { - frozenAmount: jspb.Message.getFieldWithDefault(msg, 1, 0), - frozenDays: 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.AssetIssueContract.FrozenSupply} - */ -proto.protocol.AssetIssueContract.FrozenSupply.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.AssetIssueContract.FrozenSupply; - return proto.protocol.AssetIssueContract.FrozenSupply.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.AssetIssueContract.FrozenSupply} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.AssetIssueContract.FrozenSupply} - */ -proto.protocol.AssetIssueContract.FrozenSupply.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.setFrozenAmount(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFrozenDays(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.AssetIssueContract.FrozenSupply.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.AssetIssueContract.FrozenSupply.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.AssetIssueContract.FrozenSupply} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.AssetIssueContract.FrozenSupply.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFrozenAmount(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getFrozenDays(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } -}; - - -/** - * optional int64 frozen_amount = 1; - * @return {number} - */ -proto.protocol.AssetIssueContract.FrozenSupply.prototype.getFrozenAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.AssetIssueContract.FrozenSupply} returns this - */ -proto.protocol.AssetIssueContract.FrozenSupply.prototype.setFrozenAmount = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int64 frozen_days = 2; - * @return {number} - */ -proto.protocol.AssetIssueContract.FrozenSupply.prototype.getFrozenDays = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.AssetIssueContract.FrozenSupply} returns this - */ -proto.protocol.AssetIssueContract.FrozenSupply.prototype.setFrozenDays = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional string id = 41; - * @return {string} - */ -proto.protocol.AssetIssueContract.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 41, "")); -}; - - -/** - * @param {string} value - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 41, value); -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.AssetIssueContract.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.AssetIssueContract.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.AssetIssueContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes name = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.AssetIssueContract.prototype.getName = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes name = 2; - * This is a type-conversion wrapper around `getName()` - * @return {string} - */ -proto.protocol.AssetIssueContract.prototype.getName_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getName())); -}; - - -/** - * optional bytes name = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getName()` - * @return {!Uint8Array} - */ -proto.protocol.AssetIssueContract.prototype.getName_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getName())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setName = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional bytes abbr = 3; - * @return {!(string|Uint8Array)} - */ -proto.protocol.AssetIssueContract.prototype.getAbbr = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes abbr = 3; - * This is a type-conversion wrapper around `getAbbr()` - * @return {string} - */ -proto.protocol.AssetIssueContract.prototype.getAbbr_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAbbr())); -}; - - -/** - * optional bytes abbr = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAbbr()` - * @return {!Uint8Array} - */ -proto.protocol.AssetIssueContract.prototype.getAbbr_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAbbr())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setAbbr = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional int64 total_supply = 4; - * @return {number} - */ -proto.protocol.AssetIssueContract.prototype.getTotalSupply = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setTotalSupply = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * repeated FrozenSupply frozen_supply = 5; - * @return {!Array} - */ -proto.protocol.AssetIssueContract.prototype.getFrozenSupplyList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.AssetIssueContract.FrozenSupply, 5)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.AssetIssueContract} returns this -*/ -proto.protocol.AssetIssueContract.prototype.setFrozenSupplyList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 5, value); -}; - - -/** - * @param {!proto.protocol.AssetIssueContract.FrozenSupply=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.AssetIssueContract.FrozenSupply} - */ -proto.protocol.AssetIssueContract.prototype.addFrozenSupply = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.protocol.AssetIssueContract.FrozenSupply, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.clearFrozenSupplyList = function() { - return this.setFrozenSupplyList([]); -}; - - -/** - * optional int32 trx_num = 6; - * @return {number} - */ -proto.protocol.AssetIssueContract.prototype.getTrxNum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setTrxNum = function(value) { - return jspb.Message.setProto3IntField(this, 6, 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 - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setPrecision = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional int32 num = 8; - * @return {number} - */ -proto.protocol.AssetIssueContract.prototype.getNum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setNum = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional int64 start_time = 9; - * @return {number} - */ -proto.protocol.AssetIssueContract.prototype.getStartTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setStartTime = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * optional int64 end_time = 10; - * @return {number} - */ -proto.protocol.AssetIssueContract.prototype.getEndTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setEndTime = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setOrder = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); -}; - - -/** - * optional int32 vote_score = 16; - * @return {number} - */ -proto.protocol.AssetIssueContract.prototype.getVoteScore = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setVoteScore = function(value) { - return jspb.Message.setProto3IntField(this, 16, value); -}; - - -/** - * optional bytes description = 20; - * @return {!(string|Uint8Array)} - */ -proto.protocol.AssetIssueContract.prototype.getDescription = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 20, "")); -}; - - -/** - * optional bytes description = 20; - * This is a type-conversion wrapper around `getDescription()` - * @return {string} - */ -proto.protocol.AssetIssueContract.prototype.getDescription_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getDescription())); -}; - - -/** - * optional bytes description = 20; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getDescription()` - * @return {!Uint8Array} - */ -proto.protocol.AssetIssueContract.prototype.getDescription_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getDescription())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setDescription = function(value) { - return jspb.Message.setProto3BytesField(this, 20, value); -}; - - -/** - * optional bytes url = 21; - * @return {!(string|Uint8Array)} - */ -proto.protocol.AssetIssueContract.prototype.getUrl = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 21, "")); -}; - - -/** - * optional bytes url = 21; - * This is a type-conversion wrapper around `getUrl()` - * @return {string} - */ -proto.protocol.AssetIssueContract.prototype.getUrl_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getUrl())); -}; - - -/** - * optional bytes url = 21; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getUrl()` - * @return {!Uint8Array} - */ -proto.protocol.AssetIssueContract.prototype.getUrl_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getUrl())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setUrl = function(value) { - return jspb.Message.setProto3BytesField(this, 21, value); -}; - - -/** - * optional int64 free_asset_net_limit = 22; - * @return {number} - */ -proto.protocol.AssetIssueContract.prototype.getFreeAssetNetLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 22, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setFreeAssetNetLimit = function(value) { - return jspb.Message.setProto3IntField(this, 22, value); -}; - - -/** - * optional int64 public_free_asset_net_limit = 23; - * @return {number} - */ -proto.protocol.AssetIssueContract.prototype.getPublicFreeAssetNetLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 23, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setPublicFreeAssetNetLimit = function(value) { - return jspb.Message.setProto3IntField(this, 23, value); -}; - - -/** - * optional int64 public_free_asset_net_usage = 24; - * @return {number} - */ -proto.protocol.AssetIssueContract.prototype.getPublicFreeAssetNetUsage = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 24, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setPublicFreeAssetNetUsage = function(value) { - return jspb.Message.setProto3IntField(this, 24, value); -}; - - -/** - * optional int64 public_latest_free_net_time = 25; - * @return {number} - */ -proto.protocol.AssetIssueContract.prototype.getPublicLatestFreeNetTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 25, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setPublicLatestFreeNetTime = function(value) { - return jspb.Message.setProto3IntField(this, 25, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.ParticipateAssetIssueContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.ParticipateAssetIssueContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.ParticipateAssetIssueContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.ParticipateAssetIssueContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - toAddress: msg.getToAddress_asB64(), - assetName: msg.getAssetName_asB64(), - amount: 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.ParticipateAssetIssueContract} - */ -proto.protocol.ParticipateAssetIssueContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.ParticipateAssetIssueContract; - return proto.protocol.ParticipateAssetIssueContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.ParticipateAssetIssueContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.ParticipateAssetIssueContract} - */ -proto.protocol.ParticipateAssetIssueContract.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.setToAddress(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAssetName(value); - break; - case 4: - 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.ParticipateAssetIssueContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.ParticipateAssetIssueContract.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.ParticipateAssetIssueContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.ParticipateAssetIssueContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getToAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getAssetName_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.ParticipateAssetIssueContract.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.ParticipateAssetIssueContract.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.ParticipateAssetIssueContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.ParticipateAssetIssueContract} returns this - */ -proto.protocol.ParticipateAssetIssueContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes to_address = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.ParticipateAssetIssueContract.prototype.getToAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes to_address = 2; - * This is a type-conversion wrapper around `getToAddress()` - * @return {string} - */ -proto.protocol.ParticipateAssetIssueContract.prototype.getToAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getToAddress())); -}; - - -/** - * optional bytes to_address = 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.ParticipateAssetIssueContract.prototype.getToAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getToAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.ParticipateAssetIssueContract} returns this - */ -proto.protocol.ParticipateAssetIssueContract.prototype.setToAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional bytes asset_name = 3; - * @return {!(string|Uint8Array)} - */ -proto.protocol.ParticipateAssetIssueContract.prototype.getAssetName = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes asset_name = 3; - * This is a type-conversion wrapper around `getAssetName()` - * @return {string} - */ -proto.protocol.ParticipateAssetIssueContract.prototype.getAssetName_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAssetName())); -}; - - -/** - * optional bytes asset_name = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAssetName()` - * @return {!Uint8Array} - */ -proto.protocol.ParticipateAssetIssueContract.prototype.getAssetName_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAssetName())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.ParticipateAssetIssueContract} returns this - */ -proto.protocol.ParticipateAssetIssueContract.prototype.setAssetName = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional int64 amount = 4; - * @return {number} - */ -proto.protocol.ParticipateAssetIssueContract.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.ParticipateAssetIssueContract} returns this - */ -proto.protocol.ParticipateAssetIssueContract.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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), - resource: jspb.Message.getFieldWithDefault(msg, 10, 0), - receiverAddress: msg.getReceiverAddress_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.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; - case 10: - 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; - } - } - 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(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getFrozenDuration(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getResource(); - if (f !== 0.0) { - writer.writeEnum( - 10, - f - ); - } - f = message.getReceiverAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 15, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.FreezeBalanceContract.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.FreezeBalanceContract.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.FreezeBalanceContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.FreezeBalanceContract} returns this - */ -proto.protocol.FreezeBalanceContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int64 frozen_balance = 2; - * @return {number} - */ -proto.protocol.FreezeBalanceContract.prototype.getFrozenBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.FreezeBalanceContract} returns this - */ -proto.protocol.FreezeBalanceContract.prototype.setFrozenBalance = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int64 frozen_duration = 3; - * @return {number} - */ -proto.protocol.FreezeBalanceContract.prototype.getFrozenDuration = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.FreezeBalanceContract} returns this - */ -proto.protocol.FreezeBalanceContract.prototype.setFrozenDuration = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.FreezeBalanceContract} returns this - */ -proto.protocol.FreezeBalanceContract.prototype.setResource = function(value) { - return jspb.Message.setProto3EnumField(this, 10, 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 - * @return {!proto.protocol.FreezeBalanceContract} returns this - */ -proto.protocol.FreezeBalanceContract.prototype.setReceiverAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 15, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.UnfreezeBalanceContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.UnfreezeBalanceContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.UnfreezeBalanceContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -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() - }; - - 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.UnfreezeBalanceContract} - */ -proto.protocol.UnfreezeBalanceContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.UnfreezeBalanceContract; - return proto.protocol.UnfreezeBalanceContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.UnfreezeBalanceContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.UnfreezeBalanceContract} - */ -proto.protocol.UnfreezeBalanceContract.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 10: - 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; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.UnfreezeBalanceContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.UnfreezeBalanceContract.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.UnfreezeBalanceContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.UnfreezeBalanceContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getResource(); - if (f !== 0.0) { - writer.writeEnum( - 10, - f - ); - } - f = message.getReceiverAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 15, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.UnfreezeBalanceContract.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.UnfreezeBalanceContract.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.UnfreezeBalanceContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.UnfreezeBalanceContract} returns this - */ -proto.protocol.UnfreezeBalanceContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.UnfreezeBalanceContract} returns this - */ -proto.protocol.UnfreezeBalanceContract.prototype.setResource = function(value) { - return jspb.Message.setProto3EnumField(this, 10, 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 - * @return {!proto.protocol.UnfreezeBalanceContract} returns this - */ -proto.protocol.UnfreezeBalanceContract.prototype.setReceiverAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 15, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.UnfreezeAssetContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.UnfreezeAssetContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.UnfreezeAssetContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.UnfreezeAssetContract.toObject = function(includeInstance, msg) { - var f, obj = { - 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.UnfreezeAssetContract} - */ -proto.protocol.UnfreezeAssetContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.UnfreezeAssetContract; - return proto.protocol.UnfreezeAssetContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.UnfreezeAssetContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.UnfreezeAssetContract} - */ -proto.protocol.UnfreezeAssetContract.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; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.UnfreezeAssetContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.UnfreezeAssetContract.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.UnfreezeAssetContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.UnfreezeAssetContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.UnfreezeAssetContract.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.UnfreezeAssetContract.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.UnfreezeAssetContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.UnfreezeAssetContract} returns this - */ -proto.protocol.UnfreezeAssetContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.WithdrawBalanceContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.WithdrawBalanceContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.WithdrawBalanceContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.WithdrawBalanceContract.toObject = function(includeInstance, msg) { - var f, obj = { - 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.WithdrawBalanceContract} - */ -proto.protocol.WithdrawBalanceContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.WithdrawBalanceContract; - return proto.protocol.WithdrawBalanceContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.WithdrawBalanceContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.WithdrawBalanceContract} - */ -proto.protocol.WithdrawBalanceContract.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; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.WithdrawBalanceContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.WithdrawBalanceContract.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.WithdrawBalanceContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.WithdrawBalanceContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.WithdrawBalanceContract.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.WithdrawBalanceContract.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.WithdrawBalanceContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.WithdrawBalanceContract} returns this - */ -proto.protocol.WithdrawBalanceContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.UpdateAssetContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.UpdateAssetContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.UpdateAssetContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.UpdateAssetContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - description: msg.getDescription_asB64(), - url: msg.getUrl_asB64(), - newLimit: jspb.Message.getFieldWithDefault(msg, 4, 0), - newPublicLimit: 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.UpdateAssetContract} - */ -proto.protocol.UpdateAssetContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.UpdateAssetContract; - return proto.protocol.UpdateAssetContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.UpdateAssetContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.UpdateAssetContract} - */ -proto.protocol.UpdateAssetContract.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.setDescription(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setUrl(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setNewLimit(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setNewPublicLimit(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.UpdateAssetContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.UpdateAssetContract.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.UpdateAssetContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.UpdateAssetContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getDescription_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getUrl_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getNewLimit(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getNewPublicLimit(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.UpdateAssetContract.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.UpdateAssetContract.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.UpdateAssetContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.UpdateAssetContract} returns this - */ -proto.protocol.UpdateAssetContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes description = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.UpdateAssetContract.prototype.getDescription = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes description = 2; - * This is a type-conversion wrapper around `getDescription()` - * @return {string} - */ -proto.protocol.UpdateAssetContract.prototype.getDescription_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getDescription())); -}; - - -/** - * optional bytes description = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getDescription()` - * @return {!Uint8Array} - */ -proto.protocol.UpdateAssetContract.prototype.getDescription_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getDescription())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.UpdateAssetContract} returns this - */ -proto.protocol.UpdateAssetContract.prototype.setDescription = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional bytes url = 3; - * @return {!(string|Uint8Array)} - */ -proto.protocol.UpdateAssetContract.prototype.getUrl = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes url = 3; - * This is a type-conversion wrapper around `getUrl()` - * @return {string} - */ -proto.protocol.UpdateAssetContract.prototype.getUrl_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getUrl())); -}; - - -/** - * optional bytes url = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getUrl()` - * @return {!Uint8Array} - */ -proto.protocol.UpdateAssetContract.prototype.getUrl_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getUrl())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.UpdateAssetContract} returns this - */ -proto.protocol.UpdateAssetContract.prototype.setUrl = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional int64 new_limit = 4; - * @return {number} - */ -proto.protocol.UpdateAssetContract.prototype.getNewLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.UpdateAssetContract} returns this - */ -proto.protocol.UpdateAssetContract.prototype.setNewLimit = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional int64 new_public_limit = 5; - * @return {number} - */ -proto.protocol.UpdateAssetContract.prototype.getNewPublicLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.UpdateAssetContract} returns this - */ -proto.protocol.UpdateAssetContract.prototype.setNewPublicLimit = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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, null, 0, 0); - }); - 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 - * @return {!proto.protocol.ProposalCreateContract} returns this - */ -proto.protocol.ProposalCreateContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(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)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.protocol.ProposalCreateContract} returns this - */ -proto.protocol.ProposalCreateContract.prototype.clearParametersMap = function() { - this.getParametersMap().clear(); - return this;}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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.getBooleanFieldWithDefault(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 - * @return {!proto.protocol.ProposalApproveContract} returns this - */ -proto.protocol.ProposalApproveContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.ProposalApproveContract} returns this - */ -proto.protocol.ProposalApproveContract.prototype.setProposalId = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bool is_add_approval = 3; - * @return {boolean} - */ -proto.protocol.ProposalApproveContract.prototype.getIsAddApproval = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.protocol.ProposalApproveContract} returns this - */ -proto.protocol.ProposalApproveContract.prototype.setIsAddApproval = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.ProposalDeleteContract} returns this - */ -proto.protocol.ProposalDeleteContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.ProposalDeleteContract} returns this - */ -proto.protocol.ProposalDeleteContract.prototype.setProposalId = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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()) && protos_protocol_core_Tron_pb.SmartContract.toObject(includeInstance, f), - callTokenValue: jspb.Message.getFieldWithDefault(msg, 3, 0), - tokenId: 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.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 protos_protocol_core_Tron_pb.SmartContract; - reader.readMessage(value,protos_protocol_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; - } - } - 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, - protos_protocol_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 - ); - } -}; - - -/** - * 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 - * @return {!proto.protocol.CreateSmartContract} returns this - */ -proto.protocol.CreateSmartContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(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, protos_protocol_core_Tron_pb.SmartContract, 2)); -}; - - -/** - * @param {?proto.protocol.SmartContract|undefined} value - * @return {!proto.protocol.CreateSmartContract} returns this -*/ -proto.protocol.CreateSmartContract.prototype.setNewContract = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.CreateSmartContract} returns this - */ -proto.protocol.CreateSmartContract.prototype.clearNewContract = function() { - return this.setNewContract(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.CreateSmartContract.prototype.hasNewContract = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * 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 - * @return {!proto.protocol.CreateSmartContract} returns this - */ -proto.protocol.CreateSmartContract.prototype.setCallTokenValue = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.CreateSmartContract} returns this - */ -proto.protocol.CreateSmartContract.prototype.setTokenId = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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(), - callTokenValue: jspb.Message.getFieldWithDefault(msg, 5, 0), - tokenId: jspb.Message.getFieldWithDefault(msg, 6, 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.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; - 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; - } - } - 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 - ); - } - f = message.getCallTokenValue(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getTokenId(); - if (f !== 0) { - writer.writeInt64( - 6, - 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 - * @return {!proto.protocol.TriggerSmartContract} returns this - */ -proto.protocol.TriggerSmartContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.TriggerSmartContract} returns this - */ -proto.protocol.TriggerSmartContract.prototype.setContractAddress = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.TriggerSmartContract} returns this - */ -proto.protocol.TriggerSmartContract.prototype.setCallValue = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.TriggerSmartContract} returns this - */ -proto.protocol.TriggerSmartContract.prototype.setData = function(value) { - return jspb.Message.setProto3BytesField(this, 4, 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 - * @return {!proto.protocol.TriggerSmartContract} returns this - */ -proto.protocol.TriggerSmartContract.prototype.setCallTokenValue = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.TriggerSmartContract} returns this - */ -proto.protocol.TriggerSmartContract.prototype.setTokenId = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.BuyStorageContract} returns this - */ -proto.protocol.BuyStorageContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.BuyStorageContract} returns this - */ -proto.protocol.BuyStorageContract.prototype.setQuant = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.BuyStorageBytesContract} returns this - */ -proto.protocol.BuyStorageBytesContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.BuyStorageBytesContract} returns this - */ -proto.protocol.BuyStorageBytesContract.prototype.setBytes = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.SellStorageContract} returns this - */ -proto.protocol.SellStorageContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.SellStorageContract} returns this - */ -proto.protocol.SellStorageContract.prototype.setStorageBytes = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.ExchangeCreateContract} returns this - */ -proto.protocol.ExchangeCreateContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.ExchangeCreateContract} returns this - */ -proto.protocol.ExchangeCreateContract.prototype.setFirstTokenId = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.ExchangeCreateContract} returns this - */ -proto.protocol.ExchangeCreateContract.prototype.setFirstTokenBalance = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.ExchangeCreateContract} returns this - */ -proto.protocol.ExchangeCreateContract.prototype.setSecondTokenId = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.ExchangeCreateContract} returns this - */ -proto.protocol.ExchangeCreateContract.prototype.setSecondTokenBalance = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.ExchangeInjectContract} returns this - */ -proto.protocol.ExchangeInjectContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.ExchangeInjectContract} returns this - */ -proto.protocol.ExchangeInjectContract.prototype.setExchangeId = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.ExchangeInjectContract} returns this - */ -proto.protocol.ExchangeInjectContract.prototype.setTokenId = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.ExchangeInjectContract} returns this - */ -proto.protocol.ExchangeInjectContract.prototype.setQuant = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.ExchangeWithdrawContract} returns this - */ -proto.protocol.ExchangeWithdrawContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.ExchangeWithdrawContract} returns this - */ -proto.protocol.ExchangeWithdrawContract.prototype.setExchangeId = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.ExchangeWithdrawContract} returns this - */ -proto.protocol.ExchangeWithdrawContract.prototype.setTokenId = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.ExchangeWithdrawContract} returns this - */ -proto.protocol.ExchangeWithdrawContract.prototype.setQuant = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.ExchangeTransactionContract} returns this - */ -proto.protocol.ExchangeTransactionContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.ExchangeTransactionContract} returns this - */ -proto.protocol.ExchangeTransactionContract.prototype.setExchangeId = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.ExchangeTransactionContract} returns this - */ -proto.protocol.ExchangeTransactionContract.prototype.setTokenId = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.ExchangeTransactionContract} returns this - */ -proto.protocol.ExchangeTransactionContract.prototype.setQuant = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.ExchangeTransactionContract} returns this - */ -proto.protocol.ExchangeTransactionContract.prototype.setExpected = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * @enum {number} - */ -proto.protocol.ResourceCode = { - BANDWIDTH: 0, - ENERGY: 1 -}; - -goog.object.extend(exports, proto.protocol); diff --git a/js/protos/protocol/core/Discover_pb.js b/js/protos/protocol/core/Discover_pb.js deleted file mode 100644 index 869938a..0000000 --- a/js/protos/protocol/core/Discover_pb.js +++ /dev/null @@ -1,1494 +0,0 @@ -// source: protos/protocol/core/Discover.proto -/** - * @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')(); - -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); -goog.exportSymbol('proto.protocol.PingMessage', null, global); -goog.exportSymbol('proto.protocol.PongMessage', 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.Endpoint = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.Endpoint, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.Endpoint.displayName = 'proto.protocol.Endpoint'; -} -/** - * 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.PingMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.PingMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.PingMessage.displayName = 'proto.protocol.PingMessage'; -} -/** - * 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.PongMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.PongMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.PongMessage.displayName = 'proto.protocol.PongMessage'; -} -/** - * 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.FindNeighbours = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.FindNeighbours, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.FindNeighbours.displayName = 'proto.protocol.FindNeighbours'; -} -/** - * 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.Neighbours = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.Neighbours.repeatedFields_, null); -}; -goog.inherits(proto.protocol.Neighbours, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.Neighbours.displayName = 'proto.protocol.Neighbours'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.BackupMessage.displayName = 'proto.protocol.BackupMessage'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.Endpoint.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Endpoint.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.Endpoint} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Endpoint.toObject = function(includeInstance, msg) { - var f, obj = { - address: msg.getAddress_asB64(), - port: jspb.Message.getFieldWithDefault(msg, 2, 0), - nodeid: msg.getNodeid_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.Endpoint} - */ -proto.protocol.Endpoint.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Endpoint; - return proto.protocol.Endpoint.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.Endpoint} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Endpoint} - */ -proto.protocol.Endpoint.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.readInt32()); - msg.setPort(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setNodeid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.Endpoint.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.Endpoint.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.Endpoint} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Endpoint.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getPort(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } - f = message.getNodeid_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } -}; - - -/** - * optional bytes address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Endpoint.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.Endpoint.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.Endpoint.prototype.getAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Endpoint} returns this - */ -proto.protocol.Endpoint.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int32 port = 2; - * @return {number} - */ -proto.protocol.Endpoint.prototype.getPort = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Endpoint} returns this - */ -proto.protocol.Endpoint.prototype.setPort = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bytes nodeId = 3; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Endpoint.prototype.getNodeid = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes nodeId = 3; - * This is a type-conversion wrapper around `getNodeid()` - * @return {string} - */ -proto.protocol.Endpoint.prototype.getNodeid_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getNodeid())); -}; - - -/** - * optional bytes nodeId = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getNodeid()` - * @return {!Uint8Array} - */ -proto.protocol.Endpoint.prototype.getNodeid_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getNodeid())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Endpoint} returns this - */ -proto.protocol.Endpoint.prototype.setNodeid = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.PingMessage.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.PingMessage.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.PingMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.PingMessage.toObject = function(includeInstance, msg) { - var f, obj = { - from: (f = msg.getFrom()) && proto.protocol.Endpoint.toObject(includeInstance, f), - to: (f = msg.getTo()) && proto.protocol.Endpoint.toObject(includeInstance, f), - version: jspb.Message.getFieldWithDefault(msg, 3, 0), - timestamp: 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.PingMessage} - */ -proto.protocol.PingMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.PingMessage; - return proto.protocol.PingMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.PingMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.PingMessage} - */ -proto.protocol.PingMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.protocol.Endpoint; - reader.readMessage(value,proto.protocol.Endpoint.deserializeBinaryFromReader); - msg.setFrom(value); - break; - case 2: - var value = new proto.protocol.Endpoint; - reader.readMessage(value,proto.protocol.Endpoint.deserializeBinaryFromReader); - msg.setTo(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt32()); - msg.setVersion(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTimestamp(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.PingMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.PingMessage.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.PingMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.PingMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFrom(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.protocol.Endpoint.serializeBinaryToWriter - ); - } - f = message.getTo(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.protocol.Endpoint.serializeBinaryToWriter - ); - } - f = message.getVersion(); - if (f !== 0) { - writer.writeInt32( - 3, - f - ); - } - f = message.getTimestamp(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } -}; - - -/** - * optional Endpoint from = 1; - * @return {?proto.protocol.Endpoint} - */ -proto.protocol.PingMessage.prototype.getFrom = function() { - return /** @type{?proto.protocol.Endpoint} */ ( - jspb.Message.getWrapperField(this, proto.protocol.Endpoint, 1)); -}; - - -/** - * @param {?proto.protocol.Endpoint|undefined} value - * @return {!proto.protocol.PingMessage} returns this -*/ -proto.protocol.PingMessage.prototype.setFrom = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.PingMessage} returns this - */ -proto.protocol.PingMessage.prototype.clearFrom = function() { - return this.setFrom(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.PingMessage.prototype.hasFrom = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional Endpoint to = 2; - * @return {?proto.protocol.Endpoint} - */ -proto.protocol.PingMessage.prototype.getTo = function() { - return /** @type{?proto.protocol.Endpoint} */ ( - jspb.Message.getWrapperField(this, proto.protocol.Endpoint, 2)); -}; - - -/** - * @param {?proto.protocol.Endpoint|undefined} value - * @return {!proto.protocol.PingMessage} returns this -*/ -proto.protocol.PingMessage.prototype.setTo = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.PingMessage} returns this - */ -proto.protocol.PingMessage.prototype.clearTo = function() { - return this.setTo(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.PingMessage.prototype.hasTo = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional int32 version = 3; - * @return {number} - */ -proto.protocol.PingMessage.prototype.getVersion = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.PingMessage} returns this - */ -proto.protocol.PingMessage.prototype.setVersion = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int64 timestamp = 4; - * @return {number} - */ -proto.protocol.PingMessage.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.PingMessage} returns this - */ -proto.protocol.PingMessage.prototype.setTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.PongMessage.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.PongMessage.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.PongMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.PongMessage.toObject = function(includeInstance, msg) { - var f, obj = { - from: (f = msg.getFrom()) && proto.protocol.Endpoint.toObject(includeInstance, f), - echo: jspb.Message.getFieldWithDefault(msg, 2, 0), - timestamp: 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.PongMessage} - */ -proto.protocol.PongMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.PongMessage; - return proto.protocol.PongMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.PongMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.PongMessage} - */ -proto.protocol.PongMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.protocol.Endpoint; - reader.readMessage(value,proto.protocol.Endpoint.deserializeBinaryFromReader); - msg.setFrom(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setEcho(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTimestamp(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.PongMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.PongMessage.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.PongMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.PongMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFrom(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.protocol.Endpoint.serializeBinaryToWriter - ); - } - f = message.getEcho(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } - f = message.getTimestamp(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } -}; - - -/** - * optional Endpoint from = 1; - * @return {?proto.protocol.Endpoint} - */ -proto.protocol.PongMessage.prototype.getFrom = function() { - return /** @type{?proto.protocol.Endpoint} */ ( - jspb.Message.getWrapperField(this, proto.protocol.Endpoint, 1)); -}; - - -/** - * @param {?proto.protocol.Endpoint|undefined} value - * @return {!proto.protocol.PongMessage} returns this -*/ -proto.protocol.PongMessage.prototype.setFrom = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.PongMessage} returns this - */ -proto.protocol.PongMessage.prototype.clearFrom = function() { - return this.setFrom(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.PongMessage.prototype.hasFrom = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional int32 echo = 2; - * @return {number} - */ -proto.protocol.PongMessage.prototype.getEcho = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.PongMessage} returns this - */ -proto.protocol.PongMessage.prototype.setEcho = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int64 timestamp = 3; - * @return {number} - */ -proto.protocol.PongMessage.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.PongMessage} returns this - */ -proto.protocol.PongMessage.prototype.setTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.FindNeighbours.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.FindNeighbours.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.FindNeighbours} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.FindNeighbours.toObject = function(includeInstance, msg) { - var f, obj = { - from: (f = msg.getFrom()) && proto.protocol.Endpoint.toObject(includeInstance, f), - targetid: msg.getTargetid_asB64(), - timestamp: 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.FindNeighbours} - */ -proto.protocol.FindNeighbours.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.FindNeighbours; - return proto.protocol.FindNeighbours.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.FindNeighbours} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.FindNeighbours} - */ -proto.protocol.FindNeighbours.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.protocol.Endpoint; - reader.readMessage(value,proto.protocol.Endpoint.deserializeBinaryFromReader); - msg.setFrom(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTargetid(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTimestamp(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.FindNeighbours.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.FindNeighbours.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.FindNeighbours} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.FindNeighbours.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFrom(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.protocol.Endpoint.serializeBinaryToWriter - ); - } - f = message.getTargetid_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getTimestamp(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } -}; - - -/** - * optional Endpoint from = 1; - * @return {?proto.protocol.Endpoint} - */ -proto.protocol.FindNeighbours.prototype.getFrom = function() { - return /** @type{?proto.protocol.Endpoint} */ ( - jspb.Message.getWrapperField(this, proto.protocol.Endpoint, 1)); -}; - - -/** - * @param {?proto.protocol.Endpoint|undefined} value - * @return {!proto.protocol.FindNeighbours} returns this -*/ -proto.protocol.FindNeighbours.prototype.setFrom = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.FindNeighbours} returns this - */ -proto.protocol.FindNeighbours.prototype.clearFrom = function() { - return this.setFrom(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.FindNeighbours.prototype.hasFrom = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes targetId = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.FindNeighbours.prototype.getTargetid = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes targetId = 2; - * This is a type-conversion wrapper around `getTargetid()` - * @return {string} - */ -proto.protocol.FindNeighbours.prototype.getTargetid_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTargetid())); -}; - - -/** - * optional bytes targetId = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTargetid()` - * @return {!Uint8Array} - */ -proto.protocol.FindNeighbours.prototype.getTargetid_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTargetid())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.FindNeighbours} returns this - */ -proto.protocol.FindNeighbours.prototype.setTargetid = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional int64 timestamp = 3; - * @return {number} - */ -proto.protocol.FindNeighbours.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.FindNeighbours} returns this - */ -proto.protocol.FindNeighbours.prototype.setTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.Neighbours.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.Neighbours.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Neighbours.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.Neighbours} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Neighbours.toObject = function(includeInstance, msg) { - var f, obj = { - from: (f = msg.getFrom()) && proto.protocol.Endpoint.toObject(includeInstance, f), - neighboursList: jspb.Message.toObjectList(msg.getNeighboursList(), - proto.protocol.Endpoint.toObject, includeInstance), - timestamp: 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.Neighbours} - */ -proto.protocol.Neighbours.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Neighbours; - return proto.protocol.Neighbours.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.Neighbours} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Neighbours} - */ -proto.protocol.Neighbours.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.protocol.Endpoint; - reader.readMessage(value,proto.protocol.Endpoint.deserializeBinaryFromReader); - msg.setFrom(value); - break; - case 2: - var value = new proto.protocol.Endpoint; - reader.readMessage(value,proto.protocol.Endpoint.deserializeBinaryFromReader); - msg.addNeighbours(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTimestamp(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.Neighbours.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.Neighbours.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.Neighbours} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Neighbours.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFrom(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.protocol.Endpoint.serializeBinaryToWriter - ); - } - f = message.getNeighboursList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.protocol.Endpoint.serializeBinaryToWriter - ); - } - f = message.getTimestamp(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } -}; - - -/** - * optional Endpoint from = 1; - * @return {?proto.protocol.Endpoint} - */ -proto.protocol.Neighbours.prototype.getFrom = function() { - return /** @type{?proto.protocol.Endpoint} */ ( - jspb.Message.getWrapperField(this, proto.protocol.Endpoint, 1)); -}; - - -/** - * @param {?proto.protocol.Endpoint|undefined} value - * @return {!proto.protocol.Neighbours} returns this -*/ -proto.protocol.Neighbours.prototype.setFrom = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.Neighbours} returns this - */ -proto.protocol.Neighbours.prototype.clearFrom = function() { - return this.setFrom(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.Neighbours.prototype.hasFrom = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * repeated Endpoint neighbours = 2; - * @return {!Array} - */ -proto.protocol.Neighbours.prototype.getNeighboursList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.Endpoint, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.Neighbours} returns this -*/ -proto.protocol.Neighbours.prototype.setNeighboursList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.protocol.Endpoint=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.Endpoint} - */ -proto.protocol.Neighbours.prototype.addNeighbours = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.protocol.Endpoint, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.Neighbours} returns this - */ -proto.protocol.Neighbours.prototype.clearNeighboursList = function() { - return this.setNeighboursList([]); -}; - - -/** - * optional int64 timestamp = 3; - * @return {number} - */ -proto.protocol.Neighbours.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Neighbours} returns this - */ -proto.protocol.Neighbours.prototype.setTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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.getBooleanFieldWithDefault(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; - * @return {boolean} - */ -proto.protocol.BackupMessage.prototype.getFlag = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.protocol.BackupMessage} returns this - */ -proto.protocol.BackupMessage.prototype.setFlag = function(value) { - return 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 - * @return {!proto.protocol.BackupMessage} returns this - */ -proto.protocol.BackupMessage.prototype.setPriority = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -goog.object.extend(exports, proto.protocol); diff --git a/js/protos/protocol/core/TronInventoryItems_pb.js b/js/protos/protocol/core/TronInventoryItems_pb.js deleted file mode 100644 index 15c743b..0000000 --- a/js/protos/protocol/core/TronInventoryItems_pb.js +++ /dev/null @@ -1,247 +0,0 @@ -// source: protos/protocol/core/TronInventoryItems.proto -/** - * @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')(); - -goog.exportSymbol('proto.protocol.InventoryItems', 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.InventoryItems = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.InventoryItems.repeatedFields_, null); -}; -goog.inherits(proto.protocol.InventoryItems, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.InventoryItems.displayName = 'proto.protocol.InventoryItems'; -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.InventoryItems.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.InventoryItems.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.InventoryItems.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.InventoryItems} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.InventoryItems.toObject = function(includeInstance, msg) { - var f, obj = { - type: jspb.Message.getFieldWithDefault(msg, 1, 0), - itemsList: msg.getItemsList_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.InventoryItems} - */ -proto.protocol.InventoryItems.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.InventoryItems; - return proto.protocol.InventoryItems.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.InventoryItems} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.InventoryItems} - */ -proto.protocol.InventoryItems.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setType(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addItems(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.InventoryItems.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.InventoryItems.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.InventoryItems} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.InventoryItems.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getType(); - if (f !== 0) { - writer.writeInt32( - 1, - f - ); - } - f = message.getItemsList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 2, - f - ); - } -}; - - -/** - * optional int32 type = 1; - * @return {number} - */ -proto.protocol.InventoryItems.prototype.getType = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.InventoryItems} returns this - */ -proto.protocol.InventoryItems.prototype.setType = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * repeated bytes items = 2; - * @return {!(Array|Array)} - */ -proto.protocol.InventoryItems.prototype.getItemsList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 2)); -}; - - -/** - * repeated bytes items = 2; - * This is a type-conversion wrapper around `getItemsList()` - * @return {!Array} - */ -proto.protocol.InventoryItems.prototype.getItemsList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getItemsList())); -}; - - -/** - * repeated bytes items = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getItemsList()` - * @return {!Array} - */ -proto.protocol.InventoryItems.prototype.getItemsList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getItemsList())); -}; - - -/** - * @param {!(Array|Array)} value - * @return {!proto.protocol.InventoryItems} returns this - */ -proto.protocol.InventoryItems.prototype.setItemsList = function(value) { - return jspb.Message.setField(this, 2, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.protocol.InventoryItems} returns this - */ -proto.protocol.InventoryItems.prototype.addItems = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.InventoryItems} returns this - */ -proto.protocol.InventoryItems.prototype.clearItemsList = function() { - return this.setItemsList([]); -}; - - -goog.object.extend(exports, proto.protocol); diff --git a/js/protos/protocol/core/Tron_pb.js b/js/protos/protocol/core/Tron_pb.js deleted file mode 100644 index 862eff9..0000000 --- a/js/protos/protocol/core/Tron_pb.js +++ /dev/null @@ -1,14928 +0,0 @@ -// source: protos/protocol/core/Tron.proto -/** - * @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 google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); -goog.object.extend(proto, google_protobuf_any_pb); -var protos_protocol_core_Discover_pb = require('../../../protos/protocol/core/Discover_pb.js'); -goog.object.extend(proto, protos_protocol_core_Discover_pb); -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); -goog.exportSymbol('proto.protocol.Block', null, global); -goog.exportSymbol('proto.protocol.BlockHeader', null, global); -goog.exportSymbol('proto.protocol.BlockHeader.raw', null, global); -goog.exportSymbol('proto.protocol.BlockInventory', null, global); -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.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); -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.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); -goog.exportSymbol('proto.protocol.TXOutputs', null, global); -goog.exportSymbol('proto.protocol.Transaction', null, global); -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.authority', null, global); -goog.exportSymbol('proto.protocol.permission', 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.AccountId = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.AccountId, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.AccountId.displayName = 'proto.protocol.AccountId'; -} -/** - * 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.Vote = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.Vote, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.Vote.displayName = 'proto.protocol.Vote'; -} -/** - * 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.Proposal = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.Proposal.repeatedFields_, null); -}; -goog.inherits(proto.protocol.Proposal, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.Proposal.displayName = 'proto.protocol.Proposal'; -} -/** - * 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.Exchange = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.Exchange, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.Exchange.displayName = 'proto.protocol.Exchange'; -} -/** - * 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.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) { - /** - * @public - * @override - */ - proto.protocol.ChainParameters.displayName = 'proto.protocol.ChainParameters'; -} -/** - * 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.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) { - /** - * @public - * @override - */ - proto.protocol.ChainParameters.ChainParameter.displayName = 'proto.protocol.ChainParameters.ChainParameter'; -} -/** - * 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 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.Account.repeatedFields_, null); -}; -goog.inherits(proto.protocol.Account, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.Account.displayName = 'proto.protocol.Account'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.Account.Frozen.displayName = 'proto.protocol.Account.Frozen'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.Account.AccountResource.displayName = 'proto.protocol.Account.AccountResource'; -} -/** - * 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.DelegatedResource = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.DelegatedResource, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.DelegatedResource.displayName = 'proto.protocol.DelegatedResource'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.authority.displayName = 'proto.protocol.authority'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.permission.displayName = 'proto.protocol.permission'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.Witness.displayName = 'proto.protocol.Witness'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.Votes.displayName = 'proto.protocol.Votes'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.TXOutput.displayName = 'proto.protocol.TXOutput'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.TXInput.displayName = 'proto.protocol.TXInput'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.TXInput.raw.displayName = 'proto.protocol.TXInput.raw'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.TXOutputs.displayName = 'proto.protocol.TXOutputs'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.ResourceReceipt.displayName = 'proto.protocol.ResourceReceipt'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.Transaction.displayName = 'proto.protocol.Transaction'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.Transaction.Contract.displayName = 'proto.protocol.Transaction.Contract'; -} -/** - * 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.Result = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.Transaction.Result, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.Transaction.Result.displayName = 'proto.protocol.Transaction.Result'; -} -/** - * 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 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.Transaction.raw.repeatedFields_, null); -}; -goog.inherits(proto.protocol.Transaction.raw, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.Transaction.raw.displayName = 'proto.protocol.Transaction.raw'; -} -/** - * 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.TransactionInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.TransactionInfo.repeatedFields_, null); -}; -goog.inherits(proto.protocol.TransactionInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.TransactionInfo.displayName = 'proto.protocol.TransactionInfo'; -} -/** - * 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.TransactionInfo.Log = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.TransactionInfo.Log.repeatedFields_, null); -}; -goog.inherits(proto.protocol.TransactionInfo.Log, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.TransactionInfo.Log.displayName = 'proto.protocol.TransactionInfo.Log'; -} -/** - * 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.Transactions = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.Transactions.repeatedFields_, null); -}; -goog.inherits(proto.protocol.Transactions, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.Transactions.displayName = 'proto.protocol.Transactions'; -} -/** - * 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.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) { - /** - * @public - * @override - */ - proto.protocol.TransactionSign.displayName = 'proto.protocol.TransactionSign'; -} -/** - * 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 = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.BlockHeader, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.BlockHeader.displayName = '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.BlockHeader.raw = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.BlockHeader.raw, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.BlockHeader.raw.displayName = 'proto.protocol.BlockHeader.raw'; -} -/** - * 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.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) { - /** - * @public - * @override - */ - proto.protocol.Block.displayName = 'proto.protocol.Block'; -} -/** - * 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.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) { - /** - * @public - * @override - */ - proto.protocol.ChainInventory.displayName = 'proto.protocol.ChainInventory'; -} -/** - * 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.ChainInventory.BlockId = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.ChainInventory.BlockId, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.ChainInventory.BlockId.displayName = 'proto.protocol.ChainInventory.BlockId'; -} -/** - * 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.BlockInventory = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.BlockInventory.repeatedFields_, null); -}; -goog.inherits(proto.protocol.BlockInventory, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.BlockInventory.displayName = 'proto.protocol.BlockInventory'; -} -/** - * 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.BlockInventory.BlockId = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.BlockInventory.BlockId, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.BlockInventory.BlockId.displayName = 'proto.protocol.BlockInventory.BlockId'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.Inventory.displayName = 'proto.protocol.Inventory'; -} -/** - * 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.Items = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.Items.repeatedFields_, null); -}; -goog.inherits(proto.protocol.Items, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.Items.displayName = 'proto.protocol.Items'; -} -/** - * 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.DynamicProperties = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.DynamicProperties, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.DynamicProperties.displayName = 'proto.protocol.DynamicProperties'; -} -/** - * 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.DisconnectMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.DisconnectMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.DisconnectMessage.displayName = 'proto.protocol.DisconnectMessage'; -} -/** - * 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.HelloMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.HelloMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.HelloMessage.displayName = 'proto.protocol.HelloMessage'; -} -/** - * 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.HelloMessage.BlockId = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.HelloMessage.BlockId, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.HelloMessage.BlockId.displayName = 'proto.protocol.HelloMessage.BlockId'; -} -/** - * 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.SmartContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.SmartContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.SmartContract.displayName = 'proto.protocol.SmartContract'; -} -/** - * 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.SmartContract.ABI = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.SmartContract.ABI.repeatedFields_, null); -}; -goog.inherits(proto.protocol.SmartContract.ABI, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.SmartContract.ABI.displayName = 'proto.protocol.SmartContract.ABI'; -} -/** - * 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.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.SmartContract.ABI.Entry, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.SmartContract.ABI.Entry.displayName = 'proto.protocol.SmartContract.ABI.Entry'; -} -/** - * 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.SmartContract.ABI.Entry.Param = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.SmartContract.ABI.Entry.Param, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.SmartContract.ABI.Entry.Param.displayName = 'proto.protocol.SmartContract.ABI.Entry.Param'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.InternalTransaction.displayName = 'proto.protocol.InternalTransaction'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.InternalTransaction.CallValueInfo.displayName = 'proto.protocol.InternalTransaction.CallValueInfo'; -} -/** - * 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) { - /** - * @public - * @override - */ - proto.protocol.DelegatedResourceAccountIndex.displayName = 'proto.protocol.DelegatedResourceAccountIndex'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.AccountId.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.AccountId.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.AccountId} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.AccountId.toObject = function(includeInstance, msg) { - var f, obj = { - name: msg.getName_asB64(), - address: msg.getAddress_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.AccountId} - */ -proto.protocol.AccountId.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.AccountId; - return proto.protocol.AccountId.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.AccountId} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.AccountId} - */ -proto.protocol.AccountId.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.setName(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.AccountId.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.AccountId.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.AccountId} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.AccountId.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getName_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional bytes name = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.AccountId.prototype.getName = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes name = 1; - * This is a type-conversion wrapper around `getName()` - * @return {string} - */ -proto.protocol.AccountId.prototype.getName_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getName())); -}; - - -/** - * optional bytes name = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getName()` - * @return {!Uint8Array} - */ -proto.protocol.AccountId.prototype.getName_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getName())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.AccountId} returns this - */ -proto.protocol.AccountId.prototype.setName = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes address = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.AccountId.prototype.getAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes address = 2; - * This is a type-conversion wrapper around `getAddress()` - * @return {string} - */ -proto.protocol.AccountId.prototype.getAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAddress())); -}; - - -/** - * optional bytes address = 2; - * 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.AccountId.prototype.getAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.AccountId} returns this - */ -proto.protocol.AccountId.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.Vote.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Vote.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.Vote} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Vote.toObject = function(includeInstance, msg) { - var f, obj = { - voteAddress: msg.getVoteAddress_asB64(), - voteCount: 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.Vote} - */ -proto.protocol.Vote.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Vote; - return proto.protocol.Vote.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.Vote} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Vote} - */ -proto.protocol.Vote.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.setVoteAddress(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setVoteCount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.Vote.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.Vote.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.Vote} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Vote.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVoteAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getVoteCount(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } -}; - - -/** - * optional bytes vote_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Vote.prototype.getVoteAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes vote_address = 1; - * This is a type-conversion wrapper around `getVoteAddress()` - * @return {string} - */ -proto.protocol.Vote.prototype.getVoteAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getVoteAddress())); -}; - - -/** - * optional bytes vote_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getVoteAddress()` - * @return {!Uint8Array} - */ -proto.protocol.Vote.prototype.getVoteAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getVoteAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Vote} returns this - */ -proto.protocol.Vote.prototype.setVoteAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int64 vote_count = 2; - * @return {number} - */ -proto.protocol.Vote.prototype.getVoteCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Vote} returns this - */ -proto.protocol.Vote.prototype.setVoteCount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.Proposal.repeatedFields_ = [6]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.Proposal.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Proposal.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.Proposal} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Proposal.toObject = function(includeInstance, msg) { - var f, obj = { - 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) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Proposal} - */ -proto.protocol.Proposal.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - 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.Proposal} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Proposal} - */ -proto.protocol.Proposal.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.setProposalId(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setProposerAddress(value); - break; - case 3: - var value = msg.getParametersMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readInt64, jspb.BinaryReader.prototype.readInt64, null, 0, 0); - }); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExpirationTime(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCreateTime(value); - break; - case 6: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addApprovals(value); - break; - case 7: - var value = /** @type {!proto.protocol.Proposal.State} */ (reader.readEnum()); - msg.setState(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.Proposal.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.Proposal.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.Proposal} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Proposal.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getProposalId(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getProposerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getParametersMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeInt64, jspb.BinaryWriter.prototype.writeInt64); - } - f = message.getExpirationTime(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getCreateTime(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getApprovalsList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 6, - f - ); - } - 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 - * @return {!proto.protocol.Proposal} returns this - */ -proto.protocol.Proposal.prototype.setProposalId = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.Proposal} returns this - */ -proto.protocol.Proposal.prototype.setProposerAddress = function(value) { - return jspb.Message.setProto3BytesField(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)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.protocol.Proposal} returns this - */ -proto.protocol.Proposal.prototype.clearParametersMap = function() { - this.getParametersMap().clear(); - return this;}; - - -/** - * 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 - * @return {!proto.protocol.Proposal} returns this - */ -proto.protocol.Proposal.prototype.setExpirationTime = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.Proposal} returns this - */ -proto.protocol.Proposal.prototype.setCreateTime = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.Proposal} returns this - */ -proto.protocol.Proposal.prototype.setApprovalsList = function(value) { - return jspb.Message.setField(this, 6, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.protocol.Proposal} returns this - */ -proto.protocol.Proposal.prototype.addApprovals = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 6, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.Proposal} returns this - */ -proto.protocol.Proposal.prototype.clearApprovalsList = function() { - return 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 - * @return {!proto.protocol.Proposal} returns this - */ -proto.protocol.Proposal.prototype.setState = function(value) { - return jspb.Message.setProto3EnumField(this, 7, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.Exchange.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Exchange.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.Exchange} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Exchange.toObject = function(includeInstance, msg) { - var f, obj = { - 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) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Exchange} - */ -proto.protocol.Exchange.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - 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.Exchange} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Exchange} - */ -proto.protocol.Exchange.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.setExchangeId(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setCreatorAddress(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - 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(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.Exchange.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.Exchange.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.Exchange} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Exchange.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getExchangeId(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getCreatorAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getCreateTime(); - if (f !== 0) { - writer.writeInt64( - 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 - ); - } -}; - - -/** - * optional int64 exchange_id = 1; - * @return {number} - */ -proto.protocol.Exchange.prototype.getExchangeId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Exchange} returns this - */ -proto.protocol.Exchange.prototype.setExchangeId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional bytes creator_address = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Exchange.prototype.getCreatorAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes creator_address = 2; - * This is a type-conversion wrapper around `getCreatorAddress()` - * @return {string} - */ -proto.protocol.Exchange.prototype.getCreatorAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getCreatorAddress())); -}; - - -/** - * 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 `getCreatorAddress()` - * @return {!Uint8Array} - */ -proto.protocol.Exchange.prototype.getCreatorAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getCreatorAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Exchange} returns this - */ -proto.protocol.Exchange.prototype.setCreatorAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional int64 create_time = 3; - * @return {number} - */ -proto.protocol.Exchange.prototype.getCreateTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Exchange} returns this - */ -proto.protocol.Exchange.prototype.setCreateTime = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional bytes first_token_id = 6; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Exchange.prototype.getFirstTokenId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * optional bytes first_token_id = 6; - * This is a type-conversion wrapper around `getFirstTokenId()` - * @return {string} - */ -proto.protocol.Exchange.prototype.getFirstTokenId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getFirstTokenId())); -}; - - -/** - * 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 `getFirstTokenId()` - * @return {!Uint8Array} - */ -proto.protocol.Exchange.prototype.getFirstTokenId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getFirstTokenId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Exchange} returns this - */ -proto.protocol.Exchange.prototype.setFirstTokenId = function(value) { - return jspb.Message.setProto3BytesField(this, 6, value); -}; - - -/** - * optional int64 first_token_balance = 7; - * @return {number} - */ -proto.protocol.Exchange.prototype.getFirstTokenBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Exchange} returns this - */ -proto.protocol.Exchange.prototype.setFirstTokenBalance = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional bytes second_token_id = 8; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Exchange.prototype.getSecondTokenId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** - * 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())); -}; - - -/** - * 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.Exchange.prototype.getSecondTokenId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSecondTokenId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Exchange} returns this - */ -proto.protocol.Exchange.prototype.setSecondTokenId = function(value) { - return jspb.Message.setProto3BytesField(this, 8, value); -}; - - -/** - * optional int64 second_token_balance = 9; - * @return {number} - */ -proto.protocol.Exchange.prototype.getSecondTokenBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Exchange} returns this - */ -proto.protocol.Exchange.prototype.setSecondTokenBalance = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.ChainParameters.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.ChainParameters.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.ChainParameters.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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.ChainParameters.toObject = function(includeInstance, msg) { - var f, obj = { - chainparameterList: jspb.Message.toObjectList(msg.getChainparameterList(), - proto.protocol.ChainParameters.ChainParameter.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.ChainParameters} - */ -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); -}; - - -/** - * 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; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.ChainParameters.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.ChainParameters.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.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 - ); - } -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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.ChainParameters.ChainParameter.toObject = function(includeInstance, msg) { - var f, obj = { - key: jspb.Message.getFieldWithDefault(msg, 1, ""), - value: 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.ChainParameters.ChainParameter} - */ -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); -}; - - -/** - * 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.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; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.ChainParameters.ChainParameter.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.ChainParameters.ChainParameter.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.ChainParameters.ChainParameter} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -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 string key = 1; - * @return {string} - */ -proto.protocol.ChainParameters.ChainParameter.prototype.getKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.protocol.ChainParameters.ChainParameter} returns this - */ -proto.protocol.ChainParameters.ChainParameter.prototype.setKey = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional int64 value = 2; - * @return {number} - */ -proto.protocol.ChainParameters.ChainParameter.prototype.getValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.ChainParameters.ChainParameter} returns this - */ -proto.protocol.ChainParameters.ChainParameter.prototype.setValue = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * repeated ChainParameter chainParameter = 1; - * @return {!Array} - */ -proto.protocol.ChainParameters.prototype.getChainparameterList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.ChainParameters.ChainParameter, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.ChainParameters} returns this -*/ -proto.protocol.ChainParameters.prototype.setChainparameterList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.protocol.ChainParameters.ChainParameter=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.ChainParameters.ChainParameter} - */ -proto.protocol.ChainParameters.prototype.addChainparameter = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.ChainParameters.ChainParameter, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.ChainParameters} returns this - */ -proto.protocol.ChainParameters.prototype.clearChainparameterList = function() { - return this.setChainparameterList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.Account.repeatedFields_ = [5,7,16]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance 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); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Account.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) : [], - 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), - latestWithdrawTime: jspb.Message.getFieldWithDefault(msg, 12, 0), - code: msg.getCode_asB64(), - isWitness: jspb.Message.getBooleanFieldWithDefault(msg, 14, false), - isCommittee: jspb.Message.getBooleanFieldWithDefault(msg, 15, false), - 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() - }; - - 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} - */ -proto.protocol.Account.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - 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.Account} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Account} - */ -proto.protocol.Account.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.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.setAddress(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(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64, null, "", 0); - }); - 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, null, "", 0); - }); - 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 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); - 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 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, null, "", 0); - }); - 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, null, "", 0); - }); - 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, null, "", 0); - }); - 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, null, "", 0); - }); - 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.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( - 7, - f, - proto.protocol.Account.Frozen.serializeBinaryToWriter - ); - } - f = message.getNetUsage(); - if (f !== 0) { - writer.writeInt64( - 8, - 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( - 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.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( - 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.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( - 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 - ); - } -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.Account.Frozen} returns this - */ -proto.protocol.Account.Frozen.prototype.setFrozenBalance = function(value) { - return 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 - * @return {!proto.protocol.Account.Frozen} returns this - */ -proto.protocol.Account.Frozen.prototype.setExpireTime = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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), - 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) - }; - - 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 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); - 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.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( - 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 - * @return {!proto.protocol.Account.AccountResource} returns this - */ -proto.protocol.Account.AccountResource.prototype.setEnergyUsage = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.Account.AccountResource} returns this -*/ -proto.protocol.Account.AccountResource.prototype.setFrozenBalanceForEnergy = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.Account.AccountResource} returns this - */ -proto.protocol.Account.AccountResource.prototype.clearFrozenBalanceForEnergy = function() { - return 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 - * @return {!proto.protocol.Account.AccountResource} returns this - */ -proto.protocol.Account.AccountResource.prototype.setLatestConsumeTimeForEnergy = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * 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 - * @return {!proto.protocol.Account.AccountResource} returns this - */ -proto.protocol.Account.AccountResource.prototype.setAcquiredDelegatedFrozenBalanceForEnergy = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.Account.AccountResource} returns this - */ -proto.protocol.Account.AccountResource.prototype.setDelegatedFrozenBalanceForEnergy = function(value) { - return jspb.Message.setProto3IntField(this, 5, 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 - * @return {!proto.protocol.Account.AccountResource} returns this - */ -proto.protocol.Account.AccountResource.prototype.setStorageLimit = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.Account.AccountResource} returns this - */ -proto.protocol.Account.AccountResource.prototype.setStorageUsage = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.Account.AccountResource} returns this - */ -proto.protocol.Account.AccountResource.prototype.setLatestExchangeStorageTime = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setAccountName = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(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 - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setBalance = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.Account} returns this -*/ -proto.protocol.Account.prototype.setVotesList = function(value) { - return 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); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.clearVotesList = function() { - return 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)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.clearAssetMap = function() { - this.getAssetMap().clear(); - return this;}; - - -/** - * 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)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.clearAssetv2Map = function() { - this.getAssetv2Map().clear(); - return this;}; - - -/** - * 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 - * @return {!proto.protocol.Account} returns this -*/ -proto.protocol.Account.prototype.setFrozenList = function(value) { - return 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); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.clearFrozenList = function() { - return 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 - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setNetUsage = function(value) { - return jspb.Message.setProto3IntField(this, 8, 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 - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setAcquiredDelegatedFrozenBalanceForBandwidth = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setDelegatedFrozenBalanceForBandwidth = function(value) { - return jspb.Message.setProto3IntField(this, 42, 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 - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setCreateTime = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setLatestOprationTime = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setAllowance = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setLatestWithdrawTime = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setCode = function(value) { - return jspb.Message.setProto3BytesField(this, 13, value); -}; - - -/** - * optional bool is_witness = 14; - * @return {boolean} - */ -proto.protocol.Account.prototype.getIsWitness = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 14, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setIsWitness = function(value) { - return jspb.Message.setProto3BooleanField(this, 14, value); -}; - - -/** - * optional bool is_committee = 15; - * @return {boolean} - */ -proto.protocol.Account.prototype.getIsCommittee = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 15, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setIsCommittee = function(value) { - return 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 - * @return {!proto.protocol.Account} returns this -*/ -proto.protocol.Account.prototype.setFrozenSupplyList = function(value) { - return 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); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.clearFrozenSupplyList = function() { - return 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 - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setAssetIssuedName = function(value) { - return jspb.Message.setProto3BytesField(this, 17, 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 - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setAssetIssuedId = function(value) { - return jspb.Message.setProto3BytesField(this, 57, 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)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.clearLatestAssetOperationTimeMap = function() { - this.getLatestAssetOperationTimeMap().clear(); - return this;}; - - -/** - * 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)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.clearLatestAssetOperationTimev2Map = function() { - this.getLatestAssetOperationTimev2Map().clear(); - return this;}; - - -/** - * 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 - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setFreeNetUsage = function(value) { - return 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)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.clearFreeAssetNetUsageMap = function() { - this.getFreeAssetNetUsageMap().clear(); - return this;}; - - -/** - * 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)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.clearFreeAssetNetUsagev2Map = function() { - this.getFreeAssetNetUsagev2Map().clear(); - return this;}; - - -/** - * 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 - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setLatestConsumeTime = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setLatestConsumeFreeTime = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setAccountId = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.Account} returns this -*/ -proto.protocol.Account.prototype.setAccountResource = function(value) { - return jspb.Message.setWrapperField(this, 26, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.clearAccountResource = function() { - return 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 - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setCodehash = function(value) { - return jspb.Message.setProto3BytesField(this, 30, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance 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); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.DelegatedResource.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) - }; - - 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.DelegatedResource} - */ -proto.protocol.DelegatedResource.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - 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.DelegatedResource} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.DelegatedResource} - */ -proto.protocol.DelegatedResource.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.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.setExpireTimeForEnergy(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.DelegatedResource.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.DelegatedResource.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.DelegatedResource} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.DelegatedResource.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFrom_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(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } -}; - - -/** - * optional bytes from = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.DelegatedResource.prototype.getFrom = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes from = 1; - * This is a type-conversion wrapper around `getFrom()` - * @return {string} - */ -proto.protocol.DelegatedResource.prototype.getFrom_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getFrom())); -}; - - -/** - * 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 `getFrom()` - * @return {!Uint8Array} - */ -proto.protocol.DelegatedResource.prototype.getFrom_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getFrom())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.DelegatedResource} returns this - */ -proto.protocol.DelegatedResource.prototype.setFrom = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes to = 2; - * @return {!(string|Uint8Array)} - */ -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 - * @return {!proto.protocol.DelegatedResource} returns this - */ -proto.protocol.DelegatedResource.prototype.setTo = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.DelegatedResource} returns this - */ -proto.protocol.DelegatedResource.prototype.setFrozenBalanceForBandwidth = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.DelegatedResource} returns this - */ -proto.protocol.DelegatedResource.prototype.setFrozenBalanceForEnergy = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.DelegatedResource} returns this - */ -proto.protocol.DelegatedResource.prototype.setExpireTimeForBandwidth = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.DelegatedResource} returns this - */ -proto.protocol.DelegatedResource.prototype.setExpireTimeForEnergy = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.authority} returns this -*/ -proto.protocol.authority.prototype.setAccount = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.authority} returns this - */ -proto.protocol.authority.prototype.clearAccount = function() { - return 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 - * @return {!proto.protocol.authority} returns this - */ -proto.protocol.authority.prototype.setPermissionName = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.permission} returns this -*/ -proto.protocol.permission.prototype.setAccount = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.permission} returns this - */ -proto.protocol.permission.prototype.clearAccount = function() { - return this.setAccount(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.permission.prototype.hasAccount = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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.getBooleanFieldWithDefault(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 - * @return {!proto.protocol.Witness} returns this - */ -proto.protocol.Witness.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.Witness} returns this - */ -proto.protocol.Witness.prototype.setVotecount = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.Witness} returns this - */ -proto.protocol.Witness.prototype.setPubkey = function(value) { - return 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 - * @return {!proto.protocol.Witness} returns this - */ -proto.protocol.Witness.prototype.setUrl = function(value) { - return 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 - * @return {!proto.protocol.Witness} returns this - */ -proto.protocol.Witness.prototype.setTotalproduced = function(value) { - return 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 - * @return {!proto.protocol.Witness} returns this - */ -proto.protocol.Witness.prototype.setTotalmissed = function(value) { - return 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 - * @return {!proto.protocol.Witness} returns this - */ -proto.protocol.Witness.prototype.setLatestblocknum = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.Witness} returns this - */ -proto.protocol.Witness.prototype.setLatestslotnum = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional bool isJobs = 9; - * @return {boolean} - */ -proto.protocol.Witness.prototype.getIsjobs = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.protocol.Witness} returns this - */ -proto.protocol.Witness.prototype.setIsjobs = function(value) { - return jspb.Message.setProto3BooleanField(this, 9, value); -}; - - - -/** - * 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. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.Votes} returns this - */ -proto.protocol.Votes.prototype.setAddress = function(value) { - return 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 - * @return {!proto.protocol.Votes} returns this -*/ -proto.protocol.Votes.prototype.setOldVotesList = function(value) { - return 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); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.Votes} returns this - */ -proto.protocol.Votes.prototype.clearOldVotesList = function() { - return 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 - * @return {!proto.protocol.Votes} returns this -*/ -proto.protocol.Votes.prototype.setNewVotesList = function(value) { - return 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); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.Votes} returns this - */ -proto.protocol.Votes.prototype.clearNewVotesList = function() { - return this.setNewVotesList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.TXOutput} returns this - */ -proto.protocol.TXOutput.prototype.setValue = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.TXOutput} returns this - */ -proto.protocol.TXOutput.prototype.setPubkeyhash = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - ); - } -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.TXInput.raw} returns this - */ -proto.protocol.TXInput.raw.prototype.setTxid = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.TXInput.raw} returns this - */ -proto.protocol.TXInput.raw.prototype.setVout = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.TXInput.raw} returns this - */ -proto.protocol.TXInput.raw.prototype.setPubkey = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.TXInput} returns this -*/ -proto.protocol.TXInput.prototype.setRawData = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.TXInput} returns this - */ -proto.protocol.TXInput.prototype.clearRawData = function() { - return 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 - * @return {!proto.protocol.TXInput} returns this - */ -proto.protocol.TXInput.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - - -/** - * 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. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.TXOutputs} returns this -*/ -proto.protocol.TXOutputs.prototype.setOutputsList = function(value) { - return 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); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.TXOutputs} returns this - */ -proto.protocol.TXOutputs.prototype.clearOutputsList = function() { - return this.setOutputsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.ResourceReceipt} returns this - */ -proto.protocol.ResourceReceipt.prototype.setEnergyUsage = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.ResourceReceipt} returns this - */ -proto.protocol.ResourceReceipt.prototype.setEnergyFee = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.ResourceReceipt} returns this - */ -proto.protocol.ResourceReceipt.prototype.setOriginEnergyUsage = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.ResourceReceipt} returns this - */ -proto.protocol.ResourceReceipt.prototype.setEnergyUsageTotal = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.ResourceReceipt} returns this - */ -proto.protocol.ResourceReceipt.prototype.setNetUsage = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.ResourceReceipt} returns this - */ -proto.protocol.ResourceReceipt.prototype.setNetFee = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.ResourceReceipt} returns this - */ -proto.protocol.ResourceReceipt.prototype.setResult = function(value) { - return jspb.Message.setProto3EnumField(this, 7, value); -}; - - - -/** - * 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. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - ); - } -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - ); - } -}; - - -/** - * @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, - UPDATEENERGYLIMITCONTRACT: 45 -}; - -/** - * 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 - * @return {!proto.protocol.Transaction.Contract} returns this - */ -proto.protocol.Transaction.Contract.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional google.protobuf.Any parameter = 2; - * @return {?proto.google.protobuf.Any} - */ -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.google.protobuf.Any|undefined} value - * @return {!proto.protocol.Transaction.Contract} returns this -*/ -proto.protocol.Transaction.Contract.prototype.setParameter = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.Transaction.Contract} returns this - */ -proto.protocol.Transaction.Contract.prototype.clearParameter = function() { - return this.setParameter(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.Transaction.Contract.prototype.hasParameter = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional bytes provider = 3; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Transaction.Contract.prototype.getProvider = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes provider = 3; - * This is a type-conversion wrapper around `getProvider()` - * @return {string} - */ -proto.protocol.Transaction.Contract.prototype.getProvider_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getProvider())); -}; - - -/** - * 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} - */ -proto.protocol.Transaction.Contract.prototype.getProvider_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getProvider())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Transaction.Contract} returns this - */ -proto.protocol.Transaction.Contract.prototype.setProvider = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.Transaction.Contract} returns this - */ -proto.protocol.Transaction.Contract.prototype.setContractname = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance 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); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Transaction.Result.toObject = function(includeInstance, msg) { - var f, obj = { - 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) - }; - - 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.Result} - */ -proto.protocol.Transaction.Result.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - 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.Transaction.Result} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Transaction.Result} - */ -proto.protocol.Transaction.Result.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.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 14: - var value = /** @type {string} */ (reader.readString()); - msg.setAssetissueid(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; - 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; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.Transaction.Result.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.Transaction.Result.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.Result} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Transaction.Result.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFee(); - if (f !== 0) { - writer.writeInt64( - 1, - 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.getAssetissueid(); - if (f.length > 0) { - writer.writeString( - 14, - f - ); - } - f = message.getWithdrawAmount(); - if (f !== 0) { - writer.writeInt64( - 15, - f - ); - } - f = message.getUnfreezeAmount(); - if (f !== 0) { - writer.writeInt64( - 16, - 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 - ); - } -}; - - -/** - * @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, - ILLEGAL_OPERATION: 8, - STACK_OVERFLOW: 9, - OUT_OF_ENERGY: 10, - OUT_OF_TIME: 11, - JVM_STACK_OVER_FLOW: 12, - UNKNOWN: 13 -}; - -/** - * 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 - * @return {!proto.protocol.Transaction.Result} returns this - */ -proto.protocol.Transaction.Result.prototype.setFee = function(value) { - return 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 - * @return {!proto.protocol.Transaction.Result} returns this - */ -proto.protocol.Transaction.Result.prototype.setRet = function(value) { - return jspb.Message.setProto3EnumField(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 - * @return {!proto.protocol.Transaction.Result} returns this - */ -proto.protocol.Transaction.Result.prototype.setContractret = function(value) { - return jspb.Message.setProto3EnumField(this, 3, 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 - * @return {!proto.protocol.Transaction.Result} returns this - */ -proto.protocol.Transaction.Result.prototype.setAssetissueid = function(value) { - return jspb.Message.setProto3StringField(this, 14, 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 - * @return {!proto.protocol.Transaction.Result} returns this - */ -proto.protocol.Transaction.Result.prototype.setWithdrawAmount = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.Transaction.Result} returns this - */ -proto.protocol.Transaction.Result.prototype.setUnfreezeAmount = function(value) { - return jspb.Message.setProto3IntField(this, 16, 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 - * @return {!proto.protocol.Transaction.Result} returns this - */ -proto.protocol.Transaction.Result.prototype.setExchangeReceivedAmount = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.Transaction.Result} returns this - */ -proto.protocol.Transaction.Result.prototype.setExchangeInjectAnotherAmount = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.Transaction.Result} returns this - */ -proto.protocol.Transaction.Result.prototype.setExchangeWithdrawAnotherAmount = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.Transaction.Result} returns this - */ -proto.protocol.Transaction.Result.prototype.setExchangeId = function(value) { - return jspb.Message.setProto3IntField(this, 21, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.Transaction.raw.repeatedFields_ = [9,11]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance 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); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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. - * @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) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Transaction.raw} - */ -proto.protocol.Transaction.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); -}; - - -/** - * 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 {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Transaction.raw} - */ -proto.protocol.Transaction.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.setRefBlockBytes(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); - break; - case 8: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExpiration(value); - break; - case 9: - var value = new proto.protocol.authority; - reader.readMessage(value,proto.protocol.authority.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); - break; - case 14: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTimestamp(value); - break; - case 18: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFeeLimit(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.Transaction.raw.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.Transaction.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.Transaction.raw} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Transaction.raw.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRefBlockBytes_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getRefBlockNum(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getRefBlockHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getExpiration(); - if (f !== 0) { - writer.writeInt64( - 8, - f - ); - } - 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.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.getTimestamp(); - if (f !== 0) { - writer.writeInt64( - 14, - f - ); - } - f = message.getFeeLimit(); - if (f !== 0) { - writer.writeInt64( - 18, - f - ); - } -}; - - -/** - * optional bytes ref_block_bytes = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Transaction.raw.prototype.getRefBlockBytes = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes ref_block_bytes = 1; - * This is a type-conversion wrapper around `getRefBlockBytes()` - * @return {string} - */ -proto.protocol.Transaction.raw.prototype.getRefBlockBytes_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRefBlockBytes())); -}; - - -/** - * 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 `getRefBlockBytes()` - * @return {!Uint8Array} - */ -proto.protocol.Transaction.raw.prototype.getRefBlockBytes_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRefBlockBytes())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Transaction.raw} returns this - */ -proto.protocol.Transaction.raw.prototype.setRefBlockBytes = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int64 ref_block_num = 3; - * @return {number} - */ -proto.protocol.Transaction.raw.prototype.getRefBlockNum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Transaction.raw} returns this - */ -proto.protocol.Transaction.raw.prototype.setRefBlockNum = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional bytes ref_block_hash = 4; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Transaction.raw.prototype.getRefBlockHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes ref_block_hash = 4; - * This is a type-conversion wrapper around `getRefBlockHash()` - * @return {string} - */ -proto.protocol.Transaction.raw.prototype.getRefBlockHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRefBlockHash())); -}; - - -/** - * 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 `getRefBlockHash()` - * @return {!Uint8Array} - */ -proto.protocol.Transaction.raw.prototype.getRefBlockHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRefBlockHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Transaction.raw} returns this - */ -proto.protocol.Transaction.raw.prototype.setRefBlockHash = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional int64 expiration = 8; - * @return {number} - */ -proto.protocol.Transaction.raw.prototype.getExpiration = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Transaction.raw} returns this - */ -proto.protocol.Transaction.raw.prototype.setExpiration = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * repeated authority auths = 9; - * @return {!Array} - */ -proto.protocol.Transaction.raw.prototype.getAuthsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.authority, 9)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.Transaction.raw} returns this -*/ -proto.protocol.Transaction.raw.prototype.setAuthsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 9, value); -}; - - -/** - * @param {!proto.protocol.authority=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.authority} - */ -proto.protocol.Transaction.raw.prototype.addAuths = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.protocol.authority, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.Transaction.raw} returns this - */ -proto.protocol.Transaction.raw.prototype.clearAuthsList = function() { - return this.setAuthsList([]); -}; - - -/** - * optional bytes data = 10; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Transaction.raw.prototype.getData = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, "")); -}; - - -/** - * optional bytes data = 10; - * This is a type-conversion wrapper around `getData()` - * @return {string} - */ -proto.protocol.Transaction.raw.prototype.getData_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getData())); -}; - - -/** - * 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.Transaction.raw.prototype.getData_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getData())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Transaction.raw} returns this - */ -proto.protocol.Transaction.raw.prototype.setData = function(value) { - return jspb.Message.setProto3BytesField(this, 10, value); -}; - - -/** - * repeated Contract contract = 11; - * @return {!Array} - */ -proto.protocol.Transaction.raw.prototype.getContractList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.Transaction.Contract, 11)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.Transaction.raw} returns this -*/ -proto.protocol.Transaction.raw.prototype.setContractList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 11, value); -}; - - -/** - * @param {!proto.protocol.Transaction.Contract=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.Transaction.Contract} - */ -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); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.Transaction.raw} returns this - */ -proto.protocol.Transaction.raw.prototype.clearContractList = function() { - return this.setContractList([]); -}; - - -/** - * optional bytes scripts = 12; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Transaction.raw.prototype.getScripts = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 12, "")); -}; - - -/** - * optional bytes scripts = 12; - * This is a type-conversion wrapper around `getScripts()` - * @return {string} - */ -proto.protocol.Transaction.raw.prototype.getScripts_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getScripts())); -}; - - -/** - * 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} - */ -proto.protocol.Transaction.raw.prototype.getScripts_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getScripts())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Transaction.raw} returns this - */ -proto.protocol.Transaction.raw.prototype.setScripts = function(value) { - return jspb.Message.setProto3BytesField(this, 12, value); -}; - - -/** - * optional int64 timestamp = 14; - * @return {number} - */ -proto.protocol.Transaction.raw.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Transaction.raw} returns this - */ -proto.protocol.Transaction.raw.prototype.setTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 14, value); -}; - - -/** - * optional int64 fee_limit = 18; - * @return {number} - */ -proto.protocol.Transaction.raw.prototype.getFeeLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 18, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Transaction.raw} returns this - */ -proto.protocol.Transaction.raw.prototype.setFeeLimit = function(value) { - return jspb.Message.setProto3IntField(this, 18, value); -}; - - -/** - * optional raw raw_data = 1; - * @return {?proto.protocol.Transaction.raw} - */ -proto.protocol.Transaction.prototype.getRawData = function() { - return /** @type{?proto.protocol.Transaction.raw} */ ( - jspb.Message.getWrapperField(this, proto.protocol.Transaction.raw, 1)); -}; - - -/** - * @param {?proto.protocol.Transaction.raw|undefined} value - * @return {!proto.protocol.Transaction} returns this -*/ -proto.protocol.Transaction.prototype.setRawData = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.Transaction} returns this - */ -proto.protocol.Transaction.prototype.clearRawData = function() { - return this.setRawData(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.Transaction.prototype.hasRawData = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * repeated bytes signature = 2; - * @return {!(Array|Array)} - */ -proto.protocol.Transaction.prototype.getSignatureList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 2)); -}; - - -/** - * repeated bytes signature = 2; - * This is a type-conversion wrapper around `getSignatureList()` - * @return {!Array} - */ -proto.protocol.Transaction.prototype.getSignatureList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getSignatureList())); -}; - - -/** - * 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.Transaction.prototype.getSignatureList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getSignatureList())); -}; - - -/** - * @param {!(Array|Array)} value - * @return {!proto.protocol.Transaction} returns this - */ -proto.protocol.Transaction.prototype.setSignatureList = function(value) { - return jspb.Message.setField(this, 2, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.protocol.Transaction} returns this - */ -proto.protocol.Transaction.prototype.addSignature = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.Transaction} returns this - */ -proto.protocol.Transaction.prototype.clearSignatureList = function() { - return this.setSignatureList([]); -}; - - -/** - * repeated Result ret = 5; - * @return {!Array} - */ -proto.protocol.Transaction.prototype.getRetList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.Transaction.Result, 5)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.Transaction} returns this -*/ -proto.protocol.Transaction.prototype.setRetList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 5, value); -}; - - -/** - * @param {!proto.protocol.Transaction.Result=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.Transaction.Result} - */ -proto.protocol.Transaction.prototype.addRet = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.protocol.Transaction.Result, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.Transaction} returns this - */ -proto.protocol.Transaction.prototype.clearRetList = function() { - return this.setRetList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.TransactionInfo.repeatedFields_ = [5,8,17]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.TransactionInfo.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.TransactionInfo.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.TransactionInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.TransactionInfo.toObject = function(includeInstance, msg) { - var f, obj = { - 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(), - 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) - }; - - 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.TransactionInfo} - */ -proto.protocol.TransactionInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - 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.TransactionInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.TransactionInfo} - */ -proto.protocol.TransactionInfo.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.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 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.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); - break; - case 16: - 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; - 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; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.TransactionInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.TransactionInfo.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.TransactionInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.TransactionInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - 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( - 7, - f, - proto.protocol.ResourceReceipt.serializeBinaryToWriter - ); - } - 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( - 10, - f - ); - } - f = message.getAssetissueid(); - if (f.length > 0) { - writer.writeString( - 14, - f - ); - } - f = message.getWithdrawAmount(); - if (f !== 0) { - writer.writeInt64( - 15, - f - ); - } - f = message.getUnfreezeAmount(); - if (f !== 0) { - writer.writeInt64( - 16, - f - ); - } - f = message.getInternalTransactionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 17, - f, - 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 - ); - } -}; - - -/** - * @enum {number} - */ -proto.protocol.TransactionInfo.code = { - SUCESS: 0, - FAILED: 1 -}; - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.TransactionInfo.Log.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.TransactionInfo.Log.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.TransactionInfo.Log.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.TransactionInfo.Log} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.TransactionInfo.Log.toObject = function(includeInstance, msg) { - var f, obj = { - address: msg.getAddress_asB64(), - topicsList: msg.getTopicsList_asB64(), - 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.TransactionInfo.Log} - */ -proto.protocol.TransactionInfo.Log.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - 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.TransactionInfo.Log} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.TransactionInfo.Log} - */ -proto.protocol.TransactionInfo.Log.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 {!Uint8Array} */ (reader.readBytes()); - msg.addTopics(value); - break; - case 3: - 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.TransactionInfo.Log.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.TransactionInfo.Log.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.TransactionInfo.Log} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.TransactionInfo.Log.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getTopicsList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 2, - f - ); - } - f = message.getData_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } -}; - - -/** - * optional bytes address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.TransactionInfo.Log.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.TransactionInfo.Log.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.TransactionInfo.Log.prototype.getAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.TransactionInfo.Log} returns this - */ -proto.protocol.TransactionInfo.Log.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * repeated bytes topics = 2; - * @return {!(Array|Array)} - */ -proto.protocol.TransactionInfo.Log.prototype.getTopicsList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 2)); -}; - - -/** - * 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())); -}; - - -/** - * 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 - * @return {!proto.protocol.TransactionInfo.Log} returns this - */ -proto.protocol.TransactionInfo.Log.prototype.setTopicsList = function(value) { - return jspb.Message.setField(this, 2, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.protocol.TransactionInfo.Log} returns this - */ -proto.protocol.TransactionInfo.Log.prototype.addTopics = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.TransactionInfo.Log} returns this - */ -proto.protocol.TransactionInfo.Log.prototype.clearTopicsList = function() { - return this.setTopicsList([]); -}; - - -/** - * optional bytes data = 3; - * @return {!(string|Uint8Array)} - */ -proto.protocol.TransactionInfo.Log.prototype.getData = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes data = 3; - * This is a type-conversion wrapper around `getData()` - * @return {string} - */ -proto.protocol.TransactionInfo.Log.prototype.getData_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getData())); -}; - - -/** - * 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 `getData()` - * @return {!Uint8Array} - */ -proto.protocol.TransactionInfo.Log.prototype.getData_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getData())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.TransactionInfo.Log} returns this - */ -proto.protocol.TransactionInfo.Log.prototype.setData = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional bytes id = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.TransactionInfo.prototype.getId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * 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())); -}; - - -/** - * 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())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.TransactionInfo} returns this - */ -proto.protocol.TransactionInfo.prototype.setId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int64 fee = 2; - * @return {number} - */ -proto.protocol.TransactionInfo.prototype.getFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.TransactionInfo} returns this - */ -proto.protocol.TransactionInfo.prototype.setFee = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int64 blockNumber = 3; - * @return {number} - */ -proto.protocol.TransactionInfo.prototype.getBlocknumber = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.TransactionInfo} returns this - */ -proto.protocol.TransactionInfo.prototype.setBlocknumber = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int64 blockTimeStamp = 4; - * @return {number} - */ -proto.protocol.TransactionInfo.prototype.getBlocktimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.TransactionInfo} returns this - */ -proto.protocol.TransactionInfo.prototype.setBlocktimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * repeated bytes contractResult = 5; - * @return {!(Array|Array)} - */ -proto.protocol.TransactionInfo.prototype.getContractresultList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 5)); -}; - - -/** - * repeated bytes contractResult = 5; - * This is a type-conversion wrapper around `getContractresultList()` - * @return {!Array} - */ -proto.protocol.TransactionInfo.prototype.getContractresultList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getContractresultList())); -}; - - -/** - * 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.TransactionInfo.prototype.getContractresultList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getContractresultList())); -}; - - -/** - * @param {!(Array|Array)} value - * @return {!proto.protocol.TransactionInfo} returns this - */ -proto.protocol.TransactionInfo.prototype.setContractresultList = function(value) { - return jspb.Message.setField(this, 5, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.protocol.TransactionInfo} returns this - */ -proto.protocol.TransactionInfo.prototype.addContractresult = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 5, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.TransactionInfo} returns this - */ -proto.protocol.TransactionInfo.prototype.clearContractresultList = function() { - return this.setContractresultList([]); -}; - - -/** - * optional bytes contract_address = 6; - * @return {!(string|Uint8Array)} - */ -proto.protocol.TransactionInfo.prototype.getContractAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * optional bytes contract_address = 6; - * This is a type-conversion wrapper around `getContractAddress()` - * @return {string} - */ -proto.protocol.TransactionInfo.prototype.getContractAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getContractAddress())); -}; - - -/** - * 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.TransactionInfo.prototype.getContractAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getContractAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.TransactionInfo} returns this - */ -proto.protocol.TransactionInfo.prototype.setContractAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 6, value); -}; - - -/** - * optional ResourceReceipt receipt = 7; - * @return {?proto.protocol.ResourceReceipt} - */ -proto.protocol.TransactionInfo.prototype.getReceipt = function() { - return /** @type{?proto.protocol.ResourceReceipt} */ ( - jspb.Message.getWrapperField(this, proto.protocol.ResourceReceipt, 7)); -}; - - -/** - * @param {?proto.protocol.ResourceReceipt|undefined} value - * @return {!proto.protocol.TransactionInfo} returns this -*/ -proto.protocol.TransactionInfo.prototype.setReceipt = function(value) { - return jspb.Message.setWrapperField(this, 7, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.TransactionInfo} returns this - */ -proto.protocol.TransactionInfo.prototype.clearReceipt = function() { - return this.setReceipt(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.TransactionInfo.prototype.hasReceipt = function() { - return jspb.Message.getField(this, 7) != null; -}; - - -/** - * repeated Log log = 8; - * @return {!Array} - */ -proto.protocol.TransactionInfo.prototype.getLogList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.TransactionInfo.Log, 8)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.TransactionInfo} returns this -*/ -proto.protocol.TransactionInfo.prototype.setLogList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 8, value); -}; - - -/** - * @param {!proto.protocol.TransactionInfo.Log=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.TransactionInfo.Log} - */ -proto.protocol.TransactionInfo.prototype.addLog = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.protocol.TransactionInfo.Log, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.TransactionInfo} returns this - */ -proto.protocol.TransactionInfo.prototype.clearLogList = function() { - return this.setLogList([]); -}; - - -/** - * optional code result = 9; - * @return {!proto.protocol.TransactionInfo.code} - */ -proto.protocol.TransactionInfo.prototype.getResult = function() { - return /** @type {!proto.protocol.TransactionInfo.code} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {!proto.protocol.TransactionInfo.code} value - * @return {!proto.protocol.TransactionInfo} returns this - */ -proto.protocol.TransactionInfo.prototype.setResult = function(value) { - return jspb.Message.setProto3EnumField(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, "")); -}; - - -/** - * 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.TransactionInfo.prototype.getResmessage_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getResmessage())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.TransactionInfo} returns this - */ -proto.protocol.TransactionInfo.prototype.setResmessage = function(value) { - return jspb.Message.setProto3BytesField(this, 10, value); -}; - - -/** - * optional string assetIssueID = 14; - * @return {string} - */ -proto.protocol.TransactionInfo.prototype.getAssetissueid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "")); -}; - - -/** - * @param {string} value - * @return {!proto.protocol.TransactionInfo} returns this - */ -proto.protocol.TransactionInfo.prototype.setAssetissueid = function(value) { - return jspb.Message.setProto3StringField(this, 14, value); -}; - - -/** - * optional int64 withdraw_amount = 15; - * @return {number} - */ -proto.protocol.TransactionInfo.prototype.getWithdrawAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.TransactionInfo} returns this - */ -proto.protocol.TransactionInfo.prototype.setWithdrawAmount = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.TransactionInfo} returns this - */ -proto.protocol.TransactionInfo.prototype.setUnfreezeAmount = function(value) { - return jspb.Message.setProto3IntField(this, 16, 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 - * @return {!proto.protocol.TransactionInfo} returns this -*/ -proto.protocol.TransactionInfo.prototype.setInternalTransactionsList = function(value) { - return 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); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.TransactionInfo} returns this - */ -proto.protocol.TransactionInfo.prototype.clearInternalTransactionsList = function() { - return this.setInternalTransactionsList([]); -}; - - -/** - * 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 - * @return {!proto.protocol.TransactionInfo} returns this - */ -proto.protocol.TransactionInfo.prototype.setExchangeReceivedAmount = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.TransactionInfo} returns this - */ -proto.protocol.TransactionInfo.prototype.setExchangeInjectAnotherAmount = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.TransactionInfo} returns this - */ -proto.protocol.TransactionInfo.prototype.setExchangeWithdrawAnotherAmount = function(value) { - return jspb.Message.setProto3IntField(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 - * @return {!proto.protocol.TransactionInfo} returns this - */ -proto.protocol.TransactionInfo.prototype.setExchangeId = function(value) { - return jspb.Message.setProto3IntField(this, 21, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.Transactions.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance 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); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Transactions.toObject = function(includeInstance, msg) { - var f, obj = { - transactionsList: jspb.Message.toObjectList(msg.getTransactionsList(), - proto.protocol.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.Transactions} - */ -proto.protocol.Transactions.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - 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.Transactions} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Transactions} - */ -proto.protocol.Transactions.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; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.Transactions.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.Transactions.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.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 - ); - } -}; - - -/** - * repeated Transaction transactions = 1; - * @return {!Array} - */ -proto.protocol.Transactions.prototype.getTransactionsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.Transaction, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.Transactions} returns this -*/ -proto.protocol.Transactions.prototype.setTransactionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.protocol.Transaction=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.Transaction} - */ -proto.protocol.Transactions.prototype.addTransactions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.Transaction, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.Transactions} returns this - */ -proto.protocol.Transactions.prototype.clearTransactionsList = function() { - return this.setTransactionsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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; -}; -} - - -/** - * 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); -}; - - -/** - * 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.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; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.TransactionSign.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.TransactionSign.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.TransactionSign} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -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 Transaction transaction = 1; - * @return {?proto.protocol.Transaction} - */ -proto.protocol.TransactionSign.prototype.getTransaction = function() { - return /** @type{?proto.protocol.Transaction} */ ( - jspb.Message.getWrapperField(this, proto.protocol.Transaction, 1)); -}; - - -/** - * @param {?proto.protocol.Transaction|undefined} value - * @return {!proto.protocol.TransactionSign} returns this -*/ -proto.protocol.TransactionSign.prototype.setTransaction = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.TransactionSign} returns this - */ -proto.protocol.TransactionSign.prototype.clearTransaction = function() { - return this.setTransaction(undefined); -}; - - -/** - * 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.TransactionSign.prototype.getPrivatekey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes privateKey = 2; - * This is a type-conversion wrapper around `getPrivatekey()` - * @return {string} - */ -proto.protocol.TransactionSign.prototype.getPrivatekey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPrivatekey())); -}; - - -/** - * 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 `getPrivatekey()` - * @return {!Uint8Array} - */ -proto.protocol.TransactionSign.prototype.getPrivatekey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPrivatekey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.TransactionSign} returns this - */ -proto.protocol.TransactionSign.prototype.setPrivatekey = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance 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); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.BlockHeader.toObject = function(includeInstance, msg) { - var f, obj = { - rawData: (f = msg.getRawData()) && proto.protocol.BlockHeader.raw.toObject(includeInstance, f), - witnessSignature: msg.getWitnessSignature_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.BlockHeader} - */ -proto.protocol.BlockHeader.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - 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.BlockHeader} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.BlockHeader} - */ -proto.protocol.BlockHeader.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - 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); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setWitnessSignature(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.BlockHeader.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.BlockHeader.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.BlockHeader} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.BlockHeader.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRawData(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.protocol.BlockHeader.raw.serializeBinaryToWriter - ); - } - f = message.getWitnessSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance 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); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.BlockHeader.raw.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(), - version: jspb.Message.getFieldWithDefault(msg, 10, 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.BlockHeader.raw} - */ -proto.protocol.BlockHeader.raw.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - 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.BlockHeader.raw} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.BlockHeader.raw} - */ -proto.protocol.BlockHeader.raw.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.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); - break; - case 7: - 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; - case 10: - var value = /** @type {number} */ (reader.readInt32()); - msg.setVersion(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.BlockHeader.raw.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.BlockHeader.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.BlockHeader.raw} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.BlockHeader.raw.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(); - if (f.length > 0) { - writer.writeBytes( - 9, - f - ); - } - f = message.getVersion(); - if (f !== 0) { - writer.writeInt32( - 10, - f - ); - } -}; - - -/** - * 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 - * @return {!proto.protocol.BlockHeader.raw} returns this - */ -proto.protocol.BlockHeader.raw.prototype.setTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional bytes txTrieRoot = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.BlockHeader.raw.prototype.getTxtrieroot = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes txTrieRoot = 2; - * This is a type-conversion wrapper around `getTxtrieroot()` - * @return {string} - */ -proto.protocol.BlockHeader.raw.prototype.getTxtrieroot_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTxtrieroot())); -}; - - -/** - * 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 `getTxtrieroot()` - * @return {!Uint8Array} - */ -proto.protocol.BlockHeader.raw.prototype.getTxtrieroot_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTxtrieroot())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.BlockHeader.raw} returns this - */ -proto.protocol.BlockHeader.raw.prototype.setTxtrieroot = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * 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 - * @return {!proto.protocol.BlockHeader.raw} returns this - */ -proto.protocol.BlockHeader.raw.prototype.setParenthash = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional int64 number = 7; - * @return {number} - */ -proto.protocol.BlockHeader.raw.prototype.getNumber = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.BlockHeader.raw} returns this - */ -proto.protocol.BlockHeader.raw.prototype.setNumber = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * 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 - * @return {!proto.protocol.BlockHeader.raw} returns this - */ -proto.protocol.BlockHeader.raw.prototype.setWitnessId = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional bytes witness_address = 9; - * @return {!(string|Uint8Array)} - */ -proto.protocol.BlockHeader.raw.prototype.getWitnessAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, "")); -}; - - -/** - * optional bytes witness_address = 9; - * This is a type-conversion wrapper around `getWitnessAddress()` - * @return {string} - */ -proto.protocol.BlockHeader.raw.prototype.getWitnessAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getWitnessAddress())); -}; - - -/** - * 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()` - * @return {!Uint8Array} - */ -proto.protocol.BlockHeader.raw.prototype.getWitnessAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getWitnessAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.BlockHeader.raw} returns this - */ -proto.protocol.BlockHeader.raw.prototype.setWitnessAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 9, value); -}; - - -/** - * optional int32 version = 10; - * @return {number} - */ -proto.protocol.BlockHeader.raw.prototype.getVersion = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.BlockHeader.raw} returns this - */ -proto.protocol.BlockHeader.raw.prototype.setVersion = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); -}; - - -/** - * optional raw raw_data = 1; - * @return {?proto.protocol.BlockHeader.raw} - */ -proto.protocol.BlockHeader.prototype.getRawData = function() { - return /** @type{?proto.protocol.BlockHeader.raw} */ ( - jspb.Message.getWrapperField(this, proto.protocol.BlockHeader.raw, 1)); -}; - - -/** - * @param {?proto.protocol.BlockHeader.raw|undefined} value - * @return {!proto.protocol.BlockHeader} returns this -*/ -proto.protocol.BlockHeader.prototype.setRawData = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.BlockHeader} returns this - */ -proto.protocol.BlockHeader.prototype.clearRawData = function() { - return this.setRawData(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.BlockHeader.prototype.hasRawData = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes witness_signature = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.BlockHeader.prototype.getWitnessSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes witness_signature = 2; - * This is a type-conversion wrapper around `getWitnessSignature()` - * @return {string} - */ -proto.protocol.BlockHeader.prototype.getWitnessSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getWitnessSignature())); -}; - - -/** - * 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} - */ -proto.protocol.BlockHeader.prototype.getWitnessSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getWitnessSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.BlockHeader} returns this - */ -proto.protocol.BlockHeader.prototype.setWitnessSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.Block.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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.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; -}; -} - - -/** - * 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); -}; - - -/** - * 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.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; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.Block.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.Block.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.Block} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -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 - ); - } -}; - - -/** - * 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 - * @return {!proto.protocol.Block} returns this -*/ -proto.protocol.Block.prototype.setTransactionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.protocol.Transaction=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.Transaction} - */ -proto.protocol.Block.prototype.addTransactions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.Transaction, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.Block} returns this - */ -proto.protocol.Block.prototype.clearTransactionsList = function() { - return this.setTransactionsList([]); -}; - - -/** - * optional BlockHeader block_header = 2; - * @return {?proto.protocol.BlockHeader} - */ -proto.protocol.Block.prototype.getBlockHeader = function() { - return /** @type{?proto.protocol.BlockHeader} */ ( - jspb.Message.getWrapperField(this, proto.protocol.BlockHeader, 2)); -}; - - -/** - * @param {?proto.protocol.BlockHeader|undefined} value - * @return {!proto.protocol.Block} returns this -*/ -proto.protocol.Block.prototype.setBlockHeader = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.Block} returns this - */ -proto.protocol.Block.prototype.clearBlockHeader = function() { - return this.setBlockHeader(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.Block.prototype.hasBlockHeader = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.ChainInventory.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance 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); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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.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) - }; - - 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.ChainInventory} - */ -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); -}; - - -/** - * 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; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.ChainInventory.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.ChainInventory.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} 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 - ); - } -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance 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); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.ChainInventory.BlockId.toObject = function(includeInstance, msg) { - var f, obj = { - hash: msg.getHash_asB64(), - number: 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.ChainInventory.BlockId} - */ -proto.protocol.ChainInventory.BlockId.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - 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.ChainInventory.BlockId} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.ChainInventory.BlockId} - */ -proto.protocol.ChainInventory.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; -}; - - -/** - * 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 - * @return {!proto.protocol.ChainInventory.BlockId} returns this - */ -proto.protocol.ChainInventory.BlockId.prototype.setHash = function(value) { - return 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 - * @return {!proto.protocol.ChainInventory.BlockId} returns this - */ -proto.protocol.ChainInventory.BlockId.prototype.setNumber = function(value) { - return 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 - * @return {!proto.protocol.ChainInventory} returns this -*/ -proto.protocol.ChainInventory.prototype.setIdsList = function(value) { - return 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); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.ChainInventory} returns this - */ -proto.protocol.ChainInventory.prototype.clearIdsList = function() { - return 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 - * @return {!proto.protocol.ChainInventory} returns this - */ -proto.protocol.ChainInventory.prototype.setRemainNum = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.BlockInventory.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance 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); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.BlockInventory.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) - }; - - 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.BlockInventory} - */ -proto.protocol.BlockInventory.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - 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.BlockInventory} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.BlockInventory} - */ -proto.protocol.BlockInventory.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - 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); - break; - case 2: - var value = /** @type {!proto.protocol.BlockInventory.Type} */ (reader.readEnum()); - msg.setType(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.BlockInventory.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.BlockInventory.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.BlockInventory} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.BlockInventory.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getIdsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.protocol.BlockInventory.BlockId.serializeBinaryToWriter - ); - } - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } -}; - - -/** - * @enum {number} - */ -proto.protocol.BlockInventory.Type = { - SYNC: 0, - ADVTISE: 1, - FETCH: 2 -}; - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance 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); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.BlockInventory.BlockId.toObject = function(includeInstance, msg) { - var f, obj = { - hash: msg.getHash_asB64(), - number: 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.BlockInventory.BlockId} - */ -proto.protocol.BlockInventory.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); -}; - - -/** - * 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 {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.BlockInventory.BlockId} - */ -proto.protocol.BlockInventory.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; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.BlockInventory.BlockId.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.BlockInventory.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.BlockInventory.BlockId} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.BlockInventory.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.BlockInventory.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.BlockInventory.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.BlockInventory.BlockId.prototype.getHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.BlockInventory.BlockId} returns this - */ -proto.protocol.BlockInventory.BlockId.prototype.setHash = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int64 number = 2; - * @return {number} - */ -proto.protocol.BlockInventory.BlockId.prototype.getNumber = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.BlockInventory.BlockId} returns this - */ -proto.protocol.BlockInventory.BlockId.prototype.setNumber = function(value) { - return 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 - * @return {!proto.protocol.BlockInventory} returns this -*/ -proto.protocol.BlockInventory.prototype.setIdsList = function(value) { - return 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); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.BlockInventory} returns this - */ -proto.protocol.BlockInventory.prototype.clearIdsList = function() { - return 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 - * @return {!proto.protocol.BlockInventory} returns this - */ -proto.protocol.BlockInventory.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - - -/** - * 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. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Inventory} - */ -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); -}; - - -/** - * 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; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.Inventory.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.Inventory.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.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 - ); - } -}; - - -/** - * @enum {number} - */ -proto.protocol.Inventory.InventoryType = { - TRX: 0, - BLOCK: 1 -}; - -/** - * 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)); -}; - - -/** - * @param {!proto.protocol.Inventory.InventoryType} value - * @return {!proto.protocol.Inventory} returns this - */ -proto.protocol.Inventory.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * repeated bytes ids = 2; - * @return {!(Array|Array)} - */ -proto.protocol.Inventory.prototype.getIdsList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 2)); -}; - - -/** - * repeated bytes ids = 2; - * This is a type-conversion wrapper around `getIdsList()` - * @return {!Array} - */ -proto.protocol.Inventory.prototype.getIdsList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getIdsList())); -}; - - -/** - * 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.Inventory.prototype.getIdsList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getIdsList())); -}; - - -/** - * @param {!(Array|Array)} value - * @return {!proto.protocol.Inventory} returns this - */ -proto.protocol.Inventory.prototype.setIdsList = function(value) { - return jspb.Message.setField(this, 2, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.protocol.Inventory} returns this - */ -proto.protocol.Inventory.prototype.addIds = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.Inventory} returns this - */ -proto.protocol.Inventory.prototype.clearIdsList = function() { - return this.setIdsList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.Items.repeatedFields_ = [2,3,4]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance 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); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -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) - }; - - 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.Items} - */ -proto.protocol.Items.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - 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.Items} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Items} - */ -proto.protocol.Items.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - 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.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(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.Items.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.Items.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.Items} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Items.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getBlocksList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.protocol.Block.serializeBinaryToWriter - ); - } - 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 - ); - } -}; - - -/** - * @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 - * @return {!proto.protocol.Items} returns this - */ -proto.protocol.Items.prototype.setType = function(value) { - return 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 - * @return {!proto.protocol.Items} returns this -*/ -proto.protocol.Items.prototype.setBlocksList = function(value) { - return 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); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.Items} returns this - */ -proto.protocol.Items.prototype.clearBlocksList = function() { - return 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 - * @return {!proto.protocol.Items} returns this -*/ -proto.protocol.Items.prototype.setBlockHeadersList = function(value) { - return 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); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.Items} returns this - */ -proto.protocol.Items.prototype.clearBlockHeadersList = function() { - return 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 - * @return {!proto.protocol.Items} returns this -*/ -proto.protocol.Items.prototype.setTransactionsList = function(value) { - return 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); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.Items} returns this - */ -proto.protocol.Items.prototype.clearTransactionsList = function() { - return this.setTransactionsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance 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); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.DynamicProperties.toObject = function(includeInstance, msg) { - var f, obj = { - lastSolidityBlockNum: 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.DynamicProperties} - */ -proto.protocol.DynamicProperties.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - 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.DynamicProperties} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.DynamicProperties} - */ -proto.protocol.DynamicProperties.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.setLastSolidityBlockNum(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.DynamicProperties.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.DynamicProperties.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.DynamicProperties} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.DynamicProperties.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getLastSolidityBlockNum(); - if (f !== 0) { - writer.writeInt64( - 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 - * @return {!proto.protocol.DynamicProperties} returns this - */ -proto.protocol.DynamicProperties.prototype.setLastSolidityBlockNum = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance 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); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.DisconnectMessage.toObject = function(includeInstance, msg) { - var f, obj = { - reason: 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.DisconnectMessage} - */ -proto.protocol.DisconnectMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - 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.DisconnectMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.DisconnectMessage} - */ -proto.protocol.DisconnectMessage.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); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.DisconnectMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.DisconnectMessage.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.DisconnectMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.DisconnectMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getReason(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } -}; - - -/** - * optional ReasonCode reason = 1; - * @return {!proto.protocol.ReasonCode} - */ -proto.protocol.DisconnectMessage.prototype.getReason = function() { - return /** @type {!proto.protocol.ReasonCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.protocol.ReasonCode} value - * @return {!proto.protocol.DisconnectMessage} returns this - */ -proto.protocol.DisconnectMessage.prototype.setReason = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance 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); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.HelloMessage.toObject = function(includeInstance, msg) { - var f, obj = { - from: (f = msg.getFrom()) && protos_protocol_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) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.HelloMessage} - */ -proto.protocol.HelloMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - 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.HelloMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.HelloMessage} - */ -proto.protocol.HelloMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new protos_protocol_core_Discover_pb.Endpoint; - reader.readMessage(value,protos_protocol_core_Discover_pb.Endpoint.deserializeBinaryFromReader); - msg.setFrom(value); - break; - case 2: - 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(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.HelloMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.HelloMessage.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.HelloMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.HelloMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFrom(); - if (f != null) { - writer.writeMessage( - 1, - f, - protos_protocol_core_Discover_pb.Endpoint.serializeBinaryToWriter - ); - } - 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 - ); - } -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.HelloMessage.BlockId.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.HelloMessage.BlockId.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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 - */ -proto.protocol.HelloMessage.BlockId.toObject = function(includeInstance, msg) { - var f, obj = { - hash: msg.getHash_asB64(), - number: 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.HelloMessage.BlockId} - */ -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); -}; - - -/** - * 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} - */ -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; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.HelloMessage.BlockId.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.HelloMessage.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.HelloMessage.BlockId} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -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 - ); - } -}; - - -/** - * optional bytes hash = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.HelloMessage.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.HelloMessage.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.HelloMessage.BlockId.prototype.getHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.HelloMessage.BlockId} returns this - */ -proto.protocol.HelloMessage.BlockId.prototype.setHash = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int64 number = 2; - * @return {number} - */ -proto.protocol.HelloMessage.BlockId.prototype.getNumber = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.HelloMessage.BlockId} returns this - */ -proto.protocol.HelloMessage.BlockId.prototype.setNumber = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional Endpoint from = 1; - * @return {?proto.protocol.Endpoint} - */ -proto.protocol.HelloMessage.prototype.getFrom = function() { - return /** @type{?proto.protocol.Endpoint} */ ( - jspb.Message.getWrapperField(this, protos_protocol_core_Discover_pb.Endpoint, 1)); -}; - - -/** - * @param {?proto.protocol.Endpoint|undefined} value - * @return {!proto.protocol.HelloMessage} returns this -*/ -proto.protocol.HelloMessage.prototype.setFrom = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.HelloMessage} returns this - */ -proto.protocol.HelloMessage.prototype.clearFrom = function() { - return this.setFrom(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.HelloMessage.prototype.hasFrom = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional int32 version = 2; - * @return {number} - */ -proto.protocol.HelloMessage.prototype.getVersion = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.HelloMessage} returns this - */ -proto.protocol.HelloMessage.prototype.setVersion = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int64 timestamp = 3; - * @return {number} - */ -proto.protocol.HelloMessage.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.HelloMessage} returns this - */ -proto.protocol.HelloMessage.prototype.setTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional BlockId genesisBlockId = 4; - * @return {?proto.protocol.HelloMessage.BlockId} - */ -proto.protocol.HelloMessage.prototype.getGenesisblockid = function() { - return /** @type{?proto.protocol.HelloMessage.BlockId} */ ( - jspb.Message.getWrapperField(this, proto.protocol.HelloMessage.BlockId, 4)); -}; - - -/** - * @param {?proto.protocol.HelloMessage.BlockId|undefined} value - * @return {!proto.protocol.HelloMessage} returns this -*/ -proto.protocol.HelloMessage.prototype.setGenesisblockid = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.HelloMessage} returns this - */ -proto.protocol.HelloMessage.prototype.clearGenesisblockid = function() { - return this.setGenesisblockid(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.HelloMessage.prototype.hasGenesisblockid = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional BlockId solidBlockId = 5; - * @return {?proto.protocol.HelloMessage.BlockId} - */ -proto.protocol.HelloMessage.prototype.getSolidblockid = function() { - return /** @type{?proto.protocol.HelloMessage.BlockId} */ ( - jspb.Message.getWrapperField(this, proto.protocol.HelloMessage.BlockId, 5)); -}; - - -/** - * @param {?proto.protocol.HelloMessage.BlockId|undefined} value - * @return {!proto.protocol.HelloMessage} returns this -*/ -proto.protocol.HelloMessage.prototype.setSolidblockid = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.HelloMessage} returns this - */ -proto.protocol.HelloMessage.prototype.clearSolidblockid = function() { - return this.setSolidblockid(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.HelloMessage.prototype.hasSolidblockid = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional BlockId headBlockId = 6; - * @return {?proto.protocol.HelloMessage.BlockId} - */ -proto.protocol.HelloMessage.prototype.getHeadblockid = function() { - return /** @type{?proto.protocol.HelloMessage.BlockId} */ ( - jspb.Message.getWrapperField(this, proto.protocol.HelloMessage.BlockId, 6)); -}; - - -/** - * @param {?proto.protocol.HelloMessage.BlockId|undefined} value - * @return {!proto.protocol.HelloMessage} returns this -*/ -proto.protocol.HelloMessage.prototype.setHeadblockid = function(value) { - return jspb.Message.setWrapperField(this, 6, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.HelloMessage} returns this - */ -proto.protocol.HelloMessage.prototype.clearHeadblockid = function() { - return this.setHeadblockid(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.HelloMessage.prototype.hasHeadblockid = function() { - return jspb.Message.getField(this, 6) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.SmartContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.SmartContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.SmartContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.SmartContract.toObject = function(includeInstance, msg) { - var f, obj = { - 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, ""), - originEnergyLimit: 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.SmartContract} - */ -proto.protocol.SmartContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - 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.SmartContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.SmartContract} - */ -proto.protocol.SmartContract.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.setOriginAddress(value); - break; - case 2: - 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 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setConsumeUserResourcePercent(value); - break; - case 7: - 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; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.SmartContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.SmartContract.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.SmartContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.SmartContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOriginAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getContractAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getAbi(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.protocol.SmartContract.ABI.serializeBinaryToWriter - ); - } - f = message.getBytecode_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - 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 - ); - } - f = message.getOriginEnergyLimit(); - if (f !== 0) { - writer.writeInt64( - 8, - f - ); - } -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.SmartContract.ABI.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.SmartContract.ABI.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.SmartContract.ABI.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.SmartContract.ABI} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.SmartContract.ABI.toObject = function(includeInstance, msg) { - var f, obj = { - entrysList: jspb.Message.toObjectList(msg.getEntrysList(), - proto.protocol.SmartContract.ABI.Entry.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.SmartContract.ABI} - */ -proto.protocol.SmartContract.ABI.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - 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.SmartContract.ABI} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.SmartContract.ABI} - */ -proto.protocol.SmartContract.ABI.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.protocol.SmartContract.ABI.Entry; - reader.readMessage(value,proto.protocol.SmartContract.ABI.Entry.deserializeBinaryFromReader); - msg.addEntrys(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.SmartContract.ABI.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.SmartContract.ABI.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.SmartContract.ABI} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.SmartContract.ABI.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getEntrysList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.protocol.SmartContract.ABI.Entry.serializeBinaryToWriter - ); - } -}; - - - -/** - * 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) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.SmartContract.ABI.Entry.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.SmartContract.ABI.Entry.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @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.SmartContract.ABI.Entry.toObject = function(includeInstance, msg) { - var f, obj = { - anonymous: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - constant: jspb.Message.getBooleanFieldWithDefault(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.getBooleanFieldWithDefault(msg, 7, false), - statemutability: 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.SmartContract.ABI.Entry} - */ -proto.protocol.SmartContract.ABI.Entry.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - 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.SmartContract.ABI.Entry} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.SmartContract.ABI.Entry} - */ -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 {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(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.SmartContract.ABI.Entry.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.SmartContract.ABI.Entry.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.SmartContract.ABI.Entry} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.SmartContract.ABI.Entry.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - 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( - 6, - f - ); - } - f = message.getPayable(); - if (f) { - writer.writeBool( - 7, - f - ); - } - f = message.getStatemutability(); - if (f !== 0.0) { - writer.writeEnum( - 8, - f - ); - } -}; - - -/** - * @enum {number} - */ -proto.protocol.SmartContract.ABI.Entry.EntryType = { - UNKNOWNENTRYTYPE: 0, - CONSTRUCTOR: 1, - FUNCTION: 2, - EVENT: 3, - FALLBACK: 4 -}; - -/** - * @enum {number} - */ -proto.protocol.SmartContract.ABI.Entry.StateMutabilityType = { - UNKNOWNMUTABILITYTYPE: 0, - PURE: 1, - VIEW: 2, - NONPAYABLE: 3, - PAYABLE: 4 -}; - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.SmartContract.ABI.Entry.Param.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.SmartContract.ABI.Entry.Param.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @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.SmartContract.ABI.Entry.Param.toObject = function(includeInstance, msg) { - var f, obj = { - indexed: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - name: jspb.Message.getFieldWithDefault(msg, 2, ""), - type: 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.SmartContract.ABI.Entry.Param} - */ -proto.protocol.SmartContract.ABI.Entry.Param.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - 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.SmartContract.ABI.Entry.Param} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.SmartContract.ABI.Entry.Param} - */ -proto.protocol.SmartContract.ABI.Entry.Param.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.setIndexed(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setType(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.SmartContract.ABI.Entry.Param.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.SmartContract.ABI.Entry.Param.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.SmartContract.ABI.Entry.Param} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.SmartContract.ABI.Entry.Param.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getIndexed(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getType(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional bool indexed = 1; - * @return {boolean} - */ -proto.protocol.SmartContract.ABI.Entry.Param.prototype.getIndexed = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.protocol.SmartContract.ABI.Entry.Param} returns this - */ -proto.protocol.SmartContract.ABI.Entry.Param.prototype.setIndexed = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - -/** - * optional string name = 2; - * @return {string} - */ -proto.protocol.SmartContract.ABI.Entry.Param.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.protocol.SmartContract.ABI.Entry.Param} returns this - */ -proto.protocol.SmartContract.ABI.Entry.Param.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string type = 3; - * @return {string} - */ -proto.protocol.SmartContract.ABI.Entry.Param.prototype.getType = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.protocol.SmartContract.ABI.Entry.Param} returns this - */ -proto.protocol.SmartContract.ABI.Entry.Param.prototype.setType = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional bool anonymous = 1; - * @return {boolean} - */ -proto.protocol.SmartContract.ABI.Entry.prototype.getAnonymous = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.protocol.SmartContract.ABI.Entry} returns this - */ -proto.protocol.SmartContract.ABI.Entry.prototype.setAnonymous = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - -/** - * optional bool constant = 2; - * @return {boolean} - */ -proto.protocol.SmartContract.ABI.Entry.prototype.getConstant = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.protocol.SmartContract.ABI.Entry} returns this - */ -proto.protocol.SmartContract.ABI.Entry.prototype.setConstant = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - -/** - * optional string name = 3; - * @return {string} - */ -proto.protocol.SmartContract.ABI.Entry.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.protocol.SmartContract.ABI.Entry} returns this - */ -proto.protocol.SmartContract.ABI.Entry.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * repeated Param inputs = 4; - * @return {!Array} - */ -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 - * @return {!proto.protocol.SmartContract.ABI.Entry} returns this -*/ -proto.protocol.SmartContract.ABI.Entry.prototype.setInputsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); -}; - - -/** - * @param {!proto.protocol.SmartContract.ABI.Entry.Param=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.SmartContract.ABI.Entry.Param} - */ -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); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.SmartContract.ABI.Entry} returns this - */ -proto.protocol.SmartContract.ABI.Entry.prototype.clearInputsList = function() { - return this.setInputsList([]); -}; - - -/** - * repeated Param outputs = 5; - * @return {!Array} - */ -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 - * @return {!proto.protocol.SmartContract.ABI.Entry} returns this -*/ -proto.protocol.SmartContract.ABI.Entry.prototype.setOutputsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 5, value); -}; - - -/** - * @param {!proto.protocol.SmartContract.ABI.Entry.Param=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.SmartContract.ABI.Entry.Param} - */ -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); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.SmartContract.ABI.Entry} returns this - */ -proto.protocol.SmartContract.ABI.Entry.prototype.clearOutputsList = function() { - return this.setOutputsList([]); -}; - - -/** - * optional EntryType type = 6; - * @return {!proto.protocol.SmartContract.ABI.Entry.EntryType} - */ -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 - * @return {!proto.protocol.SmartContract.ABI.Entry} returns this - */ -proto.protocol.SmartContract.ABI.Entry.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 6, value); -}; - - -/** - * optional bool payable = 7; - * @return {boolean} - */ -proto.protocol.SmartContract.ABI.Entry.prototype.getPayable = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.protocol.SmartContract.ABI.Entry} returns this - */ -proto.protocol.SmartContract.ABI.Entry.prototype.setPayable = function(value) { - return jspb.Message.setProto3BooleanField(this, 7, value); -}; - - -/** - * optional StateMutabilityType stateMutability = 8; - * @return {!proto.protocol.SmartContract.ABI.Entry.StateMutabilityType} - */ -proto.protocol.SmartContract.ABI.Entry.prototype.getStatemutability = function() { - return /** @type {!proto.protocol.SmartContract.ABI.Entry.StateMutabilityType} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {!proto.protocol.SmartContract.ABI.Entry.StateMutabilityType} value - * @return {!proto.protocol.SmartContract.ABI.Entry} returns this - */ -proto.protocol.SmartContract.ABI.Entry.prototype.setStatemutability = function(value) { - return jspb.Message.setProto3EnumField(this, 8, value); -}; - - -/** - * repeated Entry entrys = 1; - * @return {!Array} - */ -proto.protocol.SmartContract.ABI.prototype.getEntrysList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.SmartContract.ABI.Entry, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.SmartContract.ABI} returns this -*/ -proto.protocol.SmartContract.ABI.prototype.setEntrysList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.protocol.SmartContract.ABI.Entry=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.SmartContract.ABI.Entry} - */ -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); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.SmartContract.ABI} returns this - */ -proto.protocol.SmartContract.ABI.prototype.clearEntrysList = function() { - return this.setEntrysList([]); -}; - - -/** - * optional bytes origin_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.SmartContract.prototype.getOriginAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes origin_address = 1; - * This is a type-conversion wrapper around `getOriginAddress()` - * @return {string} - */ -proto.protocol.SmartContract.prototype.getOriginAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOriginAddress())); -}; - - -/** - * 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.SmartContract.prototype.getOriginAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOriginAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.SmartContract} returns this - */ -proto.protocol.SmartContract.prototype.setOriginAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes contract_address = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.SmartContract.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.SmartContract.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.SmartContract.prototype.getContractAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getContractAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.SmartContract} returns this - */ -proto.protocol.SmartContract.prototype.setContractAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * 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 - * @return {!proto.protocol.SmartContract} returns this -*/ -proto.protocol.SmartContract.prototype.setAbi = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.SmartContract} returns this - */ -proto.protocol.SmartContract.prototype.clearAbi = function() { - return this.setAbi(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.SmartContract.prototype.hasAbi = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional bytes bytecode = 4; - * @return {!(string|Uint8Array)} - */ -proto.protocol.SmartContract.prototype.getBytecode = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * 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())); -}; - - -/** - * 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())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.SmartContract} returns this - */ -proto.protocol.SmartContract.prototype.setBytecode = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional int64 call_value = 5; - * @return {number} - */ -proto.protocol.SmartContract.prototype.getCallValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.SmartContract} returns this - */ -proto.protocol.SmartContract.prototype.setCallValue = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * 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 - * @return {!proto.protocol.SmartContract} returns this - */ -proto.protocol.SmartContract.prototype.setConsumeUserResourcePercent = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional string name = 7; - * @return {string} - */ -proto.protocol.SmartContract.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * @param {string} value - * @return {!proto.protocol.SmartContract} returns this - */ -proto.protocol.SmartContract.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 7, 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 - * @return {!proto.protocol.SmartContract} returns this - */ -proto.protocol.SmartContract.prototype.setOriginEnergyLimit = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - - -/** - * 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. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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.getBooleanFieldWithDefault(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 - ); - } -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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), - tokenid: 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.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 {string} */ (reader.readString()); - msg.setTokenid(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.getTokenid(); - if (f.length > 0) { - writer.writeString( - 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 - * @return {!proto.protocol.InternalTransaction.CallValueInfo} returns this - */ -proto.protocol.InternalTransaction.CallValueInfo.prototype.setCallvalue = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional string tokenId = 2; - * @return {string} - */ -proto.protocol.InternalTransaction.CallValueInfo.prototype.getTokenid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.protocol.InternalTransaction.CallValueInfo} returns this - */ -proto.protocol.InternalTransaction.CallValueInfo.prototype.setTokenid = function(value) { - return jspb.Message.setProto3StringField(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 - * @return {!proto.protocol.InternalTransaction} returns this - */ -proto.protocol.InternalTransaction.prototype.setHash = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.InternalTransaction} returns this - */ -proto.protocol.InternalTransaction.prototype.setCallerAddress = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.InternalTransaction} returns this - */ -proto.protocol.InternalTransaction.prototype.setTransfertoAddress = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.InternalTransaction} returns this -*/ -proto.protocol.InternalTransaction.prototype.setCallvalueinfoList = function(value) { - return 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); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.InternalTransaction} returns this - */ -proto.protocol.InternalTransaction.prototype.clearCallvalueinfoList = function() { - return 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 - * @return {!proto.protocol.InternalTransaction} returns this - */ -proto.protocol.InternalTransaction.prototype.setNote = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); -}; - - -/** - * optional bool rejected = 6; - * @return {boolean} - */ -proto.protocol.InternalTransaction.prototype.getRejected = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.protocol.InternalTransaction} returns this - */ -proto.protocol.InternalTransaction.prototype.setRejected = function(value) { - return jspb.Message.setProto3BooleanField(this, 6, value); -}; - - - -/** - * 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. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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 - * @return {!proto.protocol.DelegatedResourceAccountIndex} returns this - */ -proto.protocol.DelegatedResourceAccountIndex.prototype.setAccount = function(value) { - return jspb.Message.setProto3BytesField(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 - * @return {!proto.protocol.DelegatedResourceAccountIndex} returns this - */ -proto.protocol.DelegatedResourceAccountIndex.prototype.setFromaccountsList = function(value) { - return jspb.Message.setField(this, 2, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.protocol.DelegatedResourceAccountIndex} returns this - */ -proto.protocol.DelegatedResourceAccountIndex.prototype.addFromaccounts = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.DelegatedResourceAccountIndex} returns this - */ -proto.protocol.DelegatedResourceAccountIndex.prototype.clearFromaccountsList = function() { - return 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 - * @return {!proto.protocol.DelegatedResourceAccountIndex} returns this - */ -proto.protocol.DelegatedResourceAccountIndex.prototype.setToaccountsList = function(value) { - return jspb.Message.setField(this, 3, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.protocol.DelegatedResourceAccountIndex} returns this - */ -proto.protocol.DelegatedResourceAccountIndex.prototype.addToaccounts = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 3, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.DelegatedResourceAccountIndex} returns this - */ -proto.protocol.DelegatedResourceAccountIndex.prototype.clearToaccountsList = function() { - return this.setToaccountsList([]); -}; - - -/** - * @enum {number} - */ -proto.protocol.AccountType = { - NORMAL: 0, - ASSETISSUE: 1, - CONTRACT: 2 -}; - -/** - * @enum {number} - */ -proto.protocol.ReasonCode = { - REQUESTED: 0, - BAD_PROTOCOL: 2, - TOO_MANY_PEERS: 4, - DUPLICATE_PEER: 5, - INCOMPATIBLE_PROTOCOL: 6, - NULL_IDENTITY: 7, - PEER_QUITING: 8, - UNEXPECTED_IDENTITY: 9, - LOCAL_IDENTITY: 10, - PING_TIMEOUT: 11, - USER_REASON: 16, - RESET: 17, - SYNC_FAIL: 18, - FETCH_FAIL: 19, - BAD_TX: 20, - BAD_BLOCK: 21, - FORKED: 22, - UNLINKABLE: 23, - INCOMPATIBLE_VERSION: 24, - INCOMPATIBLE_CHAIN: 25, - TIME_OUT: 32, - CONNECT_FAIL: 33, - TOO_MANY_PEERS_WITH_SAME_IP: 34, - UNKNOWN: 255 -}; - -goog.object.extend(exports, proto.protocol); diff --git a/js/protos/score/score_pb.js b/js/protos/score/score_pb.js index 4b2c82f..f544fa1 100644 --- a/js/protos/score/score_pb.js +++ b/js/protos/score/score_pb.js @@ -12,8 +12,6 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -var github_com_bittorrent_go$btfs$common_protos_node_node_pb = require('../../github.com/bittorrent/go-btfs-common/protos/node/node_pb.js'); -goog.object.extend(proto, github_com_bittorrent_go$btfs$common_protos_node_node_pb); var github_com_tron$us_protobuf_gogoproto_gogo_pb = require('../../github.com/tron-us/protobuf/gogoproto/gogo_pb.js'); goog.object.extend(proto, github_com_tron$us_protobuf_gogoproto_gogo_pb); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); @@ -24,6 +22,11 @@ goog.exportSymbol('proto.score.HostsReq', null, global); goog.exportSymbol('proto.score.HostsReq.Mode', null, global); goog.exportSymbol('proto.score.HostsResp', null, global); goog.exportSymbol('proto.score.Location', null, global); +goog.exportSymbol('proto.score.Node', null, global); +goog.exportSymbol('proto.score.Node.ExperimentalFlags', null, global); +goog.exportSymbol('proto.score.Node.Geo', null, global); +goog.exportSymbol('proto.score.Node.Settings', null, global); +goog.exportSymbol('proto.score.NodeRole', null, global); goog.exportSymbol('proto.score.NodesReq', null, global); goog.exportSymbol('proto.score.ResponseCode', null, global); goog.exportSymbol('proto.score.RolesHostsReq', null, global); @@ -32,6 +35,10 @@ goog.exportSymbol('proto.score.SettingsReq', null, global); goog.exportSymbol('proto.score.SettingsResp', null, global); goog.exportSymbol('proto.score.StatsReq', null, global); goog.exportSymbol('proto.score.StatsResp', null, global); +goog.exportSymbol('proto.score.StorageStat', null, global); +goog.exportSymbol('proto.score.StorageStat.Host', null, global); +goog.exportSymbol('proto.score.StorageStat.HostStats', null, global); +goog.exportSymbol('proto.score.StorageStat.Renter', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -284,6 +291,174 @@ if (goog.DEBUG && !COMPILED) { */ proto.score.Location.displayName = 'proto.score.Location'; } +/** + * 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.score.StorageStat = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.score.StorageStat, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.score.StorageStat.displayName = 'proto.score.StorageStat'; +} +/** + * 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.score.StorageStat.HostStats = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.score.StorageStat.HostStats, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.score.StorageStat.HostStats.displayName = 'proto.score.StorageStat.HostStats'; +} +/** + * 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.score.StorageStat.Host = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.score.StorageStat.Host, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.score.StorageStat.Host.displayName = 'proto.score.StorageStat.Host'; +} +/** + * 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.score.StorageStat.Renter = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.score.StorageStat.Renter, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.score.StorageStat.Renter.displayName = 'proto.score.StorageStat.Renter'; +} +/** + * 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.score.Node = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.score.Node, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.score.Node.displayName = 'proto.score.Node'; +} +/** + * 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.score.Node.Settings = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.score.Node.Settings.repeatedFields_, null); +}; +goog.inherits(proto.score.Node.Settings, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.score.Node.Settings.displayName = 'proto.score.Node.Settings'; +} +/** + * 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.score.Node.Geo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.score.Node.Geo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.score.Node.Geo.displayName = 'proto.score.Node.Geo'; +} +/** + * 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.score.Node.ExperimentalFlags = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.score.Node.ExperimentalFlags, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.score.Node.ExperimentalFlags.displayName = 'proto.score.Node.ExperimentalFlags'; +} /** * List of repeated fields within this message type. @@ -1508,7 +1683,7 @@ proto.score.RolesHostsReq.deserializeBinaryFromReader = function(msg, reader) { msg.setRespSize(value); break; case 3: - var value = /** @type {!proto.node.NodeRole} */ (reader.readEnum()); + var value = /** @type {!proto.score.NodeRole} */ (reader.readEnum()); msg.setRole(value); break; default: @@ -1601,16 +1776,16 @@ proto.score.RolesHostsReq.prototype.setRespSize = function(value) { /** - * optional node.NodeRole role = 3; - * @return {!proto.node.NodeRole} + * optional NodeRole role = 3; + * @return {!proto.score.NodeRole} */ proto.score.RolesHostsReq.prototype.getRole = function() { - return /** @type {!proto.node.NodeRole} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {!proto.score.NodeRole} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** - * @param {!proto.node.NodeRole} value + * @param {!proto.score.NodeRole} value * @return {!proto.score.RolesHostsReq} returns this */ proto.score.RolesHostsReq.prototype.setRole = function(value) { @@ -2105,7 +2280,7 @@ proto.score.StatsResp.toObject = function(includeInstance, msg) { code: jspb.Message.getFieldWithDefault(msg, 1, 0), message: jspb.Message.getFieldWithDefault(msg, 2, ""), responseTime: (f = msg.getResponseTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - stats: (f = msg.getStats()) && github_com_bittorrent_go$btfs$common_protos_node_node_pb.StorageStat.HostStats.toObject(includeInstance, f) + stats: (f = msg.getStats()) && proto.score.StorageStat.HostStats.toObject(includeInstance, f) }; if (includeInstance) { @@ -2156,8 +2331,8 @@ proto.score.StatsResp.deserializeBinaryFromReader = function(msg, reader) { msg.setResponseTime(value); break; case 4: - var value = new github_com_bittorrent_go$btfs$common_protos_node_node_pb.StorageStat.HostStats; - reader.readMessage(value,github_com_bittorrent_go$btfs$common_protos_node_node_pb.StorageStat.HostStats.deserializeBinaryFromReader); + var value = new proto.score.StorageStat.HostStats; + reader.readMessage(value,proto.score.StorageStat.HostStats.deserializeBinaryFromReader); msg.setStats(value); break; default: @@ -2216,7 +2391,7 @@ proto.score.StatsResp.serializeBinaryToWriter = function(message, writer) { writer.writeMessage( 4, f, - github_com_bittorrent_go$btfs$common_protos_node_node_pb.StorageStat.HostStats.serializeBinaryToWriter + proto.score.StorageStat.HostStats.serializeBinaryToWriter ); } }; @@ -2296,17 +2471,17 @@ proto.score.StatsResp.prototype.hasResponseTime = function() { /** - * optional node.StorageStat.HostStats stats = 4; - * @return {?proto.node.StorageStat.HostStats} + * optional StorageStat.HostStats stats = 4; + * @return {?proto.score.StorageStat.HostStats} */ proto.score.StatsResp.prototype.getStats = function() { - return /** @type{?proto.node.StorageStat.HostStats} */ ( - jspb.Message.getWrapperField(this, github_com_bittorrent_go$btfs$common_protos_node_node_pb.StorageStat.HostStats, 4)); + return /** @type{?proto.score.StorageStat.HostStats} */ ( + jspb.Message.getWrapperField(this, proto.score.StorageStat.HostStats, 4)); }; /** - * @param {?proto.node.StorageStat.HostStats|undefined} value + * @param {?proto.score.StorageStat.HostStats|undefined} value * @return {!proto.score.StatsResp} returns this */ proto.score.StatsResp.prototype.setStats = function(value) { @@ -2398,7 +2573,7 @@ proto.score.Host.toObject = function(includeInstance, msg) { collateralLost: jspb.Message.getFieldWithDefault(msg, 25, 0), collateralBurn: jspb.Message.getFieldWithDefault(msg, 26, 0), countryShort: jspb.Message.getFieldWithDefault(msg, 27, ""), - flg: (f = msg.getFlg()) && github_com_bittorrent_go$btfs$common_protos_node_node_pb.Node.ExperimentalFlags.toObject(includeInstance, f), + flg: (f = msg.getFlg()) && proto.score.Node.ExperimentalFlags.toObject(includeInstance, f), discovery: jspb.Message.getFloatingPointFieldWithDefault(msg, 29, 0.0), uptimeScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 30, 0.0), ageScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 31, 0.0), @@ -2554,8 +2729,8 @@ proto.score.Host.deserializeBinaryFromReader = function(msg, reader) { msg.setCountryShort(value); break; case 28: - var value = new github_com_bittorrent_go$btfs$common_protos_node_node_pb.Node.ExperimentalFlags; - reader.readMessage(value,github_com_bittorrent_go$btfs$common_protos_node_node_pb.Node.ExperimentalFlags.deserializeBinaryFromReader); + var value = new proto.score.Node.ExperimentalFlags; + reader.readMessage(value,proto.score.Node.ExperimentalFlags.deserializeBinaryFromReader); msg.setFlg(value); break; case 29: @@ -2583,7 +2758,7 @@ proto.score.Host.deserializeBinaryFromReader = function(msg, reader) { msg.setDownloadSpeedScore(value); break; case 35: - var value = /** @type {!Array} */ (reader.readPackedEnum()); + var value = /** @type {!Array} */ (reader.readPackedEnum()); msg.setRolesList(value); break; default: @@ -2812,7 +2987,7 @@ proto.score.Host.serializeBinaryToWriter = function(message, writer) { writer.writeMessage( 28, f, - github_com_bittorrent_go$btfs$common_protos_node_node_pb.Node.ExperimentalFlags.serializeBinaryToWriter + proto.score.Node.ExperimentalFlags.serializeBinaryToWriter ); } f = message.getDiscovery(); @@ -3411,17 +3586,17 @@ proto.score.Host.prototype.setCountryShort = function(value) { /** - * optional node.Node.ExperimentalFlags flg = 28; - * @return {?proto.node.Node.ExperimentalFlags} + * optional Node.ExperimentalFlags flg = 28; + * @return {?proto.score.Node.ExperimentalFlags} */ proto.score.Host.prototype.getFlg = function() { - return /** @type{?proto.node.Node.ExperimentalFlags} */ ( - jspb.Message.getWrapperField(this, github_com_bittorrent_go$btfs$common_protos_node_node_pb.Node.ExperimentalFlags, 28)); + return /** @type{?proto.score.Node.ExperimentalFlags} */ ( + jspb.Message.getWrapperField(this, proto.score.Node.ExperimentalFlags, 28)); }; /** - * @param {?proto.node.Node.ExperimentalFlags|undefined} value + * @param {?proto.score.Node.ExperimentalFlags|undefined} value * @return {!proto.score.Host} returns this */ proto.score.Host.prototype.setFlg = function(value) { @@ -3556,16 +3731,16 @@ proto.score.Host.prototype.setDownloadSpeedScore = function(value) { /** - * repeated node.NodeRole roles = 35; - * @return {!Array} + * repeated NodeRole roles = 35; + * @return {!Array} */ proto.score.Host.prototype.getRolesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 35)); + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 35)); }; /** - * @param {!Array} value + * @param {!Array} value * @return {!proto.score.Host} returns this */ proto.score.Host.prototype.setRolesList = function(value) { @@ -3574,7 +3749,7 @@ proto.score.Host.prototype.setRolesList = function(value) { /** - * @param {!proto.node.NodeRole} value + * @param {!proto.score.NodeRole} value * @param {number=} opt_index * @return {!proto.score.Host} returns this */ @@ -3912,15 +4087,3603 @@ proto.score.Location.prototype.setLon = function(value) { }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @enum {number} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.score.ResponseCode = { - SUCCESS: 0, - SIGNATURE_FORMAT_ERROR: 1, - COMPUTE_ADDRESS_ERROR: 2, - TIMEOUT_ERROR: 3, - OTHER_ERROR: 20 +proto.score.StorageStat.prototype.toObject = function(opt_includeInstance) { + return proto.score.StorageStat.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.score.StorageStat} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.StorageStat.toObject = function(includeInstance, msg) { + var f, obj = { + hostStats: (f = msg.getHostStats()) && proto.score.StorageStat.Host.toObject(includeInstance, f), + renterStats: (f = msg.getRenterStats()) && proto.score.StorageStat.Renter.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.score.StorageStat} + */ +proto.score.StorageStat.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.score.StorageStat; + return proto.score.StorageStat.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.score.StorageStat} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.score.StorageStat} + */ +proto.score.StorageStat.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.score.StorageStat.Host; + reader.readMessage(value,proto.score.StorageStat.Host.deserializeBinaryFromReader); + msg.setHostStats(value); + break; + case 2: + var value = new proto.score.StorageStat.Renter; + reader.readMessage(value,proto.score.StorageStat.Renter.deserializeBinaryFromReader); + msg.setRenterStats(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.score.StorageStat.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.score.StorageStat.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.score.StorageStat} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.StorageStat.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHostStats(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.score.StorageStat.Host.serializeBinaryToWriter + ); + } + f = message.getRenterStats(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.score.StorageStat.Renter.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.score.StorageStat.HostStats.prototype.toObject = function(opt_includeInstance) { + return proto.score.StorageStat.HostStats.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.score.StorageStat.HostStats} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.StorageStat.HostStats.toObject = function(includeInstance, msg) { + var f, obj = { + uptime: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0), + score: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), + uptimeScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0), + ageScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0), + versionScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.0), + speedScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 6, 0.0), + uploadSpeedScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 7, 0.0), + downloadSpeedScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 8, 0.0), + uptimeWeight: jspb.Message.getFloatingPointFieldWithDefault(msg, 9, 0.0), + ageWeight: jspb.Message.getFloatingPointFieldWithDefault(msg, 10, 0.0), + versionWeight: jspb.Message.getFloatingPointFieldWithDefault(msg, 11, 0.0), + speedWeight: jspb.Message.getFloatingPointFieldWithDefault(msg, 12, 0.0), + uploadSpeedWeight: jspb.Message.getFloatingPointFieldWithDefault(msg, 13, 0.0), + downloadSpeedWeight: jspb.Message.getFloatingPointFieldWithDefault(msg, 14, 0.0), + lastUpdated: (f = msg.getLastUpdated()) && google_protobuf_timestamp_pb.Timestamp.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.score.StorageStat.HostStats} + */ +proto.score.StorageStat.HostStats.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.score.StorageStat.HostStats; + return proto.score.StorageStat.HostStats.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.score.StorageStat.HostStats} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.score.StorageStat.HostStats} + */ +proto.score.StorageStat.HostStats.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readFloat()); + msg.setUptime(value); + break; + case 2: + var value = /** @type {number} */ (reader.readFloat()); + msg.setScore(value); + break; + case 3: + var value = /** @type {number} */ (reader.readFloat()); + msg.setUptimeScore(value); + break; + case 4: + var value = /** @type {number} */ (reader.readFloat()); + msg.setAgeScore(value); + break; + case 5: + var value = /** @type {number} */ (reader.readFloat()); + msg.setVersionScore(value); + break; + case 6: + var value = /** @type {number} */ (reader.readFloat()); + msg.setSpeedScore(value); + break; + case 7: + var value = /** @type {number} */ (reader.readFloat()); + msg.setUploadSpeedScore(value); + break; + case 8: + var value = /** @type {number} */ (reader.readFloat()); + msg.setDownloadSpeedScore(value); + break; + case 9: + var value = /** @type {number} */ (reader.readFloat()); + msg.setUptimeWeight(value); + break; + case 10: + var value = /** @type {number} */ (reader.readFloat()); + msg.setAgeWeight(value); + break; + case 11: + var value = /** @type {number} */ (reader.readFloat()); + msg.setVersionWeight(value); + break; + case 12: + var value = /** @type {number} */ (reader.readFloat()); + msg.setSpeedWeight(value); + break; + case 13: + var value = /** @type {number} */ (reader.readFloat()); + msg.setUploadSpeedWeight(value); + break; + case 14: + var value = /** @type {number} */ (reader.readFloat()); + msg.setDownloadSpeedWeight(value); + break; + case 15: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setLastUpdated(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.score.StorageStat.HostStats.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.score.StorageStat.HostStats.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.score.StorageStat.HostStats} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.StorageStat.HostStats.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUptime(); + if (f !== 0.0) { + writer.writeFloat( + 1, + f + ); + } + f = message.getScore(); + if (f !== 0.0) { + writer.writeFloat( + 2, + f + ); + } + f = message.getUptimeScore(); + if (f !== 0.0) { + writer.writeFloat( + 3, + f + ); + } + f = message.getAgeScore(); + if (f !== 0.0) { + writer.writeFloat( + 4, + f + ); + } + f = message.getVersionScore(); + if (f !== 0.0) { + writer.writeFloat( + 5, + f + ); + } + f = message.getSpeedScore(); + if (f !== 0.0) { + writer.writeFloat( + 6, + f + ); + } + f = message.getUploadSpeedScore(); + if (f !== 0.0) { + writer.writeFloat( + 7, + f + ); + } + f = message.getDownloadSpeedScore(); + if (f !== 0.0) { + writer.writeFloat( + 8, + f + ); + } + f = message.getUptimeWeight(); + if (f !== 0.0) { + writer.writeFloat( + 9, + f + ); + } + f = message.getAgeWeight(); + if (f !== 0.0) { + writer.writeFloat( + 10, + f + ); + } + f = message.getVersionWeight(); + if (f !== 0.0) { + writer.writeFloat( + 11, + f + ); + } + f = message.getSpeedWeight(); + if (f !== 0.0) { + writer.writeFloat( + 12, + f + ); + } + f = message.getUploadSpeedWeight(); + if (f !== 0.0) { + writer.writeFloat( + 13, + f + ); + } + f = message.getDownloadSpeedWeight(); + if (f !== 0.0) { + writer.writeFloat( + 14, + f + ); + } + f = message.getLastUpdated(); + if (f != null) { + writer.writeMessage( + 15, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional float uptime = 1; + * @return {number} + */ +proto.score.StorageStat.HostStats.prototype.getUptime = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.HostStats} returns this + */ +proto.score.StorageStat.HostStats.prototype.setUptime = function(value) { + return jspb.Message.setProto3FloatField(this, 1, value); +}; + + +/** + * optional float score = 2; + * @return {number} + */ +proto.score.StorageStat.HostStats.prototype.getScore = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.HostStats} returns this + */ +proto.score.StorageStat.HostStats.prototype.setScore = function(value) { + return jspb.Message.setProto3FloatField(this, 2, value); +}; + + +/** + * optional float uptime_score = 3; + * @return {number} + */ +proto.score.StorageStat.HostStats.prototype.getUptimeScore = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.HostStats} returns this + */ +proto.score.StorageStat.HostStats.prototype.setUptimeScore = function(value) { + return jspb.Message.setProto3FloatField(this, 3, value); +}; + + +/** + * optional float age_score = 4; + * @return {number} + */ +proto.score.StorageStat.HostStats.prototype.getAgeScore = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.HostStats} returns this + */ +proto.score.StorageStat.HostStats.prototype.setAgeScore = function(value) { + return jspb.Message.setProto3FloatField(this, 4, value); +}; + + +/** + * optional float version_score = 5; + * @return {number} + */ +proto.score.StorageStat.HostStats.prototype.getVersionScore = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.HostStats} returns this + */ +proto.score.StorageStat.HostStats.prototype.setVersionScore = function(value) { + return jspb.Message.setProto3FloatField(this, 5, value); +}; + + +/** + * optional float speed_score = 6; + * @return {number} + */ +proto.score.StorageStat.HostStats.prototype.getSpeedScore = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 6, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.HostStats} returns this + */ +proto.score.StorageStat.HostStats.prototype.setSpeedScore = function(value) { + return jspb.Message.setProto3FloatField(this, 6, value); +}; + + +/** + * optional float upload_speed_score = 7; + * @return {number} + */ +proto.score.StorageStat.HostStats.prototype.getUploadSpeedScore = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 7, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.HostStats} returns this + */ +proto.score.StorageStat.HostStats.prototype.setUploadSpeedScore = function(value) { + return jspb.Message.setProto3FloatField(this, 7, value); +}; + + +/** + * optional float download_speed_score = 8; + * @return {number} + */ +proto.score.StorageStat.HostStats.prototype.getDownloadSpeedScore = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 8, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.HostStats} returns this + */ +proto.score.StorageStat.HostStats.prototype.setDownloadSpeedScore = function(value) { + return jspb.Message.setProto3FloatField(this, 8, value); +}; + + +/** + * optional float uptime_weight = 9; + * @return {number} + */ +proto.score.StorageStat.HostStats.prototype.getUptimeWeight = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 9, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.HostStats} returns this + */ +proto.score.StorageStat.HostStats.prototype.setUptimeWeight = function(value) { + return jspb.Message.setProto3FloatField(this, 9, value); +}; + + +/** + * optional float age_weight = 10; + * @return {number} + */ +proto.score.StorageStat.HostStats.prototype.getAgeWeight = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 10, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.HostStats} returns this + */ +proto.score.StorageStat.HostStats.prototype.setAgeWeight = function(value) { + return jspb.Message.setProto3FloatField(this, 10, value); +}; + + +/** + * optional float version_weight = 11; + * @return {number} + */ +proto.score.StorageStat.HostStats.prototype.getVersionWeight = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 11, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.HostStats} returns this + */ +proto.score.StorageStat.HostStats.prototype.setVersionWeight = function(value) { + return jspb.Message.setProto3FloatField(this, 11, value); +}; + + +/** + * optional float speed_weight = 12; + * @return {number} + */ +proto.score.StorageStat.HostStats.prototype.getSpeedWeight = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 12, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.HostStats} returns this + */ +proto.score.StorageStat.HostStats.prototype.setSpeedWeight = function(value) { + return jspb.Message.setProto3FloatField(this, 12, value); +}; + + +/** + * optional float upload_speed_weight = 13; + * @return {number} + */ +proto.score.StorageStat.HostStats.prototype.getUploadSpeedWeight = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 13, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.HostStats} returns this + */ +proto.score.StorageStat.HostStats.prototype.setUploadSpeedWeight = function(value) { + return jspb.Message.setProto3FloatField(this, 13, value); +}; + + +/** + * optional float download_speed_weight = 14; + * @return {number} + */ +proto.score.StorageStat.HostStats.prototype.getDownloadSpeedWeight = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 14, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.HostStats} returns this + */ +proto.score.StorageStat.HostStats.prototype.setDownloadSpeedWeight = function(value) { + return jspb.Message.setProto3FloatField(this, 14, value); +}; + + +/** + * optional google.protobuf.Timestamp last_updated = 15; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.score.StorageStat.HostStats.prototype.getLastUpdated = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 15)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.score.StorageStat.HostStats} returns this +*/ +proto.score.StorageStat.HostStats.prototype.setLastUpdated = function(value) { + return jspb.Message.setWrapperField(this, 15, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.score.StorageStat.HostStats} returns this + */ +proto.score.StorageStat.HostStats.prototype.clearLastUpdated = function() { + return this.setLastUpdated(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.score.StorageStat.HostStats.prototype.hasLastUpdated = function() { + return jspb.Message.getField(this, 15) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.score.StorageStat.Host.prototype.toObject = function(opt_includeInstance) { + return proto.score.StorageStat.Host.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.score.StorageStat.Host} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.StorageStat.Host.toObject = function(includeInstance, msg) { + var f, obj = { + online: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + storageUsed: jspb.Message.getFieldWithDefault(msg, 2, 0), + storageCap: jspb.Message.getFieldWithDefault(msg, 3, 0), + storageDiskTotal: jspb.Message.getFieldWithDefault(msg, 4, 0), + storageDiskAvailable: jspb.Message.getFieldWithDefault(msg, 5, 0), + stats: (f = msg.getStats()) && proto.score.StorageStat.HostStats.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.score.StorageStat.Host} + */ +proto.score.StorageStat.Host.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.score.StorageStat.Host; + return proto.score.StorageStat.Host.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.score.StorageStat.Host} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.score.StorageStat.Host} + */ +proto.score.StorageStat.Host.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.setOnline(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStorageUsed(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStorageCap(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStorageDiskTotal(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStorageDiskAvailable(value); + break; + case 6: + var value = new proto.score.StorageStat.HostStats; + reader.readMessage(value,proto.score.StorageStat.HostStats.deserializeBinaryFromReader); + msg.setStats(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.score.StorageStat.Host.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.score.StorageStat.Host.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.score.StorageStat.Host} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.StorageStat.Host.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOnline(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getStorageUsed(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getStorageCap(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getStorageDiskTotal(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getStorageDiskAvailable(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getStats(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.score.StorageStat.HostStats.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bool online = 1; + * @return {boolean} + */ +proto.score.StorageStat.Host.prototype.getOnline = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.StorageStat.Host} returns this + */ +proto.score.StorageStat.Host.prototype.setOnline = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +/** + * optional int64 storage_used = 2; + * @return {number} + */ +proto.score.StorageStat.Host.prototype.getStorageUsed = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.Host} returns this + */ +proto.score.StorageStat.Host.prototype.setStorageUsed = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int64 storage_cap = 3; + * @return {number} + */ +proto.score.StorageStat.Host.prototype.getStorageCap = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.Host} returns this + */ +proto.score.StorageStat.Host.prototype.setStorageCap = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 storage_disk_total = 4; + * @return {number} + */ +proto.score.StorageStat.Host.prototype.getStorageDiskTotal = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.Host} returns this + */ +proto.score.StorageStat.Host.prototype.setStorageDiskTotal = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int64 storage_disk_available = 5; + * @return {number} + */ +proto.score.StorageStat.Host.prototype.getStorageDiskAvailable = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.StorageStat.Host} returns this + */ +proto.score.StorageStat.Host.prototype.setStorageDiskAvailable = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional HostStats stats = 6; + * @return {?proto.score.StorageStat.HostStats} + */ +proto.score.StorageStat.Host.prototype.getStats = function() { + return /** @type{?proto.score.StorageStat.HostStats} */ ( + jspb.Message.getWrapperField(this, proto.score.StorageStat.HostStats, 6)); +}; + + +/** + * @param {?proto.score.StorageStat.HostStats|undefined} value + * @return {!proto.score.StorageStat.Host} returns this +*/ +proto.score.StorageStat.Host.prototype.setStats = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.score.StorageStat.Host} returns this + */ +proto.score.StorageStat.Host.prototype.clearStats = function() { + return this.setStats(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.score.StorageStat.Host.prototype.hasStats = function() { + return jspb.Message.getField(this, 6) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.score.StorageStat.Renter.prototype.toObject = function(opt_includeInstance) { + return proto.score.StorageStat.Renter.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.score.StorageStat.Renter} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.StorageStat.Renter.toObject = function(includeInstance, msg) { + var f, obj = { + reserved: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.score.StorageStat.Renter} + */ +proto.score.StorageStat.Renter.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.score.StorageStat.Renter; + return proto.score.StorageStat.Renter.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.score.StorageStat.Renter} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.score.StorageStat.Renter} + */ +proto.score.StorageStat.Renter.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.setReserved(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.score.StorageStat.Renter.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.score.StorageStat.Renter.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.score.StorageStat.Renter} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.StorageStat.Renter.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getReserved(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string reserved = 1; + * @return {string} + */ +proto.score.StorageStat.Renter.prototype.getReserved = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.StorageStat.Renter} returns this + */ +proto.score.StorageStat.Renter.prototype.setReserved = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Host host_stats = 1; + * @return {?proto.score.StorageStat.Host} + */ +proto.score.StorageStat.prototype.getHostStats = function() { + return /** @type{?proto.score.StorageStat.Host} */ ( + jspb.Message.getWrapperField(this, proto.score.StorageStat.Host, 1)); +}; + + +/** + * @param {?proto.score.StorageStat.Host|undefined} value + * @return {!proto.score.StorageStat} returns this +*/ +proto.score.StorageStat.prototype.setHostStats = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.score.StorageStat} returns this + */ +proto.score.StorageStat.prototype.clearHostStats = function() { + return this.setHostStats(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.score.StorageStat.prototype.hasHostStats = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Renter renter_stats = 2; + * @return {?proto.score.StorageStat.Renter} + */ +proto.score.StorageStat.prototype.getRenterStats = function() { + return /** @type{?proto.score.StorageStat.Renter} */ ( + jspb.Message.getWrapperField(this, proto.score.StorageStat.Renter, 2)); +}; + + +/** + * @param {?proto.score.StorageStat.Renter|undefined} value + * @return {!proto.score.StorageStat} returns this +*/ +proto.score.StorageStat.prototype.setRenterStats = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.score.StorageStat} returns this + */ +proto.score.StorageStat.prototype.clearRenterStats = function() { + return this.setRenterStats(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.score.StorageStat.prototype.hasRenterStats = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.score.Node.prototype.toObject = function(opt_includeInstance) { + return proto.score.Node.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.score.Node} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.Node.toObject = function(includeInstance, msg) { + var f, obj = { + tableName: jspb.Message.getFieldWithDefault(msg, 1, ""), + nodeId: jspb.Message.getFieldWithDefault(msg, 2, ""), + btfsVersion: jspb.Message.getFieldWithDefault(msg, 3, ""), + upTime: jspb.Message.getFieldWithDefault(msg, 4, 0), + storageUsed: jspb.Message.getFieldWithDefault(msg, 5, 0), + storageVolumeCap: jspb.Message.getFieldWithDefault(msg, 6, 0), + memoryUsed: jspb.Message.getFieldWithDefault(msg, 7, 0), + cpuUsed: jspb.Message.getFloatingPointFieldWithDefault(msg, 8, 0.0), + upload: jspb.Message.getFieldWithDefault(msg, 9, 0), + download: jspb.Message.getFieldWithDefault(msg, 10, 0), + totalUpload: jspb.Message.getFieldWithDefault(msg, 11, 0), + totalDownload: jspb.Message.getFieldWithDefault(msg, 12, 0), + storagePriceDeal: jspb.Message.getFieldWithDefault(msg, 13, 0), + bandwidthPriceDeal: jspb.Message.getFieldWithDefault(msg, 14, 0), + settings: (f = msg.getSettings()) && proto.score.Node.Settings.toObject(includeInstance, f), + reputation: jspb.Message.getFloatingPointFieldWithDefault(msg, 16, 0.0), + blocksUp: jspb.Message.getFieldWithDefault(msg, 17, 0), + blocksDown: jspb.Message.getFieldWithDefault(msg, 18, 0), + osType: jspb.Message.getFieldWithDefault(msg, 19, ""), + archType: jspb.Message.getFieldWithDefault(msg, 20, ""), + cpuInfo: jspb.Message.getFieldWithDefault(msg, 21, ""), + peersConnected: jspb.Message.getFieldWithDefault(msg, 23, 0), + timeCreated: (f = msg.getTimeCreated()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + hVal: jspb.Message.getFieldWithDefault(msg, 25, ""), + geo: (f = msg.getGeo()) && proto.score.Node.Geo.toObject(includeInstance, f), + flg: (f = msg.getFlg()) && proto.score.Node.ExperimentalFlags.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.score.Node} + */ +proto.score.Node.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.score.Node; + return proto.score.Node.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.score.Node} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.score.Node} + */ +proto.score.Node.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.setTableName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setNodeId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setBtfsVersion(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setUpTime(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setStorageUsed(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setStorageVolumeCap(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMemoryUsed(value); + break; + case 8: + var value = /** @type {number} */ (reader.readDouble()); + msg.setCpuUsed(value); + break; + case 9: + var value = /** @type {number} */ (reader.readUint64()); + msg.setUpload(value); + break; + case 10: + var value = /** @type {number} */ (reader.readUint64()); + msg.setDownload(value); + break; + case 11: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTotalUpload(value); + break; + case 12: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTotalDownload(value); + break; + case 13: + var value = /** @type {number} */ (reader.readUint64()); + msg.setStoragePriceDeal(value); + break; + case 14: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBandwidthPriceDeal(value); + break; + case 15: + var value = new proto.score.Node.Settings; + reader.readMessage(value,proto.score.Node.Settings.deserializeBinaryFromReader); + msg.setSettings(value); + break; + case 16: + var value = /** @type {number} */ (reader.readDouble()); + msg.setReputation(value); + break; + case 17: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBlocksUp(value); + break; + case 18: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBlocksDown(value); + break; + case 19: + var value = /** @type {string} */ (reader.readString()); + msg.setOsType(value); + break; + case 20: + var value = /** @type {string} */ (reader.readString()); + msg.setArchType(value); + break; + case 21: + var value = /** @type {string} */ (reader.readString()); + msg.setCpuInfo(value); + break; + case 23: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPeersConnected(value); + break; + case 24: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTimeCreated(value); + break; + case 25: + var value = /** @type {string} */ (reader.readString()); + msg.setHVal(value); + break; + case 26: + var value = new proto.score.Node.Geo; + reader.readMessage(value,proto.score.Node.Geo.deserializeBinaryFromReader); + msg.setGeo(value); + break; + case 27: + var value = new proto.score.Node.ExperimentalFlags; + reader.readMessage(value,proto.score.Node.ExperimentalFlags.deserializeBinaryFromReader); + msg.setFlg(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.score.Node.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.score.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.score.Node} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.Node.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTableName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getNodeId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getBtfsVersion(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getUpTime(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getStorageUsed(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getStorageVolumeCap(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } + f = message.getMemoryUsed(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } + f = message.getCpuUsed(); + if (f !== 0.0) { + writer.writeDouble( + 8, + f + ); + } + f = message.getUpload(); + if (f !== 0) { + writer.writeUint64( + 9, + f + ); + } + f = message.getDownload(); + if (f !== 0) { + writer.writeUint64( + 10, + f + ); + } + f = message.getTotalUpload(); + if (f !== 0) { + writer.writeUint64( + 11, + f + ); + } + f = message.getTotalDownload(); + if (f !== 0) { + writer.writeUint64( + 12, + f + ); + } + f = message.getStoragePriceDeal(); + if (f !== 0) { + writer.writeUint64( + 13, + f + ); + } + f = message.getBandwidthPriceDeal(); + if (f !== 0) { + writer.writeUint64( + 14, + f + ); + } + f = message.getSettings(); + if (f != null) { + writer.writeMessage( + 15, + f, + proto.score.Node.Settings.serializeBinaryToWriter + ); + } + f = message.getReputation(); + if (f !== 0.0) { + writer.writeDouble( + 16, + f + ); + } + f = message.getBlocksUp(); + if (f !== 0) { + writer.writeUint64( + 17, + f + ); + } + f = message.getBlocksDown(); + if (f !== 0) { + writer.writeUint64( + 18, + f + ); + } + f = message.getOsType(); + if (f.length > 0) { + writer.writeString( + 19, + f + ); + } + f = message.getArchType(); + if (f.length > 0) { + writer.writeString( + 20, + f + ); + } + f = message.getCpuInfo(); + if (f.length > 0) { + writer.writeString( + 21, + f + ); + } + f = message.getPeersConnected(); + if (f !== 0) { + writer.writeUint64( + 23, + f + ); + } + f = message.getTimeCreated(); + if (f != null) { + writer.writeMessage( + 24, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getHVal(); + if (f.length > 0) { + writer.writeString( + 25, + f + ); + } + f = message.getGeo(); + if (f != null) { + writer.writeMessage( + 26, + f, + proto.score.Node.Geo.serializeBinaryToWriter + ); + } + f = message.getFlg(); + if (f != null) { + writer.writeMessage( + 27, + f, + proto.score.Node.ExperimentalFlags.serializeBinaryToWriter + ); + } +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.score.Node.Settings.repeatedFields_ = [8]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.score.Node.Settings.prototype.toObject = function(opt_includeInstance) { + return proto.score.Node.Settings.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.score.Node.Settings} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.Node.Settings.toObject = function(includeInstance, msg) { + var f, obj = { + storagePriceAsk: jspb.Message.getFieldWithDefault(msg, 1, 0), + bandwidthPriceAsk: jspb.Message.getFieldWithDefault(msg, 2, 0), + storageTimeMin: jspb.Message.getFieldWithDefault(msg, 3, 0), + bandwidthLimit: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0), + collateralStake: jspb.Message.getFieldWithDefault(msg, 5, 0), + storagePriceDefault: jspb.Message.getFieldWithDefault(msg, 6, 0), + customizedPricing: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), + rolesList: (f = jspb.Message.getRepeatedField(msg, 8)) == null ? undefined : f, + repairPriceDefault: jspb.Message.getFieldWithDefault(msg, 9, 0), + repairPriceCustomized: jspb.Message.getFieldWithDefault(msg, 10, 0), + repairCustomizedPricing: jspb.Message.getBooleanFieldWithDefault(msg, 11, false), + challengePriceDefault: jspb.Message.getFieldWithDefault(msg, 12, 0), + challengePriceCustomized: jspb.Message.getFieldWithDefault(msg, 13, 0), + challengeCustomizedPricing: jspb.Message.getBooleanFieldWithDefault(msg, 14, 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.score.Node.Settings} + */ +proto.score.Node.Settings.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.score.Node.Settings; + return proto.score.Node.Settings.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.score.Node.Settings} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.score.Node.Settings} + */ +proto.score.Node.Settings.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setStoragePriceAsk(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBandwidthPriceAsk(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setStorageTimeMin(value); + break; + case 4: + var value = /** @type {number} */ (reader.readDouble()); + msg.setBandwidthLimit(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCollateralStake(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setStoragePriceDefault(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setCustomizedPricing(value); + break; + case 8: + var value = /** @type {!Array} */ (reader.readPackedEnum()); + msg.setRolesList(value); + break; + case 9: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRepairPriceDefault(value); + break; + case 10: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRepairPriceCustomized(value); + break; + case 11: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRepairCustomizedPricing(value); + break; + case 12: + var value = /** @type {number} */ (reader.readUint64()); + msg.setChallengePriceDefault(value); + break; + case 13: + var value = /** @type {number} */ (reader.readUint64()); + msg.setChallengePriceCustomized(value); + break; + case 14: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setChallengeCustomizedPricing(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.score.Node.Settings.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.score.Node.Settings.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.score.Node.Settings} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.Node.Settings.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStoragePriceAsk(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getBandwidthPriceAsk(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getStorageTimeMin(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getBandwidthLimit(); + if (f !== 0.0) { + writer.writeDouble( + 4, + f + ); + } + f = message.getCollateralStake(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getStoragePriceDefault(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } + f = message.getCustomizedPricing(); + if (f) { + writer.writeBool( + 7, + f + ); + } + f = message.getRolesList(); + if (f.length > 0) { + writer.writePackedEnum( + 8, + f + ); + } + f = message.getRepairPriceDefault(); + if (f !== 0) { + writer.writeUint64( + 9, + f + ); + } + f = message.getRepairPriceCustomized(); + if (f !== 0) { + writer.writeUint64( + 10, + f + ); + } + f = message.getRepairCustomizedPricing(); + if (f) { + writer.writeBool( + 11, + f + ); + } + f = message.getChallengePriceDefault(); + if (f !== 0) { + writer.writeUint64( + 12, + f + ); + } + f = message.getChallengePriceCustomized(); + if (f !== 0) { + writer.writeUint64( + 13, + f + ); + } + f = message.getChallengeCustomizedPricing(); + if (f) { + writer.writeBool( + 14, + f + ); + } +}; + + +/** + * optional uint64 storage_price_ask = 1; + * @return {number} + */ +proto.score.Node.Settings.prototype.getStoragePriceAsk = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node.Settings} returns this + */ +proto.score.Node.Settings.prototype.setStoragePriceAsk = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 bandwidth_price_ask = 2; + * @return {number} + */ +proto.score.Node.Settings.prototype.getBandwidthPriceAsk = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node.Settings} returns this + */ +proto.score.Node.Settings.prototype.setBandwidthPriceAsk = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 storage_time_min = 3; + * @return {number} + */ +proto.score.Node.Settings.prototype.getStorageTimeMin = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node.Settings} returns this + */ +proto.score.Node.Settings.prototype.setStorageTimeMin = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional double bandwidth_limit = 4; + * @return {number} + */ +proto.score.Node.Settings.prototype.getBandwidthLimit = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node.Settings} returns this + */ +proto.score.Node.Settings.prototype.setBandwidthLimit = function(value) { + return jspb.Message.setProto3FloatField(this, 4, value); +}; + + +/** + * optional uint64 collateral_stake = 5; + * @return {number} + */ +proto.score.Node.Settings.prototype.getCollateralStake = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node.Settings} returns this + */ +proto.score.Node.Settings.prototype.setCollateralStake = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional uint64 storage_price_default = 6; + * @return {number} + */ +proto.score.Node.Settings.prototype.getStoragePriceDefault = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node.Settings} returns this + */ +proto.score.Node.Settings.prototype.setStoragePriceDefault = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional bool customized_pricing = 7; + * @return {boolean} + */ +proto.score.Node.Settings.prototype.getCustomizedPricing = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.Settings} returns this + */ +proto.score.Node.Settings.prototype.setCustomizedPricing = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); +}; + + +/** + * repeated NodeRole roles = 8; + * @return {!Array} + */ +proto.score.Node.Settings.prototype.getRolesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 8)); +}; + + +/** + * @param {!Array} value + * @return {!proto.score.Node.Settings} returns this + */ +proto.score.Node.Settings.prototype.setRolesList = function(value) { + return jspb.Message.setField(this, 8, value || []); +}; + + +/** + * @param {!proto.score.NodeRole} value + * @param {number=} opt_index + * @return {!proto.score.Node.Settings} returns this + */ +proto.score.Node.Settings.prototype.addRoles = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 8, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.score.Node.Settings} returns this + */ +proto.score.Node.Settings.prototype.clearRolesList = function() { + return this.setRolesList([]); +}; + + +/** + * optional uint64 repair_price_default = 9; + * @return {number} + */ +proto.score.Node.Settings.prototype.getRepairPriceDefault = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node.Settings} returns this + */ +proto.score.Node.Settings.prototype.setRepairPriceDefault = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); +}; + + +/** + * optional uint64 repair_price_customized = 10; + * @return {number} + */ +proto.score.Node.Settings.prototype.getRepairPriceCustomized = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node.Settings} returns this + */ +proto.score.Node.Settings.prototype.setRepairPriceCustomized = function(value) { + return jspb.Message.setProto3IntField(this, 10, value); +}; + + +/** + * optional bool repair_customized_pricing = 11; + * @return {boolean} + */ +proto.score.Node.Settings.prototype.getRepairCustomizedPricing = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 11, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.Settings} returns this + */ +proto.score.Node.Settings.prototype.setRepairCustomizedPricing = function(value) { + return jspb.Message.setProto3BooleanField(this, 11, value); +}; + + +/** + * optional uint64 challenge_price_default = 12; + * @return {number} + */ +proto.score.Node.Settings.prototype.getChallengePriceDefault = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node.Settings} returns this + */ +proto.score.Node.Settings.prototype.setChallengePriceDefault = function(value) { + return jspb.Message.setProto3IntField(this, 12, value); +}; + + +/** + * optional uint64 challenge_price_customized = 13; + * @return {number} + */ +proto.score.Node.Settings.prototype.getChallengePriceCustomized = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node.Settings} returns this + */ +proto.score.Node.Settings.prototype.setChallengePriceCustomized = function(value) { + return jspb.Message.setProto3IntField(this, 13, value); +}; + + +/** + * optional bool challenge_customized_pricing = 14; + * @return {boolean} + */ +proto.score.Node.Settings.prototype.getChallengeCustomizedPricing = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 14, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.Settings} returns this + */ +proto.score.Node.Settings.prototype.setChallengeCustomizedPricing = function(value) { + return jspb.Message.setProto3BooleanField(this, 14, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.score.Node.Geo.prototype.toObject = function(opt_includeInstance) { + return proto.score.Node.Geo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.score.Node.Geo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.Node.Geo.toObject = function(includeInstance, msg) { + var f, obj = { + countryShort: jspb.Message.getFieldWithDefault(msg, 1, ""), + region: jspb.Message.getFieldWithDefault(msg, 2, ""), + latitude: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0), + longitude: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.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.score.Node.Geo} + */ +proto.score.Node.Geo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.score.Node.Geo; + return proto.score.Node.Geo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.score.Node.Geo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.score.Node.Geo} + */ +proto.score.Node.Geo.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.setCountryShort(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setRegion(value); + break; + case 3: + var value = /** @type {number} */ (reader.readFloat()); + msg.setLatitude(value); + break; + case 4: + var value = /** @type {number} */ (reader.readFloat()); + msg.setLongitude(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.score.Node.Geo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.score.Node.Geo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.score.Node.Geo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.Node.Geo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCountryShort(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRegion(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getLatitude(); + if (f !== 0.0) { + writer.writeFloat( + 3, + f + ); + } + f = message.getLongitude(); + if (f !== 0.0) { + writer.writeFloat( + 4, + f + ); + } +}; + + +/** + * optional string country_short = 1; + * @return {string} + */ +proto.score.Node.Geo.prototype.getCountryShort = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.Node.Geo} returns this + */ +proto.score.Node.Geo.prototype.setCountryShort = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string region = 2; + * @return {string} + */ +proto.score.Node.Geo.prototype.getRegion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.Node.Geo} returns this + */ +proto.score.Node.Geo.prototype.setRegion = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional float latitude = 3; + * @return {number} + */ +proto.score.Node.Geo.prototype.getLatitude = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node.Geo} returns this + */ +proto.score.Node.Geo.prototype.setLatitude = function(value) { + return jspb.Message.setProto3FloatField(this, 3, value); +}; + + +/** + * optional float longitude = 4; + * @return {number} + */ +proto.score.Node.Geo.prototype.getLongitude = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node.Geo} returns this + */ +proto.score.Node.Geo.prototype.setLongitude = function(value) { + return jspb.Message.setProto3FloatField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.score.Node.ExperimentalFlags.prototype.toObject = function(opt_includeInstance) { + return proto.score.Node.ExperimentalFlags.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.score.Node.ExperimentalFlags} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.Node.ExperimentalFlags.toObject = function(includeInstance, msg) { + var f, obj = { + analytics: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + filestoreEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + hostsSyncEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + hostsSyncMode: jspb.Message.getFieldWithDefault(msg, 4, ""), + libp2pStreamMounting: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), + p2pHttpProxy: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + preferTls: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), + quic: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), + removeOnUnpin: jspb.Message.getBooleanFieldWithDefault(msg, 9, false), + shardingEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 10, false), + storageClientEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 11, false), + storageHostEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 12, false), + strategicProviding: jspb.Message.getBooleanFieldWithDefault(msg, 13, false), + urlStoreEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 14, false), + disableAutoUpdate: jspb.Message.getBooleanFieldWithDefault(msg, 15, false), + graphsyncEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 16, false), + repairHostEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 17, false), + challengeHostEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 18, 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.score.Node.ExperimentalFlags} + */ +proto.score.Node.ExperimentalFlags.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.score.Node.ExperimentalFlags; + return proto.score.Node.ExperimentalFlags.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.score.Node.ExperimentalFlags} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.score.Node.ExperimentalFlags} + */ +proto.score.Node.ExperimentalFlags.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.setAnalytics(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setFilestoreEnabled(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setHostsSyncEnabled(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setHostsSyncMode(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setLibp2pStreamMounting(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setP2pHttpProxy(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPreferTls(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setQuic(value); + break; + case 9: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRemoveOnUnpin(value); + break; + case 10: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setShardingEnabled(value); + break; + case 11: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setStorageClientEnabled(value); + break; + case 12: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setStorageHostEnabled(value); + break; + case 13: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setStrategicProviding(value); + break; + case 14: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setUrlStoreEnabled(value); + break; + case 15: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDisableAutoUpdate(value); + break; + case 16: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setGraphsyncEnabled(value); + break; + case 17: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRepairHostEnabled(value); + break; + case 18: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setChallengeHostEnabled(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.score.Node.ExperimentalFlags.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.score.Node.ExperimentalFlags.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.score.Node.ExperimentalFlags} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.score.Node.ExperimentalFlags.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAnalytics(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getFilestoreEnabled(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getHostsSyncEnabled(); + if (f) { + writer.writeBool( + 3, + f + ); + } + f = message.getHostsSyncMode(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getLibp2pStreamMounting(); + if (f) { + writer.writeBool( + 5, + f + ); + } + f = message.getP2pHttpProxy(); + if (f) { + writer.writeBool( + 6, + f + ); + } + f = message.getPreferTls(); + if (f) { + writer.writeBool( + 7, + f + ); + } + f = message.getQuic(); + if (f) { + writer.writeBool( + 8, + f + ); + } + f = message.getRemoveOnUnpin(); + if (f) { + writer.writeBool( + 9, + f + ); + } + f = message.getShardingEnabled(); + if (f) { + writer.writeBool( + 10, + f + ); + } + f = message.getStorageClientEnabled(); + if (f) { + writer.writeBool( + 11, + f + ); + } + f = message.getStorageHostEnabled(); + if (f) { + writer.writeBool( + 12, + f + ); + } + f = message.getStrategicProviding(); + if (f) { + writer.writeBool( + 13, + f + ); + } + f = message.getUrlStoreEnabled(); + if (f) { + writer.writeBool( + 14, + f + ); + } + f = message.getDisableAutoUpdate(); + if (f) { + writer.writeBool( + 15, + f + ); + } + f = message.getGraphsyncEnabled(); + if (f) { + writer.writeBool( + 16, + f + ); + } + f = message.getRepairHostEnabled(); + if (f) { + writer.writeBool( + 17, + f + ); + } + f = message.getChallengeHostEnabled(); + if (f) { + writer.writeBool( + 18, + f + ); + } +}; + + +/** + * optional bool analytics = 1; + * @return {boolean} + */ +proto.score.Node.ExperimentalFlags.prototype.getAnalytics = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setAnalytics = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +/** + * optional bool filestore_enabled = 2; + * @return {boolean} + */ +proto.score.Node.ExperimentalFlags.prototype.getFilestoreEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setFilestoreEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional bool hosts_sync_enabled = 3; + * @return {boolean} + */ +proto.score.Node.ExperimentalFlags.prototype.getHostsSyncEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setHostsSyncEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +/** + * optional string hosts_sync_mode = 4; + * @return {string} + */ +proto.score.Node.ExperimentalFlags.prototype.getHostsSyncMode = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setHostsSyncMode = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional bool libp2p_stream_mounting = 5; + * @return {boolean} + */ +proto.score.Node.ExperimentalFlags.prototype.getLibp2pStreamMounting = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setLibp2pStreamMounting = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + +/** + * optional bool p2p_http_proxy = 6; + * @return {boolean} + */ +proto.score.Node.ExperimentalFlags.prototype.getP2pHttpProxy = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setP2pHttpProxy = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); +}; + + +/** + * optional bool prefer_tls = 7; + * @return {boolean} + */ +proto.score.Node.ExperimentalFlags.prototype.getPreferTls = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setPreferTls = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); +}; + + +/** + * optional bool quic = 8; + * @return {boolean} + */ +proto.score.Node.ExperimentalFlags.prototype.getQuic = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setQuic = function(value) { + return jspb.Message.setProto3BooleanField(this, 8, value); +}; + + +/** + * optional bool remove_on_unpin = 9; + * @return {boolean} + */ +proto.score.Node.ExperimentalFlags.prototype.getRemoveOnUnpin = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setRemoveOnUnpin = function(value) { + return jspb.Message.setProto3BooleanField(this, 9, value); +}; + + +/** + * optional bool sharding_enabled = 10; + * @return {boolean} + */ +proto.score.Node.ExperimentalFlags.prototype.getShardingEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setShardingEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 10, value); +}; + + +/** + * optional bool storage_client_enabled = 11; + * @return {boolean} + */ +proto.score.Node.ExperimentalFlags.prototype.getStorageClientEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 11, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setStorageClientEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 11, value); +}; + + +/** + * optional bool storage_host_enabled = 12; + * @return {boolean} + */ +proto.score.Node.ExperimentalFlags.prototype.getStorageHostEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 12, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setStorageHostEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 12, value); +}; + + +/** + * optional bool strategic_providing = 13; + * @return {boolean} + */ +proto.score.Node.ExperimentalFlags.prototype.getStrategicProviding = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 13, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setStrategicProviding = function(value) { + return jspb.Message.setProto3BooleanField(this, 13, value); +}; + + +/** + * optional bool url_store_enabled = 14; + * @return {boolean} + */ +proto.score.Node.ExperimentalFlags.prototype.getUrlStoreEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 14, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setUrlStoreEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 14, value); +}; + + +/** + * optional bool disable_auto_update = 15; + * @return {boolean} + */ +proto.score.Node.ExperimentalFlags.prototype.getDisableAutoUpdate = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 15, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setDisableAutoUpdate = function(value) { + return jspb.Message.setProto3BooleanField(this, 15, value); +}; + + +/** + * optional bool graphsync_enabled = 16; + * @return {boolean} + */ +proto.score.Node.ExperimentalFlags.prototype.getGraphsyncEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 16, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setGraphsyncEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 16, value); +}; + + +/** + * optional bool repair_host_enabled = 17; + * @return {boolean} + */ +proto.score.Node.ExperimentalFlags.prototype.getRepairHostEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 17, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setRepairHostEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 17, value); +}; + + +/** + * optional bool challenge_host_enabled = 18; + * @return {boolean} + */ +proto.score.Node.ExperimentalFlags.prototype.getChallengeHostEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 18, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.score.Node.ExperimentalFlags} returns this + */ +proto.score.Node.ExperimentalFlags.prototype.setChallengeHostEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 18, value); +}; + + +/** + * optional string table_name = 1; + * @return {string} + */ +proto.score.Node.prototype.getTableName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setTableName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string node_id = 2; + * @return {string} + */ +proto.score.Node.prototype.getNodeId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setNodeId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string btfs_version = 3; + * @return {string} + */ +proto.score.Node.prototype.getBtfsVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setBtfsVersion = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional uint64 up_time = 4; + * @return {number} + */ +proto.score.Node.prototype.getUpTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setUpTime = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint64 storage_used = 5; + * @return {number} + */ +proto.score.Node.prototype.getStorageUsed = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setStorageUsed = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional uint64 storage_volume_cap = 6; + * @return {number} + */ +proto.score.Node.prototype.getStorageVolumeCap = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setStorageVolumeCap = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional uint64 memory_used = 7; + * @return {number} + */ +proto.score.Node.prototype.getMemoryUsed = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setMemoryUsed = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional double cpu_used = 8; + * @return {number} + */ +proto.score.Node.prototype.getCpuUsed = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 8, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setCpuUsed = function(value) { + return jspb.Message.setProto3FloatField(this, 8, value); +}; + + +/** + * optional uint64 upload = 9; + * @return {number} + */ +proto.score.Node.prototype.getUpload = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setUpload = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); +}; + + +/** + * optional uint64 download = 10; + * @return {number} + */ +proto.score.Node.prototype.getDownload = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setDownload = function(value) { + return jspb.Message.setProto3IntField(this, 10, value); +}; + + +/** + * optional uint64 total_upload = 11; + * @return {number} + */ +proto.score.Node.prototype.getTotalUpload = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setTotalUpload = function(value) { + return jspb.Message.setProto3IntField(this, 11, value); +}; + + +/** + * optional uint64 total_download = 12; + * @return {number} + */ +proto.score.Node.prototype.getTotalDownload = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setTotalDownload = function(value) { + return jspb.Message.setProto3IntField(this, 12, value); +}; + + +/** + * optional uint64 storage_price_deal = 13; + * @return {number} + */ +proto.score.Node.prototype.getStoragePriceDeal = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setStoragePriceDeal = function(value) { + return jspb.Message.setProto3IntField(this, 13, value); +}; + + +/** + * optional uint64 bandwidth_price_deal = 14; + * @return {number} + */ +proto.score.Node.prototype.getBandwidthPriceDeal = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setBandwidthPriceDeal = function(value) { + return jspb.Message.setProto3IntField(this, 14, value); +}; + + +/** + * optional Settings settings = 15; + * @return {?proto.score.Node.Settings} + */ +proto.score.Node.prototype.getSettings = function() { + return /** @type{?proto.score.Node.Settings} */ ( + jspb.Message.getWrapperField(this, proto.score.Node.Settings, 15)); +}; + + +/** + * @param {?proto.score.Node.Settings|undefined} value + * @return {!proto.score.Node} returns this +*/ +proto.score.Node.prototype.setSettings = function(value) { + return jspb.Message.setWrapperField(this, 15, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.clearSettings = function() { + return this.setSettings(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.score.Node.prototype.hasSettings = function() { + return jspb.Message.getField(this, 15) != null; +}; + + +/** + * optional double reputation = 16; + * @return {number} + */ +proto.score.Node.prototype.getReputation = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 16, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setReputation = function(value) { + return jspb.Message.setProto3FloatField(this, 16, value); +}; + + +/** + * optional uint64 blocks_up = 17; + * @return {number} + */ +proto.score.Node.prototype.getBlocksUp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 17, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setBlocksUp = function(value) { + return jspb.Message.setProto3IntField(this, 17, value); +}; + + +/** + * optional uint64 blocks_down = 18; + * @return {number} + */ +proto.score.Node.prototype.getBlocksDown = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 18, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setBlocksDown = function(value) { + return jspb.Message.setProto3IntField(this, 18, value); +}; + + +/** + * optional string os_type = 19; + * @return {string} + */ +proto.score.Node.prototype.getOsType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 19, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setOsType = function(value) { + return jspb.Message.setProto3StringField(this, 19, value); +}; + + +/** + * optional string arch_type = 20; + * @return {string} + */ +proto.score.Node.prototype.getArchType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 20, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setArchType = function(value) { + return jspb.Message.setProto3StringField(this, 20, value); +}; + + +/** + * optional string cpu_info = 21; + * @return {string} + */ +proto.score.Node.prototype.getCpuInfo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 21, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setCpuInfo = function(value) { + return jspb.Message.setProto3StringField(this, 21, value); +}; + + +/** + * optional uint64 peers_connected = 23; + * @return {number} + */ +proto.score.Node.prototype.getPeersConnected = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 23, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setPeersConnected = function(value) { + return jspb.Message.setProto3IntField(this, 23, value); +}; + + +/** + * optional google.protobuf.Timestamp time_created = 24; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.score.Node.prototype.getTimeCreated = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 24)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.score.Node} returns this +*/ +proto.score.Node.prototype.setTimeCreated = function(value) { + return jspb.Message.setWrapperField(this, 24, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.clearTimeCreated = function() { + return this.setTimeCreated(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.score.Node.prototype.hasTimeCreated = function() { + return jspb.Message.getField(this, 24) != null; +}; + + +/** + * optional string h_val = 25; + * @return {string} + */ +proto.score.Node.prototype.getHVal = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 25, "")); +}; + + +/** + * @param {string} value + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.setHVal = function(value) { + return jspb.Message.setProto3StringField(this, 25, value); +}; + + +/** + * optional Geo geo = 26; + * @return {?proto.score.Node.Geo} + */ +proto.score.Node.prototype.getGeo = function() { + return /** @type{?proto.score.Node.Geo} */ ( + jspb.Message.getWrapperField(this, proto.score.Node.Geo, 26)); +}; + + +/** + * @param {?proto.score.Node.Geo|undefined} value + * @return {!proto.score.Node} returns this +*/ +proto.score.Node.prototype.setGeo = function(value) { + return jspb.Message.setWrapperField(this, 26, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.clearGeo = function() { + return this.setGeo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.score.Node.prototype.hasGeo = function() { + return jspb.Message.getField(this, 26) != null; +}; + + +/** + * optional ExperimentalFlags flg = 27; + * @return {?proto.score.Node.ExperimentalFlags} + */ +proto.score.Node.prototype.getFlg = function() { + return /** @type{?proto.score.Node.ExperimentalFlags} */ ( + jspb.Message.getWrapperField(this, proto.score.Node.ExperimentalFlags, 27)); +}; + + +/** + * @param {?proto.score.Node.ExperimentalFlags|undefined} value + * @return {!proto.score.Node} returns this +*/ +proto.score.Node.prototype.setFlg = function(value) { + return jspb.Message.setWrapperField(this, 27, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.score.Node} returns this + */ +proto.score.Node.prototype.clearFlg = function() { + return this.setFlg(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.score.Node.prototype.hasFlg = function() { + return jspb.Message.getField(this, 27) != null; +}; + + +/** + * @enum {number} + */ +proto.score.ResponseCode = { + SUCCESS: 0, + SIGNATURE_FORMAT_ERROR: 1, + COMPUTE_ADDRESS_ERROR: 2, + TIMEOUT_ERROR: 3, + OTHER_ERROR: 20 +}; + +/** + * @enum {number} + */ +proto.score.NodeRole = { + RENTER: 0, + HOST: 1, + REPAIRER: 2, + CHALLENGER: 3, + NETWORK_CHECKER: 4, + REPUTATION_CHECKER: 5, + CDN_PROVIDER: 6, + OTHER: 20 }; goog.object.extend(exports, proto.score); diff --git a/js/protos/status/status_pb.js b/js/protos/status/status_pb.js deleted file mode 100644 index 6e221b5..0000000 --- a/js/protos/status/status_pb.js +++ /dev/null @@ -1,2789 +0,0 @@ -// source: protos/status/status.proto -/** - * @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 github_com_bittorrent_go$btfs$common_protos_node_node_pb = require('../../github.com/bittorrent/go-btfs-common/protos/node/node_pb.js'); -goog.object.extend(proto, github_com_bittorrent_go$btfs$common_protos_node_node_pb); -var github_com_tron$us_protobuf_gogoproto_gogo_pb = require('../../github.com/tron-us/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_tron$us_protobuf_gogoproto_gogo_pb); -var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js'); -goog.object.extend(proto, google_protobuf_empty_pb); -var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); -goog.object.extend(proto, google_protobuf_timestamp_pb); -goog.exportSymbol('proto.status.AirdropRewardHistoryReq', null, global); -goog.exportSymbol('proto.status.BtfsScanAggrReq', null, global); -goog.exportSymbol('proto.status.Candidate', null, global); -goog.exportSymbol('proto.status.NodeContractStatReq', null, global); -goog.exportSymbol('proto.status.NodeDiscoveryAggrReq', null, global); -goog.exportSymbol('proto.status.NodeMetricsAggrReq', null, global); -goog.exportSymbol('proto.status.RewardInfo', null, global); -goog.exportSymbol('proto.status.RewardType', null, global); -goog.exportSymbol('proto.status.ScoreHistoryReq', null, global); -goog.exportSymbol('proto.status.SignedMetrics', 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.status.SignedMetrics = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.status.SignedMetrics, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.status.SignedMetrics.displayName = 'proto.status.SignedMetrics'; -} -/** - * 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.status.NodeMetricsAggrReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.status.NodeMetricsAggrReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.status.NodeMetricsAggrReq.displayName = 'proto.status.NodeMetricsAggrReq'; -} -/** - * 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.status.NodeDiscoveryAggrReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.status.NodeDiscoveryAggrReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.status.NodeDiscoveryAggrReq.displayName = 'proto.status.NodeDiscoveryAggrReq'; -} -/** - * 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.status.BtfsScanAggrReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.status.BtfsScanAggrReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.status.BtfsScanAggrReq.displayName = 'proto.status.BtfsScanAggrReq'; -} -/** - * 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.status.ScoreHistoryReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.status.ScoreHistoryReq.repeatedFields_, null); -}; -goog.inherits(proto.status.ScoreHistoryReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.status.ScoreHistoryReq.displayName = 'proto.status.ScoreHistoryReq'; -} -/** - * 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.status.RewardInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.status.RewardInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.status.RewardInfo.displayName = 'proto.status.RewardInfo'; -} -/** - * 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.status.AirdropRewardHistoryReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.status.AirdropRewardHistoryReq.repeatedFields_, null); -}; -goog.inherits(proto.status.AirdropRewardHistoryReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.status.AirdropRewardHistoryReq.displayName = 'proto.status.AirdropRewardHistoryReq'; -} -/** - * 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.status.Candidate = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.status.Candidate, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.status.Candidate.displayName = 'proto.status.Candidate'; -} -/** - * 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.status.NodeContractStatReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.status.NodeContractStatReq.repeatedFields_, null); -}; -goog.inherits(proto.status.NodeContractStatReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.status.NodeContractStatReq.displayName = 'proto.status.NodeContractStatReq'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.status.SignedMetrics.prototype.toObject = function(opt_includeInstance) { - return proto.status.SignedMetrics.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.status.SignedMetrics} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.status.SignedMetrics.toObject = function(includeInstance, msg) { - var f, obj = { - publicKey: msg.getPublicKey_asB64(), - signature: msg.getSignature_asB64(), - payload: msg.getPayload_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.status.SignedMetrics} - */ -proto.status.SignedMetrics.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.status.SignedMetrics; - return proto.status.SignedMetrics.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.status.SignedMetrics} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.status.SignedMetrics} - */ -proto.status.SignedMetrics.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.setPublicKey(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSignature(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPayload(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.status.SignedMetrics.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.status.SignedMetrics.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.status.SignedMetrics} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.status.SignedMetrics.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPublicKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getPayload_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } -}; - - -/** - * optional bytes public_key = 1; - * @return {!(string|Uint8Array)} - */ -proto.status.SignedMetrics.prototype.getPublicKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes public_key = 1; - * This is a type-conversion wrapper around `getPublicKey()` - * @return {string} - */ -proto.status.SignedMetrics.prototype.getPublicKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPublicKey())); -}; - - -/** - * optional bytes public_key = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPublicKey()` - * @return {!Uint8Array} - */ -proto.status.SignedMetrics.prototype.getPublicKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPublicKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.status.SignedMetrics} returns this - */ -proto.status.SignedMetrics.prototype.setPublicKey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes signature = 2; - * @return {!(string|Uint8Array)} - */ -proto.status.SignedMetrics.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes signature = 2; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.status.SignedMetrics.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 2; - * 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.status.SignedMetrics.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.status.SignedMetrics} returns this - */ -proto.status.SignedMetrics.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional bytes payload = 3; - * @return {!(string|Uint8Array)} - */ -proto.status.SignedMetrics.prototype.getPayload = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes payload = 3; - * This is a type-conversion wrapper around `getPayload()` - * @return {string} - */ -proto.status.SignedMetrics.prototype.getPayload_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPayload())); -}; - - -/** - * optional bytes payload = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPayload()` - * @return {!Uint8Array} - */ -proto.status.SignedMetrics.prototype.getPayload_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPayload())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.status.SignedMetrics} returns this - */ -proto.status.SignedMetrics.prototype.setPayload = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.status.NodeMetricsAggrReq.prototype.toObject = function(opt_includeInstance) { - return proto.status.NodeMetricsAggrReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.status.NodeMetricsAggrReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.status.NodeMetricsAggrReq.toObject = function(includeInstance, msg) { - var f, obj = { - source: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.status.NodeMetricsAggrReq} - */ -proto.status.NodeMetricsAggrReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.status.NodeMetricsAggrReq; - return proto.status.NodeMetricsAggrReq.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.status.NodeMetricsAggrReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.status.NodeMetricsAggrReq} - */ -proto.status.NodeMetricsAggrReq.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.setSource(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.status.NodeMetricsAggrReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.status.NodeMetricsAggrReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.status.NodeMetricsAggrReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.status.NodeMetricsAggrReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSource(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string source = 1; - * @return {string} - */ -proto.status.NodeMetricsAggrReq.prototype.getSource = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.status.NodeMetricsAggrReq} returns this - */ -proto.status.NodeMetricsAggrReq.prototype.setSource = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.status.NodeDiscoveryAggrReq.prototype.toObject = function(opt_includeInstance) { - return proto.status.NodeDiscoveryAggrReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.status.NodeDiscoveryAggrReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.status.NodeDiscoveryAggrReq.toObject = function(includeInstance, msg) { - var f, obj = { - source: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.status.NodeDiscoveryAggrReq} - */ -proto.status.NodeDiscoveryAggrReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.status.NodeDiscoveryAggrReq; - return proto.status.NodeDiscoveryAggrReq.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.status.NodeDiscoveryAggrReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.status.NodeDiscoveryAggrReq} - */ -proto.status.NodeDiscoveryAggrReq.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.setSource(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.status.NodeDiscoveryAggrReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.status.NodeDiscoveryAggrReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.status.NodeDiscoveryAggrReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.status.NodeDiscoveryAggrReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSource(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string source = 1; - * @return {string} - */ -proto.status.NodeDiscoveryAggrReq.prototype.getSource = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.status.NodeDiscoveryAggrReq} returns this - */ -proto.status.NodeDiscoveryAggrReq.prototype.setSource = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.status.BtfsScanAggrReq.prototype.toObject = function(opt_includeInstance) { - return proto.status.BtfsScanAggrReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.status.BtfsScanAggrReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.status.BtfsScanAggrReq.toObject = function(includeInstance, msg) { - var f, obj = { - tableName: jspb.Message.getFieldWithDefault(msg, 1, ""), - storageVolumeLeft: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), - onlineMinersNumber: jspb.Message.getFieldWithDefault(msg, 3, 0), - countryDistributeMap: (f = msg.getCountryDistributeMap()) ? f.toObject(includeInstance, undefined) : [], - scoreDistributeMap: (f = msg.getScoreDistributeMap()) ? f.toObject(includeInstance, undefined) : [], - timeCreated: (f = msg.getTimeCreated()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - storageAlreadyUsed: jspb.Message.getFloatingPointFieldWithDefault(msg, 7, 0.0), - price: jspb.Message.getFloatingPointFieldWithDefault(msg, 8, 0.0), - dateCreated: (f = msg.getDateCreated()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - newRank: jspb.Message.getFieldWithDefault(msg, 10, ""), - totalRank: jspb.Message.getFieldWithDefault(msg, 11, ""), - contractAllCount: jspb.Message.getFieldWithDefault(msg, 12, 0), - contractFailCount: jspb.Message.getFieldWithDefault(msg, 13, 0), - contractAllStorage: jspb.Message.getFloatingPointFieldWithDefault(msg, 14, 0.0), - contractFailStorage: jspb.Message.getFloatingPointFieldWithDefault(msg, 15, 0.0), - storageLeftWhenContract: jspb.Message.getFloatingPointFieldWithDefault(msg, 16, 0.0), - superOnlineMinersCount: jspb.Message.getFieldWithDefault(msg, 17, 0), - newOnlineMinersCount: jspb.Message.getFieldWithDefault(msg, 18, 0), - minersAllAmount: jspb.Message.getFieldWithDefault(msg, 19, 0), - totalMiners: jspb.Message.getFieldWithDefault(msg, 20, 0), - bigMiners: jspb.Message.getFieldWithDefault(msg, 21, 0), - versionDistributeMap: (f = msg.getVersionDistributeMap()) ? 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.status.BtfsScanAggrReq} - */ -proto.status.BtfsScanAggrReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.status.BtfsScanAggrReq; - return proto.status.BtfsScanAggrReq.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.status.BtfsScanAggrReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.status.BtfsScanAggrReq} - */ -proto.status.BtfsScanAggrReq.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.setTableName(value); - break; - case 2: - var value = /** @type {number} */ (reader.readDouble()); - msg.setStorageVolumeLeft(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setOnlineMinersNumber(value); - break; - case 4: - var value = msg.getCountryDistributeMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt32, null, "", 0); - }); - break; - case 5: - var value = msg.getScoreDistributeMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt32, null, "", 0); - }); - break; - case 6: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setTimeCreated(value); - break; - case 7: - var value = /** @type {number} */ (reader.readDouble()); - msg.setStorageAlreadyUsed(value); - break; - case 8: - var value = /** @type {number} */ (reader.readDouble()); - msg.setPrice(value); - break; - case 9: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setDateCreated(value); - break; - case 10: - var value = /** @type {string} */ (reader.readString()); - msg.setNewRank(value); - break; - case 11: - var value = /** @type {string} */ (reader.readString()); - msg.setTotalRank(value); - break; - case 12: - var value = /** @type {number} */ (reader.readUint32()); - msg.setContractAllCount(value); - break; - case 13: - var value = /** @type {number} */ (reader.readUint32()); - msg.setContractFailCount(value); - break; - case 14: - var value = /** @type {number} */ (reader.readDouble()); - msg.setContractAllStorage(value); - break; - case 15: - var value = /** @type {number} */ (reader.readDouble()); - msg.setContractFailStorage(value); - break; - case 16: - var value = /** @type {number} */ (reader.readDouble()); - msg.setStorageLeftWhenContract(value); - break; - case 17: - var value = /** @type {number} */ (reader.readUint32()); - msg.setSuperOnlineMinersCount(value); - break; - case 18: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNewOnlineMinersCount(value); - break; - case 19: - var value = /** @type {number} */ (reader.readInt64()); - msg.setMinersAllAmount(value); - break; - case 20: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalMiners(value); - break; - case 21: - var value = /** @type {number} */ (reader.readInt64()); - msg.setBigMiners(value); - break; - case 22: - var value = msg.getVersionDistributeMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt32, null, "", 0); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.status.BtfsScanAggrReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.status.BtfsScanAggrReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.status.BtfsScanAggrReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.status.BtfsScanAggrReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTableName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getStorageVolumeLeft(); - if (f !== 0.0) { - writer.writeDouble( - 2, - f - ); - } - f = message.getOnlineMinersNumber(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } - f = message.getCountryDistributeMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt32); - } - f = message.getScoreDistributeMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt32); - } - f = message.getTimeCreated(); - if (f != null) { - writer.writeMessage( - 6, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getStorageAlreadyUsed(); - if (f !== 0.0) { - writer.writeDouble( - 7, - f - ); - } - f = message.getPrice(); - if (f !== 0.0) { - writer.writeDouble( - 8, - f - ); - } - f = message.getDateCreated(); - if (f != null) { - writer.writeMessage( - 9, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getNewRank(); - if (f.length > 0) { - writer.writeString( - 10, - f - ); - } - f = message.getTotalRank(); - if (f.length > 0) { - writer.writeString( - 11, - f - ); - } - f = message.getContractAllCount(); - if (f !== 0) { - writer.writeUint32( - 12, - f - ); - } - f = message.getContractFailCount(); - if (f !== 0) { - writer.writeUint32( - 13, - f - ); - } - f = message.getContractAllStorage(); - if (f !== 0.0) { - writer.writeDouble( - 14, - f - ); - } - f = message.getContractFailStorage(); - if (f !== 0.0) { - writer.writeDouble( - 15, - f - ); - } - f = message.getStorageLeftWhenContract(); - if (f !== 0.0) { - writer.writeDouble( - 16, - f - ); - } - f = message.getSuperOnlineMinersCount(); - if (f !== 0) { - writer.writeUint32( - 17, - f - ); - } - f = message.getNewOnlineMinersCount(); - if (f !== 0) { - writer.writeUint32( - 18, - f - ); - } - f = message.getMinersAllAmount(); - if (f !== 0) { - writer.writeInt64( - 19, - f - ); - } - f = message.getTotalMiners(); - if (f !== 0) { - writer.writeInt64( - 20, - f - ); - } - f = message.getBigMiners(); - if (f !== 0) { - writer.writeInt64( - 21, - f - ); - } - f = message.getVersionDistributeMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(22, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt32); - } -}; - - -/** - * optional string table_name = 1; - * @return {string} - */ -proto.status.BtfsScanAggrReq.prototype.getTableName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.status.BtfsScanAggrReq} returns this - */ -proto.status.BtfsScanAggrReq.prototype.setTableName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional double storage_volume_left = 2; - * @return {number} - */ -proto.status.BtfsScanAggrReq.prototype.getStorageVolumeLeft = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.status.BtfsScanAggrReq} returns this - */ -proto.status.BtfsScanAggrReq.prototype.setStorageVolumeLeft = function(value) { - return jspb.Message.setProto3FloatField(this, 2, value); -}; - - -/** - * optional uint32 online_miners_number = 3; - * @return {number} - */ -proto.status.BtfsScanAggrReq.prototype.getOnlineMinersNumber = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.status.BtfsScanAggrReq} returns this - */ -proto.status.BtfsScanAggrReq.prototype.setOnlineMinersNumber = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * map country_distribute = 4; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.status.BtfsScanAggrReq.prototype.getCountryDistributeMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 4, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.status.BtfsScanAggrReq} returns this - */ -proto.status.BtfsScanAggrReq.prototype.clearCountryDistributeMap = function() { - this.getCountryDistributeMap().clear(); - return this;}; - - -/** - * map score_distribute = 5; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.status.BtfsScanAggrReq.prototype.getScoreDistributeMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 5, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.status.BtfsScanAggrReq} returns this - */ -proto.status.BtfsScanAggrReq.prototype.clearScoreDistributeMap = function() { - this.getScoreDistributeMap().clear(); - return this;}; - - -/** - * optional google.protobuf.Timestamp time_created = 6; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.status.BtfsScanAggrReq.prototype.getTimeCreated = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.status.BtfsScanAggrReq} returns this -*/ -proto.status.BtfsScanAggrReq.prototype.setTimeCreated = function(value) { - return jspb.Message.setWrapperField(this, 6, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.status.BtfsScanAggrReq} returns this - */ -proto.status.BtfsScanAggrReq.prototype.clearTimeCreated = function() { - return this.setTimeCreated(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.status.BtfsScanAggrReq.prototype.hasTimeCreated = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * optional double storage_already_used = 7; - * @return {number} - */ -proto.status.BtfsScanAggrReq.prototype.getStorageAlreadyUsed = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 7, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.status.BtfsScanAggrReq} returns this - */ -proto.status.BtfsScanAggrReq.prototype.setStorageAlreadyUsed = function(value) { - return jspb.Message.setProto3FloatField(this, 7, value); -}; - - -/** - * optional double price = 8; - * @return {number} - */ -proto.status.BtfsScanAggrReq.prototype.getPrice = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 8, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.status.BtfsScanAggrReq} returns this - */ -proto.status.BtfsScanAggrReq.prototype.setPrice = function(value) { - return jspb.Message.setProto3FloatField(this, 8, value); -}; - - -/** - * optional google.protobuf.Timestamp date_created = 9; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.status.BtfsScanAggrReq.prototype.getDateCreated = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 9)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.status.BtfsScanAggrReq} returns this -*/ -proto.status.BtfsScanAggrReq.prototype.setDateCreated = function(value) { - return jspb.Message.setWrapperField(this, 9, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.status.BtfsScanAggrReq} returns this - */ -proto.status.BtfsScanAggrReq.prototype.clearDateCreated = function() { - return this.setDateCreated(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.status.BtfsScanAggrReq.prototype.hasDateCreated = function() { - return jspb.Message.getField(this, 9) != null; -}; - - -/** - * optional string new_rank = 10; - * @return {string} - */ -proto.status.BtfsScanAggrReq.prototype.getNewRank = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); -}; - - -/** - * @param {string} value - * @return {!proto.status.BtfsScanAggrReq} returns this - */ -proto.status.BtfsScanAggrReq.prototype.setNewRank = function(value) { - return jspb.Message.setProto3StringField(this, 10, value); -}; - - -/** - * optional string total_rank = 11; - * @return {string} - */ -proto.status.BtfsScanAggrReq.prototype.getTotalRank = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); -}; - - -/** - * @param {string} value - * @return {!proto.status.BtfsScanAggrReq} returns this - */ -proto.status.BtfsScanAggrReq.prototype.setTotalRank = function(value) { - return jspb.Message.setProto3StringField(this, 11, value); -}; - - -/** - * optional uint32 contract_all_count = 12; - * @return {number} - */ -proto.status.BtfsScanAggrReq.prototype.getContractAllCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.status.BtfsScanAggrReq} returns this - */ -proto.status.BtfsScanAggrReq.prototype.setContractAllCount = function(value) { - return jspb.Message.setProto3IntField(this, 12, value); -}; - - -/** - * optional uint32 contract_fail_count = 13; - * @return {number} - */ -proto.status.BtfsScanAggrReq.prototype.getContractFailCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.status.BtfsScanAggrReq} returns this - */ -proto.status.BtfsScanAggrReq.prototype.setContractFailCount = function(value) { - return jspb.Message.setProto3IntField(this, 13, value); -}; - - -/** - * optional double contract_all_storage = 14; - * @return {number} - */ -proto.status.BtfsScanAggrReq.prototype.getContractAllStorage = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 14, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.status.BtfsScanAggrReq} returns this - */ -proto.status.BtfsScanAggrReq.prototype.setContractAllStorage = function(value) { - return jspb.Message.setProto3FloatField(this, 14, value); -}; - - -/** - * optional double contract_fail_storage = 15; - * @return {number} - */ -proto.status.BtfsScanAggrReq.prototype.getContractFailStorage = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 15, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.status.BtfsScanAggrReq} returns this - */ -proto.status.BtfsScanAggrReq.prototype.setContractFailStorage = function(value) { - return jspb.Message.setProto3FloatField(this, 15, value); -}; - - -/** - * optional double storage_left_when_contract = 16; - * @return {number} - */ -proto.status.BtfsScanAggrReq.prototype.getStorageLeftWhenContract = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 16, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.status.BtfsScanAggrReq} returns this - */ -proto.status.BtfsScanAggrReq.prototype.setStorageLeftWhenContract = function(value) { - return jspb.Message.setProto3FloatField(this, 16, value); -}; - - -/** - * optional uint32 super_online_miners_count = 17; - * @return {number} - */ -proto.status.BtfsScanAggrReq.prototype.getSuperOnlineMinersCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 17, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.status.BtfsScanAggrReq} returns this - */ -proto.status.BtfsScanAggrReq.prototype.setSuperOnlineMinersCount = function(value) { - return jspb.Message.setProto3IntField(this, 17, value); -}; - - -/** - * optional uint32 new_online_miners_count = 18; - * @return {number} - */ -proto.status.BtfsScanAggrReq.prototype.getNewOnlineMinersCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 18, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.status.BtfsScanAggrReq} returns this - */ -proto.status.BtfsScanAggrReq.prototype.setNewOnlineMinersCount = function(value) { - return jspb.Message.setProto3IntField(this, 18, value); -}; - - -/** - * optional int64 miners_all_amount = 19; - * @return {number} - */ -proto.status.BtfsScanAggrReq.prototype.getMinersAllAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.status.BtfsScanAggrReq} returns this - */ -proto.status.BtfsScanAggrReq.prototype.setMinersAllAmount = function(value) { - return jspb.Message.setProto3IntField(this, 19, value); -}; - - -/** - * optional int64 total_miners = 20; - * @return {number} - */ -proto.status.BtfsScanAggrReq.prototype.getTotalMiners = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.status.BtfsScanAggrReq} returns this - */ -proto.status.BtfsScanAggrReq.prototype.setTotalMiners = function(value) { - return jspb.Message.setProto3IntField(this, 20, value); -}; - - -/** - * optional int64 big_miners = 21; - * @return {number} - */ -proto.status.BtfsScanAggrReq.prototype.getBigMiners = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.status.BtfsScanAggrReq} returns this - */ -proto.status.BtfsScanAggrReq.prototype.setBigMiners = function(value) { - return jspb.Message.setProto3IntField(this, 21, value); -}; - - -/** - * map version_distribute = 22; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.status.BtfsScanAggrReq.prototype.getVersionDistributeMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 22, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.status.BtfsScanAggrReq} returns this - */ -proto.status.BtfsScanAggrReq.prototype.clearVersionDistributeMap = function() { - this.getVersionDistributeMap().clear(); - return this;}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.status.ScoreHistoryReq.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.status.ScoreHistoryReq.prototype.toObject = function(opt_includeInstance) { - return proto.status.ScoreHistoryReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.status.ScoreHistoryReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.status.ScoreHistoryReq.toObject = function(includeInstance, msg) { - var f, obj = { - scoresList: jspb.Message.toObjectList(msg.getScoresList(), - github_com_bittorrent_go$btfs$common_protos_node_node_pb.ScoreHistoryTab.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.status.ScoreHistoryReq} - */ -proto.status.ScoreHistoryReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.status.ScoreHistoryReq; - return proto.status.ScoreHistoryReq.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.status.ScoreHistoryReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.status.ScoreHistoryReq} - */ -proto.status.ScoreHistoryReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new github_com_bittorrent_go$btfs$common_protos_node_node_pb.ScoreHistoryTab; - reader.readMessage(value,github_com_bittorrent_go$btfs$common_protos_node_node_pb.ScoreHistoryTab.deserializeBinaryFromReader); - msg.addScores(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.status.ScoreHistoryReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.status.ScoreHistoryReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.status.ScoreHistoryReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.status.ScoreHistoryReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getScoresList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - github_com_bittorrent_go$btfs$common_protos_node_node_pb.ScoreHistoryTab.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated node.ScoreHistoryTab scores = 1; - * @return {!Array} - */ -proto.status.ScoreHistoryReq.prototype.getScoresList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, github_com_bittorrent_go$btfs$common_protos_node_node_pb.ScoreHistoryTab, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.status.ScoreHistoryReq} returns this -*/ -proto.status.ScoreHistoryReq.prototype.setScoresList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.node.ScoreHistoryTab=} opt_value - * @param {number=} opt_index - * @return {!proto.node.ScoreHistoryTab} - */ -proto.status.ScoreHistoryReq.prototype.addScores = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.node.ScoreHistoryTab, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.status.ScoreHistoryReq} returns this - */ -proto.status.ScoreHistoryReq.prototype.clearScoresList = function() { - return this.setScoresList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.status.RewardInfo.prototype.toObject = function(opt_includeInstance) { - return proto.status.RewardInfo.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.status.RewardInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.status.RewardInfo.toObject = function(includeInstance, msg) { - var f, obj = { - type: jspb.Message.getFieldWithDefault(msg, 1, 0), - nodeId: jspb.Message.getFieldWithDefault(msg, 2, ""), - isSuspect: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), - weight: jspb.Message.getFieldWithDefault(msg, 5, 0), - stake: jspb.Message.getFieldWithDefault(msg, 6, 0), - fileCount: jspb.Message.getFieldWithDefault(msg, 7, 0), - fileSize: jspb.Message.getFieldWithDefault(msg, 8, 0), - shouldReward: jspb.Message.getFieldWithDefault(msg, 9, 0), - actualReward: jspb.Message.getFieldWithDefault(msg, 10, 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.status.RewardInfo} - */ -proto.status.RewardInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.status.RewardInfo; - return proto.status.RewardInfo.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.status.RewardInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.status.RewardInfo} - */ -proto.status.RewardInfo.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.status.RewardType} */ (reader.readEnum()); - msg.setType(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setNodeId(value); - break; - case 4: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsSuspect(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setWeight(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint32()); - msg.setStake(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint32()); - msg.setFileCount(value); - break; - case 8: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFileSize(value); - break; - case 9: - var value = /** @type {number} */ (reader.readUint64()); - msg.setShouldReward(value); - break; - case 10: - var value = /** @type {number} */ (reader.readUint64()); - msg.setActualReward(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.status.RewardInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.status.RewardInfo.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.status.RewardInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.status.RewardInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getNodeId(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getIsSuspect(); - if (f) { - writer.writeBool( - 4, - f - ); - } - f = message.getWeight(); - if (f !== 0) { - writer.writeUint32( - 5, - f - ); - } - f = message.getStake(); - if (f !== 0) { - writer.writeUint32( - 6, - f - ); - } - f = message.getFileCount(); - if (f !== 0) { - writer.writeUint32( - 7, - f - ); - } - f = message.getFileSize(); - if (f !== 0) { - writer.writeUint64( - 8, - f - ); - } - f = message.getShouldReward(); - if (f !== 0) { - writer.writeUint64( - 9, - f - ); - } - f = message.getActualReward(); - if (f !== 0) { - writer.writeUint64( - 10, - f - ); - } -}; - - -/** - * optional RewardType type = 1; - * @return {!proto.status.RewardType} - */ -proto.status.RewardInfo.prototype.getType = function() { - return /** @type {!proto.status.RewardType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.status.RewardType} value - * @return {!proto.status.RewardInfo} returns this - */ -proto.status.RewardInfo.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional string node_id = 2; - * @return {string} - */ -proto.status.RewardInfo.prototype.getNodeId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.status.RewardInfo} returns this - */ -proto.status.RewardInfo.prototype.setNodeId = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional bool is_suspect = 4; - * @return {boolean} - */ -proto.status.RewardInfo.prototype.getIsSuspect = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.status.RewardInfo} returns this - */ -proto.status.RewardInfo.prototype.setIsSuspect = function(value) { - return jspb.Message.setProto3BooleanField(this, 4, value); -}; - - -/** - * optional uint32 weight = 5; - * @return {number} - */ -proto.status.RewardInfo.prototype.getWeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.status.RewardInfo} returns this - */ -proto.status.RewardInfo.prototype.setWeight = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional uint32 stake = 6; - * @return {number} - */ -proto.status.RewardInfo.prototype.getStake = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.status.RewardInfo} returns this - */ -proto.status.RewardInfo.prototype.setStake = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional uint32 file_count = 7; - * @return {number} - */ -proto.status.RewardInfo.prototype.getFileCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.status.RewardInfo} returns this - */ -proto.status.RewardInfo.prototype.setFileCount = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional uint64 file_size = 8; - * @return {number} - */ -proto.status.RewardInfo.prototype.getFileSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.status.RewardInfo} returns this - */ -proto.status.RewardInfo.prototype.setFileSize = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional uint64 should_reward = 9; - * @return {number} - */ -proto.status.RewardInfo.prototype.getShouldReward = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.status.RewardInfo} returns this - */ -proto.status.RewardInfo.prototype.setShouldReward = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * optional uint64 actual_reward = 10; - * @return {number} - */ -proto.status.RewardInfo.prototype.getActualReward = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.status.RewardInfo} returns this - */ -proto.status.RewardInfo.prototype.setActualReward = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.status.AirdropRewardHistoryReq.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.status.AirdropRewardHistoryReq.prototype.toObject = function(opt_includeInstance) { - return proto.status.AirdropRewardHistoryReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.status.AirdropRewardHistoryReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.status.AirdropRewardHistoryReq.toObject = function(includeInstance, msg) { - var f, obj = { - requesterPid: jspb.Message.getFieldWithDefault(msg, 1, ""), - rewardsList: jspb.Message.toObjectList(msg.getRewardsList(), - proto.status.RewardInfo.toObject, includeInstance), - pageIndex: jspb.Message.getFieldWithDefault(msg, 3, 0), - pageTotal: jspb.Message.getFieldWithDefault(msg, 4, 0), - dateAirdroped: (f = msg.getDateAirdroped()) && google_protobuf_timestamp_pb.Timestamp.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.status.AirdropRewardHistoryReq} - */ -proto.status.AirdropRewardHistoryReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.status.AirdropRewardHistoryReq; - return proto.status.AirdropRewardHistoryReq.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.status.AirdropRewardHistoryReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.status.AirdropRewardHistoryReq} - */ -proto.status.AirdropRewardHistoryReq.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.setRequesterPid(value); - break; - case 2: - var value = new proto.status.RewardInfo; - reader.readMessage(value,proto.status.RewardInfo.deserializeBinaryFromReader); - msg.addRewards(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setPageIndex(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setPageTotal(value); - break; - case 5: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setDateAirdroped(value); - break; - case 6: - 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.status.AirdropRewardHistoryReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.status.AirdropRewardHistoryReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.status.AirdropRewardHistoryReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.status.AirdropRewardHistoryReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRequesterPid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getRewardsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.status.RewardInfo.serializeBinaryToWriter - ); - } - f = message.getPageIndex(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } - f = message.getPageTotal(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getDateAirdroped(); - if (f != null) { - writer.writeMessage( - 5, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 6, - f - ); - } -}; - - -/** - * optional string requester_pid = 1; - * @return {string} - */ -proto.status.AirdropRewardHistoryReq.prototype.getRequesterPid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.status.AirdropRewardHistoryReq} returns this - */ -proto.status.AirdropRewardHistoryReq.prototype.setRequesterPid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * repeated RewardInfo rewards = 2; - * @return {!Array} - */ -proto.status.AirdropRewardHistoryReq.prototype.getRewardsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.status.RewardInfo, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.status.AirdropRewardHistoryReq} returns this -*/ -proto.status.AirdropRewardHistoryReq.prototype.setRewardsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.status.RewardInfo=} opt_value - * @param {number=} opt_index - * @return {!proto.status.RewardInfo} - */ -proto.status.AirdropRewardHistoryReq.prototype.addRewards = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.status.RewardInfo, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.status.AirdropRewardHistoryReq} returns this - */ -proto.status.AirdropRewardHistoryReq.prototype.clearRewardsList = function() { - return this.setRewardsList([]); -}; - - -/** - * optional uint32 page_index = 3; - * @return {number} - */ -proto.status.AirdropRewardHistoryReq.prototype.getPageIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.status.AirdropRewardHistoryReq} returns this - */ -proto.status.AirdropRewardHistoryReq.prototype.setPageIndex = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint32 page_total = 4; - * @return {number} - */ -proto.status.AirdropRewardHistoryReq.prototype.getPageTotal = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.status.AirdropRewardHistoryReq} returns this - */ -proto.status.AirdropRewardHistoryReq.prototype.setPageTotal = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional google.protobuf.Timestamp date_airdroped = 5; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.status.AirdropRewardHistoryReq.prototype.getDateAirdroped = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.status.AirdropRewardHistoryReq} returns this -*/ -proto.status.AirdropRewardHistoryReq.prototype.setDateAirdroped = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.status.AirdropRewardHistoryReq} returns this - */ -proto.status.AirdropRewardHistoryReq.prototype.clearDateAirdroped = function() { - return this.setDateAirdroped(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.status.AirdropRewardHistoryReq.prototype.hasDateAirdroped = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional bytes signature = 6; - * @return {!(string|Uint8Array)} - */ -proto.status.AirdropRewardHistoryReq.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * optional bytes signature = 6; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.status.AirdropRewardHistoryReq.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 6; - * 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.status.AirdropRewardHistoryReq.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.status.AirdropRewardHistoryReq} returns this - */ -proto.status.AirdropRewardHistoryReq.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 6, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.status.Candidate.prototype.toObject = function(opt_includeInstance) { - return proto.status.Candidate.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.status.Candidate} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.status.Candidate.toObject = function(includeInstance, msg) { - var f, obj = { - nodeId: jspb.Message.getFieldWithDefault(msg, 1, ""), - dateAirdroped: (f = msg.getDateAirdroped()) && google_protobuf_timestamp_pb.Timestamp.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.status.Candidate} - */ -proto.status.Candidate.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.status.Candidate; - return proto.status.Candidate.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.status.Candidate} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.status.Candidate} - */ -proto.status.Candidate.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.setNodeId(value); - break; - case 2: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setDateAirdroped(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.status.Candidate.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.status.Candidate.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.status.Candidate} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.status.Candidate.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNodeId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getDateAirdroped(); - if (f != null) { - writer.writeMessage( - 2, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string node_id = 1; - * @return {string} - */ -proto.status.Candidate.prototype.getNodeId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.status.Candidate} returns this - */ -proto.status.Candidate.prototype.setNodeId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional google.protobuf.Timestamp date_airdroped = 2; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.status.Candidate.prototype.getDateAirdroped = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.status.Candidate} returns this -*/ -proto.status.Candidate.prototype.setDateAirdroped = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.status.Candidate} returns this - */ -proto.status.Candidate.prototype.clearDateAirdroped = function() { - return this.setDateAirdroped(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.status.Candidate.prototype.hasDateAirdroped = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.status.NodeContractStatReq.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.status.NodeContractStatReq.prototype.toObject = function(opt_includeInstance) { - return proto.status.NodeContractStatReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.status.NodeContractStatReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.status.NodeContractStatReq.toObject = function(includeInstance, msg) { - var f, obj = { - nodeContractStatsList: jspb.Message.toObjectList(msg.getNodeContractStatsList(), - github_com_bittorrent_go$btfs$common_protos_node_node_pb.NodeContractStat.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.status.NodeContractStatReq} - */ -proto.status.NodeContractStatReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.status.NodeContractStatReq; - return proto.status.NodeContractStatReq.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.status.NodeContractStatReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.status.NodeContractStatReq} - */ -proto.status.NodeContractStatReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new github_com_bittorrent_go$btfs$common_protos_node_node_pb.NodeContractStat; - reader.readMessage(value,github_com_bittorrent_go$btfs$common_protos_node_node_pb.NodeContractStat.deserializeBinaryFromReader); - msg.addNodeContractStats(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.status.NodeContractStatReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.status.NodeContractStatReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.status.NodeContractStatReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.status.NodeContractStatReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNodeContractStatsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - github_com_bittorrent_go$btfs$common_protos_node_node_pb.NodeContractStat.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated node.NodeContractStat node_contract_stats = 1; - * @return {!Array} - */ -proto.status.NodeContractStatReq.prototype.getNodeContractStatsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, github_com_bittorrent_go$btfs$common_protos_node_node_pb.NodeContractStat, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.status.NodeContractStatReq} returns this -*/ -proto.status.NodeContractStatReq.prototype.setNodeContractStatsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.node.NodeContractStat=} opt_value - * @param {number=} opt_index - * @return {!proto.node.NodeContractStat} - */ -proto.status.NodeContractStatReq.prototype.addNodeContractStats = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.node.NodeContractStat, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.status.NodeContractStatReq} returns this - */ -proto.status.NodeContractStatReq.prototype.clearNodeContractStatsList = function() { - return this.setNodeContractStatsList([]); -}; - - -/** - * @enum {number} - */ -proto.status.RewardType = { - FILESIZE: 0, - REPAIR: 1 -}; - -goog.object.extend(exports, proto.status); diff --git a/ledger/escrow.go b/ledger/escrow.go deleted file mode 100644 index bc9f9d5..0000000 --- a/ledger/escrow.go +++ /dev/null @@ -1,99 +0,0 @@ -package ledger - -import ( - "fmt" - - escrowpb "github.com/bittorrent/go-btfs-common/protos/escrow" - ledgerpb "github.com/bittorrent/go-btfs-common/protos/ledger" - - ic "github.com/libp2p/go-libp2p-core/crypto" -) - -func NewPayinRequest(payinId string, payerPubkey ic.PubKey, state *ledgerpb.SignedChannelState) ( - *escrowpb.PayinRequest, error) { - raw, err := ic.RawFull(payerPubkey) - if err != nil { - return nil, err - } - return &escrowpb.PayinRequest{ - PayinId: payinId, - BuyerAddress: raw, - BuyerChannelState: state, - }, nil -} - -func NewSignedPayinRequest(req *escrowpb.PayinRequest, sig []byte) *escrowpb.SignedPayinRequest { - return &escrowpb.SignedPayinRequest{ - Request: req, - BuyerSignature: sig, - } -} - -func NewContractID(id string, key ic.PubKey) (*escrowpb.ContractID, error) { - raw, err := ic.RawFull(key) - if err != nil { - return nil, err - } - return &escrowpb.ContractID{ - ContractId: id, - Address: raw, - }, nil -} - -func NewSingedContractID(id *escrowpb.ContractID, sig []byte) *escrowpb.SignedContractID { - return &escrowpb.SignedContractID{ - Data: id, - Signature: sig, - } -} - -func NewEscrowContract(id string, payerPubKey ic.PubKey, hostPubKey ic.PubKey, authPubKey ic.PubKey, - amount int64, ps escrowpb.Schedule, period int32, contrType escrowpb.ContractType, - contingentAmount int64, storageLength int) (*escrowpb.EscrowContract, error) { - payerAddr, err := ic.RawFull(payerPubKey) - if err != nil { - return nil, err - } - var hostAddr []byte - if hostPubKey != nil { - hostAddr, err = ic.RawFull(hostPubKey) - if err != nil { - return nil, err - } - } - authAddress, err := ic.RawFull(authPubKey) - if err != nil { - return nil, err - } - numPayouts := 1 - switch ps { - case escrowpb.Schedule_MONTHLY: - numPayouts = storageLength / 30 - case escrowpb.Schedule_QUARTERLY: - numPayouts = storageLength / 30 / 3 - case escrowpb.Schedule_ANNUALLY: - numPayouts = storageLength / 30 / 3 / 4 - case escrowpb.Schedule_CUSTOMIZED: - numPayouts = storageLength / int(period) - default: - return nil, fmt.Errorf("invalide PayoutSchedule: %v", ps) - } - if numPayouts == 0 { - numPayouts = 1 - } - return &escrowpb.EscrowContract{ - ContractId: id, - BuyerAddress: payerAddr, - SellerAddress: hostAddr, - AuthAddress: authAddress, - Amount: amount, - CollateralAmount: 0, - WithholdAmount: 0, - TokenType: escrowpb.TokenType_BTT, - PayoutSchedule: ps, - NumPayouts: int32(numPayouts), - CustomizePayoutPeriod: period, - Type: contrType, - ContingentAmount: contingentAmount, - }, nil -} diff --git a/ledger/ledger.go b/ledger/ledger.go deleted file mode 100644 index 8566017..0000000 --- a/ledger/ledger.go +++ /dev/null @@ -1,167 +0,0 @@ -package ledger - -import ( - "context" - "time" - - ledgerpb "github.com/bittorrent/go-btfs-common/protos/ledger" - - "github.com/bittorrent/go-btfs-common/crypto" - "github.com/bittorrent/go-btfs-common/utils/grpc" - "github.com/tron-us/protobuf/proto" - - ic "github.com/libp2p/go-libp2p-core/crypto" -) - -const LedgerVersion = "BTFS_Escrow_1.0.0" - -type Client struct { - addr string -} - -func NewClient(addr string) *Client { - return &Client{addr: addr} -} - -func NewAccount(pubKey ic.PubKey, amount int64) (*ledgerpb.Account, error) { - addr, err := ic.RawFull(pubKey) - if err != nil { - return nil, err - } - return &ledgerpb.Account{ - Address: &ledgerpb.PublicKey{Key: addr}, - Balance: amount, - }, nil -} - -func NewChannelCommit(fromKey ic.PubKey, toKey ic.PubKey, amount int64) (*ledgerpb.ChannelCommit, error) { - fromAddr, err := ic.RawFull(fromKey) - if err != nil { - return nil, err - } - toAddr, err := ic.RawFull(toKey) - if err != nil { - return nil, err - } - return &ledgerpb.ChannelCommit{ - Payer: &ledgerpb.PublicKey{Key: fromAddr}, - Recipient: &ledgerpb.PublicKey{Key: toAddr}, - Amount: amount, - PayerId: time.Now().UnixNano(), - }, err -} - -func NewChannelState(id *ledgerpb.ChannelID, sequence int64, fromAccount *ledgerpb.Account, toAccount *ledgerpb.Account) *ledgerpb.ChannelState { - return &ledgerpb.ChannelState{ - Id: id, - Sequence: sequence, - From: fromAccount, - To: toAccount, - } -} - -func NewSignedChannelState(channelState *ledgerpb.ChannelState, fromSig []byte, toSig []byte) *ledgerpb.SignedChannelState { - return &ledgerpb.SignedChannelState{ - Channel: channelState, - FromSignature: fromSig, - ToSignature: toSig, - } -} - -func NewSignedChannelCommit(commit *ledgerpb.ChannelCommit, sig []byte) *ledgerpb.SignedChannelCommit { - return &ledgerpb.SignedChannelCommit{ - Channel: commit, - Signature: sig, - } -} - -func NewSignedCreateAccountRequest(key *ledgerpb.PublicKey, sig []byte) *ledgerpb.SignedCreateAccountRequest { - return &ledgerpb.SignedCreateAccountRequest{ - Key: key, - Signature: sig, - ClientVersionNumber: LedgerVersion, - } -} - -func (c *Client) ImportAccount(ctx context.Context, pubKey ic.PubKey) (*ledgerpb.Account, error) { - keyBytes, err := ic.RawFull(pubKey) - if err != nil { - return nil, err - } - var res *ledgerpb.CreateAccountResult - err = grpc.LedgerClient(c.addr).WithContext(ctx, func(ctx context.Context, client ledgerpb.ChannelsClient) error { - res, err = client.CreateAccount(ctx, &ledgerpb.PublicKey{Key: keyBytes}) - return err - }) - if err != nil { - return nil, err - } - return res.GetAccount(), nil -} - -func (c *Client) ImportSignedAccount(ctx context.Context, privKey ic.PrivKey, pubKey ic.PubKey) (*ledgerpb.SignedCreateAccountResult, error) { - pubKeyBytes, err := ic.RawFull(pubKey) - if err != nil { - return nil, err - } - signedPubKey := &ledgerpb.PublicKey{Key: pubKeyBytes} - sigBytes, err := proto.Marshal(signedPubKey) - if err != nil { - return nil, err - } - signature, err := privKey.Sign(sigBytes) - if err != nil { - return nil, err - } - signedPubkey := NewSignedCreateAccountRequest(signedPubKey, signature) - - var result *ledgerpb.SignedCreateAccountResult - err = grpc.LedgerClient(c.addr).WithContext(ctx, func(ctx context.Context, client ledgerpb.ChannelsClient) error { - result, err = client.SignedCreateAccount(ctx, signedPubkey) - return err - }) - if err != nil { - return nil, err - } - return result, nil -} - -func (c *Client) CreateChannel(ctx context.Context, channelCommit *ledgerpb.ChannelCommit, sig []byte) (*ledgerpb.ChannelID, error) { - var ( - channelId *ledgerpb.ChannelID - err error - ) - err = grpc.LedgerClient(c.addr).WithContext(ctx, func(ctx context.Context, client ledgerpb.ChannelsClient) error { - channelId, err = client.CreateChannel(ctx, &ledgerpb.SignedChannelCommit{ - Channel: channelCommit, - Signature: sig, - }) - return err - }) - return channelId, err -} - -func (c *Client) CloseChannel(ctx context.Context, signedChannelState *ledgerpb.SignedChannelState) error { - return grpc.LedgerClient(c.addr).WithContext(ctx, func(ctx context.Context, client ledgerpb.ChannelsClient) error { - _, err := client.CloseChannel(ctx, signedChannelState) - return err - }) -} - -func NewSignedPublicKey(privK ic.PrivKey, pubK ic.PubKey) (*ledgerpb.SignedPublicKey, error) { - raw, err := ic.RawFull(pubK) - if err != nil { - return nil, err - } - lgPubKey := &ledgerpb.PublicKey{ - Key: raw, - } - sig, err := crypto.Sign(privK, lgPubKey) - if err != nil { - return nil, err - } - return &ledgerpb.SignedPublicKey{ - Key: lgPubKey, - Signature: sig, - }, nil -} diff --git a/ledger/sample/demo.go b/ledger/sample/demo.go deleted file mode 100644 index cccb3c6..0000000 --- a/ledger/sample/demo.go +++ /dev/null @@ -1,82 +0,0 @@ -package main - -import ( - "context" - "github.com/bittorrent/go-btfs-common/crypto" - "github.com/bittorrent/go-btfs-common/ledger" - "github.com/tron-us/go-common/v2/log" - - "go.uber.org/zap" -) - -const ( - PayerPrivKeyString = "CAISIJFNZZd5ZSvi9OlJP/mz/vvUobvlrr2//QN4DzX/EShP" - ReceiverPrivKeyString = "CAISIDm/qF5f98Jh8FGBUcFUhQvJPU8uEah1SZrR1BrGekC0" -) - -func main() { - ctx := context.Background() - c := ledger.NewClient("https://ledger-dev.bt.co:443") - - // create payer Account - payerPrivKey, err := crypto.ToPrivKey(PayerPrivKeyString) - if err != nil { - log.Panic("can not convert to private key", zap.Error(err)) - } - payerPubKey := payerPrivKey.GetPublic() - _, err = c.ImportSignedAccount(ctx, payerPrivKey, payerPubKey) - if err != nil { - log.Panic("can not create account on ledger", zap.Error(err)) - } - // create receiver account - recvPrivKey, err := crypto.ToPrivKey(ReceiverPrivKeyString) - if err != nil { - log.Panic("can not convert to private key", zap.Error(err)) - } - recvPubKey := recvPrivKey.GetPublic() - _, err = c.ImportSignedAccount(ctx, recvPrivKey, recvPubKey) - if err != nil { - log.Panic("can not create account on ledger", zap.Error(err)) - } - // prepare channel commit - amount := int64(1) - channelCommit, err := ledger.NewChannelCommit(payerPubKey, recvPubKey, amount) - if err != nil { - log.Panic("can not create channel commit", zap.Error(err)) - } - // sign for the channel commit - fromSig, err := crypto.Sign(payerPrivKey, channelCommit) - if err != nil { - log.Panic("fail to sign channel commit", zap.Error(err)) - } - // create channel: payer start the channel - channelID, err := c.CreateChannel(ctx, channelCommit, fromSig) - if err != nil { - log.Panic("fail to create channel", zap.Error(err)) - } - // channel state: transfer money from -> to - fromAcc, err := ledger.NewAccount(payerPubKey, 0) - if err != nil { - log.Panic("wrong account on channel", zap.Error(err)) - } - toAcc, err := ledger.NewAccount(recvPubKey, amount) - if err != nil { - log.Panic("wrong account on channel", zap.Error(err)) - } - channelState := ledger.NewChannelState(channelID, 1, fromAcc, toAcc) - // need permission from both account, get signature from both - fromSigState, err := crypto.Sign(payerPrivKey, channelState) - if err != nil { - log.Panic("error when signing the channel state", zap.Error(err)) - } - toSigState, err := crypto.Sign(recvPrivKey, channelState) - if err != nil { - log.Panic("error when signing the channel state", zap.Error(err)) - } - signedChannelState := ledger.NewSignedChannelState(channelState, fromSigState, toSigState) - // close channel - err = c.CloseChannel(ctx, signedChannelState) - if err != nil { - log.Panic("fail to close channel", zap.Error(err)) - } -} diff --git a/protos/escrow/escrow.pb.go b/protos/escrow/escrow.pb.go deleted file mode 100644 index c184b0a..0000000 --- a/protos/escrow/escrow.pb.go +++ /dev/null @@ -1,15321 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: protos/escrow/escrow.proto - -package escrow - -import ( - context "context" - fmt "fmt" - ledger "github.com/bittorrent/go-btfs-common/protos/ledger" - _ "github.com/gogo/protobuf/types" - golang_proto "github.com/golang/protobuf/proto" - _ "github.com/tron-us/protobuf/gogoproto" - proto "github.com/tron-us/protobuf/proto" - github_com_tron_us_protobuf_types "github.com/tron-us/protobuf/types" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = golang_proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type TokenType int32 - -const ( - TokenType_BTT TokenType = 0 -) - -var TokenType_name = map[int32]string{ - 0: "BTT", -} - -var TokenType_value = map[string]int32{ - "BTT": 0, -} - -func (x TokenType) String() string { - return proto.EnumName(TokenType_name, int32(x)) -} - -func (TokenType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{0} -} - -type Schedule int32 - -const ( - Schedule_MONTHLY Schedule = 0 - Schedule_QUARTERLY Schedule = 1 - Schedule_ANNUALLY Schedule = 2 - Schedule_CUSTOMIZED Schedule = 3 -) - -var Schedule_name = map[int32]string{ - 0: "MONTHLY", - 1: "QUARTERLY", - 2: "ANNUALLY", - 3: "CUSTOMIZED", -} - -var Schedule_value = map[string]int32{ - "MONTHLY": 0, - "QUARTERLY": 1, - "ANNUALLY": 2, - "CUSTOMIZED": 3, -} - -func (x Schedule) String() string { - return proto.EnumName(Schedule_name, int32(x)) -} - -func (Schedule) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{1} -} - -type ContractType int32 - -const ( - ContractType_REGULAR ContractType = 0 - ContractType_PLAN ContractType = 1 - ContractType_REVISE ContractType = 2 -) - -var ContractType_name = map[int32]string{ - 0: "REGULAR", - 1: "PLAN", - 2: "REVISE", -} - -var ContractType_value = map[string]int32{ - "REGULAR": 0, - "PLAN": 1, - "REVISE": 2, -} - -func (x ContractType) String() string { - return proto.EnumName(ContractType_name, int32(x)) -} - -func (ContractType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{2} -} - -type EscrowStatus int32 - -const ( - EscrowStatus_INITIATED EscrowStatus = 0 - EscrowStatus_ACTIVE EscrowStatus = 1 - EscrowStatus_CANCELED EscrowStatus = 2 - EscrowStatus_CLOSED EscrowStatus = 3 - EscrowStatus_NOTSTART EscrowStatus = 4 - EscrowStatus_NOTSTART_PAID EscrowStatus = 5 -) - -var EscrowStatus_name = map[int32]string{ - 0: "INITIATED", - 1: "ACTIVE", - 2: "CANCELED", - 3: "CLOSED", - 4: "NOTSTART", - 5: "NOTSTART_PAID", -} - -var EscrowStatus_value = map[string]int32{ - "INITIATED": 0, - "ACTIVE": 1, - "CANCELED": 2, - "CLOSED": 3, - "NOTSTART": 4, - "NOTSTART_PAID": 5, -} - -func (x EscrowStatus) String() string { - return proto.EnumName(EscrowStatus_name, int32(x)) -} - -func (EscrowStatus) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{3} -} - -type StakeStatus int32 - -const ( - StakeStatus_PROCEEDING StakeStatus = 0 - StakeStatus_FAIL StakeStatus = 1 -) - -var StakeStatus_name = map[int32]string{ - 0: "PROCEEDING", - 1: "FAIL", -} - -var StakeStatus_value = map[string]int32{ - "PROCEEDING": 0, - "FAIL": 1, -} - -func (x StakeStatus) String() string { - return proto.EnumName(StakeStatus_name, int32(x)) -} - -func (StakeStatus) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{4} -} - -type OperationType int32 - -const ( - OperationType_STAKE OperationType = 0 - OperationType_CHEAT_PENALTY OperationType = 1 - OperationType_LOST_SHARD_PENALTY OperationType = 2 -) - -var OperationType_name = map[int32]string{ - 0: "STAKE", - 1: "CHEAT_PENALTY", - 2: "LOST_SHARD_PENALTY", -} - -var OperationType_value = map[string]int32{ - "STAKE": 0, - "CHEAT_PENALTY": 1, - "LOST_SHARD_PENALTY": 2, -} - -func (x OperationType) String() string { - return proto.EnumName(OperationType_name, int32(x)) -} - -func (OperationType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{5} -} - -type ContractID struct { - ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty" pg:"contract_id"` - Address []byte `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty" pg:"address"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ContractID) Reset() { *m = ContractID{} } -func (m *ContractID) String() string { return proto.CompactTextString(m) } -func (*ContractID) ProtoMessage() {} -func (*ContractID) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{0} -} -func (m *ContractID) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContractID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ContractID.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ContractID) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContractID.Merge(m, src) -} -func (m *ContractID) XXX_Size() int { - return m.Size() -} -func (m *ContractID) XXX_DiscardUnknown() { - xxx_messageInfo_ContractID.DiscardUnknown(m) -} - -var xxx_messageInfo_ContractID proto.InternalMessageInfo - -func (m *ContractID) GetContractId() string { - if m != nil { - return m.ContractId - } - return "" -} - -func (m *ContractID) GetAddress() []byte { - if m != nil { - return m.Address - } - return nil -} - -func (*ContractID) XXX_MessageName() string { - return "escrow.ContractID" -} - -type ContractIDBatch struct { - ContractId []string `protobuf:"bytes,1,rep,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty" pg:"contract_id"` - Address []byte `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty" pg:"address"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ContractIDBatch) Reset() { *m = ContractIDBatch{} } -func (m *ContractIDBatch) String() string { return proto.CompactTextString(m) } -func (*ContractIDBatch) ProtoMessage() {} -func (*ContractIDBatch) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{1} -} -func (m *ContractIDBatch) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContractIDBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ContractIDBatch.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ContractIDBatch) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContractIDBatch.Merge(m, src) -} -func (m *ContractIDBatch) XXX_Size() int { - return m.Size() -} -func (m *ContractIDBatch) XXX_DiscardUnknown() { - xxx_messageInfo_ContractIDBatch.DiscardUnknown(m) -} - -var xxx_messageInfo_ContractIDBatch proto.InternalMessageInfo - -func (m *ContractIDBatch) GetContractId() []string { - if m != nil { - return m.ContractId - } - return nil -} - -func (m *ContractIDBatch) GetAddress() []byte { - if m != nil { - return m.Address - } - return nil -} - -func (*ContractIDBatch) XXX_MessageName() string { - return "escrow.ContractIDBatch" -} - -type SignedContractID struct { - Data *ContractID `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty" pg:"data"` - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SignedContractID) Reset() { *m = SignedContractID{} } -func (m *SignedContractID) String() string { return proto.CompactTextString(m) } -func (*SignedContractID) ProtoMessage() {} -func (*SignedContractID) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{2} -} -func (m *SignedContractID) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignedContractID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignedContractID.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SignedContractID) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedContractID.Merge(m, src) -} -func (m *SignedContractID) XXX_Size() int { - return m.Size() -} -func (m *SignedContractID) XXX_DiscardUnknown() { - xxx_messageInfo_SignedContractID.DiscardUnknown(m) -} - -var xxx_messageInfo_SignedContractID proto.InternalMessageInfo - -func (m *SignedContractID) GetData() *ContractID { - if m != nil { - return m.Data - } - return nil -} - -func (m *SignedContractID) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (*SignedContractID) XXX_MessageName() string { - return "escrow.SignedContractID" -} - -type SignedContractIDBatch struct { - Data *ContractIDBatch `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty" pg:"data"` - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SignedContractIDBatch) Reset() { *m = SignedContractIDBatch{} } -func (m *SignedContractIDBatch) String() string { return proto.CompactTextString(m) } -func (*SignedContractIDBatch) ProtoMessage() {} -func (*SignedContractIDBatch) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{3} -} -func (m *SignedContractIDBatch) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignedContractIDBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignedContractIDBatch.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SignedContractIDBatch) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedContractIDBatch.Merge(m, src) -} -func (m *SignedContractIDBatch) XXX_Size() int { - return m.Size() -} -func (m *SignedContractIDBatch) XXX_DiscardUnknown() { - xxx_messageInfo_SignedContractIDBatch.DiscardUnknown(m) -} - -var xxx_messageInfo_SignedContractIDBatch proto.InternalMessageInfo - -func (m *SignedContractIDBatch) GetData() *ContractIDBatch { - if m != nil { - return m.Data - } - return nil -} - -func (m *SignedContractIDBatch) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (*SignedContractIDBatch) XXX_MessageName() string { - return "escrow.SignedContractIDBatch" -} - -type SignedModifyContractIDBatch struct { - Data *ContractIDBatch `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty" pg:"data"` - LastModifyTime time.Time `protobuf:"bytes,2,opt,name=last_modify_time,json=lastModifyTime,proto3,stdtime" json:"last_modify_time" pg:"last_modify_time"` - Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SignedModifyContractIDBatch) Reset() { *m = SignedModifyContractIDBatch{} } -func (m *SignedModifyContractIDBatch) String() string { return proto.CompactTextString(m) } -func (*SignedModifyContractIDBatch) ProtoMessage() {} -func (*SignedModifyContractIDBatch) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{4} -} -func (m *SignedModifyContractIDBatch) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignedModifyContractIDBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignedModifyContractIDBatch.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SignedModifyContractIDBatch) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedModifyContractIDBatch.Merge(m, src) -} -func (m *SignedModifyContractIDBatch) XXX_Size() int { - return m.Size() -} -func (m *SignedModifyContractIDBatch) XXX_DiscardUnknown() { - xxx_messageInfo_SignedModifyContractIDBatch.DiscardUnknown(m) -} - -var xxx_messageInfo_SignedModifyContractIDBatch proto.InternalMessageInfo - -func (m *SignedModifyContractIDBatch) GetData() *ContractIDBatch { - if m != nil { - return m.Data - } - return nil -} - -func (m *SignedModifyContractIDBatch) GetLastModifyTime() time.Time { - if m != nil { - return m.LastModifyTime - } - return time.Time{} -} - -func (m *SignedModifyContractIDBatch) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (*SignedModifyContractIDBatch) XXX_MessageName() string { - return "escrow.SignedModifyContractIDBatch" -} - -type EscrowContract struct { - ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty" pg:"contract_id"` - BuyerAddress []byte `protobuf:"bytes,2,opt,name=buyer_address,json=buyerAddress,proto3" json:"buyer_address,omitempty" pg:"buyer_address"` - SellerAddress []byte `protobuf:"bytes,3,opt,name=seller_address,json=sellerAddress,proto3" json:"seller_address,omitempty" pg:"seller_address"` - AuthAddress []byte `protobuf:"bytes,4,opt,name=auth_address,json=authAddress,proto3" json:"auth_address,omitempty" pg:"auth_address"` - Amount int64 `protobuf:"varint,5,opt,name=amount,proto3" json:"amount,omitempty" pg:"amount"` - CollateralAmount int64 `protobuf:"varint,6,opt,name=collateral_amount,json=collateralAmount,proto3" json:"collateral_amount,omitempty" pg:"collateral_amount"` - WithholdAmount int64 `protobuf:"varint,7,opt,name=withhold_amount,json=withholdAmount,proto3" json:"withhold_amount,omitempty" pg:"withhold_amount"` - TokenType TokenType `protobuf:"varint,8,opt,name=token_type,json=tokenType,proto3,enum=escrow.TokenType" json:"token_type,omitempty" pg:"token_type"` - PayoutSchedule Schedule `protobuf:"varint,9,opt,name=payout_schedule,json=payoutSchedule,proto3,enum=escrow.Schedule" json:"payout_schedule,omitempty" pg:"payout_schedule"` - NumPayouts int32 `protobuf:"varint,10,opt,name=num_payouts,json=numPayouts,proto3" json:"num_payouts,omitempty" pg:"num_payouts"` - Reference []byte `protobuf:"bytes,11,opt,name=reference,proto3" json:"reference,omitempty" pg:"reference"` - CustomizePayoutPeriod int32 `protobuf:"varint,12,opt,name=customize_payout_period,json=customizePayoutPeriod,proto3" json:"customize_payout_period,omitempty" pg:"customize_payout_period"` - Type ContractType `protobuf:"varint,13,opt,name=type,proto3,enum=escrow.ContractType" json:"type,omitempty" pg:"type"` - ContingentAmount int64 `protobuf:"varint,14,opt,name=contingent_amount,json=contingentAmount,proto3" json:"contingent_amount,omitempty" pg:"contingent_amount"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *EscrowContract) Reset() { *m = EscrowContract{} } -func (m *EscrowContract) String() string { return proto.CompactTextString(m) } -func (*EscrowContract) ProtoMessage() {} -func (*EscrowContract) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{5} -} -func (m *EscrowContract) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EscrowContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EscrowContract.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EscrowContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_EscrowContract.Merge(m, src) -} -func (m *EscrowContract) XXX_Size() int { - return m.Size() -} -func (m *EscrowContract) XXX_DiscardUnknown() { - xxx_messageInfo_EscrowContract.DiscardUnknown(m) -} - -var xxx_messageInfo_EscrowContract proto.InternalMessageInfo - -func (m *EscrowContract) GetContractId() string { - if m != nil { - return m.ContractId - } - return "" -} - -func (m *EscrowContract) GetBuyerAddress() []byte { - if m != nil { - return m.BuyerAddress - } - return nil -} - -func (m *EscrowContract) GetSellerAddress() []byte { - if m != nil { - return m.SellerAddress - } - return nil -} - -func (m *EscrowContract) GetAuthAddress() []byte { - if m != nil { - return m.AuthAddress - } - return nil -} - -func (m *EscrowContract) GetAmount() int64 { - if m != nil { - return m.Amount - } - return 0 -} - -func (m *EscrowContract) GetCollateralAmount() int64 { - if m != nil { - return m.CollateralAmount - } - return 0 -} - -func (m *EscrowContract) GetWithholdAmount() int64 { - if m != nil { - return m.WithholdAmount - } - return 0 -} - -func (m *EscrowContract) GetTokenType() TokenType { - if m != nil { - return m.TokenType - } - return TokenType_BTT -} - -func (m *EscrowContract) GetPayoutSchedule() Schedule { - if m != nil { - return m.PayoutSchedule - } - return Schedule_MONTHLY -} - -func (m *EscrowContract) GetNumPayouts() int32 { - if m != nil { - return m.NumPayouts - } - return 0 -} - -func (m *EscrowContract) GetReference() []byte { - if m != nil { - return m.Reference - } - return nil -} - -func (m *EscrowContract) GetCustomizePayoutPeriod() int32 { - if m != nil { - return m.CustomizePayoutPeriod - } - return 0 -} - -func (m *EscrowContract) GetType() ContractType { - if m != nil { - return m.Type - } - return ContractType_REGULAR -} - -func (m *EscrowContract) GetContingentAmount() int64 { - if m != nil { - return m.ContingentAmount - } - return 0 -} - -func (*EscrowContract) XXX_MessageName() string { - return "escrow.EscrowContract" -} - -type SignedEscrowContract struct { - Contract *EscrowContract `protobuf:"bytes,1,opt,name=contract,proto3" json:"contract,omitempty" pg:"contract"` - BuyerSignature []byte `protobuf:"bytes,2,opt,name=buyer_signature,json=buyerSignature,proto3" json:"buyer_signature,omitempty" pg:"buyer_signature"` - SellerSignature []byte `protobuf:"bytes,3,opt,name=seller_signature,json=sellerSignature,proto3" json:"seller_signature,omitempty" pg:"seller_signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SignedEscrowContract) Reset() { *m = SignedEscrowContract{} } -func (m *SignedEscrowContract) String() string { return proto.CompactTextString(m) } -func (*SignedEscrowContract) ProtoMessage() {} -func (*SignedEscrowContract) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{6} -} -func (m *SignedEscrowContract) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignedEscrowContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignedEscrowContract.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SignedEscrowContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedEscrowContract.Merge(m, src) -} -func (m *SignedEscrowContract) XXX_Size() int { - return m.Size() -} -func (m *SignedEscrowContract) XXX_DiscardUnknown() { - xxx_messageInfo_SignedEscrowContract.DiscardUnknown(m) -} - -var xxx_messageInfo_SignedEscrowContract proto.InternalMessageInfo - -func (m *SignedEscrowContract) GetContract() *EscrowContract { - if m != nil { - return m.Contract - } - return nil -} - -func (m *SignedEscrowContract) GetBuyerSignature() []byte { - if m != nil { - return m.BuyerSignature - } - return nil -} - -func (m *SignedEscrowContract) GetSellerSignature() []byte { - if m != nil { - return m.SellerSignature - } - return nil -} - -func (*SignedEscrowContract) XXX_MessageName() string { - return "escrow.SignedEscrowContract" -} - -type EscrowContractRequest struct { - Contract []*SignedEscrowContract `protobuf:"bytes,1,rep,name=contract,proto3" json:"contract,omitempty" pg:"contract"` - BuyerChannel *ledger.SignedChannelCommit `protobuf:"bytes,2,opt,name=buyer_channel,json=buyerChannel,proto3" json:"buyer_channel,omitempty" pg:"buyer_channel"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *EscrowContractRequest) Reset() { *m = EscrowContractRequest{} } -func (m *EscrowContractRequest) String() string { return proto.CompactTextString(m) } -func (*EscrowContractRequest) ProtoMessage() {} -func (*EscrowContractRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{7} -} -func (m *EscrowContractRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EscrowContractRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EscrowContractRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EscrowContractRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_EscrowContractRequest.Merge(m, src) -} -func (m *EscrowContractRequest) XXX_Size() int { - return m.Size() -} -func (m *EscrowContractRequest) XXX_DiscardUnknown() { - xxx_messageInfo_EscrowContractRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_EscrowContractRequest proto.InternalMessageInfo - -func (m *EscrowContractRequest) GetContract() []*SignedEscrowContract { - if m != nil { - return m.Contract - } - return nil -} - -func (m *EscrowContractRequest) GetBuyerChannel() *ledger.SignedChannelCommit { - if m != nil { - return m.BuyerChannel - } - return nil -} - -func (*EscrowContractRequest) XXX_MessageName() string { - return "escrow.EscrowContractRequest" -} - -type Escrow struct { - ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty" pg:"contract_id"` - EscrowId int64 `protobuf:"varint,2,opt,name=escrow_id,json=escrowId,proto3" json:"escrow_id,omitempty" pg:"escrow_id"` - FromAddress []byte `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty" pg:"from_address"` - ToAddress []byte `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty" pg:"to_address"` - Amount int64 `protobuf:"varint,5,opt,name=amount,proto3" json:"amount,omitempty" pg:"amount"` - CollateralAmount int64 `protobuf:"varint,6,opt,name=collateral_amount,json=collateralAmount,proto3" json:"collateral_amount,omitempty" pg:"collateral_amount"` - ErrorCode int32 `protobuf:"varint,7,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty" pg:"error_code"` - ErrorMessage string `protobuf:"bytes,8,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty" pg:"error_message"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Escrow) Reset() { *m = Escrow{} } -func (m *Escrow) String() string { return proto.CompactTextString(m) } -func (*Escrow) ProtoMessage() {} -func (*Escrow) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{8} -} -func (m *Escrow) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Escrow) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Escrow.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Escrow) XXX_Merge(src proto.Message) { - xxx_messageInfo_Escrow.Merge(m, src) -} -func (m *Escrow) XXX_Size() int { - return m.Size() -} -func (m *Escrow) XXX_DiscardUnknown() { - xxx_messageInfo_Escrow.DiscardUnknown(m) -} - -var xxx_messageInfo_Escrow proto.InternalMessageInfo - -func (m *Escrow) GetContractId() string { - if m != nil { - return m.ContractId - } - return "" -} - -func (m *Escrow) GetEscrowId() int64 { - if m != nil { - return m.EscrowId - } - return 0 -} - -func (m *Escrow) GetFromAddress() []byte { - if m != nil { - return m.FromAddress - } - return nil -} - -func (m *Escrow) GetToAddress() []byte { - if m != nil { - return m.ToAddress - } - return nil -} - -func (m *Escrow) GetAmount() int64 { - if m != nil { - return m.Amount - } - return 0 -} - -func (m *Escrow) GetCollateralAmount() int64 { - if m != nil { - return m.CollateralAmount - } - return 0 -} - -func (m *Escrow) GetErrorCode() int32 { - if m != nil { - return m.ErrorCode - } - return 0 -} - -func (m *Escrow) GetErrorMessage() string { - if m != nil { - return m.ErrorMessage - } - return "" -} - -func (*Escrow) XXX_MessageName() string { - return "escrow.Escrow" -} - -type SubmitContractResult struct { - PayinId string `protobuf:"bytes,1,opt,name=payin_id,json=payinId,proto3" json:"payin_id,omitempty" pg:"payin_id"` - Escrow []*Escrow `protobuf:"bytes,2,rep,name=escrow,proto3" json:"escrow,omitempty" pg:"escrow"` - EscrowAddress []byte `protobuf:"bytes,3,opt,name=escrow_address,json=escrowAddress,proto3" json:"escrow_address,omitempty" pg:"escrow_address"` - EscrowSignedTime time.Time `protobuf:"bytes,4,opt,name=escrow_signed_time,json=escrowSignedTime,proto3,stdtime" json:"escrow_signed_time" pg:"escrow_signed_time"` - BuyerChannelState *ledger.SignedChannelState `protobuf:"bytes,5,opt,name=buyer_channel_state,json=buyerChannelState,proto3" json:"buyer_channel_state,omitempty" pg:"buyer_channel_state"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SubmitContractResult) Reset() { *m = SubmitContractResult{} } -func (m *SubmitContractResult) String() string { return proto.CompactTextString(m) } -func (*SubmitContractResult) ProtoMessage() {} -func (*SubmitContractResult) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{9} -} -func (m *SubmitContractResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SubmitContractResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SubmitContractResult.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SubmitContractResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_SubmitContractResult.Merge(m, src) -} -func (m *SubmitContractResult) XXX_Size() int { - return m.Size() -} -func (m *SubmitContractResult) XXX_DiscardUnknown() { - xxx_messageInfo_SubmitContractResult.DiscardUnknown(m) -} - -var xxx_messageInfo_SubmitContractResult proto.InternalMessageInfo - -func (m *SubmitContractResult) GetPayinId() string { - if m != nil { - return m.PayinId - } - return "" -} - -func (m *SubmitContractResult) GetEscrow() []*Escrow { - if m != nil { - return m.Escrow - } - return nil -} - -func (m *SubmitContractResult) GetEscrowAddress() []byte { - if m != nil { - return m.EscrowAddress - } - return nil -} - -func (m *SubmitContractResult) GetEscrowSignedTime() time.Time { - if m != nil { - return m.EscrowSignedTime - } - return time.Time{} -} - -func (m *SubmitContractResult) GetBuyerChannelState() *ledger.SignedChannelState { - if m != nil { - return m.BuyerChannelState - } - return nil -} - -func (*SubmitContractResult) XXX_MessageName() string { - return "escrow.SubmitContractResult" -} - -type SignedSubmitContractResult struct { - Result *SubmitContractResult `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty" pg:"result"` - EscrowSignature []byte `protobuf:"bytes,2,opt,name=escrow_signature,json=escrowSignature,proto3" json:"escrow_signature,omitempty" pg:"escrow_signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SignedSubmitContractResult) Reset() { *m = SignedSubmitContractResult{} } -func (m *SignedSubmitContractResult) String() string { return proto.CompactTextString(m) } -func (*SignedSubmitContractResult) ProtoMessage() {} -func (*SignedSubmitContractResult) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{10} -} -func (m *SignedSubmitContractResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignedSubmitContractResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignedSubmitContractResult.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SignedSubmitContractResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedSubmitContractResult.Merge(m, src) -} -func (m *SignedSubmitContractResult) XXX_Size() int { - return m.Size() -} -func (m *SignedSubmitContractResult) XXX_DiscardUnknown() { - xxx_messageInfo_SignedSubmitContractResult.DiscardUnknown(m) -} - -var xxx_messageInfo_SignedSubmitContractResult proto.InternalMessageInfo - -func (m *SignedSubmitContractResult) GetResult() *SubmitContractResult { - if m != nil { - return m.Result - } - return nil -} - -func (m *SignedSubmitContractResult) GetEscrowSignature() []byte { - if m != nil { - return m.EscrowSignature - } - return nil -} - -func (*SignedSubmitContractResult) XXX_MessageName() string { - return "escrow.SignedSubmitContractResult" -} - -type StartEscrowResult struct { - Escrow []*Escrow `protobuf:"bytes,1,rep,name=escrow,proto3" json:"escrow,omitempty" pg:"escrow"` - EscrowAddress []byte `protobuf:"bytes,2,opt,name=escrow_address,json=escrowAddress,proto3" json:"escrow_address,omitempty" pg:"escrow_address"` - EscrowSignedTime time.Time `protobuf:"bytes,3,opt,name=escrow_signed_time,json=escrowSignedTime,proto3,stdtime" json:"escrow_signed_time" pg:"escrow_signed_time"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *StartEscrowResult) Reset() { *m = StartEscrowResult{} } -func (m *StartEscrowResult) String() string { return proto.CompactTextString(m) } -func (*StartEscrowResult) ProtoMessage() {} -func (*StartEscrowResult) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{11} -} -func (m *StartEscrowResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StartEscrowResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StartEscrowResult.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *StartEscrowResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_StartEscrowResult.Merge(m, src) -} -func (m *StartEscrowResult) XXX_Size() int { - return m.Size() -} -func (m *StartEscrowResult) XXX_DiscardUnknown() { - xxx_messageInfo_StartEscrowResult.DiscardUnknown(m) -} - -var xxx_messageInfo_StartEscrowResult proto.InternalMessageInfo - -func (m *StartEscrowResult) GetEscrow() []*Escrow { - if m != nil { - return m.Escrow - } - return nil -} - -func (m *StartEscrowResult) GetEscrowAddress() []byte { - if m != nil { - return m.EscrowAddress - } - return nil -} - -func (m *StartEscrowResult) GetEscrowSignedTime() time.Time { - if m != nil { - return m.EscrowSignedTime - } - return time.Time{} -} - -func (*StartEscrowResult) XXX_MessageName() string { - return "escrow.StartEscrowResult" -} - -type SignedStartEscrowResult struct { - Result *StartEscrowResult `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty" pg:"result"` - EscrowSignature []byte `protobuf:"bytes,2,opt,name=escrow_signature,json=escrowSignature,proto3" json:"escrow_signature,omitempty" pg:"escrow_signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SignedStartEscrowResult) Reset() { *m = SignedStartEscrowResult{} } -func (m *SignedStartEscrowResult) String() string { return proto.CompactTextString(m) } -func (*SignedStartEscrowResult) ProtoMessage() {} -func (*SignedStartEscrowResult) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{12} -} -func (m *SignedStartEscrowResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignedStartEscrowResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignedStartEscrowResult.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SignedStartEscrowResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedStartEscrowResult.Merge(m, src) -} -func (m *SignedStartEscrowResult) XXX_Size() int { - return m.Size() -} -func (m *SignedStartEscrowResult) XXX_DiscardUnknown() { - xxx_messageInfo_SignedStartEscrowResult.DiscardUnknown(m) -} - -var xxx_messageInfo_SignedStartEscrowResult proto.InternalMessageInfo - -func (m *SignedStartEscrowResult) GetResult() *StartEscrowResult { - if m != nil { - return m.Result - } - return nil -} - -func (m *SignedStartEscrowResult) GetEscrowSignature() []byte { - if m != nil { - return m.EscrowSignature - } - return nil -} - -func (*SignedStartEscrowResult) XXX_MessageName() string { - return "escrow.SignedStartEscrowResult" -} - -type PayinRequest struct { - PayinId string `protobuf:"bytes,1,opt,name=payin_id,json=payinId,proto3" json:"payin_id,omitempty" pg:"payin_id"` - BuyerAddress []byte `protobuf:"bytes,2,opt,name=buyer_address,json=buyerAddress,proto3" json:"buyer_address,omitempty" pg:"buyer_address"` - BuyerChannelState *ledger.SignedChannelState `protobuf:"bytes,3,opt,name=buyer_channel_state,json=buyerChannelState,proto3" json:"buyer_channel_state,omitempty" pg:"buyer_channel_state"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *PayinRequest) Reset() { *m = PayinRequest{} } -func (m *PayinRequest) String() string { return proto.CompactTextString(m) } -func (*PayinRequest) ProtoMessage() {} -func (*PayinRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{13} -} -func (m *PayinRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PayinRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PayinRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *PayinRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PayinRequest.Merge(m, src) -} -func (m *PayinRequest) XXX_Size() int { - return m.Size() -} -func (m *PayinRequest) XXX_DiscardUnknown() { - xxx_messageInfo_PayinRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_PayinRequest proto.InternalMessageInfo - -func (m *PayinRequest) GetPayinId() string { - if m != nil { - return m.PayinId - } - return "" -} - -func (m *PayinRequest) GetBuyerAddress() []byte { - if m != nil { - return m.BuyerAddress - } - return nil -} - -func (m *PayinRequest) GetBuyerChannelState() *ledger.SignedChannelState { - if m != nil { - return m.BuyerChannelState - } - return nil -} - -func (*PayinRequest) XXX_MessageName() string { - return "escrow.PayinRequest" -} - -type SignedPayinRequest struct { - Request *PayinRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty" pg:"request"` - BuyerSignature []byte `protobuf:"bytes,2,opt,name=buyer_signature,json=buyerSignature,proto3" json:"buyer_signature,omitempty" pg:"buyer_signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SignedPayinRequest) Reset() { *m = SignedPayinRequest{} } -func (m *SignedPayinRequest) String() string { return proto.CompactTextString(m) } -func (*SignedPayinRequest) ProtoMessage() {} -func (*SignedPayinRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{14} -} -func (m *SignedPayinRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignedPayinRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignedPayinRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SignedPayinRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedPayinRequest.Merge(m, src) -} -func (m *SignedPayinRequest) XXX_Size() int { - return m.Size() -} -func (m *SignedPayinRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SignedPayinRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SignedPayinRequest proto.InternalMessageInfo - -func (m *SignedPayinRequest) GetRequest() *PayinRequest { - if m != nil { - return m.Request - } - return nil -} - -func (m *SignedPayinRequest) GetBuyerSignature() []byte { - if m != nil { - return m.BuyerSignature - } - return nil -} - -func (*SignedPayinRequest) XXX_MessageName() string { - return "escrow.SignedPayinRequest" -} - -type PayinResult struct { - PayinId string `protobuf:"bytes,1,opt,name=payin_id,json=payinId,proto3" json:"payin_id,omitempty" pg:"payin_id"` - Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty" pg:"amount"` - ChannelId int64 `protobuf:"varint,3,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" pg:"channel_id"` - EscrowAddress []byte `protobuf:"bytes,4,opt,name=escrow_address,json=escrowAddress,proto3" json:"escrow_address,omitempty" pg:"escrow_address"` - EscrowSignedTime time.Time `protobuf:"bytes,5,opt,name=escrow_signed_time,json=escrowSignedTime,proto3,stdtime" json:"escrow_signed_time" pg:"escrow_signed_time"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *PayinResult) Reset() { *m = PayinResult{} } -func (m *PayinResult) String() string { return proto.CompactTextString(m) } -func (*PayinResult) ProtoMessage() {} -func (*PayinResult) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{15} -} -func (m *PayinResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PayinResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PayinResult.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *PayinResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_PayinResult.Merge(m, src) -} -func (m *PayinResult) XXX_Size() int { - return m.Size() -} -func (m *PayinResult) XXX_DiscardUnknown() { - xxx_messageInfo_PayinResult.DiscardUnknown(m) -} - -var xxx_messageInfo_PayinResult proto.InternalMessageInfo - -func (m *PayinResult) GetPayinId() string { - if m != nil { - return m.PayinId - } - return "" -} - -func (m *PayinResult) GetAmount() int64 { - if m != nil { - return m.Amount - } - return 0 -} - -func (m *PayinResult) GetChannelId() int64 { - if m != nil { - return m.ChannelId - } - return 0 -} - -func (m *PayinResult) GetEscrowAddress() []byte { - if m != nil { - return m.EscrowAddress - } - return nil -} - -func (m *PayinResult) GetEscrowSignedTime() time.Time { - if m != nil { - return m.EscrowSignedTime - } - return time.Time{} -} - -func (*PayinResult) XXX_MessageName() string { - return "escrow.PayinResult" -} - -type SignedPayinResult struct { - Result *PayinResult `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty" pg:"result"` - EscrowSignature []byte `protobuf:"bytes,2,opt,name=escrow_signature,json=escrowSignature,proto3" json:"escrow_signature,omitempty" pg:"escrow_signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SignedPayinResult) Reset() { *m = SignedPayinResult{} } -func (m *SignedPayinResult) String() string { return proto.CompactTextString(m) } -func (*SignedPayinResult) ProtoMessage() {} -func (*SignedPayinResult) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{16} -} -func (m *SignedPayinResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignedPayinResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignedPayinResult.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SignedPayinResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedPayinResult.Merge(m, src) -} -func (m *SignedPayinResult) XXX_Size() int { - return m.Size() -} -func (m *SignedPayinResult) XXX_DiscardUnknown() { - xxx_messageInfo_SignedPayinResult.DiscardUnknown(m) -} - -var xxx_messageInfo_SignedPayinResult proto.InternalMessageInfo - -func (m *SignedPayinResult) GetResult() *PayinResult { - if m != nil { - return m.Result - } - return nil -} - -func (m *SignedPayinResult) GetEscrowSignature() []byte { - if m != nil { - return m.EscrowSignature - } - return nil -} - -func (*SignedPayinResult) XXX_MessageName() string { - return "escrow.SignedPayinResult" -} - -type PayinStatus struct { - Paid bool `protobuf:"varint,1,opt,name=paid,proto3" json:"paid,omitempty" pg:"paid"` - ChannelId int64 `protobuf:"varint,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" pg:"channel_id"` - EscrowAddress []byte `protobuf:"bytes,3,opt,name=escrow_address,json=escrowAddress,proto3" json:"escrow_address,omitempty" pg:"escrow_address"` - EscrowSignedTime time.Time `protobuf:"bytes,4,opt,name=escrow_signed_time,json=escrowSignedTime,proto3,stdtime" json:"escrow_signed_time" pg:"escrow_signed_time"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *PayinStatus) Reset() { *m = PayinStatus{} } -func (m *PayinStatus) String() string { return proto.CompactTextString(m) } -func (*PayinStatus) ProtoMessage() {} -func (*PayinStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{17} -} -func (m *PayinStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PayinStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PayinStatus.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *PayinStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_PayinStatus.Merge(m, src) -} -func (m *PayinStatus) XXX_Size() int { - return m.Size() -} -func (m *PayinStatus) XXX_DiscardUnknown() { - xxx_messageInfo_PayinStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_PayinStatus proto.InternalMessageInfo - -func (m *PayinStatus) GetPaid() bool { - if m != nil { - return m.Paid - } - return false -} - -func (m *PayinStatus) GetChannelId() int64 { - if m != nil { - return m.ChannelId - } - return 0 -} - -func (m *PayinStatus) GetEscrowAddress() []byte { - if m != nil { - return m.EscrowAddress - } - return nil -} - -func (m *PayinStatus) GetEscrowSignedTime() time.Time { - if m != nil { - return m.EscrowSignedTime - } - return time.Time{} -} - -func (*PayinStatus) XXX_MessageName() string { - return "escrow.PayinStatus" -} - -type SignedPayinStatus struct { - Status *PayinStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty" pg:"status"` - EscrowSignature []byte `protobuf:"bytes,2,opt,name=escrow_signature,json=escrowSignature,proto3" json:"escrow_signature,omitempty" pg:"escrow_signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SignedPayinStatus) Reset() { *m = SignedPayinStatus{} } -func (m *SignedPayinStatus) String() string { return proto.CompactTextString(m) } -func (*SignedPayinStatus) ProtoMessage() {} -func (*SignedPayinStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{18} -} -func (m *SignedPayinStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignedPayinStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignedPayinStatus.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SignedPayinStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedPayinStatus.Merge(m, src) -} -func (m *SignedPayinStatus) XXX_Size() int { - return m.Size() -} -func (m *SignedPayinStatus) XXX_DiscardUnknown() { - xxx_messageInfo_SignedPayinStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_SignedPayinStatus proto.InternalMessageInfo - -func (m *SignedPayinStatus) GetStatus() *PayinStatus { - if m != nil { - return m.Status - } - return nil -} - -func (m *SignedPayinStatus) GetEscrowSignature() []byte { - if m != nil { - return m.EscrowSignature - } - return nil -} - -func (*SignedPayinStatus) XXX_MessageName() string { - return "escrow.SignedPayinStatus" -} - -type PayoutStatus struct { - ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty" pg:"contract_id"` - EscrowId int64 `protobuf:"varint,2,opt,name=escrow_id,json=escrowId,proto3" json:"escrow_id,omitempty" pg:"escrow_id"` - FromAddress []byte `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty" pg:"from_address"` - ToAddress []byte `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty" pg:"to_address"` - AuthAddress []byte `protobuf:"bytes,5,opt,name=auth_address,json=authAddress,proto3" json:"auth_address,omitempty" pg:"auth_address"` - Status EscrowStatus `protobuf:"varint,6,opt,name=status,proto3,enum=escrow.EscrowStatus" json:"status,omitempty" pg:"status"` - Amount int64 `protobuf:"varint,7,opt,name=amount,proto3" json:"amount,omitempty" pg:"amount"` - Collateral int64 `protobuf:"varint,8,opt,name=collateral,proto3" json:"collateral,omitempty" pg:"collateral"` - Withhold int64 `protobuf:"varint,9,opt,name=withhold,proto3" json:"withhold,omitempty" pg:"withhold"` - PaidAmount int64 `protobuf:"varint,10,opt,name=paid_amount,json=paidAmount,proto3" json:"paid_amount,omitempty" pg:"paid_amount"` - NumPaid int32 `protobuf:"varint,11,opt,name=num_paid,json=numPaid,proto3" json:"num_paid,omitempty" pg:"num_paid"` - LeftAmount int64 `protobuf:"varint,12,opt,name=left_amount,json=leftAmount,proto3" json:"left_amount,omitempty" pg:"left_amount"` - NumLeft int32 `protobuf:"varint,13,opt,name=num_left,json=numLeft,proto3" json:"num_left,omitempty" pg:"num_left"` - NextAmount int64 `protobuf:"varint,14,opt,name=next_amount,json=nextAmount,proto3" json:"next_amount,omitempty" pg:"next_amount"` - LastPayoutTime time.Time `protobuf:"bytes,15,opt,name=last_payout_time,json=lastPayoutTime,proto3,stdtime" json:"last_payout_time" pg:"last_payout_time"` - NextPayoutTime time.Time `protobuf:"bytes,16,opt,name=next_payout_time,json=nextPayoutTime,proto3,stdtime" json:"next_payout_time" pg:"next_payout_time"` - EscrowAddress []byte `protobuf:"bytes,17,opt,name=escrow_address,json=escrowAddress,proto3" json:"escrow_address,omitempty" pg:"escrow_address"` - EscrowSignTime time.Time `protobuf:"bytes,18,opt,name=escrow_sign_time,json=escrowSignTime,proto3,stdtime" json:"escrow_sign_time" pg:"escrow_sign_time"` - ErrorMsg string `protobuf:"bytes,19,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty" pg:"error_msg"` - LastModifyTime time.Time `protobuf:"bytes,20,opt,name=last_modify_time,json=lastModifyTime,proto3,stdtime" json:"last_modify_time" pg:"last_modify_time"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *PayoutStatus) Reset() { *m = PayoutStatus{} } -func (m *PayoutStatus) String() string { return proto.CompactTextString(m) } -func (*PayoutStatus) ProtoMessage() {} -func (*PayoutStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{19} -} -func (m *PayoutStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PayoutStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PayoutStatus.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *PayoutStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_PayoutStatus.Merge(m, src) -} -func (m *PayoutStatus) XXX_Size() int { - return m.Size() -} -func (m *PayoutStatus) XXX_DiscardUnknown() { - xxx_messageInfo_PayoutStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_PayoutStatus proto.InternalMessageInfo - -func (m *PayoutStatus) GetContractId() string { - if m != nil { - return m.ContractId - } - return "" -} - -func (m *PayoutStatus) GetEscrowId() int64 { - if m != nil { - return m.EscrowId - } - return 0 -} - -func (m *PayoutStatus) GetFromAddress() []byte { - if m != nil { - return m.FromAddress - } - return nil -} - -func (m *PayoutStatus) GetToAddress() []byte { - if m != nil { - return m.ToAddress - } - return nil -} - -func (m *PayoutStatus) GetAuthAddress() []byte { - if m != nil { - return m.AuthAddress - } - return nil -} - -func (m *PayoutStatus) GetStatus() EscrowStatus { - if m != nil { - return m.Status - } - return EscrowStatus_INITIATED -} - -func (m *PayoutStatus) GetAmount() int64 { - if m != nil { - return m.Amount - } - return 0 -} - -func (m *PayoutStatus) GetCollateral() int64 { - if m != nil { - return m.Collateral - } - return 0 -} - -func (m *PayoutStatus) GetWithhold() int64 { - if m != nil { - return m.Withhold - } - return 0 -} - -func (m *PayoutStatus) GetPaidAmount() int64 { - if m != nil { - return m.PaidAmount - } - return 0 -} - -func (m *PayoutStatus) GetNumPaid() int32 { - if m != nil { - return m.NumPaid - } - return 0 -} - -func (m *PayoutStatus) GetLeftAmount() int64 { - if m != nil { - return m.LeftAmount - } - return 0 -} - -func (m *PayoutStatus) GetNumLeft() int32 { - if m != nil { - return m.NumLeft - } - return 0 -} - -func (m *PayoutStatus) GetNextAmount() int64 { - if m != nil { - return m.NextAmount - } - return 0 -} - -func (m *PayoutStatus) GetLastPayoutTime() time.Time { - if m != nil { - return m.LastPayoutTime - } - return time.Time{} -} - -func (m *PayoutStatus) GetNextPayoutTime() time.Time { - if m != nil { - return m.NextPayoutTime - } - return time.Time{} -} - -func (m *PayoutStatus) GetEscrowAddress() []byte { - if m != nil { - return m.EscrowAddress - } - return nil -} - -func (m *PayoutStatus) GetEscrowSignTime() time.Time { - if m != nil { - return m.EscrowSignTime - } - return time.Time{} -} - -func (m *PayoutStatus) GetErrorMsg() string { - if m != nil { - return m.ErrorMsg - } - return "" -} - -func (m *PayoutStatus) GetLastModifyTime() time.Time { - if m != nil { - return m.LastModifyTime - } - return time.Time{} -} - -func (*PayoutStatus) XXX_MessageName() string { - return "escrow.PayoutStatus" -} - -type SignedPayoutStatus struct { - Status *PayoutStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty" pg:"status"` - EscrowSignature []byte `protobuf:"bytes,2,opt,name=escrow_signature,json=escrowSignature,proto3" json:"escrow_signature,omitempty" pg:"escrow_signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SignedPayoutStatus) Reset() { *m = SignedPayoutStatus{} } -func (m *SignedPayoutStatus) String() string { return proto.CompactTextString(m) } -func (*SignedPayoutStatus) ProtoMessage() {} -func (*SignedPayoutStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{20} -} -func (m *SignedPayoutStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignedPayoutStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignedPayoutStatus.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SignedPayoutStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedPayoutStatus.Merge(m, src) -} -func (m *SignedPayoutStatus) XXX_Size() int { - return m.Size() -} -func (m *SignedPayoutStatus) XXX_DiscardUnknown() { - xxx_messageInfo_SignedPayoutStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_SignedPayoutStatus proto.InternalMessageInfo - -func (m *SignedPayoutStatus) GetStatus() *PayoutStatus { - if m != nil { - return m.Status - } - return nil -} - -func (m *SignedPayoutStatus) GetEscrowSignature() []byte { - if m != nil { - return m.EscrowSignature - } - return nil -} - -func (*SignedPayoutStatus) XXX_MessageName() string { - return "escrow.SignedPayoutStatus" -} - -type SignedPayoutStatusBatch struct { - Status []*PayoutStatus `protobuf:"bytes,1,rep,name=status,proto3" json:"status,omitempty" pg:"status"` - EscrowSignature []byte `protobuf:"bytes,2,opt,name=escrow_signature,json=escrowSignature,proto3" json:"escrow_signature,omitempty" pg:"escrow_signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SignedPayoutStatusBatch) Reset() { *m = SignedPayoutStatusBatch{} } -func (m *SignedPayoutStatusBatch) String() string { return proto.CompactTextString(m) } -func (*SignedPayoutStatusBatch) ProtoMessage() {} -func (*SignedPayoutStatusBatch) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{21} -} -func (m *SignedPayoutStatusBatch) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignedPayoutStatusBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignedPayoutStatusBatch.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SignedPayoutStatusBatch) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedPayoutStatusBatch.Merge(m, src) -} -func (m *SignedPayoutStatusBatch) XXX_Size() int { - return m.Size() -} -func (m *SignedPayoutStatusBatch) XXX_DiscardUnknown() { - xxx_messageInfo_SignedPayoutStatusBatch.DiscardUnknown(m) -} - -var xxx_messageInfo_SignedPayoutStatusBatch proto.InternalMessageInfo - -func (m *SignedPayoutStatusBatch) GetStatus() []*PayoutStatus { - if m != nil { - return m.Status - } - return nil -} - -func (m *SignedPayoutStatusBatch) GetEscrowSignature() []byte { - if m != nil { - return m.EscrowSignature - } - return nil -} - -func (*SignedPayoutStatusBatch) XXX_MessageName() string { - return "escrow.SignedPayoutStatusBatch" -} - -type CancelContractRequest struct { - ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty" pg:"contract_id"` - AuthAddress []byte `protobuf:"bytes,2,opt,name=auth_address,json=authAddress,proto3" json:"auth_address,omitempty" pg:"auth_address"` - AuthSignedTime time.Time `protobuf:"bytes,3,opt,name=auth_signed_time,json=authSignedTime,proto3,stdtime" json:"auth_signed_time" pg:"auth_signed_time"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *CancelContractRequest) Reset() { *m = CancelContractRequest{} } -func (m *CancelContractRequest) String() string { return proto.CompactTextString(m) } -func (*CancelContractRequest) ProtoMessage() {} -func (*CancelContractRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{22} -} -func (m *CancelContractRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CancelContractRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CancelContractRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *CancelContractRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CancelContractRequest.Merge(m, src) -} -func (m *CancelContractRequest) XXX_Size() int { - return m.Size() -} -func (m *CancelContractRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CancelContractRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CancelContractRequest proto.InternalMessageInfo - -func (m *CancelContractRequest) GetContractId() string { - if m != nil { - return m.ContractId - } - return "" -} - -func (m *CancelContractRequest) GetAuthAddress() []byte { - if m != nil { - return m.AuthAddress - } - return nil -} - -func (m *CancelContractRequest) GetAuthSignedTime() time.Time { - if m != nil { - return m.AuthSignedTime - } - return time.Time{} -} - -func (*CancelContractRequest) XXX_MessageName() string { - return "escrow.CancelContractRequest" -} - -type SignedCancelRequest struct { - Request *CancelContractRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty" pg:"request"` - AuthSignature []byte `protobuf:"bytes,2,opt,name=auth_signature,json=authSignature,proto3" json:"auth_signature,omitempty" pg:"auth_signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SignedCancelRequest) Reset() { *m = SignedCancelRequest{} } -func (m *SignedCancelRequest) String() string { return proto.CompactTextString(m) } -func (*SignedCancelRequest) ProtoMessage() {} -func (*SignedCancelRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{23} -} -func (m *SignedCancelRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignedCancelRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignedCancelRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SignedCancelRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedCancelRequest.Merge(m, src) -} -func (m *SignedCancelRequest) XXX_Size() int { - return m.Size() -} -func (m *SignedCancelRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SignedCancelRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SignedCancelRequest proto.InternalMessageInfo - -func (m *SignedCancelRequest) GetRequest() *CancelContractRequest { - if m != nil { - return m.Request - } - return nil -} - -func (m *SignedCancelRequest) GetAuthSignature() []byte { - if m != nil { - return m.AuthSignature - } - return nil -} - -func (*SignedCancelRequest) XXX_MessageName() string { - return "escrow.SignedCancelRequest" -} - -type CancelContractResult struct { - ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty" pg:"contract_id"` - EscrowId int64 `protobuf:"varint,2,opt,name=escrow_id,json=escrowId,proto3" json:"escrow_id,omitempty" pg:"escrow_id"` - Canceled bool `protobuf:"varint,3,opt,name=canceled,proto3" json:"canceled,omitempty" pg:"canceled"` - EscrowAddress []byte `protobuf:"bytes,4,opt,name=escrow_address,json=escrowAddress,proto3" json:"escrow_address,omitempty" pg:"escrow_address"` - EscrowSignedTime time.Time `protobuf:"bytes,5,opt,name=escrow_signed_time,json=escrowSignedTime,proto3,stdtime" json:"escrow_signed_time" pg:"escrow_signed_time"` - Amount int64 `protobuf:"varint,6,opt,name=amount,proto3" json:"amount,omitempty" pg:"amount"` - Paid bool `protobuf:"varint,7,opt,name=paid,proto3" json:"paid,omitempty" pg:"paid"` - Reference string `protobuf:"bytes,8,opt,name=reference,proto3" json:"reference,omitempty" pg:"reference"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *CancelContractResult) Reset() { *m = CancelContractResult{} } -func (m *CancelContractResult) String() string { return proto.CompactTextString(m) } -func (*CancelContractResult) ProtoMessage() {} -func (*CancelContractResult) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{24} -} -func (m *CancelContractResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CancelContractResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CancelContractResult.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *CancelContractResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_CancelContractResult.Merge(m, src) -} -func (m *CancelContractResult) XXX_Size() int { - return m.Size() -} -func (m *CancelContractResult) XXX_DiscardUnknown() { - xxx_messageInfo_CancelContractResult.DiscardUnknown(m) -} - -var xxx_messageInfo_CancelContractResult proto.InternalMessageInfo - -func (m *CancelContractResult) GetContractId() string { - if m != nil { - return m.ContractId - } - return "" -} - -func (m *CancelContractResult) GetEscrowId() int64 { - if m != nil { - return m.EscrowId - } - return 0 -} - -func (m *CancelContractResult) GetCanceled() bool { - if m != nil { - return m.Canceled - } - return false -} - -func (m *CancelContractResult) GetEscrowAddress() []byte { - if m != nil { - return m.EscrowAddress - } - return nil -} - -func (m *CancelContractResult) GetEscrowSignedTime() time.Time { - if m != nil { - return m.EscrowSignedTime - } - return time.Time{} -} - -func (m *CancelContractResult) GetAmount() int64 { - if m != nil { - return m.Amount - } - return 0 -} - -func (m *CancelContractResult) GetPaid() bool { - if m != nil { - return m.Paid - } - return false -} - -func (m *CancelContractResult) GetReference() string { - if m != nil { - return m.Reference - } - return "" -} - -func (*CancelContractResult) XXX_MessageName() string { - return "escrow.CancelContractResult" -} - -type SignedCancelContractResult struct { - Result *CancelContractResult `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty" pg:"result"` - EscrowSignature []byte `protobuf:"bytes,2,opt,name=escrow_signature,json=escrowSignature,proto3" json:"escrow_signature,omitempty" pg:"escrow_signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SignedCancelContractResult) Reset() { *m = SignedCancelContractResult{} } -func (m *SignedCancelContractResult) String() string { return proto.CompactTextString(m) } -func (*SignedCancelContractResult) ProtoMessage() {} -func (*SignedCancelContractResult) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{25} -} -func (m *SignedCancelContractResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignedCancelContractResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignedCancelContractResult.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SignedCancelContractResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedCancelContractResult.Merge(m, src) -} -func (m *SignedCancelContractResult) XXX_Size() int { - return m.Size() -} -func (m *SignedCancelContractResult) XXX_DiscardUnknown() { - xxx_messageInfo_SignedCancelContractResult.DiscardUnknown(m) -} - -var xxx_messageInfo_SignedCancelContractResult proto.InternalMessageInfo - -func (m *SignedCancelContractResult) GetResult() *CancelContractResult { - if m != nil { - return m.Result - } - return nil -} - -func (m *SignedCancelContractResult) GetEscrowSignature() []byte { - if m != nil { - return m.EscrowSignature - } - return nil -} - -func (*SignedCancelContractResult) XXX_MessageName() string { - return "escrow.SignedCancelContractResult" -} - -type PayoutAddress struct { - ToAddress []byte `protobuf:"bytes,1,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty" pg:"to_address"` - SignedTime time.Time `protobuf:"bytes,2,opt,name=signed_time,json=signedTime,proto3,stdtime" json:"signed_time" pg:"signed_time"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *PayoutAddress) Reset() { *m = PayoutAddress{} } -func (m *PayoutAddress) String() string { return proto.CompactTextString(m) } -func (*PayoutAddress) ProtoMessage() {} -func (*PayoutAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{26} -} -func (m *PayoutAddress) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PayoutAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PayoutAddress.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *PayoutAddress) XXX_Merge(src proto.Message) { - xxx_messageInfo_PayoutAddress.Merge(m, src) -} -func (m *PayoutAddress) XXX_Size() int { - return m.Size() -} -func (m *PayoutAddress) XXX_DiscardUnknown() { - xxx_messageInfo_PayoutAddress.DiscardUnknown(m) -} - -var xxx_messageInfo_PayoutAddress proto.InternalMessageInfo - -func (m *PayoutAddress) GetToAddress() []byte { - if m != nil { - return m.ToAddress - } - return nil -} - -func (m *PayoutAddress) GetSignedTime() time.Time { - if m != nil { - return m.SignedTime - } - return time.Time{} -} - -func (*PayoutAddress) XXX_MessageName() string { - return "escrow.PayoutAddress" -} - -type SignedPayoutAddress struct { - Address *PayoutAddress `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" pg:"address"` - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SignedPayoutAddress) Reset() { *m = SignedPayoutAddress{} } -func (m *SignedPayoutAddress) String() string { return proto.CompactTextString(m) } -func (*SignedPayoutAddress) ProtoMessage() {} -func (*SignedPayoutAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{27} -} -func (m *SignedPayoutAddress) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignedPayoutAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignedPayoutAddress.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SignedPayoutAddress) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedPayoutAddress.Merge(m, src) -} -func (m *SignedPayoutAddress) XXX_Size() int { - return m.Size() -} -func (m *SignedPayoutAddress) XXX_DiscardUnknown() { - xxx_messageInfo_SignedPayoutAddress.DiscardUnknown(m) -} - -var xxx_messageInfo_SignedPayoutAddress proto.InternalMessageInfo - -func (m *SignedPayoutAddress) GetAddress() *PayoutAddress { - if m != nil { - return m.Address - } - return nil -} - -func (m *SignedPayoutAddress) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (*SignedPayoutAddress) XXX_MessageName() string { - return "escrow.SignedPayoutAddress" -} - -type Payment struct { - ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty" pg:"contract_id"` - EscrowId int64 `protobuf:"varint,2,opt,name=escrow_id,json=escrowId,proto3" json:"escrow_id,omitempty" pg:"escrow_id"` - FromAddress []byte `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty" pg:"from_address"` - ToAddress []byte `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty" pg:"to_address"` - Amount int64 `protobuf:"varint,5,opt,name=amount,proto3" json:"amount,omitempty" pg:"amount"` - Index int32 `protobuf:"varint,6,opt,name=index,proto3" json:"index,omitempty" pg:"index"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Payment) Reset() { *m = Payment{} } -func (m *Payment) String() string { return proto.CompactTextString(m) } -func (*Payment) ProtoMessage() {} -func (*Payment) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{28} -} -func (m *Payment) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Payment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Payment.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Payment) XXX_Merge(src proto.Message) { - xxx_messageInfo_Payment.Merge(m, src) -} -func (m *Payment) XXX_Size() int { - return m.Size() -} -func (m *Payment) XXX_DiscardUnknown() { - xxx_messageInfo_Payment.DiscardUnknown(m) -} - -var xxx_messageInfo_Payment proto.InternalMessageInfo - -func (m *Payment) GetContractId() string { - if m != nil { - return m.ContractId - } - return "" -} - -func (m *Payment) GetEscrowId() int64 { - if m != nil { - return m.EscrowId - } - return 0 -} - -func (m *Payment) GetFromAddress() []byte { - if m != nil { - return m.FromAddress - } - return nil -} - -func (m *Payment) GetToAddress() []byte { - if m != nil { - return m.ToAddress - } - return nil -} - -func (m *Payment) GetAmount() int64 { - if m != nil { - return m.Amount - } - return 0 -} - -func (m *Payment) GetIndex() int32 { - if m != nil { - return m.Index - } - return 0 -} - -func (*Payment) XXX_MessageName() string { - return "escrow.Payment" -} - -type PaymentResult struct { - Payment []*Payment `protobuf:"bytes,1,rep,name=payment,proto3" json:"payment,omitempty" pg:"payment"` - EscrowAddress []byte `protobuf:"bytes,2,opt,name=escrow_address,json=escrowAddress,proto3" json:"escrow_address,omitempty" pg:"escrow_address"` - EscrowSignedTime time.Time `protobuf:"bytes,3,opt,name=escrow_signed_time,json=escrowSignedTime,proto3,stdtime" json:"escrow_signed_time" pg:"escrow_signed_time"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *PaymentResult) Reset() { *m = PaymentResult{} } -func (m *PaymentResult) String() string { return proto.CompactTextString(m) } -func (*PaymentResult) ProtoMessage() {} -func (*PaymentResult) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{29} -} -func (m *PaymentResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PaymentResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PaymentResult.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *PaymentResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_PaymentResult.Merge(m, src) -} -func (m *PaymentResult) XXX_Size() int { - return m.Size() -} -func (m *PaymentResult) XXX_DiscardUnknown() { - xxx_messageInfo_PaymentResult.DiscardUnknown(m) -} - -var xxx_messageInfo_PaymentResult proto.InternalMessageInfo - -func (m *PaymentResult) GetPayment() []*Payment { - if m != nil { - return m.Payment - } - return nil -} - -func (m *PaymentResult) GetEscrowAddress() []byte { - if m != nil { - return m.EscrowAddress - } - return nil -} - -func (m *PaymentResult) GetEscrowSignedTime() time.Time { - if m != nil { - return m.EscrowSignedTime - } - return time.Time{} -} - -func (*PaymentResult) XXX_MessageName() string { - return "escrow.PaymentResult" -} - -type SignedPaymentResult struct { - Result *PaymentResult `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty" pg:"result"` - EscrowSignature []byte `protobuf:"bytes,2,opt,name=escrow_signature,json=escrowSignature,proto3" json:"escrow_signature,omitempty" pg:"escrow_signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SignedPaymentResult) Reset() { *m = SignedPaymentResult{} } -func (m *SignedPaymentResult) String() string { return proto.CompactTextString(m) } -func (*SignedPaymentResult) ProtoMessage() {} -func (*SignedPaymentResult) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{30} -} -func (m *SignedPaymentResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignedPaymentResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignedPaymentResult.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SignedPaymentResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedPaymentResult.Merge(m, src) -} -func (m *SignedPaymentResult) XXX_Size() int { - return m.Size() -} -func (m *SignedPaymentResult) XXX_DiscardUnknown() { - xxx_messageInfo_SignedPaymentResult.DiscardUnknown(m) -} - -var xxx_messageInfo_SignedPaymentResult proto.InternalMessageInfo - -func (m *SignedPaymentResult) GetResult() *PaymentResult { - if m != nil { - return m.Result - } - return nil -} - -func (m *SignedPaymentResult) GetEscrowSignature() []byte { - if m != nil { - return m.EscrowSignature - } - return nil -} - -func (*SignedPaymentResult) XXX_MessageName() string { - return "escrow.SignedPaymentResult" -} - -type BalanceResult struct { - Balance int64 `protobuf:"varint,1,opt,name=balance,proto3" json:"balance,omitempty" pg:"balance"` - EscrowAddress []byte `protobuf:"bytes,2,opt,name=escrow_address,json=escrowAddress,proto3" json:"escrow_address,omitempty" pg:"escrow_address"` - EscrowSignedTime time.Time `protobuf:"bytes,3,opt,name=escrow_signed_time,json=escrowSignedTime,proto3,stdtime" json:"escrow_signed_time" pg:"escrow_signed_time"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *BalanceResult) Reset() { *m = BalanceResult{} } -func (m *BalanceResult) String() string { return proto.CompactTextString(m) } -func (*BalanceResult) ProtoMessage() {} -func (*BalanceResult) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{31} -} -func (m *BalanceResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BalanceResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BalanceResult.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BalanceResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_BalanceResult.Merge(m, src) -} -func (m *BalanceResult) XXX_Size() int { - return m.Size() -} -func (m *BalanceResult) XXX_DiscardUnknown() { - xxx_messageInfo_BalanceResult.DiscardUnknown(m) -} - -var xxx_messageInfo_BalanceResult proto.InternalMessageInfo - -func (m *BalanceResult) GetBalance() int64 { - if m != nil { - return m.Balance - } - return 0 -} - -func (m *BalanceResult) GetEscrowAddress() []byte { - if m != nil { - return m.EscrowAddress - } - return nil -} - -func (m *BalanceResult) GetEscrowSignedTime() time.Time { - if m != nil { - return m.EscrowSignedTime - } - return time.Time{} -} - -func (*BalanceResult) XXX_MessageName() string { - return "escrow.BalanceResult" -} - -type SignedBalanceResult struct { - Result *BalanceResult `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty" pg:"result"` - EscrowSignature []byte `protobuf:"bytes,2,opt,name=escrow_signature,json=escrowSignature,proto3" json:"escrow_signature,omitempty" pg:"escrow_signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SignedBalanceResult) Reset() { *m = SignedBalanceResult{} } -func (m *SignedBalanceResult) String() string { return proto.CompactTextString(m) } -func (*SignedBalanceResult) ProtoMessage() {} -func (*SignedBalanceResult) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{32} -} -func (m *SignedBalanceResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignedBalanceResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignedBalanceResult.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SignedBalanceResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedBalanceResult.Merge(m, src) -} -func (m *SignedBalanceResult) XXX_Size() int { - return m.Size() -} -func (m *SignedBalanceResult) XXX_DiscardUnknown() { - xxx_messageInfo_SignedBalanceResult.DiscardUnknown(m) -} - -var xxx_messageInfo_SignedBalanceResult proto.InternalMessageInfo - -func (m *SignedBalanceResult) GetResult() *BalanceResult { - if m != nil { - return m.Result - } - return nil -} - -func (m *SignedBalanceResult) GetEscrowSignature() []byte { - if m != nil { - return m.EscrowSignature - } - return nil -} - -func (*SignedBalanceResult) XXX_MessageName() string { - return "escrow.SignedBalanceResult" -} - -type SignedStakeRequest struct { - Data *StakeRequest `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty" pg:"data"` - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SignedStakeRequest) Reset() { *m = SignedStakeRequest{} } -func (m *SignedStakeRequest) String() string { return proto.CompactTextString(m) } -func (*SignedStakeRequest) ProtoMessage() {} -func (*SignedStakeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{33} -} -func (m *SignedStakeRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignedStakeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignedStakeRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SignedStakeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedStakeRequest.Merge(m, src) -} -func (m *SignedStakeRequest) XXX_Size() int { - return m.Size() -} -func (m *SignedStakeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SignedStakeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SignedStakeRequest proto.InternalMessageInfo - -func (m *SignedStakeRequest) GetData() *StakeRequest { - if m != nil { - return m.Data - } - return nil -} - -func (m *SignedStakeRequest) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (*SignedStakeRequest) XXX_MessageName() string { - return "escrow.SignedStakeRequest" -} - -type StakeRequest struct { - StakerId string `protobuf:"bytes,1,opt,name=staker_id,json=stakerId,proto3" json:"staker_id,omitempty" pg:"staker_id"` - StakeAmount int64 `protobuf:"varint,2,opt,name=stake_amount,json=stakeAmount,proto3" json:"stake_amount,omitempty" pg:"stake_amount"` - TransferRequest *ledger.SignedTransferRequest `protobuf:"bytes,3,opt,name=transfer_request,json=transferRequest,proto3" json:"transfer_request,omitempty" pg:"transfer_request"` - RequestTime time.Time `protobuf:"bytes,4,opt,name=request_time,json=requestTime,proto3,stdtime" json:"request_time" pg:"request_time"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *StakeRequest) Reset() { *m = StakeRequest{} } -func (m *StakeRequest) String() string { return proto.CompactTextString(m) } -func (*StakeRequest) ProtoMessage() {} -func (*StakeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{34} -} -func (m *StakeRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StakeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StakeRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *StakeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_StakeRequest.Merge(m, src) -} -func (m *StakeRequest) XXX_Size() int { - return m.Size() -} -func (m *StakeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_StakeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_StakeRequest proto.InternalMessageInfo - -func (m *StakeRequest) GetStakerId() string { - if m != nil { - return m.StakerId - } - return "" -} - -func (m *StakeRequest) GetStakeAmount() int64 { - if m != nil { - return m.StakeAmount - } - return 0 -} - -func (m *StakeRequest) GetTransferRequest() *ledger.SignedTransferRequest { - if m != nil { - return m.TransferRequest - } - return nil -} - -func (m *StakeRequest) GetRequestTime() time.Time { - if m != nil { - return m.RequestTime - } - return time.Time{} -} - -func (*StakeRequest) XXX_MessageName() string { - return "escrow.StakeRequest" -} - -type StakeResult struct { - StakerId string `protobuf:"bytes,1,opt,name=staker_id,json=stakerId,proto3" json:"staker_id,omitempty" pg:"staker_id"` - Balance int64 `protobuf:"varint,2,opt,name=balance,proto3" json:"balance,omitempty" pg:"balance"` - MatureAmount int64 `protobuf:"varint,3,opt,name=mature_amount,json=matureAmount,proto3" json:"mature_amount,omitempty" pg:"mature_amount"` - PendingAmount int64 `protobuf:"varint,4,opt,name=pending_amount,json=pendingAmount,proto3" json:"pending_amount,omitempty" pg:"pending_amount"` - Ledgers []*StakeLedger `protobuf:"bytes,5,rep,name=ledgers,proto3" json:"ledgers,omitempty" pg:"ledgers"` - UnfinishLedgers []*UnfinishStakeLedger `protobuf:"bytes,6,rep,name=unfinish_ledgers,json=unfinishLedgers,proto3" json:"unfinish_ledgers,omitempty" pg:"unfinish_ledgers"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *StakeResult) Reset() { *m = StakeResult{} } -func (m *StakeResult) String() string { return proto.CompactTextString(m) } -func (*StakeResult) ProtoMessage() {} -func (*StakeResult) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{35} -} -func (m *StakeResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StakeResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StakeResult.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *StakeResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_StakeResult.Merge(m, src) -} -func (m *StakeResult) XXX_Size() int { - return m.Size() -} -func (m *StakeResult) XXX_DiscardUnknown() { - xxx_messageInfo_StakeResult.DiscardUnknown(m) -} - -var xxx_messageInfo_StakeResult proto.InternalMessageInfo - -func (m *StakeResult) GetStakerId() string { - if m != nil { - return m.StakerId - } - return "" -} - -func (m *StakeResult) GetBalance() int64 { - if m != nil { - return m.Balance - } - return 0 -} - -func (m *StakeResult) GetMatureAmount() int64 { - if m != nil { - return m.MatureAmount - } - return 0 -} - -func (m *StakeResult) GetPendingAmount() int64 { - if m != nil { - return m.PendingAmount - } - return 0 -} - -func (m *StakeResult) GetLedgers() []*StakeLedger { - if m != nil { - return m.Ledgers - } - return nil -} - -func (m *StakeResult) GetUnfinishLedgers() []*UnfinishStakeLedger { - if m != nil { - return m.UnfinishLedgers - } - return nil -} - -func (*StakeResult) XXX_MessageName() string { - return "escrow.StakeResult" -} - -type SignedStakeResult struct { - Data *StakeResult `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty" pg:"data"` - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SignedStakeResult) Reset() { *m = SignedStakeResult{} } -func (m *SignedStakeResult) String() string { return proto.CompactTextString(m) } -func (*SignedStakeResult) ProtoMessage() {} -func (*SignedStakeResult) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{36} -} -func (m *SignedStakeResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignedStakeResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignedStakeResult.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SignedStakeResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedStakeResult.Merge(m, src) -} -func (m *SignedStakeResult) XXX_Size() int { - return m.Size() -} -func (m *SignedStakeResult) XXX_DiscardUnknown() { - xxx_messageInfo_SignedStakeResult.DiscardUnknown(m) -} - -var xxx_messageInfo_SignedStakeResult proto.InternalMessageInfo - -func (m *SignedStakeResult) GetData() *StakeResult { - if m != nil { - return m.Data - } - return nil -} - -func (m *SignedStakeResult) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (*SignedStakeResult) XXX_MessageName() string { - return "escrow.SignedStakeResult" -} - -type StakeLedger struct { - StakerId string `protobuf:"bytes,1,opt,name=staker_id,json=stakerId,proto3" json:"staker_id,omitempty" pg:"staker_id"` - Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty" pg:"amount"` - StartTime time.Time `protobuf:"bytes,3,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time" pg:"start_time"` - MatureTime time.Time `protobuf:"bytes,4,opt,name=mature_time,json=matureTime,proto3,stdtime" json:"mature_time" pg:"mature_time"` - OperatorId string `protobuf:"bytes,5,opt,name=operator_id,json=operatorId,proto3" json:"operator_id,omitempty" pg:"operator_id"` - Type OperationType `protobuf:"varint,6,opt,name=type,proto3,enum=escrow.OperationType" json:"type,omitempty" pg:"type"` - OperationLog string `protobuf:"bytes,7,opt,name=operation_log,json=operationLog,proto3" json:"operation_log,omitempty" pg:"operation_log"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *StakeLedger) Reset() { *m = StakeLedger{} } -func (m *StakeLedger) String() string { return proto.CompactTextString(m) } -func (*StakeLedger) ProtoMessage() {} -func (*StakeLedger) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{37} -} -func (m *StakeLedger) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StakeLedger) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StakeLedger.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *StakeLedger) XXX_Merge(src proto.Message) { - xxx_messageInfo_StakeLedger.Merge(m, src) -} -func (m *StakeLedger) XXX_Size() int { - return m.Size() -} -func (m *StakeLedger) XXX_DiscardUnknown() { - xxx_messageInfo_StakeLedger.DiscardUnknown(m) -} - -var xxx_messageInfo_StakeLedger proto.InternalMessageInfo - -func (m *StakeLedger) GetStakerId() string { - if m != nil { - return m.StakerId - } - return "" -} - -func (m *StakeLedger) GetAmount() int64 { - if m != nil { - return m.Amount - } - return 0 -} - -func (m *StakeLedger) GetStartTime() time.Time { - if m != nil { - return m.StartTime - } - return time.Time{} -} - -func (m *StakeLedger) GetMatureTime() time.Time { - if m != nil { - return m.MatureTime - } - return time.Time{} -} - -func (m *StakeLedger) GetOperatorId() string { - if m != nil { - return m.OperatorId - } - return "" -} - -func (m *StakeLedger) GetType() OperationType { - if m != nil { - return m.Type - } - return OperationType_STAKE -} - -func (m *StakeLedger) GetOperationLog() string { - if m != nil { - return m.OperationLog - } - return "" -} - -func (*StakeLedger) XXX_MessageName() string { - return "escrow.StakeLedger" -} - -type UnfinishStakeLedger struct { - StakerId string `protobuf:"bytes,1,opt,name=staker_id,json=stakerId,proto3" json:"staker_id,omitempty" pg:"staker_id"` - Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty" pg:"amount"` - Status StakeStatus `protobuf:"varint,3,opt,name=status,proto3,enum=escrow.StakeStatus" json:"status,omitempty" pg:"status"` - FailReason string `protobuf:"bytes,4,opt,name=fail_reason,json=failReason,proto3" json:"fail_reason,omitempty" pg:"fail_reason"` - SubmitTime time.Time `protobuf:"bytes,5,opt,name=submit_time,json=submitTime,proto3,stdtime" json:"submit_time" pg:"submit_time"` - FailTime time.Time `protobuf:"bytes,6,opt,name=fail_time,json=failTime,proto3,stdtime" json:"fail_time" pg:"fail_time"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *UnfinishStakeLedger) Reset() { *m = UnfinishStakeLedger{} } -func (m *UnfinishStakeLedger) String() string { return proto.CompactTextString(m) } -func (*UnfinishStakeLedger) ProtoMessage() {} -func (*UnfinishStakeLedger) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{38} -} -func (m *UnfinishStakeLedger) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UnfinishStakeLedger) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UnfinishStakeLedger.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *UnfinishStakeLedger) XXX_Merge(src proto.Message) { - xxx_messageInfo_UnfinishStakeLedger.Merge(m, src) -} -func (m *UnfinishStakeLedger) XXX_Size() int { - return m.Size() -} -func (m *UnfinishStakeLedger) XXX_DiscardUnknown() { - xxx_messageInfo_UnfinishStakeLedger.DiscardUnknown(m) -} - -var xxx_messageInfo_UnfinishStakeLedger proto.InternalMessageInfo - -func (m *UnfinishStakeLedger) GetStakerId() string { - if m != nil { - return m.StakerId - } - return "" -} - -func (m *UnfinishStakeLedger) GetAmount() int64 { - if m != nil { - return m.Amount - } - return 0 -} - -func (m *UnfinishStakeLedger) GetStatus() StakeStatus { - if m != nil { - return m.Status - } - return StakeStatus_PROCEEDING -} - -func (m *UnfinishStakeLedger) GetFailReason() string { - if m != nil { - return m.FailReason - } - return "" -} - -func (m *UnfinishStakeLedger) GetSubmitTime() time.Time { - if m != nil { - return m.SubmitTime - } - return time.Time{} -} - -func (m *UnfinishStakeLedger) GetFailTime() time.Time { - if m != nil { - return m.FailTime - } - return time.Time{} -} - -func (*UnfinishStakeLedger) XXX_MessageName() string { - return "escrow.UnfinishStakeLedger" -} - -type SignedStakePenaltyRequest struct { - Data *StakePenaltyRequest `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty" pg:"data"` - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SignedStakePenaltyRequest) Reset() { *m = SignedStakePenaltyRequest{} } -func (m *SignedStakePenaltyRequest) String() string { return proto.CompactTextString(m) } -func (*SignedStakePenaltyRequest) ProtoMessage() {} -func (*SignedStakePenaltyRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{39} -} -func (m *SignedStakePenaltyRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignedStakePenaltyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignedStakePenaltyRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SignedStakePenaltyRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedStakePenaltyRequest.Merge(m, src) -} -func (m *SignedStakePenaltyRequest) XXX_Size() int { - return m.Size() -} -func (m *SignedStakePenaltyRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SignedStakePenaltyRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SignedStakePenaltyRequest proto.InternalMessageInfo - -func (m *SignedStakePenaltyRequest) GetData() *StakePenaltyRequest { - if m != nil { - return m.Data - } - return nil -} - -func (m *SignedStakePenaltyRequest) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (*SignedStakePenaltyRequest) XXX_MessageName() string { - return "escrow.SignedStakePenaltyRequest" -} - -type StakePenaltyRequest struct { - StakerId string `protobuf:"bytes,1,opt,name=staker_id,json=stakerId,proto3" json:"staker_id,omitempty" pg:"staker_id"` - OperatorId string `protobuf:"bytes,2,opt,name=operator_id,json=operatorId,proto3" json:"operator_id,omitempty" pg:"operator_id"` - Reason OperationType `protobuf:"varint,3,opt,name=reason,proto3,enum=escrow.OperationType" json:"reason,omitempty" pg:"reason"` - OperationLog string `protobuf:"bytes,4,opt,name=operation_log,json=operationLog,proto3" json:"operation_log,omitempty" pg:"operation_log"` - Amount int64 `protobuf:"varint,5,opt,name=amount,proto3" json:"amount,omitempty" pg:"amount"` - SubmitTime time.Time `protobuf:"bytes,6,opt,name=submit_time,json=submitTime,proto3,stdtime" json:"submit_time" pg:"submit_time"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *StakePenaltyRequest) Reset() { *m = StakePenaltyRequest{} } -func (m *StakePenaltyRequest) String() string { return proto.CompactTextString(m) } -func (*StakePenaltyRequest) ProtoMessage() {} -func (*StakePenaltyRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{40} -} -func (m *StakePenaltyRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StakePenaltyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StakePenaltyRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *StakePenaltyRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_StakePenaltyRequest.Merge(m, src) -} -func (m *StakePenaltyRequest) XXX_Size() int { - return m.Size() -} -func (m *StakePenaltyRequest) XXX_DiscardUnknown() { - xxx_messageInfo_StakePenaltyRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_StakePenaltyRequest proto.InternalMessageInfo - -func (m *StakePenaltyRequest) GetStakerId() string { - if m != nil { - return m.StakerId - } - return "" -} - -func (m *StakePenaltyRequest) GetOperatorId() string { - if m != nil { - return m.OperatorId - } - return "" -} - -func (m *StakePenaltyRequest) GetReason() OperationType { - if m != nil { - return m.Reason - } - return OperationType_STAKE -} - -func (m *StakePenaltyRequest) GetOperationLog() string { - if m != nil { - return m.OperationLog - } - return "" -} - -func (m *StakePenaltyRequest) GetAmount() int64 { - if m != nil { - return m.Amount - } - return 0 -} - -func (m *StakePenaltyRequest) GetSubmitTime() time.Time { - if m != nil { - return m.SubmitTime - } - return time.Time{} -} - -func (*StakePenaltyRequest) XXX_MessageName() string { - return "escrow.StakePenaltyRequest" -} - -type StakePenaltyResult struct { - StakerId string `protobuf:"bytes,1,opt,name=staker_id,json=stakerId,proto3" json:"staker_id,omitempty" pg:"staker_id"` - RequestPenaltyAmount int64 `protobuf:"varint,2,opt,name=request_penalty_amount,json=requestPenaltyAmount,proto3" json:"request_penalty_amount,omitempty" pg:"request_penalty_amount"` - OperatePenaltyAmount int64 `protobuf:"varint,3,opt,name=operate_penalty_amount,json=operatePenaltyAmount,proto3" json:"operate_penalty_amount,omitempty" pg:"operate_penalty_amount"` - OperatorId string `protobuf:"bytes,4,opt,name=operator_id,json=operatorId,proto3" json:"operator_id,omitempty" pg:"operator_id"` - ReceiveTime time.Time `protobuf:"bytes,5,opt,name=receive_time,json=receiveTime,proto3,stdtime" json:"receive_time" pg:"receive_time"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *StakePenaltyResult) Reset() { *m = StakePenaltyResult{} } -func (m *StakePenaltyResult) String() string { return proto.CompactTextString(m) } -func (*StakePenaltyResult) ProtoMessage() {} -func (*StakePenaltyResult) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{41} -} -func (m *StakePenaltyResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StakePenaltyResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StakePenaltyResult.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *StakePenaltyResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_StakePenaltyResult.Merge(m, src) -} -func (m *StakePenaltyResult) XXX_Size() int { - return m.Size() -} -func (m *StakePenaltyResult) XXX_DiscardUnknown() { - xxx_messageInfo_StakePenaltyResult.DiscardUnknown(m) -} - -var xxx_messageInfo_StakePenaltyResult proto.InternalMessageInfo - -func (m *StakePenaltyResult) GetStakerId() string { - if m != nil { - return m.StakerId - } - return "" -} - -func (m *StakePenaltyResult) GetRequestPenaltyAmount() int64 { - if m != nil { - return m.RequestPenaltyAmount - } - return 0 -} - -func (m *StakePenaltyResult) GetOperatePenaltyAmount() int64 { - if m != nil { - return m.OperatePenaltyAmount - } - return 0 -} - -func (m *StakePenaltyResult) GetOperatorId() string { - if m != nil { - return m.OperatorId - } - return "" -} - -func (m *StakePenaltyResult) GetReceiveTime() time.Time { - if m != nil { - return m.ReceiveTime - } - return time.Time{} -} - -func (*StakePenaltyResult) XXX_MessageName() string { - return "escrow.StakePenaltyResult" -} - -type SignedStakePenaltyResult struct { - Data *StakePenaltyResult `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty" pg:"data"` - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SignedStakePenaltyResult) Reset() { *m = SignedStakePenaltyResult{} } -func (m *SignedStakePenaltyResult) String() string { return proto.CompactTextString(m) } -func (*SignedStakePenaltyResult) ProtoMessage() {} -func (*SignedStakePenaltyResult) Descriptor() ([]byte, []int) { - return fileDescriptor_92a6463c7f7e20b5, []int{42} -} -func (m *SignedStakePenaltyResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignedStakePenaltyResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignedStakePenaltyResult.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SignedStakePenaltyResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedStakePenaltyResult.Merge(m, src) -} -func (m *SignedStakePenaltyResult) XXX_Size() int { - return m.Size() -} -func (m *SignedStakePenaltyResult) XXX_DiscardUnknown() { - xxx_messageInfo_SignedStakePenaltyResult.DiscardUnknown(m) -} - -var xxx_messageInfo_SignedStakePenaltyResult proto.InternalMessageInfo - -func (m *SignedStakePenaltyResult) GetData() *StakePenaltyResult { - if m != nil { - return m.Data - } - return nil -} - -func (m *SignedStakePenaltyResult) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (*SignedStakePenaltyResult) XXX_MessageName() string { - return "escrow.SignedStakePenaltyResult" -} -func init() { - proto.RegisterEnum("escrow.TokenType", TokenType_name, TokenType_value) - golang_proto.RegisterEnum("escrow.TokenType", TokenType_name, TokenType_value) - proto.RegisterEnum("escrow.Schedule", Schedule_name, Schedule_value) - golang_proto.RegisterEnum("escrow.Schedule", Schedule_name, Schedule_value) - proto.RegisterEnum("escrow.ContractType", ContractType_name, ContractType_value) - golang_proto.RegisterEnum("escrow.ContractType", ContractType_name, ContractType_value) - proto.RegisterEnum("escrow.EscrowStatus", EscrowStatus_name, EscrowStatus_value) - golang_proto.RegisterEnum("escrow.EscrowStatus", EscrowStatus_name, EscrowStatus_value) - proto.RegisterEnum("escrow.StakeStatus", StakeStatus_name, StakeStatus_value) - golang_proto.RegisterEnum("escrow.StakeStatus", StakeStatus_name, StakeStatus_value) - proto.RegisterEnum("escrow.OperationType", OperationType_name, OperationType_value) - golang_proto.RegisterEnum("escrow.OperationType", OperationType_name, OperationType_value) - proto.RegisterType((*ContractID)(nil), "escrow.ContractID") - golang_proto.RegisterType((*ContractID)(nil), "escrow.ContractID") - proto.RegisterType((*ContractIDBatch)(nil), "escrow.ContractIDBatch") - golang_proto.RegisterType((*ContractIDBatch)(nil), "escrow.ContractIDBatch") - proto.RegisterType((*SignedContractID)(nil), "escrow.SignedContractID") - golang_proto.RegisterType((*SignedContractID)(nil), "escrow.SignedContractID") - proto.RegisterType((*SignedContractIDBatch)(nil), "escrow.SignedContractIDBatch") - golang_proto.RegisterType((*SignedContractIDBatch)(nil), "escrow.SignedContractIDBatch") - proto.RegisterType((*SignedModifyContractIDBatch)(nil), "escrow.SignedModifyContractIDBatch") - golang_proto.RegisterType((*SignedModifyContractIDBatch)(nil), "escrow.SignedModifyContractIDBatch") - proto.RegisterType((*EscrowContract)(nil), "escrow.EscrowContract") - golang_proto.RegisterType((*EscrowContract)(nil), "escrow.EscrowContract") - proto.RegisterType((*SignedEscrowContract)(nil), "escrow.SignedEscrowContract") - golang_proto.RegisterType((*SignedEscrowContract)(nil), "escrow.SignedEscrowContract") - proto.RegisterType((*EscrowContractRequest)(nil), "escrow.EscrowContractRequest") - golang_proto.RegisterType((*EscrowContractRequest)(nil), "escrow.EscrowContractRequest") - proto.RegisterType((*Escrow)(nil), "escrow.Escrow") - golang_proto.RegisterType((*Escrow)(nil), "escrow.Escrow") - proto.RegisterType((*SubmitContractResult)(nil), "escrow.SubmitContractResult") - golang_proto.RegisterType((*SubmitContractResult)(nil), "escrow.SubmitContractResult") - proto.RegisterType((*SignedSubmitContractResult)(nil), "escrow.SignedSubmitContractResult") - golang_proto.RegisterType((*SignedSubmitContractResult)(nil), "escrow.SignedSubmitContractResult") - proto.RegisterType((*StartEscrowResult)(nil), "escrow.StartEscrowResult") - golang_proto.RegisterType((*StartEscrowResult)(nil), "escrow.StartEscrowResult") - proto.RegisterType((*SignedStartEscrowResult)(nil), "escrow.SignedStartEscrowResult") - golang_proto.RegisterType((*SignedStartEscrowResult)(nil), "escrow.SignedStartEscrowResult") - proto.RegisterType((*PayinRequest)(nil), "escrow.PayinRequest") - golang_proto.RegisterType((*PayinRequest)(nil), "escrow.PayinRequest") - proto.RegisterType((*SignedPayinRequest)(nil), "escrow.SignedPayinRequest") - golang_proto.RegisterType((*SignedPayinRequest)(nil), "escrow.SignedPayinRequest") - proto.RegisterType((*PayinResult)(nil), "escrow.PayinResult") - golang_proto.RegisterType((*PayinResult)(nil), "escrow.PayinResult") - proto.RegisterType((*SignedPayinResult)(nil), "escrow.SignedPayinResult") - golang_proto.RegisterType((*SignedPayinResult)(nil), "escrow.SignedPayinResult") - proto.RegisterType((*PayinStatus)(nil), "escrow.PayinStatus") - golang_proto.RegisterType((*PayinStatus)(nil), "escrow.PayinStatus") - proto.RegisterType((*SignedPayinStatus)(nil), "escrow.SignedPayinStatus") - golang_proto.RegisterType((*SignedPayinStatus)(nil), "escrow.SignedPayinStatus") - proto.RegisterType((*PayoutStatus)(nil), "escrow.PayoutStatus") - golang_proto.RegisterType((*PayoutStatus)(nil), "escrow.PayoutStatus") - proto.RegisterType((*SignedPayoutStatus)(nil), "escrow.SignedPayoutStatus") - golang_proto.RegisterType((*SignedPayoutStatus)(nil), "escrow.SignedPayoutStatus") - proto.RegisterType((*SignedPayoutStatusBatch)(nil), "escrow.SignedPayoutStatusBatch") - golang_proto.RegisterType((*SignedPayoutStatusBatch)(nil), "escrow.SignedPayoutStatusBatch") - proto.RegisterType((*CancelContractRequest)(nil), "escrow.CancelContractRequest") - golang_proto.RegisterType((*CancelContractRequest)(nil), "escrow.CancelContractRequest") - proto.RegisterType((*SignedCancelRequest)(nil), "escrow.SignedCancelRequest") - golang_proto.RegisterType((*SignedCancelRequest)(nil), "escrow.SignedCancelRequest") - proto.RegisterType((*CancelContractResult)(nil), "escrow.CancelContractResult") - golang_proto.RegisterType((*CancelContractResult)(nil), "escrow.CancelContractResult") - proto.RegisterType((*SignedCancelContractResult)(nil), "escrow.SignedCancelContractResult") - golang_proto.RegisterType((*SignedCancelContractResult)(nil), "escrow.SignedCancelContractResult") - proto.RegisterType((*PayoutAddress)(nil), "escrow.PayoutAddress") - golang_proto.RegisterType((*PayoutAddress)(nil), "escrow.PayoutAddress") - proto.RegisterType((*SignedPayoutAddress)(nil), "escrow.SignedPayoutAddress") - golang_proto.RegisterType((*SignedPayoutAddress)(nil), "escrow.SignedPayoutAddress") - proto.RegisterType((*Payment)(nil), "escrow.Payment") - golang_proto.RegisterType((*Payment)(nil), "escrow.Payment") - proto.RegisterType((*PaymentResult)(nil), "escrow.PaymentResult") - golang_proto.RegisterType((*PaymentResult)(nil), "escrow.PaymentResult") - proto.RegisterType((*SignedPaymentResult)(nil), "escrow.SignedPaymentResult") - golang_proto.RegisterType((*SignedPaymentResult)(nil), "escrow.SignedPaymentResult") - proto.RegisterType((*BalanceResult)(nil), "escrow.BalanceResult") - golang_proto.RegisterType((*BalanceResult)(nil), "escrow.BalanceResult") - proto.RegisterType((*SignedBalanceResult)(nil), "escrow.SignedBalanceResult") - golang_proto.RegisterType((*SignedBalanceResult)(nil), "escrow.SignedBalanceResult") - proto.RegisterType((*SignedStakeRequest)(nil), "escrow.SignedStakeRequest") - golang_proto.RegisterType((*SignedStakeRequest)(nil), "escrow.SignedStakeRequest") - proto.RegisterType((*StakeRequest)(nil), "escrow.StakeRequest") - golang_proto.RegisterType((*StakeRequest)(nil), "escrow.StakeRequest") - proto.RegisterType((*StakeResult)(nil), "escrow.StakeResult") - golang_proto.RegisterType((*StakeResult)(nil), "escrow.StakeResult") - proto.RegisterType((*SignedStakeResult)(nil), "escrow.SignedStakeResult") - golang_proto.RegisterType((*SignedStakeResult)(nil), "escrow.SignedStakeResult") - proto.RegisterType((*StakeLedger)(nil), "escrow.StakeLedger") - golang_proto.RegisterType((*StakeLedger)(nil), "escrow.StakeLedger") - proto.RegisterType((*UnfinishStakeLedger)(nil), "escrow.UnfinishStakeLedger") - golang_proto.RegisterType((*UnfinishStakeLedger)(nil), "escrow.UnfinishStakeLedger") - proto.RegisterType((*SignedStakePenaltyRequest)(nil), "escrow.SignedStakePenaltyRequest") - golang_proto.RegisterType((*SignedStakePenaltyRequest)(nil), "escrow.SignedStakePenaltyRequest") - proto.RegisterType((*StakePenaltyRequest)(nil), "escrow.StakePenaltyRequest") - golang_proto.RegisterType((*StakePenaltyRequest)(nil), "escrow.StakePenaltyRequest") - proto.RegisterType((*StakePenaltyResult)(nil), "escrow.StakePenaltyResult") - golang_proto.RegisterType((*StakePenaltyResult)(nil), "escrow.StakePenaltyResult") - proto.RegisterType((*SignedStakePenaltyResult)(nil), "escrow.SignedStakePenaltyResult") - golang_proto.RegisterType((*SignedStakePenaltyResult)(nil), "escrow.SignedStakePenaltyResult") -} - -func init() { proto.RegisterFile("protos/escrow/escrow.proto", fileDescriptor_92a6463c7f7e20b5) } -func init() { golang_proto.RegisterFile("protos/escrow/escrow.proto", fileDescriptor_92a6463c7f7e20b5) } - -var fileDescriptor_92a6463c7f7e20b5 = []byte{ - // 2661 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x3a, 0xcb, 0x6f, 0x33, 0x57, - 0xf5, 0x19, 0xbf, 0x7d, 0xfc, 0x9a, 0x4c, 0x1e, 0xf5, 0xe7, 0x34, 0x8f, 0xfa, 0x53, 0xdb, 0x34, - 0x5f, 0x9b, 0xb4, 0xf9, 0x55, 0x3f, 0x40, 0x02, 0x8a, 0xe3, 0xb8, 0xf9, 0x0c, 0x8e, 0x63, 0xc6, - 0xfe, 0x2a, 0x5a, 0x21, 0x59, 0x13, 0xcf, 0x8d, 0x33, 0xd4, 0x9e, 0x09, 0x33, 0xe3, 0xb6, 0x46, - 0x62, 0x0b, 0x5b, 0x10, 0x1b, 0xc4, 0x02, 0x21, 0xc4, 0x8e, 0x75, 0x01, 0x89, 0x05, 0x2c, 0xcb, - 0xae, 0x6b, 0x16, 0x3c, 0xda, 0x7f, 0x82, 0x25, 0xba, 0xe7, 0xde, 0x3b, 0x2f, 0x3b, 0x0f, 0xe7, - 0xab, 0xf8, 0xba, 0x8a, 0xe7, 0xdc, 0x73, 0xce, 0x3d, 0xf7, 0xbc, 0xcf, 0xbd, 0x81, 0xca, 0x95, - 0x6d, 0xb9, 0x96, 0x73, 0x40, 0x9c, 0x81, 0x6d, 0x7d, 0xc8, 0xff, 0xec, 0x23, 0x50, 0x49, 0xb1, - 0xaf, 0xca, 0xeb, 0x43, 0xc3, 0xbd, 0x9c, 0x9c, 0xef, 0x0f, 0xac, 0xf1, 0x81, 0x6b, 0x5b, 0xe6, - 0x6b, 0x13, 0xe7, 0x00, 0x31, 0xce, 0x27, 0x17, 0x07, 0x43, 0x6b, 0x68, 0xe1, 0x07, 0xfe, 0x62, - 0x94, 0x95, 0xed, 0xa1, 0x65, 0x0d, 0x47, 0xc4, 0xc7, 0x72, 0x8d, 0x31, 0x71, 0x5c, 0x6d, 0x7c, - 0xc5, 0x11, 0xc4, 0xb6, 0x23, 0xa2, 0x0f, 0x89, 0xcd, 0xff, 0xb0, 0xb5, 0xea, 0x09, 0x40, 0xdd, - 0x32, 0x5d, 0x5b, 0x1b, 0xb8, 0xcd, 0x63, 0x65, 0x1b, 0x72, 0x03, 0xfe, 0xd5, 0x37, 0xf4, 0xb2, - 0xb4, 0x23, 0xed, 0x66, 0x55, 0x10, 0xa0, 0xa6, 0xae, 0x94, 0x21, 0xad, 0xe9, 0xba, 0x4d, 0x1c, - 0xa7, 0x1c, 0xdb, 0x91, 0x76, 0xf3, 0xaa, 0xf8, 0xac, 0xb6, 0xa0, 0xe4, 0x33, 0x3a, 0xd2, 0xdc, - 0xc1, 0xe5, 0x2c, 0xb7, 0xf8, 0x9d, 0xb9, 0x7d, 0x0f, 0xe4, 0xae, 0x31, 0x34, 0x89, 0x1e, 0x10, - 0xee, 0x25, 0x48, 0xe8, 0x9a, 0xab, 0xa1, 0x54, 0xb9, 0x43, 0x65, 0x9f, 0xab, 0xcf, 0xc7, 0x50, - 0x71, 0x5d, 0x79, 0x1e, 0xb2, 0x8e, 0x31, 0x34, 0x35, 0x77, 0x62, 0x13, 0xce, 0xd7, 0x07, 0x54, - 0xcf, 0x61, 0x2d, 0xca, 0x99, 0x49, 0xfb, 0x28, 0xc4, 0xfe, 0xb9, 0x59, 0xf6, 0x88, 0x76, 0xa7, - 0x3d, 0xfe, 0x24, 0xc1, 0x06, 0xdb, 0xe4, 0xd4, 0xd2, 0x8d, 0x8b, 0xe9, 0x53, 0x6d, 0xd5, 0x06, - 0x79, 0xa4, 0x39, 0x6e, 0x7f, 0x8c, 0xac, 0xfa, 0xd4, 0xb8, 0xb8, 0x63, 0xee, 0xb0, 0xb2, 0xcf, - 0x2c, 0xbf, 0x2f, 0x2c, 0xbf, 0xdf, 0x13, 0x96, 0x3f, 0xca, 0x7c, 0xf2, 0x8f, 0xed, 0xa5, 0x9f, - 0xfd, 0x73, 0x5b, 0x52, 0x8b, 0x94, 0x9a, 0xc9, 0x41, 0x97, 0xc3, 0xa2, 0xc7, 0xa3, 0xa2, 0xff, - 0x2d, 0x01, 0xc5, 0x06, 0x8a, 0x23, 0xa4, 0xb9, 0xdd, 0x29, 0x1e, 0x42, 0xe1, 0x7c, 0x32, 0x25, - 0x76, 0x3f, 0x6c, 0xcc, 0x3c, 0x02, 0x6b, 0x0c, 0xa6, 0xbc, 0x08, 0x45, 0x87, 0x8c, 0x46, 0x01, - 0x2c, 0xb6, 0x77, 0x81, 0x41, 0x05, 0xda, 0x0b, 0x90, 0xd7, 0x26, 0xee, 0xa5, 0x87, 0x94, 0x40, - 0xa4, 0x1c, 0x85, 0x09, 0x94, 0x75, 0x48, 0x69, 0x63, 0x6b, 0x62, 0xba, 0xe5, 0xe4, 0x8e, 0xb4, - 0x1b, 0x57, 0xf9, 0x97, 0xf2, 0x08, 0x96, 0x07, 0xd6, 0x68, 0xa4, 0xb9, 0xc4, 0xd6, 0x46, 0x7d, - 0x8e, 0x92, 0x42, 0x14, 0xd9, 0x5f, 0xa8, 0x31, 0xe4, 0x97, 0xa1, 0xf4, 0xa1, 0xe1, 0x5e, 0x5e, - 0x5a, 0x23, 0x5d, 0xa0, 0xa6, 0x11, 0xb5, 0x28, 0xc0, 0x1c, 0xf1, 0x75, 0x00, 0xd7, 0x7a, 0x9f, - 0x98, 0x7d, 0x77, 0x7a, 0x45, 0xca, 0x99, 0x1d, 0x69, 0xb7, 0x78, 0xb8, 0x2c, 0x2c, 0xd6, 0xa3, - 0x2b, 0xbd, 0xe9, 0x15, 0x51, 0xb3, 0xae, 0xf8, 0xa9, 0x7c, 0x0d, 0x4a, 0x57, 0xda, 0xd4, 0x9a, - 0xb8, 0x7d, 0x67, 0x70, 0x49, 0xf4, 0xc9, 0x88, 0x94, 0xb3, 0x48, 0x26, 0x0b, 0xb2, 0x2e, 0x87, - 0xab, 0x45, 0x86, 0x28, 0xbe, 0xa9, 0xaa, 0xcd, 0xc9, 0xb8, 0xcf, 0xa0, 0x4e, 0x19, 0x76, 0xa4, - 0xdd, 0xa4, 0x0a, 0xe6, 0x64, 0xdc, 0x61, 0x10, 0x6a, 0x3c, 0x9b, 0x5c, 0x10, 0x9b, 0x98, 0x03, - 0x52, 0xce, 0x31, 0xe3, 0x79, 0x00, 0xe5, 0xff, 0xe1, 0xb9, 0xc1, 0xc4, 0x71, 0xad, 0xb1, 0xf1, - 0x23, 0xc2, 0x99, 0xf4, 0xaf, 0x88, 0x6d, 0x58, 0x7a, 0x39, 0x8f, 0xac, 0xd6, 0xbc, 0x65, 0xc6, - 0xb0, 0x83, 0x8b, 0xca, 0x2e, 0x24, 0xf0, 0x74, 0x05, 0x14, 0x73, 0x35, 0xea, 0x8f, 0x78, 0x40, - 0xc4, 0x60, 0x3a, 0x36, 0x5d, 0xc3, 0x1c, 0x12, 0xd3, 0x15, 0x8a, 0x2b, 0x0a, 0x1d, 0x8b, 0x05, - 0xa6, 0xba, 0xea, 0xaf, 0x25, 0x58, 0x65, 0x61, 0x10, 0xf1, 0xa8, 0x43, 0xc8, 0x08, 0xf7, 0xe1, - 0x31, 0xb0, 0x2e, 0xf6, 0x0c, 0x63, 0xaa, 0x1e, 0x1e, 0x35, 0x18, 0x73, 0xb2, 0x68, 0xdc, 0x15, - 0x11, 0xdc, 0x15, 0x50, 0xe5, 0x15, 0x90, 0xb9, 0xa3, 0x45, 0xdd, 0xbc, 0xc4, 0xe0, 0x1e, 0x6a, - 0xf5, 0x17, 0x12, 0xac, 0x45, 0x36, 0x24, 0x3f, 0x9c, 0x10, 0xc7, 0x55, 0xbe, 0x1a, 0x92, 0x30, - 0xbe, 0x9b, 0x3b, 0x7c, 0xde, 0x33, 0xde, 0x9c, 0x13, 0x05, 0xe4, 0xfc, 0x96, 0x08, 0x86, 0xc1, - 0xa5, 0x66, 0x9a, 0x64, 0xc4, 0x63, 0x75, 0x63, 0x9f, 0xa7, 0x5d, 0x9e, 0x7c, 0xd8, 0x62, 0xdd, - 0x1a, 0x8f, 0x0d, 0x97, 0x47, 0x0a, 0x87, 0x55, 0x7f, 0x1e, 0x83, 0x14, 0x63, 0x7f, 0x7b, 0xe8, - 0x6d, 0x40, 0x96, 0x89, 0x45, 0x97, 0x63, 0x68, 0x87, 0x0c, 0x03, 0x34, 0x75, 0x1a, 0x4b, 0x17, - 0xb6, 0x35, 0x8e, 0x04, 0x5c, 0x8e, 0xc2, 0x44, 0x2c, 0x6d, 0x52, 0xef, 0x8e, 0x04, 0x5b, 0xd6, - 0xb5, 0xbe, 0xd0, 0x50, 0xdb, 0x04, 0x20, 0xb6, 0x6d, 0xd9, 0xfd, 0x81, 0xa5, 0x13, 0x8c, 0xb2, - 0xa4, 0x9a, 0x45, 0x48, 0xdd, 0xd2, 0x09, 0xcd, 0x1e, 0x6c, 0x79, 0x4c, 0x1c, 0x47, 0x1b, 0xb2, - 0x18, 0xcb, 0xaa, 0x79, 0x04, 0x9e, 0x32, 0x58, 0xf5, 0x37, 0x31, 0x58, 0xed, 0x4e, 0xce, 0xc7, - 0x86, 0xeb, 0x5b, 0xca, 0x99, 0x8c, 0x5c, 0xe5, 0x01, 0x64, 0xae, 0xb4, 0xa9, 0x61, 0xfa, 0xea, - 0x49, 0xe3, 0x77, 0x53, 0x57, 0x5e, 0x02, 0x5e, 0x53, 0xcb, 0x31, 0xb4, 0x60, 0x31, 0xec, 0x63, - 0x2a, 0x5f, 0xa5, 0x99, 0x89, 0xeb, 0x30, 0x92, 0x99, 0x18, 0x54, 0xe8, 0x42, 0x05, 0x85, 0xa3, - 0x39, 0x68, 0x42, 0x96, 0x89, 0x13, 0x0b, 0x64, 0x62, 0x99, 0xd1, 0x33, 0x0f, 0xc0, 0x5c, 0xfc, - 0x6d, 0x58, 0x09, 0x39, 0x4b, 0xdf, 0x71, 0x35, 0x97, 0xa0, 0xb2, 0x29, 0xd3, 0x79, 0x2e, 0xd3, - 0xa5, 0x18, 0xea, 0x72, 0xd0, 0x63, 0x10, 0x54, 0xfd, 0x31, 0x54, 0x18, 0xe2, 0x5c, 0x3d, 0xbd, - 0x09, 0x29, 0x1b, 0x7f, 0xf1, 0x80, 0xf3, 0xdd, 0x79, 0x0e, 0xb6, 0xca, 0x71, 0x69, 0x2c, 0x05, - 0xce, 0x1c, 0x8c, 0xba, 0x92, 0x7f, 0x16, 0x16, 0x4b, 0x7f, 0x90, 0x60, 0xb9, 0xeb, 0x6a, 0xb6, - 0xcb, 0xb5, 0xcb, 0x18, 0xf8, 0x36, 0x90, 0x16, 0xb4, 0x41, 0xec, 0xee, 0x36, 0x88, 0x3f, 0x8d, - 0x0d, 0xaa, 0x1f, 0xc2, 0x73, 0x5c, 0x6f, 0x33, 0xd2, 0xbf, 0x11, 0x51, 0xda, 0x03, 0x4f, 0x69, - 0x51, 0xd4, 0xfb, 0x68, 0xec, 0x57, 0x12, 0xe4, 0x3b, 0xd4, 0x57, 0x45, 0xd2, 0xb9, 0xc1, 0x97, - 0xef, 0x54, 0x62, 0xaf, 0xf1, 0xa6, 0xf8, 0x7d, 0xbc, 0x69, 0x0c, 0x0a, 0x43, 0x0c, 0x49, 0xb8, - 0x0f, 0x69, 0x9b, 0xfd, 0xe4, 0x1a, 0xf1, 0x6a, 0x45, 0x10, 0x4d, 0x15, 0x48, 0x77, 0x4e, 0xda, - 0xd5, 0xbf, 0x4b, 0x90, 0xe3, 0x2c, 0x6e, 0x0b, 0x6b, 0x3f, 0x27, 0xc5, 0x42, 0x39, 0x69, 0x13, - 0x40, 0x9c, 0xdb, 0xd0, 0xf1, 0xd0, 0x71, 0x35, 0xcb, 0x21, 0x4d, 0x7d, 0x8e, 0x87, 0x25, 0xee, - 0xee, 0x61, 0xc9, 0xa7, 0xf2, 0xb0, 0xf7, 0x61, 0x39, 0xa4, 0x4b, 0x3c, 0xe1, 0xa3, 0x88, 0x6f, - 0xad, 0x44, 0x34, 0x79, 0x5f, 0xaf, 0xfa, 0xb3, 0xd0, 0x24, 0xb5, 0xe3, 0xc4, 0x51, 0x14, 0x48, - 0x5c, 0x69, 0x5c, 0x8b, 0x19, 0x15, 0x7f, 0x47, 0x54, 0x15, 0xbb, 0x5d, 0x55, 0xff, 0xab, 0x84, - 0x18, 0x51, 0x15, 0x3f, 0xc2, 0x23, 0x48, 0x39, 0xf8, 0x6b, 0xae, 0xaa, 0x18, 0x92, 0xca, 0x51, - 0x16, 0x51, 0xd5, 0xa7, 0x29, 0x0c, 0x40, 0xda, 0x80, 0x31, 0xda, 0x67, 0x5d, 0x6e, 0xa3, 0xcd, - 0x6f, 0x72, 0xb6, 0xf9, 0x7d, 0xd5, 0xd3, 0x45, 0x2a, 0xdc, 0xac, 0xb1, 0x6c, 0x14, 0x51, 0x86, - 0x1f, 0x2b, 0xe9, 0x50, 0xac, 0x6c, 0x01, 0xf8, 0x65, 0x1a, 0x0b, 0x6e, 0x5c, 0x0d, 0x40, 0x94, - 0x0a, 0x64, 0x44, 0x1b, 0x8c, 0xbd, 0x6b, 0x5c, 0xf5, 0xbe, 0xa9, 0x92, 0xa8, 0x13, 0x89, 0xaa, - 0x0f, 0x8c, 0x98, 0x82, 0x78, 0xbd, 0x7f, 0x00, 0x19, 0xd6, 0xc4, 0x1a, 0x3a, 0xb6, 0xa8, 0x49, - 0x35, 0x8d, 0x1d, 0xac, 0x81, 0xb4, 0x23, 0x72, 0xe1, 0x35, 0x8e, 0x79, 0x46, 0x4b, 0x41, 0x61, - 0x5a, 0x0a, 0xc1, 0x6e, 0x94, 0xd1, 0xb6, 0xc8, 0x05, 0x8e, 0x21, 0x26, 0xf9, 0x28, 0xd2, 0x74, - 0x02, 0x05, 0x71, 0x5a, 0x31, 0x28, 0xf1, 0xc6, 0x17, 0xbd, 0xb1, 0xb4, 0xe8, 0xa0, 0xc4, 0xfc, - 0x01, 0x8b, 0x73, 0x1b, 0x64, 0xdc, 0x30, 0xc8, 0x4f, 0x5e, 0x84, 0x1f, 0xa5, 0x0e, 0xf0, 0x9b, - 0x0d, 0xab, 0xe5, 0x79, 0x61, 0xd5, 0x0e, 0x39, 0x30, 0xdb, 0x56, 0x59, 0x64, 0x5b, 0xdf, 0xcd, - 0x71, 0x5b, 0xea, 0xb3, 0xac, 0xbf, 0x72, 0x86, 0xe5, 0x15, 0x74, 0xe9, 0x0c, 0xeb, 0xad, 0x9c, - 0xe1, 0xdc, 0xe1, 0x72, 0xf5, 0xfe, 0xc3, 0x65, 0xa8, 0x6c, 0xf8, 0x71, 0xf5, 0x6a, 0x24, 0x80, - 0x83, 0x55, 0xc3, 0xc3, 0xba, 0x4f, 0x04, 0xdb, 0xa2, 0x76, 0x07, 0x19, 0xb1, 0x19, 0x3b, 0xb8, - 0x67, 0xfc, 0x8b, 0xdc, 0xf3, 0xf7, 0x12, 0xac, 0xd5, 0x35, 0x73, 0x40, 0xbb, 0xf7, 0xf0, 0xd0, - 0x70, 0x6b, 0xfa, 0x88, 0xc6, 0x77, 0x6c, 0x36, 0xbe, 0xdb, 0x20, 0x23, 0xca, 0x7d, 0xfb, 0x9b, - 0x22, 0xa5, 0x0e, 0x24, 0xd4, 0x09, 0xac, 0xf0, 0x82, 0x8f, 0x22, 0x0b, 0x51, 0xbf, 0x12, 0x2d, - 0xe4, 0x9b, 0xde, 0xd0, 0x37, 0xef, 0x68, 0x7e, 0x45, 0x7f, 0x11, 0x8a, 0x9e, 0x7c, 0x41, 0x35, - 0x15, 0xc4, 0xbe, 0x4c, 0x49, 0x1f, 0xc7, 0x60, 0x35, 0xca, 0x09, 0x2b, 0xd9, 0xd3, 0xa5, 0xd8, - 0x0a, 0x64, 0x06, 0xc8, 0x95, 0xb0, 0x0a, 0x9f, 0x51, 0xbd, 0xef, 0x67, 0x58, 0xe0, 0x03, 0x69, - 0x36, 0x15, 0x4a, 0xb3, 0xa2, 0xf6, 0xa6, 0x03, 0xb5, 0x37, 0x34, 0xc1, 0xb3, 0x51, 0xc7, 0x07, - 0xf8, 0x4d, 0xfc, 0x5c, 0xe5, 0x5d, 0xdb, 0xc4, 0xcf, 0xc3, 0xbe, 0x4f, 0xf3, 0x30, 0x81, 0x02, - 0x0b, 0x8f, 0xf9, 0x05, 0x4b, 0x8a, 0x16, 0xac, 0x06, 0xe4, 0x82, 0x5a, 0x5c, 0xe4, 0x5a, 0x0a, - 0x1c, 0xdf, 0x49, 0x75, 0xe1, 0xa4, 0xe1, 0xcd, 0x0f, 0xfc, 0xeb, 0x41, 0x76, 0xde, 0xb5, 0x70, - 0x0c, 0x73, 0x3c, 0xef, 0xd6, 0xf0, 0x96, 0x5b, 0xb9, 0x3f, 0x4a, 0x90, 0xee, 0x68, 0xd3, 0x31, - 0x31, 0xdd, 0x2f, 0xed, 0x60, 0xbd, 0x0a, 0x49, 0xc3, 0xd4, 0xc9, 0x47, 0xe8, 0x48, 0x49, 0x95, - 0x7d, 0x54, 0x3f, 0x96, 0xd0, 0x2e, 0x54, 0x72, 0x55, 0xd8, 0x94, 0xf6, 0xc3, 0x14, 0xc0, 0xd3, - 0x5b, 0x29, 0xa0, 0x1a, 0xc4, 0x13, 0xeb, 0xcf, 0x72, 0xb4, 0xb2, 0x02, 0x76, 0x0d, 0x08, 0xff, - 0x5a, 0xc4, 0x8d, 0xd7, 0xa2, 0xb2, 0xdf, 0xdb, 0x7f, 0x7f, 0x27, 0x41, 0xe1, 0x48, 0x1b, 0xd1, - 0x68, 0xe0, 0x7b, 0x95, 0x21, 0x7d, 0xce, 0x00, 0xb8, 0x59, 0x5c, 0x15, 0x9f, 0x5f, 0x0a, 0xbd, - 0x84, 0x65, 0xbd, 0x56, 0x2f, 0x21, 0xb4, 0xfb, 0xe8, 0xe5, 0xfb, 0xa2, 0x2c, 0x77, 0x5d, 0xed, - 0x7d, 0x22, 0x8a, 0xc0, 0x6e, 0xe8, 0x1a, 0x7a, 0x35, 0x30, 0xdc, 0x7a, 0x38, 0x77, 0xba, 0xee, - 0xfe, 0xb7, 0x04, 0xf9, 0x10, 0xe3, 0x0d, 0xc8, 0x3a, 0xf4, 0xdb, 0xf6, 0x63, 0x2b, 0xc3, 0x00, - 0x2c, 0x78, 0xf0, 0x77, 0x3f, 0x34, 0xc5, 0xe5, 0x10, 0xc6, 0x3b, 0xb9, 0xc7, 0x20, 0xbb, 0xb6, - 0x66, 0x3a, 0x17, 0xc4, 0xee, 0x8b, 0x32, 0x15, 0xe7, 0x65, 0x2a, 0x34, 0xc5, 0xf6, 0x38, 0x96, - 0x90, 0xb6, 0xe4, 0x86, 0x01, 0xca, 0x09, 0xe4, 0x39, 0x83, 0xc5, 0xa7, 0x93, 0x1c, 0xa7, 0x44, - 0x93, 0xfd, 0x34, 0x06, 0x39, 0x7e, 0x46, 0x54, 0xfe, 0x8d, 0x47, 0x0c, 0x38, 0x5d, 0x2c, 0xec, - 0x74, 0x0f, 0xa1, 0x30, 0x46, 0xa5, 0x89, 0xd3, 0xb3, 0x39, 0x35, 0xcf, 0x80, 0xfc, 0xf8, 0x2f, - 0x42, 0xf1, 0x8a, 0x98, 0xba, 0x61, 0x0e, 0x05, 0x56, 0x02, 0xb1, 0x0a, 0x1c, 0xca, 0xd1, 0x5e, - 0x83, 0x34, 0x53, 0x06, 0x1d, 0x14, 0xe2, 0xc1, 0xb9, 0x08, 0x05, 0x6d, 0xe1, 0x9a, 0x2a, 0x70, - 0x94, 0xb7, 0x41, 0x9e, 0x98, 0x17, 0x86, 0x69, 0x38, 0x97, 0x7d, 0x41, 0x97, 0x42, 0xba, 0x0d, - 0x41, 0xf7, 0x84, 0xaf, 0x07, 0xe9, 0x4b, 0x82, 0x88, 0x7d, 0x3b, 0xd5, 0xf7, 0xc4, 0x88, 0x16, - 0x54, 0xc7, 0xcb, 0x21, 0x57, 0x5a, 0x89, 0xb8, 0x12, 0xba, 0xed, 0x5d, 0x3c, 0xe9, 0x2f, 0x42, - 0xcb, 0x6c, 0xb3, 0x9b, 0xb5, 0x7c, 0xdd, 0x45, 0x40, 0x1d, 0xc0, 0x71, 0x35, 0xdb, 0x5d, 0x3c, - 0x52, 0xb3, 0x48, 0x87, 0x25, 0xbd, 0x01, 0x39, 0x6e, 0xa8, 0x85, 0xfd, 0x06, 0x18, 0x21, 0xb2, - 0xd9, 0x86, 0x9c, 0x75, 0x45, 0x6c, 0xcd, 0xb5, 0xf0, 0x08, 0x49, 0x56, 0x67, 0x04, 0xa8, 0xa9, - 0x2b, 0xaf, 0xf0, 0xab, 0x77, 0x36, 0xcd, 0x79, 0x11, 0x7f, 0x86, 0x18, 0x86, 0x65, 0x06, 0xee, - 0xde, 0x1f, 0x42, 0xc1, 0x12, 0xe0, 0xfe, 0xc8, 0x1a, 0x62, 0x5b, 0x91, 0x55, 0xf3, 0x1e, 0xb0, - 0x65, 0x0d, 0xab, 0xbf, 0x8d, 0xc1, 0xca, 0x1c, 0x33, 0xde, 0x4f, 0x93, 0xfe, 0xe0, 0x1d, 0x47, - 0xf1, 0xc2, 0x76, 0x8d, 0xb4, 0xd0, 0xdb, 0x90, 0xbb, 0xd0, 0x8c, 0x51, 0xdf, 0x26, 0x9a, 0x63, - 0x99, 0xa8, 0xb1, 0xac, 0x0a, 0x14, 0xa4, 0x22, 0x04, 0x9b, 0x05, 0xbc, 0x6c, 0x5c, 0xbc, 0xe5, - 0x02, 0x46, 0x88, 0x2a, 0xad, 0x41, 0x16, 0xf7, 0x41, 0x26, 0xa9, 0x05, 0x98, 0x64, 0x28, 0x19, - 0x06, 0xf3, 0x0f, 0xe0, 0x41, 0xc0, 0x85, 0x3b, 0xc4, 0xd4, 0x46, 0xee, 0x54, 0xa4, 0x8c, 0x83, - 0x90, 0x2b, 0x6f, 0x84, 0x8e, 0x1c, 0x46, 0xbd, 0x93, 0x4b, 0xff, 0x24, 0x06, 0x2b, 0xf3, 0xb6, - 0xb9, 0xd1, 0x20, 0x11, 0xb7, 0x89, 0xcd, 0xb8, 0x0d, 0x96, 0x0a, 0xd4, 0x73, 0xfc, 0x26, 0xc7, - 0xe1, 0x48, 0xb3, 0xae, 0x93, 0x98, 0x75, 0x9d, 0x6b, 0x7b, 0x92, 0x88, 0xdd, 0x52, 0xf7, 0xb3, - 0x1b, 0xcd, 0xa0, 0x4a, 0x58, 0x11, 0xb7, 0x27, 0xd2, 0x37, 0x61, 0x5d, 0xa4, 0xef, 0x2b, 0x46, - 0x15, 0xae, 0x1a, 0xab, 0x7c, 0x95, 0xb3, 0xe4, 0x89, 0xf1, 0x4d, 0x58, 0x67, 0x07, 0x23, 0x51, - 0x2a, 0x96, 0x6d, 0x57, 0xf9, 0x6a, 0x98, 0x2a, 0xa2, 0xf3, 0xc4, 0x8c, 0xce, 0xb1, 0x96, 0x0c, - 0x88, 0xf1, 0x01, 0x59, 0xdc, 0x81, 0x73, 0x9c, 0x12, 0x35, 0x71, 0x09, 0xe5, 0x79, 0xee, 0x87, - 0xea, 0xd8, 0x0f, 0x79, 0x5f, 0x65, 0xbe, 0xf7, 0xdd, 0x35, 0x9f, 0xee, 0xad, 0x42, 0xd6, 0x7b, - 0xa2, 0x54, 0xd2, 0x10, 0x3f, 0xea, 0xf5, 0xe4, 0xa5, 0xbd, 0x63, 0xc8, 0x78, 0x2f, 0x8e, 0x39, - 0x48, 0x9f, 0x9e, 0xb5, 0x7b, 0x8f, 0x5b, 0xef, 0xca, 0x4b, 0x4a, 0x01, 0xb2, 0xdf, 0x7d, 0x52, - 0x53, 0x7b, 0x0d, 0xb5, 0xf5, 0xae, 0x2c, 0x29, 0x79, 0xc8, 0xd4, 0xda, 0xed, 0x27, 0xb5, 0x56, - 0xeb, 0x5d, 0x39, 0xa6, 0x14, 0x01, 0xea, 0x4f, 0xba, 0xbd, 0xb3, 0xd3, 0xe6, 0x7b, 0x8d, 0x63, - 0x39, 0xbe, 0xf7, 0x06, 0xe4, 0x83, 0x0f, 0x84, 0x94, 0x93, 0xda, 0x38, 0x79, 0xd2, 0xaa, 0xa9, - 0xf2, 0x92, 0x92, 0x81, 0x44, 0xa7, 0x55, 0x6b, 0xcb, 0x92, 0x02, 0x90, 0x52, 0x1b, 0xef, 0x34, - 0xbb, 0x0d, 0x39, 0xb6, 0xa7, 0x43, 0x3e, 0x78, 0x4d, 0x45, 0xf7, 0x6b, 0xb6, 0x9b, 0xbd, 0x66, - 0xad, 0xd7, 0x38, 0x96, 0x97, 0x28, 0x6a, 0xad, 0xde, 0x6b, 0xbe, 0xd3, 0x60, 0x7b, 0xd7, 0x6b, - 0xed, 0x7a, 0xa3, 0xd5, 0x38, 0x96, 0x63, 0x74, 0xa5, 0xde, 0x3a, 0xeb, 0xd2, 0x7d, 0xe9, 0x4a, - 0xfb, 0xac, 0xd7, 0xed, 0xd5, 0xd4, 0x9e, 0x9c, 0x50, 0x96, 0xa1, 0x20, 0xbe, 0xfa, 0x9d, 0x5a, - 0xf3, 0x58, 0x4e, 0xee, 0xbd, 0xcc, 0x6b, 0x08, 0xdf, 0xa4, 0x08, 0xd0, 0x51, 0xcf, 0xea, 0x8d, - 0xc6, 0x71, 0xb3, 0x7d, 0xc2, 0x44, 0x7b, 0xbb, 0xd6, 0x6c, 0xc9, 0xd2, 0x5e, 0x03, 0x0a, 0xa1, - 0x70, 0x51, 0xb2, 0x90, 0xec, 0xf6, 0x6a, 0xdf, 0x69, 0xc8, 0x4b, 0x94, 0x6f, 0xfd, 0x71, 0xa3, - 0xd6, 0xeb, 0x77, 0x1a, 0xed, 0x5a, 0xab, 0x47, 0xd5, 0xb1, 0x0e, 0x4a, 0xeb, 0xac, 0xdb, 0xeb, - 0x77, 0x1f, 0xd7, 0xd4, 0x63, 0x0f, 0x1e, 0x3b, 0xfc, 0x4f, 0x06, 0x0a, 0xfc, 0x58, 0xc4, 0xfe, - 0xc0, 0x18, 0x10, 0xa5, 0x07, 0xa5, 0xf0, 0xb3, 0x8a, 0xa3, 0x6c, 0x5e, 0xf3, 0xc0, 0xc9, 0xfc, - 0xb7, 0x52, 0x0d, 0xbf, 0x2e, 0xce, 0x7d, 0xc2, 0x39, 0xc5, 0x73, 0x89, 0x77, 0x87, 0xdb, 0x38, - 0x6e, 0x47, 0x38, 0xce, 0x3c, 0x6e, 0x7c, 0x13, 0x92, 0x1d, 0x6d, 0xda, 0x34, 0x95, 0x4a, 0x18, - 0x33, 0x78, 0x93, 0x5f, 0x79, 0x30, 0x77, 0x0d, 0xe9, 0xbf, 0x01, 0xa9, 0xa6, 0x83, 0xb7, 0x7a, - 0xe5, 0x30, 0x92, 0xff, 0x6f, 0x0c, 0x73, 0xc9, 0xb9, 0x59, 0x4e, 0xa0, 0x74, 0x42, 0xdc, 0x8e, - 0x36, 0x3d, 0xf3, 0xae, 0x89, 0xae, 0xe7, 0x33, 0x2b, 0xa2, 0x7f, 0xb9, 0xf4, 0x0e, 0xac, 0x46, - 0x18, 0xb1, 0x0b, 0xa0, 0xcd, 0xeb, 0xb8, 0xe1, 0x72, 0x54, 0x3f, 0xb3, 0x17, 0x48, 0xe7, 0x50, - 0x39, 0x21, 0xfc, 0x6e, 0x6b, 0x96, 0xfb, 0xc3, 0x30, 0xf9, 0xdc, 0xff, 0xf3, 0xb8, 0x7d, 0x0f, - 0x15, 0x4a, 0xe1, 0xd1, 0xdd, 0x51, 0x36, 0x22, 0x62, 0x07, 0xaf, 0x6d, 0xa2, 0x6e, 0x32, 0xf7, - 0x92, 0xa0, 0x01, 0xd9, 0xd3, 0xa9, 0x98, 0x73, 0x37, 0xe6, 0x49, 0xc0, 0x47, 0x9b, 0xca, 0xec, - 0x62, 0x60, 0x48, 0x6b, 0x41, 0x96, 0x8f, 0x1d, 0x67, 0x17, 0x4a, 0x35, 0xf2, 0x78, 0x64, 0x13, - 0xcd, 0x25, 0xb5, 0xc1, 0x80, 0x26, 0x4e, 0x21, 0x5b, 0x84, 0x5b, 0x78, 0xb4, 0x79, 0x0b, 0x0a, - 0x8c, 0x88, 0x3f, 0x32, 0x29, 0x37, 0xbd, 0x87, 0x57, 0x96, 0xc5, 0x22, 0x07, 0x37, 0x8f, 0x95, - 0x1a, 0xe4, 0xeb, 0x23, 0xcb, 0xf1, 0xe8, 0x6f, 0x78, 0xce, 0xaa, 0xac, 0x45, 0xc8, 0x91, 0x50, - 0x57, 0xbe, 0x0e, 0xf1, 0x8e, 0x36, 0x55, 0x6e, 0x1e, 0x21, 0x2a, 0xeb, 0x62, 0xd9, 0x5f, 0x10, - 0xe1, 0x82, 0x59, 0x25, 0x1a, 0x2e, 0xc1, 0xc1, 0x27, 0xea, 0xef, 0xc1, 0x0e, 0xb9, 0xcb, 0x67, - 0x24, 0x9e, 0xc4, 0x95, 0x17, 0xe6, 0xa0, 0x86, 0x5b, 0x84, 0xca, 0xce, 0x4d, 0x28, 0x94, 0xe9, - 0xd1, 0x5b, 0x9f, 0x7c, 0xb6, 0x25, 0x7d, 0xfa, 0xd9, 0x96, 0xf4, 0xaf, 0xcf, 0xb6, 0xa4, 0x5f, - 0x7e, 0xbe, 0x25, 0xfd, 0xf5, 0xf3, 0x2d, 0xe9, 0x93, 0xcf, 0xb7, 0x24, 0x28, 0x1a, 0xd6, 0xfe, - 0xb9, 0x7b, 0xe1, 0x70, 0x16, 0x47, 0x39, 0x16, 0xfb, 0x1d, 0x5a, 0xa4, 0x3a, 0xd2, 0x7b, 0xfc, - 0xdd, 0xf5, 0x3c, 0x85, 0x55, 0xeb, 0xff, 0xfe, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x18, 0x90, 0x1c, - 0xbe, 0x9a, 0x26, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// EscrowServiceClient is the client API for EscrowService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type EscrowServiceClient interface { - // buyer submit contracts to escrow after buyer and seller agreed contract - // one contract is one buyer to one seller, and is one escrow in escrow service - // buyer can submit multiple contracts in one request - // return same number of results as request contracts - SubmitContracts(ctx context.Context, in *EscrowContractRequest, opts ...grpc.CallOption) (*SignedSubmitContractResult, error) - StartEscrow(ctx context.Context, in *EscrowContractRequest, opts ...grpc.CallOption) (*SignedStartEscrowResult, error) - // after submit contract, buyer request to pay in - // escrow will transfer contract amount from buyer wallet to escrow wallet - PayIn(ctx context.Context, in *SignedPayinRequest, opts ...grpc.CallOption) (*SignedPayinResult, error) - // seller use this to check if a contract is paid in - IsPaid(ctx context.Context, in *SignedContractID, opts ...grpc.CallOption) (*SignedPayinStatus, error) - // check escrow pay out to seller status of a contract - GetPayOutStatus(ctx context.Context, in *SignedContractID, opts ...grpc.CallOption) (*SignedPayoutStatus, error) - //get the payout status in batch - GetPayOutStatusBatch(ctx context.Context, in *SignedContractIDBatch, opts ...grpc.CallOption) (*SignedPayoutStatusBatch, error) - //get the modified payout status in batch - GetModifyPayOutStatusBatch(ctx context.Context, in *SignedModifyContractIDBatch, opts ...grpc.CallOption) (*SignedPayoutStatusBatch, error) - // auth request to cancel the contract - // escrow will cancel the left payments to seller - CancelContracts(ctx context.Context, in *SignedCancelRequest, opts ...grpc.CallOption) (*SignedCancelContractResult, error) - // seller query what new payments to receive - MyPayment(ctx context.Context, in *SignedPayoutAddress, opts ...grpc.CallOption) (*SignedPaymentResult, error) - // query balance and create account if account not exist - BalanceOf(ctx context.Context, in *ledger.SignedCreateAccountRequest, opts ...grpc.CallOption) (*SignedBalanceResult, error) - // Creates a channel on the ledger and returns the ID of the ledger - CreateChannel(ctx context.Context, in *ledger.SignedChannelCommit, opts ...grpc.CallOption) (*ledger.ChannelID, error) - // Closes a channel on the ledger. - CloseChannel(ctx context.Context, in *ledger.SignedChannelState, opts ...grpc.CallOption) (*ledger.ChannelClosed, error) - //use escrow as proxy to do the payment - Pay(ctx context.Context, in *ledger.SignedTransferRequest, opts ...grpc.CallOption) (*ledger.TransferResult, error) - Stake(ctx context.Context, in *SignedStakeRequest, opts ...grpc.CallOption) (*SignedStakeResult, error) - StakePenalty(ctx context.Context, in *SignedStakePenaltyRequest, opts ...grpc.CallOption) (*SignedStakePenaltyResult, error) -} - -type escrowServiceClient struct { - cc *grpc.ClientConn -} - -func NewEscrowServiceClient(cc *grpc.ClientConn) EscrowServiceClient { - return &escrowServiceClient{cc} -} - -func (c *escrowServiceClient) SubmitContracts(ctx context.Context, in *EscrowContractRequest, opts ...grpc.CallOption) (*SignedSubmitContractResult, error) { - out := new(SignedSubmitContractResult) - err := c.cc.Invoke(ctx, "/escrow.EscrowService/SubmitContracts", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *escrowServiceClient) StartEscrow(ctx context.Context, in *EscrowContractRequest, opts ...grpc.CallOption) (*SignedStartEscrowResult, error) { - out := new(SignedStartEscrowResult) - err := c.cc.Invoke(ctx, "/escrow.EscrowService/StartEscrow", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *escrowServiceClient) PayIn(ctx context.Context, in *SignedPayinRequest, opts ...grpc.CallOption) (*SignedPayinResult, error) { - out := new(SignedPayinResult) - err := c.cc.Invoke(ctx, "/escrow.EscrowService/PayIn", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *escrowServiceClient) IsPaid(ctx context.Context, in *SignedContractID, opts ...grpc.CallOption) (*SignedPayinStatus, error) { - out := new(SignedPayinStatus) - err := c.cc.Invoke(ctx, "/escrow.EscrowService/IsPaid", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *escrowServiceClient) GetPayOutStatus(ctx context.Context, in *SignedContractID, opts ...grpc.CallOption) (*SignedPayoutStatus, error) { - out := new(SignedPayoutStatus) - err := c.cc.Invoke(ctx, "/escrow.EscrowService/GetPayOutStatus", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *escrowServiceClient) GetPayOutStatusBatch(ctx context.Context, in *SignedContractIDBatch, opts ...grpc.CallOption) (*SignedPayoutStatusBatch, error) { - out := new(SignedPayoutStatusBatch) - err := c.cc.Invoke(ctx, "/escrow.EscrowService/GetPayOutStatusBatch", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *escrowServiceClient) GetModifyPayOutStatusBatch(ctx context.Context, in *SignedModifyContractIDBatch, opts ...grpc.CallOption) (*SignedPayoutStatusBatch, error) { - out := new(SignedPayoutStatusBatch) - err := c.cc.Invoke(ctx, "/escrow.EscrowService/GetModifyPayOutStatusBatch", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *escrowServiceClient) CancelContracts(ctx context.Context, in *SignedCancelRequest, opts ...grpc.CallOption) (*SignedCancelContractResult, error) { - out := new(SignedCancelContractResult) - err := c.cc.Invoke(ctx, "/escrow.EscrowService/CancelContracts", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *escrowServiceClient) MyPayment(ctx context.Context, in *SignedPayoutAddress, opts ...grpc.CallOption) (*SignedPaymentResult, error) { - out := new(SignedPaymentResult) - err := c.cc.Invoke(ctx, "/escrow.EscrowService/MyPayment", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *escrowServiceClient) BalanceOf(ctx context.Context, in *ledger.SignedCreateAccountRequest, opts ...grpc.CallOption) (*SignedBalanceResult, error) { - out := new(SignedBalanceResult) - err := c.cc.Invoke(ctx, "/escrow.EscrowService/BalanceOf", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *escrowServiceClient) CreateChannel(ctx context.Context, in *ledger.SignedChannelCommit, opts ...grpc.CallOption) (*ledger.ChannelID, error) { - out := new(ledger.ChannelID) - err := c.cc.Invoke(ctx, "/escrow.EscrowService/CreateChannel", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *escrowServiceClient) CloseChannel(ctx context.Context, in *ledger.SignedChannelState, opts ...grpc.CallOption) (*ledger.ChannelClosed, error) { - out := new(ledger.ChannelClosed) - err := c.cc.Invoke(ctx, "/escrow.EscrowService/CloseChannel", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *escrowServiceClient) Pay(ctx context.Context, in *ledger.SignedTransferRequest, opts ...grpc.CallOption) (*ledger.TransferResult, error) { - out := new(ledger.TransferResult) - err := c.cc.Invoke(ctx, "/escrow.EscrowService/Pay", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *escrowServiceClient) Stake(ctx context.Context, in *SignedStakeRequest, opts ...grpc.CallOption) (*SignedStakeResult, error) { - out := new(SignedStakeResult) - err := c.cc.Invoke(ctx, "/escrow.EscrowService/Stake", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *escrowServiceClient) StakePenalty(ctx context.Context, in *SignedStakePenaltyRequest, opts ...grpc.CallOption) (*SignedStakePenaltyResult, error) { - out := new(SignedStakePenaltyResult) - err := c.cc.Invoke(ctx, "/escrow.EscrowService/StakePenalty", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// EscrowServiceServer is the server API for EscrowService service. -type EscrowServiceServer interface { - // buyer submit contracts to escrow after buyer and seller agreed contract - // one contract is one buyer to one seller, and is one escrow in escrow service - // buyer can submit multiple contracts in one request - // return same number of results as request contracts - SubmitContracts(context.Context, *EscrowContractRequest) (*SignedSubmitContractResult, error) - StartEscrow(context.Context, *EscrowContractRequest) (*SignedStartEscrowResult, error) - // after submit contract, buyer request to pay in - // escrow will transfer contract amount from buyer wallet to escrow wallet - PayIn(context.Context, *SignedPayinRequest) (*SignedPayinResult, error) - // seller use this to check if a contract is paid in - IsPaid(context.Context, *SignedContractID) (*SignedPayinStatus, error) - // check escrow pay out to seller status of a contract - GetPayOutStatus(context.Context, *SignedContractID) (*SignedPayoutStatus, error) - //get the payout status in batch - GetPayOutStatusBatch(context.Context, *SignedContractIDBatch) (*SignedPayoutStatusBatch, error) - //get the modified payout status in batch - GetModifyPayOutStatusBatch(context.Context, *SignedModifyContractIDBatch) (*SignedPayoutStatusBatch, error) - // auth request to cancel the contract - // escrow will cancel the left payments to seller - CancelContracts(context.Context, *SignedCancelRequest) (*SignedCancelContractResult, error) - // seller query what new payments to receive - MyPayment(context.Context, *SignedPayoutAddress) (*SignedPaymentResult, error) - // query balance and create account if account not exist - BalanceOf(context.Context, *ledger.SignedCreateAccountRequest) (*SignedBalanceResult, error) - // Creates a channel on the ledger and returns the ID of the ledger - CreateChannel(context.Context, *ledger.SignedChannelCommit) (*ledger.ChannelID, error) - // Closes a channel on the ledger. - CloseChannel(context.Context, *ledger.SignedChannelState) (*ledger.ChannelClosed, error) - //use escrow as proxy to do the payment - Pay(context.Context, *ledger.SignedTransferRequest) (*ledger.TransferResult, error) - Stake(context.Context, *SignedStakeRequest) (*SignedStakeResult, error) - StakePenalty(context.Context, *SignedStakePenaltyRequest) (*SignedStakePenaltyResult, error) -} - -// UnimplementedEscrowServiceServer can be embedded to have forward compatible implementations. -type UnimplementedEscrowServiceServer struct { -} - -func (*UnimplementedEscrowServiceServer) SubmitContracts(ctx context.Context, req *EscrowContractRequest) (*SignedSubmitContractResult, error) { - return nil, status.Errorf(codes.Unimplemented, "method SubmitContracts not implemented") -} -func (*UnimplementedEscrowServiceServer) StartEscrow(ctx context.Context, req *EscrowContractRequest) (*SignedStartEscrowResult, error) { - return nil, status.Errorf(codes.Unimplemented, "method StartEscrow not implemented") -} -func (*UnimplementedEscrowServiceServer) PayIn(ctx context.Context, req *SignedPayinRequest) (*SignedPayinResult, error) { - return nil, status.Errorf(codes.Unimplemented, "method PayIn not implemented") -} -func (*UnimplementedEscrowServiceServer) IsPaid(ctx context.Context, req *SignedContractID) (*SignedPayinStatus, error) { - return nil, status.Errorf(codes.Unimplemented, "method IsPaid not implemented") -} -func (*UnimplementedEscrowServiceServer) GetPayOutStatus(ctx context.Context, req *SignedContractID) (*SignedPayoutStatus, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPayOutStatus not implemented") -} -func (*UnimplementedEscrowServiceServer) GetPayOutStatusBatch(ctx context.Context, req *SignedContractIDBatch) (*SignedPayoutStatusBatch, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPayOutStatusBatch not implemented") -} -func (*UnimplementedEscrowServiceServer) GetModifyPayOutStatusBatch(ctx context.Context, req *SignedModifyContractIDBatch) (*SignedPayoutStatusBatch, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetModifyPayOutStatusBatch not implemented") -} -func (*UnimplementedEscrowServiceServer) CancelContracts(ctx context.Context, req *SignedCancelRequest) (*SignedCancelContractResult, error) { - return nil, status.Errorf(codes.Unimplemented, "method CancelContracts not implemented") -} -func (*UnimplementedEscrowServiceServer) MyPayment(ctx context.Context, req *SignedPayoutAddress) (*SignedPaymentResult, error) { - return nil, status.Errorf(codes.Unimplemented, "method MyPayment not implemented") -} -func (*UnimplementedEscrowServiceServer) BalanceOf(ctx context.Context, req *ledger.SignedCreateAccountRequest) (*SignedBalanceResult, error) { - return nil, status.Errorf(codes.Unimplemented, "method BalanceOf not implemented") -} -func (*UnimplementedEscrowServiceServer) CreateChannel(ctx context.Context, req *ledger.SignedChannelCommit) (*ledger.ChannelID, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateChannel not implemented") -} -func (*UnimplementedEscrowServiceServer) CloseChannel(ctx context.Context, req *ledger.SignedChannelState) (*ledger.ChannelClosed, error) { - return nil, status.Errorf(codes.Unimplemented, "method CloseChannel not implemented") -} -func (*UnimplementedEscrowServiceServer) Pay(ctx context.Context, req *ledger.SignedTransferRequest) (*ledger.TransferResult, error) { - return nil, status.Errorf(codes.Unimplemented, "method Pay not implemented") -} -func (*UnimplementedEscrowServiceServer) Stake(ctx context.Context, req *SignedStakeRequest) (*SignedStakeResult, error) { - return nil, status.Errorf(codes.Unimplemented, "method Stake not implemented") -} -func (*UnimplementedEscrowServiceServer) StakePenalty(ctx context.Context, req *SignedStakePenaltyRequest) (*SignedStakePenaltyResult, error) { - return nil, status.Errorf(codes.Unimplemented, "method StakePenalty not implemented") -} - -func RegisterEscrowServiceServer(s *grpc.Server, srv EscrowServiceServer) { - s.RegisterService(&_EscrowService_serviceDesc, srv) -} - -func _EscrowService_SubmitContracts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EscrowContractRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EscrowServiceServer).SubmitContracts(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/escrow.EscrowService/SubmitContracts", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EscrowServiceServer).SubmitContracts(ctx, req.(*EscrowContractRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _EscrowService_StartEscrow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EscrowContractRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EscrowServiceServer).StartEscrow(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/escrow.EscrowService/StartEscrow", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EscrowServiceServer).StartEscrow(ctx, req.(*EscrowContractRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _EscrowService_PayIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SignedPayinRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EscrowServiceServer).PayIn(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/escrow.EscrowService/PayIn", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EscrowServiceServer).PayIn(ctx, req.(*SignedPayinRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _EscrowService_IsPaid_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SignedContractID) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EscrowServiceServer).IsPaid(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/escrow.EscrowService/IsPaid", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EscrowServiceServer).IsPaid(ctx, req.(*SignedContractID)) - } - return interceptor(ctx, in, info, handler) -} - -func _EscrowService_GetPayOutStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SignedContractID) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EscrowServiceServer).GetPayOutStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/escrow.EscrowService/GetPayOutStatus", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EscrowServiceServer).GetPayOutStatus(ctx, req.(*SignedContractID)) - } - return interceptor(ctx, in, info, handler) -} - -func _EscrowService_GetPayOutStatusBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SignedContractIDBatch) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EscrowServiceServer).GetPayOutStatusBatch(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/escrow.EscrowService/GetPayOutStatusBatch", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EscrowServiceServer).GetPayOutStatusBatch(ctx, req.(*SignedContractIDBatch)) - } - return interceptor(ctx, in, info, handler) -} - -func _EscrowService_GetModifyPayOutStatusBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SignedModifyContractIDBatch) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EscrowServiceServer).GetModifyPayOutStatusBatch(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/escrow.EscrowService/GetModifyPayOutStatusBatch", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EscrowServiceServer).GetModifyPayOutStatusBatch(ctx, req.(*SignedModifyContractIDBatch)) - } - return interceptor(ctx, in, info, handler) -} - -func _EscrowService_CancelContracts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SignedCancelRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EscrowServiceServer).CancelContracts(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/escrow.EscrowService/CancelContracts", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EscrowServiceServer).CancelContracts(ctx, req.(*SignedCancelRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _EscrowService_MyPayment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SignedPayoutAddress) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EscrowServiceServer).MyPayment(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/escrow.EscrowService/MyPayment", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EscrowServiceServer).MyPayment(ctx, req.(*SignedPayoutAddress)) - } - return interceptor(ctx, in, info, handler) -} - -func _EscrowService_BalanceOf_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ledger.SignedCreateAccountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EscrowServiceServer).BalanceOf(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/escrow.EscrowService/BalanceOf", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EscrowServiceServer).BalanceOf(ctx, req.(*ledger.SignedCreateAccountRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _EscrowService_CreateChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ledger.SignedChannelCommit) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EscrowServiceServer).CreateChannel(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/escrow.EscrowService/CreateChannel", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EscrowServiceServer).CreateChannel(ctx, req.(*ledger.SignedChannelCommit)) - } - return interceptor(ctx, in, info, handler) -} - -func _EscrowService_CloseChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ledger.SignedChannelState) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EscrowServiceServer).CloseChannel(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/escrow.EscrowService/CloseChannel", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EscrowServiceServer).CloseChannel(ctx, req.(*ledger.SignedChannelState)) - } - return interceptor(ctx, in, info, handler) -} - -func _EscrowService_Pay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ledger.SignedTransferRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EscrowServiceServer).Pay(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/escrow.EscrowService/Pay", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EscrowServiceServer).Pay(ctx, req.(*ledger.SignedTransferRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _EscrowService_Stake_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SignedStakeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EscrowServiceServer).Stake(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/escrow.EscrowService/Stake", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EscrowServiceServer).Stake(ctx, req.(*SignedStakeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _EscrowService_StakePenalty_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SignedStakePenaltyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EscrowServiceServer).StakePenalty(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/escrow.EscrowService/StakePenalty", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EscrowServiceServer).StakePenalty(ctx, req.(*SignedStakePenaltyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _EscrowService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "escrow.EscrowService", - HandlerType: (*EscrowServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "SubmitContracts", - Handler: _EscrowService_SubmitContracts_Handler, - }, - { - MethodName: "StartEscrow", - Handler: _EscrowService_StartEscrow_Handler, - }, - { - MethodName: "PayIn", - Handler: _EscrowService_PayIn_Handler, - }, - { - MethodName: "IsPaid", - Handler: _EscrowService_IsPaid_Handler, - }, - { - MethodName: "GetPayOutStatus", - Handler: _EscrowService_GetPayOutStatus_Handler, - }, - { - MethodName: "GetPayOutStatusBatch", - Handler: _EscrowService_GetPayOutStatusBatch_Handler, - }, - { - MethodName: "GetModifyPayOutStatusBatch", - Handler: _EscrowService_GetModifyPayOutStatusBatch_Handler, - }, - { - MethodName: "CancelContracts", - Handler: _EscrowService_CancelContracts_Handler, - }, - { - MethodName: "MyPayment", - Handler: _EscrowService_MyPayment_Handler, - }, - { - MethodName: "BalanceOf", - Handler: _EscrowService_BalanceOf_Handler, - }, - { - MethodName: "CreateChannel", - Handler: _EscrowService_CreateChannel_Handler, - }, - { - MethodName: "CloseChannel", - Handler: _EscrowService_CloseChannel_Handler, - }, - { - MethodName: "Pay", - Handler: _EscrowService_Pay_Handler, - }, - { - MethodName: "Stake", - Handler: _EscrowService_Stake_Handler, - }, - { - MethodName: "StakePenalty", - Handler: _EscrowService_StakePenalty_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "protos/escrow/escrow.proto", -} - -func (m *ContractID) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ContractID) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ContractID) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0x12 - } - if len(m.ContractId) > 0 { - i -= len(m.ContractId) - copy(dAtA[i:], m.ContractId) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.ContractId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ContractIDBatch) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ContractIDBatch) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ContractIDBatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0x12 - } - if len(m.ContractId) > 0 { - for iNdEx := len(m.ContractId) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ContractId[iNdEx]) - copy(dAtA[i:], m.ContractId[iNdEx]) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.ContractId[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *SignedContractID) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignedContractID) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignedContractID) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if m.Data != nil { - { - size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEscrow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SignedContractIDBatch) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignedContractIDBatch) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignedContractIDBatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if m.Data != nil { - { - size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEscrow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SignedModifyContractIDBatch) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignedModifyContractIDBatch) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignedModifyContractIDBatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x1a - } - n3, err3 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.LastModifyTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.LastModifyTime):]) - if err3 != nil { - return 0, err3 - } - i -= n3 - i = encodeVarintEscrow(dAtA, i, uint64(n3)) - i-- - dAtA[i] = 0x12 - if m.Data != nil { - { - size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEscrow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EscrowContract) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EscrowContract) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EscrowContract) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.ContingentAmount != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.ContingentAmount)) - i-- - dAtA[i] = 0x70 - } - if m.Type != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x68 - } - if m.CustomizePayoutPeriod != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.CustomizePayoutPeriod)) - i-- - dAtA[i] = 0x60 - } - if len(m.Reference) > 0 { - i -= len(m.Reference) - copy(dAtA[i:], m.Reference) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.Reference))) - i-- - dAtA[i] = 0x5a - } - if m.NumPayouts != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.NumPayouts)) - i-- - dAtA[i] = 0x50 - } - if m.PayoutSchedule != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.PayoutSchedule)) - i-- - dAtA[i] = 0x48 - } - if m.TokenType != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.TokenType)) - i-- - dAtA[i] = 0x40 - } - if m.WithholdAmount != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.WithholdAmount)) - i-- - dAtA[i] = 0x38 - } - if m.CollateralAmount != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.CollateralAmount)) - i-- - dAtA[i] = 0x30 - } - if m.Amount != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.Amount)) - i-- - dAtA[i] = 0x28 - } - if len(m.AuthAddress) > 0 { - i -= len(m.AuthAddress) - copy(dAtA[i:], m.AuthAddress) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.AuthAddress))) - i-- - dAtA[i] = 0x22 - } - if len(m.SellerAddress) > 0 { - i -= len(m.SellerAddress) - copy(dAtA[i:], m.SellerAddress) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.SellerAddress))) - i-- - dAtA[i] = 0x1a - } - if len(m.BuyerAddress) > 0 { - i -= len(m.BuyerAddress) - copy(dAtA[i:], m.BuyerAddress) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.BuyerAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.ContractId) > 0 { - i -= len(m.ContractId) - copy(dAtA[i:], m.ContractId) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.ContractId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SignedEscrowContract) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignedEscrowContract) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignedEscrowContract) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.SellerSignature) > 0 { - i -= len(m.SellerSignature) - copy(dAtA[i:], m.SellerSignature) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.SellerSignature))) - i-- - dAtA[i] = 0x1a - } - if len(m.BuyerSignature) > 0 { - i -= len(m.BuyerSignature) - copy(dAtA[i:], m.BuyerSignature) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.BuyerSignature))) - i-- - dAtA[i] = 0x12 - } - if m.Contract != nil { - { - size, err := m.Contract.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEscrow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EscrowContractRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EscrowContractRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EscrowContractRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.BuyerChannel != nil { - { - size, err := m.BuyerChannel.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEscrow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Contract) > 0 { - for iNdEx := len(m.Contract) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Contract[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEscrow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Escrow) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Escrow) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Escrow) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.ErrorMessage) > 0 { - i -= len(m.ErrorMessage) - copy(dAtA[i:], m.ErrorMessage) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.ErrorMessage))) - i-- - dAtA[i] = 0x42 - } - if m.ErrorCode != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.ErrorCode)) - i-- - dAtA[i] = 0x38 - } - if m.CollateralAmount != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.CollateralAmount)) - i-- - dAtA[i] = 0x30 - } - if m.Amount != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.Amount)) - i-- - dAtA[i] = 0x28 - } - if len(m.ToAddress) > 0 { - i -= len(m.ToAddress) - copy(dAtA[i:], m.ToAddress) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.ToAddress))) - i-- - dAtA[i] = 0x22 - } - if len(m.FromAddress) > 0 { - i -= len(m.FromAddress) - copy(dAtA[i:], m.FromAddress) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.FromAddress))) - i-- - dAtA[i] = 0x1a - } - if m.EscrowId != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.EscrowId)) - i-- - dAtA[i] = 0x10 - } - if len(m.ContractId) > 0 { - i -= len(m.ContractId) - copy(dAtA[i:], m.ContractId) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.ContractId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SubmitContractResult) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SubmitContractResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SubmitContractResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.BuyerChannelState != nil { - { - size, err := m.BuyerChannelState.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEscrow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - n8, err8 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.EscrowSignedTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.EscrowSignedTime):]) - if err8 != nil { - return 0, err8 - } - i -= n8 - i = encodeVarintEscrow(dAtA, i, uint64(n8)) - i-- - dAtA[i] = 0x22 - if len(m.EscrowAddress) > 0 { - i -= len(m.EscrowAddress) - copy(dAtA[i:], m.EscrowAddress) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.EscrowAddress))) - i-- - dAtA[i] = 0x1a - } - if len(m.Escrow) > 0 { - for iNdEx := len(m.Escrow) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Escrow[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEscrow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.PayinId) > 0 { - i -= len(m.PayinId) - copy(dAtA[i:], m.PayinId) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.PayinId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SignedSubmitContractResult) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignedSubmitContractResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignedSubmitContractResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.EscrowSignature) > 0 { - i -= len(m.EscrowSignature) - copy(dAtA[i:], m.EscrowSignature) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.EscrowSignature))) - i-- - dAtA[i] = 0x12 - } - if m.Result != nil { - { - size, err := m.Result.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEscrow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *StartEscrowResult) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StartEscrowResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StartEscrowResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - n10, err10 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.EscrowSignedTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.EscrowSignedTime):]) - if err10 != nil { - return 0, err10 - } - i -= n10 - i = encodeVarintEscrow(dAtA, i, uint64(n10)) - i-- - dAtA[i] = 0x1a - if len(m.EscrowAddress) > 0 { - i -= len(m.EscrowAddress) - copy(dAtA[i:], m.EscrowAddress) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.EscrowAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.Escrow) > 0 { - for iNdEx := len(m.Escrow) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Escrow[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEscrow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *SignedStartEscrowResult) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignedStartEscrowResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignedStartEscrowResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.EscrowSignature) > 0 { - i -= len(m.EscrowSignature) - copy(dAtA[i:], m.EscrowSignature) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.EscrowSignature))) - i-- - dAtA[i] = 0x12 - } - if m.Result != nil { - { - size, err := m.Result.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEscrow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PayinRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PayinRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PayinRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.BuyerChannelState != nil { - { - size, err := m.BuyerChannelState.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEscrow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.BuyerAddress) > 0 { - i -= len(m.BuyerAddress) - copy(dAtA[i:], m.BuyerAddress) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.BuyerAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.PayinId) > 0 { - i -= len(m.PayinId) - copy(dAtA[i:], m.PayinId) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.PayinId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SignedPayinRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignedPayinRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignedPayinRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.BuyerSignature) > 0 { - i -= len(m.BuyerSignature) - copy(dAtA[i:], m.BuyerSignature) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.BuyerSignature))) - i-- - dAtA[i] = 0x12 - } - if m.Request != nil { - { - size, err := m.Request.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEscrow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PayinResult) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PayinResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PayinResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - n14, err14 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.EscrowSignedTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.EscrowSignedTime):]) - if err14 != nil { - return 0, err14 - } - i -= n14 - i = encodeVarintEscrow(dAtA, i, uint64(n14)) - i-- - dAtA[i] = 0x2a - if len(m.EscrowAddress) > 0 { - i -= len(m.EscrowAddress) - copy(dAtA[i:], m.EscrowAddress) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.EscrowAddress))) - i-- - dAtA[i] = 0x22 - } - if m.ChannelId != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.ChannelId)) - i-- - dAtA[i] = 0x18 - } - if m.Amount != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.Amount)) - i-- - dAtA[i] = 0x10 - } - if len(m.PayinId) > 0 { - i -= len(m.PayinId) - copy(dAtA[i:], m.PayinId) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.PayinId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SignedPayinResult) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignedPayinResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignedPayinResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.EscrowSignature) > 0 { - i -= len(m.EscrowSignature) - copy(dAtA[i:], m.EscrowSignature) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.EscrowSignature))) - i-- - dAtA[i] = 0x12 - } - if m.Result != nil { - { - size, err := m.Result.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEscrow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PayinStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PayinStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PayinStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - n16, err16 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.EscrowSignedTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.EscrowSignedTime):]) - if err16 != nil { - return 0, err16 - } - i -= n16 - i = encodeVarintEscrow(dAtA, i, uint64(n16)) - i-- - dAtA[i] = 0x22 - if len(m.EscrowAddress) > 0 { - i -= len(m.EscrowAddress) - copy(dAtA[i:], m.EscrowAddress) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.EscrowAddress))) - i-- - dAtA[i] = 0x1a - } - if m.ChannelId != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.ChannelId)) - i-- - dAtA[i] = 0x10 - } - if m.Paid { - i-- - if m.Paid { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *SignedPayinStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignedPayinStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignedPayinStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.EscrowSignature) > 0 { - i -= len(m.EscrowSignature) - copy(dAtA[i:], m.EscrowSignature) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.EscrowSignature))) - i-- - dAtA[i] = 0x12 - } - if m.Status != nil { - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEscrow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PayoutStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PayoutStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PayoutStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - n18, err18 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.LastModifyTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.LastModifyTime):]) - if err18 != nil { - return 0, err18 - } - i -= n18 - i = encodeVarintEscrow(dAtA, i, uint64(n18)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa2 - if len(m.ErrorMsg) > 0 { - i -= len(m.ErrorMsg) - copy(dAtA[i:], m.ErrorMsg) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.ErrorMsg))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x9a - } - n19, err19 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.EscrowSignTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.EscrowSignTime):]) - if err19 != nil { - return 0, err19 - } - i -= n19 - i = encodeVarintEscrow(dAtA, i, uint64(n19)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x92 - if len(m.EscrowAddress) > 0 { - i -= len(m.EscrowAddress) - copy(dAtA[i:], m.EscrowAddress) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.EscrowAddress))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x8a - } - n20, err20 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.NextPayoutTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.NextPayoutTime):]) - if err20 != nil { - return 0, err20 - } - i -= n20 - i = encodeVarintEscrow(dAtA, i, uint64(n20)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 - n21, err21 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.LastPayoutTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.LastPayoutTime):]) - if err21 != nil { - return 0, err21 - } - i -= n21 - i = encodeVarintEscrow(dAtA, i, uint64(n21)) - i-- - dAtA[i] = 0x7a - if m.NextAmount != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.NextAmount)) - i-- - dAtA[i] = 0x70 - } - if m.NumLeft != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.NumLeft)) - i-- - dAtA[i] = 0x68 - } - if m.LeftAmount != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.LeftAmount)) - i-- - dAtA[i] = 0x60 - } - if m.NumPaid != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.NumPaid)) - i-- - dAtA[i] = 0x58 - } - if m.PaidAmount != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.PaidAmount)) - i-- - dAtA[i] = 0x50 - } - if m.Withhold != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.Withhold)) - i-- - dAtA[i] = 0x48 - } - if m.Collateral != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.Collateral)) - i-- - dAtA[i] = 0x40 - } - if m.Amount != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.Amount)) - i-- - dAtA[i] = 0x38 - } - if m.Status != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.Status)) - i-- - dAtA[i] = 0x30 - } - if len(m.AuthAddress) > 0 { - i -= len(m.AuthAddress) - copy(dAtA[i:], m.AuthAddress) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.AuthAddress))) - i-- - dAtA[i] = 0x2a - } - if len(m.ToAddress) > 0 { - i -= len(m.ToAddress) - copy(dAtA[i:], m.ToAddress) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.ToAddress))) - i-- - dAtA[i] = 0x22 - } - if len(m.FromAddress) > 0 { - i -= len(m.FromAddress) - copy(dAtA[i:], m.FromAddress) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.FromAddress))) - i-- - dAtA[i] = 0x1a - } - if m.EscrowId != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.EscrowId)) - i-- - dAtA[i] = 0x10 - } - if len(m.ContractId) > 0 { - i -= len(m.ContractId) - copy(dAtA[i:], m.ContractId) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.ContractId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SignedPayoutStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignedPayoutStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignedPayoutStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.EscrowSignature) > 0 { - i -= len(m.EscrowSignature) - copy(dAtA[i:], m.EscrowSignature) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.EscrowSignature))) - i-- - dAtA[i] = 0x12 - } - if m.Status != nil { - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEscrow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SignedPayoutStatusBatch) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignedPayoutStatusBatch) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignedPayoutStatusBatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.EscrowSignature) > 0 { - i -= len(m.EscrowSignature) - copy(dAtA[i:], m.EscrowSignature) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.EscrowSignature))) - i-- - dAtA[i] = 0x12 - } - if len(m.Status) > 0 { - for iNdEx := len(m.Status) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Status[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEscrow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *CancelContractRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CancelContractRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CancelContractRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - n23, err23 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.AuthSignedTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.AuthSignedTime):]) - if err23 != nil { - return 0, err23 - } - i -= n23 - i = encodeVarintEscrow(dAtA, i, uint64(n23)) - i-- - dAtA[i] = 0x1a - if len(m.AuthAddress) > 0 { - i -= len(m.AuthAddress) - copy(dAtA[i:], m.AuthAddress) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.AuthAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.ContractId) > 0 { - i -= len(m.ContractId) - copy(dAtA[i:], m.ContractId) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.ContractId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SignedCancelRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignedCancelRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignedCancelRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.AuthSignature) > 0 { - i -= len(m.AuthSignature) - copy(dAtA[i:], m.AuthSignature) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.AuthSignature))) - i-- - dAtA[i] = 0x12 - } - if m.Request != nil { - { - size, err := m.Request.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEscrow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CancelContractResult) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CancelContractResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CancelContractResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Reference) > 0 { - i -= len(m.Reference) - copy(dAtA[i:], m.Reference) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.Reference))) - i-- - dAtA[i] = 0x42 - } - if m.Paid { - i-- - if m.Paid { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x38 - } - if m.Amount != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.Amount)) - i-- - dAtA[i] = 0x30 - } - n25, err25 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.EscrowSignedTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.EscrowSignedTime):]) - if err25 != nil { - return 0, err25 - } - i -= n25 - i = encodeVarintEscrow(dAtA, i, uint64(n25)) - i-- - dAtA[i] = 0x2a - if len(m.EscrowAddress) > 0 { - i -= len(m.EscrowAddress) - copy(dAtA[i:], m.EscrowAddress) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.EscrowAddress))) - i-- - dAtA[i] = 0x22 - } - if m.Canceled { - i-- - if m.Canceled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if m.EscrowId != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.EscrowId)) - i-- - dAtA[i] = 0x10 - } - if len(m.ContractId) > 0 { - i -= len(m.ContractId) - copy(dAtA[i:], m.ContractId) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.ContractId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SignedCancelContractResult) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignedCancelContractResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignedCancelContractResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.EscrowSignature) > 0 { - i -= len(m.EscrowSignature) - copy(dAtA[i:], m.EscrowSignature) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.EscrowSignature))) - i-- - dAtA[i] = 0x12 - } - if m.Result != nil { - { - size, err := m.Result.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEscrow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PayoutAddress) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PayoutAddress) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PayoutAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - n27, err27 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.SignedTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.SignedTime):]) - if err27 != nil { - return 0, err27 - } - i -= n27 - i = encodeVarintEscrow(dAtA, i, uint64(n27)) - i-- - dAtA[i] = 0x12 - if len(m.ToAddress) > 0 { - i -= len(m.ToAddress) - copy(dAtA[i:], m.ToAddress) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.ToAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SignedPayoutAddress) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignedPayoutAddress) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignedPayoutAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if m.Address != nil { - { - size, err := m.Address.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEscrow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Payment) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Payment) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Payment) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Index != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.Index)) - i-- - dAtA[i] = 0x30 - } - if m.Amount != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.Amount)) - i-- - dAtA[i] = 0x28 - } - if len(m.ToAddress) > 0 { - i -= len(m.ToAddress) - copy(dAtA[i:], m.ToAddress) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.ToAddress))) - i-- - dAtA[i] = 0x22 - } - if len(m.FromAddress) > 0 { - i -= len(m.FromAddress) - copy(dAtA[i:], m.FromAddress) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.FromAddress))) - i-- - dAtA[i] = 0x1a - } - if m.EscrowId != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.EscrowId)) - i-- - dAtA[i] = 0x10 - } - if len(m.ContractId) > 0 { - i -= len(m.ContractId) - copy(dAtA[i:], m.ContractId) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.ContractId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PaymentResult) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PaymentResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PaymentResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - n29, err29 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.EscrowSignedTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.EscrowSignedTime):]) - if err29 != nil { - return 0, err29 - } - i -= n29 - i = encodeVarintEscrow(dAtA, i, uint64(n29)) - i-- - dAtA[i] = 0x1a - if len(m.EscrowAddress) > 0 { - i -= len(m.EscrowAddress) - copy(dAtA[i:], m.EscrowAddress) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.EscrowAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.Payment) > 0 { - for iNdEx := len(m.Payment) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Payment[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEscrow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *SignedPaymentResult) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignedPaymentResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignedPaymentResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.EscrowSignature) > 0 { - i -= len(m.EscrowSignature) - copy(dAtA[i:], m.EscrowSignature) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.EscrowSignature))) - i-- - dAtA[i] = 0x12 - } - if m.Result != nil { - { - size, err := m.Result.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEscrow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BalanceResult) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BalanceResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BalanceResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - n31, err31 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.EscrowSignedTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.EscrowSignedTime):]) - if err31 != nil { - return 0, err31 - } - i -= n31 - i = encodeVarintEscrow(dAtA, i, uint64(n31)) - i-- - dAtA[i] = 0x1a - if len(m.EscrowAddress) > 0 { - i -= len(m.EscrowAddress) - copy(dAtA[i:], m.EscrowAddress) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.EscrowAddress))) - i-- - dAtA[i] = 0x12 - } - if m.Balance != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.Balance)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *SignedBalanceResult) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignedBalanceResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignedBalanceResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.EscrowSignature) > 0 { - i -= len(m.EscrowSignature) - copy(dAtA[i:], m.EscrowSignature) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.EscrowSignature))) - i-- - dAtA[i] = 0x12 - } - if m.Result != nil { - { - size, err := m.Result.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEscrow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SignedStakeRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignedStakeRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignedStakeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if m.Data != nil { - { - size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEscrow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *StakeRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StakeRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StakeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - n34, err34 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.RequestTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.RequestTime):]) - if err34 != nil { - return 0, err34 - } - i -= n34 - i = encodeVarintEscrow(dAtA, i, uint64(n34)) - i-- - dAtA[i] = 0x22 - if m.TransferRequest != nil { - { - size, err := m.TransferRequest.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEscrow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.StakeAmount != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.StakeAmount)) - i-- - dAtA[i] = 0x10 - } - if len(m.StakerId) > 0 { - i -= len(m.StakerId) - copy(dAtA[i:], m.StakerId) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.StakerId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *StakeResult) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StakeResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StakeResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.UnfinishLedgers) > 0 { - for iNdEx := len(m.UnfinishLedgers) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.UnfinishLedgers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEscrow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - if len(m.Ledgers) > 0 { - for iNdEx := len(m.Ledgers) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Ledgers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEscrow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - if m.PendingAmount != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.PendingAmount)) - i-- - dAtA[i] = 0x20 - } - if m.MatureAmount != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.MatureAmount)) - i-- - dAtA[i] = 0x18 - } - if m.Balance != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.Balance)) - i-- - dAtA[i] = 0x10 - } - if len(m.StakerId) > 0 { - i -= len(m.StakerId) - copy(dAtA[i:], m.StakerId) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.StakerId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SignedStakeResult) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignedStakeResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignedStakeResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if m.Data != nil { - { - size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEscrow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *StakeLedger) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StakeLedger) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StakeLedger) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.OperationLog) > 0 { - i -= len(m.OperationLog) - copy(dAtA[i:], m.OperationLog) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.OperationLog))) - i-- - dAtA[i] = 0x3a - } - if m.Type != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x30 - } - if len(m.OperatorId) > 0 { - i -= len(m.OperatorId) - copy(dAtA[i:], m.OperatorId) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.OperatorId))) - i-- - dAtA[i] = 0x2a - } - n37, err37 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.MatureTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.MatureTime):]) - if err37 != nil { - return 0, err37 - } - i -= n37 - i = encodeVarintEscrow(dAtA, i, uint64(n37)) - i-- - dAtA[i] = 0x22 - n38, err38 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.StartTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.StartTime):]) - if err38 != nil { - return 0, err38 - } - i -= n38 - i = encodeVarintEscrow(dAtA, i, uint64(n38)) - i-- - dAtA[i] = 0x1a - if m.Amount != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.Amount)) - i-- - dAtA[i] = 0x10 - } - if len(m.StakerId) > 0 { - i -= len(m.StakerId) - copy(dAtA[i:], m.StakerId) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.StakerId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *UnfinishStakeLedger) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UnfinishStakeLedger) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UnfinishStakeLedger) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - n39, err39 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.FailTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.FailTime):]) - if err39 != nil { - return 0, err39 - } - i -= n39 - i = encodeVarintEscrow(dAtA, i, uint64(n39)) - i-- - dAtA[i] = 0x32 - n40, err40 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.SubmitTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.SubmitTime):]) - if err40 != nil { - return 0, err40 - } - i -= n40 - i = encodeVarintEscrow(dAtA, i, uint64(n40)) - i-- - dAtA[i] = 0x2a - if len(m.FailReason) > 0 { - i -= len(m.FailReason) - copy(dAtA[i:], m.FailReason) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.FailReason))) - i-- - dAtA[i] = 0x22 - } - if m.Status != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.Status)) - i-- - dAtA[i] = 0x18 - } - if m.Amount != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.Amount)) - i-- - dAtA[i] = 0x10 - } - if len(m.StakerId) > 0 { - i -= len(m.StakerId) - copy(dAtA[i:], m.StakerId) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.StakerId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SignedStakePenaltyRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignedStakePenaltyRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignedStakePenaltyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if m.Data != nil { - { - size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEscrow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *StakePenaltyRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StakePenaltyRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StakePenaltyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - n42, err42 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.SubmitTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.SubmitTime):]) - if err42 != nil { - return 0, err42 - } - i -= n42 - i = encodeVarintEscrow(dAtA, i, uint64(n42)) - i-- - dAtA[i] = 0x32 - if m.Amount != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.Amount)) - i-- - dAtA[i] = 0x28 - } - if len(m.OperationLog) > 0 { - i -= len(m.OperationLog) - copy(dAtA[i:], m.OperationLog) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.OperationLog))) - i-- - dAtA[i] = 0x22 - } - if m.Reason != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.Reason)) - i-- - dAtA[i] = 0x18 - } - if len(m.OperatorId) > 0 { - i -= len(m.OperatorId) - copy(dAtA[i:], m.OperatorId) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.OperatorId))) - i-- - dAtA[i] = 0x12 - } - if len(m.StakerId) > 0 { - i -= len(m.StakerId) - copy(dAtA[i:], m.StakerId) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.StakerId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *StakePenaltyResult) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StakePenaltyResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StakePenaltyResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - n43, err43 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.ReceiveTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.ReceiveTime):]) - if err43 != nil { - return 0, err43 - } - i -= n43 - i = encodeVarintEscrow(dAtA, i, uint64(n43)) - i-- - dAtA[i] = 0x2a - if len(m.OperatorId) > 0 { - i -= len(m.OperatorId) - copy(dAtA[i:], m.OperatorId) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.OperatorId))) - i-- - dAtA[i] = 0x22 - } - if m.OperatePenaltyAmount != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.OperatePenaltyAmount)) - i-- - dAtA[i] = 0x18 - } - if m.RequestPenaltyAmount != 0 { - i = encodeVarintEscrow(dAtA, i, uint64(m.RequestPenaltyAmount)) - i-- - dAtA[i] = 0x10 - } - if len(m.StakerId) > 0 { - i -= len(m.StakerId) - copy(dAtA[i:], m.StakerId) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.StakerId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SignedStakePenaltyResult) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignedStakePenaltyResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignedStakePenaltyResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintEscrow(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if m.Data != nil { - { - size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEscrow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintEscrow(dAtA []byte, offset int, v uint64) int { - offset -= sovEscrow(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ContractID) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ContractId) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - l = len(m.Address) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ContractIDBatch) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ContractId) > 0 { - for _, s := range m.ContractId { - l = len(s) - n += 1 + l + sovEscrow(uint64(l)) - } - } - l = len(m.Address) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SignedContractID) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Data != nil { - l = m.Data.Size() - n += 1 + l + sovEscrow(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SignedContractIDBatch) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Data != nil { - l = m.Data.Size() - n += 1 + l + sovEscrow(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SignedModifyContractIDBatch) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Data != nil { - l = m.Data.Size() - n += 1 + l + sovEscrow(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.LastModifyTime) - n += 1 + l + sovEscrow(uint64(l)) - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *EscrowContract) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ContractId) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - l = len(m.BuyerAddress) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - l = len(m.SellerAddress) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - l = len(m.AuthAddress) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.Amount != 0 { - n += 1 + sovEscrow(uint64(m.Amount)) - } - if m.CollateralAmount != 0 { - n += 1 + sovEscrow(uint64(m.CollateralAmount)) - } - if m.WithholdAmount != 0 { - n += 1 + sovEscrow(uint64(m.WithholdAmount)) - } - if m.TokenType != 0 { - n += 1 + sovEscrow(uint64(m.TokenType)) - } - if m.PayoutSchedule != 0 { - n += 1 + sovEscrow(uint64(m.PayoutSchedule)) - } - if m.NumPayouts != 0 { - n += 1 + sovEscrow(uint64(m.NumPayouts)) - } - l = len(m.Reference) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.CustomizePayoutPeriod != 0 { - n += 1 + sovEscrow(uint64(m.CustomizePayoutPeriod)) - } - if m.Type != 0 { - n += 1 + sovEscrow(uint64(m.Type)) - } - if m.ContingentAmount != 0 { - n += 1 + sovEscrow(uint64(m.ContingentAmount)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SignedEscrowContract) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Contract != nil { - l = m.Contract.Size() - n += 1 + l + sovEscrow(uint64(l)) - } - l = len(m.BuyerSignature) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - l = len(m.SellerSignature) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *EscrowContractRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Contract) > 0 { - for _, e := range m.Contract { - l = e.Size() - n += 1 + l + sovEscrow(uint64(l)) - } - } - if m.BuyerChannel != nil { - l = m.BuyerChannel.Size() - n += 1 + l + sovEscrow(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Escrow) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ContractId) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.EscrowId != 0 { - n += 1 + sovEscrow(uint64(m.EscrowId)) - } - l = len(m.FromAddress) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - l = len(m.ToAddress) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.Amount != 0 { - n += 1 + sovEscrow(uint64(m.Amount)) - } - if m.CollateralAmount != 0 { - n += 1 + sovEscrow(uint64(m.CollateralAmount)) - } - if m.ErrorCode != 0 { - n += 1 + sovEscrow(uint64(m.ErrorCode)) - } - l = len(m.ErrorMessage) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SubmitContractResult) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PayinId) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if len(m.Escrow) > 0 { - for _, e := range m.Escrow { - l = e.Size() - n += 1 + l + sovEscrow(uint64(l)) - } - } - l = len(m.EscrowAddress) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.EscrowSignedTime) - n += 1 + l + sovEscrow(uint64(l)) - if m.BuyerChannelState != nil { - l = m.BuyerChannelState.Size() - n += 1 + l + sovEscrow(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SignedSubmitContractResult) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Result != nil { - l = m.Result.Size() - n += 1 + l + sovEscrow(uint64(l)) - } - l = len(m.EscrowSignature) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *StartEscrowResult) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Escrow) > 0 { - for _, e := range m.Escrow { - l = e.Size() - n += 1 + l + sovEscrow(uint64(l)) - } - } - l = len(m.EscrowAddress) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.EscrowSignedTime) - n += 1 + l + sovEscrow(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SignedStartEscrowResult) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Result != nil { - l = m.Result.Size() - n += 1 + l + sovEscrow(uint64(l)) - } - l = len(m.EscrowSignature) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *PayinRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PayinId) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - l = len(m.BuyerAddress) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.BuyerChannelState != nil { - l = m.BuyerChannelState.Size() - n += 1 + l + sovEscrow(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SignedPayinRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Request != nil { - l = m.Request.Size() - n += 1 + l + sovEscrow(uint64(l)) - } - l = len(m.BuyerSignature) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *PayinResult) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PayinId) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.Amount != 0 { - n += 1 + sovEscrow(uint64(m.Amount)) - } - if m.ChannelId != 0 { - n += 1 + sovEscrow(uint64(m.ChannelId)) - } - l = len(m.EscrowAddress) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.EscrowSignedTime) - n += 1 + l + sovEscrow(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SignedPayinResult) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Result != nil { - l = m.Result.Size() - n += 1 + l + sovEscrow(uint64(l)) - } - l = len(m.EscrowSignature) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *PayinStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Paid { - n += 2 - } - if m.ChannelId != 0 { - n += 1 + sovEscrow(uint64(m.ChannelId)) - } - l = len(m.EscrowAddress) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.EscrowSignedTime) - n += 1 + l + sovEscrow(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SignedPayinStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Status != nil { - l = m.Status.Size() - n += 1 + l + sovEscrow(uint64(l)) - } - l = len(m.EscrowSignature) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *PayoutStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ContractId) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.EscrowId != 0 { - n += 1 + sovEscrow(uint64(m.EscrowId)) - } - l = len(m.FromAddress) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - l = len(m.ToAddress) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - l = len(m.AuthAddress) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.Status != 0 { - n += 1 + sovEscrow(uint64(m.Status)) - } - if m.Amount != 0 { - n += 1 + sovEscrow(uint64(m.Amount)) - } - if m.Collateral != 0 { - n += 1 + sovEscrow(uint64(m.Collateral)) - } - if m.Withhold != 0 { - n += 1 + sovEscrow(uint64(m.Withhold)) - } - if m.PaidAmount != 0 { - n += 1 + sovEscrow(uint64(m.PaidAmount)) - } - if m.NumPaid != 0 { - n += 1 + sovEscrow(uint64(m.NumPaid)) - } - if m.LeftAmount != 0 { - n += 1 + sovEscrow(uint64(m.LeftAmount)) - } - if m.NumLeft != 0 { - n += 1 + sovEscrow(uint64(m.NumLeft)) - } - if m.NextAmount != 0 { - n += 1 + sovEscrow(uint64(m.NextAmount)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.LastPayoutTime) - n += 1 + l + sovEscrow(uint64(l)) - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.NextPayoutTime) - n += 2 + l + sovEscrow(uint64(l)) - l = len(m.EscrowAddress) - if l > 0 { - n += 2 + l + sovEscrow(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.EscrowSignTime) - n += 2 + l + sovEscrow(uint64(l)) - l = len(m.ErrorMsg) - if l > 0 { - n += 2 + l + sovEscrow(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.LastModifyTime) - n += 2 + l + sovEscrow(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SignedPayoutStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Status != nil { - l = m.Status.Size() - n += 1 + l + sovEscrow(uint64(l)) - } - l = len(m.EscrowSignature) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SignedPayoutStatusBatch) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Status) > 0 { - for _, e := range m.Status { - l = e.Size() - n += 1 + l + sovEscrow(uint64(l)) - } - } - l = len(m.EscrowSignature) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CancelContractRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ContractId) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - l = len(m.AuthAddress) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.AuthSignedTime) - n += 1 + l + sovEscrow(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SignedCancelRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Request != nil { - l = m.Request.Size() - n += 1 + l + sovEscrow(uint64(l)) - } - l = len(m.AuthSignature) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CancelContractResult) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ContractId) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.EscrowId != 0 { - n += 1 + sovEscrow(uint64(m.EscrowId)) - } - if m.Canceled { - n += 2 - } - l = len(m.EscrowAddress) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.EscrowSignedTime) - n += 1 + l + sovEscrow(uint64(l)) - if m.Amount != 0 { - n += 1 + sovEscrow(uint64(m.Amount)) - } - if m.Paid { - n += 2 - } - l = len(m.Reference) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SignedCancelContractResult) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Result != nil { - l = m.Result.Size() - n += 1 + l + sovEscrow(uint64(l)) - } - l = len(m.EscrowSignature) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *PayoutAddress) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ToAddress) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.SignedTime) - n += 1 + l + sovEscrow(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SignedPayoutAddress) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Address != nil { - l = m.Address.Size() - n += 1 + l + sovEscrow(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Payment) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ContractId) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.EscrowId != 0 { - n += 1 + sovEscrow(uint64(m.EscrowId)) - } - l = len(m.FromAddress) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - l = len(m.ToAddress) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.Amount != 0 { - n += 1 + sovEscrow(uint64(m.Amount)) - } - if m.Index != 0 { - n += 1 + sovEscrow(uint64(m.Index)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *PaymentResult) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Payment) > 0 { - for _, e := range m.Payment { - l = e.Size() - n += 1 + l + sovEscrow(uint64(l)) - } - } - l = len(m.EscrowAddress) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.EscrowSignedTime) - n += 1 + l + sovEscrow(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SignedPaymentResult) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Result != nil { - l = m.Result.Size() - n += 1 + l + sovEscrow(uint64(l)) - } - l = len(m.EscrowSignature) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *BalanceResult) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Balance != 0 { - n += 1 + sovEscrow(uint64(m.Balance)) - } - l = len(m.EscrowAddress) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.EscrowSignedTime) - n += 1 + l + sovEscrow(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SignedBalanceResult) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Result != nil { - l = m.Result.Size() - n += 1 + l + sovEscrow(uint64(l)) - } - l = len(m.EscrowSignature) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SignedStakeRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Data != nil { - l = m.Data.Size() - n += 1 + l + sovEscrow(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *StakeRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.StakerId) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.StakeAmount != 0 { - n += 1 + sovEscrow(uint64(m.StakeAmount)) - } - if m.TransferRequest != nil { - l = m.TransferRequest.Size() - n += 1 + l + sovEscrow(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.RequestTime) - n += 1 + l + sovEscrow(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *StakeResult) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.StakerId) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.Balance != 0 { - n += 1 + sovEscrow(uint64(m.Balance)) - } - if m.MatureAmount != 0 { - n += 1 + sovEscrow(uint64(m.MatureAmount)) - } - if m.PendingAmount != 0 { - n += 1 + sovEscrow(uint64(m.PendingAmount)) - } - if len(m.Ledgers) > 0 { - for _, e := range m.Ledgers { - l = e.Size() - n += 1 + l + sovEscrow(uint64(l)) - } - } - if len(m.UnfinishLedgers) > 0 { - for _, e := range m.UnfinishLedgers { - l = e.Size() - n += 1 + l + sovEscrow(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SignedStakeResult) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Data != nil { - l = m.Data.Size() - n += 1 + l + sovEscrow(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *StakeLedger) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.StakerId) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.Amount != 0 { - n += 1 + sovEscrow(uint64(m.Amount)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.StartTime) - n += 1 + l + sovEscrow(uint64(l)) - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.MatureTime) - n += 1 + l + sovEscrow(uint64(l)) - l = len(m.OperatorId) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.Type != 0 { - n += 1 + sovEscrow(uint64(m.Type)) - } - l = len(m.OperationLog) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *UnfinishStakeLedger) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.StakerId) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.Amount != 0 { - n += 1 + sovEscrow(uint64(m.Amount)) - } - if m.Status != 0 { - n += 1 + sovEscrow(uint64(m.Status)) - } - l = len(m.FailReason) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.SubmitTime) - n += 1 + l + sovEscrow(uint64(l)) - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.FailTime) - n += 1 + l + sovEscrow(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SignedStakePenaltyRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Data != nil { - l = m.Data.Size() - n += 1 + l + sovEscrow(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *StakePenaltyRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.StakerId) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - l = len(m.OperatorId) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.Reason != 0 { - n += 1 + sovEscrow(uint64(m.Reason)) - } - l = len(m.OperationLog) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.Amount != 0 { - n += 1 + sovEscrow(uint64(m.Amount)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.SubmitTime) - n += 1 + l + sovEscrow(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *StakePenaltyResult) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.StakerId) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.RequestPenaltyAmount != 0 { - n += 1 + sovEscrow(uint64(m.RequestPenaltyAmount)) - } - if m.OperatePenaltyAmount != 0 { - n += 1 + sovEscrow(uint64(m.OperatePenaltyAmount)) - } - l = len(m.OperatorId) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.ReceiveTime) - n += 1 + l + sovEscrow(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SignedStakePenaltyResult) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Data != nil { - l = m.Data.Size() - n += 1 + l + sovEscrow(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovEscrow(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovEscrow(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozEscrow(x uint64) (n int) { - return sovEscrow(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ContractID) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ContractID: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ContractID: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContractId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) - if m.Address == nil { - m.Address = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ContractIDBatch) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ContractIDBatch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ContractIDBatch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContractId = append(m.ContractId, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) - if m.Address == nil { - m.Address = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignedContractID) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignedContractID: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignedContractID: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Data == nil { - m.Data = &ContractID{} - } - if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignedContractIDBatch) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignedContractIDBatch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignedContractIDBatch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Data == nil { - m.Data = &ContractIDBatch{} - } - if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignedModifyContractIDBatch) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignedModifyContractIDBatch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignedModifyContractIDBatch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Data == nil { - m.Data = &ContractIDBatch{} - } - if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastModifyTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.LastModifyTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EscrowContract) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EscrowContract: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EscrowContract: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContractId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BuyerAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BuyerAddress = append(m.BuyerAddress[:0], dAtA[iNdEx:postIndex]...) - if m.BuyerAddress == nil { - m.BuyerAddress = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SellerAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SellerAddress = append(m.SellerAddress[:0], dAtA[iNdEx:postIndex]...) - if m.SellerAddress == nil { - m.SellerAddress = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AuthAddress = append(m.AuthAddress[:0], dAtA[iNdEx:postIndex]...) - if m.AuthAddress == nil { - m.AuthAddress = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - m.Amount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Amount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CollateralAmount", wireType) - } - m.CollateralAmount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CollateralAmount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WithholdAmount", wireType) - } - m.WithholdAmount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.WithholdAmount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenType", wireType) - } - m.TokenType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TokenType |= TokenType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PayoutSchedule", wireType) - } - m.PayoutSchedule = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PayoutSchedule |= Schedule(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NumPayouts", wireType) - } - m.NumPayouts = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NumPayouts |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reference", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Reference = append(m.Reference[:0], dAtA[iNdEx:postIndex]...) - if m.Reference == nil { - m.Reference = []byte{} - } - iNdEx = postIndex - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CustomizePayoutPeriod", wireType) - } - m.CustomizePayoutPeriod = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CustomizePayoutPeriod |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= ContractType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 14: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ContingentAmount", wireType) - } - m.ContingentAmount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ContingentAmount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignedEscrowContract) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignedEscrowContract: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignedEscrowContract: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Contract", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Contract == nil { - m.Contract = &EscrowContract{} - } - if err := m.Contract.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BuyerSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BuyerSignature = append(m.BuyerSignature[:0], dAtA[iNdEx:postIndex]...) - if m.BuyerSignature == nil { - m.BuyerSignature = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SellerSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SellerSignature = append(m.SellerSignature[:0], dAtA[iNdEx:postIndex]...) - if m.SellerSignature == nil { - m.SellerSignature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EscrowContractRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EscrowContractRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EscrowContractRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Contract", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Contract = append(m.Contract, &SignedEscrowContract{}) - if err := m.Contract[len(m.Contract)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BuyerChannel", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BuyerChannel == nil { - m.BuyerChannel = &ledger.SignedChannelCommit{} - } - if err := m.BuyerChannel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Escrow) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Escrow: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Escrow: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContractId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowId", wireType) - } - m.EscrowId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EscrowId |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FromAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FromAddress = append(m.FromAddress[:0], dAtA[iNdEx:postIndex]...) - if m.FromAddress == nil { - m.FromAddress = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ToAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ToAddress = append(m.ToAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ToAddress == nil { - m.ToAddress = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - m.Amount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Amount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CollateralAmount", wireType) - } - m.CollateralAmount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CollateralAmount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ErrorCode", wireType) - } - m.ErrorCode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ErrorCode |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ErrorMessage", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ErrorMessage = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SubmitContractResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SubmitContractResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SubmitContractResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PayinId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PayinId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Escrow", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Escrow = append(m.Escrow, &Escrow{}) - if err := m.Escrow[len(m.Escrow)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EscrowAddress = append(m.EscrowAddress[:0], dAtA[iNdEx:postIndex]...) - if m.EscrowAddress == nil { - m.EscrowAddress = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowSignedTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.EscrowSignedTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BuyerChannelState", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BuyerChannelState == nil { - m.BuyerChannelState = &ledger.SignedChannelState{} - } - if err := m.BuyerChannelState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignedSubmitContractResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignedSubmitContractResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignedSubmitContractResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Result == nil { - m.Result = &SubmitContractResult{} - } - if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EscrowSignature = append(m.EscrowSignature[:0], dAtA[iNdEx:postIndex]...) - if m.EscrowSignature == nil { - m.EscrowSignature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StartEscrowResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StartEscrowResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StartEscrowResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Escrow", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Escrow = append(m.Escrow, &Escrow{}) - if err := m.Escrow[len(m.Escrow)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EscrowAddress = append(m.EscrowAddress[:0], dAtA[iNdEx:postIndex]...) - if m.EscrowAddress == nil { - m.EscrowAddress = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowSignedTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.EscrowSignedTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignedStartEscrowResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignedStartEscrowResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignedStartEscrowResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Result == nil { - m.Result = &StartEscrowResult{} - } - if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EscrowSignature = append(m.EscrowSignature[:0], dAtA[iNdEx:postIndex]...) - if m.EscrowSignature == nil { - m.EscrowSignature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PayinRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PayinRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PayinRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PayinId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PayinId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BuyerAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BuyerAddress = append(m.BuyerAddress[:0], dAtA[iNdEx:postIndex]...) - if m.BuyerAddress == nil { - m.BuyerAddress = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BuyerChannelState", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BuyerChannelState == nil { - m.BuyerChannelState = &ledger.SignedChannelState{} - } - if err := m.BuyerChannelState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignedPayinRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignedPayinRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignedPayinRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Request == nil { - m.Request = &PayinRequest{} - } - if err := m.Request.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BuyerSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BuyerSignature = append(m.BuyerSignature[:0], dAtA[iNdEx:postIndex]...) - if m.BuyerSignature == nil { - m.BuyerSignature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PayinResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PayinResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PayinResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PayinId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PayinId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - m.Amount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Amount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) - } - m.ChannelId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ChannelId |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EscrowAddress = append(m.EscrowAddress[:0], dAtA[iNdEx:postIndex]...) - if m.EscrowAddress == nil { - m.EscrowAddress = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowSignedTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.EscrowSignedTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignedPayinResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignedPayinResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignedPayinResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Result == nil { - m.Result = &PayinResult{} - } - if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EscrowSignature = append(m.EscrowSignature[:0], dAtA[iNdEx:postIndex]...) - if m.EscrowSignature == nil { - m.EscrowSignature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PayinStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PayinStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PayinStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Paid", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Paid = bool(v != 0) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) - } - m.ChannelId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ChannelId |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EscrowAddress = append(m.EscrowAddress[:0], dAtA[iNdEx:postIndex]...) - if m.EscrowAddress == nil { - m.EscrowAddress = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowSignedTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.EscrowSignedTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignedPayinStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignedPayinStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignedPayinStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Status == nil { - m.Status = &PayinStatus{} - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EscrowSignature = append(m.EscrowSignature[:0], dAtA[iNdEx:postIndex]...) - if m.EscrowSignature == nil { - m.EscrowSignature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PayoutStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PayoutStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PayoutStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContractId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowId", wireType) - } - m.EscrowId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EscrowId |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FromAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FromAddress = append(m.FromAddress[:0], dAtA[iNdEx:postIndex]...) - if m.FromAddress == nil { - m.FromAddress = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ToAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ToAddress = append(m.ToAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ToAddress == nil { - m.ToAddress = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AuthAddress = append(m.AuthAddress[:0], dAtA[iNdEx:postIndex]...) - if m.AuthAddress == nil { - m.AuthAddress = []byte{} - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - m.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Status |= EscrowStatus(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - m.Amount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Amount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Collateral", wireType) - } - m.Collateral = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Collateral |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Withhold", wireType) - } - m.Withhold = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Withhold |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PaidAmount", wireType) - } - m.PaidAmount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PaidAmount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NumPaid", wireType) - } - m.NumPaid = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NumPaid |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LeftAmount", wireType) - } - m.LeftAmount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LeftAmount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NumLeft", wireType) - } - m.NumLeft = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NumLeft |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 14: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NextAmount", wireType) - } - m.NextAmount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NextAmount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastPayoutTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.LastPayoutTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NextPayoutTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.NextPayoutTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EscrowAddress = append(m.EscrowAddress[:0], dAtA[iNdEx:postIndex]...) - if m.EscrowAddress == nil { - m.EscrowAddress = []byte{} - } - iNdEx = postIndex - case 18: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowSignTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.EscrowSignTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 19: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ErrorMsg", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ErrorMsg = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 20: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastModifyTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.LastModifyTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignedPayoutStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignedPayoutStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignedPayoutStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Status == nil { - m.Status = &PayoutStatus{} - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EscrowSignature = append(m.EscrowSignature[:0], dAtA[iNdEx:postIndex]...) - if m.EscrowSignature == nil { - m.EscrowSignature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignedPayoutStatusBatch) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignedPayoutStatusBatch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignedPayoutStatusBatch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Status = append(m.Status, &PayoutStatus{}) - if err := m.Status[len(m.Status)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EscrowSignature = append(m.EscrowSignature[:0], dAtA[iNdEx:postIndex]...) - if m.EscrowSignature == nil { - m.EscrowSignature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CancelContractRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CancelContractRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CancelContractRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContractId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AuthAddress = append(m.AuthAddress[:0], dAtA[iNdEx:postIndex]...) - if m.AuthAddress == nil { - m.AuthAddress = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthSignedTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.AuthSignedTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignedCancelRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignedCancelRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignedCancelRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Request == nil { - m.Request = &CancelContractRequest{} - } - if err := m.Request.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AuthSignature = append(m.AuthSignature[:0], dAtA[iNdEx:postIndex]...) - if m.AuthSignature == nil { - m.AuthSignature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CancelContractResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CancelContractResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CancelContractResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContractId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowId", wireType) - } - m.EscrowId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EscrowId |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Canceled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Canceled = bool(v != 0) - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EscrowAddress = append(m.EscrowAddress[:0], dAtA[iNdEx:postIndex]...) - if m.EscrowAddress == nil { - m.EscrowAddress = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowSignedTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.EscrowSignedTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - m.Amount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Amount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Paid", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Paid = bool(v != 0) - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reference", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Reference = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignedCancelContractResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignedCancelContractResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignedCancelContractResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Result == nil { - m.Result = &CancelContractResult{} - } - if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EscrowSignature = append(m.EscrowSignature[:0], dAtA[iNdEx:postIndex]...) - if m.EscrowSignature == nil { - m.EscrowSignature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PayoutAddress) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PayoutAddress: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PayoutAddress: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ToAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ToAddress = append(m.ToAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ToAddress == nil { - m.ToAddress = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SignedTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.SignedTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignedPayoutAddress) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignedPayoutAddress: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignedPayoutAddress: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Address == nil { - m.Address = &PayoutAddress{} - } - if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Payment) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Payment: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Payment: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContractId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowId", wireType) - } - m.EscrowId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EscrowId |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FromAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FromAddress = append(m.FromAddress[:0], dAtA[iNdEx:postIndex]...) - if m.FromAddress == nil { - m.FromAddress = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ToAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ToAddress = append(m.ToAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ToAddress == nil { - m.ToAddress = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - m.Amount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Amount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - m.Index = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Index |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PaymentResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PaymentResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PaymentResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payment", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payment = append(m.Payment, &Payment{}) - if err := m.Payment[len(m.Payment)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EscrowAddress = append(m.EscrowAddress[:0], dAtA[iNdEx:postIndex]...) - if m.EscrowAddress == nil { - m.EscrowAddress = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowSignedTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.EscrowSignedTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignedPaymentResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignedPaymentResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignedPaymentResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Result == nil { - m.Result = &PaymentResult{} - } - if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EscrowSignature = append(m.EscrowSignature[:0], dAtA[iNdEx:postIndex]...) - if m.EscrowSignature == nil { - m.EscrowSignature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BalanceResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BalanceResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BalanceResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) - } - m.Balance = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Balance |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EscrowAddress = append(m.EscrowAddress[:0], dAtA[iNdEx:postIndex]...) - if m.EscrowAddress == nil { - m.EscrowAddress = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowSignedTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.EscrowSignedTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignedBalanceResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignedBalanceResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignedBalanceResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Result == nil { - m.Result = &BalanceResult{} - } - if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EscrowSignature = append(m.EscrowSignature[:0], dAtA[iNdEx:postIndex]...) - if m.EscrowSignature == nil { - m.EscrowSignature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignedStakeRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignedStakeRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignedStakeRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Data == nil { - m.Data = &StakeRequest{} - } - if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StakeRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StakeRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StakeRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StakerId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StakerId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StakeAmount", wireType) - } - m.StakeAmount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StakeAmount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TransferRequest", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TransferRequest == nil { - m.TransferRequest = &ledger.SignedTransferRequest{} - } - if err := m.TransferRequest.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.RequestTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StakeResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StakeResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StakeResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StakerId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StakerId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) - } - m.Balance = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Balance |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MatureAmount", wireType) - } - m.MatureAmount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MatureAmount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PendingAmount", wireType) - } - m.PendingAmount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PendingAmount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ledgers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Ledgers = append(m.Ledgers, &StakeLedger{}) - if err := m.Ledgers[len(m.Ledgers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnfinishLedgers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UnfinishLedgers = append(m.UnfinishLedgers, &UnfinishStakeLedger{}) - if err := m.UnfinishLedgers[len(m.UnfinishLedgers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignedStakeResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignedStakeResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignedStakeResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Data == nil { - m.Data = &StakeResult{} - } - if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StakeLedger) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StakeLedger: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StakeLedger: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StakerId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StakerId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - m.Amount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Amount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.StartTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MatureTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.MatureTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OperatorId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OperatorId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= OperationType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OperationLog", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OperationLog = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnfinishStakeLedger) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UnfinishStakeLedger: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnfinishStakeLedger: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StakerId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StakerId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - m.Amount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Amount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - m.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Status |= StakeStatus(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FailReason", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FailReason = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubmitTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.SubmitTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FailTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.FailTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignedStakePenaltyRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignedStakePenaltyRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignedStakePenaltyRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Data == nil { - m.Data = &StakePenaltyRequest{} - } - if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StakePenaltyRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StakePenaltyRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StakePenaltyRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StakerId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StakerId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OperatorId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OperatorId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) - } - m.Reason = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Reason |= OperationType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OperationLog", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OperationLog = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - m.Amount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Amount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubmitTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.SubmitTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StakePenaltyResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StakePenaltyResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StakePenaltyResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StakerId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StakerId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestPenaltyAmount", wireType) - } - m.RequestPenaltyAmount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RequestPenaltyAmount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field OperatePenaltyAmount", wireType) - } - m.OperatePenaltyAmount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.OperatePenaltyAmount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OperatorId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OperatorId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReceiveTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.ReceiveTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignedStakePenaltyResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignedStakePenaltyResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignedStakePenaltyResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Data == nil { - m.Data = &StakePenaltyResult{} - } - if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEscrow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEscrow - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEscrow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEscrow(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEscrow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipEscrow(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEscrow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEscrow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEscrow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthEscrow - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupEscrow - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthEscrow - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthEscrow = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowEscrow = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupEscrow = fmt.Errorf("proto: unexpected end of group") -) diff --git a/protos/escrow/escrow.proto b/protos/escrow/escrow.proto deleted file mode 100644 index 4974159..0000000 --- a/protos/escrow/escrow.proto +++ /dev/null @@ -1,454 +0,0 @@ -syntax = "proto3"; - -package escrow; - -// gogo plugin toggles -option (gogoproto.gogoproto_import) = true; -option (gogoproto.goproto_registration) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.messagename_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.unmarshaler_all) = true; -// golang option -option go_package = "escrow"; -// java options -option java_multiple_files = true; -option java_outer_classname = "EscrowProto"; -option java_package = "io.btfs.escrow"; - -import "github.com/tron-us/protobuf/gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "protos/ledger/ledger.proto"; - -service EscrowService { - // buyer submit contracts to escrow after buyer and seller agreed contract - // one contract is one buyer to one seller, and is one escrow in escrow service - // buyer can submit multiple contracts in one request - // return same number of results as request contracts - rpc SubmitContracts(EscrowContractRequest) returns (SignedSubmitContractResult); - rpc StartEscrow(EscrowContractRequest) returns (SignedStartEscrowResult); - // after submit contract, buyer request to pay in - // escrow will transfer contract amount from buyer wallet to escrow wallet - rpc PayIn(SignedPayinRequest) returns (SignedPayinResult); - // seller use this to check if a contract is paid in - rpc IsPaid(SignedContractID) returns (SignedPayinStatus); - // check escrow pay out to seller status of a contract - rpc GetPayOutStatus(SignedContractID) returns (SignedPayoutStatus); - //get the payout status in batch - rpc GetPayOutStatusBatch(SignedContractIDBatch) returns (SignedPayoutStatusBatch); - //get the modified payout status in batch - rpc GetModifyPayOutStatusBatch(SignedModifyContractIDBatch) returns (SignedPayoutStatusBatch); - // auth request to cancel the contract - // escrow will cancel the left payments to seller - rpc CancelContracts(SignedCancelRequest) returns (SignedCancelContractResult); - // seller query what new payments to receive - rpc MyPayment(SignedPayoutAddress) returns (SignedPaymentResult); - // query balance and create account if account not exist - rpc BalanceOf(ledger.SignedCreateAccountRequest) returns (SignedBalanceResult); - // Creates a channel on the ledger and returns the ID of the ledger - rpc CreateChannel(ledger.SignedChannelCommit) returns (ledger.ChannelID); - // Closes a channel on the ledger. - rpc CloseChannel(ledger.SignedChannelState) returns (ledger.ChannelClosed); - //use escrow as proxy to do the payment - rpc Pay(ledger.SignedTransferRequest) returns (ledger.TransferResult); - rpc Stake(SignedStakeRequest) returns (SignedStakeResult); - rpc StakePenalty(SignedStakePenaltyRequest) returns (SignedStakePenaltyResult); -} - -enum TokenType { - BTT = 0; -} - -enum Schedule { - MONTHLY = 0; - QUARTERLY = 1; - ANNUALLY = 2; - CUSTOMIZED = 3; -} - -enum ContractType { - REGULAR = 0; - PLAN = 1; - REVISE = 2; -} - -message ContractID { - string contract_id = 1; - bytes address = 2; -} - -message ContractIDBatch { - repeated string contract_id = 1; - bytes address = 2; -} - -message SignedContractID { - ContractID data = 1; - bytes signature = 2; -} - -message SignedContractIDBatch { - ContractIDBatch data = 1; - bytes signature = 2; -} - -message SignedModifyContractIDBatch { - ContractIDBatch data = 1; - google.protobuf.Timestamp last_modify_time = 2 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - bytes signature = 3; -} - -message EscrowContract { - string contract_id = 1; // identity of a contract - bytes buyer_address = 2; - bytes seller_address = 3; - bytes auth_address = 4; // authority who can cancel escrow - int64 amount = 5; - int64 collateral_amount = 6; - int64 withhold_amount = 7; // escrow hold amount till the last layment - TokenType token_type = 8; // token type enum - Schedule payout_schedule = 9; // schedule enum - int32 num_payouts = 10; // numbers of payouts - bytes reference = 11; // reference like hash value etc - int32 customize_payout_period = 12; // customized payout period in days - ContractType type = 13; - int64 contingent_amount = 14; -} - -message SignedEscrowContract { - EscrowContract contract = 1; - bytes buyer_signature = 2; - bytes seller_signature = 3; -} - -message EscrowContractRequest { - repeated SignedEscrowContract contract = 1; - ledger.SignedChannelCommit buyer_channel = 2; // ledger channel commit from buyer to escrow -} - -message Escrow { - string contract_id = 1; - int64 escrow_id = 2; - bytes from_address = 3; - bytes to_address = 4; - int64 amount = 5; - int64 collateral_amount = 6; - int32 error_code = 7; - string error_message = 8; -} - -message SubmitContractResult { - string payin_id = 1; // for buyer to pay in a group of escrows - repeated Escrow escrow = 2; - bytes escrow_address = 3; - google.protobuf.Timestamp escrow_signed_time = 4 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - ledger.SignedChannelState buyer_channel_state = 5; // escrow signed then send to buyer to sign -} - -message SignedSubmitContractResult { - SubmitContractResult result = 1; - bytes escrow_signature = 2; -} - -message StartEscrowResult { - repeated Escrow escrow = 1; - bytes escrow_address = 2; - google.protobuf.Timestamp escrow_signed_time = 3 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; -} - -message SignedStartEscrowResult { - StartEscrowResult result = 1; - bytes escrow_signature = 2; -} - -message PayinRequest { - string payin_id = 1; - bytes buyer_address = 2; - ledger.SignedChannelState buyer_channel_state = 3; // buyer signed ledger channel state -} - -message SignedPayinRequest { - PayinRequest request = 1; - bytes buyer_signature = 2; -} - -message PayinResult { - string payin_id = 1; - int64 amount = 2; - int64 channel_id = 3; // ledger channel id - bytes escrow_address = 4; - google.protobuf.Timestamp escrow_signed_time = 5 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; -} - -message SignedPayinResult { - PayinResult result = 1; - bytes escrow_signature = 2; -} - -message PayinStatus { - bool paid = 1; - int64 channel_id = 2; // ledger channel id - bytes escrow_address = 3; - google.protobuf.Timestamp escrow_signed_time = 4 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; -} - -message SignedPayinStatus { - PayinStatus status = 1; - bytes escrow_signature = 2; -} - -enum EscrowStatus { - INITIATED = 0; - ACTIVE = 1; - CANCELED = 2; - CLOSED = 3; - NOTSTART = 4; - NOTSTART_PAID = 5; -} - -message PayoutStatus { - string contract_id = 1; - int64 escrow_id = 2; - bytes from_address = 3; - bytes to_address = 4; - bytes auth_address = 5; - EscrowStatus status = 6; - int64 amount = 7; - int64 collateral = 8; - int64 withhold = 9; - int64 paid_amount = 10; // amount escrow already paid - int32 num_paid = 11; // how many times escrow already paid - int64 left_amount = 12; - int32 num_left = 13; // how many times left escrow is going to pay - int64 next_amount = 14; // next payout amount - google.protobuf.Timestamp last_payout_time = 15 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - google.protobuf.Timestamp next_payout_time = 16 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - bytes escrow_address = 17; - google.protobuf.Timestamp escrow_sign_time = 18 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - string error_msg = 19; - google.protobuf.Timestamp last_modify_time = 20 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; -} - -message SignedPayoutStatus { - PayoutStatus status = 1; - bytes escrow_signature = 2; -} - -message SignedPayoutStatusBatch { - repeated PayoutStatus status = 1; - bytes escrow_signature = 2; -} - -message CancelContractRequest { - string contract_id = 1; - bytes auth_address = 2; - google.protobuf.Timestamp auth_signed_time = 3 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; -} - -message SignedCancelRequest { - CancelContractRequest request = 1; - bytes auth_signature = 2; // authority signature -} - -message CancelContractResult { - string contract_id = 1; - int64 escrow_id = 2; - bool canceled = 3; - bytes escrow_address = 4; - google.protobuf.Timestamp escrow_signed_time = 5 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - int64 amount = 6; - bool paid = 7; - string reference = 8; -} - -message SignedCancelContractResult { - CancelContractResult result = 1; - bytes escrow_signature = 2; -} - -message PayoutAddress { - bytes to_address = 1; - google.protobuf.Timestamp signed_time = 2 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; -} - -message SignedPayoutAddress { - PayoutAddress address = 1; - bytes signature = 2; -} - -message Payment { - string contract_id = 1; - int64 escrow_id = 2; - bytes from_address = 3; - bytes to_address = 4; - int64 amount = 5; - int32 index = 6; -} - -message PaymentResult { - repeated Payment payment = 1; - bytes escrow_address = 2; - google.protobuf.Timestamp escrow_signed_time = 3 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; -} - -message SignedPaymentResult { - PaymentResult result = 1; - bytes escrow_signature = 2; -} - -message BalanceResult { - int64 balance = 1; - bytes escrow_address = 2; - google.protobuf.Timestamp escrow_signed_time = 3 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; -} - -message SignedBalanceResult { - BalanceResult result = 1; - bytes escrow_signature = 2; -} - -message SignedStakeRequest { - StakeRequest data = 1; - bytes signature = 2; -} - -message StakeRequest { - string staker_id = 1; - int64 stake_amount = 2; //the amount can be 0 which mean query only, if negative means stake, positive means un-stake - ledger.SignedTransferRequest transfer_request = 3; //if the request is used for stake, need to fill this object - google.protobuf.Timestamp request_time = 4 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; -} - -message StakeResult { - string staker_id = 1; - int64 balance = 2; - int64 mature_amount = 3; //the amount can be stake now - int64 pending_amount = 4; //the amount which is in request, but not finalized - repeated StakeLedger ledgers = 5; - repeated UnfinishStakeLedger unfinish_ledgers = 6; -} - -message SignedStakeResult { - StakeResult data = 1; - bytes signature = 2; -} - -message StakeLedger { - string staker_id = 1; - int64 amount = 2; - google.protobuf.Timestamp start_time = 3 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - google.protobuf.Timestamp mature_time = 4 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - string operator_id = 5; - OperationType type = 6; - string operation_log = 7; -} - -enum StakeStatus { - PROCEEDING = 0; - FAIL = 1; -} - -message UnfinishStakeLedger { - string staker_id = 1; - int64 amount = 2; - StakeStatus status = 3; - string fail_reason = 4; - google.protobuf.Timestamp submit_time = 5 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - google.protobuf.Timestamp fail_time = 6 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; -} - -message SignedStakePenaltyRequest { - StakePenaltyRequest data = 1; - bytes signature = 2; -} - -enum OperationType { - STAKE = 0; - CHEAT_PENALTY = 1; - LOST_SHARD_PENALTY = 2; -} - -message StakePenaltyRequest { - string staker_id = 1; - string operator_id = 2; - OperationType reason = 3; - string operation_log = 4; - int64 amount = 5; - google.protobuf.Timestamp submit_time = 6 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; -} - -message StakePenaltyResult { - string staker_id = 1; - int64 request_penalty_amount = 2; - int64 operate_penalty_amount = 3; - string operator_id = 4; - google.protobuf.Timestamp receive_time = 5 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; -} - -message SignedStakePenaltyResult { - StakePenaltyResult data = 1; - bytes signature = 2; -} diff --git a/protos/exchange/exchange.pb.go b/protos/exchange/exchange.pb.go deleted file mode 100644 index 2f67f87..0000000 --- a/protos/exchange/exchange.pb.go +++ /dev/null @@ -1,344 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: protos/exchange/exchange.proto - -package protocol - -import ( - context "context" - fmt "fmt" - proto "github.com/tron-us/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -func init() { proto.RegisterFile("protos/exchange/exchange.proto", fileDescriptor_b8e4cc6fcea5eff3) } - -var fileDescriptor_b8e4cc6fcea5eff3 = []byte{ - // 260 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0x4d, 0x4b, 0xc4, 0x30, - 0x10, 0x40, 0x2f, 0xa2, 0x25, 0x07, 0x95, 0x1c, 0xc4, 0xed, 0x41, 0x57, 0x0f, 0x1e, 0x2b, 0xe8, - 0x5d, 0x28, 0xab, 0x67, 0x3f, 0x51, 0x3c, 0x88, 0xc4, 0x38, 0xda, 0x80, 0x9b, 0x89, 0x99, 0xa9, - 0x1f, 0x3f, 0xd1, 0x7f, 0x25, 0xd4, 0x64, 0xbb, 0x66, 0xb3, 0x3d, 0xb5, 0xf0, 0x5e, 0x5e, 0x86, - 0x8c, 0xd8, 0x71, 0x1e, 0x19, 0xe9, 0x10, 0xbe, 0x74, 0xa3, 0xec, 0x2b, 0xcc, 0x7e, 0xaa, 0x0e, - 0xc8, 0xa2, 0xfb, 0x68, 0x7c, 0x2b, 0x0f, 0x96, 0x99, 0x8f, 0x53, 0x20, 0x52, 0xf1, 0xc4, 0xd1, - 0xcf, 0x8a, 0x28, 0xce, 0x02, 0x92, 0xb7, 0x62, 0xe3, 0xc2, 0x83, 0x53, 0x1e, 0xee, 0x0c, 0x37, - 0xcf, 0x5e, 0x7d, 0xca, 0x71, 0x15, 0x93, 0x55, 0x82, 0xae, 0xe0, 0xbd, 0x05, 0xe2, 0x72, 0x6f, - 0xc0, 0x20, 0x87, 0x96, 0x40, 0xd6, 0xa2, 0x98, 0x05, 0x47, 0xbd, 0x9e, 0x96, 0xca, 0x1c, 0x0a, - 0x89, 0x6b, 0xb1, 0x1e, 0xea, 0xa7, 0xe0, 0x90, 0x0c, 0xcb, 0xdd, 0x85, 0x7b, 0x03, 0x89, 0xb9, - 0xf1, 0x72, 0x21, 0x44, 0x4f, 0xc4, 0x5a, 0xac, 0x6d, 0xf7, 0x72, 0x92, 0x19, 0x65, 0x48, 0x3f, - 0xd4, 0x04, 0xed, 0x8b, 0xf1, 0xd3, 0xcc, 0x50, 0xff, 0x49, 0x66, 0xa8, 0x54, 0x08, 0xd1, 0x7b, - 0xb1, 0x79, 0xd9, 0x82, 0xff, 0xbe, 0xf1, 0xca, 0x92, 0xd2, 0x6c, 0xd0, 0xca, 0xb9, 0x37, 0x4e, - 0x59, 0x0c, 0xef, 0x0f, 0x29, 0x21, 0xfd, 0x20, 0xb6, 0x6a, 0xcd, 0xe6, 0x43, 0x31, 0xd4, 0x5a, - 0x63, 0x6b, 0xf9, 0xdc, 0x4e, 0x1a, 0x65, 0xec, 0xfc, 0x9a, 0x13, 0x23, 0xb3, 0xe6, 0x05, 0xe3, - 0x2f, 0xff, 0xb4, 0xda, 0x19, 0xc7, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf8, 0xf4, 0x2e, 0x8c, - 0xa6, 0x02, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// ExchangeClient is the client API for Exchange service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ExchangeClient interface { - PrepareWithdraw(ctx context.Context, in *PrepareWithdrawRequest, opts ...grpc.CallOption) (*PrepareWithdrawResponse, error) - Withdraw(ctx context.Context, in *WithdrawRequest, opts ...grpc.CallOption) (*WithdrawResponse, error) - PrepareDeposit(ctx context.Context, in *PrepareDepositRequest, opts ...grpc.CallOption) (*PrepareDepositResponse, error) - Deposit(ctx context.Context, in *DepositRequest, opts ...grpc.CallOption) (*DepositResponse, error) - ConfirmDeposit(ctx context.Context, in *ConfirmDepositRequest, opts ...grpc.CallOption) (*ConfirmDepositResponse, error) - QueryTransaction(ctx context.Context, in *QueryTransactionRequest, opts ...grpc.CallOption) (*QueryTransactionResponse, error) - ActivateAccountOnChain(ctx context.Context, in *ActivateAccountRequest, opts ...grpc.CallOption) (*ActivateAccountResponse, error) -} - -type exchangeClient struct { - cc *grpc.ClientConn -} - -func NewExchangeClient(cc *grpc.ClientConn) ExchangeClient { - return &exchangeClient{cc} -} - -func (c *exchangeClient) PrepareWithdraw(ctx context.Context, in *PrepareWithdrawRequest, opts ...grpc.CallOption) (*PrepareWithdrawResponse, error) { - out := new(PrepareWithdrawResponse) - err := c.cc.Invoke(ctx, "/protocol.Exchange/PrepareWithdraw", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *exchangeClient) Withdraw(ctx context.Context, in *WithdrawRequest, opts ...grpc.CallOption) (*WithdrawResponse, error) { - out := new(WithdrawResponse) - err := c.cc.Invoke(ctx, "/protocol.Exchange/Withdraw", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *exchangeClient) PrepareDeposit(ctx context.Context, in *PrepareDepositRequest, opts ...grpc.CallOption) (*PrepareDepositResponse, error) { - out := new(PrepareDepositResponse) - err := c.cc.Invoke(ctx, "/protocol.Exchange/PrepareDeposit", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *exchangeClient) Deposit(ctx context.Context, in *DepositRequest, opts ...grpc.CallOption) (*DepositResponse, error) { - out := new(DepositResponse) - err := c.cc.Invoke(ctx, "/protocol.Exchange/Deposit", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *exchangeClient) ConfirmDeposit(ctx context.Context, in *ConfirmDepositRequest, opts ...grpc.CallOption) (*ConfirmDepositResponse, error) { - out := new(ConfirmDepositResponse) - err := c.cc.Invoke(ctx, "/protocol.Exchange/ConfirmDeposit", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *exchangeClient) QueryTransaction(ctx context.Context, in *QueryTransactionRequest, opts ...grpc.CallOption) (*QueryTransactionResponse, error) { - out := new(QueryTransactionResponse) - err := c.cc.Invoke(ctx, "/protocol.Exchange/QueryTransaction", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *exchangeClient) ActivateAccountOnChain(ctx context.Context, in *ActivateAccountRequest, opts ...grpc.CallOption) (*ActivateAccountResponse, error) { - out := new(ActivateAccountResponse) - err := c.cc.Invoke(ctx, "/protocol.Exchange/ActivateAccountOnChain", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ExchangeServer is the server API for Exchange service. -type ExchangeServer interface { - PrepareWithdraw(context.Context, *PrepareWithdrawRequest) (*PrepareWithdrawResponse, error) - Withdraw(context.Context, *WithdrawRequest) (*WithdrawResponse, error) - PrepareDeposit(context.Context, *PrepareDepositRequest) (*PrepareDepositResponse, error) - Deposit(context.Context, *DepositRequest) (*DepositResponse, error) - ConfirmDeposit(context.Context, *ConfirmDepositRequest) (*ConfirmDepositResponse, error) - QueryTransaction(context.Context, *QueryTransactionRequest) (*QueryTransactionResponse, error) - ActivateAccountOnChain(context.Context, *ActivateAccountRequest) (*ActivateAccountResponse, error) -} - -// UnimplementedExchangeServer can be embedded to have forward compatible implementations. -type UnimplementedExchangeServer struct { -} - -func (*UnimplementedExchangeServer) PrepareWithdraw(ctx context.Context, req *PrepareWithdrawRequest) (*PrepareWithdrawResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PrepareWithdraw not implemented") -} -func (*UnimplementedExchangeServer) Withdraw(ctx context.Context, req *WithdrawRequest) (*WithdrawResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Withdraw not implemented") -} -func (*UnimplementedExchangeServer) PrepareDeposit(ctx context.Context, req *PrepareDepositRequest) (*PrepareDepositResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PrepareDeposit not implemented") -} -func (*UnimplementedExchangeServer) Deposit(ctx context.Context, req *DepositRequest) (*DepositResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Deposit not implemented") -} -func (*UnimplementedExchangeServer) ConfirmDeposit(ctx context.Context, req *ConfirmDepositRequest) (*ConfirmDepositResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ConfirmDeposit not implemented") -} -func (*UnimplementedExchangeServer) QueryTransaction(ctx context.Context, req *QueryTransactionRequest) (*QueryTransactionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method QueryTransaction not implemented") -} -func (*UnimplementedExchangeServer) ActivateAccountOnChain(ctx context.Context, req *ActivateAccountRequest) (*ActivateAccountResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ActivateAccountOnChain not implemented") -} - -func RegisterExchangeServer(s *grpc.Server, srv ExchangeServer) { - s.RegisterService(&_Exchange_serviceDesc, srv) -} - -func _Exchange_PrepareWithdraw_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PrepareWithdrawRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ExchangeServer).PrepareWithdraw(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Exchange/PrepareWithdraw", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ExchangeServer).PrepareWithdraw(ctx, req.(*PrepareWithdrawRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Exchange_Withdraw_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(WithdrawRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ExchangeServer).Withdraw(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Exchange/Withdraw", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ExchangeServer).Withdraw(ctx, req.(*WithdrawRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Exchange_PrepareDeposit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PrepareDepositRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ExchangeServer).PrepareDeposit(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Exchange/PrepareDeposit", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ExchangeServer).PrepareDeposit(ctx, req.(*PrepareDepositRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Exchange_Deposit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DepositRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ExchangeServer).Deposit(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Exchange/Deposit", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ExchangeServer).Deposit(ctx, req.(*DepositRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Exchange_ConfirmDeposit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ConfirmDepositRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ExchangeServer).ConfirmDeposit(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Exchange/ConfirmDeposit", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ExchangeServer).ConfirmDeposit(ctx, req.(*ConfirmDepositRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Exchange_QueryTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryTransactionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ExchangeServer).QueryTransaction(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Exchange/QueryTransaction", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ExchangeServer).QueryTransaction(ctx, req.(*QueryTransactionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Exchange_ActivateAccountOnChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ActivateAccountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ExchangeServer).ActivateAccountOnChain(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Exchange/ActivateAccountOnChain", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ExchangeServer).ActivateAccountOnChain(ctx, req.(*ActivateAccountRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Exchange_serviceDesc = grpc.ServiceDesc{ - ServiceName: "protocol.Exchange", - HandlerType: (*ExchangeServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "PrepareWithdraw", - Handler: _Exchange_PrepareWithdraw_Handler, - }, - { - MethodName: "Withdraw", - Handler: _Exchange_Withdraw_Handler, - }, - { - MethodName: "PrepareDeposit", - Handler: _Exchange_PrepareDeposit_Handler, - }, - { - MethodName: "Deposit", - Handler: _Exchange_Deposit_Handler, - }, - { - MethodName: "ConfirmDeposit", - Handler: _Exchange_ConfirmDeposit_Handler, - }, - { - MethodName: "QueryTransaction", - Handler: _Exchange_QueryTransaction_Handler, - }, - { - MethodName: "ActivateAccountOnChain", - Handler: _Exchange_ActivateAccountOnChain_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "protos/exchange/exchange.proto", -} diff --git a/protos/exchange/exchange.proto b/protos/exchange/exchange.proto deleted file mode 100644 index 7129244..0000000 --- a/protos/exchange/exchange.proto +++ /dev/null @@ -1,15 +0,0 @@ -syntax = "proto3"; - -package protocol; - -import "protos/exchange/exchange_message.proto"; - -service Exchange { - rpc PrepareWithdraw(PrepareWithdrawRequest) returns (PrepareWithdrawResponse); - rpc Withdraw(WithdrawRequest) returns (WithdrawResponse); - rpc PrepareDeposit(PrepareDepositRequest) returns (PrepareDepositResponse); - rpc Deposit(DepositRequest) returns (DepositResponse); - rpc ConfirmDeposit(ConfirmDepositRequest) returns (ConfirmDepositResponse); - rpc QueryTransaction(QueryTransactionRequest) returns (QueryTransactionResponse); - rpc ActivateAccountOnChain(ActivateAccountRequest) returns (ActivateAccountResponse); -} diff --git a/protos/exchange/exchange_message.pb.go b/protos/exchange/exchange_message.pb.go deleted file mode 100644 index c351185..0000000 --- a/protos/exchange/exchange_message.pb.go +++ /dev/null @@ -1,1653 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: protos/exchange/exchange_message.proto - -package protocol - -import ( - fmt "fmt" - ledger "github.com/bittorrent/go-btfs-common/protos/ledger" - types "github.com/gogo/protobuf/types" - proto "github.com/tron-us/protobuf/proto" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type ResponseReturnCode int32 - -const ( - Response_SUCCESS ResponseReturnCode = 0 - Response_AMOUNT_ILLEGAL ResponseReturnCode = 1 - Response_REMOTE_CALL_ERROR ResponseReturnCode = 2 - Response_INACTIVATED_ACCOUNT ResponseReturnCode = 3 - Response_TRON_BALANCE_INSUFFICIENT ResponseReturnCode = 4 - Response_CHANNEL_CLOSED ResponseReturnCode = 5 - Response_CHANNEL_ADDRESS_ILLEGAL ResponseReturnCode = 6 - Response_REQUEST_PARAM_ILLEGAL ResponseReturnCode = 7 - Response_TRANSFER_ADDRESS_FAILED ResponseReturnCode = 8 - Response_SIGN_FAILED ResponseReturnCode = 9 - Response_MARSHAL_FAILED ResponseReturnCode = 10 - Response_DATABASE_ERROR ResponseReturnCode = 11 - Response_TRANSACTION_EXIST ResponseReturnCode = 12 - Response_BROADCAST_ERROR ResponseReturnCode = 13 - Response_HASH_FAILED ResponseReturnCode = 14 - Response_USER_TRON_BALANCE_INSUFFICIENT ResponseReturnCode = 15 - Response_LEDGER_BALANCE_INSUFFICIENT ResponseReturnCode = 16 - Response_TRANSACTION_NOT_EXIST ResponseReturnCode = 17 - Response_TRANSACTION_STATUS_ILLEGAL ResponseReturnCode = 18 - Response_UNMARSHAL_FAILED ResponseReturnCode = 19 - Response_TRANSACTION_FAILED ResponseReturnCode = 20 - Response_TRANSACTION_PENDING ResponseReturnCode = 21 - Response_DECODE_STRING_FAILED ResponseReturnCode = 22 - Response_TRANSACTION_TYPE_ILLEGAL ResponseReturnCode = 23 - Response_IP_ACCESS_DENIED ResponseReturnCode = 24 - Response_ADDRESS_ACCESS_DENIED ResponseReturnCode = 25 - Response_OTHER_ERROR ResponseReturnCode = 99 -) - -var ResponseReturnCode_name = map[int32]string{ - 0: "SUCCESS", - 1: "AMOUNT_ILLEGAL", - 2: "REMOTE_CALL_ERROR", - 3: "INACTIVATED_ACCOUNT", - 4: "TRON_BALANCE_INSUFFICIENT", - 5: "CHANNEL_CLOSED", - 6: "CHANNEL_ADDRESS_ILLEGAL", - 7: "REQUEST_PARAM_ILLEGAL", - 8: "TRANSFER_ADDRESS_FAILED", - 9: "SIGN_FAILED", - 10: "MARSHAL_FAILED", - 11: "DATABASE_ERROR", - 12: "TRANSACTION_EXIST", - 13: "BROADCAST_ERROR", - 14: "HASH_FAILED", - 15: "USER_TRON_BALANCE_INSUFFICIENT", - 16: "LEDGER_BALANCE_INSUFFICIENT", - 17: "TRANSACTION_NOT_EXIST", - 18: "TRANSACTION_STATUS_ILLEGAL", - 19: "UNMARSHAL_FAILED", - 20: "TRANSACTION_FAILED", - 21: "TRANSACTION_PENDING", - 22: "DECODE_STRING_FAILED", - 23: "TRANSACTION_TYPE_ILLEGAL", - 24: "IP_ACCESS_DENIED", - 25: "ADDRESS_ACCESS_DENIED", - 99: "OTHER_ERROR", -} - -var ResponseReturnCode_value = map[string]int32{ - "SUCCESS": 0, - "AMOUNT_ILLEGAL": 1, - "REMOTE_CALL_ERROR": 2, - "INACTIVATED_ACCOUNT": 3, - "TRON_BALANCE_INSUFFICIENT": 4, - "CHANNEL_CLOSED": 5, - "CHANNEL_ADDRESS_ILLEGAL": 6, - "REQUEST_PARAM_ILLEGAL": 7, - "TRANSFER_ADDRESS_FAILED": 8, - "SIGN_FAILED": 9, - "MARSHAL_FAILED": 10, - "DATABASE_ERROR": 11, - "TRANSACTION_EXIST": 12, - "BROADCAST_ERROR": 13, - "HASH_FAILED": 14, - "USER_TRON_BALANCE_INSUFFICIENT": 15, - "LEDGER_BALANCE_INSUFFICIENT": 16, - "TRANSACTION_NOT_EXIST": 17, - "TRANSACTION_STATUS_ILLEGAL": 18, - "UNMARSHAL_FAILED": 19, - "TRANSACTION_FAILED": 20, - "TRANSACTION_PENDING": 21, - "DECODE_STRING_FAILED": 22, - "TRANSACTION_TYPE_ILLEGAL": 23, - "IP_ACCESS_DENIED": 24, - "ADDRESS_ACCESS_DENIED": 25, - "OTHER_ERROR": 99, -} - -func (x ResponseReturnCode) String() string { - return proto.EnumName(ResponseReturnCode_name, int32(x)) -} - -func (ResponseReturnCode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_064b4ad6d2e0dc73, []int{14, 0} -} - -type TronTransaction_TronContract_TronContractType int32 - -const ( - TronTransaction_TronContract_AccountCreateContract TronTransaction_TronContract_TronContractType = 0 - TronTransaction_TronContract_TransferContract TronTransaction_TronContract_TronContractType = 1 - TronTransaction_TronContract_TransferAssetContract TronTransaction_TronContract_TronContractType = 2 - TronTransaction_TronContract_VoteAssetContract TronTransaction_TronContract_TronContractType = 3 - TronTransaction_TronContract_VoteWitnessContract TronTransaction_TronContract_TronContractType = 4 - TronTransaction_TronContract_WitnessCreateContract TronTransaction_TronContract_TronContractType = 5 - TronTransaction_TronContract_AssetIssueContract TronTransaction_TronContract_TronContractType = 6 - TronTransaction_TronContract_WitnessUpdateContract TronTransaction_TronContract_TronContractType = 8 - TronTransaction_TronContract_ParticipateAssetIssueContract TronTransaction_TronContract_TronContractType = 9 - TronTransaction_TronContract_AccountUpdateContract TronTransaction_TronContract_TronContractType = 10 - TronTransaction_TronContract_FreezeBalanceContract TronTransaction_TronContract_TronContractType = 11 - TronTransaction_TronContract_UnfreezeBalanceContract TronTransaction_TronContract_TronContractType = 12 - TronTransaction_TronContract_WithdrawBalanceContract TronTransaction_TronContract_TronContractType = 13 - TronTransaction_TronContract_UnfreezeAssetContract TronTransaction_TronContract_TronContractType = 14 - TronTransaction_TronContract_UpdateAssetContract TronTransaction_TronContract_TronContractType = 15 - TronTransaction_TronContract_ProposalCreateContract TronTransaction_TronContract_TronContractType = 16 - TronTransaction_TronContract_ProposalApproveContract TronTransaction_TronContract_TronContractType = 17 - TronTransaction_TronContract_ProposalDeleteContract TronTransaction_TronContract_TronContractType = 18 - TronTransaction_TronContract_SetAccountIdContract TronTransaction_TronContract_TronContractType = 19 - TronTransaction_TronContract_CustomContract TronTransaction_TronContract_TronContractType = 20 - // BuyStorageContract = 21; - // BuyStorageBytesContract = 22; - // SellStorageContract = 23; - TronTransaction_TronContract_CreateSmartContract TronTransaction_TronContract_TronContractType = 30 - TronTransaction_TronContract_TriggerSmartContract TronTransaction_TronContract_TronContractType = 31 - TronTransaction_TronContract_GetContract TronTransaction_TronContract_TronContractType = 32 - TronTransaction_TronContract_UpdateSettingContract TronTransaction_TronContract_TronContractType = 33 - TronTransaction_TronContract_ExchangeCreateContract TronTransaction_TronContract_TronContractType = 41 - TronTransaction_TronContract_ExchangeInjectContract TronTransaction_TronContract_TronContractType = 42 - TronTransaction_TronContract_ExchangeWithdrawContract TronTransaction_TronContract_TronContractType = 43 - TronTransaction_TronContract_ExchangeTransactionContract TronTransaction_TronContract_TronContractType = 44 - TronTransaction_TronContract_UpdateEnergyLimitContract TronTransaction_TronContract_TronContractType = 45 -) - -var TronTransaction_TronContract_TronContractType_name = map[int32]string{ - 0: "AccountCreateContract", - 1: "TransferContract", - 2: "TransferAssetContract", - 3: "VoteAssetContract", - 4: "VoteWitnessContract", - 5: "WitnessCreateContract", - 6: "AssetIssueContract", - 8: "WitnessUpdateContract", - 9: "ParticipateAssetIssueContract", - 10: "AccountUpdateContract", - 11: "FreezeBalanceContract", - 12: "UnfreezeBalanceContract", - 13: "WithdrawBalanceContract", - 14: "UnfreezeAssetContract", - 15: "UpdateAssetContract", - 16: "ProposalCreateContract", - 17: "ProposalApproveContract", - 18: "ProposalDeleteContract", - 19: "SetAccountIdContract", - 20: "CustomContract", - 30: "CreateSmartContract", - 31: "TriggerSmartContract", - 32: "GetContract", - 33: "UpdateSettingContract", - 41: "ExchangeCreateContract", - 42: "ExchangeInjectContract", - 43: "ExchangeWithdrawContract", - 44: "ExchangeTransactionContract", - 45: "UpdateEnergyLimitContract", -} - -var TronTransaction_TronContract_TronContractType_value = map[string]int32{ - "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, - "UpdateEnergyLimitContract": 45, -} - -func (x TronTransaction_TronContract_TronContractType) String() string { - return proto.EnumName(TronTransaction_TronContract_TronContractType_name, int32(x)) -} - -func (TronTransaction_TronContract_TronContractType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_064b4ad6d2e0dc73, []int{15, 0, 0} -} - -type TronTransaction_TronResult_TronCode int32 - -const ( - TronTransaction_TronResult_SUCESS TronTransaction_TronResult_TronCode = 0 - TronTransaction_TronResult_FAILED TronTransaction_TronResult_TronCode = 1 -) - -var TronTransaction_TronResult_TronCode_name = map[int32]string{ - 0: "SUCESS", - 1: "FAILED", -} - -var TronTransaction_TronResult_TronCode_value = map[string]int32{ - "SUCESS": 0, - "FAILED": 1, -} - -func (x TronTransaction_TronResult_TronCode) String() string { - return proto.EnumName(TronTransaction_TronResult_TronCode_name, int32(x)) -} - -func (TronTransaction_TronResult_TronCode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_064b4ad6d2e0dc73, []int{15, 1, 0} -} - -type TronTransaction_TronResult_TronContractResult int32 - -const ( - TronTransaction_TronResult_DEFAULT TronTransaction_TronResult_TronContractResult = 0 - TronTransaction_TronResult_SUCCESS TronTransaction_TronResult_TronContractResult = 1 - TronTransaction_TronResult_REVERT TronTransaction_TronResult_TronContractResult = 2 - TronTransaction_TronResult_BAD_JUMP_DESTINATION TronTransaction_TronResult_TronContractResult = 3 - TronTransaction_TronResult_OUT_OF_MEMORY TronTransaction_TronResult_TronContractResult = 4 - TronTransaction_TronResult_PRECOMPILED_CONTRACT TronTransaction_TronResult_TronContractResult = 5 - TronTransaction_TronResult_STACK_TOO_SMALL TronTransaction_TronResult_TronContractResult = 6 - TronTransaction_TronResult_STACK_TOO_LARGE TronTransaction_TronResult_TronContractResult = 7 - TronTransaction_TronResult_ILLEGAL_OPERATION TronTransaction_TronResult_TronContractResult = 8 - TronTransaction_TronResult_STACK_OVERFLOW TronTransaction_TronResult_TronContractResult = 9 - TronTransaction_TronResult_OUT_OF_ENERGY TronTransaction_TronResult_TronContractResult = 10 - TronTransaction_TronResult_OUT_OF_TIME TronTransaction_TronResult_TronContractResult = 11 - TronTransaction_TronResult_JVM_STACK_OVER_FLOW TronTransaction_TronResult_TronContractResult = 12 - TronTransaction_TronResult_UNKNOWN TronTransaction_TronResult_TronContractResult = 13 -) - -var TronTransaction_TronResult_TronContractResult_name = map[int32]string{ - 0: "DEFAULT", - 1: "SUCCESS", - 2: "REVERT", - 3: "BAD_JUMP_DESTINATION", - 4: "OUT_OF_MEMORY", - 5: "PRECOMPILED_CONTRACT", - 6: "STACK_TOO_SMALL", - 7: "STACK_TOO_LARGE", - 8: "ILLEGAL_OPERATION", - 9: "STACK_OVERFLOW", - 10: "OUT_OF_ENERGY", - 11: "OUT_OF_TIME", - 12: "JVM_STACK_OVER_FLOW", - 13: "UNKNOWN", -} - -var TronTransaction_TronResult_TronContractResult_value = map[string]int32{ - "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, -} - -func (x TronTransaction_TronResult_TronContractResult) String() string { - return proto.EnumName(TronTransaction_TronResult_TronContractResult_name, int32(x)) -} - -func (TronTransaction_TronResult_TronContractResult) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_064b4ad6d2e0dc73, []int{15, 1, 1} -} - -type PrepareWithdrawRequest struct { - Amount int64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty" pg:"amount"` - OutTxId int64 `protobuf:"varint,2,opt,name=out_tx_id,json=outTxId,proto3" json:"out_tx_id,omitempty" pg:"out_tx_id"` - UserAddress []byte `protobuf:"bytes,3,opt,name=user_address,json=userAddress,proto3" json:"user_address,omitempty" pg:"user_address"` - UserExternalAddress []byte `protobuf:"bytes,4,opt,name=user_external_address,json=userExternalAddress,proto3" json:"user_external_address,omitempty" pg:"user_external_address"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *PrepareWithdrawRequest) Reset() { *m = PrepareWithdrawRequest{} } -func (m *PrepareWithdrawRequest) String() string { return proto.CompactTextString(m) } -func (*PrepareWithdrawRequest) ProtoMessage() {} -func (*PrepareWithdrawRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_064b4ad6d2e0dc73, []int{0} -} -func (m *PrepareWithdrawRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PrepareWithdrawRequest.Unmarshal(m, b) -} -func (m *PrepareWithdrawRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PrepareWithdrawRequest.Marshal(b, m, deterministic) -} -func (m *PrepareWithdrawRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PrepareWithdrawRequest.Merge(m, src) -} -func (m *PrepareWithdrawRequest) XXX_Size() int { - return xxx_messageInfo_PrepareWithdrawRequest.Size(m) -} -func (m *PrepareWithdrawRequest) XXX_DiscardUnknown() { - xxx_messageInfo_PrepareWithdrawRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_PrepareWithdrawRequest proto.InternalMessageInfo - -func (m *PrepareWithdrawRequest) GetAmount() int64 { - if m != nil { - return m.Amount - } - return 0 -} - -func (m *PrepareWithdrawRequest) GetOutTxId() int64 { - if m != nil { - return m.OutTxId - } - return 0 -} - -func (m *PrepareWithdrawRequest) GetUserAddress() []byte { - if m != nil { - return m.UserAddress - } - return nil -} - -func (m *PrepareWithdrawRequest) GetUserExternalAddress() []byte { - if m != nil { - return m.UserExternalAddress - } - return nil -} - -type PrepareWithdrawResponse struct { - Response *Response `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty" pg:"response"` - LedgerExchangeAddress []byte `protobuf:"bytes,2,opt,name=ledger_exchange_address,json=ledgerExchangeAddress,proto3" json:"ledger_exchange_address,omitempty" pg:"ledger_exchange_address"` - Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty" pg:"id"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *PrepareWithdrawResponse) Reset() { *m = PrepareWithdrawResponse{} } -func (m *PrepareWithdrawResponse) String() string { return proto.CompactTextString(m) } -func (*PrepareWithdrawResponse) ProtoMessage() {} -func (*PrepareWithdrawResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_064b4ad6d2e0dc73, []int{1} -} -func (m *PrepareWithdrawResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PrepareWithdrawResponse.Unmarshal(m, b) -} -func (m *PrepareWithdrawResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PrepareWithdrawResponse.Marshal(b, m, deterministic) -} -func (m *PrepareWithdrawResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_PrepareWithdrawResponse.Merge(m, src) -} -func (m *PrepareWithdrawResponse) XXX_Size() int { - return xxx_messageInfo_PrepareWithdrawResponse.Size(m) -} -func (m *PrepareWithdrawResponse) XXX_DiscardUnknown() { - xxx_messageInfo_PrepareWithdrawResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_PrepareWithdrawResponse proto.InternalMessageInfo - -func (m *PrepareWithdrawResponse) GetResponse() *Response { - if m != nil { - return m.Response - } - return nil -} - -func (m *PrepareWithdrawResponse) GetLedgerExchangeAddress() []byte { - if m != nil { - return m.LedgerExchangeAddress - } - return nil -} - -func (m *PrepareWithdrawResponse) GetId() int64 { - if m != nil { - return m.Id - } - return 0 -} - -type WithdrawRequest struct { - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" pg:"id"` - SuccessChannelState *ledger.SignedChannelState `protobuf:"bytes,2,opt,name=success_channel_state,json=successChannelState,proto3" json:"success_channel_state,omitempty" pg:"success_channel_state"` - FailureChannelState *ledger.SignedChannelState `protobuf:"bytes,3,opt,name=failure_channel_state,json=failureChannelState,proto3" json:"failure_channel_state,omitempty" pg:"failure_channel_state"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *WithdrawRequest) Reset() { *m = WithdrawRequest{} } -func (m *WithdrawRequest) String() string { return proto.CompactTextString(m) } -func (*WithdrawRequest) ProtoMessage() {} -func (*WithdrawRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_064b4ad6d2e0dc73, []int{2} -} -func (m *WithdrawRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_WithdrawRequest.Unmarshal(m, b) -} -func (m *WithdrawRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_WithdrawRequest.Marshal(b, m, deterministic) -} -func (m *WithdrawRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_WithdrawRequest.Merge(m, src) -} -func (m *WithdrawRequest) XXX_Size() int { - return xxx_messageInfo_WithdrawRequest.Size(m) -} -func (m *WithdrawRequest) XXX_DiscardUnknown() { - xxx_messageInfo_WithdrawRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_WithdrawRequest proto.InternalMessageInfo - -func (m *WithdrawRequest) GetId() int64 { - if m != nil { - return m.Id - } - return 0 -} - -func (m *WithdrawRequest) GetSuccessChannelState() *ledger.SignedChannelState { - if m != nil { - return m.SuccessChannelState - } - return nil -} - -func (m *WithdrawRequest) GetFailureChannelState() *ledger.SignedChannelState { - if m != nil { - return m.FailureChannelState - } - return nil -} - -type WithdrawResponse struct { - Response *Response `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty" pg:"response"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *WithdrawResponse) Reset() { *m = WithdrawResponse{} } -func (m *WithdrawResponse) String() string { return proto.CompactTextString(m) } -func (*WithdrawResponse) ProtoMessage() {} -func (*WithdrawResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_064b4ad6d2e0dc73, []int{3} -} -func (m *WithdrawResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_WithdrawResponse.Unmarshal(m, b) -} -func (m *WithdrawResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_WithdrawResponse.Marshal(b, m, deterministic) -} -func (m *WithdrawResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_WithdrawResponse.Merge(m, src) -} -func (m *WithdrawResponse) XXX_Size() int { - return xxx_messageInfo_WithdrawResponse.Size(m) -} -func (m *WithdrawResponse) XXX_DiscardUnknown() { - xxx_messageInfo_WithdrawResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_WithdrawResponse proto.InternalMessageInfo - -func (m *WithdrawResponse) GetResponse() *Response { - if m != nil { - return m.Response - } - return nil -} - -type PrepareDepositRequest struct { - Amount int64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty" pg:"amount"` - OutTxId int64 `protobuf:"varint,2,opt,name=out_tx_id,json=outTxId,proto3" json:"out_tx_id,omitempty" pg:"out_tx_id"` - UserAddress []byte `protobuf:"bytes,3,opt,name=user_address,json=userAddress,proto3" json:"user_address,omitempty" pg:"user_address"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *PrepareDepositRequest) Reset() { *m = PrepareDepositRequest{} } -func (m *PrepareDepositRequest) String() string { return proto.CompactTextString(m) } -func (*PrepareDepositRequest) ProtoMessage() {} -func (*PrepareDepositRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_064b4ad6d2e0dc73, []int{4} -} -func (m *PrepareDepositRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PrepareDepositRequest.Unmarshal(m, b) -} -func (m *PrepareDepositRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PrepareDepositRequest.Marshal(b, m, deterministic) -} -func (m *PrepareDepositRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PrepareDepositRequest.Merge(m, src) -} -func (m *PrepareDepositRequest) XXX_Size() int { - return xxx_messageInfo_PrepareDepositRequest.Size(m) -} -func (m *PrepareDepositRequest) XXX_DiscardUnknown() { - xxx_messageInfo_PrepareDepositRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_PrepareDepositRequest proto.InternalMessageInfo - -func (m *PrepareDepositRequest) GetAmount() int64 { - if m != nil { - return m.Amount - } - return 0 -} - -func (m *PrepareDepositRequest) GetOutTxId() int64 { - if m != nil { - return m.OutTxId - } - return 0 -} - -func (m *PrepareDepositRequest) GetUserAddress() []byte { - if m != nil { - return m.UserAddress - } - return nil -} - -type PrepareDepositResponse struct { - Response *Response `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty" pg:"response"` - Id int64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty" pg:"id"` - TronTransaction *TronTransaction `protobuf:"bytes,3,opt,name=tron_transaction,json=tronTransaction,proto3" json:"tron_transaction,omitempty" pg:"tron_transaction"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *PrepareDepositResponse) Reset() { *m = PrepareDepositResponse{} } -func (m *PrepareDepositResponse) String() string { return proto.CompactTextString(m) } -func (*PrepareDepositResponse) ProtoMessage() {} -func (*PrepareDepositResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_064b4ad6d2e0dc73, []int{5} -} -func (m *PrepareDepositResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PrepareDepositResponse.Unmarshal(m, b) -} -func (m *PrepareDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PrepareDepositResponse.Marshal(b, m, deterministic) -} -func (m *PrepareDepositResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_PrepareDepositResponse.Merge(m, src) -} -func (m *PrepareDepositResponse) XXX_Size() int { - return xxx_messageInfo_PrepareDepositResponse.Size(m) -} -func (m *PrepareDepositResponse) XXX_DiscardUnknown() { - xxx_messageInfo_PrepareDepositResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_PrepareDepositResponse proto.InternalMessageInfo - -func (m *PrepareDepositResponse) GetResponse() *Response { - if m != nil { - return m.Response - } - return nil -} - -func (m *PrepareDepositResponse) GetId() int64 { - if m != nil { - return m.Id - } - return 0 -} - -func (m *PrepareDepositResponse) GetTronTransaction() *TronTransaction { - if m != nil { - return m.TronTransaction - } - return nil -} - -type DepositRequest struct { - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" pg:"id"` - SignedTronTransaction *TronTransaction `protobuf:"bytes,4,opt,name=signed_tron_transaction,json=signedTronTransaction,proto3" json:"signed_tron_transaction,omitempty" pg:"signed_tron_transaction"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *DepositRequest) Reset() { *m = DepositRequest{} } -func (m *DepositRequest) String() string { return proto.CompactTextString(m) } -func (*DepositRequest) ProtoMessage() {} -func (*DepositRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_064b4ad6d2e0dc73, []int{6} -} -func (m *DepositRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DepositRequest.Unmarshal(m, b) -} -func (m *DepositRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DepositRequest.Marshal(b, m, deterministic) -} -func (m *DepositRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DepositRequest.Merge(m, src) -} -func (m *DepositRequest) XXX_Size() int { - return xxx_messageInfo_DepositRequest.Size(m) -} -func (m *DepositRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DepositRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DepositRequest proto.InternalMessageInfo - -func (m *DepositRequest) GetId() int64 { - if m != nil { - return m.Id - } - return 0 -} - -func (m *DepositRequest) GetSignedTronTransaction() *TronTransaction { - if m != nil { - return m.SignedTronTransaction - } - return nil -} - -type DepositResponse struct { - Response *Response `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty" pg:"response"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *DepositResponse) Reset() { *m = DepositResponse{} } -func (m *DepositResponse) String() string { return proto.CompactTextString(m) } -func (*DepositResponse) ProtoMessage() {} -func (*DepositResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_064b4ad6d2e0dc73, []int{7} -} -func (m *DepositResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DepositResponse.Unmarshal(m, b) -} -func (m *DepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DepositResponse.Marshal(b, m, deterministic) -} -func (m *DepositResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DepositResponse.Merge(m, src) -} -func (m *DepositResponse) XXX_Size() int { - return xxx_messageInfo_DepositResponse.Size(m) -} -func (m *DepositResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DepositResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DepositResponse proto.InternalMessageInfo - -func (m *DepositResponse) GetResponse() *Response { - if m != nil { - return m.Response - } - return nil -} - -type ConfirmDepositRequest struct { - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" pg:"id"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ConfirmDepositRequest) Reset() { *m = ConfirmDepositRequest{} } -func (m *ConfirmDepositRequest) String() string { return proto.CompactTextString(m) } -func (*ConfirmDepositRequest) ProtoMessage() {} -func (*ConfirmDepositRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_064b4ad6d2e0dc73, []int{8} -} -func (m *ConfirmDepositRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ConfirmDepositRequest.Unmarshal(m, b) -} -func (m *ConfirmDepositRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ConfirmDepositRequest.Marshal(b, m, deterministic) -} -func (m *ConfirmDepositRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConfirmDepositRequest.Merge(m, src) -} -func (m *ConfirmDepositRequest) XXX_Size() int { - return xxx_messageInfo_ConfirmDepositRequest.Size(m) -} -func (m *ConfirmDepositRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ConfirmDepositRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ConfirmDepositRequest proto.InternalMessageInfo - -func (m *ConfirmDepositRequest) GetId() int64 { - if m != nil { - return m.Id - } - return 0 -} - -type ConfirmDepositResponse struct { - Response *Response `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty" pg:"response"` - SuccessChannelState *ledger.SignedChannelState `protobuf:"bytes,2,opt,name=success_channel_state,json=successChannelState,proto3" json:"success_channel_state,omitempty" pg:"success_channel_state"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ConfirmDepositResponse) Reset() { *m = ConfirmDepositResponse{} } -func (m *ConfirmDepositResponse) String() string { return proto.CompactTextString(m) } -func (*ConfirmDepositResponse) ProtoMessage() {} -func (*ConfirmDepositResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_064b4ad6d2e0dc73, []int{9} -} -func (m *ConfirmDepositResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ConfirmDepositResponse.Unmarshal(m, b) -} -func (m *ConfirmDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ConfirmDepositResponse.Marshal(b, m, deterministic) -} -func (m *ConfirmDepositResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConfirmDepositResponse.Merge(m, src) -} -func (m *ConfirmDepositResponse) XXX_Size() int { - return xxx_messageInfo_ConfirmDepositResponse.Size(m) -} -func (m *ConfirmDepositResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ConfirmDepositResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ConfirmDepositResponse proto.InternalMessageInfo - -func (m *ConfirmDepositResponse) GetResponse() *Response { - if m != nil { - return m.Response - } - return nil -} - -func (m *ConfirmDepositResponse) GetSuccessChannelState() *ledger.SignedChannelState { - if m != nil { - return m.SuccessChannelState - } - return nil -} - -type QueryTransactionRequest struct { - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" pg:"id"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *QueryTransactionRequest) Reset() { *m = QueryTransactionRequest{} } -func (m *QueryTransactionRequest) String() string { return proto.CompactTextString(m) } -func (*QueryTransactionRequest) ProtoMessage() {} -func (*QueryTransactionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_064b4ad6d2e0dc73, []int{10} -} -func (m *QueryTransactionRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_QueryTransactionRequest.Unmarshal(m, b) -} -func (m *QueryTransactionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_QueryTransactionRequest.Marshal(b, m, deterministic) -} -func (m *QueryTransactionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryTransactionRequest.Merge(m, src) -} -func (m *QueryTransactionRequest) XXX_Size() int { - return xxx_messageInfo_QueryTransactionRequest.Size(m) -} -func (m *QueryTransactionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryTransactionRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryTransactionRequest proto.InternalMessageInfo - -func (m *QueryTransactionRequest) GetId() int64 { - if m != nil { - return m.Id - } - return 0 -} - -type QueryTransactionResponse struct { - Response *Response `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty" pg:"response"` - Type []byte `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty" pg:"type"` - Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty" pg:"amount"` - TokenName []byte `protobuf:"bytes,4,opt,name=token_name,json=tokenName,proto3" json:"token_name,omitempty" pg:"token_name"` - UserAddress []byte `protobuf:"bytes,5,opt,name=user_address,json=userAddress,proto3" json:"user_address,omitempty" pg:"user_address"` - TronStatus []byte `protobuf:"bytes,6,opt,name=tron_status,json=tronStatus,proto3" json:"tron_status,omitempty" pg:"tron_status"` - ChannelStatus []byte `protobuf:"bytes,7,opt,name=channel_status,json=channelStatus,proto3" json:"channel_status,omitempty" pg:"channel_status"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *QueryTransactionResponse) Reset() { *m = QueryTransactionResponse{} } -func (m *QueryTransactionResponse) String() string { return proto.CompactTextString(m) } -func (*QueryTransactionResponse) ProtoMessage() {} -func (*QueryTransactionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_064b4ad6d2e0dc73, []int{11} -} -func (m *QueryTransactionResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_QueryTransactionResponse.Unmarshal(m, b) -} -func (m *QueryTransactionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_QueryTransactionResponse.Marshal(b, m, deterministic) -} -func (m *QueryTransactionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryTransactionResponse.Merge(m, src) -} -func (m *QueryTransactionResponse) XXX_Size() int { - return xxx_messageInfo_QueryTransactionResponse.Size(m) -} -func (m *QueryTransactionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryTransactionResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryTransactionResponse proto.InternalMessageInfo - -func (m *QueryTransactionResponse) GetResponse() *Response { - if m != nil { - return m.Response - } - return nil -} - -func (m *QueryTransactionResponse) GetType() []byte { - if m != nil { - return m.Type - } - return nil -} - -func (m *QueryTransactionResponse) GetAmount() int64 { - if m != nil { - return m.Amount - } - return 0 -} - -func (m *QueryTransactionResponse) GetTokenName() []byte { - if m != nil { - return m.TokenName - } - return nil -} - -func (m *QueryTransactionResponse) GetUserAddress() []byte { - if m != nil { - return m.UserAddress - } - return nil -} - -func (m *QueryTransactionResponse) GetTronStatus() []byte { - if m != nil { - return m.TronStatus - } - return nil -} - -func (m *QueryTransactionResponse) GetChannelStatus() []byte { - if m != nil { - return m.ChannelStatus - } - return nil -} - -type ActivateAccountRequest struct { - Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" pg:"address"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ActivateAccountRequest) Reset() { *m = ActivateAccountRequest{} } -func (m *ActivateAccountRequest) String() string { return proto.CompactTextString(m) } -func (*ActivateAccountRequest) ProtoMessage() {} -func (*ActivateAccountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_064b4ad6d2e0dc73, []int{12} -} -func (m *ActivateAccountRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ActivateAccountRequest.Unmarshal(m, b) -} -func (m *ActivateAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ActivateAccountRequest.Marshal(b, m, deterministic) -} -func (m *ActivateAccountRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ActivateAccountRequest.Merge(m, src) -} -func (m *ActivateAccountRequest) XXX_Size() int { - return xxx_messageInfo_ActivateAccountRequest.Size(m) -} -func (m *ActivateAccountRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ActivateAccountRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ActivateAccountRequest proto.InternalMessageInfo - -func (m *ActivateAccountRequest) GetAddress() []byte { - if m != nil { - return m.Address - } - return nil -} - -type ActivateAccountResponse struct { - Response *Response `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty" pg:"response"` - TxId string `protobuf:"bytes,2,opt,name=txId,proto3" json:"txId,omitempty" pg:"txId"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ActivateAccountResponse) Reset() { *m = ActivateAccountResponse{} } -func (m *ActivateAccountResponse) String() string { return proto.CompactTextString(m) } -func (*ActivateAccountResponse) ProtoMessage() {} -func (*ActivateAccountResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_064b4ad6d2e0dc73, []int{13} -} -func (m *ActivateAccountResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ActivateAccountResponse.Unmarshal(m, b) -} -func (m *ActivateAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ActivateAccountResponse.Marshal(b, m, deterministic) -} -func (m *ActivateAccountResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ActivateAccountResponse.Merge(m, src) -} -func (m *ActivateAccountResponse) XXX_Size() int { - return xxx_messageInfo_ActivateAccountResponse.Size(m) -} -func (m *ActivateAccountResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ActivateAccountResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ActivateAccountResponse proto.InternalMessageInfo - -func (m *ActivateAccountResponse) GetResponse() *Response { - if m != nil { - return m.Response - } - return nil -} - -func (m *ActivateAccountResponse) GetTxId() string { - if m != nil { - return m.TxId - } - return "" -} - -type Response struct { - Code ResponseReturnCode `protobuf:"varint,1,opt,name=code,proto3,enum=protocol.ResponseReturnCode" json:"code,omitempty" pg:"code"` - ReturnMessage []byte `protobuf:"bytes,2,opt,name=return_message,json=returnMessage,proto3" json:"return_message,omitempty" pg:"return_message"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Response) Reset() { *m = Response{} } -func (m *Response) String() string { return proto.CompactTextString(m) } -func (*Response) ProtoMessage() {} -func (*Response) Descriptor() ([]byte, []int) { - return fileDescriptor_064b4ad6d2e0dc73, []int{14} -} -func (m *Response) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Response.Unmarshal(m, b) -} -func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Response.Marshal(b, m, deterministic) -} -func (m *Response) XXX_Merge(src proto.Message) { - xxx_messageInfo_Response.Merge(m, src) -} -func (m *Response) XXX_Size() int { - return xxx_messageInfo_Response.Size(m) -} -func (m *Response) XXX_DiscardUnknown() { - xxx_messageInfo_Response.DiscardUnknown(m) -} - -var xxx_messageInfo_Response proto.InternalMessageInfo - -func (m *Response) GetCode() ResponseReturnCode { - if m != nil { - return m.Code - } - return Response_SUCCESS -} - -func (m *Response) GetReturnMessage() []byte { - if m != nil { - return m.ReturnMessage - } - return nil -} - -type TronTransaction struct { - RawData *TronTransaction_TronRaw `protobuf:"bytes,1,opt,name=raw_data,json=rawData,proto3" json:"raw_data,omitempty" pg:"raw_data"` - // only support size = 1, repeated list here for muti-sig extension - Signature [][]byte `protobuf:"bytes,2,rep,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - Ret []*TronTransaction_TronResult `protobuf:"bytes,5,rep,name=ret,proto3" json:"ret,omitempty" pg:"ret"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *TronTransaction) Reset() { *m = TronTransaction{} } -func (m *TronTransaction) String() string { return proto.CompactTextString(m) } -func (*TronTransaction) ProtoMessage() {} -func (*TronTransaction) Descriptor() ([]byte, []int) { - return fileDescriptor_064b4ad6d2e0dc73, []int{15} -} -func (m *TronTransaction) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TronTransaction.Unmarshal(m, b) -} -func (m *TronTransaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TronTransaction.Marshal(b, m, deterministic) -} -func (m *TronTransaction) XXX_Merge(src proto.Message) { - xxx_messageInfo_TronTransaction.Merge(m, src) -} -func (m *TronTransaction) XXX_Size() int { - return xxx_messageInfo_TronTransaction.Size(m) -} -func (m *TronTransaction) XXX_DiscardUnknown() { - xxx_messageInfo_TronTransaction.DiscardUnknown(m) -} - -var xxx_messageInfo_TronTransaction proto.InternalMessageInfo - -func (m *TronTransaction) GetRawData() *TronTransaction_TronRaw { - if m != nil { - return m.RawData - } - return nil -} - -func (m *TronTransaction) GetSignature() [][]byte { - if m != nil { - return m.Signature - } - return nil -} - -func (m *TronTransaction) GetRet() []*TronTransaction_TronResult { - if m != nil { - return m.Ret - } - return nil -} - -type TronTransaction_TronContract struct { - Type TronTransaction_TronContract_TronContractType `protobuf:"varint,1,opt,name=type,proto3,enum=protocol.TronTransaction_TronContract_TronContractType" json:"type,omitempty" pg:"type"` - Parameter *types.Any `protobuf:"bytes,2,opt,name=parameter,proto3" json:"parameter,omitempty" pg:"parameter"` - Provider []byte `protobuf:"bytes,3,opt,name=provider,proto3" json:"provider,omitempty" pg:"provider"` - ContractName []byte `protobuf:"bytes,4,opt,name=ContractName,proto3" json:"ContractName,omitempty" pg:"ContractName"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *TronTransaction_TronContract) Reset() { *m = TronTransaction_TronContract{} } -func (m *TronTransaction_TronContract) String() string { return proto.CompactTextString(m) } -func (*TronTransaction_TronContract) ProtoMessage() {} -func (*TronTransaction_TronContract) Descriptor() ([]byte, []int) { - return fileDescriptor_064b4ad6d2e0dc73, []int{15, 0} -} -func (m *TronTransaction_TronContract) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TronTransaction_TronContract.Unmarshal(m, b) -} -func (m *TronTransaction_TronContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TronTransaction_TronContract.Marshal(b, m, deterministic) -} -func (m *TronTransaction_TronContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_TronTransaction_TronContract.Merge(m, src) -} -func (m *TronTransaction_TronContract) XXX_Size() int { - return xxx_messageInfo_TronTransaction_TronContract.Size(m) -} -func (m *TronTransaction_TronContract) XXX_DiscardUnknown() { - xxx_messageInfo_TronTransaction_TronContract.DiscardUnknown(m) -} - -var xxx_messageInfo_TronTransaction_TronContract proto.InternalMessageInfo - -func (m *TronTransaction_TronContract) GetType() TronTransaction_TronContract_TronContractType { - if m != nil { - return m.Type - } - return TronTransaction_TronContract_AccountCreateContract -} - -func (m *TronTransaction_TronContract) GetParameter() *types.Any { - if m != nil { - return m.Parameter - } - return nil -} - -func (m *TronTransaction_TronContract) GetProvider() []byte { - if m != nil { - return m.Provider - } - return nil -} - -func (m *TronTransaction_TronContract) GetContractName() []byte { - if m != nil { - return m.ContractName - } - return nil -} - -type TronTransaction_TronResult struct { - Fee int64 `protobuf:"varint,1,opt,name=fee,proto3" json:"fee,omitempty" pg:"fee"` - Ret TronTransaction_TronResult_TronCode `protobuf:"varint,2,opt,name=ret,proto3,enum=protocol.TronTransaction_TronResult_TronCode" json:"ret,omitempty" pg:"ret"` - ContractRet TronTransaction_TronResult_TronContractResult `protobuf:"varint,3,opt,name=contractRet,proto3,enum=protocol.TronTransaction_TronResult_TronContractResult" json:"contractRet,omitempty" pg:"contractRet"` - AssetIssueID string `protobuf:"bytes,14,opt,name=assetIssueID,proto3" json:"assetIssueID,omitempty" pg:"assetIssueID"` - WithdrawAmount int64 `protobuf:"varint,15,opt,name=withdraw_amount,json=withdrawAmount,proto3" json:"withdraw_amount,omitempty" pg:"withdraw_amount"` - UnfreezeAmount int64 `protobuf:"varint,16,opt,name=unfreeze_amount,json=unfreezeAmount,proto3" json:"unfreeze_amount,omitempty" pg:"unfreeze_amount"` - ExchangeReceivedAmount int64 `protobuf:"varint,18,opt,name=exchange_received_amount,json=exchangeReceivedAmount,proto3" json:"exchange_received_amount,omitempty" pg:"exchange_received_amount"` - ExchangeInjectAnotherAmount int64 `protobuf:"varint,19,opt,name=exchange_inject_another_amount,json=exchangeInjectAnotherAmount,proto3" json:"exchange_inject_another_amount,omitempty" pg:"exchange_inject_another_amount"` - ExchangeWithdrawAnotherAmount int64 `protobuf:"varint,20,opt,name=exchange_withdraw_another_amount,json=exchangeWithdrawAnotherAmount,proto3" json:"exchange_withdraw_another_amount,omitempty" pg:"exchange_withdraw_another_amount"` - ExchangeId int64 `protobuf:"varint,21,opt,name=exchange_id,json=exchangeId,proto3" json:"exchange_id,omitempty" pg:"exchange_id"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *TronTransaction_TronResult) Reset() { *m = TronTransaction_TronResult{} } -func (m *TronTransaction_TronResult) String() string { return proto.CompactTextString(m) } -func (*TronTransaction_TronResult) ProtoMessage() {} -func (*TronTransaction_TronResult) Descriptor() ([]byte, []int) { - return fileDescriptor_064b4ad6d2e0dc73, []int{15, 1} -} -func (m *TronTransaction_TronResult) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TronTransaction_TronResult.Unmarshal(m, b) -} -func (m *TronTransaction_TronResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TronTransaction_TronResult.Marshal(b, m, deterministic) -} -func (m *TronTransaction_TronResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_TronTransaction_TronResult.Merge(m, src) -} -func (m *TronTransaction_TronResult) XXX_Size() int { - return xxx_messageInfo_TronTransaction_TronResult.Size(m) -} -func (m *TronTransaction_TronResult) XXX_DiscardUnknown() { - xxx_messageInfo_TronTransaction_TronResult.DiscardUnknown(m) -} - -var xxx_messageInfo_TronTransaction_TronResult proto.InternalMessageInfo - -func (m *TronTransaction_TronResult) GetFee() int64 { - if m != nil { - return m.Fee - } - return 0 -} - -func (m *TronTransaction_TronResult) GetRet() TronTransaction_TronResult_TronCode { - if m != nil { - return m.Ret - } - return TronTransaction_TronResult_SUCESS -} - -func (m *TronTransaction_TronResult) GetContractRet() TronTransaction_TronResult_TronContractResult { - if m != nil { - return m.ContractRet - } - return TronTransaction_TronResult_DEFAULT -} - -func (m *TronTransaction_TronResult) GetAssetIssueID() string { - if m != nil { - return m.AssetIssueID - } - return "" -} - -func (m *TronTransaction_TronResult) GetWithdrawAmount() int64 { - if m != nil { - return m.WithdrawAmount - } - return 0 -} - -func (m *TronTransaction_TronResult) GetUnfreezeAmount() int64 { - if m != nil { - return m.UnfreezeAmount - } - return 0 -} - -func (m *TronTransaction_TronResult) GetExchangeReceivedAmount() int64 { - if m != nil { - return m.ExchangeReceivedAmount - } - return 0 -} - -func (m *TronTransaction_TronResult) GetExchangeInjectAnotherAmount() int64 { - if m != nil { - return m.ExchangeInjectAnotherAmount - } - return 0 -} - -func (m *TronTransaction_TronResult) GetExchangeWithdrawAnotherAmount() int64 { - if m != nil { - return m.ExchangeWithdrawAnotherAmount - } - return 0 -} - -func (m *TronTransaction_TronResult) GetExchangeId() int64 { - if m != nil { - return m.ExchangeId - } - return 0 -} - -type TronTransaction_TronRaw struct { - RefBlockBytes []byte `protobuf:"bytes,1,opt,name=ref_block_bytes,json=refBlockBytes,proto3" json:"ref_block_bytes,omitempty" pg:"ref_block_bytes"` - RefBlockNum int64 `protobuf:"varint,3,opt,name=ref_block_num,json=refBlockNum,proto3" json:"ref_block_num,omitempty" pg:"ref_block_num"` - RefBlockHash []byte `protobuf:"bytes,4,opt,name=ref_block_hash,json=refBlockHash,proto3" json:"ref_block_hash,omitempty" pg:"ref_block_hash"` - Expiration int64 `protobuf:"varint,8,opt,name=expiration,proto3" json:"expiration,omitempty" pg:"expiration"` - Auths []*TronAuthority `protobuf:"bytes,9,rep,name=auths,proto3" json:"auths,omitempty" pg:"auths"` - // data not used - Data []byte `protobuf:"bytes,10,opt,name=data,proto3" json:"data,omitempty" pg:"data"` - //only support size = 1, repeated list here for extension - Contract []*TronTransaction_TronContract `protobuf:"bytes,11,rep,name=contract,proto3" json:"contract,omitempty" pg:"contract"` - // scripts not used - Scripts []byte `protobuf:"bytes,12,opt,name=scripts,proto3" json:"scripts,omitempty" pg:"scripts"` - Timestamp int64 `protobuf:"varint,14,opt,name=timestamp,proto3" json:"timestamp,omitempty" pg:"timestamp"` - FeeLimit int64 `protobuf:"varint,18,opt,name=fee_limit,json=feeLimit,proto3" json:"fee_limit,omitempty" pg:"fee_limit"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *TronTransaction_TronRaw) Reset() { *m = TronTransaction_TronRaw{} } -func (m *TronTransaction_TronRaw) String() string { return proto.CompactTextString(m) } -func (*TronTransaction_TronRaw) ProtoMessage() {} -func (*TronTransaction_TronRaw) Descriptor() ([]byte, []int) { - return fileDescriptor_064b4ad6d2e0dc73, []int{15, 2} -} -func (m *TronTransaction_TronRaw) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TronTransaction_TronRaw.Unmarshal(m, b) -} -func (m *TronTransaction_TronRaw) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TronTransaction_TronRaw.Marshal(b, m, deterministic) -} -func (m *TronTransaction_TronRaw) XXX_Merge(src proto.Message) { - xxx_messageInfo_TronTransaction_TronRaw.Merge(m, src) -} -func (m *TronTransaction_TronRaw) XXX_Size() int { - return xxx_messageInfo_TronTransaction_TronRaw.Size(m) -} -func (m *TronTransaction_TronRaw) XXX_DiscardUnknown() { - xxx_messageInfo_TronTransaction_TronRaw.DiscardUnknown(m) -} - -var xxx_messageInfo_TronTransaction_TronRaw proto.InternalMessageInfo - -func (m *TronTransaction_TronRaw) GetRefBlockBytes() []byte { - if m != nil { - return m.RefBlockBytes - } - return nil -} - -func (m *TronTransaction_TronRaw) GetRefBlockNum() int64 { - if m != nil { - return m.RefBlockNum - } - return 0 -} - -func (m *TronTransaction_TronRaw) GetRefBlockHash() []byte { - if m != nil { - return m.RefBlockHash - } - return nil -} - -func (m *TronTransaction_TronRaw) GetExpiration() int64 { - if m != nil { - return m.Expiration - } - return 0 -} - -func (m *TronTransaction_TronRaw) GetAuths() []*TronAuthority { - if m != nil { - return m.Auths - } - return nil -} - -func (m *TronTransaction_TronRaw) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -func (m *TronTransaction_TronRaw) GetContract() []*TronTransaction_TronContract { - if m != nil { - return m.Contract - } - return nil -} - -func (m *TronTransaction_TronRaw) GetScripts() []byte { - if m != nil { - return m.Scripts - } - return nil -} - -func (m *TronTransaction_TronRaw) GetTimestamp() int64 { - if m != nil { - return m.Timestamp - } - return 0 -} - -func (m *TronTransaction_TronRaw) GetFeeLimit() int64 { - if m != nil { - return m.FeeLimit - } - return 0 -} - -type TronAuthority struct { - Account *TronAccountId `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty" pg:"account"` - PermissionName []byte `protobuf:"bytes,2,opt,name=permission_name,json=permissionName,proto3" json:"permission_name,omitempty" pg:"permission_name"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *TronAuthority) Reset() { *m = TronAuthority{} } -func (m *TronAuthority) String() string { return proto.CompactTextString(m) } -func (*TronAuthority) ProtoMessage() {} -func (*TronAuthority) Descriptor() ([]byte, []int) { - return fileDescriptor_064b4ad6d2e0dc73, []int{16} -} -func (m *TronAuthority) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TronAuthority.Unmarshal(m, b) -} -func (m *TronAuthority) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TronAuthority.Marshal(b, m, deterministic) -} -func (m *TronAuthority) XXX_Merge(src proto.Message) { - xxx_messageInfo_TronAuthority.Merge(m, src) -} -func (m *TronAuthority) XXX_Size() int { - return xxx_messageInfo_TronAuthority.Size(m) -} -func (m *TronAuthority) XXX_DiscardUnknown() { - xxx_messageInfo_TronAuthority.DiscardUnknown(m) -} - -var xxx_messageInfo_TronAuthority proto.InternalMessageInfo - -func (m *TronAuthority) GetAccount() *TronAccountId { - if m != nil { - return m.Account - } - return nil -} - -func (m *TronAuthority) GetPermissionName() []byte { - if m != nil { - return m.PermissionName - } - return nil -} - -type TronAccountId struct { - Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" pg:"name"` - Address []byte `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty" pg:"address"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *TronAccountId) Reset() { *m = TronAccountId{} } -func (m *TronAccountId) String() string { return proto.CompactTextString(m) } -func (*TronAccountId) ProtoMessage() {} -func (*TronAccountId) Descriptor() ([]byte, []int) { - return fileDescriptor_064b4ad6d2e0dc73, []int{17} -} -func (m *TronAccountId) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TronAccountId.Unmarshal(m, b) -} -func (m *TronAccountId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TronAccountId.Marshal(b, m, deterministic) -} -func (m *TronAccountId) XXX_Merge(src proto.Message) { - xxx_messageInfo_TronAccountId.Merge(m, src) -} -func (m *TronAccountId) XXX_Size() int { - return xxx_messageInfo_TronAccountId.Size(m) -} -func (m *TronAccountId) XXX_DiscardUnknown() { - xxx_messageInfo_TronAccountId.DiscardUnknown(m) -} - -var xxx_messageInfo_TronAccountId proto.InternalMessageInfo - -func (m *TronAccountId) GetName() []byte { - if m != nil { - return m.Name - } - return nil -} - -func (m *TronAccountId) GetAddress() []byte { - if m != nil { - return m.Address - } - return nil -} - -func init() { - proto.RegisterEnum("protocol.ResponseReturnCode", ResponseReturnCode_name, ResponseReturnCode_value) - proto.RegisterEnum("protocol.TronTransaction_TronContract_TronContractType", TronTransaction_TronContract_TronContractType_name, TronTransaction_TronContract_TronContractType_value) - proto.RegisterEnum("protocol.TronTransaction_TronResult_TronCode", TronTransaction_TronResult_TronCode_name, TronTransaction_TronResult_TronCode_value) - proto.RegisterEnum("protocol.TronTransaction_TronResult_TronContractResult", TronTransaction_TronResult_TronContractResult_name, TronTransaction_TronResult_TronContractResult_value) - proto.RegisterType((*PrepareWithdrawRequest)(nil), "protocol.PrepareWithdrawRequest") - proto.RegisterType((*PrepareWithdrawResponse)(nil), "protocol.PrepareWithdrawResponse") - proto.RegisterType((*WithdrawRequest)(nil), "protocol.WithdrawRequest") - proto.RegisterType((*WithdrawResponse)(nil), "protocol.WithdrawResponse") - proto.RegisterType((*PrepareDepositRequest)(nil), "protocol.PrepareDepositRequest") - proto.RegisterType((*PrepareDepositResponse)(nil), "protocol.PrepareDepositResponse") - proto.RegisterType((*DepositRequest)(nil), "protocol.DepositRequest") - proto.RegisterType((*DepositResponse)(nil), "protocol.DepositResponse") - proto.RegisterType((*ConfirmDepositRequest)(nil), "protocol.ConfirmDepositRequest") - proto.RegisterType((*ConfirmDepositResponse)(nil), "protocol.ConfirmDepositResponse") - proto.RegisterType((*QueryTransactionRequest)(nil), "protocol.QueryTransactionRequest") - proto.RegisterType((*QueryTransactionResponse)(nil), "protocol.QueryTransactionResponse") - proto.RegisterType((*ActivateAccountRequest)(nil), "protocol.ActivateAccountRequest") - proto.RegisterType((*ActivateAccountResponse)(nil), "protocol.ActivateAccountResponse") - proto.RegisterType((*Response)(nil), "protocol.Response") - proto.RegisterType((*TronTransaction)(nil), "protocol.TronTransaction") - proto.RegisterType((*TronTransaction_TronContract)(nil), "protocol.TronTransaction.TronContract") - proto.RegisterType((*TronTransaction_TronResult)(nil), "protocol.TronTransaction.TronResult") - proto.RegisterType((*TronTransaction_TronRaw)(nil), "protocol.TronTransaction.TronRaw") - proto.RegisterType((*TronAuthority)(nil), "protocol.TronAuthority") - proto.RegisterType((*TronAccountId)(nil), "protocol.TronAccountId") -} - -func init() { - proto.RegisterFile("protos/exchange/exchange_message.proto", fileDescriptor_064b4ad6d2e0dc73) -} - -var fileDescriptor_064b4ad6d2e0dc73 = []byte{ - // 2054 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcd, 0x6e, 0xdb, 0xca, - 0xf5, 0x8f, 0x24, 0x7f, 0xc8, 0x47, 0xb6, 0xc5, 0x8c, 0x63, 0x5b, 0x51, 0x6e, 0x9c, 0x84, 0xb8, - 0xff, 0x24, 0xf7, 0xdf, 0xc6, 0x41, 0x5d, 0xe0, 0xb6, 0x8b, 0x16, 0x05, 0x4d, 0x8e, 0x6d, 0xde, - 0x48, 0xa4, 0x33, 0xa4, 0x92, 0x66, 0x51, 0x10, 0x8c, 0x34, 0xb6, 0xd9, 0x48, 0xa4, 0x4a, 0x0e, - 0x63, 0xbb, 0xab, 0x6e, 0xfa, 0x00, 0xdd, 0x15, 0x28, 0x5a, 0x14, 0xe8, 0x93, 0xf4, 0x4d, 0xfa, - 0x02, 0xdd, 0x74, 0xd3, 0x6d, 0x31, 0xc3, 0x19, 0x8a, 0x92, 0x6f, 0x6e, 0x2e, 0x92, 0x76, 0x25, - 0xea, 0x77, 0xbe, 0xcf, 0x99, 0x73, 0xe6, 0x0c, 0x3c, 0x9e, 0xa6, 0x09, 0x4b, 0xb2, 0xe7, 0xf4, - 0x6a, 0x78, 0x11, 0xc6, 0xe7, 0xb4, 0xfc, 0x08, 0x26, 0x34, 0xcb, 0xc2, 0x73, 0xba, 0x2f, 0x18, - 0x50, 0x53, 0xfc, 0x0c, 0x93, 0x71, 0xf7, 0xee, 0x79, 0x92, 0x9c, 0x8f, 0xe9, 0x73, 0x01, 0xbc, - 0xcd, 0xcf, 0x9e, 0x87, 0xf1, 0x75, 0xc1, 0xd4, 0xed, 0x4a, 0x65, 0x63, 0x3a, 0x3a, 0xa7, 0xa9, - 0xfc, 0x29, 0x68, 0xfa, 0xdf, 0x6a, 0xb0, 0x73, 0x9a, 0xd2, 0x69, 0x98, 0xd2, 0xd7, 0x11, 0xbb, - 0x18, 0xa5, 0xe1, 0x25, 0xa1, 0xbf, 0xc9, 0x69, 0xc6, 0xd0, 0x0e, 0xac, 0x84, 0x93, 0x24, 0x8f, - 0x59, 0xa7, 0xf6, 0xb0, 0xf6, 0xb4, 0x41, 0xe4, 0x3f, 0xd4, 0x85, 0xb5, 0x24, 0x67, 0x01, 0xbb, - 0x0a, 0xa2, 0x51, 0xa7, 0x2e, 0x48, 0xab, 0x49, 0xce, 0xfc, 0x2b, 0x7b, 0x84, 0x1e, 0xc1, 0x7a, - 0x9e, 0xd1, 0x34, 0x08, 0x47, 0xa3, 0x94, 0x66, 0x59, 0xa7, 0xf1, 0xb0, 0xf6, 0x74, 0x9d, 0xb4, - 0x38, 0x66, 0x14, 0x10, 0x3a, 0x80, 0x6d, 0xc1, 0x42, 0xaf, 0x18, 0x4d, 0xe3, 0x70, 0x5c, 0xf2, - 0x2e, 0x09, 0xde, 0x2d, 0x4e, 0xc4, 0x92, 0x26, 0x65, 0xf4, 0x3f, 0xd4, 0x60, 0xf7, 0x86, 0x97, - 0xd9, 0x34, 0x89, 0x33, 0x8a, 0xf6, 0xa1, 0x99, 0xca, 0x6f, 0xe1, 0x68, 0xeb, 0x00, 0xed, 0xab, - 0xac, 0xec, 0x2b, 0x2e, 0x52, 0xf2, 0xa0, 0xaf, 0x61, 0xb7, 0xc8, 0x40, 0x50, 0xe6, 0x54, 0x79, - 0x50, 0x17, 0x1e, 0x6c, 0x17, 0x64, 0x2c, 0xa9, 0xca, 0xef, 0x4d, 0xa8, 0x47, 0x23, 0x11, 0x50, - 0x83, 0xd4, 0xa3, 0x91, 0xfe, 0xf7, 0x1a, 0xb4, 0x17, 0x53, 0x56, 0xf0, 0xd4, 0x14, 0x0f, 0x72, - 0x60, 0x3b, 0xcb, 0x87, 0x43, 0x9a, 0x65, 0x01, 0x57, 0x16, 0xd3, 0x71, 0x90, 0xb1, 0x90, 0x51, - 0x61, 0xa9, 0x75, 0xd0, 0xdd, 0x97, 0xb5, 0xf0, 0xa2, 0xf3, 0x98, 0x8e, 0xcc, 0x82, 0xc5, 0xe3, - 0x1c, 0x64, 0x4b, 0x0a, 0x56, 0x41, 0xae, 0xef, 0x2c, 0x8c, 0xc6, 0x79, 0x4a, 0x17, 0xf4, 0x35, - 0x3e, 0xae, 0x4f, 0x0a, 0x56, 0x41, 0xfd, 0x10, 0xb4, 0xcf, 0xcd, 0xa7, 0x1e, 0xc3, 0xb6, 0x2c, - 0x8d, 0x45, 0xa7, 0x49, 0x16, 0xb1, 0xff, 0xed, 0xf9, 0xd1, 0xff, 0x32, 0x3b, 0xb1, 0xa5, 0xc1, - 0x4f, 0x3c, 0x0a, 0x45, 0xb9, 0xea, 0x65, 0xb9, 0x2c, 0xd0, 0x58, 0x9a, 0xc4, 0x01, 0x4b, 0xc3, - 0x38, 0x0b, 0x87, 0x2c, 0x4a, 0x62, 0x99, 0xd9, 0xbb, 0x33, 0x3d, 0x7e, 0x9a, 0xc4, 0xfe, 0x8c, - 0x81, 0xb4, 0xd9, 0x3c, 0xa0, 0x67, 0xb0, 0xb9, 0x90, 0x89, 0xc5, 0x63, 0xf1, 0x12, 0x76, 0x33, - 0x51, 0xa1, 0xe0, 0x86, 0xb9, 0xa5, 0x8f, 0x99, 0xdb, 0x2e, 0x24, 0x17, 0x60, 0xdd, 0x80, 0xf6, - 0x67, 0x66, 0x43, 0x7f, 0x02, 0xdb, 0x66, 0x12, 0x9f, 0x45, 0xe9, 0xe4, 0xbb, 0xdd, 0xd7, 0xff, - 0x58, 0x83, 0x9d, 0x45, 0xce, 0x4f, 0xac, 0xc0, 0x7f, 0xb9, 0x41, 0xf4, 0xaf, 0x60, 0xf7, 0x65, - 0x4e, 0xd3, 0xeb, 0x6a, 0xc6, 0x3e, 0x10, 0xc5, 0xef, 0xea, 0xd0, 0xb9, 0xc9, 0xfb, 0x89, 0x71, - 0x20, 0x58, 0x62, 0xd7, 0x53, 0x2a, 0x27, 0x88, 0xf8, 0xae, 0x9c, 0xff, 0xc6, 0xdc, 0xf9, 0xbf, - 0x0f, 0xc0, 0x92, 0x77, 0x34, 0x0e, 0xe2, 0x70, 0x42, 0xe5, 0xd4, 0x5b, 0x13, 0x88, 0x13, 0x4e, - 0xe8, 0x8d, 0x16, 0x58, 0xbe, 0x39, 0x42, 0x1f, 0x40, 0x4b, 0x1c, 0x1c, 0x9e, 0xaa, 0x3c, 0xeb, - 0xac, 0x08, 0x0e, 0xe0, 0x90, 0x27, 0x10, 0xf4, 0x7f, 0xb0, 0x59, 0x4d, 0x67, 0x9e, 0x75, 0x56, - 0x05, 0xcf, 0xc6, 0x70, 0x96, 0xac, 0x3c, 0xd3, 0x0f, 0x60, 0xc7, 0x18, 0xb2, 0xe8, 0x7d, 0xc8, - 0xa8, 0x31, 0x1c, 0x72, 0xe7, 0x54, 0xb2, 0x3a, 0xb0, 0xaa, 0xec, 0xd7, 0x84, 0xa4, 0xfa, 0xab, - 0xff, 0x0a, 0x76, 0x6f, 0xc8, 0x7c, 0x46, 0xd2, 0xae, 0xec, 0xa2, 0x01, 0xd7, 0x88, 0xf8, 0xd6, - 0x7f, 0xbf, 0x02, 0xcd, 0x52, 0xe1, 0x01, 0x2c, 0x0d, 0x93, 0x51, 0xa1, 0x6c, 0xf3, 0x60, 0xef, - 0xa6, 0xb2, 0xfd, 0x94, 0xb2, 0x3c, 0x8d, 0x03, 0xce, 0x45, 0x04, 0x2f, 0x0f, 0x5d, 0x82, 0xf2, - 0xa6, 0x94, 0x35, 0xd9, 0x28, 0xd0, 0x7e, 0x01, 0xea, 0x7f, 0x5e, 0x86, 0x56, 0x45, 0x18, 0xb5, - 0x60, 0xd5, 0x1b, 0x98, 0x26, 0xf6, 0x3c, 0xed, 0x16, 0x42, 0xb0, 0x69, 0xf4, 0xdd, 0x81, 0xe3, - 0x07, 0x76, 0xaf, 0x87, 0x8f, 0x8d, 0x9e, 0x56, 0x43, 0xdb, 0x70, 0x9b, 0xe0, 0xbe, 0xeb, 0xe3, - 0xc0, 0x34, 0x7a, 0xbd, 0x00, 0x13, 0xe2, 0x12, 0xad, 0x8e, 0x76, 0x61, 0xcb, 0x76, 0x0c, 0xd3, - 0xb7, 0x5f, 0x19, 0x3e, 0xb6, 0x02, 0xc3, 0x34, 0xb9, 0x9c, 0xd6, 0x40, 0xf7, 0xe1, 0xae, 0x4f, - 0x5c, 0x27, 0x38, 0x34, 0x7a, 0x86, 0x63, 0xe2, 0xc0, 0x76, 0xbc, 0xc1, 0xd1, 0x91, 0x6d, 0xda, - 0xd8, 0xf1, 0xb5, 0x25, 0x6e, 0xc2, 0x3c, 0x31, 0x1c, 0x07, 0xf7, 0x02, 0xb3, 0xe7, 0x7a, 0xd8, - 0xd2, 0x96, 0xd1, 0x3d, 0xd8, 0x55, 0x98, 0x61, 0x59, 0x04, 0x7b, 0x5e, 0x69, 0x7f, 0x05, 0xdd, - 0x85, 0x6d, 0x82, 0x5f, 0x0e, 0xb0, 0xe7, 0x07, 0xa7, 0x06, 0x31, 0xfa, 0x25, 0x69, 0x95, 0xcb, - 0xf9, 0xc4, 0x70, 0xbc, 0x23, 0x4c, 0x4a, 0xc1, 0x23, 0xc3, 0xee, 0x61, 0x4b, 0x6b, 0xa2, 0x36, - 0xb4, 0x3c, 0xfb, 0xd8, 0x51, 0xc0, 0x1a, 0xb7, 0xdc, 0x37, 0x88, 0x77, 0x62, 0xf4, 0x14, 0x06, - 0x1c, 0xb3, 0x0c, 0xdf, 0x38, 0x34, 0x3c, 0x2c, 0x23, 0x6b, 0xf1, 0x80, 0x85, 0x56, 0x1e, 0x9c, - 0xeb, 0x04, 0xf8, 0x97, 0xb6, 0xe7, 0x6b, 0xeb, 0x68, 0x0b, 0xda, 0x87, 0xc4, 0x35, 0x2c, 0xd3, - 0xf0, 0x7c, 0xc9, 0xbb, 0xc1, 0x8d, 0x9c, 0x18, 0xde, 0x89, 0x52, 0xb8, 0x89, 0x74, 0xd8, 0x1b, - 0x78, 0x98, 0x04, 0x1f, 0x4e, 0x41, 0x1b, 0x3d, 0x80, 0x7b, 0x3d, 0x6c, 0x1d, 0x63, 0xf2, 0xed, - 0x0c, 0x1a, 0x0f, 0xb9, 0xea, 0x81, 0xe3, 0xfa, 0xd2, 0x8b, 0xdb, 0x68, 0x0f, 0xba, 0x55, 0x92, - 0xe7, 0x1b, 0xfe, 0x60, 0x96, 0x2d, 0x84, 0xee, 0x80, 0x36, 0x70, 0x16, 0xc2, 0xdc, 0x42, 0x3b, - 0x80, 0xaa, 0x52, 0x12, 0xbf, 0xc3, 0x8b, 0x58, 0xc5, 0x4f, 0xb1, 0x63, 0xd9, 0xce, 0xb1, 0xb6, - 0x8d, 0x3a, 0x70, 0xc7, 0xc2, 0xa6, 0x6b, 0xe1, 0xc0, 0xf3, 0x89, 0xed, 0x1c, 0x2b, 0x91, 0x1d, - 0xf4, 0x05, 0x74, 0xaa, 0x22, 0xfe, 0x9b, 0x53, 0x5c, 0x9a, 0xdf, 0xe5, 0xe6, 0xed, 0x53, 0x7e, - 0x18, 0x78, 0x29, 0x2c, 0xec, 0xd8, 0xd8, 0xd2, 0x3a, 0x3c, 0x1e, 0x55, 0x9e, 0x79, 0xd2, 0x5d, - 0x9e, 0x40, 0xd7, 0x3f, 0xc1, 0x44, 0x66, 0x74, 0xa8, 0xff, 0x0b, 0x41, 0x7b, 0x61, 0xc6, 0xa3, - 0x9f, 0x41, 0x33, 0x0d, 0x2f, 0x83, 0x51, 0xc8, 0x42, 0xd9, 0x5f, 0x8f, 0x3e, 0x78, 0x4f, 0x88, - 0xff, 0x24, 0xbc, 0x24, 0xab, 0x69, 0x78, 0x69, 0x85, 0x2c, 0x44, 0x5f, 0xc0, 0x1a, 0xbf, 0x3a, - 0x42, 0x96, 0xa7, 0xbc, 0x27, 0x1a, 0x7c, 0xea, 0x94, 0x00, 0xfa, 0x1a, 0x1a, 0x29, 0x65, 0x9d, - 0xe5, 0x87, 0x8d, 0xa7, 0xad, 0x83, 0x2f, 0x3f, 0xa2, 0x96, 0x66, 0xf9, 0x98, 0x11, 0x2e, 0xd0, - 0xfd, 0xe7, 0x2a, 0xac, 0x73, 0xcc, 0x4c, 0x62, 0x96, 0x86, 0x43, 0x86, 0x5e, 0xc8, 0x49, 0x58, - 0xf4, 0xec, 0x4f, 0xbe, 0x5b, 0x93, 0x92, 0x9a, 0xfb, 0xe3, 0x5f, 0x4f, 0xa9, 0x1c, 0xa1, 0x07, - 0xb0, 0x36, 0x0d, 0xd3, 0x70, 0x42, 0x19, 0x4d, 0xe5, 0x95, 0x70, 0x67, 0xbf, 0x58, 0x74, 0xf7, - 0xd5, 0xa2, 0xbb, 0x6f, 0xc4, 0xd7, 0x64, 0xc6, 0x86, 0xba, 0xc0, 0x97, 0xe2, 0xf7, 0xd1, 0x88, - 0xa6, 0x72, 0x7d, 0x28, 0xff, 0x23, 0x1d, 0xd6, 0x95, 0x15, 0x67, 0x36, 0x7c, 0xe7, 0x30, 0xfd, - 0x4f, 0x2b, 0xa0, 0x2d, 0xba, 0x23, 0x4a, 0x57, 0x4c, 0x3b, 0x33, 0xa5, 0x21, 0xa3, 0x8a, 0xa8, - 0xdd, 0xe2, 0xb5, 0x16, 0x61, 0x9d, 0xd1, 0xb4, 0x44, 0x6b, 0xe2, 0xec, 0x4a, 0xd4, 0xc8, 0x32, - 0xca, 0x4a, 0x52, 0x9d, 0x37, 0xd6, 0xab, 0x84, 0xd1, 0x79, 0xb8, 0xc1, 0x0f, 0x21, 0x87, 0x5f, - 0x47, 0x2c, 0xe6, 0xb7, 0x9a, 0x22, 0x2c, 0x71, 0x55, 0x0a, 0x9c, 0xb7, 0xbd, 0xcc, 0x0f, 0xb4, - 0x50, 0x63, 0x67, 0x59, 0x3e, 0xc3, 0x57, 0x2a, 0x22, 0x83, 0xe9, 0xa8, 0x2a, 0xd2, 0x44, 0x8f, - 0xe0, 0xfe, 0x69, 0x98, 0xb2, 0x68, 0x18, 0x4d, 0x43, 0xe9, 0xc4, 0xbc, 0xf4, 0x5a, 0x25, 0xd8, - 0x05, 0x69, 0xe0, 0xa4, 0xa3, 0x94, 0xd2, 0xdf, 0xd2, 0xc3, 0x70, 0x1c, 0xc6, 0xc3, 0x19, 0xa9, - 0xc5, 0xa7, 0xd0, 0x20, 0x3e, 0xfb, 0x56, 0xe2, 0x3a, 0x27, 0xaa, 0x45, 0x73, 0x91, 0xb8, 0xc1, - 0x95, 0x2a, 0xc9, 0xf9, 0xa4, 0x6c, 0xf2, 0xa4, 0x14, 0x3e, 0xcc, 0x13, 0xda, 0xa8, 0xcb, 0x97, - 0xc0, 0x64, 0x9a, 0x64, 0xe1, 0x78, 0x21, 0x2b, 0x1a, 0x37, 0xa6, 0x68, 0xc6, 0x94, 0xd7, 0x7e, - 0x46, 0xbc, 0x5d, 0x15, 0xb4, 0xe8, 0x98, 0x56, 0x04, 0x11, 0x6f, 0x77, 0x8f, 0x32, 0x19, 0xbb, - 0x3d, 0x2a, 0x29, 0x5b, 0x62, 0x5c, 0xe7, 0x19, 0x4b, 0x26, 0x25, 0x26, 0xa6, 0x46, 0x61, 0xda, - 0x9b, 0x84, 0xe9, 0xcc, 0xb7, 0x3d, 0xae, 0xc6, 0x4f, 0xa3, 0xf3, 0x73, 0x9a, 0xce, 0x53, 0x1e, - 0xf0, 0x36, 0x3f, 0xae, 0x84, 0xf1, 0x50, 0x84, 0x2e, 0xe2, 0xf3, 0x28, 0x63, 0x51, 0x7c, 0x5e, - 0x92, 0x1e, 0x71, 0x47, 0xd5, 0x13, 0x64, 0x21, 0xc2, 0xaf, 0xaa, 0x34, 0x3b, 0xfe, 0x35, 0x1d, - 0xce, 0x54, 0xfe, 0x3f, 0x9f, 0x4c, 0x8a, 0xa6, 0x52, 0x5e, 0x52, 0x7f, 0xc0, 0x87, 0xae, 0xa2, - 0x56, 0x9a, 0xb1, 0x64, 0xf8, 0x21, 0xbf, 0xb7, 0x0a, 0x8f, 0x70, 0x4c, 0xd3, 0xf3, 0xeb, 0x5e, - 0x34, 0x89, 0x66, 0xda, 0x9f, 0x75, 0xff, 0xb1, 0x02, 0x30, 0x9b, 0x01, 0x48, 0x83, 0xc6, 0x19, - 0xa5, 0x72, 0xab, 0xe2, 0x9f, 0xe8, 0x17, 0xc5, 0x20, 0xa9, 0x8b, 0xf6, 0x7f, 0xf6, 0x7d, 0x06, - 0x89, 0x6c, 0xfe, 0x11, 0x15, 0x13, 0x05, 0xbd, 0x81, 0xd6, 0x50, 0xda, 0x23, 0xb4, 0xd8, 0x9d, - 0x3e, 0x3a, 0x47, 0xe6, 0x14, 0x29, 0x59, 0x31, 0xa4, 0xaa, 0xba, 0x78, 0xfb, 0x87, 0xe5, 0x81, - 0xb7, 0xad, 0xce, 0xa6, 0x58, 0x3c, 0xe6, 0x30, 0xf4, 0x04, 0xda, 0x97, 0x32, 0x6d, 0x81, 0x5c, - 0xdf, 0xda, 0x22, 0xba, 0x4d, 0x05, 0x1b, 0xc5, 0x1a, 0xf7, 0x04, 0xda, 0xb9, 0x3c, 0xb5, 0x8a, - 0x51, 0x2b, 0x18, 0x15, 0x2c, 0x19, 0x7f, 0x0a, 0x9d, 0xf2, 0xa5, 0x99, 0xd2, 0x21, 0x8d, 0xde, - 0xd3, 0x91, 0x92, 0x40, 0x42, 0x62, 0x47, 0xd1, 0x89, 0x24, 0x4b, 0x49, 0x13, 0xf6, 0x4a, 0xc9, - 0x48, 0xd4, 0x39, 0x08, 0xe3, 0x84, 0x5d, 0xf0, 0xed, 0xb0, 0x90, 0xdf, 0x12, 0xf2, 0xf7, 0xe8, - 0xdc, 0x61, 0x30, 0x0a, 0x1e, 0xa9, 0xe4, 0x18, 0x1e, 0x96, 0x4a, 0x66, 0x91, 0xcd, 0xab, 0xb9, - 0x23, 0xd4, 0xdc, 0xa7, 0x0b, 0xe7, 0x66, 0x5e, 0xd1, 0x03, 0x68, 0xcd, 0xbc, 0x19, 0x75, 0xb6, - 0x85, 0x0c, 0x94, 0xa6, 0x47, 0xba, 0x0e, 0x4d, 0x55, 0x4a, 0x04, 0xb0, 0xe2, 0x0d, 0xe4, 0x3a, - 0x05, 0xb0, 0x22, 0xef, 0xcd, 0x9a, 0xfe, 0xd7, 0x3a, 0xa0, 0x9b, 0x65, 0xe2, 0xeb, 0x97, 0x85, - 0x8f, 0x8c, 0x41, 0xcf, 0xd7, 0x6e, 0x55, 0x77, 0xb1, 0x1a, 0x17, 0x26, 0xf8, 0x15, 0x26, 0xbe, - 0x56, 0xe7, 0x8d, 0x75, 0x68, 0x58, 0xc1, 0x37, 0x83, 0xfe, 0x69, 0x60, 0x61, 0xcf, 0xb7, 0x1d, - 0x83, 0xdf, 0xbe, 0x5a, 0x03, 0xdd, 0x86, 0x0d, 0x77, 0xe0, 0x07, 0xee, 0x51, 0xd0, 0xc7, 0x7d, - 0x97, 0xbc, 0xd1, 0x96, 0x38, 0xf3, 0x29, 0xc1, 0xa6, 0xdb, 0x3f, 0xe5, 0xa6, 0x03, 0xd3, 0x75, - 0x7c, 0x62, 0x98, 0xbe, 0xb6, 0xcc, 0x57, 0x18, 0xcf, 0x37, 0xcc, 0x17, 0x81, 0xef, 0xba, 0x81, - 0xd7, 0x37, 0x7a, 0x7c, 0xbf, 0x9a, 0x03, 0x7b, 0x06, 0x39, 0xc6, 0xda, 0x2a, 0x1f, 0xd5, 0xf2, - 0x52, 0x0f, 0xdc, 0x53, 0x4c, 0x0a, 0x6b, 0x4d, 0x3e, 0x0d, 0x0a, 0x5e, 0xf7, 0x15, 0x26, 0x47, - 0x3d, 0xf7, 0xb5, 0xb6, 0x56, 0xf1, 0x00, 0x3b, 0x98, 0x1c, 0xbf, 0xd1, 0x40, 0x5c, 0xea, 0x05, - 0xe4, 0xdb, 0x7d, 0xac, 0xb5, 0xf8, 0xc4, 0xf8, 0xe6, 0x55, 0x3f, 0x98, 0xc9, 0x06, 0x42, 0x78, - 0x9d, 0x47, 0x3c, 0x70, 0x5e, 0x38, 0xee, 0x6b, 0x47, 0xdb, 0xe8, 0xfe, 0xbb, 0x0e, 0xab, 0xf2, - 0xf6, 0x46, 0x8f, 0xa1, 0x9d, 0xd2, 0xb3, 0xe0, 0xed, 0x38, 0x19, 0xbe, 0x0b, 0xde, 0x5e, 0x33, - 0xaa, 0xf6, 0xf1, 0x8d, 0x94, 0x9e, 0x1d, 0x72, 0xf4, 0x90, 0x83, 0x48, 0x87, 0x8d, 0x19, 0x5f, - 0x9c, 0x4f, 0xe4, 0x93, 0xa3, 0xa5, 0xb8, 0x9c, 0x7c, 0x82, 0xbe, 0xe4, 0x9b, 0xb1, 0xe2, 0xb9, - 0x08, 0xb3, 0x0b, 0x75, 0xfd, 0x29, 0xa6, 0x93, 0x30, 0xbb, 0x40, 0x7b, 0x00, 0xf4, 0x6a, 0x1a, - 0xa5, 0xa1, 0x78, 0x8e, 0x36, 0x55, 0x91, 0x15, 0x82, 0x9e, 0xc1, 0x72, 0x98, 0xb3, 0x8b, 0xac, - 0xb3, 0x26, 0x56, 0x85, 0xdd, 0xf9, 0xc6, 0x34, 0x72, 0x76, 0x91, 0xa4, 0x11, 0xbb, 0x26, 0x05, - 0x17, 0xdf, 0xf1, 0xc5, 0xbe, 0x02, 0xc5, 0xc3, 0x88, 0x7f, 0xa3, 0x43, 0x68, 0xaa, 0xae, 0xec, - 0xb4, 0x84, 0x96, 0xc7, 0xdf, 0x6f, 0x4d, 0x20, 0xa5, 0x1c, 0x7f, 0xa0, 0x64, 0xc3, 0x34, 0x9a, - 0xb2, 0xac, 0xb3, 0x5e, 0x3c, 0x50, 0xe4, 0x5f, 0xbe, 0xe7, 0xb0, 0x68, 0x42, 0x33, 0x16, 0x4e, - 0xa6, 0xa2, 0xc3, 0x1b, 0x64, 0x06, 0xa0, 0x7b, 0xb0, 0x76, 0x46, 0x69, 0x30, 0xe6, 0x63, 0x4d, - 0x76, 0x5f, 0xf3, 0x8c, 0x52, 0x31, 0xe6, 0xf4, 0x77, 0xb0, 0x31, 0x17, 0x04, 0xfa, 0x11, 0xac, - 0x86, 0xc5, 0x6d, 0x20, 0x17, 0xae, 0xc5, 0x70, 0xd5, 0x55, 0x41, 0x14, 0x1f, 0x1f, 0x0b, 0x53, - 0x9a, 0x4e, 0xa2, 0x2c, 0x8b, 0x12, 0xf9, 0xc4, 0x2b, 0x1e, 0x20, 0x9b, 0x33, 0x58, 0xec, 0x19, - 0x3f, 0x97, 0xc6, 0x94, 0x0a, 0x9e, 0x2a, 0xc1, 0x5e, 0x14, 0x58, 0x7c, 0x57, 0xdf, 0x61, 0xf5, - 0xb9, 0x77, 0xd8, 0xdb, 0x15, 0xe1, 0xc8, 0x8f, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0xeb, 0xdb, - 0xae, 0x87, 0x2a, 0x14, 0x00, 0x00, -} diff --git a/protos/exchange/exchange_message.proto b/protos/exchange/exchange_message.proto deleted file mode 100644 index 54a2baf..0000000 --- a/protos/exchange/exchange_message.proto +++ /dev/null @@ -1,220 +0,0 @@ -syntax = "proto3"; - -package protocol; - -import "google/protobuf/any.proto"; -import "protos/ledger/ledger.proto"; - -message PrepareWithdrawRequest { - int64 amount = 1; - int64 out_tx_id = 2; - bytes user_address = 3; - bytes user_external_address = 4; -} - -message PrepareWithdrawResponse { - Response response = 1; - bytes ledger_exchange_address = 2; - int64 id = 3; -} - -message WithdrawRequest { - int64 id = 1; - ledger.SignedChannelState success_channel_state = 2; - ledger.SignedChannelState failure_channel_state = 3; -} - -message WithdrawResponse { - Response response = 1; -} - -message PrepareDepositRequest { - int64 amount = 1; - int64 out_tx_id = 2; - bytes user_address = 3; -} - -message PrepareDepositResponse { - Response response = 1; - int64 id = 2; - TronTransaction tron_transaction = 3; -} - -message DepositRequest { - int64 id = 1; - TronTransaction signed_tron_transaction = 4; -} - -message DepositResponse { - Response response = 1; -} - -message ConfirmDepositRequest { - int64 id = 1; -} - -message ConfirmDepositResponse { - Response response = 1; - ledger.SignedChannelState success_channel_state = 2; -} - -message QueryTransactionRequest { - int64 id = 1; -} - -message QueryTransactionResponse { - Response response = 1; - bytes type = 2; - int64 amount = 3; - bytes token_name = 4; - bytes user_address = 5; - bytes tron_status = 6; - bytes channel_status = 7; -} - -message ActivateAccountRequest { - bytes address = 1; -} - -message ActivateAccountResponse { - Response response = 1; - string txId = 2; -} - -message Response { - enum return_code { - SUCCESS = 0; - AMOUNT_ILLEGAL = 1; - REMOTE_CALL_ERROR = 2; - INACTIVATED_ACCOUNT = 3; - TRON_BALANCE_INSUFFICIENT = 4; - CHANNEL_CLOSED = 5; - CHANNEL_ADDRESS_ILLEGAL = 6; - REQUEST_PARAM_ILLEGAL = 7; - TRANSFER_ADDRESS_FAILED = 8; - SIGN_FAILED = 9; - MARSHAL_FAILED = 10; - DATABASE_ERROR = 11; - TRANSACTION_EXIST = 12; - BROADCAST_ERROR = 13; - HASH_FAILED = 14; - USER_TRON_BALANCE_INSUFFICIENT = 15; - LEDGER_BALANCE_INSUFFICIENT = 16; - TRANSACTION_NOT_EXIST = 17; - TRANSACTION_STATUS_ILLEGAL = 18; - UNMARSHAL_FAILED = 19; - TRANSACTION_FAILED = 20; - TRANSACTION_PENDING = 21; - DECODE_STRING_FAILED = 22; - TRANSACTION_TYPE_ILLEGAL = 23; - IP_ACCESS_DENIED = 24; - ADDRESS_ACCESS_DENIED = 25; - OTHER_ERROR = 99; - } - return_code code = 1; - bytes return_message = 2; -} - -message TronTransaction { - message TronContract { - enum TronContractType { - 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; - UpdateEnergyLimitContract = 45; - } - TronContractType type = 1; - google.protobuf.Any parameter = 2; - bytes provider = 3; - bytes ContractName = 4; - } - message TronResult { - enum TronCode { - SUCESS = 0; - FAILED = 1; - } - enum TronContractResult { - 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; - TronCode ret = 2; - TronContractResult 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 TronRaw { - bytes ref_block_bytes = 1; - int64 ref_block_num = 3; - bytes ref_block_hash = 4; - int64 expiration = 8; - repeated TronAuthority auths = 9; - // data not used - bytes data = 10; - //only support size = 1, repeated list here for extension - repeated TronContract contract = 11; - // scripts not used - bytes scripts = 12; - int64 timestamp = 14; - int64 fee_limit = 18; - } - TronRaw raw_data = 1; - // only support size = 1, repeated list here for muti-sig extension - repeated bytes signature = 2; - repeated TronResult ret = 5; -} - -message TronAuthority { - TronAccountId account = 1; - bytes permission_name = 2; -} - -message TronAccountId { - bytes name = 1; - bytes address = 2; -} diff --git a/protos/guard/guard.pb.go b/protos/guard/guard.pb.go deleted file mode 100644 index c33593c..0000000 --- a/protos/guard/guard.pb.go +++ /dev/null @@ -1,18919 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: protos/guard/guard.proto - -package guard - -import ( - context "context" - fmt "fmt" - _ "github.com/gogo/protobuf/types" - golang_proto "github.com/golang/protobuf/proto" - _ "github.com/tron-us/protobuf/gogoproto" - proto "github.com/tron-us/protobuf/proto" - github_com_tron_us_protobuf_types "github.com/tron-us/protobuf/types" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = golang_proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type ResponseCode int32 - -const ( - ResponseCode_SUCCESS ResponseCode = 0 - ResponseCode_SIGNATURE_FORMAT_ERROR ResponseCode = 1 - ResponseCode_COMPUTE_ADDRESS_ERROR ResponseCode = 2 - ResponseCode_OTHER_ERROR ResponseCode = 20 -) - -var ResponseCode_name = map[int32]string{ - 0: "SUCCESS", - 1: "SIGNATURE_FORMAT_ERROR", - 2: "COMPUTE_ADDRESS_ERROR", - 20: "OTHER_ERROR", -} - -var ResponseCode_value = map[string]int32{ - "SUCCESS": 0, - "SIGNATURE_FORMAT_ERROR": 1, - "COMPUTE_ADDRESS_ERROR": 2, - "OTHER_ERROR": 20, -} - -func (x ResponseCode) String() string { - return proto.EnumName(ResponseCode_name, int32(x)) -} - -func (ResponseCode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{0} -} - -type ContractMeta_Schedule int32 - -const ( - ContractMeta_MONTHLY ContractMeta_Schedule = 0 - ContractMeta_QUARTERLY ContractMeta_Schedule = 1 - ContractMeta_ANNUALLY ContractMeta_Schedule = 2 -) - -var ContractMeta_Schedule_name = map[int32]string{ - 0: "MONTHLY", - 1: "QUARTERLY", - 2: "ANNUALLY", -} - -var ContractMeta_Schedule_value = map[string]int32{ - "MONTHLY": 0, - "QUARTERLY": 1, - "ANNUALLY": 2, -} - -func (x ContractMeta_Schedule) String() string { - return proto.EnumName(ContractMeta_Schedule_name, int32(x)) -} - -func (ContractMeta_Schedule) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{6, 0} -} - -type Contract_ContractState int32 - -const ( - Contract_DRAFT Contract_ContractState = 0 - Contract_SIGNED Contract_ContractState = 1 - Contract_UPLOADED Contract_ContractState = 2 - Contract_LOST Contract_ContractState = 3 - Contract_CANCELED Contract_ContractState = 4 - Contract_CLOSED Contract_ContractState = 5 - Contract_RENEWED Contract_ContractState = 6 - Contract_OBSOLETE Contract_ContractState = 7 - Contract_WARN Contract_ContractState = 8 - Contract_DRAFT_WARN Contract_ContractState = 9 - Contract_READY_CHALLENGE Contract_ContractState = 10 - Contract_RECREATED Contract_ContractState = 11 - Contract_REQUEST_CHALLENGE Contract_ContractState = 12 -) - -var Contract_ContractState_name = map[int32]string{ - 0: "DRAFT", - 1: "SIGNED", - 2: "UPLOADED", - 3: "LOST", - 4: "CANCELED", - 5: "CLOSED", - 6: "RENEWED", - 7: "OBSOLETE", - 8: "WARN", - 9: "DRAFT_WARN", - 10: "READY_CHALLENGE", - 11: "RECREATED", - 12: "REQUEST_CHALLENGE", -} - -var Contract_ContractState_value = map[string]int32{ - "DRAFT": 0, - "SIGNED": 1, - "UPLOADED": 2, - "LOST": 3, - "CANCELED": 4, - "CLOSED": 5, - "RENEWED": 6, - "OBSOLETE": 7, - "WARN": 8, - "DRAFT_WARN": 9, - "READY_CHALLENGE": 10, - "RECREATED": 11, - "REQUEST_CHALLENGE": 12, -} - -func (x Contract_ContractState) String() string { - return proto.EnumName(Contract_ContractState_name, int32(x)) -} - -func (Contract_ContractState) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{7, 0} -} - -type FileStoreStatus_MetaState int32 - -const ( - FileStoreStatus_DRAFT FileStoreStatus_MetaState = 0 - FileStoreStatus_UPLOADING FileStoreStatus_MetaState = 1 - FileStoreStatus_RUNNING FileStoreStatus_MetaState = 2 - FileStoreStatus_PARTIAL_LOST FileStoreStatus_MetaState = 3 - FileStoreStatus_LOST FileStoreStatus_MetaState = 4 - FileStoreStatus_DONE FileStoreStatus_MetaState = 5 - FileStoreStatus_CANCELED FileStoreStatus_MetaState = 6 - FileStoreStatus_RECREATED FileStoreStatus_MetaState = 7 -) - -var FileStoreStatus_MetaState_name = map[int32]string{ - 0: "DRAFT", - 1: "UPLOADING", - 2: "RUNNING", - 3: "PARTIAL_LOST", - 4: "LOST", - 5: "DONE", - 6: "CANCELED", - 7: "RECREATED", -} - -var FileStoreStatus_MetaState_value = map[string]int32{ - "DRAFT": 0, - "UPLOADING": 1, - "RUNNING": 2, - "PARTIAL_LOST": 3, - "LOST": 4, - "DONE": 5, - "CANCELED": 6, - "RECREATED": 7, -} - -func (x FileStoreStatus_MetaState) String() string { - return proto.EnumName(FileStoreStatus_MetaState_name, int32(x)) -} - -func (FileStoreStatus_MetaState) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{10, 0} -} - -type FileStoreStatus_RentalState int32 - -const ( - FileStoreStatus_NEW FileStoreStatus_RentalState = 0 - FileStoreStatus_PARTIAL_NEW FileStoreStatus_RentalState = 1 - FileStoreStatus_EXPIRED FileStoreStatus_RentalState = 2 - FileStoreStatus_RENEW FileStoreStatus_RentalState = 3 - FileStoreStatus_RECREATE FileStoreStatus_RentalState = 4 -) - -var FileStoreStatus_RentalState_name = map[int32]string{ - 0: "NEW", - 1: "PARTIAL_NEW", - 2: "EXPIRED", - 3: "RENEW", - 4: "RECREATE", -} - -var FileStoreStatus_RentalState_value = map[string]int32{ - "NEW": 0, - "PARTIAL_NEW": 1, - "EXPIRED": 2, - "RENEW": 3, - "RECREATE": 4, -} - -func (x FileStoreStatus_RentalState) String() string { - return proto.EnumName(FileStoreStatus_RentalState_name, int32(x)) -} - -func (FileStoreStatus_RentalState) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{10, 1} -} - -type ListHostContractsRequest_SelectState int32 - -const ( - ListHostContractsRequest_ALL ListHostContractsRequest_SelectState = 0 - ListHostContractsRequest_ACTIVE ListHostContractsRequest_SelectState = 1 - ListHostContractsRequest_CLOSED ListHostContractsRequest_SelectState = 2 -) - -var ListHostContractsRequest_SelectState_name = map[int32]string{ - 0: "ALL", - 1: "ACTIVE", - 2: "CLOSED", -} - -var ListHostContractsRequest_SelectState_value = map[string]int32{ - "ALL": 0, - "ACTIVE": 1, - "CLOSED": 2, -} - -func (x ListHostContractsRequest_SelectState) String() string { - return proto.EnumName(ListHostContractsRequest_SelectState_name, int32(x)) -} - -func (ListHostContractsRequest_SelectState) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{17, 0} -} - -type RepairContractResponse_ContractResponseStatus int32 - -const ( - RepairContractResponse_BOTH_SIGNED RepairContractResponse_ContractResponseStatus = 0 - RepairContractResponse_WAIT_LIST RepairContractResponse_ContractResponseStatus = 1 - RepairContractResponse_REJECTED RepairContractResponse_ContractResponseStatus = 2 -) - -var RepairContractResponse_ContractResponseStatus_name = map[int32]string{ - 0: "BOTH_SIGNED", - 1: "WAIT_LIST", - 2: "REJECTED", -} - -var RepairContractResponse_ContractResponseStatus_value = map[string]int32{ - "BOTH_SIGNED": 0, - "WAIT_LIST": 1, - "REJECTED": 2, -} - -func (x RepairContractResponse_ContractResponseStatus) String() string { - return proto.EnumName(RepairContractResponse_ContractResponseStatus_name, int32(x)) -} - -func (RepairContractResponse_ContractResponseStatus) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{25, 0} -} - -type ResponseRepairContracts_RepairStat int32 - -const ( - ResponseRepairContracts_CONTRACT_READY ResponseRepairContracts_RepairStat = 0 - ResponseRepairContracts_DOWNLOAD_NOT_DONE ResponseRepairContracts_RepairStat = 1 - ResponseRepairContracts_REQUEST_AGAIN ResponseRepairContracts_RepairStat = 2 - ResponseRepairContracts_CONTRACT_CLOSED ResponseRepairContracts_RepairStat = 3 -) - -var ResponseRepairContracts_RepairStat_name = map[int32]string{ - 0: "CONTRACT_READY", - 1: "DOWNLOAD_NOT_DONE", - 2: "REQUEST_AGAIN", - 3: "CONTRACT_CLOSED", -} - -var ResponseRepairContracts_RepairStat_value = map[string]int32{ - "CONTRACT_READY": 0, - "DOWNLOAD_NOT_DONE": 1, - "REQUEST_AGAIN": 2, - "CONTRACT_CLOSED": 3, -} - -func (x ResponseRepairContracts_RepairStat) String() string { - return proto.EnumName(ResponseRepairContracts_RepairStat_name, int32(x)) -} - -func (ResponseRepairContracts_RepairStat) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{27, 0} -} - -type CancelContractRequest_CancelReason int32 - -const ( - CancelContractRequest_HOST_REQUEST CancelContractRequest_CancelReason = 0 - CancelContractRequest_DOWNLOAD_FAIL CancelContractRequest_CancelReason = 1 - CancelContractRequest_RENTER_REQUEST CancelContractRequest_CancelReason = 2 - CancelContractRequest_OTHER CancelContractRequest_CancelReason = 3 -) - -var CancelContractRequest_CancelReason_name = map[int32]string{ - 0: "HOST_REQUEST", - 1: "DOWNLOAD_FAIL", - 2: "RENTER_REQUEST", - 3: "OTHER", -} - -var CancelContractRequest_CancelReason_value = map[string]int32{ - "HOST_REQUEST": 0, - "DOWNLOAD_FAIL": 1, - "RENTER_REQUEST": 2, - "OTHER": 3, -} - -func (x CancelContractRequest_CancelReason) String() string { - return proto.EnumName(CancelContractRequest_CancelReason_name, int32(x)) -} - -func (CancelContractRequest_CancelReason) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{28, 0} -} - -type AdminQuery struct { - RequesterPid string `protobuf:"bytes,1,opt,name=requester_pid,json=requesterPid,proto3" json:"requester_pid,omitempty" pg:"requester_pid"` - QueryDate time.Time `protobuf:"bytes,2,opt,name=query_date,json=queryDate,proto3,stdtime" json:"query_date" pg:"query_date"` - QueryCount int32 `protobuf:"varint,3,opt,name=query_count,json=queryCount,proto3" json:"query_count,omitempty" pg:"query_count"` - RequestTime time.Time `protobuf:"bytes,4,opt,name=request_time,json=requestTime,proto3,stdtime" json:"request_time" pg:"request_time"` - Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *AdminQuery) Reset() { *m = AdminQuery{} } -func (m *AdminQuery) String() string { return proto.CompactTextString(m) } -func (*AdminQuery) ProtoMessage() {} -func (*AdminQuery) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{0} -} -func (m *AdminQuery) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AdminQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AdminQuery.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AdminQuery) XXX_Merge(src proto.Message) { - xxx_messageInfo_AdminQuery.Merge(m, src) -} -func (m *AdminQuery) XXX_Size() int { - return m.Size() -} -func (m *AdminQuery) XXX_DiscardUnknown() { - xxx_messageInfo_AdminQuery.DiscardUnknown(m) -} - -var xxx_messageInfo_AdminQuery proto.InternalMessageInfo - -func (m *AdminQuery) GetRequesterPid() string { - if m != nil { - return m.RequesterPid - } - return "" -} - -func (m *AdminQuery) GetQueryDate() time.Time { - if m != nil { - return m.QueryDate - } - return time.Time{} -} - -func (m *AdminQuery) GetQueryCount() int32 { - if m != nil { - return m.QueryCount - } - return 0 -} - -func (m *AdminQuery) GetRequestTime() time.Time { - if m != nil { - return m.RequestTime - } - return time.Time{} -} - -func (m *AdminQuery) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (*AdminQuery) XXX_MessageName() string { - return "guard.AdminQuery" -} - -type DailySummary struct { - QueryDate time.Time `protobuf:"bytes,1,opt,name=query_date,json=queryDate,proto3,stdtime" json:"query_date" pg:"query_date"` - ResponseTime time.Time `protobuf:"bytes,2,opt,name=response_time,json=responseTime,proto3,stdtime" json:"response_time" pg:"response_time"` - PreparerPid string `protobuf:"bytes,3,opt,name=preparer_pid,json=preparerPid,proto3" json:"preparer_pid,omitempty" pg:"preparer_pid"` - Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - WorkingStorageSize int64 `protobuf:"varint,5,opt,name=working_storage_size,json=workingStorageSize,proto3" json:"working_storage_size,omitempty" pg:"working_storage_size"` - NewContracts int64 `protobuf:"varint,6,opt,name=new_contracts,json=newContracts,proto3" json:"new_contracts,omitempty" pg:"new_contracts"` - NewContractsHost int64 `protobuf:"varint,7,opt,name=new_contracts_host,json=newContractsHost,proto3" json:"new_contracts_host,omitempty" pg:"new_contracts_host"` - NewContractsRenter int64 `protobuf:"varint,8,opt,name=new_contracts_renter,json=newContractsRenter,proto3" json:"new_contracts_renter,omitempty" pg:"new_contracts_renter"` - NewContractsAveragePrice int64 `protobuf:"varint,9,opt,name=new_contracts_average_price,json=newContractsAveragePrice,proto3" json:"new_contracts_average_price,omitempty" pg:"new_contracts_average_price"` - NewFiles int64 `protobuf:"varint,10,opt,name=new_files,json=newFiles,proto3" json:"new_files,omitempty" pg:"new_files"` - NewShardsSize int64 `protobuf:"varint,11,opt,name=new_shards_size,json=newShardsSize,proto3" json:"new_shards_size,omitempty" pg:"new_shards_size"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *DailySummary) Reset() { *m = DailySummary{} } -func (m *DailySummary) String() string { return proto.CompactTextString(m) } -func (*DailySummary) ProtoMessage() {} -func (*DailySummary) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{1} -} -func (m *DailySummary) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DailySummary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DailySummary.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DailySummary) XXX_Merge(src proto.Message) { - xxx_messageInfo_DailySummary.Merge(m, src) -} -func (m *DailySummary) XXX_Size() int { - return m.Size() -} -func (m *DailySummary) XXX_DiscardUnknown() { - xxx_messageInfo_DailySummary.DiscardUnknown(m) -} - -var xxx_messageInfo_DailySummary proto.InternalMessageInfo - -func (m *DailySummary) GetQueryDate() time.Time { - if m != nil { - return m.QueryDate - } - return time.Time{} -} - -func (m *DailySummary) GetResponseTime() time.Time { - if m != nil { - return m.ResponseTime - } - return time.Time{} -} - -func (m *DailySummary) GetPreparerPid() string { - if m != nil { - return m.PreparerPid - } - return "" -} - -func (m *DailySummary) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (m *DailySummary) GetWorkingStorageSize() int64 { - if m != nil { - return m.WorkingStorageSize - } - return 0 -} - -func (m *DailySummary) GetNewContracts() int64 { - if m != nil { - return m.NewContracts - } - return 0 -} - -func (m *DailySummary) GetNewContractsHost() int64 { - if m != nil { - return m.NewContractsHost - } - return 0 -} - -func (m *DailySummary) GetNewContractsRenter() int64 { - if m != nil { - return m.NewContractsRenter - } - return 0 -} - -func (m *DailySummary) GetNewContractsAveragePrice() int64 { - if m != nil { - return m.NewContractsAveragePrice - } - return 0 -} - -func (m *DailySummary) GetNewFiles() int64 { - if m != nil { - return m.NewFiles - } - return 0 -} - -func (m *DailySummary) GetNewShardsSize() int64 { - if m != nil { - return m.NewShardsSize - } - return 0 -} - -func (*DailySummary) XXX_MessageName() string { - return "guard.DailySummary" -} - -type HostSummary struct { - QueryDate time.Time `protobuf:"bytes,1,opt,name=query_date,json=queryDate,proto3,stdtime" json:"query_date" pg:"query_date"` - ResponseTime time.Time `protobuf:"bytes,2,opt,name=response_time,json=responseTime,proto3,stdtime" json:"response_time" pg:"response_time"` - PreparerPid string `protobuf:"bytes,3,opt,name=preparer_pid,json=preparerPid,proto3" json:"preparer_pid,omitempty" pg:"preparer_pid"` - Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - RecordCount int32 `protobuf:"varint,5,opt,name=record_count,json=recordCount,proto3" json:"record_count,omitempty" pg:"record_count"` - Status []*HostStatus `protobuf:"bytes,6,rep,name=status,proto3" json:"status,omitempty" pg:"status"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *HostSummary) Reset() { *m = HostSummary{} } -func (m *HostSummary) String() string { return proto.CompactTextString(m) } -func (*HostSummary) ProtoMessage() {} -func (*HostSummary) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{2} -} -func (m *HostSummary) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HostSummary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HostSummary.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *HostSummary) XXX_Merge(src proto.Message) { - xxx_messageInfo_HostSummary.Merge(m, src) -} -func (m *HostSummary) XXX_Size() int { - return m.Size() -} -func (m *HostSummary) XXX_DiscardUnknown() { - xxx_messageInfo_HostSummary.DiscardUnknown(m) -} - -var xxx_messageInfo_HostSummary proto.InternalMessageInfo - -func (m *HostSummary) GetQueryDate() time.Time { - if m != nil { - return m.QueryDate - } - return time.Time{} -} - -func (m *HostSummary) GetResponseTime() time.Time { - if m != nil { - return m.ResponseTime - } - return time.Time{} -} - -func (m *HostSummary) GetPreparerPid() string { - if m != nil { - return m.PreparerPid - } - return "" -} - -func (m *HostSummary) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (m *HostSummary) GetRecordCount() int32 { - if m != nil { - return m.RecordCount - } - return 0 -} - -func (m *HostSummary) GetStatus() []*HostStatus { - if m != nil { - return m.Status - } - return nil -} - -func (*HostSummary) XXX_MessageName() string { - return "guard.HostSummary" -} - -type TotalStateSummary struct { - QueryDate time.Time `protobuf:"bytes,1,opt,name=query_date,json=queryDate,proto3,stdtime" json:"query_date" pg:"query_date"` - ResponseTime time.Time `protobuf:"bytes,2,opt,name=response_time,json=responseTime,proto3,stdtime" json:"response_time" pg:"response_time"` - PreparerPid string `protobuf:"bytes,3,opt,name=preparer_pid,json=preparerPid,proto3" json:"preparer_pid,omitempty" pg:"preparer_pid"` - Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - ValidContractCount int64 `protobuf:"varint,5,opt,name=valid_contract_count,json=validContractCount,proto3" json:"valid_contract_count,omitempty" pg:"valid_contract_count"` - ExistedShardSize int64 `protobuf:"varint,6,opt,name=existed_shard_size,json=existedShardSize,proto3" json:"existed_shard_size,omitempty" pg:"existed_shard_size"` - InvalidContractCount int64 `protobuf:"varint,7,opt,name=invalid_contract_count,json=invalidContractCount,proto3" json:"invalid_contract_count,omitempty" pg:"invalid_contract_count"` - LostShardSize int64 `protobuf:"varint,8,opt,name=lost_shard_size,json=lostShardSize,proto3" json:"lost_shard_size,omitempty" pg:"lost_shard_size"` - TotalHostReward int64 `protobuf:"varint,9,opt,name=total_host_reward,json=totalHostReward,proto3" json:"total_host_reward,omitempty" pg:"total_host_reward"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *TotalStateSummary) Reset() { *m = TotalStateSummary{} } -func (m *TotalStateSummary) String() string { return proto.CompactTextString(m) } -func (*TotalStateSummary) ProtoMessage() {} -func (*TotalStateSummary) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{3} -} -func (m *TotalStateSummary) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TotalStateSummary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TotalStateSummary.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TotalStateSummary) XXX_Merge(src proto.Message) { - xxx_messageInfo_TotalStateSummary.Merge(m, src) -} -func (m *TotalStateSummary) XXX_Size() int { - return m.Size() -} -func (m *TotalStateSummary) XXX_DiscardUnknown() { - xxx_messageInfo_TotalStateSummary.DiscardUnknown(m) -} - -var xxx_messageInfo_TotalStateSummary proto.InternalMessageInfo - -func (m *TotalStateSummary) GetQueryDate() time.Time { - if m != nil { - return m.QueryDate - } - return time.Time{} -} - -func (m *TotalStateSummary) GetResponseTime() time.Time { - if m != nil { - return m.ResponseTime - } - return time.Time{} -} - -func (m *TotalStateSummary) GetPreparerPid() string { - if m != nil { - return m.PreparerPid - } - return "" -} - -func (m *TotalStateSummary) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (m *TotalStateSummary) GetValidContractCount() int64 { - if m != nil { - return m.ValidContractCount - } - return 0 -} - -func (m *TotalStateSummary) GetExistedShardSize() int64 { - if m != nil { - return m.ExistedShardSize - } - return 0 -} - -func (m *TotalStateSummary) GetInvalidContractCount() int64 { - if m != nil { - return m.InvalidContractCount - } - return 0 -} - -func (m *TotalStateSummary) GetLostShardSize() int64 { - if m != nil { - return m.LostShardSize - } - return 0 -} - -func (m *TotalStateSummary) GetTotalHostReward() int64 { - if m != nil { - return m.TotalHostReward - } - return 0 -} - -func (*TotalStateSummary) XXX_MessageName() string { - return "guard.TotalStateSummary" -} - -type HostStatus struct { - HostPid string `protobuf:"bytes,1,opt,name=host_pid,json=hostPid,proto3" json:"host_pid,omitempty" pg:"host_pid"` - FileSize int64 `protobuf:"varint,2,opt,name=file_size,json=fileSize,proto3" json:"file_size,omitempty" pg:"file_size"` - WorkAmount int64 `protobuf:"varint,3,opt,name=work_amount,json=workAmount,proto3" json:"work_amount,omitempty" pg:"work_amount"` - RewardBtt int64 `protobuf:"varint,4,opt,name=reward_btt,json=rewardBtt,proto3" json:"reward_btt,omitempty" pg:"reward_btt"` - SuspectCheat bool `protobuf:"varint,5,opt,name=suspect_cheat,json=suspectCheat,proto3" json:"suspect_cheat,omitempty" pg:"suspect_cheat"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *HostStatus) Reset() { *m = HostStatus{} } -func (m *HostStatus) String() string { return proto.CompactTextString(m) } -func (*HostStatus) ProtoMessage() {} -func (*HostStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{4} -} -func (m *HostStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HostStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HostStatus.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *HostStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_HostStatus.Merge(m, src) -} -func (m *HostStatus) XXX_Size() int { - return m.Size() -} -func (m *HostStatus) XXX_DiscardUnknown() { - xxx_messageInfo_HostStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_HostStatus proto.InternalMessageInfo - -func (m *HostStatus) GetHostPid() string { - if m != nil { - return m.HostPid - } - return "" -} - -func (m *HostStatus) GetFileSize() int64 { - if m != nil { - return m.FileSize - } - return 0 -} - -func (m *HostStatus) GetWorkAmount() int64 { - if m != nil { - return m.WorkAmount - } - return 0 -} - -func (m *HostStatus) GetRewardBtt() int64 { - if m != nil { - return m.RewardBtt - } - return 0 -} - -func (m *HostStatus) GetSuspectCheat() bool { - if m != nil { - return m.SuspectCheat - } - return false -} - -func (*HostStatus) XXX_MessageName() string { - return "guard.HostStatus" -} - -type Log struct { - ChangeTime time.Time `protobuf:"bytes,1,opt,name=change_time,json=changeTime,proto3,stdtime" json:"change_time" pg:"change_time"` - OriginatorPid string `protobuf:"bytes,2,opt,name=originator_pid,json=originatorPid,proto3" json:"originator_pid,omitempty" pg:"originator_pid"` - Change string `protobuf:"bytes,3,opt,name=change,proto3" json:"change,omitempty" pg:"change"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Log) Reset() { *m = Log{} } -func (m *Log) String() string { return proto.CompactTextString(m) } -func (*Log) ProtoMessage() {} -func (*Log) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{5} -} -func (m *Log) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Log) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Log.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Log) XXX_Merge(src proto.Message) { - xxx_messageInfo_Log.Merge(m, src) -} -func (m *Log) XXX_Size() int { - return m.Size() -} -func (m *Log) XXX_DiscardUnknown() { - xxx_messageInfo_Log.DiscardUnknown(m) -} - -var xxx_messageInfo_Log proto.InternalMessageInfo - -func (m *Log) GetChangeTime() time.Time { - if m != nil { - return m.ChangeTime - } - return time.Time{} -} - -func (m *Log) GetOriginatorPid() string { - if m != nil { - return m.OriginatorPid - } - return "" -} - -func (m *Log) GetChange() string { - if m != nil { - return m.Change - } - return "" -} - -func (*Log) XXX_MessageName() string { - return "guard.Log" -} - -//the relationship of the objects from Guard's view -// FileStoreMeta (1:n) Contract (1:n) payout -//contract is the signed document between the renter and host for one shard's storage -// the contract information contains buyer, seller, escrow, guard , storage shard's information, rent duration, amount, payment method(periodically and times) -//ContractMeta is the information which will not be changed after proposal -//Contract technically is the contract execution record, it contains the contractMeta and state information -type ContractMeta struct { - //Contract proposed by renter, will not be changed after renter proposed - ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty" pg:"contract_id"` - RenterPid string `protobuf:"bytes,2,opt,name=renter_pid,json=renterPid,proto3" json:"renter_pid,omitempty" pg:"renter_pid"` - HostPid string `protobuf:"bytes,3,opt,name=host_pid,json=hostPid,proto3" json:"host_pid,omitempty" pg:"host_pid"` - ShardHash string `protobuf:"bytes,4,opt,name=shard_hash,json=shardHash,proto3" json:"shard_hash,omitempty" pg:"shard_hash"` - ShardIndex int32 `protobuf:"varint,5,opt,name=shard_index,json=shardIndex,proto3" json:"shard_index,omitempty" pg:"shard_index"` - ShardFileSize int64 `protobuf:"varint,6,opt,name=shard_file_size,json=shardFileSize,proto3" json:"shard_file_size,omitempty" pg:"shard_file_size"` - FileHash string `protobuf:"bytes,7,opt,name=file_hash,json=fileHash,proto3" json:"file_hash,omitempty" pg:"file_hash"` - RentStart time.Time `protobuf:"bytes,8,opt,name=rent_start,json=rentStart,proto3,stdtime" json:"rent_start" pg:"rent_start"` - RentEnd time.Time `protobuf:"bytes,9,opt,name=rent_end,json=rentEnd,proto3,stdtime" json:"rent_end" pg:"rent_end"` - GuardPid string `protobuf:"bytes,10,opt,name=guard_pid,json=guardPid,proto3" json:"guard_pid,omitempty" pg:"guard_pid"` - EscrowPid string `protobuf:"bytes,11,opt,name=escrow_pid,json=escrowPid,proto3" json:"escrow_pid,omitempty" pg:"escrow_pid"` - Price int64 `protobuf:"varint,12,opt,name=price,proto3" json:"price,omitempty" pg:"price"` - Amount int64 `protobuf:"varint,13,opt,name=amount,proto3" json:"amount,omitempty" pg:"amount"` - CollateralAmount int64 `protobuf:"varint,14,opt,name=collateral_amount,json=collateralAmount,proto3" json:"collateral_amount,omitempty" pg:"collateral_amount"` - PayoutSchedule ContractMeta_Schedule `protobuf:"varint,15,opt,name=payout_schedule,json=payoutSchedule,proto3,enum=guard.ContractMeta_Schedule" json:"payout_schedule,omitempty" pg:"payout_schedule"` - NumPayouts int32 `protobuf:"varint,16,opt,name=num_payouts,json=numPayouts,proto3" json:"num_payouts,omitempty" pg:"num_payouts"` - ContingentAmount int64 `protobuf:"varint,17,opt,name=contingent_amount,json=contingentAmount,proto3" json:"contingent_amount,omitempty" pg:"contingent_amount"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ContractMeta) Reset() { *m = ContractMeta{} } -func (m *ContractMeta) String() string { return proto.CompactTextString(m) } -func (*ContractMeta) ProtoMessage() {} -func (*ContractMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{6} -} -func (m *ContractMeta) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContractMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ContractMeta.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ContractMeta) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContractMeta.Merge(m, src) -} -func (m *ContractMeta) XXX_Size() int { - return m.Size() -} -func (m *ContractMeta) XXX_DiscardUnknown() { - xxx_messageInfo_ContractMeta.DiscardUnknown(m) -} - -var xxx_messageInfo_ContractMeta proto.InternalMessageInfo - -func (m *ContractMeta) GetContractId() string { - if m != nil { - return m.ContractId - } - return "" -} - -func (m *ContractMeta) GetRenterPid() string { - if m != nil { - return m.RenterPid - } - return "" -} - -func (m *ContractMeta) GetHostPid() string { - if m != nil { - return m.HostPid - } - return "" -} - -func (m *ContractMeta) GetShardHash() string { - if m != nil { - return m.ShardHash - } - return "" -} - -func (m *ContractMeta) GetShardIndex() int32 { - if m != nil { - return m.ShardIndex - } - return 0 -} - -func (m *ContractMeta) GetShardFileSize() int64 { - if m != nil { - return m.ShardFileSize - } - return 0 -} - -func (m *ContractMeta) GetFileHash() string { - if m != nil { - return m.FileHash - } - return "" -} - -func (m *ContractMeta) GetRentStart() time.Time { - if m != nil { - return m.RentStart - } - return time.Time{} -} - -func (m *ContractMeta) GetRentEnd() time.Time { - if m != nil { - return m.RentEnd - } - return time.Time{} -} - -func (m *ContractMeta) GetGuardPid() string { - if m != nil { - return m.GuardPid - } - return "" -} - -func (m *ContractMeta) GetEscrowPid() string { - if m != nil { - return m.EscrowPid - } - return "" -} - -func (m *ContractMeta) GetPrice() int64 { - if m != nil { - return m.Price - } - return 0 -} - -func (m *ContractMeta) GetAmount() int64 { - if m != nil { - return m.Amount - } - return 0 -} - -func (m *ContractMeta) GetCollateralAmount() int64 { - if m != nil { - return m.CollateralAmount - } - return 0 -} - -func (m *ContractMeta) GetPayoutSchedule() ContractMeta_Schedule { - if m != nil { - return m.PayoutSchedule - } - return ContractMeta_MONTHLY -} - -func (m *ContractMeta) GetNumPayouts() int32 { - if m != nil { - return m.NumPayouts - } - return 0 -} - -func (m *ContractMeta) GetContingentAmount() int64 { - if m != nil { - return m.ContingentAmount - } - return 0 -} - -func (*ContractMeta) XXX_MessageName() string { - return "guard.ContractMeta" -} - -type Contract struct { - //the contract executor record, changed frequently after proposal - ContractMeta `protobuf:"bytes,1,opt,name=contract,proto3,embedded=contract" json:"contract" pg:"contract"` - State Contract_ContractState `protobuf:"varint,2,opt,name=state,proto3,enum=guard.Contract_ContractState" json:"state,omitempty" pg:"state"` - RenterSignature []byte `protobuf:"bytes,3,opt,name=renter_signature,json=renterSignature,proto3" json:"renter_signature,omitempty" pg:"renter_signature"` - HostSignature []byte `protobuf:"bytes,4,opt,name=host_signature,json=hostSignature,proto3" json:"host_signature,omitempty" pg:"host_signature"` - EscrowSignedTime time.Time `protobuf:"bytes,5,opt,name=escrow_signed_time,json=escrowSignedTime,proto3,stdtime" json:"escrow_signed_time" pg:"escrow_signed_time"` - EscrowSignature []byte `protobuf:"bytes,6,opt,name=escrow_signature,json=escrowSignature,proto3" json:"escrow_signature,omitempty" pg:"escrow_signature"` - ChangeLog []*Log `protobuf:"bytes,7,rep,name=change_log,json=changeLog,proto3" json:"change_log,omitempty" pg:"-"` - LastModifyTime time.Time `protobuf:"bytes,8,opt,name=last_modify_time,json=lastModifyTime,proto3,stdtime" json:"last_modify_time" pg:"last_modify_time"` - GuardSignature []byte `protobuf:"bytes,9,opt,name=guard_signature,json=guardSignature,proto3" json:"guard_signature,omitempty" pg:"guard_signature"` - PreparerPid string `protobuf:"bytes,10,opt,name=preparer_pid,json=preparerPid,proto3" json:"preparer_pid,omitempty" pg:"preparer_pid"` - PreparerSignature []byte `protobuf:"bytes,11,opt,name=preparer_signature,json=preparerSignature,proto3" json:"preparer_signature,omitempty" pg:"preparer_signature"` - LastSuccessChallengeTime time.Time `protobuf:"bytes,12,opt,name=last_success_challenge_time,json=lastSuccessChallengeTime,proto3,stdtime" json:"last_success_challenge_time" pg:"last_success_challenge_time"` - LastChallengeTime time.Time `protobuf:"bytes,13,opt,name=last_challenge_time,json=lastChallengeTime,proto3,stdtime" json:"last_challenge_time" pg:"last_challenge_time"` - ChallengeTimes int32 `protobuf:"varint,14,opt,name=challenge_times,json=challengeTimes,proto3" json:"challenge_times,omitempty" pg:"challenge_times"` - ChallengeWarnTimes int32 `protobuf:"varint,15,opt,name=challenge_warn_times,json=challengeWarnTimes,proto3" json:"challenge_warn_times,omitempty" pg:"challenge_warn_times"` - ChallengeSuccessTimes int32 `protobuf:"varint,16,opt,name=challenge_success_times,json=challengeSuccessTimes,proto3" json:"challenge_success_times,omitempty" pg:"challenge_success_times"` - FirstChallengeSuccess time.Time `protobuf:"bytes,17,opt,name=first_challenge_success,json=firstChallengeSuccess,proto3,stdtime" json:"first_challenge_success" pg:"first_challenge_success"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Contract) Reset() { *m = Contract{} } -func (m *Contract) String() string { return proto.CompactTextString(m) } -func (*Contract) ProtoMessage() {} -func (*Contract) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{7} -} -func (m *Contract) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Contract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Contract.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Contract) XXX_Merge(src proto.Message) { - xxx_messageInfo_Contract.Merge(m, src) -} -func (m *Contract) XXX_Size() int { - return m.Size() -} -func (m *Contract) XXX_DiscardUnknown() { - xxx_messageInfo_Contract.DiscardUnknown(m) -} - -var xxx_messageInfo_Contract proto.InternalMessageInfo - -func (m *Contract) GetState() Contract_ContractState { - if m != nil { - return m.State - } - return Contract_DRAFT -} - -func (m *Contract) GetRenterSignature() []byte { - if m != nil { - return m.RenterSignature - } - return nil -} - -func (m *Contract) GetHostSignature() []byte { - if m != nil { - return m.HostSignature - } - return nil -} - -func (m *Contract) GetEscrowSignedTime() time.Time { - if m != nil { - return m.EscrowSignedTime - } - return time.Time{} -} - -func (m *Contract) GetEscrowSignature() []byte { - if m != nil { - return m.EscrowSignature - } - return nil -} - -func (m *Contract) GetChangeLog() []*Log { - if m != nil { - return m.ChangeLog - } - return nil -} - -func (m *Contract) GetLastModifyTime() time.Time { - if m != nil { - return m.LastModifyTime - } - return time.Time{} -} - -func (m *Contract) GetGuardSignature() []byte { - if m != nil { - return m.GuardSignature - } - return nil -} - -func (m *Contract) GetPreparerPid() string { - if m != nil { - return m.PreparerPid - } - return "" -} - -func (m *Contract) GetPreparerSignature() []byte { - if m != nil { - return m.PreparerSignature - } - return nil -} - -func (m *Contract) GetLastSuccessChallengeTime() time.Time { - if m != nil { - return m.LastSuccessChallengeTime - } - return time.Time{} -} - -func (m *Contract) GetLastChallengeTime() time.Time { - if m != nil { - return m.LastChallengeTime - } - return time.Time{} -} - -func (m *Contract) GetChallengeTimes() int32 { - if m != nil { - return m.ChallengeTimes - } - return 0 -} - -func (m *Contract) GetChallengeWarnTimes() int32 { - if m != nil { - return m.ChallengeWarnTimes - } - return 0 -} - -func (m *Contract) GetChallengeSuccessTimes() int32 { - if m != nil { - return m.ChallengeSuccessTimes - } - return 0 -} - -func (m *Contract) GetFirstChallengeSuccess() time.Time { - if m != nil { - return m.FirstChallengeSuccess - } - return time.Time{} -} - -func (*Contract) XXX_MessageName() string { - return "guard.Contract" -} - -type FileStoreListResponse struct { - Request *ListRenterFileInfoRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty" pg:"request"` - CurrentTime time.Time `protobuf:"bytes,2,opt,name=current_time,json=currentTime,proto3,stdtime" json:"current_time" pg:"current_time"` - FileStoreMeta []*FileStoreMeta `protobuf:"bytes,3,rep,name=file_store_meta,json=fileStoreMeta,proto3" json:"file_store_meta,omitempty" pg:"file_store_meta"` - Count int32 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty" pg:"count"` - Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *FileStoreListResponse) Reset() { *m = FileStoreListResponse{} } -func (m *FileStoreListResponse) String() string { return proto.CompactTextString(m) } -func (*FileStoreListResponse) ProtoMessage() {} -func (*FileStoreListResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{8} -} -func (m *FileStoreListResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FileStoreListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FileStoreListResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *FileStoreListResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_FileStoreListResponse.Merge(m, src) -} -func (m *FileStoreListResponse) XXX_Size() int { - return m.Size() -} -func (m *FileStoreListResponse) XXX_DiscardUnknown() { - xxx_messageInfo_FileStoreListResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_FileStoreListResponse proto.InternalMessageInfo - -func (m *FileStoreListResponse) GetRequest() *ListRenterFileInfoRequest { - if m != nil { - return m.Request - } - return nil -} - -func (m *FileStoreListResponse) GetCurrentTime() time.Time { - if m != nil { - return m.CurrentTime - } - return time.Time{} -} - -func (m *FileStoreListResponse) GetFileStoreMeta() []*FileStoreMeta { - if m != nil { - return m.FileStoreMeta - } - return nil -} - -func (m *FileStoreListResponse) GetCount() int32 { - if m != nil { - return m.Count - } - return 0 -} - -func (m *FileStoreListResponse) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (*FileStoreListResponse) XXX_MessageName() string { - return "guard.FileStoreListResponse" -} - -type FileStoreMeta struct { - //file store meta prepared by renter, will not changed after proposal - RenterPid string `protobuf:"bytes,1,opt,name=renter_pid,json=renterPid,proto3" json:"renter_pid,omitempty" pg:"renter_pid"` - FileHash string `protobuf:"bytes,2,opt,name=file_hash,json=fileHash,proto3" json:"file_hash,omitempty" pg:"file_hash"` - FileSize int64 `protobuf:"varint,3,opt,name=file_size,json=fileSize,proto3" json:"file_size,omitempty" pg:"file_size"` - RentStart time.Time `protobuf:"bytes,4,opt,name=rent_start,json=rentStart,proto3,stdtime" json:"rent_start" pg:"rent_start"` - RentEnd time.Time `protobuf:"bytes,5,opt,name=rent_end,json=rentEnd,proto3,stdtime" json:"rent_end" pg:"rent_end"` - CheckFrequency int32 `protobuf:"varint,6,opt,name=check_frequency,json=checkFrequency,proto3" json:"check_frequency,omitempty" pg:"check_frequency"` - GuardFee int64 `protobuf:"varint,7,opt,name=guard_fee,json=guardFee,proto3" json:"guard_fee,omitempty" pg:"guard_fee"` - EscrowFee int64 `protobuf:"varint,8,opt,name=escrow_fee,json=escrowFee,proto3" json:"escrow_fee,omitempty" pg:"escrow_fee"` - ShardCount int32 `protobuf:"varint,9,opt,name=shard_count,json=shardCount,proto3" json:"shard_count,omitempty" pg:"shard_count"` - MinimumShards int32 `protobuf:"varint,10,opt,name=minimum_shards,json=minimumShards,proto3" json:"minimum_shards,omitempty" pg:"minimum_shards"` - RecoverThreshold int32 `protobuf:"varint,11,opt,name=recover_threshold,json=recoverThreshold,proto3" json:"recover_threshold,omitempty" pg:"recover_threshold"` - EscrowPid string `protobuf:"bytes,12,opt,name=escrow_pid,json=escrowPid,proto3" json:"escrow_pid,omitempty" pg:"escrow_pid"` - GuardPid string `protobuf:"bytes,13,opt,name=guard_pid,json=guardPid,proto3" json:"guard_pid,omitempty" pg:"guard_pid"` - WarnChallengeTimesLimit int32 `protobuf:"varint,14,opt,name=warn_challenge_times_limit,json=warnChallengeTimesLimit,proto3" json:"warn_challenge_times_limit,omitempty" pg:"warn_challenge_times_limit"` - SuccessChallengeTimesLimit int32 `protobuf:"varint,15,opt,name=success_challenge_times_limit,json=successChallengeTimesLimit,proto3" json:"success_challenge_times_limit,omitempty" pg:"success_challenge_times_limit"` - CheckFrequencyWarn int32 `protobuf:"varint,16,opt,name=check_frequency_warn,json=checkFrequencyWarn,proto3" json:"check_frequency_warn,omitempty" pg:"check_frequency_warn"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *FileStoreMeta) Reset() { *m = FileStoreMeta{} } -func (m *FileStoreMeta) String() string { return proto.CompactTextString(m) } -func (*FileStoreMeta) ProtoMessage() {} -func (*FileStoreMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{9} -} -func (m *FileStoreMeta) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FileStoreMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FileStoreMeta.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *FileStoreMeta) XXX_Merge(src proto.Message) { - xxx_messageInfo_FileStoreMeta.Merge(m, src) -} -func (m *FileStoreMeta) XXX_Size() int { - return m.Size() -} -func (m *FileStoreMeta) XXX_DiscardUnknown() { - xxx_messageInfo_FileStoreMeta.DiscardUnknown(m) -} - -var xxx_messageInfo_FileStoreMeta proto.InternalMessageInfo - -func (m *FileStoreMeta) GetRenterPid() string { - if m != nil { - return m.RenterPid - } - return "" -} - -func (m *FileStoreMeta) GetFileHash() string { - if m != nil { - return m.FileHash - } - return "" -} - -func (m *FileStoreMeta) GetFileSize() int64 { - if m != nil { - return m.FileSize - } - return 0 -} - -func (m *FileStoreMeta) GetRentStart() time.Time { - if m != nil { - return m.RentStart - } - return time.Time{} -} - -func (m *FileStoreMeta) GetRentEnd() time.Time { - if m != nil { - return m.RentEnd - } - return time.Time{} -} - -func (m *FileStoreMeta) GetCheckFrequency() int32 { - if m != nil { - return m.CheckFrequency - } - return 0 -} - -func (m *FileStoreMeta) GetGuardFee() int64 { - if m != nil { - return m.GuardFee - } - return 0 -} - -func (m *FileStoreMeta) GetEscrowFee() int64 { - if m != nil { - return m.EscrowFee - } - return 0 -} - -func (m *FileStoreMeta) GetShardCount() int32 { - if m != nil { - return m.ShardCount - } - return 0 -} - -func (m *FileStoreMeta) GetMinimumShards() int32 { - if m != nil { - return m.MinimumShards - } - return 0 -} - -func (m *FileStoreMeta) GetRecoverThreshold() int32 { - if m != nil { - return m.RecoverThreshold - } - return 0 -} - -func (m *FileStoreMeta) GetEscrowPid() string { - if m != nil { - return m.EscrowPid - } - return "" -} - -func (m *FileStoreMeta) GetGuardPid() string { - if m != nil { - return m.GuardPid - } - return "" -} - -func (m *FileStoreMeta) GetWarnChallengeTimesLimit() int32 { - if m != nil { - return m.WarnChallengeTimesLimit - } - return 0 -} - -func (m *FileStoreMeta) GetSuccessChallengeTimesLimit() int32 { - if m != nil { - return m.SuccessChallengeTimesLimit - } - return 0 -} - -func (m *FileStoreMeta) GetCheckFrequencyWarn() int32 { - if m != nil { - return m.CheckFrequencyWarn - } - return 0 -} - -func (*FileStoreMeta) XXX_MessageName() string { - return "guard.FileStoreMeta" -} - -type FileStoreStatus struct { - FileStoreMeta `protobuf:"bytes,1,opt,name=file_store_meta,json=fileStoreMeta,proto3,embedded=file_store_meta" json:"file_store_meta" pg:"file_store_meta"` - State FileStoreStatus_MetaState `protobuf:"varint,2,opt,name=state,proto3,enum=guard.FileStoreStatus_MetaState" json:"state,omitempty" pg:"state"` - Contracts []*Contract `protobuf:"bytes,3,rep,name=contracts,proto3" json:"contracts,omitempty" pg:"-"` - RenterSignature []byte `protobuf:"bytes,4,opt,name=renter_signature,json=renterSignature,proto3" json:"renter_signature,omitempty" pg:"renter_signature"` - GuardReceiveTime time.Time `protobuf:"bytes,5,opt,name=guard_receive_time,json=guardReceiveTime,proto3,stdtime" json:"guard_receive_time" pg:"guard_receive_time"` - ChangeLog []*Log `protobuf:"bytes,6,rep,name=change_log,json=changeLog,proto3" json:"change_log,omitempty" pg:"-"` - CurrentTime time.Time `protobuf:"bytes,7,opt,name=current_time,json=currentTime,proto3,stdtime" json:"current_time" pg:"current_time"` - GuardSignature []byte `protobuf:"bytes,8,opt,name=guard_signature,json=guardSignature,proto3" json:"guard_signature,omitempty" pg:"guard_signature"` - RentalState FileStoreStatus_RentalState `protobuf:"varint,9,opt,name=rental_state,json=rentalState,proto3,enum=guard.FileStoreStatus_RentalState" json:"rental_state,omitempty" pg:"rental_state"` - PreparerPid string `protobuf:"bytes,10,opt,name=preparer_pid,json=preparerPid,proto3" json:"preparer_pid,omitempty" pg:"preparer_pid"` - PreparerSignature []byte `protobuf:"bytes,11,opt,name=preparer_signature,json=preparerSignature,proto3" json:"preparer_signature,omitempty" pg:"preparer_signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *FileStoreStatus) Reset() { *m = FileStoreStatus{} } -func (m *FileStoreStatus) String() string { return proto.CompactTextString(m) } -func (*FileStoreStatus) ProtoMessage() {} -func (*FileStoreStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{10} -} -func (m *FileStoreStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FileStoreStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FileStoreStatus.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *FileStoreStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_FileStoreStatus.Merge(m, src) -} -func (m *FileStoreStatus) XXX_Size() int { - return m.Size() -} -func (m *FileStoreStatus) XXX_DiscardUnknown() { - xxx_messageInfo_FileStoreStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_FileStoreStatus proto.InternalMessageInfo - -func (m *FileStoreStatus) GetState() FileStoreStatus_MetaState { - if m != nil { - return m.State - } - return FileStoreStatus_DRAFT -} - -func (m *FileStoreStatus) GetContracts() []*Contract { - if m != nil { - return m.Contracts - } - return nil -} - -func (m *FileStoreStatus) GetRenterSignature() []byte { - if m != nil { - return m.RenterSignature - } - return nil -} - -func (m *FileStoreStatus) GetGuardReceiveTime() time.Time { - if m != nil { - return m.GuardReceiveTime - } - return time.Time{} -} - -func (m *FileStoreStatus) GetChangeLog() []*Log { - if m != nil { - return m.ChangeLog - } - return nil -} - -func (m *FileStoreStatus) GetCurrentTime() time.Time { - if m != nil { - return m.CurrentTime - } - return time.Time{} -} - -func (m *FileStoreStatus) GetGuardSignature() []byte { - if m != nil { - return m.GuardSignature - } - return nil -} - -func (m *FileStoreStatus) GetRentalState() FileStoreStatus_RentalState { - if m != nil { - return m.RentalState - } - return FileStoreStatus_NEW -} - -func (m *FileStoreStatus) GetPreparerPid() string { - if m != nil { - return m.PreparerPid - } - return "" -} - -func (m *FileStoreStatus) GetPreparerSignature() []byte { - if m != nil { - return m.PreparerSignature - } - return nil -} - -func (*FileStoreStatus) XXX_MessageName() string { - return "guard.FileStoreStatus" -} - -type ChallengeQuestion struct { - ShardHash string `protobuf:"bytes,1,opt,name=shard_hash,json=shardHash,proto3" json:"shard_hash,omitempty" pg:"shard_hash"` - HostPid string `protobuf:"bytes,2,opt,name=host_pid,json=hostPid,proto3" json:"host_pid,omitempty" pg:"host_pid"` - ChunkIndex int32 `protobuf:"varint,3,opt,name=chunk_index,json=chunkIndex,proto3" json:"chunk_index,omitempty" pg:"chunk_index"` - Nonce string `protobuf:"bytes,4,opt,name=nonce,proto3" json:"nonce,omitempty" pg:"nonce"` - ExpectAnswer string `protobuf:"bytes,5,opt,name=expect_answer,json=expectAnswer,proto3" json:"expect_answer,omitempty" pg:"expect_answer"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ChallengeQuestion) Reset() { *m = ChallengeQuestion{} } -func (m *ChallengeQuestion) String() string { return proto.CompactTextString(m) } -func (*ChallengeQuestion) ProtoMessage() {} -func (*ChallengeQuestion) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{11} -} -func (m *ChallengeQuestion) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ChallengeQuestion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ChallengeQuestion.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ChallengeQuestion) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChallengeQuestion.Merge(m, src) -} -func (m *ChallengeQuestion) XXX_Size() int { - return m.Size() -} -func (m *ChallengeQuestion) XXX_DiscardUnknown() { - xxx_messageInfo_ChallengeQuestion.DiscardUnknown(m) -} - -var xxx_messageInfo_ChallengeQuestion proto.InternalMessageInfo - -func (m *ChallengeQuestion) GetShardHash() string { - if m != nil { - return m.ShardHash - } - return "" -} - -func (m *ChallengeQuestion) GetHostPid() string { - if m != nil { - return m.HostPid - } - return "" -} - -func (m *ChallengeQuestion) GetChunkIndex() int32 { - if m != nil { - return m.ChunkIndex - } - return 0 -} - -func (m *ChallengeQuestion) GetNonce() string { - if m != nil { - return m.Nonce - } - return "" -} - -func (m *ChallengeQuestion) GetExpectAnswer() string { - if m != nil { - return m.ExpectAnswer - } - return "" -} - -func (*ChallengeQuestion) XXX_MessageName() string { - return "guard.ChallengeQuestion" -} - -type ProofOfReplicateChallenge struct { - ChallengeQuestion `protobuf:"bytes,1,opt,name=question,proto3,embedded=question" json:"question" pg:"question"` - ChallengeTime time.Time `protobuf:"bytes,2,opt,name=challenge_time,json=challengeTime,proto3,stdtime" json:"challenge_time" pg:"challenge_time"` - GuardPid string `protobuf:"bytes,3,opt,name=guard_pid,json=guardPid,proto3" json:"guard_pid,omitempty" pg:"guard_pid"` - GuardSignature []byte `protobuf:"bytes,4,opt,name=guard_signature,json=guardSignature,proto3" json:"guard_signature,omitempty" pg:"guard_signature"` - HostAnswer string `protobuf:"bytes,5,opt,name=host_answer,json=hostAnswer,proto3" json:"host_answer,omitempty" pg:"host_answer"` - HostSignTime time.Time `protobuf:"bytes,6,opt,name=host_sign_time,json=hostSignTime,proto3,stdtime" json:"host_sign_time" pg:"host_sign_time"` - HostSignature []byte `protobuf:"bytes,7,opt,name=host_signature,json=hostSignature,proto3" json:"host_signature,omitempty" pg:"host_signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ProofOfReplicateChallenge) Reset() { *m = ProofOfReplicateChallenge{} } -func (m *ProofOfReplicateChallenge) String() string { return proto.CompactTextString(m) } -func (*ProofOfReplicateChallenge) ProtoMessage() {} -func (*ProofOfReplicateChallenge) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{12} -} -func (m *ProofOfReplicateChallenge) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProofOfReplicateChallenge) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProofOfReplicateChallenge.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ProofOfReplicateChallenge) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProofOfReplicateChallenge.Merge(m, src) -} -func (m *ProofOfReplicateChallenge) XXX_Size() int { - return m.Size() -} -func (m *ProofOfReplicateChallenge) XXX_DiscardUnknown() { - xxx_messageInfo_ProofOfReplicateChallenge.DiscardUnknown(m) -} - -var xxx_messageInfo_ProofOfReplicateChallenge proto.InternalMessageInfo - -func (m *ProofOfReplicateChallenge) GetChallengeTime() time.Time { - if m != nil { - return m.ChallengeTime - } - return time.Time{} -} - -func (m *ProofOfReplicateChallenge) GetGuardPid() string { - if m != nil { - return m.GuardPid - } - return "" -} - -func (m *ProofOfReplicateChallenge) GetGuardSignature() []byte { - if m != nil { - return m.GuardSignature - } - return nil -} - -func (m *ProofOfReplicateChallenge) GetHostAnswer() string { - if m != nil { - return m.HostAnswer - } - return "" -} - -func (m *ProofOfReplicateChallenge) GetHostSignTime() time.Time { - if m != nil { - return m.HostSignTime - } - return time.Time{} -} - -func (m *ProofOfReplicateChallenge) GetHostSignature() []byte { - if m != nil { - return m.HostSignature - } - return nil -} - -func (*ProofOfReplicateChallenge) XXX_MessageName() string { - return "guard.ProofOfReplicateChallenge" -} - -type FileChallengeQuestions struct { - FileHash string `protobuf:"bytes,1,opt,name=file_hash,json=fileHash,proto3" json:"file_hash,omitempty" pg:"file_hash"` - ShardQuestions []*ShardChallengeQuestions `protobuf:"bytes,2,rep,name=shard_questions,json=shardQuestions,proto3" json:"shard_questions,omitempty" pg:"shard_questions"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *FileChallengeQuestions) Reset() { *m = FileChallengeQuestions{} } -func (m *FileChallengeQuestions) String() string { return proto.CompactTextString(m) } -func (*FileChallengeQuestions) ProtoMessage() {} -func (*FileChallengeQuestions) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{13} -} -func (m *FileChallengeQuestions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FileChallengeQuestions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FileChallengeQuestions.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *FileChallengeQuestions) XXX_Merge(src proto.Message) { - xxx_messageInfo_FileChallengeQuestions.Merge(m, src) -} -func (m *FileChallengeQuestions) XXX_Size() int { - return m.Size() -} -func (m *FileChallengeQuestions) XXX_DiscardUnknown() { - xxx_messageInfo_FileChallengeQuestions.DiscardUnknown(m) -} - -var xxx_messageInfo_FileChallengeQuestions proto.InternalMessageInfo - -func (m *FileChallengeQuestions) GetFileHash() string { - if m != nil { - return m.FileHash - } - return "" -} - -func (m *FileChallengeQuestions) GetShardQuestions() []*ShardChallengeQuestions { - if m != nil { - return m.ShardQuestions - } - return nil -} - -func (*FileChallengeQuestions) XXX_MessageName() string { - return "guard.FileChallengeQuestions" -} - -type ShardChallengeQuestions struct { - FileHash string `protobuf:"bytes,1,opt,name=file_hash,json=fileHash,proto3" json:"file_hash,omitempty" pg:"file_hash"` - ShardHash string `protobuf:"bytes,2,opt,name=shard_hash,json=shardHash,proto3" json:"shard_hash,omitempty" pg:"shard_hash"` - PreparerPid string `protobuf:"bytes,3,opt,name=preparer_pid,json=preparerPid,proto3" json:"preparer_pid,omitempty" pg:"preparer_pid"` - QuestionCount int32 `protobuf:"varint,4,opt,name=question_count,json=questionCount,proto3" json:"question_count,omitempty" pg:"question_count"` - Questions []*ChallengeQuestion `protobuf:"bytes,5,rep,name=questions,proto3" json:"questions,omitempty" pg:"questions"` - PrepareTime time.Time `protobuf:"bytes,6,opt,name=prepare_time,json=prepareTime,proto3,stdtime" json:"prepare_time" pg:"prepare_time"` - PreparerSignature []byte `protobuf:"bytes,7,opt,name=preparer_signature,json=preparerSignature,proto3" json:"preparer_signature,omitempty" pg:"preparer_signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ShardChallengeQuestions) Reset() { *m = ShardChallengeQuestions{} } -func (m *ShardChallengeQuestions) String() string { return proto.CompactTextString(m) } -func (*ShardChallengeQuestions) ProtoMessage() {} -func (*ShardChallengeQuestions) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{14} -} -func (m *ShardChallengeQuestions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ShardChallengeQuestions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ShardChallengeQuestions.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ShardChallengeQuestions) XXX_Merge(src proto.Message) { - xxx_messageInfo_ShardChallengeQuestions.Merge(m, src) -} -func (m *ShardChallengeQuestions) XXX_Size() int { - return m.Size() -} -func (m *ShardChallengeQuestions) XXX_DiscardUnknown() { - xxx_messageInfo_ShardChallengeQuestions.DiscardUnknown(m) -} - -var xxx_messageInfo_ShardChallengeQuestions proto.InternalMessageInfo - -func (m *ShardChallengeQuestions) GetFileHash() string { - if m != nil { - return m.FileHash - } - return "" -} - -func (m *ShardChallengeQuestions) GetShardHash() string { - if m != nil { - return m.ShardHash - } - return "" -} - -func (m *ShardChallengeQuestions) GetPreparerPid() string { - if m != nil { - return m.PreparerPid - } - return "" -} - -func (m *ShardChallengeQuestions) GetQuestionCount() int32 { - if m != nil { - return m.QuestionCount - } - return 0 -} - -func (m *ShardChallengeQuestions) GetQuestions() []*ChallengeQuestion { - if m != nil { - return m.Questions - } - return nil -} - -func (m *ShardChallengeQuestions) GetPrepareTime() time.Time { - if m != nil { - return m.PrepareTime - } - return time.Time{} -} - -func (m *ShardChallengeQuestions) GetPreparerSignature() []byte { - if m != nil { - return m.PreparerSignature - } - return nil -} - -func (*ShardChallengeQuestions) XXX_MessageName() string { - return "guard.ShardChallengeQuestions" -} - -type CheckFileStoreMetaRequest struct { - FileHash string `protobuf:"bytes,1,opt,name=file_hash,json=fileHash,proto3" json:"file_hash,omitempty" pg:"file_hash"` - RenterPid string `protobuf:"bytes,2,opt,name=renter_pid,json=renterPid,proto3" json:"renter_pid,omitempty" pg:"renter_pid"` - RequesterPid string `protobuf:"bytes,3,opt,name=requester_pid,json=requesterPid,proto3" json:"requester_pid,omitempty" pg:"requester_pid"` - RequestTime time.Time `protobuf:"bytes,4,opt,name=request_time,json=requestTime,proto3,stdtime" json:"request_time" pg:"request_time"` - Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *CheckFileStoreMetaRequest) Reset() { *m = CheckFileStoreMetaRequest{} } -func (m *CheckFileStoreMetaRequest) String() string { return proto.CompactTextString(m) } -func (*CheckFileStoreMetaRequest) ProtoMessage() {} -func (*CheckFileStoreMetaRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{15} -} -func (m *CheckFileStoreMetaRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CheckFileStoreMetaRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CheckFileStoreMetaRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *CheckFileStoreMetaRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CheckFileStoreMetaRequest.Merge(m, src) -} -func (m *CheckFileStoreMetaRequest) XXX_Size() int { - return m.Size() -} -func (m *CheckFileStoreMetaRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CheckFileStoreMetaRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CheckFileStoreMetaRequest proto.InternalMessageInfo - -func (m *CheckFileStoreMetaRequest) GetFileHash() string { - if m != nil { - return m.FileHash - } - return "" -} - -func (m *CheckFileStoreMetaRequest) GetRenterPid() string { - if m != nil { - return m.RenterPid - } - return "" -} - -func (m *CheckFileStoreMetaRequest) GetRequesterPid() string { - if m != nil { - return m.RequesterPid - } - return "" -} - -func (m *CheckFileStoreMetaRequest) GetRequestTime() time.Time { - if m != nil { - return m.RequestTime - } - return time.Time{} -} - -func (m *CheckFileStoreMetaRequest) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (*CheckFileStoreMetaRequest) XXX_MessageName() string { - return "guard.CheckFileStoreMetaRequest" -} - -type ListRenterFileInfoRequest struct { - RenterPid string `protobuf:"bytes,1,opt,name=renter_pid,json=renterPid,proto3" json:"renter_pid,omitempty" pg:"renter_pid"` - RequesterPid string `protobuf:"bytes,2,opt,name=requester_pid,json=requesterPid,proto3" json:"requester_pid,omitempty" pg:"requester_pid"` - RequestPageSize int32 `protobuf:"varint,3,opt,name=request_page_size,json=requestPageSize,proto3" json:"request_page_size,omitempty" pg:"request_page_size"` - RequestPageIndex int32 `protobuf:"varint,4,opt,name=request_page_index,json=requestPageIndex,proto3" json:"request_page_index,omitempty" pg:"request_page_index"` - RequestTime *time.Time `protobuf:"bytes,5,opt,name=request_time,json=requestTime,proto3,stdtime" json:"request_time,omitempty" pg:"request_time"` - LastModifyTime *time.Time `protobuf:"bytes,6,opt,name=last_modify_time,json=lastModifyTime,proto3,stdtime" json:"last_modify_time,omitempty" pg:"last_modify_time"` - Signature []byte `protobuf:"bytes,7,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ListRenterFileInfoRequest) Reset() { *m = ListRenterFileInfoRequest{} } -func (m *ListRenterFileInfoRequest) String() string { return proto.CompactTextString(m) } -func (*ListRenterFileInfoRequest) ProtoMessage() {} -func (*ListRenterFileInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{16} -} -func (m *ListRenterFileInfoRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListRenterFileInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListRenterFileInfoRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ListRenterFileInfoRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListRenterFileInfoRequest.Merge(m, src) -} -func (m *ListRenterFileInfoRequest) XXX_Size() int { - return m.Size() -} -func (m *ListRenterFileInfoRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListRenterFileInfoRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListRenterFileInfoRequest proto.InternalMessageInfo - -func (m *ListRenterFileInfoRequest) GetRenterPid() string { - if m != nil { - return m.RenterPid - } - return "" -} - -func (m *ListRenterFileInfoRequest) GetRequesterPid() string { - if m != nil { - return m.RequesterPid - } - return "" -} - -func (m *ListRenterFileInfoRequest) GetRequestPageSize() int32 { - if m != nil { - return m.RequestPageSize - } - return 0 -} - -func (m *ListRenterFileInfoRequest) GetRequestPageIndex() int32 { - if m != nil { - return m.RequestPageIndex - } - return 0 -} - -func (m *ListRenterFileInfoRequest) GetRequestTime() *time.Time { - if m != nil { - return m.RequestTime - } - return nil -} - -func (m *ListRenterFileInfoRequest) GetLastModifyTime() *time.Time { - if m != nil { - return m.LastModifyTime - } - return nil -} - -func (m *ListRenterFileInfoRequest) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (*ListRenterFileInfoRequest) XXX_MessageName() string { - return "guard.ListRenterFileInfoRequest" -} - -type ListHostContractsRequest struct { - HostPid string `protobuf:"bytes,1,opt,name=host_pid,json=hostPid,proto3" json:"host_pid,omitempty" pg:"host_pid"` - RequesterPid string `protobuf:"bytes,2,opt,name=requester_pid,json=requesterPid,proto3" json:"requester_pid,omitempty" pg:"requester_pid"` - RequestPageSize int32 `protobuf:"varint,3,opt,name=request_page_size,json=requestPageSize,proto3" json:"request_page_size,omitempty" pg:"request_page_size"` - RequestPageIndex int32 `protobuf:"varint,4,opt,name=request_page_index,json=requestPageIndex,proto3" json:"request_page_index,omitempty" pg:"request_page_index"` - LastModifyTimeSince *time.Time `protobuf:"bytes,5,opt,name=last_modify_time_since,json=lastModifyTimeSince,proto3,stdtime" json:"last_modify_time_since,omitempty" pg:"last_modify_time_since"` - LastModifyTimeTo *time.Time `protobuf:"bytes,6,opt,name=last_modify_time_to,json=lastModifyTimeTo,proto3,stdtime" json:"last_modify_time_to,omitempty" pg:"last_modify_time_to"` - State ListHostContractsRequest_SelectState `protobuf:"varint,7,opt,name=state,proto3,enum=guard.ListHostContractsRequest_SelectState" json:"state,omitempty" pg:"state"` - RequestTime *time.Time `protobuf:"bytes,8,opt,name=request_time,json=requestTime,proto3,stdtime" json:"request_time,omitempty" pg:"request_time"` - Signature []byte `protobuf:"bytes,9,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ListHostContractsRequest) Reset() { *m = ListHostContractsRequest{} } -func (m *ListHostContractsRequest) String() string { return proto.CompactTextString(m) } -func (*ListHostContractsRequest) ProtoMessage() {} -func (*ListHostContractsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{17} -} -func (m *ListHostContractsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListHostContractsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListHostContractsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ListHostContractsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListHostContractsRequest.Merge(m, src) -} -func (m *ListHostContractsRequest) XXX_Size() int { - return m.Size() -} -func (m *ListHostContractsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListHostContractsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListHostContractsRequest proto.InternalMessageInfo - -func (m *ListHostContractsRequest) GetHostPid() string { - if m != nil { - return m.HostPid - } - return "" -} - -func (m *ListHostContractsRequest) GetRequesterPid() string { - if m != nil { - return m.RequesterPid - } - return "" -} - -func (m *ListHostContractsRequest) GetRequestPageSize() int32 { - if m != nil { - return m.RequestPageSize - } - return 0 -} - -func (m *ListHostContractsRequest) GetRequestPageIndex() int32 { - if m != nil { - return m.RequestPageIndex - } - return 0 -} - -func (m *ListHostContractsRequest) GetLastModifyTimeSince() *time.Time { - if m != nil { - return m.LastModifyTimeSince - } - return nil -} - -func (m *ListHostContractsRequest) GetLastModifyTimeTo() *time.Time { - if m != nil { - return m.LastModifyTimeTo - } - return nil -} - -func (m *ListHostContractsRequest) GetState() ListHostContractsRequest_SelectState { - if m != nil { - return m.State - } - return ListHostContractsRequest_ALL -} - -func (m *ListHostContractsRequest) GetRequestTime() *time.Time { - if m != nil { - return m.RequestTime - } - return nil -} - -func (m *ListHostContractsRequest) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (*ListHostContractsRequest) XXX_MessageName() string { - return "guard.ListHostContractsRequest" -} - -type ContractsList struct { - Request *ListHostContractsRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty" pg:"request"` - GenerateTime time.Time `protobuf:"bytes,2,opt,name=generate_time,json=generateTime,proto3,stdtime" json:"generate_time" pg:"generate_time"` - Contracts []*Contract `protobuf:"bytes,3,rep,name=contracts,proto3" json:"contracts,omitempty" pg:"contracts"` - Count int32 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty" pg:"count"` - Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ContractsList) Reset() { *m = ContractsList{} } -func (m *ContractsList) String() string { return proto.CompactTextString(m) } -func (*ContractsList) ProtoMessage() {} -func (*ContractsList) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{18} -} -func (m *ContractsList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContractsList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ContractsList.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ContractsList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContractsList.Merge(m, src) -} -func (m *ContractsList) XXX_Size() int { - return m.Size() -} -func (m *ContractsList) XXX_DiscardUnknown() { - xxx_messageInfo_ContractsList.DiscardUnknown(m) -} - -var xxx_messageInfo_ContractsList proto.InternalMessageInfo - -func (m *ContractsList) GetRequest() *ListHostContractsRequest { - if m != nil { - return m.Request - } - return nil -} - -func (m *ContractsList) GetGenerateTime() time.Time { - if m != nil { - return m.GenerateTime - } - return time.Time{} -} - -func (m *ContractsList) GetContracts() []*Contract { - if m != nil { - return m.Contracts - } - return nil -} - -func (m *ContractsList) GetCount() int32 { - if m != nil { - return m.Count - } - return 0 -} - -func (m *ContractsList) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (*ContractsList) XXX_MessageName() string { - return "guard.ContractsList" -} - -type ReadyForChallengeRequest struct { - RenterPid string `protobuf:"bytes,1,opt,name=renter_pid,json=renterPid,proto3" json:"renter_pid,omitempty" pg:"renter_pid"` - FileHash string `protobuf:"bytes,2,opt,name=file_hash,json=fileHash,proto3" json:"file_hash,omitempty" pg:"file_hash"` - ShardHash string `protobuf:"bytes,3,opt,name=shard_hash,json=shardHash,proto3" json:"shard_hash,omitempty" pg:"shard_hash"` - ContractId string `protobuf:"bytes,4,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty" pg:"contract_id"` - HostPid string `protobuf:"bytes,5,opt,name=host_pid,json=hostPid,proto3" json:"host_pid,omitempty" pg:"host_pid"` - PrepareTime time.Time `protobuf:"bytes,6,opt,name=prepare_time,json=prepareTime,proto3,stdtime" json:"prepare_time" pg:"prepare_time"` - Signature []byte `protobuf:"bytes,7,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - IsRepair bool `protobuf:"varint,8,opt,name=is_repair,json=isRepair,proto3" json:"is_repair,omitempty" pg:"is_repair"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ReadyForChallengeRequest) Reset() { *m = ReadyForChallengeRequest{} } -func (m *ReadyForChallengeRequest) String() string { return proto.CompactTextString(m) } -func (*ReadyForChallengeRequest) ProtoMessage() {} -func (*ReadyForChallengeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{19} -} -func (m *ReadyForChallengeRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ReadyForChallengeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ReadyForChallengeRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ReadyForChallengeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReadyForChallengeRequest.Merge(m, src) -} -func (m *ReadyForChallengeRequest) XXX_Size() int { - return m.Size() -} -func (m *ReadyForChallengeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ReadyForChallengeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ReadyForChallengeRequest proto.InternalMessageInfo - -func (m *ReadyForChallengeRequest) GetRenterPid() string { - if m != nil { - return m.RenterPid - } - return "" -} - -func (m *ReadyForChallengeRequest) GetFileHash() string { - if m != nil { - return m.FileHash - } - return "" -} - -func (m *ReadyForChallengeRequest) GetShardHash() string { - if m != nil { - return m.ShardHash - } - return "" -} - -func (m *ReadyForChallengeRequest) GetContractId() string { - if m != nil { - return m.ContractId - } - return "" -} - -func (m *ReadyForChallengeRequest) GetHostPid() string { - if m != nil { - return m.HostPid - } - return "" -} - -func (m *ReadyForChallengeRequest) GetPrepareTime() time.Time { - if m != nil { - return m.PrepareTime - } - return time.Time{} -} - -func (m *ReadyForChallengeRequest) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (m *ReadyForChallengeRequest) GetIsRepair() bool { - if m != nil { - return m.IsRepair - } - return false -} - -func (*ReadyForChallengeRequest) XXX_MessageName() string { - return "guard.ReadyForChallengeRequest" -} - -type RequestChallengeQuestion struct { - Question *ChallengeQuestion `protobuf:"bytes,1,opt,name=question,proto3" json:"question,omitempty" pg:"question"` - PrepareTime time.Time `protobuf:"bytes,2,opt,name=prepare_time,json=prepareTime,proto3,stdtime" json:"prepare_time" pg:"prepare_time"` - Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - IsRepair bool `protobuf:"varint,4,opt,name=is_repair,json=isRepair,proto3" json:"is_repair,omitempty" pg:"is_repair"` - FileHash string `protobuf:"bytes,5,opt,name=file_hash,json=fileHash,proto3" json:"file_hash,omitempty" pg:"file_hash"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *RequestChallengeQuestion) Reset() { *m = RequestChallengeQuestion{} } -func (m *RequestChallengeQuestion) String() string { return proto.CompactTextString(m) } -func (*RequestChallengeQuestion) ProtoMessage() {} -func (*RequestChallengeQuestion) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{20} -} -func (m *RequestChallengeQuestion) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RequestChallengeQuestion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RequestChallengeQuestion.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RequestChallengeQuestion) XXX_Merge(src proto.Message) { - xxx_messageInfo_RequestChallengeQuestion.Merge(m, src) -} -func (m *RequestChallengeQuestion) XXX_Size() int { - return m.Size() -} -func (m *RequestChallengeQuestion) XXX_DiscardUnknown() { - xxx_messageInfo_RequestChallengeQuestion.DiscardUnknown(m) -} - -var xxx_messageInfo_RequestChallengeQuestion proto.InternalMessageInfo - -func (m *RequestChallengeQuestion) GetQuestion() *ChallengeQuestion { - if m != nil { - return m.Question - } - return nil -} - -func (m *RequestChallengeQuestion) GetPrepareTime() time.Time { - if m != nil { - return m.PrepareTime - } - return time.Time{} -} - -func (m *RequestChallengeQuestion) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (m *RequestChallengeQuestion) GetIsRepair() bool { - if m != nil { - return m.IsRepair - } - return false -} - -func (m *RequestChallengeQuestion) GetFileHash() string { - if m != nil { - return m.FileHash - } - return "" -} - -func (*RequestChallengeQuestion) XXX_MessageName() string { - return "guard.RequestChallengeQuestion" -} - -type ResponseChallengeQuestion struct { - Answer *ChallengeQuestion `protobuf:"bytes,1,opt,name=answer,proto3" json:"answer,omitempty" pg:"answer"` - HostPid string `protobuf:"bytes,2,opt,name=host_pid,json=hostPid,proto3" json:"host_pid,omitempty" pg:"host_pid"` - ResolveTime time.Time `protobuf:"bytes,3,opt,name=resolve_time,json=resolveTime,proto3,stdtime" json:"resolve_time" pg:"resolve_time"` - Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - IsRepair bool `protobuf:"varint,5,opt,name=is_repair,json=isRepair,proto3" json:"is_repair,omitempty" pg:"is_repair"` - FileHash string `protobuf:"bytes,6,opt,name=file_hash,json=fileHash,proto3" json:"file_hash,omitempty" pg:"file_hash"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ResponseChallengeQuestion) Reset() { *m = ResponseChallengeQuestion{} } -func (m *ResponseChallengeQuestion) String() string { return proto.CompactTextString(m) } -func (*ResponseChallengeQuestion) ProtoMessage() {} -func (*ResponseChallengeQuestion) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{21} -} -func (m *ResponseChallengeQuestion) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResponseChallengeQuestion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResponseChallengeQuestion.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ResponseChallengeQuestion) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResponseChallengeQuestion.Merge(m, src) -} -func (m *ResponseChallengeQuestion) XXX_Size() int { - return m.Size() -} -func (m *ResponseChallengeQuestion) XXX_DiscardUnknown() { - xxx_messageInfo_ResponseChallengeQuestion.DiscardUnknown(m) -} - -var xxx_messageInfo_ResponseChallengeQuestion proto.InternalMessageInfo - -func (m *ResponseChallengeQuestion) GetAnswer() *ChallengeQuestion { - if m != nil { - return m.Answer - } - return nil -} - -func (m *ResponseChallengeQuestion) GetHostPid() string { - if m != nil { - return m.HostPid - } - return "" -} - -func (m *ResponseChallengeQuestion) GetResolveTime() time.Time { - if m != nil { - return m.ResolveTime - } - return time.Time{} -} - -func (m *ResponseChallengeQuestion) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (m *ResponseChallengeQuestion) GetIsRepair() bool { - if m != nil { - return m.IsRepair - } - return false -} - -func (m *ResponseChallengeQuestion) GetFileHash() string { - if m != nil { - return m.FileHash - } - return "" -} - -func (*ResponseChallengeQuestion) XXX_MessageName() string { - return "guard.ResponseChallengeQuestion" -} - -type ForceRepairRequest struct { - RenterPid string `protobuf:"bytes,1,opt,name=renter_pid,json=renterPid,proto3" json:"renter_pid,omitempty" pg:"renter_pid"` - FileHash string `protobuf:"bytes,2,opt,name=file_hash,json=fileHash,proto3" json:"file_hash,omitempty" pg:"file_hash"` - AuthPid string `protobuf:"bytes,3,opt,name=auth_pid,json=authPid,proto3" json:"auth_pid,omitempty" pg:"auth_pid"` - Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ForceRepairRequest) Reset() { *m = ForceRepairRequest{} } -func (m *ForceRepairRequest) String() string { return proto.CompactTextString(m) } -func (*ForceRepairRequest) ProtoMessage() {} -func (*ForceRepairRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{22} -} -func (m *ForceRepairRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ForceRepairRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ForceRepairRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ForceRepairRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ForceRepairRequest.Merge(m, src) -} -func (m *ForceRepairRequest) XXX_Size() int { - return m.Size() -} -func (m *ForceRepairRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ForceRepairRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ForceRepairRequest proto.InternalMessageInfo - -func (m *ForceRepairRequest) GetRenterPid() string { - if m != nil { - return m.RenterPid - } - return "" -} - -func (m *ForceRepairRequest) GetFileHash() string { - if m != nil { - return m.FileHash - } - return "" -} - -func (m *ForceRepairRequest) GetAuthPid() string { - if m != nil { - return m.AuthPid - } - return "" -} - -func (m *ForceRepairRequest) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (*ForceRepairRequest) XXX_MessageName() string { - return "guard.ForceRepairRequest" -} - -type Result struct { - Code ResponseCode `protobuf:"varint,1,opt,name=code,proto3,enum=guard.ResponseCode" json:"code,omitempty" pg:"code"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty" pg:"message"` - ResponseTime time.Time `protobuf:"bytes,3,opt,name=response_time,json=responseTime,proto3,stdtime" json:"response_time" pg:"response_time"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Result) Reset() { *m = Result{} } -func (m *Result) String() string { return proto.CompactTextString(m) } -func (*Result) ProtoMessage() {} -func (*Result) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{23} -} -func (m *Result) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Result) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Result.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Result) XXX_Merge(src proto.Message) { - xxx_messageInfo_Result.Merge(m, src) -} -func (m *Result) XXX_Size() int { - return m.Size() -} -func (m *Result) XXX_DiscardUnknown() { - xxx_messageInfo_Result.DiscardUnknown(m) -} - -var xxx_messageInfo_Result proto.InternalMessageInfo - -func (m *Result) GetCode() ResponseCode { - if m != nil { - return m.Code - } - return ResponseCode_SUCCESS -} - -func (m *Result) GetMessage() string { - if m != nil { - return m.Message - } - return "" -} - -func (m *Result) GetResponseTime() time.Time { - if m != nil { - return m.ResponseTime - } - return time.Time{} -} - -func (*Result) XXX_MessageName() string { - return "guard.Result" -} - -type RepairContract struct { - FileHash string `protobuf:"bytes,1,opt,name=file_hash,json=fileHash,proto3" json:"file_hash,omitempty" pg:"file_hash"` - LostShardHash []string `protobuf:"bytes,2,rep,name=lost_shard_hash,json=lostShardHash,proto3" json:"lost_shard_hash,omitempty" pg:"lost_shard_hash"` - FileSize int64 `protobuf:"varint,3,opt,name=file_size,json=fileSize,proto3" json:"file_size,omitempty" pg:"file_size"` - DownloadRewardAmount int64 `protobuf:"varint,4,opt,name=download_reward_amount,json=downloadRewardAmount,proto3" json:"download_reward_amount,omitempty" pg:"download_reward_amount"` - RepairRewardAmount int64 `protobuf:"varint,5,opt,name=repair_reward_amount,json=repairRewardAmount,proto3" json:"repair_reward_amount,omitempty" pg:"repair_reward_amount"` - RepairPid string `protobuf:"bytes,6,opt,name=repair_pid,json=repairPid,proto3" json:"repair_pid,omitempty" pg:"repair_pid"` - RepairSignTime time.Time `protobuf:"bytes,7,opt,name=repair_sign_time,json=repairSignTime,proto3,stdtime" json:"repair_sign_time" pg:"repair_sign_time"` - RepairSignature []byte `protobuf:"bytes,8,opt,name=repair_signature,json=repairSignature,proto3" json:"repair_signature,omitempty" pg:"repair_signature"` - DownloadContractId string `protobuf:"bytes,9,opt,name=download_contract_id,json=downloadContractId,proto3" json:"download_contract_id,omitempty" pg:"download_contract_id"` - RepairContractId string `protobuf:"bytes,10,opt,name=repair_contract_id,json=repairContractId,proto3" json:"repair_contract_id,omitempty" pg:"repair_contract_id"` - GuardSignTime time.Time `protobuf:"bytes,11,opt,name=guard_sign_time,json=guardSignTime,proto3,stdtime" json:"guard_sign_time" pg:"guard_sign_time"` - GuardSignature []byte `protobuf:"bytes,12,opt,name=guard_signature,json=guardSignature,proto3" json:"guard_signature,omitempty" pg:"guard_signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *RepairContract) Reset() { *m = RepairContract{} } -func (m *RepairContract) String() string { return proto.CompactTextString(m) } -func (*RepairContract) ProtoMessage() {} -func (*RepairContract) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{24} -} -func (m *RepairContract) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RepairContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RepairContract.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RepairContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_RepairContract.Merge(m, src) -} -func (m *RepairContract) XXX_Size() int { - return m.Size() -} -func (m *RepairContract) XXX_DiscardUnknown() { - xxx_messageInfo_RepairContract.DiscardUnknown(m) -} - -var xxx_messageInfo_RepairContract proto.InternalMessageInfo - -func (m *RepairContract) GetFileHash() string { - if m != nil { - return m.FileHash - } - return "" -} - -func (m *RepairContract) GetLostShardHash() []string { - if m != nil { - return m.LostShardHash - } - return nil -} - -func (m *RepairContract) GetFileSize() int64 { - if m != nil { - return m.FileSize - } - return 0 -} - -func (m *RepairContract) GetDownloadRewardAmount() int64 { - if m != nil { - return m.DownloadRewardAmount - } - return 0 -} - -func (m *RepairContract) GetRepairRewardAmount() int64 { - if m != nil { - return m.RepairRewardAmount - } - return 0 -} - -func (m *RepairContract) GetRepairPid() string { - if m != nil { - return m.RepairPid - } - return "" -} - -func (m *RepairContract) GetRepairSignTime() time.Time { - if m != nil { - return m.RepairSignTime - } - return time.Time{} -} - -func (m *RepairContract) GetRepairSignature() []byte { - if m != nil { - return m.RepairSignature - } - return nil -} - -func (m *RepairContract) GetDownloadContractId() string { - if m != nil { - return m.DownloadContractId - } - return "" -} - -func (m *RepairContract) GetRepairContractId() string { - if m != nil { - return m.RepairContractId - } - return "" -} - -func (m *RepairContract) GetGuardSignTime() time.Time { - if m != nil { - return m.GuardSignTime - } - return time.Time{} -} - -func (m *RepairContract) GetGuardSignature() []byte { - if m != nil { - return m.GuardSignature - } - return nil -} - -func (*RepairContract) XXX_MessageName() string { - return "guard.RepairContract" -} - -type RepairContractResponse struct { - Contract *RepairContract `protobuf:"bytes,1,opt,name=contract,proto3" json:"contract,omitempty" pg:"contract"` - Status RepairContractResponse_ContractResponseStatus `protobuf:"varint,2,opt,name=status,proto3,enum=guard.RepairContractResponse_ContractResponseStatus" json:"status,omitempty" pg:"status"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *RepairContractResponse) Reset() { *m = RepairContractResponse{} } -func (m *RepairContractResponse) String() string { return proto.CompactTextString(m) } -func (*RepairContractResponse) ProtoMessage() {} -func (*RepairContractResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{25} -} -func (m *RepairContractResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RepairContractResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RepairContractResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RepairContractResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_RepairContractResponse.Merge(m, src) -} -func (m *RepairContractResponse) XXX_Size() int { - return m.Size() -} -func (m *RepairContractResponse) XXX_DiscardUnknown() { - xxx_messageInfo_RepairContractResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_RepairContractResponse proto.InternalMessageInfo - -func (m *RepairContractResponse) GetContract() *RepairContract { - if m != nil { - return m.Contract - } - return nil -} - -func (m *RepairContractResponse) GetStatus() RepairContractResponse_ContractResponseStatus { - if m != nil { - return m.Status - } - return RepairContractResponse_BOTH_SIGNED -} - -func (*RepairContractResponse) XXX_MessageName() string { - return "guard.RepairContractResponse" -} - -type RequestRepairContracts struct { - FileHash string `protobuf:"bytes,1,opt,name=file_hash,json=fileHash,proto3" json:"file_hash,omitempty" pg:"file_hash"` - RepairNode string `protobuf:"bytes,2,opt,name=repair_node,json=repairNode,proto3" json:"repair_node,omitempty" pg:"repair_node"` - RepairSignTime time.Time `protobuf:"bytes,3,opt,name=repair_sign_time,json=repairSignTime,proto3,stdtime" json:"repair_sign_time" pg:"repair_sign_time"` - RepairSignature []byte `protobuf:"bytes,4,opt,name=repair_signature,json=repairSignature,proto3" json:"repair_signature,omitempty" pg:"repair_signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *RequestRepairContracts) Reset() { *m = RequestRepairContracts{} } -func (m *RequestRepairContracts) String() string { return proto.CompactTextString(m) } -func (*RequestRepairContracts) ProtoMessage() {} -func (*RequestRepairContracts) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{26} -} -func (m *RequestRepairContracts) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RequestRepairContracts) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RequestRepairContracts.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RequestRepairContracts) XXX_Merge(src proto.Message) { - xxx_messageInfo_RequestRepairContracts.Merge(m, src) -} -func (m *RequestRepairContracts) XXX_Size() int { - return m.Size() -} -func (m *RequestRepairContracts) XXX_DiscardUnknown() { - xxx_messageInfo_RequestRepairContracts.DiscardUnknown(m) -} - -var xxx_messageInfo_RequestRepairContracts proto.InternalMessageInfo - -func (m *RequestRepairContracts) GetFileHash() string { - if m != nil { - return m.FileHash - } - return "" -} - -func (m *RequestRepairContracts) GetRepairNode() string { - if m != nil { - return m.RepairNode - } - return "" -} - -func (m *RequestRepairContracts) GetRepairSignTime() time.Time { - if m != nil { - return m.RepairSignTime - } - return time.Time{} -} - -func (m *RequestRepairContracts) GetRepairSignature() []byte { - if m != nil { - return m.RepairSignature - } - return nil -} - -func (*RequestRepairContracts) XXX_MessageName() string { - return "guard.RequestRepairContracts" -} - -type ResponseRepairContracts struct { - FileHash string `protobuf:"bytes,1,opt,name=file_hash,json=fileHash,proto3" json:"file_hash,omitempty" pg:"file_hash"` - RepairNode string `protobuf:"bytes,2,opt,name=repair_node,json=repairNode,proto3" json:"repair_node,omitempty" pg:"repair_node"` - State ResponseRepairContracts_RepairStat `protobuf:"varint,3,opt,name=state,proto3,enum=guard.ResponseRepairContracts_RepairStat" json:"state,omitempty" pg:"state"` - Status *FileStoreStatus `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty" pg:"status"` - GuardPid string `protobuf:"bytes,5,opt,name=guard_pid,json=guardPid,proto3" json:"guard_pid,omitempty" pg:"guard_pid"` - SignTime time.Time `protobuf:"bytes,6,opt,name=sign_time,json=signTime,proto3,stdtime" json:"sign_time" pg:"sign_time"` - GuardSignature []byte `protobuf:"bytes,7,opt,name=guard_signature,json=guardSignature,proto3" json:"guard_signature,omitempty" pg:"guard_signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ResponseRepairContracts) Reset() { *m = ResponseRepairContracts{} } -func (m *ResponseRepairContracts) String() string { return proto.CompactTextString(m) } -func (*ResponseRepairContracts) ProtoMessage() {} -func (*ResponseRepairContracts) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{27} -} -func (m *ResponseRepairContracts) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResponseRepairContracts) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResponseRepairContracts.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ResponseRepairContracts) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResponseRepairContracts.Merge(m, src) -} -func (m *ResponseRepairContracts) XXX_Size() int { - return m.Size() -} -func (m *ResponseRepairContracts) XXX_DiscardUnknown() { - xxx_messageInfo_ResponseRepairContracts.DiscardUnknown(m) -} - -var xxx_messageInfo_ResponseRepairContracts proto.InternalMessageInfo - -func (m *ResponseRepairContracts) GetFileHash() string { - if m != nil { - return m.FileHash - } - return "" -} - -func (m *ResponseRepairContracts) GetRepairNode() string { - if m != nil { - return m.RepairNode - } - return "" -} - -func (m *ResponseRepairContracts) GetState() ResponseRepairContracts_RepairStat { - if m != nil { - return m.State - } - return ResponseRepairContracts_CONTRACT_READY -} - -func (m *ResponseRepairContracts) GetStatus() *FileStoreStatus { - if m != nil { - return m.Status - } - return nil -} - -func (m *ResponseRepairContracts) GetGuardPid() string { - if m != nil { - return m.GuardPid - } - return "" -} - -func (m *ResponseRepairContracts) GetSignTime() time.Time { - if m != nil { - return m.SignTime - } - return time.Time{} -} - -func (m *ResponseRepairContracts) GetGuardSignature() []byte { - if m != nil { - return m.GuardSignature - } - return nil -} - -func (*ResponseRepairContracts) XXX_MessageName() string { - return "guard.ResponseRepairContracts" -} - -type CancelContractRequest struct { - FileHash string `protobuf:"bytes,1,opt,name=file_hash,json=fileHash,proto3" json:"file_hash,omitempty" pg:"file_hash"` - ShardHash string `protobuf:"bytes,2,opt,name=shard_hash,json=shardHash,proto3" json:"shard_hash,omitempty" pg:"shard_hash"` - ContractId string `protobuf:"bytes,3,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty" pg:"contract_id"` - RenterPid string `protobuf:"bytes,4,opt,name=renter_pid,json=renterPid,proto3" json:"renter_pid,omitempty" pg:"renter_pid"` - HostPid string `protobuf:"bytes,5,opt,name=host_pid,json=hostPid,proto3" json:"host_pid,omitempty" pg:"host_pid"` - Reason CancelContractRequest_CancelReason `protobuf:"varint,6,opt,name=reason,proto3,enum=guard.CancelContractRequest_CancelReason" json:"reason,omitempty" pg:"reason"` - SignTime time.Time `protobuf:"bytes,7,opt,name=sign_time,json=signTime,proto3,stdtime" json:"sign_time" pg:"sign_time"` - Signature []byte `protobuf:"bytes,8,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *CancelContractRequest) Reset() { *m = CancelContractRequest{} } -func (m *CancelContractRequest) String() string { return proto.CompactTextString(m) } -func (*CancelContractRequest) ProtoMessage() {} -func (*CancelContractRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{28} -} -func (m *CancelContractRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CancelContractRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CancelContractRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *CancelContractRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CancelContractRequest.Merge(m, src) -} -func (m *CancelContractRequest) XXX_Size() int { - return m.Size() -} -func (m *CancelContractRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CancelContractRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CancelContractRequest proto.InternalMessageInfo - -func (m *CancelContractRequest) GetFileHash() string { - if m != nil { - return m.FileHash - } - return "" -} - -func (m *CancelContractRequest) GetShardHash() string { - if m != nil { - return m.ShardHash - } - return "" -} - -func (m *CancelContractRequest) GetContractId() string { - if m != nil { - return m.ContractId - } - return "" -} - -func (m *CancelContractRequest) GetRenterPid() string { - if m != nil { - return m.RenterPid - } - return "" -} - -func (m *CancelContractRequest) GetHostPid() string { - if m != nil { - return m.HostPid - } - return "" -} - -func (m *CancelContractRequest) GetReason() CancelContractRequest_CancelReason { - if m != nil { - return m.Reason - } - return CancelContractRequest_HOST_REQUEST -} - -func (m *CancelContractRequest) GetSignTime() time.Time { - if m != nil { - return m.SignTime - } - return time.Time{} -} - -func (m *CancelContractRequest) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (*CancelContractRequest) XXX_MessageName() string { - return "guard.CancelContractRequest" -} - -type ChallengeJobRequest struct { - NodePid string `protobuf:"bytes,1,opt,name=node_pid,json=nodePid,proto3" json:"node_pid,omitempty" pg:"node_pid"` - RequestTime time.Time `protobuf:"bytes,2,opt,name=request_time,json=requestTime,proto3,stdtime" json:"request_time" pg:"request_time"` - Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ChallengeJobRequest) Reset() { *m = ChallengeJobRequest{} } -func (m *ChallengeJobRequest) String() string { return proto.CompactTextString(m) } -func (*ChallengeJobRequest) ProtoMessage() {} -func (*ChallengeJobRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{29} -} -func (m *ChallengeJobRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ChallengeJobRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ChallengeJobRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ChallengeJobRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChallengeJobRequest.Merge(m, src) -} -func (m *ChallengeJobRequest) XXX_Size() int { - return m.Size() -} -func (m *ChallengeJobRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ChallengeJobRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ChallengeJobRequest proto.InternalMessageInfo - -func (m *ChallengeJobRequest) GetNodePid() string { - if m != nil { - return m.NodePid - } - return "" -} - -func (m *ChallengeJobRequest) GetRequestTime() time.Time { - if m != nil { - return m.RequestTime - } - return time.Time{} -} - -func (m *ChallengeJobRequest) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (*ChallengeJobRequest) XXX_MessageName() string { - return "guard.ChallengeJobRequest" -} - -type ChallengeJobResponse struct { - NodePid string `protobuf:"bytes,1,opt,name=node_pid,json=nodePid,proto3" json:"node_pid,omitempty" pg:"node_pid"` - IssuerPid string `protobuf:"bytes,2,opt,name=issuer_pid,json=issuerPid,proto3" json:"issuer_pid,omitempty" pg:"issuer_pid"` - JobId string `protobuf:"bytes,3,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty" pg:"job_id"` - PackageUrl string `protobuf:"bytes,4,opt,name=package_url,json=packageUrl,proto3" json:"package_url,omitempty" pg:"package_url"` - PackageQuestionsCount int32 `protobuf:"varint,5,opt,name=package_questions_count,json=packageQuestionsCount,proto3" json:"package_questions_count,omitempty" pg:"package_questions_count"` - SendTime time.Time `protobuf:"bytes,6,opt,name=send_time,json=sendTime,proto3,stdtime" json:"send_time" pg:"send_time"` - JobFinishDeadline time.Time `protobuf:"bytes,7,opt,name=job_finish_deadline,json=jobFinishDeadline,proto3,stdtime" json:"job_finish_deadline" pg:"job_finish_deadline"` - Signature []byte `protobuf:"bytes,8,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ChallengeJobResponse) Reset() { *m = ChallengeJobResponse{} } -func (m *ChallengeJobResponse) String() string { return proto.CompactTextString(m) } -func (*ChallengeJobResponse) ProtoMessage() {} -func (*ChallengeJobResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{30} -} -func (m *ChallengeJobResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ChallengeJobResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ChallengeJobResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ChallengeJobResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChallengeJobResponse.Merge(m, src) -} -func (m *ChallengeJobResponse) XXX_Size() int { - return m.Size() -} -func (m *ChallengeJobResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ChallengeJobResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ChallengeJobResponse proto.InternalMessageInfo - -func (m *ChallengeJobResponse) GetNodePid() string { - if m != nil { - return m.NodePid - } - return "" -} - -func (m *ChallengeJobResponse) GetIssuerPid() string { - if m != nil { - return m.IssuerPid - } - return "" -} - -func (m *ChallengeJobResponse) GetJobId() string { - if m != nil { - return m.JobId - } - return "" -} - -func (m *ChallengeJobResponse) GetPackageUrl() string { - if m != nil { - return m.PackageUrl - } - return "" -} - -func (m *ChallengeJobResponse) GetPackageQuestionsCount() int32 { - if m != nil { - return m.PackageQuestionsCount - } - return 0 -} - -func (m *ChallengeJobResponse) GetSendTime() time.Time { - if m != nil { - return m.SendTime - } - return time.Time{} -} - -func (m *ChallengeJobResponse) GetJobFinishDeadline() time.Time { - if m != nil { - return m.JobFinishDeadline - } - return time.Time{} -} - -func (m *ChallengeJobResponse) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (*ChallengeJobResponse) XXX_MessageName() string { - return "guard.ChallengeJobResponse" -} - -type ChallengeJobResult struct { - NodePid string `protobuf:"bytes,1,opt,name=node_pid,json=nodePid,proto3" json:"node_pid,omitempty" pg:"node_pid"` - JobId string `protobuf:"bytes,2,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty" pg:"job_id"` - Result []*ShardChallengeResult `protobuf:"bytes,3,rep,name=result,proto3" json:"result,omitempty" pg:"result"` - SubmitTime time.Time `protobuf:"bytes,4,opt,name=submit_time,json=submitTime,proto3,stdtime" json:"submit_time" pg:"submit_time"` - Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ChallengeJobResult) Reset() { *m = ChallengeJobResult{} } -func (m *ChallengeJobResult) String() string { return proto.CompactTextString(m) } -func (*ChallengeJobResult) ProtoMessage() {} -func (*ChallengeJobResult) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{31} -} -func (m *ChallengeJobResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ChallengeJobResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ChallengeJobResult.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ChallengeJobResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChallengeJobResult.Merge(m, src) -} -func (m *ChallengeJobResult) XXX_Size() int { - return m.Size() -} -func (m *ChallengeJobResult) XXX_DiscardUnknown() { - xxx_messageInfo_ChallengeJobResult.DiscardUnknown(m) -} - -var xxx_messageInfo_ChallengeJobResult proto.InternalMessageInfo - -func (m *ChallengeJobResult) GetNodePid() string { - if m != nil { - return m.NodePid - } - return "" -} - -func (m *ChallengeJobResult) GetJobId() string { - if m != nil { - return m.JobId - } - return "" -} - -func (m *ChallengeJobResult) GetResult() []*ShardChallengeResult { - if m != nil { - return m.Result - } - return nil -} - -func (m *ChallengeJobResult) GetSubmitTime() time.Time { - if m != nil { - return m.SubmitTime - } - return time.Time{} -} - -func (m *ChallengeJobResult) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (*ChallengeJobResult) XXX_MessageName() string { - return "guard.ChallengeJobResult" -} - -type ShardChallengeResult struct { - HostPid string `protobuf:"bytes,1,opt,name=host_pid,json=hostPid,proto3" json:"host_pid,omitempty" pg:"host_pid"` - FileHash string `protobuf:"bytes,2,opt,name=file_hash,json=fileHash,proto3" json:"file_hash,omitempty" pg:"file_hash"` - ShardHash string `protobuf:"bytes,3,opt,name=shard_hash,json=shardHash,proto3" json:"shard_hash,omitempty" pg:"shard_hash"` - Nonce string `protobuf:"bytes,4,opt,name=nonce,proto3" json:"nonce,omitempty" pg:"nonce"` - Result string `protobuf:"bytes,5,opt,name=result,proto3" json:"result,omitempty" pg:"result"` - IsTimeout bool `protobuf:"varint,6,opt,name=is_timeout,json=isTimeout,proto3" json:"is_timeout,omitempty" pg:"is_timeout"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ShardChallengeResult) Reset() { *m = ShardChallengeResult{} } -func (m *ShardChallengeResult) String() string { return proto.CompactTextString(m) } -func (*ShardChallengeResult) ProtoMessage() {} -func (*ShardChallengeResult) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{32} -} -func (m *ShardChallengeResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ShardChallengeResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ShardChallengeResult.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ShardChallengeResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_ShardChallengeResult.Merge(m, src) -} -func (m *ShardChallengeResult) XXX_Size() int { - return m.Size() -} -func (m *ShardChallengeResult) XXX_DiscardUnknown() { - xxx_messageInfo_ShardChallengeResult.DiscardUnknown(m) -} - -var xxx_messageInfo_ShardChallengeResult proto.InternalMessageInfo - -func (m *ShardChallengeResult) GetHostPid() string { - if m != nil { - return m.HostPid - } - return "" -} - -func (m *ShardChallengeResult) GetFileHash() string { - if m != nil { - return m.FileHash - } - return "" -} - -func (m *ShardChallengeResult) GetShardHash() string { - if m != nil { - return m.ShardHash - } - return "" -} - -func (m *ShardChallengeResult) GetNonce() string { - if m != nil { - return m.Nonce - } - return "" -} - -func (m *ShardChallengeResult) GetResult() string { - if m != nil { - return m.Result - } - return "" -} - -func (m *ShardChallengeResult) GetIsTimeout() bool { - if m != nil { - return m.IsTimeout - } - return false -} - -func (*ShardChallengeResult) XXX_MessageName() string { - return "guard.ShardChallengeResult" -} - -type DeCentralQuestions struct { - Qs []*DeQuestion `protobuf:"bytes,1,rep,name=qs,proto3" json:"qs,omitempty" pg:"qs"` - Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty" pg:"count"` - Uuid string `protobuf:"bytes,3,opt,name=uuid,proto3" json:"uuid,omitempty" pg:"uuid"` - Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty" pg:"url"` - EndTime *time.Time `protobuf:"bytes,5,opt,name=end_time,json=endTime,proto3,stdtime" json:"end_time,omitempty" pg:"end_time"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *DeCentralQuestions) Reset() { *m = DeCentralQuestions{} } -func (m *DeCentralQuestions) String() string { return proto.CompactTextString(m) } -func (*DeCentralQuestions) ProtoMessage() {} -func (*DeCentralQuestions) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{33} -} -func (m *DeCentralQuestions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeCentralQuestions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DeCentralQuestions.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DeCentralQuestions) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeCentralQuestions.Merge(m, src) -} -func (m *DeCentralQuestions) XXX_Size() int { - return m.Size() -} -func (m *DeCentralQuestions) XXX_DiscardUnknown() { - xxx_messageInfo_DeCentralQuestions.DiscardUnknown(m) -} - -var xxx_messageInfo_DeCentralQuestions proto.InternalMessageInfo - -func (m *DeCentralQuestions) GetQs() []*DeQuestion { - if m != nil { - return m.Qs - } - return nil -} - -func (m *DeCentralQuestions) GetCount() int32 { - if m != nil { - return m.Count - } - return 0 -} - -func (m *DeCentralQuestions) GetUuid() string { - if m != nil { - return m.Uuid - } - return "" -} - -func (m *DeCentralQuestions) GetUrl() string { - if m != nil { - return m.Url - } - return "" -} - -func (m *DeCentralQuestions) GetEndTime() *time.Time { - if m != nil { - return m.EndTime - } - return nil -} - -func (*DeCentralQuestions) XXX_MessageName() string { - return "guard.DeCentralQuestions" -} - -type DeQuestion struct { - ShardHash string `protobuf:"bytes,1,opt,name=shard_hash,json=shardHash,proto3" json:"shard_hash,omitempty" pg:"shard_hash"` - HostPid string `protobuf:"bytes,2,opt,name=host_pid,json=hostPid,proto3" json:"host_pid,omitempty" pg:"host_pid"` - ChunkIndex int32 `protobuf:"varint,3,opt,name=chunk_index,json=chunkIndex,proto3" json:"chunk_index,omitempty" pg:"chunk_index"` - Nonce string `protobuf:"bytes,4,opt,name=nonce,proto3" json:"nonce,omitempty" pg:"nonce"` - FileHash string `protobuf:"bytes,5,opt,name=file_hash,json=fileHash,proto3" json:"file_hash,omitempty" pg:"file_hash"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *DeQuestion) Reset() { *m = DeQuestion{} } -func (m *DeQuestion) String() string { return proto.CompactTextString(m) } -func (*DeQuestion) ProtoMessage() {} -func (*DeQuestion) Descriptor() ([]byte, []int) { - return fileDescriptor_ad5b6eccdc9ebee8, []int{34} -} -func (m *DeQuestion) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeQuestion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DeQuestion.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DeQuestion) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeQuestion.Merge(m, src) -} -func (m *DeQuestion) XXX_Size() int { - return m.Size() -} -func (m *DeQuestion) XXX_DiscardUnknown() { - xxx_messageInfo_DeQuestion.DiscardUnknown(m) -} - -var xxx_messageInfo_DeQuestion proto.InternalMessageInfo - -func (m *DeQuestion) GetShardHash() string { - if m != nil { - return m.ShardHash - } - return "" -} - -func (m *DeQuestion) GetHostPid() string { - if m != nil { - return m.HostPid - } - return "" -} - -func (m *DeQuestion) GetChunkIndex() int32 { - if m != nil { - return m.ChunkIndex - } - return 0 -} - -func (m *DeQuestion) GetNonce() string { - if m != nil { - return m.Nonce - } - return "" -} - -func (m *DeQuestion) GetFileHash() string { - if m != nil { - return m.FileHash - } - return "" -} - -func (*DeQuestion) XXX_MessageName() string { - return "guard.DeQuestion" -} -func init() { - proto.RegisterEnum("guard.ResponseCode", ResponseCode_name, ResponseCode_value) - golang_proto.RegisterEnum("guard.ResponseCode", ResponseCode_name, ResponseCode_value) - proto.RegisterEnum("guard.ContractMeta_Schedule", ContractMeta_Schedule_name, ContractMeta_Schedule_value) - golang_proto.RegisterEnum("guard.ContractMeta_Schedule", ContractMeta_Schedule_name, ContractMeta_Schedule_value) - proto.RegisterEnum("guard.Contract_ContractState", Contract_ContractState_name, Contract_ContractState_value) - golang_proto.RegisterEnum("guard.Contract_ContractState", Contract_ContractState_name, Contract_ContractState_value) - proto.RegisterEnum("guard.FileStoreStatus_MetaState", FileStoreStatus_MetaState_name, FileStoreStatus_MetaState_value) - golang_proto.RegisterEnum("guard.FileStoreStatus_MetaState", FileStoreStatus_MetaState_name, FileStoreStatus_MetaState_value) - proto.RegisterEnum("guard.FileStoreStatus_RentalState", FileStoreStatus_RentalState_name, FileStoreStatus_RentalState_value) - golang_proto.RegisterEnum("guard.FileStoreStatus_RentalState", FileStoreStatus_RentalState_name, FileStoreStatus_RentalState_value) - proto.RegisterEnum("guard.ListHostContractsRequest_SelectState", ListHostContractsRequest_SelectState_name, ListHostContractsRequest_SelectState_value) - golang_proto.RegisterEnum("guard.ListHostContractsRequest_SelectState", ListHostContractsRequest_SelectState_name, ListHostContractsRequest_SelectState_value) - proto.RegisterEnum("guard.RepairContractResponse_ContractResponseStatus", RepairContractResponse_ContractResponseStatus_name, RepairContractResponse_ContractResponseStatus_value) - golang_proto.RegisterEnum("guard.RepairContractResponse_ContractResponseStatus", RepairContractResponse_ContractResponseStatus_name, RepairContractResponse_ContractResponseStatus_value) - proto.RegisterEnum("guard.ResponseRepairContracts_RepairStat", ResponseRepairContracts_RepairStat_name, ResponseRepairContracts_RepairStat_value) - golang_proto.RegisterEnum("guard.ResponseRepairContracts_RepairStat", ResponseRepairContracts_RepairStat_name, ResponseRepairContracts_RepairStat_value) - proto.RegisterEnum("guard.CancelContractRequest_CancelReason", CancelContractRequest_CancelReason_name, CancelContractRequest_CancelReason_value) - golang_proto.RegisterEnum("guard.CancelContractRequest_CancelReason", CancelContractRequest_CancelReason_name, CancelContractRequest_CancelReason_value) - proto.RegisterType((*AdminQuery)(nil), "guard.AdminQuery") - golang_proto.RegisterType((*AdminQuery)(nil), "guard.AdminQuery") - proto.RegisterType((*DailySummary)(nil), "guard.DailySummary") - golang_proto.RegisterType((*DailySummary)(nil), "guard.DailySummary") - proto.RegisterType((*HostSummary)(nil), "guard.HostSummary") - golang_proto.RegisterType((*HostSummary)(nil), "guard.HostSummary") - proto.RegisterType((*TotalStateSummary)(nil), "guard.TotalStateSummary") - golang_proto.RegisterType((*TotalStateSummary)(nil), "guard.TotalStateSummary") - proto.RegisterType((*HostStatus)(nil), "guard.HostStatus") - golang_proto.RegisterType((*HostStatus)(nil), "guard.HostStatus") - proto.RegisterType((*Log)(nil), "guard.Log") - golang_proto.RegisterType((*Log)(nil), "guard.Log") - proto.RegisterType((*ContractMeta)(nil), "guard.ContractMeta") - golang_proto.RegisterType((*ContractMeta)(nil), "guard.ContractMeta") - proto.RegisterType((*Contract)(nil), "guard.Contract") - golang_proto.RegisterType((*Contract)(nil), "guard.Contract") - proto.RegisterType((*FileStoreListResponse)(nil), "guard.FileStoreListResponse") - golang_proto.RegisterType((*FileStoreListResponse)(nil), "guard.FileStoreListResponse") - proto.RegisterType((*FileStoreMeta)(nil), "guard.FileStoreMeta") - golang_proto.RegisterType((*FileStoreMeta)(nil), "guard.FileStoreMeta") - proto.RegisterType((*FileStoreStatus)(nil), "guard.FileStoreStatus") - golang_proto.RegisterType((*FileStoreStatus)(nil), "guard.FileStoreStatus") - proto.RegisterType((*ChallengeQuestion)(nil), "guard.ChallengeQuestion") - golang_proto.RegisterType((*ChallengeQuestion)(nil), "guard.ChallengeQuestion") - proto.RegisterType((*ProofOfReplicateChallenge)(nil), "guard.ProofOfReplicateChallenge") - golang_proto.RegisterType((*ProofOfReplicateChallenge)(nil), "guard.ProofOfReplicateChallenge") - proto.RegisterType((*FileChallengeQuestions)(nil), "guard.FileChallengeQuestions") - golang_proto.RegisterType((*FileChallengeQuestions)(nil), "guard.FileChallengeQuestions") - proto.RegisterType((*ShardChallengeQuestions)(nil), "guard.ShardChallengeQuestions") - golang_proto.RegisterType((*ShardChallengeQuestions)(nil), "guard.ShardChallengeQuestions") - proto.RegisterType((*CheckFileStoreMetaRequest)(nil), "guard.CheckFileStoreMetaRequest") - golang_proto.RegisterType((*CheckFileStoreMetaRequest)(nil), "guard.CheckFileStoreMetaRequest") - proto.RegisterType((*ListRenterFileInfoRequest)(nil), "guard.ListRenterFileInfoRequest") - golang_proto.RegisterType((*ListRenterFileInfoRequest)(nil), "guard.ListRenterFileInfoRequest") - proto.RegisterType((*ListHostContractsRequest)(nil), "guard.ListHostContractsRequest") - golang_proto.RegisterType((*ListHostContractsRequest)(nil), "guard.ListHostContractsRequest") - proto.RegisterType((*ContractsList)(nil), "guard.ContractsList") - golang_proto.RegisterType((*ContractsList)(nil), "guard.ContractsList") - proto.RegisterType((*ReadyForChallengeRequest)(nil), "guard.ReadyForChallengeRequest") - golang_proto.RegisterType((*ReadyForChallengeRequest)(nil), "guard.ReadyForChallengeRequest") - proto.RegisterType((*RequestChallengeQuestion)(nil), "guard.RequestChallengeQuestion") - golang_proto.RegisterType((*RequestChallengeQuestion)(nil), "guard.RequestChallengeQuestion") - proto.RegisterType((*ResponseChallengeQuestion)(nil), "guard.ResponseChallengeQuestion") - golang_proto.RegisterType((*ResponseChallengeQuestion)(nil), "guard.ResponseChallengeQuestion") - proto.RegisterType((*ForceRepairRequest)(nil), "guard.ForceRepairRequest") - golang_proto.RegisterType((*ForceRepairRequest)(nil), "guard.ForceRepairRequest") - proto.RegisterType((*Result)(nil), "guard.Result") - golang_proto.RegisterType((*Result)(nil), "guard.Result") - proto.RegisterType((*RepairContract)(nil), "guard.RepairContract") - golang_proto.RegisterType((*RepairContract)(nil), "guard.RepairContract") - proto.RegisterType((*RepairContractResponse)(nil), "guard.RepairContractResponse") - golang_proto.RegisterType((*RepairContractResponse)(nil), "guard.RepairContractResponse") - proto.RegisterType((*RequestRepairContracts)(nil), "guard.RequestRepairContracts") - golang_proto.RegisterType((*RequestRepairContracts)(nil), "guard.RequestRepairContracts") - proto.RegisterType((*ResponseRepairContracts)(nil), "guard.ResponseRepairContracts") - golang_proto.RegisterType((*ResponseRepairContracts)(nil), "guard.ResponseRepairContracts") - proto.RegisterType((*CancelContractRequest)(nil), "guard.CancelContractRequest") - golang_proto.RegisterType((*CancelContractRequest)(nil), "guard.CancelContractRequest") - proto.RegisterType((*ChallengeJobRequest)(nil), "guard.ChallengeJobRequest") - golang_proto.RegisterType((*ChallengeJobRequest)(nil), "guard.ChallengeJobRequest") - proto.RegisterType((*ChallengeJobResponse)(nil), "guard.ChallengeJobResponse") - golang_proto.RegisterType((*ChallengeJobResponse)(nil), "guard.ChallengeJobResponse") - proto.RegisterType((*ChallengeJobResult)(nil), "guard.ChallengeJobResult") - golang_proto.RegisterType((*ChallengeJobResult)(nil), "guard.ChallengeJobResult") - proto.RegisterType((*ShardChallengeResult)(nil), "guard.ShardChallengeResult") - golang_proto.RegisterType((*ShardChallengeResult)(nil), "guard.ShardChallengeResult") - proto.RegisterType((*DeCentralQuestions)(nil), "guard.DeCentralQuestions") - golang_proto.RegisterType((*DeCentralQuestions)(nil), "guard.DeCentralQuestions") - proto.RegisterType((*DeQuestion)(nil), "guard.DeQuestion") - golang_proto.RegisterType((*DeQuestion)(nil), "guard.DeQuestion") -} - -func init() { proto.RegisterFile("protos/guard/guard.proto", fileDescriptor_ad5b6eccdc9ebee8) } -func init() { golang_proto.RegisterFile("protos/guard/guard.proto", fileDescriptor_ad5b6eccdc9ebee8) } - -var fileDescriptor_ad5b6eccdc9ebee8 = []byte{ - // 4012 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x3b, 0x4b, 0x6f, 0x23, 0xd9, - 0x5a, 0x5d, 0x7e, 0xfb, 0xf3, 0xab, 0x72, 0x3a, 0x49, 0x3b, 0xe9, 0xe9, 0xa4, 0xc7, 0x68, 0xee, - 0x74, 0xcf, 0x9d, 0xc9, 0x0c, 0x3d, 0xad, 0x41, 0x97, 0xfb, 0xc2, 0x6d, 0x57, 0x1e, 0x8d, 0xdb, - 0x4e, 0x97, 0x1d, 0x9a, 0xbe, 0x42, 0x2a, 0x55, 0xec, 0x13, 0xa7, 0xa6, 0xed, 0xaa, 0x74, 0x55, - 0xb9, 0x33, 0x7d, 0x17, 0x2c, 0xd8, 0x21, 0x24, 0xc4, 0x0a, 0xd0, 0xfd, 0x01, 0x48, 0x20, 0x24, - 0x10, 0x12, 0x2c, 0x58, 0x00, 0xcb, 0x41, 0x48, 0x70, 0xd9, 0xb0, 0xbc, 0x8f, 0xe9, 0x3f, 0x00, - 0x2b, 0xee, 0x0a, 0xa1, 0xf3, 0x9d, 0x53, 0x4f, 0x57, 0x9c, 0x38, 0xb4, 0xb8, 0xd2, 0x6c, 0xa2, - 0x9c, 0xef, 0x7c, 0xdf, 0x79, 0x7c, 0xef, 0xef, 0x3b, 0x65, 0xa8, 0x9f, 0xd9, 0x96, 0x6b, 0x39, - 0x1f, 0x8f, 0x67, 0xba, 0x3d, 0xe2, 0x7f, 0x77, 0x10, 0x44, 0xb2, 0x38, 0xd8, 0xfc, 0x64, 0x6c, - 0xb8, 0xa7, 0xb3, 0xe3, 0x9d, 0xa1, 0x35, 0xfd, 0xd8, 0xb5, 0x2d, 0xf3, 0xa3, 0x99, 0xf3, 0x31, - 0x22, 0x1c, 0xcf, 0x4e, 0x3e, 0x1e, 0x5b, 0x63, 0x0b, 0x07, 0xf8, 0x1f, 0x27, 0xdc, 0xdc, 0x1e, - 0x5b, 0xd6, 0x78, 0x42, 0x03, 0x2c, 0xd7, 0x98, 0x52, 0xc7, 0xd5, 0xa7, 0x67, 0x1c, 0xa1, 0xf1, - 0x3f, 0x12, 0x40, 0x73, 0x34, 0x35, 0xcc, 0xa7, 0x33, 0x6a, 0xbf, 0x26, 0xbf, 0x02, 0x15, 0x9b, - 0xbe, 0x9c, 0x51, 0xc7, 0xa5, 0xb6, 0x76, 0x66, 0x8c, 0xea, 0xd2, 0x5d, 0xe9, 0x5e, 0x51, 0x2d, - 0xfb, 0xc0, 0x43, 0x63, 0x44, 0x5a, 0x00, 0x2f, 0x19, 0xb6, 0x36, 0xd2, 0x5d, 0x5a, 0x4f, 0xdd, - 0x95, 0xee, 0x95, 0x1e, 0x6c, 0xee, 0xf0, 0x9d, 0x76, 0xbc, 0x9d, 0x76, 0x06, 0xde, 0x4e, 0x8f, - 0x0a, 0x5f, 0xfe, 0x64, 0xfb, 0xc6, 0x1f, 0xfd, 0x74, 0x5b, 0x52, 0x8b, 0x48, 0xd7, 0xd6, 0x5d, - 0x4a, 0xb6, 0xa1, 0xc4, 0x17, 0x19, 0x5a, 0x33, 0xd3, 0xad, 0xa7, 0xef, 0x4a, 0xf7, 0xb2, 0x2a, - 0x5f, 0xb7, 0xc5, 0x20, 0x64, 0x0f, 0xbc, 0x5d, 0x35, 0x76, 0xe8, 0x7a, 0x66, 0x89, 0x7d, 0x4a, - 0x82, 0x92, 0xcd, 0x91, 0x77, 0xa0, 0xe8, 0x18, 0x63, 0x53, 0x77, 0x67, 0x36, 0xad, 0x67, 0xef, - 0x4a, 0xf7, 0xca, 0x6a, 0x00, 0x68, 0xfc, 0x28, 0x03, 0xe5, 0xb6, 0x6e, 0x4c, 0x5e, 0xf7, 0x67, - 0xd3, 0xa9, 0x6e, 0xbf, 0x8e, 0xdd, 0x4e, 0xba, 0xde, 0xed, 0x0e, 0x18, 0x1f, 0x9d, 0x33, 0xcb, - 0x74, 0x28, 0x3f, 0xfd, 0x32, 0x5c, 0x2a, 0x7b, 0xa4, 0x78, 0xfc, 0x77, 0xa1, 0x7c, 0x66, 0xd3, - 0x33, 0xdd, 0x16, 0x12, 0x49, 0xa3, 0x44, 0x4a, 0x1e, 0x8c, 0x09, 0x24, 0x72, 0xc3, 0x4c, 0xec, - 0x86, 0xe4, 0x13, 0x58, 0x3d, 0xb7, 0xec, 0x17, 0x86, 0x39, 0xd6, 0x1c, 0xd7, 0xb2, 0xf5, 0x31, - 0xd5, 0x1c, 0xe3, 0x87, 0x9c, 0x15, 0x69, 0x95, 0x88, 0xb9, 0x3e, 0x9f, 0xea, 0x1b, 0x3f, 0xa4, - 0x4c, 0x0b, 0x4c, 0x7a, 0xae, 0x0d, 0x2d, 0xd3, 0xb5, 0xf5, 0xa1, 0xeb, 0xd4, 0x73, 0x88, 0x5a, - 0x36, 0xe9, 0x79, 0xcb, 0x83, 0x91, 0x0f, 0x81, 0x44, 0x90, 0xb4, 0x53, 0xcb, 0x71, 0xeb, 0x79, - 0xc4, 0x94, 0xc3, 0x98, 0xfb, 0x96, 0xe3, 0xb2, 0x43, 0x44, 0xb1, 0x6d, 0x6a, 0xba, 0xd4, 0xae, - 0x17, 0xf8, 0x21, 0xc2, 0xf8, 0x2a, 0xce, 0x90, 0xef, 0xc2, 0xed, 0x28, 0x85, 0xfe, 0x8a, 0xe2, - 0xe1, 0xcf, 0x6c, 0x63, 0x48, 0xeb, 0x45, 0x24, 0xac, 0x87, 0x09, 0x9b, 0x1c, 0xe1, 0x90, 0xcd, - 0x93, 0xdb, 0x50, 0x64, 0xe4, 0x27, 0xc6, 0x84, 0x3a, 0x75, 0x40, 0xe4, 0x82, 0x49, 0xcf, 0x77, - 0xd9, 0x98, 0x7c, 0x03, 0x6a, 0x6c, 0xd2, 0x39, 0xd5, 0xed, 0x91, 0xc3, 0xb9, 0x51, 0x42, 0x14, - 0x76, 0xef, 0x3e, 0x42, 0x19, 0x23, 0x1a, 0x7f, 0x99, 0x82, 0x12, 0x3b, 0xfe, 0xd7, 0x56, 0x37, - 0xde, 0x65, 0x46, 0x36, 0xb4, 0xec, 0x91, 0x30, 0xc3, 0x2c, 0x9a, 0x61, 0x89, 0xc3, 0xb8, 0x1d, - 0xde, 0x87, 0x9c, 0xe3, 0xea, 0xee, 0x8c, 0x69, 0x41, 0xfa, 0x5e, 0xe9, 0xc1, 0xca, 0x0e, 0xf7, - 0x4c, 0xc8, 0x17, 0x9c, 0x50, 0x05, 0x42, 0xe3, 0x5f, 0xd3, 0xb0, 0x32, 0xb0, 0x5c, 0x7d, 0xc2, - 0xe0, 0xf4, 0xeb, 0x6c, 0x50, 0xaf, 0xf4, 0x89, 0x31, 0xf2, 0x75, 0x33, 0xc4, 0xbc, 0xb4, 0x4a, - 0x70, 0xce, 0x53, 0x4a, 0xce, 0xc3, 0x0f, 0x81, 0xd0, 0x2f, 0x0c, 0xc7, 0xa5, 0x23, 0xae, 0x73, - 0x5c, 0xe5, 0xb8, 0x55, 0xc9, 0x62, 0x06, 0xd5, 0x0e, 0xcd, 0xef, 0x21, 0xac, 0x1b, 0x66, 0xe2, - 0x0e, 0xdc, 0xba, 0x56, 0xc5, 0x6c, 0x74, 0x8f, 0x6f, 0x40, 0x6d, 0x62, 0x39, 0x6e, 0x78, 0x03, - 0x6e, 0x5c, 0x15, 0x06, 0x0e, 0x56, 0xff, 0x00, 0x56, 0x5c, 0x26, 0x23, 0xb4, 0x57, 0xcd, 0xa6, - 0xe7, 0xba, 0x3d, 0x12, 0xd6, 0x54, 0xc3, 0x09, 0x26, 0x58, 0x15, 0xc1, 0x8d, 0x3f, 0x97, 0x00, - 0x02, 0x39, 0x93, 0x0d, 0x28, 0x20, 0x51, 0x10, 0x18, 0xf2, 0x6c, 0xcc, 0x38, 0x76, 0x1b, 0x8a, - 0xcc, 0xd4, 0xf8, 0xbe, 0x29, 0x6e, 0x6e, 0x0c, 0x80, 0x5b, 0x6e, 0x43, 0x89, 0x79, 0x19, 0x4d, - 0x9f, 0xfa, 0xbe, 0x3e, 0xad, 0x02, 0x03, 0x35, 0x11, 0x42, 0xee, 0x00, 0xf0, 0x83, 0x68, 0xc7, - 0xae, 0x8b, 0x0c, 0x4f, 0xab, 0x45, 0x0e, 0x79, 0xe4, 0xba, 0xcc, 0x1f, 0x39, 0x33, 0xe7, 0x8c, - 0x32, 0x3e, 0x9c, 0x52, 0x9d, 0x73, 0xba, 0xa0, 0x96, 0x05, 0xb0, 0xc5, 0x60, 0x8d, 0x3f, 0x90, - 0x20, 0xdd, 0xb1, 0xc6, 0x44, 0x81, 0xd2, 0xf0, 0x54, 0x37, 0xc7, 0x42, 0x4f, 0x96, 0xd1, 0x37, - 0xe0, 0x84, 0xa8, 0x25, 0xef, 0x41, 0xd5, 0xb2, 0x8d, 0xb1, 0x61, 0xea, 0xae, 0xc5, 0xf5, 0x24, - 0x85, 0x37, 0xae, 0x04, 0x50, 0x76, 0xef, 0x75, 0xc8, 0x71, 0x22, 0xa1, 0x46, 0x62, 0xd4, 0xf8, - 0x8f, 0x2c, 0x94, 0x3d, 0xf9, 0x3c, 0xa1, 0xae, 0xce, 0x78, 0xe0, 0x0b, 0xd3, 0x67, 0x1f, 0x78, - 0xa0, 0x83, 0x11, 0xe7, 0x81, 0xe9, 0xc5, 0x5d, 0xbe, 0x59, 0x91, 0x43, 0xd8, 0x46, 0x61, 0xde, - 0xa7, 0xa3, 0xbc, 0xbf, 0x03, 0xc0, 0x85, 0x7e, 0xaa, 0x3b, 0xa7, 0xc8, 0xbd, 0xa2, 0x5a, 0x44, - 0xc8, 0xbe, 0xee, 0x9c, 0xb2, 0x9d, 0xf9, 0xb4, 0x61, 0x8e, 0xe8, 0x17, 0xc2, 0xc4, 0x39, 0xc5, - 0x01, 0x83, 0x30, 0xcd, 0xe1, 0x08, 0x81, 0x04, 0xb9, 0x6a, 0x56, 0x10, 0xbc, 0xeb, 0x89, 0xd1, - 0x93, 0x31, 0x6e, 0x93, 0xc7, 0x6d, 0x50, 0xc6, 0xb8, 0x4b, 0x8b, 0x1f, 0x5f, 0x73, 0x5c, 0xdd, - 0x76, 0x51, 0xf3, 0xae, 0x6c, 0xe5, 0x8c, 0xae, 0xcf, 0xc8, 0xc8, 0xf7, 0xa1, 0x80, 0x8b, 0x50, - 0x93, 0xab, 0xe4, 0x55, 0x97, 0xc8, 0x33, 0x2a, 0xc5, 0x44, 0x35, 0x44, 0xef, 0x84, 0x6c, 0x02, - 0x7e, 0x44, 0x04, 0x08, 0x3e, 0x51, 0x67, 0x68, 0x5b, 0xe7, 0x38, 0x5b, 0xe2, 0x7c, 0xe2, 0x10, - 0x36, 0xbd, 0x0a, 0x59, 0x1e, 0x5a, 0xca, 0x78, 0x79, 0x3e, 0x60, 0x02, 0x16, 0x6a, 0x5b, 0x41, - 0xb0, 0x18, 0x91, 0x6f, 0xc2, 0xca, 0xd0, 0x9a, 0x4c, 0x74, 0x97, 0xda, 0xfa, 0xc4, 0xd3, 0xec, - 0x2a, 0xb7, 0xe8, 0x60, 0x42, 0xe8, 0xb7, 0x02, 0xb5, 0x33, 0xfd, 0xb5, 0x35, 0x73, 0x35, 0x67, - 0x78, 0x4a, 0x47, 0xb3, 0x09, 0xad, 0xd7, 0xee, 0x4a, 0xf7, 0xaa, 0x0f, 0xde, 0x11, 0xce, 0x34, - 0xac, 0x2a, 0x3b, 0x7d, 0x81, 0xa3, 0x56, 0x39, 0x91, 0x37, 0x66, 0x92, 0x34, 0x67, 0x53, 0x8d, - 0x43, 0x9d, 0xba, 0xcc, 0x25, 0x69, 0xce, 0xa6, 0x87, 0x1c, 0xc2, 0x0f, 0x65, 0xba, 0x86, 0x39, - 0x66, 0x5c, 0x14, 0x87, 0x5a, 0xf1, 0x0e, 0xe5, 0x4d, 0xf0, 0x43, 0x35, 0x1e, 0x42, 0xc1, 0x5f, - 0xb9, 0x04, 0xf9, 0x27, 0xbd, 0xee, 0x60, 0xbf, 0xf3, 0x5c, 0xbe, 0x41, 0x2a, 0x50, 0x7c, 0x7a, - 0xd4, 0x54, 0x07, 0x8a, 0xda, 0x79, 0x2e, 0x4b, 0xa4, 0x0c, 0x85, 0x66, 0xb7, 0x7b, 0xd4, 0xec, - 0x74, 0x9e, 0xcb, 0xa9, 0xc6, 0x3f, 0x16, 0xa1, 0xe0, 0x9d, 0x96, 0x7c, 0x0b, 0x0a, 0x9e, 0x06, - 0x0b, 0x43, 0xbb, 0x99, 0x70, 0x21, 0x2e, 0xa8, 0x1f, 0xff, 0x64, 0x5b, 0x52, 0x7d, 0x74, 0xf2, - 0x29, 0x64, 0x59, 0xd4, 0xe0, 0xce, 0xa2, 0xfa, 0xe0, 0x4e, 0x8c, 0xce, 0xff, 0x07, 0x43, 0x89, - 0xca, 0x71, 0xc9, 0x7d, 0x90, 0x85, 0x8d, 0x04, 0xee, 0x39, 0x8d, 0xee, 0xb9, 0xc6, 0xe1, 0x7d, - 0xdf, 0x49, 0xbf, 0x07, 0x55, 0xb4, 0x97, 0xb8, 0x1f, 0xaf, 0x30, 0x68, 0x80, 0xa6, 0x02, 0x11, - 0x3a, 0xc1, 0x10, 0xe9, 0x88, 0x3b, 0x8d, 0xec, 0x12, 0xba, 0x27, 0x73, 0xfa, 0x3e, 0x92, 0xa3, - 0xeb, 0xb8, 0x0f, 0x72, 0x68, 0x4d, 0xbe, 0x79, 0x8e, 0x9f, 0x32, 0xc0, 0xf5, 0x42, 0x89, 0xf0, - 0x39, 0xda, 0xc4, 0x1a, 0xd7, 0xf3, 0x18, 0x60, 0x41, 0xb0, 0xa2, 0x63, 0x8d, 0x1f, 0x65, 0xff, - 0xe2, 0xa7, 0xdb, 0xd2, 0x47, 0x6a, 0x91, 0x23, 0x31, 0xf7, 0xd6, 0x05, 0x79, 0xa2, 0x3b, 0xae, - 0x36, 0xb5, 0x46, 0xc6, 0xc9, 0x6b, 0x7e, 0xdc, 0x65, 0xac, 0xad, 0xca, 0xa8, 0x9f, 0x20, 0x31, - 0x1e, 0xf6, 0x7d, 0xa8, 0x71, 0x8b, 0x09, 0xce, 0x5a, 0xc4, 0xb3, 0x56, 0x11, 0xdc, 0x0f, 0xa7, - 0x0a, 0x91, 0xb0, 0x09, 0xf3, 0x61, 0xf3, 0x23, 0x20, 0x3e, 0x4a, 0xb0, 0x5c, 0x09, 0x97, 0x5b, - 0xf1, 0x66, 0x82, 0x15, 0x87, 0x70, 0x1b, 0xaf, 0xe2, 0xcc, 0x86, 0x43, 0xea, 0x38, 0xda, 0xf0, - 0x54, 0x9f, 0x4c, 0xa8, 0xef, 0xb9, 0xcb, 0x4b, 0xdc, 0xaa, 0xce, 0x16, 0xea, 0xf3, 0x75, 0x5a, - 0xde, 0x32, 0x78, 0xbf, 0x01, 0xdc, 0xc4, 0x4d, 0x62, 0x8b, 0x57, 0x96, 0x58, 0x7c, 0x85, 0x2d, - 0x10, 0x5d, 0xf5, 0x7d, 0xa8, 0x45, 0x17, 0x74, 0xd0, 0xf6, 0xb3, 0x6a, 0x75, 0x18, 0xc6, 0x73, - 0x58, 0xae, 0x10, 0x20, 0x9e, 0xeb, 0xb6, 0x29, 0xb0, 0x6b, 0x88, 0x4d, 0xfc, 0xb9, 0x67, 0xba, - 0x6d, 0x72, 0x8a, 0xcf, 0xe0, 0x56, 0x40, 0xe1, 0xb1, 0x86, 0x13, 0x71, 0x83, 0x5f, 0xf3, 0xa7, - 0xc5, 0x85, 0x39, 0xdd, 0xef, 0xc0, 0xad, 0x13, 0xc3, 0x8e, 0xdc, 0x54, 0x50, 0xa3, 0x07, 0xb8, - 0xea, 0x65, 0xd7, 0x70, 0x91, 0x56, 0x6c, 0x8b, 0xc6, 0x97, 0x12, 0x54, 0x22, 0x26, 0x49, 0x8a, - 0x90, 0x6d, 0xab, 0xcd, 0xdd, 0x81, 0x7c, 0x83, 0x00, 0xe4, 0xfa, 0x07, 0x7b, 0x5d, 0xa5, 0xcd, - 0xbd, 0xc5, 0xd1, 0x61, 0xa7, 0xd7, 0x6c, 0x2b, 0x6d, 0x39, 0x45, 0x0a, 0x90, 0xe9, 0xf4, 0xfa, - 0x03, 0x39, 0xcd, 0xe0, 0xad, 0x66, 0xb7, 0xa5, 0x74, 0x94, 0xb6, 0x9c, 0x61, 0x14, 0xad, 0x4e, - 0xaf, 0xaf, 0xb4, 0xe5, 0x2c, 0xf3, 0x3d, 0xaa, 0xd2, 0x55, 0x9e, 0x29, 0x6d, 0x39, 0xc7, 0xd0, - 0x7a, 0x8f, 0xfa, 0xbd, 0x8e, 0x32, 0x50, 0xe4, 0x3c, 0x23, 0x7f, 0xd6, 0x54, 0xbb, 0x72, 0x81, - 0x54, 0x01, 0x70, 0x37, 0x0d, 0xc7, 0x45, 0x72, 0x13, 0x6a, 0xaa, 0xd2, 0x6c, 0x3f, 0xd7, 0x5a, - 0xfb, 0xcd, 0x4e, 0x47, 0xe9, 0xee, 0x29, 0x32, 0x30, 0xc7, 0xa5, 0x2a, 0x2d, 0x55, 0x69, 0x0e, - 0x94, 0xb6, 0x5c, 0x22, 0x6b, 0xb0, 0xa2, 0x2a, 0x4f, 0x8f, 0x94, 0xfe, 0x20, 0x84, 0x55, 0x6e, - 0xfc, 0x61, 0x0a, 0xd6, 0x30, 0xa6, 0xb9, 0x96, 0x4d, 0x3b, 0x06, 0x4b, 0x76, 0x78, 0x76, 0x48, - 0x7e, 0x1d, 0xf2, 0xa2, 0x70, 0x14, 0xde, 0xec, 0xae, 0x67, 0x8a, 0x88, 0xc5, 0x1c, 0x0c, 0x23, - 0x3c, 0x30, 0x4f, 0x2c, 0x95, 0xe3, 0xa9, 0x1e, 0x01, 0x2b, 0x57, 0x87, 0x33, 0x1b, 0xa3, 0xd7, - 0xd2, 0xf9, 0x69, 0x49, 0x50, 0xa2, 0x6a, 0x7d, 0x07, 0x6a, 0x3c, 0x0e, 0xb3, 0xe3, 0x69, 0x53, - 0xea, 0xea, 0xf5, 0x34, 0xfa, 0x85, 0x55, 0x71, 0x18, 0xff, 0xec, 0xcc, 0xb7, 0xaa, 0x95, 0x93, - 0xf0, 0x90, 0x05, 0x31, 0x9e, 0x2a, 0x66, 0x50, 0x57, 0xf8, 0xe0, 0x92, 0x12, 0xf8, 0xef, 0xb2, - 0x50, 0x89, 0x2c, 0x1a, 0xcb, 0x45, 0xa4, 0x78, 0x2e, 0x12, 0x49, 0x04, 0x52, 0xb1, 0x44, 0x20, - 0x92, 0x09, 0xa6, 0x63, 0x99, 0x60, 0x34, 0x4b, 0xc8, 0xfc, 0xdf, 0xb3, 0x84, 0xec, 0x75, 0xb2, - 0x04, 0xb4, 0x5e, 0x3a, 0x7c, 0xa1, 0x9d, 0xa0, 0xf4, 0xcc, 0xe1, 0x6b, 0xf4, 0xcf, 0x68, 0xbd, - 0x74, 0xf8, 0x62, 0xd7, 0x83, 0x06, 0xe9, 0xc4, 0x09, 0xa5, 0x22, 0xf9, 0xe6, 0xe9, 0xc4, 0x2e, - 0xa5, 0xa1, 0x74, 0x82, 0xcd, 0xf2, 0x5c, 0x5b, 0xa4, 0x13, 0x6c, 0xda, 0x4f, 0xbb, 0xb8, 0x3c, - 0x8a, 0xa1, 0xb4, 0x8b, 0x27, 0xec, 0xef, 0x41, 0x75, 0x6a, 0x98, 0xc6, 0x74, 0x36, 0x15, 0x85, - 0x28, 0xba, 0xd4, 0xac, 0x5a, 0x11, 0x50, 0x5e, 0x87, 0xb2, 0x98, 0xce, 0xca, 0xb1, 0x57, 0xd4, - 0xd6, 0xdc, 0x53, 0x9b, 0x3a, 0xa7, 0xd6, 0x84, 0x27, 0x2f, 0x59, 0x55, 0x16, 0x13, 0x03, 0x0f, - 0x1e, 0x4b, 0x71, 0xca, 0xf1, 0x14, 0x27, 0x92, 0x1e, 0x55, 0x62, 0xe9, 0xd1, 0xb7, 0x61, 0x13, - 0x1d, 0x54, 0xcc, 0xb1, 0x69, 0x13, 0x63, 0x6a, 0xb8, 0xc2, 0xbd, 0xdd, 0x62, 0x18, 0x11, 0x57, - 0xe8, 0x74, 0xd8, 0x34, 0x69, 0xc2, 0x9d, 0x64, 0x37, 0xee, 0xd1, 0x73, 0x87, 0xb7, 0xe9, 0x24, - 0xf8, 0x68, 0xb1, 0x04, 0xba, 0xca, 0x88, 0x54, 0xd0, 0x61, 0x0a, 0xaf, 0x47, 0xa2, 0xa2, 0x61, - 0xfe, 0xb2, 0xf1, 0xcf, 0x39, 0xa8, 0xf9, 0x8a, 0x2b, 0x6a, 0x94, 0xdd, 0x79, 0xf3, 0xe1, 0xb6, - 0x9c, 0x68, 0x3e, 0xa1, 0xd4, 0x24, 0x66, 0x48, 0x9f, 0x45, 0xf3, 0x93, 0xbb, 0x71, 0x6a, 0xbe, - 0xdd, 0x0e, 0xc3, 0x8d, 0xa4, 0x28, 0x0f, 0xa1, 0x18, 0xf4, 0x4d, 0xb8, 0xe1, 0xd6, 0x62, 0xb9, - 0x4d, 0x10, 0xd5, 0xfd, 0x66, 0x4a, 0x52, 0x62, 0x93, 0x49, 0x4e, 0x6c, 0x54, 0x20, 0x5c, 0x86, - 0x36, 0x1d, 0x52, 0xe3, 0x15, 0xbd, 0x46, 0xc6, 0x82, 0xf4, 0x2a, 0x27, 0x47, 0x9f, 0x13, 0x4d, - 0x43, 0x72, 0x57, 0x48, 0x43, 0xe2, 0xee, 0x2e, 0x7f, 0x5d, 0x77, 0x97, 0x90, 0x7f, 0x14, 0x12, - 0xf3, 0x0f, 0x05, 0xca, 0x8c, 0x48, 0x9f, 0x68, 0x5c, 0x2e, 0x45, 0x94, 0x4b, 0xe3, 0x02, 0xb9, - 0xa8, 0x88, 0xca, 0x25, 0x53, 0xb2, 0x83, 0xc1, 0xdb, 0x4f, 0x63, 0x1a, 0x33, 0x28, 0xfa, 0x5a, - 0x10, 0x8e, 0x8a, 0x15, 0x28, 0xf2, 0x48, 0x78, 0xd0, 0xdd, 0x93, 0x25, 0x0c, 0x73, 0x47, 0xdd, - 0x2e, 0x1b, 0xa4, 0x88, 0x0c, 0xe5, 0xc3, 0xa6, 0x3a, 0x38, 0x68, 0x76, 0x34, 0x11, 0x1f, 0xbd, - 0x48, 0x99, 0x61, 0xff, 0xb5, 0x7b, 0x5d, 0x45, 0xce, 0x46, 0x62, 0x66, 0x2e, 0x1a, 0xdd, 0xf2, - 0x8d, 0x27, 0x50, 0x0a, 0x5d, 0x92, 0xe4, 0x21, 0xdd, 0x55, 0x9e, 0xc9, 0x37, 0x48, 0x0d, 0x4a, - 0xde, 0xd2, 0x0c, 0x80, 0x1b, 0x2b, 0xbf, 0x7d, 0x78, 0xa0, 0x62, 0x40, 0x2e, 0x42, 0x16, 0x83, - 0x2d, 0x8f, 0xc8, 0xde, 0x7a, 0x72, 0x86, 0x95, 0xfa, 0x2b, 0xbe, 0x55, 0x3e, 0x65, 0x21, 0xcd, - 0xb0, 0xcc, 0x58, 0x69, 0x29, 0xc5, 0x4b, 0xcb, 0x70, 0x51, 0x9a, 0x8a, 0x16, 0xa5, 0xac, 0xde, - 0x3d, 0x9d, 0x99, 0x2f, 0x44, 0xd5, 0x29, 0xfa, 0xbb, 0x08, 0xe2, 0x55, 0xe7, 0x2a, 0x64, 0x4d, - 0xcb, 0x1c, 0x52, 0x51, 0xb0, 0xf2, 0x01, 0x2b, 0xf5, 0xe9, 0x17, 0x58, 0xe9, 0xeb, 0xa6, 0x73, - 0x4e, 0x6d, 0x54, 0xec, 0xa2, 0x5a, 0xe6, 0xc0, 0x26, 0xc2, 0x1a, 0xbf, 0x97, 0x86, 0x8d, 0x43, - 0xdb, 0xb2, 0x4e, 0x7a, 0x27, 0x2a, 0x3d, 0x9b, 0x18, 0x43, 0xdd, 0xa5, 0xfe, 0xd9, 0xc9, 0xf7, - 0xa0, 0xf0, 0x52, 0x9c, 0x5f, 0x98, 0x7e, 0xdd, 0x33, 0xc0, 0xf8, 0xfd, 0xc2, 0x95, 0x89, 0x47, - 0x43, 0x7e, 0x13, 0xaa, 0xb1, 0x64, 0x71, 0x99, 0x58, 0x5e, 0x89, 0x24, 0x80, 0x51, 0x8f, 0x9b, - 0x8e, 0x79, 0xdc, 0x04, 0xdd, 0xcf, 0x24, 0xea, 0xfe, 0x36, 0x94, 0x90, 0xcf, 0x11, 0x9e, 0x00, - 0x03, 0x71, 0x8e, 0x90, 0xc7, 0xa1, 0x6a, 0x87, 0x9f, 0x39, 0xb7, 0x4c, 0x7f, 0xcc, 0xab, 0x89, - 0xbc, 0xce, 0x47, 0xac, 0x72, 0xca, 0x27, 0x54, 0x4e, 0x8d, 0xdf, 0x85, 0x75, 0x66, 0x74, 0x73, - 0x3c, 0x75, 0xa2, 0xe9, 0x81, 0x14, 0x4b, 0x0f, 0xf6, 0xbc, 0x66, 0x83, 0xc7, 0x6f, 0xa7, 0x9e, - 0x42, 0x7f, 0xb3, 0x25, 0x84, 0x84, 0x61, 0x6f, 0x7e, 0x55, 0xb5, 0x8a, 0x64, 0xfe, 0xb8, 0xf1, - 0x6f, 0x29, 0xb8, 0x75, 0x01, 0xee, 0xe2, 0x13, 0x44, 0x75, 0x3a, 0x15, 0xd7, 0xe9, 0x2b, 0xb4, - 0x07, 0xdf, 0x83, 0xaa, 0x77, 0x7a, 0x2d, 0x9c, 0x6d, 0x55, 0x3c, 0x28, 0x0f, 0xf0, 0x9f, 0x41, - 0x31, 0xb8, 0x64, 0x16, 0x2f, 0x79, 0xa1, 0x26, 0xaa, 0x01, 0x2a, 0xf3, 0xad, 0x62, 0xb7, 0xe5, - 0x45, 0xe9, 0x9d, 0x13, 0x25, 0x99, 0xec, 0xc8, 0xf2, 0x17, 0x39, 0xb2, 0x37, 0x12, 0x6c, 0xb4, - 0x30, 0xca, 0x46, 0x32, 0x4c, 0x91, 0xe0, 0x5e, 0xc6, 0xd3, 0x45, 0xcd, 0xab, 0xb9, 0x67, 0xa5, - 0x74, 0xc2, 0xb3, 0xd2, 0xff, 0xd3, 0x83, 0xcf, 0x7f, 0xa6, 0x60, 0xe3, 0xc2, 0x7c, 0xfe, 0xb2, - 0xcc, 0x77, 0xee, 0x22, 0xa9, 0x84, 0x8b, 0x7c, 0xc0, 0x32, 0x36, 0x7e, 0x91, 0x33, 0xff, 0xb5, - 0x85, 0x3b, 0xc0, 0x9a, 0x98, 0x38, 0xf4, 0x9e, 0x5a, 0x3e, 0x04, 0x12, 0xc1, 0xe5, 0xde, 0x32, - 0xe3, 0xa5, 0x77, 0x3e, 0x32, 0xf7, 0x99, 0x71, 0x16, 0x5d, 0x2d, 0xea, 0x4b, 0xf3, 0x2c, 0x4a, - 0xea, 0x22, 0xe4, 0x96, 0x58, 0x2c, 0xde, 0x45, 0x88, 0xb0, 0x3c, 0x1f, 0x67, 0xf9, 0x3f, 0x64, - 0xa0, 0xce, 0x58, 0xbe, 0x6f, 0x39, 0x6e, 0xe8, 0x99, 0x87, 0x73, 0x7c, 0x41, 0x53, 0xf9, 0x97, - 0xcc, 0xed, 0xe7, 0xb0, 0x1e, 0x67, 0x92, 0xe6, 0x18, 0x2c, 0x64, 0x2d, 0xc3, 0xf7, 0x9b, 0x51, - 0x56, 0xf5, 0xd9, 0x02, 0xa4, 0x2f, 0xba, 0x12, 0xe1, 0xa5, 0x5d, 0x6b, 0x29, 0x11, 0xc8, 0xd1, - 0x75, 0x07, 0x16, 0x69, 0x7a, 0x29, 0x6b, 0x1e, 0x53, 0xa3, 0x6f, 0x86, 0x8a, 0xd7, 0x24, 0xce, - 0xef, 0xf4, 0xe9, 0x84, 0xc6, 0x1a, 0x6c, 0x71, 0x05, 0x2b, 0x5c, 0x57, 0xc1, 0x22, 0x0a, 0x51, - 0x8c, 0x2b, 0xc4, 0x0e, 0x94, 0x42, 0x9b, 0xb3, 0xdc, 0xa5, 0xd9, 0xe9, 0xf0, 0x46, 0x42, 0xb3, - 0x35, 0x38, 0xf8, 0x2d, 0x45, 0x96, 0x42, 0x2d, 0x82, 0x54, 0xe3, 0x17, 0xa1, 0xee, 0x83, 0xc3, - 0xee, 0x43, 0xbe, 0x15, 0x2f, 0xd5, 0xb7, 0x2f, 0xb9, 0x6d, 0x50, 0xa9, 0x1f, 0x40, 0x65, 0x4c, - 0x4d, 0x6a, 0xeb, 0xee, 0x75, 0x9e, 0x92, 0x3c, 0x52, 0xe1, 0x60, 0x2f, 0x4d, 0xf6, 0xc3, 0x59, - 0xfe, 0x75, 0x8a, 0xf3, 0xbf, 0x4d, 0x41, 0x5d, 0xa5, 0xfa, 0xe8, 0xf5, 0xae, 0x65, 0xfb, 0x51, - 0xe3, 0x8a, 0xde, 0x6a, 0x61, 0x9d, 0x1e, 0x0d, 0x83, 0xe9, 0x84, 0x57, 0x83, 0xf0, 0x7b, 0x45, - 0x66, 0xee, 0xbd, 0x22, 0x6c, 0xb7, 0xd9, 0xa8, 0xdd, 0xbe, 0xb5, 0x00, 0xb6, 0xd0, 0xad, 0xb0, - 0xeb, 0x19, 0x8e, 0xc6, 0xd0, 0x0d, 0xfe, 0x90, 0x5c, 0x50, 0x0b, 0x86, 0xa3, 0xe2, 0xb8, 0xf1, - 0x5f, 0x12, 0xe3, 0x1b, 0xb2, 0x69, 0x3e, 0xad, 0x7d, 0x78, 0xf5, 0x14, 0x31, 0x94, 0x18, 0xc6, - 0xaf, 0x95, 0x7a, 0x2b, 0xd7, 0x4a, 0x2f, 0xbc, 0x56, 0x26, 0x7a, 0xad, 0xa8, 0x48, 0xb3, 0x51, - 0x91, 0x36, 0x7e, 0x3f, 0x05, 0x1b, 0x5e, 0x33, 0x6b, 0xfe, 0xd2, 0x9f, 0x40, 0x4e, 0xe4, 0x8f, - 0x97, 0x5d, 0x59, 0xe0, 0x2d, 0x4a, 0xef, 0xd1, 0x51, 0x38, 0xd6, 0xc4, 0xab, 0x3f, 0xd3, 0xcb, - 0x05, 0x6b, 0xa4, 0x9c, 0xe7, 0x45, 0x66, 0x21, 0x2f, 0xb2, 0x8b, 0x78, 0x91, 0x8b, 0xf3, 0x42, - 0x02, 0xb2, 0x6b, 0xd9, 0x43, 0xca, 0x91, 0xdf, 0x86, 0xc5, 0x6c, 0x40, 0x41, 0x9f, 0xb9, 0xa7, - 0xe1, 0x27, 0x38, 0x36, 0xbe, 0xf4, 0xc1, 0xb8, 0xf1, 0xc7, 0x12, 0xe4, 0x54, 0xea, 0xcc, 0x26, - 0x2e, 0x79, 0x1f, 0x32, 0x43, 0x6b, 0xc4, 0x9f, 0x25, 0xab, 0xfe, 0x6b, 0x89, 0x2f, 0x34, 0x6b, - 0x44, 0x55, 0x44, 0x20, 0x75, 0xc8, 0x4f, 0xa9, 0xe3, 0xe8, 0x63, 0xea, 0xb1, 0x5e, 0x0c, 0xe7, - 0x9f, 0xc2, 0xd3, 0xd7, 0x7d, 0x0a, 0x6f, 0xfc, 0x4b, 0x06, 0xaa, 0x9c, 0x3f, 0xfe, 0x93, 0xce, - 0xc2, 0x34, 0x2f, 0xfa, 0xc6, 0x2c, 0x98, 0x94, 0xbe, 0x57, 0x0c, 0xbd, 0x31, 0x5f, 0xde, 0x03, - 0x7c, 0x08, 0xeb, 0x23, 0xeb, 0xdc, 0x9c, 0x58, 0xfa, 0x48, 0x3c, 0x3f, 0x7b, 0x2f, 0x55, 0xfc, - 0xe1, 0x77, 0xd5, 0x9b, 0xe5, 0x8f, 0xd0, 0xe2, 0x09, 0xed, 0x13, 0x58, 0xe5, 0x6a, 0x10, 0xa3, - 0x11, 0x8f, 0xee, 0xb6, 0x90, 0x72, 0x88, 0x02, 0x45, 0x8d, 0x14, 0x4c, 0x60, 0x39, 0x4f, 0xd4, - 0x0c, 0xc2, 0x44, 0xd6, 0x05, 0x59, 0x4c, 0x07, 0x45, 0xd3, 0x32, 0x5d, 0x8c, 0x2a, 0xa7, 0xf6, - 0xcb, 0xa6, 0xfb, 0x91, 0xf5, 0xc2, 0x9d, 0x8c, 0x5a, 0x80, 0xe9, 0x7f, 0x40, 0xe0, 0x73, 0x20, - 0xec, 0x64, 0x8b, 0x78, 0x46, 0xe2, 0xcd, 0xb5, 0x02, 0x67, 0x8b, 0x89, 0x0b, 0x2e, 0x1e, 0xc6, - 0xe7, 0xbd, 0x0b, 0xb1, 0x6d, 0x08, 0xbb, 0x13, 0xae, 0x2b, 0xf9, 0xcd, 0x4a, 0xcb, 0x94, 0xb0, - 0x7e, 0xf5, 0x79, 0x51, 0x87, 0xa6, 0x9c, 0x54, 0xa5, 0x36, 0x7e, 0x2e, 0xc1, 0x7a, 0x54, 0x9b, - 0xfc, 0xce, 0xfa, 0xaf, 0xce, 0x3d, 0x14, 0xae, 0xf9, 0xaa, 0x1f, 0x21, 0x08, 0x1e, 0x08, 0x3b, - 0xfe, 0x77, 0x27, 0xbc, 0x03, 0xf7, 0x30, 0x99, 0x40, 0xec, 0xb0, 0x13, 0x07, 0xc4, 0x3e, 0x4d, - 0xd9, 0x85, 0xf5, 0x64, 0x0c, 0x52, 0x83, 0xd2, 0xa3, 0xde, 0x60, 0x5f, 0x13, 0x2f, 0x18, 0xd8, - 0xb7, 0x79, 0xd6, 0x3c, 0x18, 0x68, 0x9d, 0x83, 0xfe, 0x80, 0x3f, 0x68, 0xa8, 0xca, 0x63, 0xa5, - 0x35, 0xc0, 0x4c, 0xe4, 0xdf, 0xf1, 0x8e, 0x3c, 0xa3, 0x88, 0x1c, 0xe4, 0x92, 0xa2, 0x73, 0x1b, - 0x4a, 0x42, 0x80, 0x26, 0x33, 0x7f, 0x6e, 0xd2, 0x42, 0x3f, 0xbb, 0xcc, 0xde, 0x93, 0xd4, 0x31, - 0xfd, 0x96, 0xd5, 0x31, 0x93, 0xa8, 0x8e, 0x8d, 0xbf, 0x49, 0xc3, 0x2d, 0x8f, 0x29, 0x6f, 0xf7, - 0x52, 0xdf, 0xf7, 0x32, 0xd2, 0x34, 0x8a, 0xf0, 0x7e, 0xcc, 0xdd, 0xc5, 0x36, 0x13, 0xa2, 0x65, - 0x72, 0xf1, 0xf2, 0xd1, 0x1d, 0x5f, 0x09, 0x78, 0x35, 0xb8, 0x9e, 0xdc, 0xee, 0xf3, 0xc4, 0x1c, - 0x6d, 0xb7, 0x64, 0x63, 0xed, 0x96, 0x26, 0x77, 0xd2, 0xcb, 0xe7, 0x24, 0x05, 0x67, 0x81, 0x2d, - 0xe4, 0x13, 0x6d, 0x41, 0x03, 0x08, 0x6e, 0x43, 0x08, 0x54, 0x5b, 0xbd, 0xee, 0x40, 0x6d, 0xb6, - 0x06, 0x1a, 0x3e, 0x5b, 0xc9, 0x37, 0xc8, 0x1a, 0xac, 0xb4, 0x7b, 0xcf, 0xba, 0x9d, 0x5e, 0xb3, - 0xad, 0x75, 0x7b, 0x03, 0x0d, 0x7b, 0x7e, 0x12, 0x59, 0x81, 0x8a, 0xf7, 0x68, 0xd5, 0xdc, 0x6b, - 0x1e, 0x74, 0xe5, 0x14, 0xb9, 0x09, 0x35, 0x9f, 0x5a, 0xa4, 0xc4, 0xe9, 0xc6, 0x9f, 0xa5, 0x61, - 0xad, 0xa5, 0x9b, 0x43, 0x3a, 0x09, 0xf4, 0xfa, 0x6a, 0x85, 0xfa, 0xa2, 0xe6, 0x47, 0x2c, 0xeb, - 0x4b, 0x5f, 0xf2, 0x95, 0x4a, 0x66, 0xd1, 0x57, 0x2a, 0xb1, 0xa4, 0xb0, 0x09, 0x39, 0x9b, 0xea, - 0x8e, 0x65, 0x22, 0xeb, 0x03, 0x65, 0x48, 0xbc, 0x84, 0x80, 0xaa, 0x48, 0xa0, 0x0a, 0xc2, 0xa8, - 0x00, 0xf3, 0xd7, 0x12, 0x60, 0x24, 0x50, 0x17, 0xe2, 0x81, 0x5a, 0x85, 0x72, 0x78, 0x63, 0x22, - 0x43, 0x79, 0xbf, 0xd7, 0x67, 0x32, 0x43, 0x89, 0xc8, 0x37, 0x98, 0x78, 0x7c, 0xa9, 0xed, 0x36, - 0x0f, 0x3a, 0xb2, 0xc4, 0x84, 0xab, 0x2a, 0xdd, 0x81, 0xa2, 0xfa, 0x68, 0xd8, 0x66, 0xed, 0x0d, - 0xf6, 0x15, 0x55, 0x4e, 0x37, 0xfe, 0x44, 0x82, 0x9b, 0x7e, 0x8a, 0xf5, 0xd8, 0x3a, 0x0e, 0xd5, - 0xbd, 0xcc, 0x6a, 0xc2, 0x75, 0x2f, 0x1b, 0x27, 0x75, 0x42, 0x52, 0x6f, 0xa5, 0x13, 0x12, 0x4f, - 0x34, 0x1b, 0xff, 0x9d, 0x82, 0xd5, 0xe8, 0xc9, 0x84, 0xb7, 0x5e, 0x70, 0xb4, 0x3b, 0x00, 0x86, - 0xe3, 0xcc, 0xa2, 0x8d, 0x1e, 0x0e, 0x61, 0xd3, 0x6b, 0x90, 0xfb, 0xdc, 0x3a, 0x0e, 0x54, 0x27, - 0xfb, 0xb9, 0x75, 0x7c, 0x80, 0xcd, 0xe0, 0x33, 0x7d, 0xf8, 0x82, 0x95, 0xdc, 0x33, 0x7b, 0xe2, - 0x15, 0x13, 0x02, 0x74, 0x64, 0x4f, 0xc8, 0x67, 0x70, 0xcb, 0x43, 0xf0, 0xfb, 0x60, 0x91, 0x4f, - 0x12, 0xd7, 0xc4, 0xb4, 0xdf, 0xe3, 0xe3, 0x2d, 0x36, 0xa6, 0x11, 0xd4, 0x1c, 0x5d, 0xc7, 0xa4, - 0xa9, 0x39, 0xf2, 0x3e, 0x10, 0x60, 0x47, 0x3e, 0x31, 0x4c, 0xc3, 0x39, 0xd5, 0x46, 0x54, 0x1f, - 0x4d, 0x0c, 0x73, 0x39, 0xf5, 0x5a, 0xf9, 0xdc, 0x3a, 0xde, 0x45, 0xfa, 0xb6, 0x20, 0xbf, 0x44, - 0xcf, 0x7e, 0x26, 0x01, 0x89, 0x71, 0x9e, 0x25, 0x87, 0x0b, 0xf8, 0x1e, 0x30, 0x36, 0x15, 0x66, - 0xec, 0xa7, 0xcc, 0xa8, 0x18, 0xad, 0xa8, 0x3e, 0x6f, 0x27, 0x36, 0x51, 0xf9, 0xf2, 0xaa, 0x40, - 0x25, 0x0a, 0x94, 0x9c, 0xd9, 0xf1, 0xd4, 0xb8, 0x46, 0x9f, 0x0d, 0x38, 0xe1, 0x15, 0xda, 0x6c, - 0x7f, 0x2f, 0xc1, 0x6a, 0xd2, 0x29, 0xae, 0xf2, 0x11, 0xe1, 0x75, 0xea, 0xd5, 0xe4, 0xe7, 0x84, - 0x75, 0x9f, 0x3f, 0xdc, 0x1b, 0x79, 0x2c, 0x40, 0x35, 0xc6, 0xeb, 0x5b, 0x33, 0x17, 0x15, 0xa7, - 0xc0, 0xd4, 0x78, 0xc0, 0x01, 0x8d, 0xbf, 0x96, 0x80, 0xb4, 0x69, 0x8b, 0x32, 0x9f, 0x34, 0x09, - 0xda, 0xca, 0xef, 0x42, 0xea, 0xa5, 0x53, 0x97, 0x22, 0x9f, 0xc1, 0xb6, 0x83, 0xb2, 0x29, 0xf5, - 0x32, 0x54, 0xe2, 0xa7, 0xc2, 0x25, 0x3e, 0x81, 0xcc, 0x6c, 0xe6, 0x1b, 0x05, 0xfe, 0x4f, 0x64, - 0x48, 0x07, 0xb6, 0xc0, 0xfe, 0x25, 0xdf, 0x86, 0x82, 0xaf, 0xcb, 0x97, 0x77, 0x98, 0x32, 0xfc, - 0x4d, 0x5b, 0xa8, 0x71, 0xe3, 0x47, 0x12, 0x40, 0xfb, 0x97, 0xf8, 0x70, 0xb3, 0xa8, 0x30, 0xfd, - 0x60, 0x08, 0xe5, 0x70, 0x89, 0x43, 0x4a, 0x90, 0xef, 0x1f, 0xb5, 0x5a, 0x4a, 0xbf, 0x2f, 0xdf, - 0x20, 0x9b, 0xb0, 0xce, 0x72, 0xaf, 0xe6, 0xe0, 0x48, 0x55, 0xb4, 0xdd, 0x9e, 0xfa, 0xa4, 0x39, - 0xd0, 0x14, 0x55, 0xed, 0xa9, 0xb2, 0x44, 0x36, 0x60, 0xad, 0xd5, 0x7b, 0x72, 0x78, 0x34, 0x50, - 0xb4, 0x66, 0xbb, 0xad, 0x2a, 0xfd, 0xbe, 0x98, 0x4a, 0xb1, 0xbc, 0x0d, 0x5d, 0xac, 0x00, 0xac, - 0x3e, 0xf8, 0x2b, 0x80, 0xf2, 0x1e, 0x46, 0x61, 0x6a, 0xbf, 0x32, 0x86, 0x94, 0x7c, 0x07, 0x6e, - 0xf6, 0x51, 0x5d, 0xa3, 0x1f, 0x37, 0x5c, 0x90, 0x43, 0x6c, 0x56, 0x82, 0xec, 0x84, 0xa9, 0xc8, - 0x77, 0xa1, 0xd2, 0xa7, 0x66, 0xf0, 0xe0, 0x40, 0xee, 0x84, 0xe8, 0xe6, 0xdf, 0x1c, 0xe2, 0xe4, - 0x5d, 0x66, 0xe1, 0xf1, 0x5e, 0x3a, 0xb9, 0xeb, 0xd7, 0xdc, 0x17, 0xb4, 0xd9, 0x37, 0x2f, 0x38, - 0x1d, 0x69, 0xc1, 0xca, 0x5c, 0x1b, 0x88, 0x6c, 0xfb, 0x7b, 0x26, 0x37, 0x88, 0xe2, 0x87, 0xfa, - 0x35, 0x28, 0x85, 0x6a, 0x62, 0xb2, 0xe1, 0xed, 0x35, 0x57, 0x27, 0xc7, 0x09, 0x1f, 0xc3, 0xca, - 0x5c, 0x63, 0x8d, 0x5c, 0xd6, 0x72, 0xdb, 0x5c, 0x8d, 0xf5, 0xc2, 0x78, 0xeb, 0x4e, 0x05, 0x59, - 0xa5, 0xae, 0x6d, 0xd0, 0x57, 0xd4, 0xeb, 0xbe, 0x93, 0x4b, 0x3f, 0xb4, 0xd9, 0x7c, 0x27, 0xce, - 0x97, 0xc8, 0x97, 0x3b, 0x03, 0xb6, 0x66, 0xb4, 0xd9, 0x73, 0x39, 0x73, 0x02, 0x84, 0x0b, 0xda, - 0x44, 0x6d, 0xc6, 0xf3, 0x58, 0x3b, 0xc5, 0x3f, 0xea, 0x85, 0x8d, 0x96, 0x38, 0xef, 0x3a, 0xb0, - 0xca, 0xd5, 0x30, 0x56, 0x69, 0x27, 0x57, 0x40, 0x9b, 0x77, 0x16, 0xd6, 0x39, 0xe4, 0x07, 0xb0, - 0x21, 0xce, 0xbb, 0x6b, 0xd9, 0xf1, 0x6c, 0xfd, 0x4e, 0xf4, 0x46, 0xb1, 0xe9, 0xcd, 0xad, 0xc5, - 0xf9, 0x37, 0x69, 0xc1, 0xaa, 0x4a, 0xcf, 0x2c, 0xdb, 0xdd, 0xd5, 0x8d, 0xc9, 0xc0, 0x6a, 0x8b, - 0x3a, 0x94, 0xbc, 0xb3, 0x28, 0x55, 0x8b, 0x5f, 0xf7, 0xa9, 0x5f, 0x20, 0x85, 0x79, 0xfe, 0xd8, - 0x3a, 0x26, 0x9b, 0xf1, 0x86, 0x53, 0x90, 0x0d, 0x6d, 0xde, 0x4e, 0x9c, 0x13, 0x77, 0x6e, 0x43, - 0x9d, 0x73, 0x30, 0x29, 0x66, 0x26, 0x13, 0xce, 0x26, 0x73, 0x07, 0xfb, 0x1e, 0xac, 0xe2, 0x2f, - 0x9d, 0xf6, 0xa8, 0x1b, 0xf9, 0xc1, 0x8f, 0xe7, 0xc9, 0x83, 0x9f, 0x41, 0x6d, 0x7a, 0x7d, 0x99, - 0x08, 0xde, 0x23, 0xd8, 0x88, 0xd0, 0x33, 0x95, 0x77, 0x54, 0xdd, 0x7c, 0xd1, 0xa5, 0xe7, 0x49, - 0x8b, 0x90, 0xf0, 0x0f, 0x25, 0xc4, 0x1a, 0x6d, 0xb8, 0x9d, 0xbc, 0x06, 0xfe, 0x6c, 0xe2, 0xaa, - 0xab, 0xec, 0xc2, 0xad, 0xc8, 0x2a, 0xc1, 0x6f, 0x2e, 0x92, 0x56, 0xf0, 0xfa, 0x7c, 0x73, 0xbf, - 0xcc, 0x78, 0xf4, 0x1b, 0xbf, 0xf8, 0xf9, 0x96, 0xf4, 0xe5, 0x57, 0x5b, 0xd2, 0x8f, 0xbf, 0xda, - 0x92, 0x7e, 0xf6, 0xd5, 0x96, 0xf4, 0xa7, 0x6f, 0xb6, 0xa4, 0x7f, 0x7a, 0xb3, 0x25, 0x7d, 0xf9, - 0x66, 0x4b, 0x82, 0x8a, 0x61, 0xed, 0x1c, 0xbb, 0x27, 0x0e, 0x27, 0x7f, 0x04, 0xe8, 0x5b, 0x0f, - 0x59, 0x20, 0x3a, 0x94, 0x7e, 0xc0, 0x7f, 0x91, 0x76, 0x9c, 0xc3, 0xc0, 0xf4, 0xe9, 0xff, 0x06, - 0x00, 0x00, 0xff, 0xff, 0x8b, 0x86, 0x79, 0x48, 0xbb, 0x36, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// GuardServiceClient is the client API for GuardService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type GuardServiceClient interface { - SubmitFileStoreMeta(ctx context.Context, in *FileStoreStatus, opts ...grpc.CallOption) (*Result, error) - SendQuestions(ctx context.Context, in *FileChallengeQuestions, opts ...grpc.CallOption) (*Result, error) - CheckFileStoreMeta(ctx context.Context, in *CheckFileStoreMetaRequest, opts ...grpc.CallOption) (*FileStoreStatus, error) - ReadyForChallenge(ctx context.Context, in *ReadyForChallengeRequest, opts ...grpc.CallOption) (*Result, error) - ForceRepair(ctx context.Context, in *ForceRepairRequest, opts ...grpc.CallOption) (*Result, error) - ListHostContracts(ctx context.Context, in *ListHostContractsRequest, opts ...grpc.CallOption) (*ContractsList, error) - RetrieveFileInfo(ctx context.Context, in *ListRenterFileInfoRequest, opts ...grpc.CallOption) (*FileStoreListResponse, error) - RequestChallenge(ctx context.Context, in *ReadyForChallengeRequest, opts ...grpc.CallOption) (*RequestChallengeQuestion, error) - ResponseChallenge(ctx context.Context, in *ResponseChallengeQuestion, opts ...grpc.CallOption) (*Result, error) - SubmitRepairContract(ctx context.Context, in *RepairContract, opts ...grpc.CallOption) (*RepairContractResponse, error) - RequestForRepairContracts(ctx context.Context, in *RequestRepairContracts, opts ...grpc.CallOption) (*ResponseRepairContracts, error) - ReportFailToDownload(ctx context.Context, in *CancelContractRequest, opts ...grpc.CallOption) (*Result, error) - //used for decentral challenge - RequestForChallengeJob(ctx context.Context, in *ChallengeJobRequest, opts ...grpc.CallOption) (*ChallengeJobResponse, error) - SubmitChallengeJobResult(ctx context.Context, in *ChallengeJobResult, opts ...grpc.CallOption) (*Result, error) - //used by btfs scan - AdminGetDailySummary(ctx context.Context, in *AdminQuery, opts ...grpc.CallOption) (*DailySummary, error) - AdminGetDailyHostsRankNew(ctx context.Context, in *AdminQuery, opts ...grpc.CallOption) (*HostSummary, error) - AdminGetDailyHostsRankTotal(ctx context.Context, in *AdminQuery, opts ...grpc.CallOption) (*HostSummary, error) - AdminGetDailyTotalState(ctx context.Context, in *AdminQuery, opts ...grpc.CallOption) (*TotalStateSummary, error) -} - -type guardServiceClient struct { - cc *grpc.ClientConn -} - -func NewGuardServiceClient(cc *grpc.ClientConn) GuardServiceClient { - return &guardServiceClient{cc} -} - -func (c *guardServiceClient) SubmitFileStoreMeta(ctx context.Context, in *FileStoreStatus, opts ...grpc.CallOption) (*Result, error) { - out := new(Result) - err := c.cc.Invoke(ctx, "/guard.GuardService/SubmitFileStoreMeta", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *guardServiceClient) SendQuestions(ctx context.Context, in *FileChallengeQuestions, opts ...grpc.CallOption) (*Result, error) { - out := new(Result) - err := c.cc.Invoke(ctx, "/guard.GuardService/SendQuestions", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *guardServiceClient) CheckFileStoreMeta(ctx context.Context, in *CheckFileStoreMetaRequest, opts ...grpc.CallOption) (*FileStoreStatus, error) { - out := new(FileStoreStatus) - err := c.cc.Invoke(ctx, "/guard.GuardService/CheckFileStoreMeta", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *guardServiceClient) ReadyForChallenge(ctx context.Context, in *ReadyForChallengeRequest, opts ...grpc.CallOption) (*Result, error) { - out := new(Result) - err := c.cc.Invoke(ctx, "/guard.GuardService/ReadyForChallenge", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *guardServiceClient) ForceRepair(ctx context.Context, in *ForceRepairRequest, opts ...grpc.CallOption) (*Result, error) { - out := new(Result) - err := c.cc.Invoke(ctx, "/guard.GuardService/ForceRepair", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *guardServiceClient) ListHostContracts(ctx context.Context, in *ListHostContractsRequest, opts ...grpc.CallOption) (*ContractsList, error) { - out := new(ContractsList) - err := c.cc.Invoke(ctx, "/guard.GuardService/ListHostContracts", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *guardServiceClient) RetrieveFileInfo(ctx context.Context, in *ListRenterFileInfoRequest, opts ...grpc.CallOption) (*FileStoreListResponse, error) { - out := new(FileStoreListResponse) - err := c.cc.Invoke(ctx, "/guard.GuardService/RetrieveFileInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *guardServiceClient) RequestChallenge(ctx context.Context, in *ReadyForChallengeRequest, opts ...grpc.CallOption) (*RequestChallengeQuestion, error) { - out := new(RequestChallengeQuestion) - err := c.cc.Invoke(ctx, "/guard.GuardService/RequestChallenge", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *guardServiceClient) ResponseChallenge(ctx context.Context, in *ResponseChallengeQuestion, opts ...grpc.CallOption) (*Result, error) { - out := new(Result) - err := c.cc.Invoke(ctx, "/guard.GuardService/ResponseChallenge", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *guardServiceClient) SubmitRepairContract(ctx context.Context, in *RepairContract, opts ...grpc.CallOption) (*RepairContractResponse, error) { - out := new(RepairContractResponse) - err := c.cc.Invoke(ctx, "/guard.GuardService/SubmitRepairContract", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *guardServiceClient) RequestForRepairContracts(ctx context.Context, in *RequestRepairContracts, opts ...grpc.CallOption) (*ResponseRepairContracts, error) { - out := new(ResponseRepairContracts) - err := c.cc.Invoke(ctx, "/guard.GuardService/RequestForRepairContracts", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *guardServiceClient) ReportFailToDownload(ctx context.Context, in *CancelContractRequest, opts ...grpc.CallOption) (*Result, error) { - out := new(Result) - err := c.cc.Invoke(ctx, "/guard.GuardService/ReportFailToDownload", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *guardServiceClient) RequestForChallengeJob(ctx context.Context, in *ChallengeJobRequest, opts ...grpc.CallOption) (*ChallengeJobResponse, error) { - out := new(ChallengeJobResponse) - err := c.cc.Invoke(ctx, "/guard.GuardService/RequestForChallengeJob", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *guardServiceClient) SubmitChallengeJobResult(ctx context.Context, in *ChallengeJobResult, opts ...grpc.CallOption) (*Result, error) { - out := new(Result) - err := c.cc.Invoke(ctx, "/guard.GuardService/SubmitChallengeJobResult", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *guardServiceClient) AdminGetDailySummary(ctx context.Context, in *AdminQuery, opts ...grpc.CallOption) (*DailySummary, error) { - out := new(DailySummary) - err := c.cc.Invoke(ctx, "/guard.GuardService/AdminGetDailySummary", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *guardServiceClient) AdminGetDailyHostsRankNew(ctx context.Context, in *AdminQuery, opts ...grpc.CallOption) (*HostSummary, error) { - out := new(HostSummary) - err := c.cc.Invoke(ctx, "/guard.GuardService/AdminGetDailyHostsRankNew", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *guardServiceClient) AdminGetDailyHostsRankTotal(ctx context.Context, in *AdminQuery, opts ...grpc.CallOption) (*HostSummary, error) { - out := new(HostSummary) - err := c.cc.Invoke(ctx, "/guard.GuardService/AdminGetDailyHostsRankTotal", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *guardServiceClient) AdminGetDailyTotalState(ctx context.Context, in *AdminQuery, opts ...grpc.CallOption) (*TotalStateSummary, error) { - out := new(TotalStateSummary) - err := c.cc.Invoke(ctx, "/guard.GuardService/AdminGetDailyTotalState", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// GuardServiceServer is the server API for GuardService service. -type GuardServiceServer interface { - SubmitFileStoreMeta(context.Context, *FileStoreStatus) (*Result, error) - SendQuestions(context.Context, *FileChallengeQuestions) (*Result, error) - CheckFileStoreMeta(context.Context, *CheckFileStoreMetaRequest) (*FileStoreStatus, error) - ReadyForChallenge(context.Context, *ReadyForChallengeRequest) (*Result, error) - ForceRepair(context.Context, *ForceRepairRequest) (*Result, error) - ListHostContracts(context.Context, *ListHostContractsRequest) (*ContractsList, error) - RetrieveFileInfo(context.Context, *ListRenterFileInfoRequest) (*FileStoreListResponse, error) - RequestChallenge(context.Context, *ReadyForChallengeRequest) (*RequestChallengeQuestion, error) - ResponseChallenge(context.Context, *ResponseChallengeQuestion) (*Result, error) - SubmitRepairContract(context.Context, *RepairContract) (*RepairContractResponse, error) - RequestForRepairContracts(context.Context, *RequestRepairContracts) (*ResponseRepairContracts, error) - ReportFailToDownload(context.Context, *CancelContractRequest) (*Result, error) - //used for decentral challenge - RequestForChallengeJob(context.Context, *ChallengeJobRequest) (*ChallengeJobResponse, error) - SubmitChallengeJobResult(context.Context, *ChallengeJobResult) (*Result, error) - //used by btfs scan - AdminGetDailySummary(context.Context, *AdminQuery) (*DailySummary, error) - AdminGetDailyHostsRankNew(context.Context, *AdminQuery) (*HostSummary, error) - AdminGetDailyHostsRankTotal(context.Context, *AdminQuery) (*HostSummary, error) - AdminGetDailyTotalState(context.Context, *AdminQuery) (*TotalStateSummary, error) -} - -// UnimplementedGuardServiceServer can be embedded to have forward compatible implementations. -type UnimplementedGuardServiceServer struct { -} - -func (*UnimplementedGuardServiceServer) SubmitFileStoreMeta(ctx context.Context, req *FileStoreStatus) (*Result, error) { - return nil, status.Errorf(codes.Unimplemented, "method SubmitFileStoreMeta not implemented") -} -func (*UnimplementedGuardServiceServer) SendQuestions(ctx context.Context, req *FileChallengeQuestions) (*Result, error) { - return nil, status.Errorf(codes.Unimplemented, "method SendQuestions not implemented") -} -func (*UnimplementedGuardServiceServer) CheckFileStoreMeta(ctx context.Context, req *CheckFileStoreMetaRequest) (*FileStoreStatus, error) { - return nil, status.Errorf(codes.Unimplemented, "method CheckFileStoreMeta not implemented") -} -func (*UnimplementedGuardServiceServer) ReadyForChallenge(ctx context.Context, req *ReadyForChallengeRequest) (*Result, error) { - return nil, status.Errorf(codes.Unimplemented, "method ReadyForChallenge not implemented") -} -func (*UnimplementedGuardServiceServer) ForceRepair(ctx context.Context, req *ForceRepairRequest) (*Result, error) { - return nil, status.Errorf(codes.Unimplemented, "method ForceRepair not implemented") -} -func (*UnimplementedGuardServiceServer) ListHostContracts(ctx context.Context, req *ListHostContractsRequest) (*ContractsList, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListHostContracts not implemented") -} -func (*UnimplementedGuardServiceServer) RetrieveFileInfo(ctx context.Context, req *ListRenterFileInfoRequest) (*FileStoreListResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RetrieveFileInfo not implemented") -} -func (*UnimplementedGuardServiceServer) RequestChallenge(ctx context.Context, req *ReadyForChallengeRequest) (*RequestChallengeQuestion, error) { - return nil, status.Errorf(codes.Unimplemented, "method RequestChallenge not implemented") -} -func (*UnimplementedGuardServiceServer) ResponseChallenge(ctx context.Context, req *ResponseChallengeQuestion) (*Result, error) { - return nil, status.Errorf(codes.Unimplemented, "method ResponseChallenge not implemented") -} -func (*UnimplementedGuardServiceServer) SubmitRepairContract(ctx context.Context, req *RepairContract) (*RepairContractResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SubmitRepairContract not implemented") -} -func (*UnimplementedGuardServiceServer) RequestForRepairContracts(ctx context.Context, req *RequestRepairContracts) (*ResponseRepairContracts, error) { - return nil, status.Errorf(codes.Unimplemented, "method RequestForRepairContracts not implemented") -} -func (*UnimplementedGuardServiceServer) ReportFailToDownload(ctx context.Context, req *CancelContractRequest) (*Result, error) { - return nil, status.Errorf(codes.Unimplemented, "method ReportFailToDownload not implemented") -} -func (*UnimplementedGuardServiceServer) RequestForChallengeJob(ctx context.Context, req *ChallengeJobRequest) (*ChallengeJobResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RequestForChallengeJob not implemented") -} -func (*UnimplementedGuardServiceServer) SubmitChallengeJobResult(ctx context.Context, req *ChallengeJobResult) (*Result, error) { - return nil, status.Errorf(codes.Unimplemented, "method SubmitChallengeJobResult not implemented") -} -func (*UnimplementedGuardServiceServer) AdminGetDailySummary(ctx context.Context, req *AdminQuery) (*DailySummary, error) { - return nil, status.Errorf(codes.Unimplemented, "method AdminGetDailySummary not implemented") -} -func (*UnimplementedGuardServiceServer) AdminGetDailyHostsRankNew(ctx context.Context, req *AdminQuery) (*HostSummary, error) { - return nil, status.Errorf(codes.Unimplemented, "method AdminGetDailyHostsRankNew not implemented") -} -func (*UnimplementedGuardServiceServer) AdminGetDailyHostsRankTotal(ctx context.Context, req *AdminQuery) (*HostSummary, error) { - return nil, status.Errorf(codes.Unimplemented, "method AdminGetDailyHostsRankTotal not implemented") -} -func (*UnimplementedGuardServiceServer) AdminGetDailyTotalState(ctx context.Context, req *AdminQuery) (*TotalStateSummary, error) { - return nil, status.Errorf(codes.Unimplemented, "method AdminGetDailyTotalState not implemented") -} - -func RegisterGuardServiceServer(s *grpc.Server, srv GuardServiceServer) { - s.RegisterService(&_GuardService_serviceDesc, srv) -} - -func _GuardService_SubmitFileStoreMeta_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FileStoreStatus) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GuardServiceServer).SubmitFileStoreMeta(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/guard.GuardService/SubmitFileStoreMeta", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GuardServiceServer).SubmitFileStoreMeta(ctx, req.(*FileStoreStatus)) - } - return interceptor(ctx, in, info, handler) -} - -func _GuardService_SendQuestions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FileChallengeQuestions) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GuardServiceServer).SendQuestions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/guard.GuardService/SendQuestions", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GuardServiceServer).SendQuestions(ctx, req.(*FileChallengeQuestions)) - } - return interceptor(ctx, in, info, handler) -} - -func _GuardService_CheckFileStoreMeta_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CheckFileStoreMetaRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GuardServiceServer).CheckFileStoreMeta(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/guard.GuardService/CheckFileStoreMeta", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GuardServiceServer).CheckFileStoreMeta(ctx, req.(*CheckFileStoreMetaRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _GuardService_ReadyForChallenge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ReadyForChallengeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GuardServiceServer).ReadyForChallenge(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/guard.GuardService/ReadyForChallenge", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GuardServiceServer).ReadyForChallenge(ctx, req.(*ReadyForChallengeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _GuardService_ForceRepair_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ForceRepairRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GuardServiceServer).ForceRepair(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/guard.GuardService/ForceRepair", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GuardServiceServer).ForceRepair(ctx, req.(*ForceRepairRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _GuardService_ListHostContracts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListHostContractsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GuardServiceServer).ListHostContracts(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/guard.GuardService/ListHostContracts", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GuardServiceServer).ListHostContracts(ctx, req.(*ListHostContractsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _GuardService_RetrieveFileInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListRenterFileInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GuardServiceServer).RetrieveFileInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/guard.GuardService/RetrieveFileInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GuardServiceServer).RetrieveFileInfo(ctx, req.(*ListRenterFileInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _GuardService_RequestChallenge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ReadyForChallengeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GuardServiceServer).RequestChallenge(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/guard.GuardService/RequestChallenge", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GuardServiceServer).RequestChallenge(ctx, req.(*ReadyForChallengeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _GuardService_ResponseChallenge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ResponseChallengeQuestion) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GuardServiceServer).ResponseChallenge(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/guard.GuardService/ResponseChallenge", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GuardServiceServer).ResponseChallenge(ctx, req.(*ResponseChallengeQuestion)) - } - return interceptor(ctx, in, info, handler) -} - -func _GuardService_SubmitRepairContract_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RepairContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GuardServiceServer).SubmitRepairContract(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/guard.GuardService/SubmitRepairContract", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GuardServiceServer).SubmitRepairContract(ctx, req.(*RepairContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _GuardService_RequestForRepairContracts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestRepairContracts) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GuardServiceServer).RequestForRepairContracts(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/guard.GuardService/RequestForRepairContracts", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GuardServiceServer).RequestForRepairContracts(ctx, req.(*RequestRepairContracts)) - } - return interceptor(ctx, in, info, handler) -} - -func _GuardService_ReportFailToDownload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CancelContractRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GuardServiceServer).ReportFailToDownload(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/guard.GuardService/ReportFailToDownload", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GuardServiceServer).ReportFailToDownload(ctx, req.(*CancelContractRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _GuardService_RequestForChallengeJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ChallengeJobRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GuardServiceServer).RequestForChallengeJob(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/guard.GuardService/RequestForChallengeJob", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GuardServiceServer).RequestForChallengeJob(ctx, req.(*ChallengeJobRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _GuardService_SubmitChallengeJobResult_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ChallengeJobResult) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GuardServiceServer).SubmitChallengeJobResult(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/guard.GuardService/SubmitChallengeJobResult", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GuardServiceServer).SubmitChallengeJobResult(ctx, req.(*ChallengeJobResult)) - } - return interceptor(ctx, in, info, handler) -} - -func _GuardService_AdminGetDailySummary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AdminQuery) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GuardServiceServer).AdminGetDailySummary(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/guard.GuardService/AdminGetDailySummary", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GuardServiceServer).AdminGetDailySummary(ctx, req.(*AdminQuery)) - } - return interceptor(ctx, in, info, handler) -} - -func _GuardService_AdminGetDailyHostsRankNew_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AdminQuery) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GuardServiceServer).AdminGetDailyHostsRankNew(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/guard.GuardService/AdminGetDailyHostsRankNew", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GuardServiceServer).AdminGetDailyHostsRankNew(ctx, req.(*AdminQuery)) - } - return interceptor(ctx, in, info, handler) -} - -func _GuardService_AdminGetDailyHostsRankTotal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AdminQuery) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GuardServiceServer).AdminGetDailyHostsRankTotal(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/guard.GuardService/AdminGetDailyHostsRankTotal", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GuardServiceServer).AdminGetDailyHostsRankTotal(ctx, req.(*AdminQuery)) - } - return interceptor(ctx, in, info, handler) -} - -func _GuardService_AdminGetDailyTotalState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AdminQuery) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GuardServiceServer).AdminGetDailyTotalState(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/guard.GuardService/AdminGetDailyTotalState", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GuardServiceServer).AdminGetDailyTotalState(ctx, req.(*AdminQuery)) - } - return interceptor(ctx, in, info, handler) -} - -var _GuardService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "guard.GuardService", - HandlerType: (*GuardServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "SubmitFileStoreMeta", - Handler: _GuardService_SubmitFileStoreMeta_Handler, - }, - { - MethodName: "SendQuestions", - Handler: _GuardService_SendQuestions_Handler, - }, - { - MethodName: "CheckFileStoreMeta", - Handler: _GuardService_CheckFileStoreMeta_Handler, - }, - { - MethodName: "ReadyForChallenge", - Handler: _GuardService_ReadyForChallenge_Handler, - }, - { - MethodName: "ForceRepair", - Handler: _GuardService_ForceRepair_Handler, - }, - { - MethodName: "ListHostContracts", - Handler: _GuardService_ListHostContracts_Handler, - }, - { - MethodName: "RetrieveFileInfo", - Handler: _GuardService_RetrieveFileInfo_Handler, - }, - { - MethodName: "RequestChallenge", - Handler: _GuardService_RequestChallenge_Handler, - }, - { - MethodName: "ResponseChallenge", - Handler: _GuardService_ResponseChallenge_Handler, - }, - { - MethodName: "SubmitRepairContract", - Handler: _GuardService_SubmitRepairContract_Handler, - }, - { - MethodName: "RequestForRepairContracts", - Handler: _GuardService_RequestForRepairContracts_Handler, - }, - { - MethodName: "ReportFailToDownload", - Handler: _GuardService_ReportFailToDownload_Handler, - }, - { - MethodName: "RequestForChallengeJob", - Handler: _GuardService_RequestForChallengeJob_Handler, - }, - { - MethodName: "SubmitChallengeJobResult", - Handler: _GuardService_SubmitChallengeJobResult_Handler, - }, - { - MethodName: "AdminGetDailySummary", - Handler: _GuardService_AdminGetDailySummary_Handler, - }, - { - MethodName: "AdminGetDailyHostsRankNew", - Handler: _GuardService_AdminGetDailyHostsRankNew_Handler, - }, - { - MethodName: "AdminGetDailyHostsRankTotal", - Handler: _GuardService_AdminGetDailyHostsRankTotal_Handler, - }, - { - MethodName: "AdminGetDailyTotalState", - Handler: _GuardService_AdminGetDailyTotalState_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "protos/guard/guard.proto", -} - -func (m *AdminQuery) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AdminQuery) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AdminQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintGuard(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x2a - } - n1, err1 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.RequestTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.RequestTime):]) - if err1 != nil { - return 0, err1 - } - i -= n1 - i = encodeVarintGuard(dAtA, i, uint64(n1)) - i-- - dAtA[i] = 0x22 - if m.QueryCount != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.QueryCount)) - i-- - dAtA[i] = 0x18 - } - n2, err2 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.QueryDate, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.QueryDate):]) - if err2 != nil { - return 0, err2 - } - i -= n2 - i = encodeVarintGuard(dAtA, i, uint64(n2)) - i-- - dAtA[i] = 0x12 - if len(m.RequesterPid) > 0 { - i -= len(m.RequesterPid) - copy(dAtA[i:], m.RequesterPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.RequesterPid))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DailySummary) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DailySummary) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DailySummary) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.NewShardsSize != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.NewShardsSize)) - i-- - dAtA[i] = 0x58 - } - if m.NewFiles != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.NewFiles)) - i-- - dAtA[i] = 0x50 - } - if m.NewContractsAveragePrice != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.NewContractsAveragePrice)) - i-- - dAtA[i] = 0x48 - } - if m.NewContractsRenter != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.NewContractsRenter)) - i-- - dAtA[i] = 0x40 - } - if m.NewContractsHost != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.NewContractsHost)) - i-- - dAtA[i] = 0x38 - } - if m.NewContracts != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.NewContracts)) - i-- - dAtA[i] = 0x30 - } - if m.WorkingStorageSize != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.WorkingStorageSize)) - i-- - dAtA[i] = 0x28 - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintGuard(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x22 - } - if len(m.PreparerPid) > 0 { - i -= len(m.PreparerPid) - copy(dAtA[i:], m.PreparerPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.PreparerPid))) - i-- - dAtA[i] = 0x1a - } - n3, err3 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.ResponseTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime):]) - if err3 != nil { - return 0, err3 - } - i -= n3 - i = encodeVarintGuard(dAtA, i, uint64(n3)) - i-- - dAtA[i] = 0x12 - n4, err4 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.QueryDate, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.QueryDate):]) - if err4 != nil { - return 0, err4 - } - i -= n4 - i = encodeVarintGuard(dAtA, i, uint64(n4)) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *HostSummary) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HostSummary) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HostSummary) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Status) > 0 { - for iNdEx := len(m.Status) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Status[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGuard(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - if m.RecordCount != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.RecordCount)) - i-- - dAtA[i] = 0x28 - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintGuard(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x22 - } - if len(m.PreparerPid) > 0 { - i -= len(m.PreparerPid) - copy(dAtA[i:], m.PreparerPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.PreparerPid))) - i-- - dAtA[i] = 0x1a - } - n5, err5 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.ResponseTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime):]) - if err5 != nil { - return 0, err5 - } - i -= n5 - i = encodeVarintGuard(dAtA, i, uint64(n5)) - i-- - dAtA[i] = 0x12 - n6, err6 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.QueryDate, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.QueryDate):]) - if err6 != nil { - return 0, err6 - } - i -= n6 - i = encodeVarintGuard(dAtA, i, uint64(n6)) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *TotalStateSummary) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TotalStateSummary) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TotalStateSummary) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.TotalHostReward != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.TotalHostReward)) - i-- - dAtA[i] = 0x48 - } - if m.LostShardSize != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.LostShardSize)) - i-- - dAtA[i] = 0x40 - } - if m.InvalidContractCount != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.InvalidContractCount)) - i-- - dAtA[i] = 0x38 - } - if m.ExistedShardSize != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.ExistedShardSize)) - i-- - dAtA[i] = 0x30 - } - if m.ValidContractCount != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.ValidContractCount)) - i-- - dAtA[i] = 0x28 - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintGuard(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x22 - } - if len(m.PreparerPid) > 0 { - i -= len(m.PreparerPid) - copy(dAtA[i:], m.PreparerPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.PreparerPid))) - i-- - dAtA[i] = 0x1a - } - n7, err7 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.ResponseTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime):]) - if err7 != nil { - return 0, err7 - } - i -= n7 - i = encodeVarintGuard(dAtA, i, uint64(n7)) - i-- - dAtA[i] = 0x12 - n8, err8 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.QueryDate, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.QueryDate):]) - if err8 != nil { - return 0, err8 - } - i -= n8 - i = encodeVarintGuard(dAtA, i, uint64(n8)) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *HostStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HostStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HostStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.SuspectCheat { - i-- - if m.SuspectCheat { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if m.RewardBtt != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.RewardBtt)) - i-- - dAtA[i] = 0x20 - } - if m.WorkAmount != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.WorkAmount)) - i-- - dAtA[i] = 0x18 - } - if m.FileSize != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.FileSize)) - i-- - dAtA[i] = 0x10 - } - if len(m.HostPid) > 0 { - i -= len(m.HostPid) - copy(dAtA[i:], m.HostPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.HostPid))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Log) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Log) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Log) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Change) > 0 { - i -= len(m.Change) - copy(dAtA[i:], m.Change) - i = encodeVarintGuard(dAtA, i, uint64(len(m.Change))) - i-- - dAtA[i] = 0x1a - } - if len(m.OriginatorPid) > 0 { - i -= len(m.OriginatorPid) - copy(dAtA[i:], m.OriginatorPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.OriginatorPid))) - i-- - dAtA[i] = 0x12 - } - n9, err9 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.ChangeTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.ChangeTime):]) - if err9 != nil { - return 0, err9 - } - i -= n9 - i = encodeVarintGuard(dAtA, i, uint64(n9)) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ContractMeta) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ContractMeta) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ContractMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.ContingentAmount != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.ContingentAmount)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x88 - } - if m.NumPayouts != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.NumPayouts)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x80 - } - if m.PayoutSchedule != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.PayoutSchedule)) - i-- - dAtA[i] = 0x78 - } - if m.CollateralAmount != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.CollateralAmount)) - i-- - dAtA[i] = 0x70 - } - if m.Amount != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.Amount)) - i-- - dAtA[i] = 0x68 - } - if m.Price != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.Price)) - i-- - dAtA[i] = 0x60 - } - if len(m.EscrowPid) > 0 { - i -= len(m.EscrowPid) - copy(dAtA[i:], m.EscrowPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.EscrowPid))) - i-- - dAtA[i] = 0x5a - } - if len(m.GuardPid) > 0 { - i -= len(m.GuardPid) - copy(dAtA[i:], m.GuardPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.GuardPid))) - i-- - dAtA[i] = 0x52 - } - n10, err10 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.RentEnd, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.RentEnd):]) - if err10 != nil { - return 0, err10 - } - i -= n10 - i = encodeVarintGuard(dAtA, i, uint64(n10)) - i-- - dAtA[i] = 0x4a - n11, err11 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.RentStart, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.RentStart):]) - if err11 != nil { - return 0, err11 - } - i -= n11 - i = encodeVarintGuard(dAtA, i, uint64(n11)) - i-- - dAtA[i] = 0x42 - if len(m.FileHash) > 0 { - i -= len(m.FileHash) - copy(dAtA[i:], m.FileHash) - i = encodeVarintGuard(dAtA, i, uint64(len(m.FileHash))) - i-- - dAtA[i] = 0x3a - } - if m.ShardFileSize != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.ShardFileSize)) - i-- - dAtA[i] = 0x30 - } - if m.ShardIndex != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.ShardIndex)) - i-- - dAtA[i] = 0x28 - } - if len(m.ShardHash) > 0 { - i -= len(m.ShardHash) - copy(dAtA[i:], m.ShardHash) - i = encodeVarintGuard(dAtA, i, uint64(len(m.ShardHash))) - i-- - dAtA[i] = 0x22 - } - if len(m.HostPid) > 0 { - i -= len(m.HostPid) - copy(dAtA[i:], m.HostPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.HostPid))) - i-- - dAtA[i] = 0x1a - } - if len(m.RenterPid) > 0 { - i -= len(m.RenterPid) - copy(dAtA[i:], m.RenterPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.RenterPid))) - i-- - dAtA[i] = 0x12 - } - if len(m.ContractId) > 0 { - i -= len(m.ContractId) - copy(dAtA[i:], m.ContractId) - i = encodeVarintGuard(dAtA, i, uint64(len(m.ContractId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Contract) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Contract) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Contract) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - n12, err12 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.FirstChallengeSuccess, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.FirstChallengeSuccess):]) - if err12 != nil { - return 0, err12 - } - i -= n12 - i = encodeVarintGuard(dAtA, i, uint64(n12)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x8a - if m.ChallengeSuccessTimes != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.ChallengeSuccessTimes)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x80 - } - if m.ChallengeWarnTimes != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.ChallengeWarnTimes)) - i-- - dAtA[i] = 0x78 - } - if m.ChallengeTimes != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.ChallengeTimes)) - i-- - dAtA[i] = 0x70 - } - n13, err13 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.LastChallengeTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.LastChallengeTime):]) - if err13 != nil { - return 0, err13 - } - i -= n13 - i = encodeVarintGuard(dAtA, i, uint64(n13)) - i-- - dAtA[i] = 0x6a - n14, err14 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.LastSuccessChallengeTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.LastSuccessChallengeTime):]) - if err14 != nil { - return 0, err14 - } - i -= n14 - i = encodeVarintGuard(dAtA, i, uint64(n14)) - i-- - dAtA[i] = 0x62 - if len(m.PreparerSignature) > 0 { - i -= len(m.PreparerSignature) - copy(dAtA[i:], m.PreparerSignature) - i = encodeVarintGuard(dAtA, i, uint64(len(m.PreparerSignature))) - i-- - dAtA[i] = 0x5a - } - if len(m.PreparerPid) > 0 { - i -= len(m.PreparerPid) - copy(dAtA[i:], m.PreparerPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.PreparerPid))) - i-- - dAtA[i] = 0x52 - } - if len(m.GuardSignature) > 0 { - i -= len(m.GuardSignature) - copy(dAtA[i:], m.GuardSignature) - i = encodeVarintGuard(dAtA, i, uint64(len(m.GuardSignature))) - i-- - dAtA[i] = 0x4a - } - n15, err15 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.LastModifyTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.LastModifyTime):]) - if err15 != nil { - return 0, err15 - } - i -= n15 - i = encodeVarintGuard(dAtA, i, uint64(n15)) - i-- - dAtA[i] = 0x42 - if len(m.ChangeLog) > 0 { - for iNdEx := len(m.ChangeLog) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ChangeLog[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGuard(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if len(m.EscrowSignature) > 0 { - i -= len(m.EscrowSignature) - copy(dAtA[i:], m.EscrowSignature) - i = encodeVarintGuard(dAtA, i, uint64(len(m.EscrowSignature))) - i-- - dAtA[i] = 0x32 - } - n16, err16 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.EscrowSignedTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.EscrowSignedTime):]) - if err16 != nil { - return 0, err16 - } - i -= n16 - i = encodeVarintGuard(dAtA, i, uint64(n16)) - i-- - dAtA[i] = 0x2a - if len(m.HostSignature) > 0 { - i -= len(m.HostSignature) - copy(dAtA[i:], m.HostSignature) - i = encodeVarintGuard(dAtA, i, uint64(len(m.HostSignature))) - i-- - dAtA[i] = 0x22 - } - if len(m.RenterSignature) > 0 { - i -= len(m.RenterSignature) - copy(dAtA[i:], m.RenterSignature) - i = encodeVarintGuard(dAtA, i, uint64(len(m.RenterSignature))) - i-- - dAtA[i] = 0x1a - } - if m.State != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.State)) - i-- - dAtA[i] = 0x10 - } - { - size, err := m.ContractMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGuard(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *FileStoreListResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FileStoreListResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FileStoreListResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintGuard(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x2a - } - if m.Count != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.Count)) - i-- - dAtA[i] = 0x20 - } - if len(m.FileStoreMeta) > 0 { - for iNdEx := len(m.FileStoreMeta) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.FileStoreMeta[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGuard(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - n18, err18 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.CurrentTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.CurrentTime):]) - if err18 != nil { - return 0, err18 - } - i -= n18 - i = encodeVarintGuard(dAtA, i, uint64(n18)) - i-- - dAtA[i] = 0x12 - if m.Request != nil { - { - size, err := m.Request.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGuard(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *FileStoreMeta) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FileStoreMeta) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FileStoreMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.CheckFrequencyWarn != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.CheckFrequencyWarn)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x80 - } - if m.SuccessChallengeTimesLimit != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.SuccessChallengeTimesLimit)) - i-- - dAtA[i] = 0x78 - } - if m.WarnChallengeTimesLimit != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.WarnChallengeTimesLimit)) - i-- - dAtA[i] = 0x70 - } - if len(m.GuardPid) > 0 { - i -= len(m.GuardPid) - copy(dAtA[i:], m.GuardPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.GuardPid))) - i-- - dAtA[i] = 0x6a - } - if len(m.EscrowPid) > 0 { - i -= len(m.EscrowPid) - copy(dAtA[i:], m.EscrowPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.EscrowPid))) - i-- - dAtA[i] = 0x62 - } - if m.RecoverThreshold != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.RecoverThreshold)) - i-- - dAtA[i] = 0x58 - } - if m.MinimumShards != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.MinimumShards)) - i-- - dAtA[i] = 0x50 - } - if m.ShardCount != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.ShardCount)) - i-- - dAtA[i] = 0x48 - } - if m.EscrowFee != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.EscrowFee)) - i-- - dAtA[i] = 0x40 - } - if m.GuardFee != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.GuardFee)) - i-- - dAtA[i] = 0x38 - } - if m.CheckFrequency != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.CheckFrequency)) - i-- - dAtA[i] = 0x30 - } - n20, err20 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.RentEnd, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.RentEnd):]) - if err20 != nil { - return 0, err20 - } - i -= n20 - i = encodeVarintGuard(dAtA, i, uint64(n20)) - i-- - dAtA[i] = 0x2a - n21, err21 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.RentStart, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.RentStart):]) - if err21 != nil { - return 0, err21 - } - i -= n21 - i = encodeVarintGuard(dAtA, i, uint64(n21)) - i-- - dAtA[i] = 0x22 - if m.FileSize != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.FileSize)) - i-- - dAtA[i] = 0x18 - } - if len(m.FileHash) > 0 { - i -= len(m.FileHash) - copy(dAtA[i:], m.FileHash) - i = encodeVarintGuard(dAtA, i, uint64(len(m.FileHash))) - i-- - dAtA[i] = 0x12 - } - if len(m.RenterPid) > 0 { - i -= len(m.RenterPid) - copy(dAtA[i:], m.RenterPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.RenterPid))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *FileStoreStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FileStoreStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FileStoreStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.PreparerSignature) > 0 { - i -= len(m.PreparerSignature) - copy(dAtA[i:], m.PreparerSignature) - i = encodeVarintGuard(dAtA, i, uint64(len(m.PreparerSignature))) - i-- - dAtA[i] = 0x5a - } - if len(m.PreparerPid) > 0 { - i -= len(m.PreparerPid) - copy(dAtA[i:], m.PreparerPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.PreparerPid))) - i-- - dAtA[i] = 0x52 - } - if m.RentalState != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.RentalState)) - i-- - dAtA[i] = 0x48 - } - if len(m.GuardSignature) > 0 { - i -= len(m.GuardSignature) - copy(dAtA[i:], m.GuardSignature) - i = encodeVarintGuard(dAtA, i, uint64(len(m.GuardSignature))) - i-- - dAtA[i] = 0x42 - } - n22, err22 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.CurrentTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.CurrentTime):]) - if err22 != nil { - return 0, err22 - } - i -= n22 - i = encodeVarintGuard(dAtA, i, uint64(n22)) - i-- - dAtA[i] = 0x3a - if len(m.ChangeLog) > 0 { - for iNdEx := len(m.ChangeLog) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ChangeLog[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGuard(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - n23, err23 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.GuardReceiveTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.GuardReceiveTime):]) - if err23 != nil { - return 0, err23 - } - i -= n23 - i = encodeVarintGuard(dAtA, i, uint64(n23)) - i-- - dAtA[i] = 0x2a - if len(m.RenterSignature) > 0 { - i -= len(m.RenterSignature) - copy(dAtA[i:], m.RenterSignature) - i = encodeVarintGuard(dAtA, i, uint64(len(m.RenterSignature))) - i-- - dAtA[i] = 0x22 - } - if len(m.Contracts) > 0 { - for iNdEx := len(m.Contracts) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Contracts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGuard(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.State != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.State)) - i-- - dAtA[i] = 0x10 - } - { - size, err := m.FileStoreMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGuard(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ChallengeQuestion) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ChallengeQuestion) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ChallengeQuestion) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.ExpectAnswer) > 0 { - i -= len(m.ExpectAnswer) - copy(dAtA[i:], m.ExpectAnswer) - i = encodeVarintGuard(dAtA, i, uint64(len(m.ExpectAnswer))) - i-- - dAtA[i] = 0x2a - } - if len(m.Nonce) > 0 { - i -= len(m.Nonce) - copy(dAtA[i:], m.Nonce) - i = encodeVarintGuard(dAtA, i, uint64(len(m.Nonce))) - i-- - dAtA[i] = 0x22 - } - if m.ChunkIndex != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.ChunkIndex)) - i-- - dAtA[i] = 0x18 - } - if len(m.HostPid) > 0 { - i -= len(m.HostPid) - copy(dAtA[i:], m.HostPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.HostPid))) - i-- - dAtA[i] = 0x12 - } - if len(m.ShardHash) > 0 { - i -= len(m.ShardHash) - copy(dAtA[i:], m.ShardHash) - i = encodeVarintGuard(dAtA, i, uint64(len(m.ShardHash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ProofOfReplicateChallenge) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ProofOfReplicateChallenge) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProofOfReplicateChallenge) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.HostSignature) > 0 { - i -= len(m.HostSignature) - copy(dAtA[i:], m.HostSignature) - i = encodeVarintGuard(dAtA, i, uint64(len(m.HostSignature))) - i-- - dAtA[i] = 0x3a - } - n25, err25 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.HostSignTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.HostSignTime):]) - if err25 != nil { - return 0, err25 - } - i -= n25 - i = encodeVarintGuard(dAtA, i, uint64(n25)) - i-- - dAtA[i] = 0x32 - if len(m.HostAnswer) > 0 { - i -= len(m.HostAnswer) - copy(dAtA[i:], m.HostAnswer) - i = encodeVarintGuard(dAtA, i, uint64(len(m.HostAnswer))) - i-- - dAtA[i] = 0x2a - } - if len(m.GuardSignature) > 0 { - i -= len(m.GuardSignature) - copy(dAtA[i:], m.GuardSignature) - i = encodeVarintGuard(dAtA, i, uint64(len(m.GuardSignature))) - i-- - dAtA[i] = 0x22 - } - if len(m.GuardPid) > 0 { - i -= len(m.GuardPid) - copy(dAtA[i:], m.GuardPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.GuardPid))) - i-- - dAtA[i] = 0x1a - } - n26, err26 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.ChallengeTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.ChallengeTime):]) - if err26 != nil { - return 0, err26 - } - i -= n26 - i = encodeVarintGuard(dAtA, i, uint64(n26)) - i-- - dAtA[i] = 0x12 - { - size, err := m.ChallengeQuestion.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGuard(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *FileChallengeQuestions) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FileChallengeQuestions) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FileChallengeQuestions) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.ShardQuestions) > 0 { - for iNdEx := len(m.ShardQuestions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ShardQuestions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGuard(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.FileHash) > 0 { - i -= len(m.FileHash) - copy(dAtA[i:], m.FileHash) - i = encodeVarintGuard(dAtA, i, uint64(len(m.FileHash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ShardChallengeQuestions) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ShardChallengeQuestions) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ShardChallengeQuestions) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.PreparerSignature) > 0 { - i -= len(m.PreparerSignature) - copy(dAtA[i:], m.PreparerSignature) - i = encodeVarintGuard(dAtA, i, uint64(len(m.PreparerSignature))) - i-- - dAtA[i] = 0x3a - } - n28, err28 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.PrepareTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.PrepareTime):]) - if err28 != nil { - return 0, err28 - } - i -= n28 - i = encodeVarintGuard(dAtA, i, uint64(n28)) - i-- - dAtA[i] = 0x32 - if len(m.Questions) > 0 { - for iNdEx := len(m.Questions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Questions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGuard(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - if m.QuestionCount != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.QuestionCount)) - i-- - dAtA[i] = 0x20 - } - if len(m.PreparerPid) > 0 { - i -= len(m.PreparerPid) - copy(dAtA[i:], m.PreparerPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.PreparerPid))) - i-- - dAtA[i] = 0x1a - } - if len(m.ShardHash) > 0 { - i -= len(m.ShardHash) - copy(dAtA[i:], m.ShardHash) - i = encodeVarintGuard(dAtA, i, uint64(len(m.ShardHash))) - i-- - dAtA[i] = 0x12 - } - if len(m.FileHash) > 0 { - i -= len(m.FileHash) - copy(dAtA[i:], m.FileHash) - i = encodeVarintGuard(dAtA, i, uint64(len(m.FileHash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CheckFileStoreMetaRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CheckFileStoreMetaRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CheckFileStoreMetaRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintGuard(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x2a - } - n29, err29 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.RequestTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.RequestTime):]) - if err29 != nil { - return 0, err29 - } - i -= n29 - i = encodeVarintGuard(dAtA, i, uint64(n29)) - i-- - dAtA[i] = 0x22 - if len(m.RequesterPid) > 0 { - i -= len(m.RequesterPid) - copy(dAtA[i:], m.RequesterPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.RequesterPid))) - i-- - dAtA[i] = 0x1a - } - if len(m.RenterPid) > 0 { - i -= len(m.RenterPid) - copy(dAtA[i:], m.RenterPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.RenterPid))) - i-- - dAtA[i] = 0x12 - } - if len(m.FileHash) > 0 { - i -= len(m.FileHash) - copy(dAtA[i:], m.FileHash) - i = encodeVarintGuard(dAtA, i, uint64(len(m.FileHash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ListRenterFileInfoRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ListRenterFileInfoRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListRenterFileInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintGuard(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x3a - } - if m.LastModifyTime != nil { - n30, err30 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(*m.LastModifyTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(*m.LastModifyTime):]) - if err30 != nil { - return 0, err30 - } - i -= n30 - i = encodeVarintGuard(dAtA, i, uint64(n30)) - i-- - dAtA[i] = 0x32 - } - if m.RequestTime != nil { - n31, err31 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(*m.RequestTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(*m.RequestTime):]) - if err31 != nil { - return 0, err31 - } - i -= n31 - i = encodeVarintGuard(dAtA, i, uint64(n31)) - i-- - dAtA[i] = 0x2a - } - if m.RequestPageIndex != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.RequestPageIndex)) - i-- - dAtA[i] = 0x20 - } - if m.RequestPageSize != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.RequestPageSize)) - i-- - dAtA[i] = 0x18 - } - if len(m.RequesterPid) > 0 { - i -= len(m.RequesterPid) - copy(dAtA[i:], m.RequesterPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.RequesterPid))) - i-- - dAtA[i] = 0x12 - } - if len(m.RenterPid) > 0 { - i -= len(m.RenterPid) - copy(dAtA[i:], m.RenterPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.RenterPid))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ListHostContractsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ListHostContractsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListHostContractsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintGuard(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x4a - } - if m.RequestTime != nil { - n32, err32 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(*m.RequestTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(*m.RequestTime):]) - if err32 != nil { - return 0, err32 - } - i -= n32 - i = encodeVarintGuard(dAtA, i, uint64(n32)) - i-- - dAtA[i] = 0x42 - } - if m.State != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.State)) - i-- - dAtA[i] = 0x38 - } - if m.LastModifyTimeTo != nil { - n33, err33 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(*m.LastModifyTimeTo, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(*m.LastModifyTimeTo):]) - if err33 != nil { - return 0, err33 - } - i -= n33 - i = encodeVarintGuard(dAtA, i, uint64(n33)) - i-- - dAtA[i] = 0x32 - } - if m.LastModifyTimeSince != nil { - n34, err34 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(*m.LastModifyTimeSince, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(*m.LastModifyTimeSince):]) - if err34 != nil { - return 0, err34 - } - i -= n34 - i = encodeVarintGuard(dAtA, i, uint64(n34)) - i-- - dAtA[i] = 0x2a - } - if m.RequestPageIndex != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.RequestPageIndex)) - i-- - dAtA[i] = 0x20 - } - if m.RequestPageSize != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.RequestPageSize)) - i-- - dAtA[i] = 0x18 - } - if len(m.RequesterPid) > 0 { - i -= len(m.RequesterPid) - copy(dAtA[i:], m.RequesterPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.RequesterPid))) - i-- - dAtA[i] = 0x12 - } - if len(m.HostPid) > 0 { - i -= len(m.HostPid) - copy(dAtA[i:], m.HostPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.HostPid))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ContractsList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ContractsList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ContractsList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintGuard(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x2a - } - if m.Count != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.Count)) - i-- - dAtA[i] = 0x20 - } - if len(m.Contracts) > 0 { - for iNdEx := len(m.Contracts) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Contracts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGuard(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - n35, err35 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.GenerateTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.GenerateTime):]) - if err35 != nil { - return 0, err35 - } - i -= n35 - i = encodeVarintGuard(dAtA, i, uint64(n35)) - i-- - dAtA[i] = 0x12 - if m.Request != nil { - { - size, err := m.Request.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGuard(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ReadyForChallengeRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ReadyForChallengeRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ReadyForChallengeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.IsRepair { - i-- - if m.IsRepair { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintGuard(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x3a - } - n37, err37 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.PrepareTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.PrepareTime):]) - if err37 != nil { - return 0, err37 - } - i -= n37 - i = encodeVarintGuard(dAtA, i, uint64(n37)) - i-- - dAtA[i] = 0x32 - if len(m.HostPid) > 0 { - i -= len(m.HostPid) - copy(dAtA[i:], m.HostPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.HostPid))) - i-- - dAtA[i] = 0x2a - } - if len(m.ContractId) > 0 { - i -= len(m.ContractId) - copy(dAtA[i:], m.ContractId) - i = encodeVarintGuard(dAtA, i, uint64(len(m.ContractId))) - i-- - dAtA[i] = 0x22 - } - if len(m.ShardHash) > 0 { - i -= len(m.ShardHash) - copy(dAtA[i:], m.ShardHash) - i = encodeVarintGuard(dAtA, i, uint64(len(m.ShardHash))) - i-- - dAtA[i] = 0x1a - } - if len(m.FileHash) > 0 { - i -= len(m.FileHash) - copy(dAtA[i:], m.FileHash) - i = encodeVarintGuard(dAtA, i, uint64(len(m.FileHash))) - i-- - dAtA[i] = 0x12 - } - if len(m.RenterPid) > 0 { - i -= len(m.RenterPid) - copy(dAtA[i:], m.RenterPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.RenterPid))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RequestChallengeQuestion) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RequestChallengeQuestion) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RequestChallengeQuestion) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.FileHash) > 0 { - i -= len(m.FileHash) - copy(dAtA[i:], m.FileHash) - i = encodeVarintGuard(dAtA, i, uint64(len(m.FileHash))) - i-- - dAtA[i] = 0x2a - } - if m.IsRepair { - i-- - if m.IsRepair { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintGuard(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x1a - } - n38, err38 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.PrepareTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.PrepareTime):]) - if err38 != nil { - return 0, err38 - } - i -= n38 - i = encodeVarintGuard(dAtA, i, uint64(n38)) - i-- - dAtA[i] = 0x12 - if m.Question != nil { - { - size, err := m.Question.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGuard(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ResponseChallengeQuestion) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResponseChallengeQuestion) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResponseChallengeQuestion) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.FileHash) > 0 { - i -= len(m.FileHash) - copy(dAtA[i:], m.FileHash) - i = encodeVarintGuard(dAtA, i, uint64(len(m.FileHash))) - i-- - dAtA[i] = 0x32 - } - if m.IsRepair { - i-- - if m.IsRepair { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintGuard(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x22 - } - n40, err40 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.ResolveTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResolveTime):]) - if err40 != nil { - return 0, err40 - } - i -= n40 - i = encodeVarintGuard(dAtA, i, uint64(n40)) - i-- - dAtA[i] = 0x1a - if len(m.HostPid) > 0 { - i -= len(m.HostPid) - copy(dAtA[i:], m.HostPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.HostPid))) - i-- - dAtA[i] = 0x12 - } - if m.Answer != nil { - { - size, err := m.Answer.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGuard(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ForceRepairRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ForceRepairRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ForceRepairRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintGuard(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x22 - } - if len(m.AuthPid) > 0 { - i -= len(m.AuthPid) - copy(dAtA[i:], m.AuthPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.AuthPid))) - i-- - dAtA[i] = 0x1a - } - if len(m.FileHash) > 0 { - i -= len(m.FileHash) - copy(dAtA[i:], m.FileHash) - i = encodeVarintGuard(dAtA, i, uint64(len(m.FileHash))) - i-- - dAtA[i] = 0x12 - } - if len(m.RenterPid) > 0 { - i -= len(m.RenterPid) - copy(dAtA[i:], m.RenterPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.RenterPid))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Result) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Result) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Result) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - n42, err42 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.ResponseTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime):]) - if err42 != nil { - return 0, err42 - } - i -= n42 - i = encodeVarintGuard(dAtA, i, uint64(n42)) - i-- - dAtA[i] = 0x1a - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintGuard(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *RepairContract) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RepairContract) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RepairContract) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.GuardSignature) > 0 { - i -= len(m.GuardSignature) - copy(dAtA[i:], m.GuardSignature) - i = encodeVarintGuard(dAtA, i, uint64(len(m.GuardSignature))) - i-- - dAtA[i] = 0x62 - } - n43, err43 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.GuardSignTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.GuardSignTime):]) - if err43 != nil { - return 0, err43 - } - i -= n43 - i = encodeVarintGuard(dAtA, i, uint64(n43)) - i-- - dAtA[i] = 0x5a - if len(m.RepairContractId) > 0 { - i -= len(m.RepairContractId) - copy(dAtA[i:], m.RepairContractId) - i = encodeVarintGuard(dAtA, i, uint64(len(m.RepairContractId))) - i-- - dAtA[i] = 0x52 - } - if len(m.DownloadContractId) > 0 { - i -= len(m.DownloadContractId) - copy(dAtA[i:], m.DownloadContractId) - i = encodeVarintGuard(dAtA, i, uint64(len(m.DownloadContractId))) - i-- - dAtA[i] = 0x4a - } - if len(m.RepairSignature) > 0 { - i -= len(m.RepairSignature) - copy(dAtA[i:], m.RepairSignature) - i = encodeVarintGuard(dAtA, i, uint64(len(m.RepairSignature))) - i-- - dAtA[i] = 0x42 - } - n44, err44 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.RepairSignTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.RepairSignTime):]) - if err44 != nil { - return 0, err44 - } - i -= n44 - i = encodeVarintGuard(dAtA, i, uint64(n44)) - i-- - dAtA[i] = 0x3a - if len(m.RepairPid) > 0 { - i -= len(m.RepairPid) - copy(dAtA[i:], m.RepairPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.RepairPid))) - i-- - dAtA[i] = 0x32 - } - if m.RepairRewardAmount != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.RepairRewardAmount)) - i-- - dAtA[i] = 0x28 - } - if m.DownloadRewardAmount != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.DownloadRewardAmount)) - i-- - dAtA[i] = 0x20 - } - if m.FileSize != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.FileSize)) - i-- - dAtA[i] = 0x18 - } - if len(m.LostShardHash) > 0 { - for iNdEx := len(m.LostShardHash) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.LostShardHash[iNdEx]) - copy(dAtA[i:], m.LostShardHash[iNdEx]) - i = encodeVarintGuard(dAtA, i, uint64(len(m.LostShardHash[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.FileHash) > 0 { - i -= len(m.FileHash) - copy(dAtA[i:], m.FileHash) - i = encodeVarintGuard(dAtA, i, uint64(len(m.FileHash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RepairContractResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RepairContractResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RepairContractResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Status != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.Status)) - i-- - dAtA[i] = 0x10 - } - if m.Contract != nil { - { - size, err := m.Contract.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGuard(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RequestRepairContracts) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RequestRepairContracts) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RequestRepairContracts) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.RepairSignature) > 0 { - i -= len(m.RepairSignature) - copy(dAtA[i:], m.RepairSignature) - i = encodeVarintGuard(dAtA, i, uint64(len(m.RepairSignature))) - i-- - dAtA[i] = 0x22 - } - n46, err46 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.RepairSignTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.RepairSignTime):]) - if err46 != nil { - return 0, err46 - } - i -= n46 - i = encodeVarintGuard(dAtA, i, uint64(n46)) - i-- - dAtA[i] = 0x1a - if len(m.RepairNode) > 0 { - i -= len(m.RepairNode) - copy(dAtA[i:], m.RepairNode) - i = encodeVarintGuard(dAtA, i, uint64(len(m.RepairNode))) - i-- - dAtA[i] = 0x12 - } - if len(m.FileHash) > 0 { - i -= len(m.FileHash) - copy(dAtA[i:], m.FileHash) - i = encodeVarintGuard(dAtA, i, uint64(len(m.FileHash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ResponseRepairContracts) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResponseRepairContracts) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResponseRepairContracts) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.GuardSignature) > 0 { - i -= len(m.GuardSignature) - copy(dAtA[i:], m.GuardSignature) - i = encodeVarintGuard(dAtA, i, uint64(len(m.GuardSignature))) - i-- - dAtA[i] = 0x3a - } - n47, err47 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.SignTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.SignTime):]) - if err47 != nil { - return 0, err47 - } - i -= n47 - i = encodeVarintGuard(dAtA, i, uint64(n47)) - i-- - dAtA[i] = 0x32 - if len(m.GuardPid) > 0 { - i -= len(m.GuardPid) - copy(dAtA[i:], m.GuardPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.GuardPid))) - i-- - dAtA[i] = 0x2a - } - if m.Status != nil { - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGuard(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.State != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.State)) - i-- - dAtA[i] = 0x18 - } - if len(m.RepairNode) > 0 { - i -= len(m.RepairNode) - copy(dAtA[i:], m.RepairNode) - i = encodeVarintGuard(dAtA, i, uint64(len(m.RepairNode))) - i-- - dAtA[i] = 0x12 - } - if len(m.FileHash) > 0 { - i -= len(m.FileHash) - copy(dAtA[i:], m.FileHash) - i = encodeVarintGuard(dAtA, i, uint64(len(m.FileHash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CancelContractRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CancelContractRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CancelContractRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintGuard(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x42 - } - n49, err49 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.SignTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.SignTime):]) - if err49 != nil { - return 0, err49 - } - i -= n49 - i = encodeVarintGuard(dAtA, i, uint64(n49)) - i-- - dAtA[i] = 0x3a - if m.Reason != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.Reason)) - i-- - dAtA[i] = 0x30 - } - if len(m.HostPid) > 0 { - i -= len(m.HostPid) - copy(dAtA[i:], m.HostPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.HostPid))) - i-- - dAtA[i] = 0x2a - } - if len(m.RenterPid) > 0 { - i -= len(m.RenterPid) - copy(dAtA[i:], m.RenterPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.RenterPid))) - i-- - dAtA[i] = 0x22 - } - if len(m.ContractId) > 0 { - i -= len(m.ContractId) - copy(dAtA[i:], m.ContractId) - i = encodeVarintGuard(dAtA, i, uint64(len(m.ContractId))) - i-- - dAtA[i] = 0x1a - } - if len(m.ShardHash) > 0 { - i -= len(m.ShardHash) - copy(dAtA[i:], m.ShardHash) - i = encodeVarintGuard(dAtA, i, uint64(len(m.ShardHash))) - i-- - dAtA[i] = 0x12 - } - if len(m.FileHash) > 0 { - i -= len(m.FileHash) - copy(dAtA[i:], m.FileHash) - i = encodeVarintGuard(dAtA, i, uint64(len(m.FileHash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ChallengeJobRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ChallengeJobRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ChallengeJobRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintGuard(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x1a - } - n50, err50 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.RequestTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.RequestTime):]) - if err50 != nil { - return 0, err50 - } - i -= n50 - i = encodeVarintGuard(dAtA, i, uint64(n50)) - i-- - dAtA[i] = 0x12 - if len(m.NodePid) > 0 { - i -= len(m.NodePid) - copy(dAtA[i:], m.NodePid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.NodePid))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ChallengeJobResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ChallengeJobResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ChallengeJobResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintGuard(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x42 - } - n51, err51 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.JobFinishDeadline, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.JobFinishDeadline):]) - if err51 != nil { - return 0, err51 - } - i -= n51 - i = encodeVarintGuard(dAtA, i, uint64(n51)) - i-- - dAtA[i] = 0x3a - n52, err52 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.SendTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.SendTime):]) - if err52 != nil { - return 0, err52 - } - i -= n52 - i = encodeVarintGuard(dAtA, i, uint64(n52)) - i-- - dAtA[i] = 0x32 - if m.PackageQuestionsCount != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.PackageQuestionsCount)) - i-- - dAtA[i] = 0x28 - } - if len(m.PackageUrl) > 0 { - i -= len(m.PackageUrl) - copy(dAtA[i:], m.PackageUrl) - i = encodeVarintGuard(dAtA, i, uint64(len(m.PackageUrl))) - i-- - dAtA[i] = 0x22 - } - if len(m.JobId) > 0 { - i -= len(m.JobId) - copy(dAtA[i:], m.JobId) - i = encodeVarintGuard(dAtA, i, uint64(len(m.JobId))) - i-- - dAtA[i] = 0x1a - } - if len(m.IssuerPid) > 0 { - i -= len(m.IssuerPid) - copy(dAtA[i:], m.IssuerPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.IssuerPid))) - i-- - dAtA[i] = 0x12 - } - if len(m.NodePid) > 0 { - i -= len(m.NodePid) - copy(dAtA[i:], m.NodePid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.NodePid))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ChallengeJobResult) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ChallengeJobResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ChallengeJobResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintGuard(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x2a - } - n53, err53 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.SubmitTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.SubmitTime):]) - if err53 != nil { - return 0, err53 - } - i -= n53 - i = encodeVarintGuard(dAtA, i, uint64(n53)) - i-- - dAtA[i] = 0x22 - if len(m.Result) > 0 { - for iNdEx := len(m.Result) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Result[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGuard(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.JobId) > 0 { - i -= len(m.JobId) - copy(dAtA[i:], m.JobId) - i = encodeVarintGuard(dAtA, i, uint64(len(m.JobId))) - i-- - dAtA[i] = 0x12 - } - if len(m.NodePid) > 0 { - i -= len(m.NodePid) - copy(dAtA[i:], m.NodePid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.NodePid))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ShardChallengeResult) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ShardChallengeResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ShardChallengeResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.IsTimeout { - i-- - if m.IsTimeout { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - if len(m.Result) > 0 { - i -= len(m.Result) - copy(dAtA[i:], m.Result) - i = encodeVarintGuard(dAtA, i, uint64(len(m.Result))) - i-- - dAtA[i] = 0x2a - } - if len(m.Nonce) > 0 { - i -= len(m.Nonce) - copy(dAtA[i:], m.Nonce) - i = encodeVarintGuard(dAtA, i, uint64(len(m.Nonce))) - i-- - dAtA[i] = 0x22 - } - if len(m.ShardHash) > 0 { - i -= len(m.ShardHash) - copy(dAtA[i:], m.ShardHash) - i = encodeVarintGuard(dAtA, i, uint64(len(m.ShardHash))) - i-- - dAtA[i] = 0x1a - } - if len(m.FileHash) > 0 { - i -= len(m.FileHash) - copy(dAtA[i:], m.FileHash) - i = encodeVarintGuard(dAtA, i, uint64(len(m.FileHash))) - i-- - dAtA[i] = 0x12 - } - if len(m.HostPid) > 0 { - i -= len(m.HostPid) - copy(dAtA[i:], m.HostPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.HostPid))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DeCentralQuestions) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeCentralQuestions) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeCentralQuestions) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.EndTime != nil { - n54, err54 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(*m.EndTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(*m.EndTime):]) - if err54 != nil { - return 0, err54 - } - i -= n54 - i = encodeVarintGuard(dAtA, i, uint64(n54)) - i-- - dAtA[i] = 0x2a - } - if len(m.Url) > 0 { - i -= len(m.Url) - copy(dAtA[i:], m.Url) - i = encodeVarintGuard(dAtA, i, uint64(len(m.Url))) - i-- - dAtA[i] = 0x22 - } - if len(m.Uuid) > 0 { - i -= len(m.Uuid) - copy(dAtA[i:], m.Uuid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.Uuid))) - i-- - dAtA[i] = 0x1a - } - if m.Count != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.Count)) - i-- - dAtA[i] = 0x10 - } - if len(m.Qs) > 0 { - for iNdEx := len(m.Qs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Qs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGuard(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *DeQuestion) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeQuestion) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeQuestion) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.FileHash) > 0 { - i -= len(m.FileHash) - copy(dAtA[i:], m.FileHash) - i = encodeVarintGuard(dAtA, i, uint64(len(m.FileHash))) - i-- - dAtA[i] = 0x2a - } - if len(m.Nonce) > 0 { - i -= len(m.Nonce) - copy(dAtA[i:], m.Nonce) - i = encodeVarintGuard(dAtA, i, uint64(len(m.Nonce))) - i-- - dAtA[i] = 0x22 - } - if m.ChunkIndex != 0 { - i = encodeVarintGuard(dAtA, i, uint64(m.ChunkIndex)) - i-- - dAtA[i] = 0x18 - } - if len(m.HostPid) > 0 { - i -= len(m.HostPid) - copy(dAtA[i:], m.HostPid) - i = encodeVarintGuard(dAtA, i, uint64(len(m.HostPid))) - i-- - dAtA[i] = 0x12 - } - if len(m.ShardHash) > 0 { - i -= len(m.ShardHash) - copy(dAtA[i:], m.ShardHash) - i = encodeVarintGuard(dAtA, i, uint64(len(m.ShardHash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintGuard(dAtA []byte, offset int, v uint64) int { - offset -= sovGuard(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedAdminQuery(r randyGuard, easy bool) *AdminQuery { - this := &AdminQuery{} - this.RequesterPid = string(randStringGuard(r)) - v1 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.QueryDate = *v1 - this.QueryCount = int32(r.Int31()) - if r.Intn(2) == 0 { - this.QueryCount *= -1 - } - v2 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.RequestTime = *v2 - v3 := r.Intn(100) - this.Signature = make([]byte, v3) - for i := 0; i < v3; i++ { - this.Signature[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 6) - } - return this -} - -func NewPopulatedDailySummary(r randyGuard, easy bool) *DailySummary { - this := &DailySummary{} - v4 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.QueryDate = *v4 - v5 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.ResponseTime = *v5 - this.PreparerPid = string(randStringGuard(r)) - v6 := r.Intn(100) - this.Signature = make([]byte, v6) - for i := 0; i < v6; i++ { - this.Signature[i] = byte(r.Intn(256)) - } - this.WorkingStorageSize = int64(r.Int63()) - if r.Intn(2) == 0 { - this.WorkingStorageSize *= -1 - } - this.NewContracts = int64(r.Int63()) - if r.Intn(2) == 0 { - this.NewContracts *= -1 - } - this.NewContractsHost = int64(r.Int63()) - if r.Intn(2) == 0 { - this.NewContractsHost *= -1 - } - this.NewContractsRenter = int64(r.Int63()) - if r.Intn(2) == 0 { - this.NewContractsRenter *= -1 - } - this.NewContractsAveragePrice = int64(r.Int63()) - if r.Intn(2) == 0 { - this.NewContractsAveragePrice *= -1 - } - this.NewFiles = int64(r.Int63()) - if r.Intn(2) == 0 { - this.NewFiles *= -1 - } - this.NewShardsSize = int64(r.Int63()) - if r.Intn(2) == 0 { - this.NewShardsSize *= -1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 12) - } - return this -} - -func NewPopulatedHostSummary(r randyGuard, easy bool) *HostSummary { - this := &HostSummary{} - v7 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.QueryDate = *v7 - v8 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.ResponseTime = *v8 - this.PreparerPid = string(randStringGuard(r)) - v9 := r.Intn(100) - this.Signature = make([]byte, v9) - for i := 0; i < v9; i++ { - this.Signature[i] = byte(r.Intn(256)) - } - this.RecordCount = int32(r.Int31()) - if r.Intn(2) == 0 { - this.RecordCount *= -1 - } - if r.Intn(5) != 0 { - v10 := r.Intn(5) - this.Status = make([]*HostStatus, v10) - for i := 0; i < v10; i++ { - this.Status[i] = NewPopulatedHostStatus(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 7) - } - return this -} - -func NewPopulatedTotalStateSummary(r randyGuard, easy bool) *TotalStateSummary { - this := &TotalStateSummary{} - v11 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.QueryDate = *v11 - v12 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.ResponseTime = *v12 - this.PreparerPid = string(randStringGuard(r)) - v13 := r.Intn(100) - this.Signature = make([]byte, v13) - for i := 0; i < v13; i++ { - this.Signature[i] = byte(r.Intn(256)) - } - this.ValidContractCount = int64(r.Int63()) - if r.Intn(2) == 0 { - this.ValidContractCount *= -1 - } - this.ExistedShardSize = int64(r.Int63()) - if r.Intn(2) == 0 { - this.ExistedShardSize *= -1 - } - this.InvalidContractCount = int64(r.Int63()) - if r.Intn(2) == 0 { - this.InvalidContractCount *= -1 - } - this.LostShardSize = int64(r.Int63()) - if r.Intn(2) == 0 { - this.LostShardSize *= -1 - } - this.TotalHostReward = int64(r.Int63()) - if r.Intn(2) == 0 { - this.TotalHostReward *= -1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 10) - } - return this -} - -func NewPopulatedHostStatus(r randyGuard, easy bool) *HostStatus { - this := &HostStatus{} - this.HostPid = string(randStringGuard(r)) - this.FileSize = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FileSize *= -1 - } - this.WorkAmount = int64(r.Int63()) - if r.Intn(2) == 0 { - this.WorkAmount *= -1 - } - this.RewardBtt = int64(r.Int63()) - if r.Intn(2) == 0 { - this.RewardBtt *= -1 - } - this.SuspectCheat = bool(bool(r.Intn(2) == 0)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 6) - } - return this -} - -func NewPopulatedLog(r randyGuard, easy bool) *Log { - this := &Log{} - v14 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.ChangeTime = *v14 - this.OriginatorPid = string(randStringGuard(r)) - this.Change = string(randStringGuard(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 4) - } - return this -} - -func NewPopulatedContractMeta(r randyGuard, easy bool) *ContractMeta { - this := &ContractMeta{} - this.ContractId = string(randStringGuard(r)) - this.RenterPid = string(randStringGuard(r)) - this.HostPid = string(randStringGuard(r)) - this.ShardHash = string(randStringGuard(r)) - this.ShardIndex = int32(r.Int31()) - if r.Intn(2) == 0 { - this.ShardIndex *= -1 - } - this.ShardFileSize = int64(r.Int63()) - if r.Intn(2) == 0 { - this.ShardFileSize *= -1 - } - this.FileHash = string(randStringGuard(r)) - v15 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.RentStart = *v15 - v16 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.RentEnd = *v16 - this.GuardPid = string(randStringGuard(r)) - this.EscrowPid = string(randStringGuard(r)) - this.Price = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Price *= -1 - } - this.Amount = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Amount *= -1 - } - this.CollateralAmount = int64(r.Int63()) - if r.Intn(2) == 0 { - this.CollateralAmount *= -1 - } - this.PayoutSchedule = ContractMeta_Schedule([]int32{0, 1, 2}[r.Intn(3)]) - this.NumPayouts = int32(r.Int31()) - if r.Intn(2) == 0 { - this.NumPayouts *= -1 - } - this.ContingentAmount = int64(r.Int63()) - if r.Intn(2) == 0 { - this.ContingentAmount *= -1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 18) - } - return this -} - -func NewPopulatedContract(r randyGuard, easy bool) *Contract { - this := &Contract{} - v17 := NewPopulatedContractMeta(r, easy) - this.ContractMeta = *v17 - this.State = Contract_ContractState([]int32{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}[r.Intn(13)]) - v18 := r.Intn(100) - this.RenterSignature = make([]byte, v18) - for i := 0; i < v18; i++ { - this.RenterSignature[i] = byte(r.Intn(256)) - } - v19 := r.Intn(100) - this.HostSignature = make([]byte, v19) - for i := 0; i < v19; i++ { - this.HostSignature[i] = byte(r.Intn(256)) - } - v20 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.EscrowSignedTime = *v20 - v21 := r.Intn(100) - this.EscrowSignature = make([]byte, v21) - for i := 0; i < v21; i++ { - this.EscrowSignature[i] = byte(r.Intn(256)) - } - if r.Intn(5) != 0 { - v22 := r.Intn(5) - this.ChangeLog = make([]*Log, v22) - for i := 0; i < v22; i++ { - this.ChangeLog[i] = NewPopulatedLog(r, easy) - } - } - v23 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.LastModifyTime = *v23 - v24 := r.Intn(100) - this.GuardSignature = make([]byte, v24) - for i := 0; i < v24; i++ { - this.GuardSignature[i] = byte(r.Intn(256)) - } - this.PreparerPid = string(randStringGuard(r)) - v25 := r.Intn(100) - this.PreparerSignature = make([]byte, v25) - for i := 0; i < v25; i++ { - this.PreparerSignature[i] = byte(r.Intn(256)) - } - v26 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.LastSuccessChallengeTime = *v26 - v27 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.LastChallengeTime = *v27 - this.ChallengeTimes = int32(r.Int31()) - if r.Intn(2) == 0 { - this.ChallengeTimes *= -1 - } - this.ChallengeWarnTimes = int32(r.Int31()) - if r.Intn(2) == 0 { - this.ChallengeWarnTimes *= -1 - } - this.ChallengeSuccessTimes = int32(r.Int31()) - if r.Intn(2) == 0 { - this.ChallengeSuccessTimes *= -1 - } - v28 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.FirstChallengeSuccess = *v28 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 18) - } - return this -} - -func NewPopulatedFileStoreListResponse(r randyGuard, easy bool) *FileStoreListResponse { - this := &FileStoreListResponse{} - if r.Intn(5) != 0 { - this.Request = NewPopulatedListRenterFileInfoRequest(r, easy) - } - v29 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.CurrentTime = *v29 - if r.Intn(5) != 0 { - v30 := r.Intn(5) - this.FileStoreMeta = make([]*FileStoreMeta, v30) - for i := 0; i < v30; i++ { - this.FileStoreMeta[i] = NewPopulatedFileStoreMeta(r, easy) - } - } - this.Count = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Count *= -1 - } - v31 := r.Intn(100) - this.Signature = make([]byte, v31) - for i := 0; i < v31; i++ { - this.Signature[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 6) - } - return this -} - -func NewPopulatedFileStoreMeta(r randyGuard, easy bool) *FileStoreMeta { - this := &FileStoreMeta{} - this.RenterPid = string(randStringGuard(r)) - this.FileHash = string(randStringGuard(r)) - this.FileSize = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FileSize *= -1 - } - v32 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.RentStart = *v32 - v33 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.RentEnd = *v33 - this.CheckFrequency = int32(r.Int31()) - if r.Intn(2) == 0 { - this.CheckFrequency *= -1 - } - this.GuardFee = int64(r.Int63()) - if r.Intn(2) == 0 { - this.GuardFee *= -1 - } - this.EscrowFee = int64(r.Int63()) - if r.Intn(2) == 0 { - this.EscrowFee *= -1 - } - this.ShardCount = int32(r.Int31()) - if r.Intn(2) == 0 { - this.ShardCount *= -1 - } - this.MinimumShards = int32(r.Int31()) - if r.Intn(2) == 0 { - this.MinimumShards *= -1 - } - this.RecoverThreshold = int32(r.Int31()) - if r.Intn(2) == 0 { - this.RecoverThreshold *= -1 - } - this.EscrowPid = string(randStringGuard(r)) - this.GuardPid = string(randStringGuard(r)) - this.WarnChallengeTimesLimit = int32(r.Int31()) - if r.Intn(2) == 0 { - this.WarnChallengeTimesLimit *= -1 - } - this.SuccessChallengeTimesLimit = int32(r.Int31()) - if r.Intn(2) == 0 { - this.SuccessChallengeTimesLimit *= -1 - } - this.CheckFrequencyWarn = int32(r.Int31()) - if r.Intn(2) == 0 { - this.CheckFrequencyWarn *= -1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 17) - } - return this -} - -func NewPopulatedFileStoreStatus(r randyGuard, easy bool) *FileStoreStatus { - this := &FileStoreStatus{} - v34 := NewPopulatedFileStoreMeta(r, easy) - this.FileStoreMeta = *v34 - this.State = FileStoreStatus_MetaState([]int32{0, 1, 2, 3, 4, 5, 6, 7}[r.Intn(8)]) - if r.Intn(5) != 0 { - v35 := r.Intn(5) - this.Contracts = make([]*Contract, v35) - for i := 0; i < v35; i++ { - this.Contracts[i] = NewPopulatedContract(r, easy) - } - } - v36 := r.Intn(100) - this.RenterSignature = make([]byte, v36) - for i := 0; i < v36; i++ { - this.RenterSignature[i] = byte(r.Intn(256)) - } - v37 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.GuardReceiveTime = *v37 - if r.Intn(5) != 0 { - v38 := r.Intn(5) - this.ChangeLog = make([]*Log, v38) - for i := 0; i < v38; i++ { - this.ChangeLog[i] = NewPopulatedLog(r, easy) - } - } - v39 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.CurrentTime = *v39 - v40 := r.Intn(100) - this.GuardSignature = make([]byte, v40) - for i := 0; i < v40; i++ { - this.GuardSignature[i] = byte(r.Intn(256)) - } - this.RentalState = FileStoreStatus_RentalState([]int32{0, 1, 2, 3, 4}[r.Intn(5)]) - this.PreparerPid = string(randStringGuard(r)) - v41 := r.Intn(100) - this.PreparerSignature = make([]byte, v41) - for i := 0; i < v41; i++ { - this.PreparerSignature[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 12) - } - return this -} - -func NewPopulatedChallengeQuestion(r randyGuard, easy bool) *ChallengeQuestion { - this := &ChallengeQuestion{} - this.ShardHash = string(randStringGuard(r)) - this.HostPid = string(randStringGuard(r)) - this.ChunkIndex = int32(r.Int31()) - if r.Intn(2) == 0 { - this.ChunkIndex *= -1 - } - this.Nonce = string(randStringGuard(r)) - this.ExpectAnswer = string(randStringGuard(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 6) - } - return this -} - -func NewPopulatedProofOfReplicateChallenge(r randyGuard, easy bool) *ProofOfReplicateChallenge { - this := &ProofOfReplicateChallenge{} - v42 := NewPopulatedChallengeQuestion(r, easy) - this.ChallengeQuestion = *v42 - v43 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.ChallengeTime = *v43 - this.GuardPid = string(randStringGuard(r)) - v44 := r.Intn(100) - this.GuardSignature = make([]byte, v44) - for i := 0; i < v44; i++ { - this.GuardSignature[i] = byte(r.Intn(256)) - } - this.HostAnswer = string(randStringGuard(r)) - v45 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.HostSignTime = *v45 - v46 := r.Intn(100) - this.HostSignature = make([]byte, v46) - for i := 0; i < v46; i++ { - this.HostSignature[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 8) - } - return this -} - -func NewPopulatedFileChallengeQuestions(r randyGuard, easy bool) *FileChallengeQuestions { - this := &FileChallengeQuestions{} - this.FileHash = string(randStringGuard(r)) - if r.Intn(5) != 0 { - v47 := r.Intn(5) - this.ShardQuestions = make([]*ShardChallengeQuestions, v47) - for i := 0; i < v47; i++ { - this.ShardQuestions[i] = NewPopulatedShardChallengeQuestions(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 3) - } - return this -} - -func NewPopulatedShardChallengeQuestions(r randyGuard, easy bool) *ShardChallengeQuestions { - this := &ShardChallengeQuestions{} - this.FileHash = string(randStringGuard(r)) - this.ShardHash = string(randStringGuard(r)) - this.PreparerPid = string(randStringGuard(r)) - this.QuestionCount = int32(r.Int31()) - if r.Intn(2) == 0 { - this.QuestionCount *= -1 - } - if r.Intn(5) != 0 { - v48 := r.Intn(5) - this.Questions = make([]*ChallengeQuestion, v48) - for i := 0; i < v48; i++ { - this.Questions[i] = NewPopulatedChallengeQuestion(r, easy) - } - } - v49 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.PrepareTime = *v49 - v50 := r.Intn(100) - this.PreparerSignature = make([]byte, v50) - for i := 0; i < v50; i++ { - this.PreparerSignature[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 8) - } - return this -} - -func NewPopulatedCheckFileStoreMetaRequest(r randyGuard, easy bool) *CheckFileStoreMetaRequest { - this := &CheckFileStoreMetaRequest{} - this.FileHash = string(randStringGuard(r)) - this.RenterPid = string(randStringGuard(r)) - this.RequesterPid = string(randStringGuard(r)) - v51 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.RequestTime = *v51 - v52 := r.Intn(100) - this.Signature = make([]byte, v52) - for i := 0; i < v52; i++ { - this.Signature[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 6) - } - return this -} - -func NewPopulatedListRenterFileInfoRequest(r randyGuard, easy bool) *ListRenterFileInfoRequest { - this := &ListRenterFileInfoRequest{} - this.RenterPid = string(randStringGuard(r)) - this.RequesterPid = string(randStringGuard(r)) - this.RequestPageSize = int32(r.Int31()) - if r.Intn(2) == 0 { - this.RequestPageSize *= -1 - } - this.RequestPageIndex = int32(r.Int31()) - if r.Intn(2) == 0 { - this.RequestPageIndex *= -1 - } - if r.Intn(5) != 0 { - this.RequestTime = github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - } - if r.Intn(5) != 0 { - this.LastModifyTime = github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - } - v53 := r.Intn(100) - this.Signature = make([]byte, v53) - for i := 0; i < v53; i++ { - this.Signature[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 8) - } - return this -} - -func NewPopulatedListHostContractsRequest(r randyGuard, easy bool) *ListHostContractsRequest { - this := &ListHostContractsRequest{} - this.HostPid = string(randStringGuard(r)) - this.RequesterPid = string(randStringGuard(r)) - this.RequestPageSize = int32(r.Int31()) - if r.Intn(2) == 0 { - this.RequestPageSize *= -1 - } - this.RequestPageIndex = int32(r.Int31()) - if r.Intn(2) == 0 { - this.RequestPageIndex *= -1 - } - if r.Intn(5) != 0 { - this.LastModifyTimeSince = github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - } - if r.Intn(5) != 0 { - this.LastModifyTimeTo = github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - } - this.State = ListHostContractsRequest_SelectState([]int32{0, 1, 2}[r.Intn(3)]) - if r.Intn(5) != 0 { - this.RequestTime = github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - } - v54 := r.Intn(100) - this.Signature = make([]byte, v54) - for i := 0; i < v54; i++ { - this.Signature[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 10) - } - return this -} - -func NewPopulatedContractsList(r randyGuard, easy bool) *ContractsList { - this := &ContractsList{} - if r.Intn(5) != 0 { - this.Request = NewPopulatedListHostContractsRequest(r, easy) - } - v55 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.GenerateTime = *v55 - if r.Intn(5) != 0 { - v56 := r.Intn(5) - this.Contracts = make([]*Contract, v56) - for i := 0; i < v56; i++ { - this.Contracts[i] = NewPopulatedContract(r, easy) - } - } - this.Count = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Count *= -1 - } - v57 := r.Intn(100) - this.Signature = make([]byte, v57) - for i := 0; i < v57; i++ { - this.Signature[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 6) - } - return this -} - -func NewPopulatedReadyForChallengeRequest(r randyGuard, easy bool) *ReadyForChallengeRequest { - this := &ReadyForChallengeRequest{} - this.RenterPid = string(randStringGuard(r)) - this.FileHash = string(randStringGuard(r)) - this.ShardHash = string(randStringGuard(r)) - this.ContractId = string(randStringGuard(r)) - this.HostPid = string(randStringGuard(r)) - v58 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.PrepareTime = *v58 - v59 := r.Intn(100) - this.Signature = make([]byte, v59) - for i := 0; i < v59; i++ { - this.Signature[i] = byte(r.Intn(256)) - } - this.IsRepair = bool(bool(r.Intn(2) == 0)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 9) - } - return this -} - -func NewPopulatedRequestChallengeQuestion(r randyGuard, easy bool) *RequestChallengeQuestion { - this := &RequestChallengeQuestion{} - if r.Intn(5) != 0 { - this.Question = NewPopulatedChallengeQuestion(r, easy) - } - v60 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.PrepareTime = *v60 - v61 := r.Intn(100) - this.Signature = make([]byte, v61) - for i := 0; i < v61; i++ { - this.Signature[i] = byte(r.Intn(256)) - } - this.IsRepair = bool(bool(r.Intn(2) == 0)) - this.FileHash = string(randStringGuard(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 6) - } - return this -} - -func NewPopulatedResponseChallengeQuestion(r randyGuard, easy bool) *ResponseChallengeQuestion { - this := &ResponseChallengeQuestion{} - if r.Intn(5) != 0 { - this.Answer = NewPopulatedChallengeQuestion(r, easy) - } - this.HostPid = string(randStringGuard(r)) - v62 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.ResolveTime = *v62 - v63 := r.Intn(100) - this.Signature = make([]byte, v63) - for i := 0; i < v63; i++ { - this.Signature[i] = byte(r.Intn(256)) - } - this.IsRepair = bool(bool(r.Intn(2) == 0)) - this.FileHash = string(randStringGuard(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 7) - } - return this -} - -func NewPopulatedForceRepairRequest(r randyGuard, easy bool) *ForceRepairRequest { - this := &ForceRepairRequest{} - this.RenterPid = string(randStringGuard(r)) - this.FileHash = string(randStringGuard(r)) - this.AuthPid = string(randStringGuard(r)) - v64 := r.Intn(100) - this.Signature = make([]byte, v64) - for i := 0; i < v64; i++ { - this.Signature[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 5) - } - return this -} - -func NewPopulatedResult(r randyGuard, easy bool) *Result { - this := &Result{} - this.Code = ResponseCode([]int32{0, 1, 2, 20}[r.Intn(4)]) - this.Message = string(randStringGuard(r)) - v65 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.ResponseTime = *v65 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 4) - } - return this -} - -func NewPopulatedRepairContract(r randyGuard, easy bool) *RepairContract { - this := &RepairContract{} - this.FileHash = string(randStringGuard(r)) - v66 := r.Intn(10) - this.LostShardHash = make([]string, v66) - for i := 0; i < v66; i++ { - this.LostShardHash[i] = string(randStringGuard(r)) - } - this.FileSize = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FileSize *= -1 - } - this.DownloadRewardAmount = int64(r.Int63()) - if r.Intn(2) == 0 { - this.DownloadRewardAmount *= -1 - } - this.RepairRewardAmount = int64(r.Int63()) - if r.Intn(2) == 0 { - this.RepairRewardAmount *= -1 - } - this.RepairPid = string(randStringGuard(r)) - v67 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.RepairSignTime = *v67 - v68 := r.Intn(100) - this.RepairSignature = make([]byte, v68) - for i := 0; i < v68; i++ { - this.RepairSignature[i] = byte(r.Intn(256)) - } - this.DownloadContractId = string(randStringGuard(r)) - this.RepairContractId = string(randStringGuard(r)) - v69 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.GuardSignTime = *v69 - v70 := r.Intn(100) - this.GuardSignature = make([]byte, v70) - for i := 0; i < v70; i++ { - this.GuardSignature[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 13) - } - return this -} - -func NewPopulatedRepairContractResponse(r randyGuard, easy bool) *RepairContractResponse { - this := &RepairContractResponse{} - if r.Intn(5) != 0 { - this.Contract = NewPopulatedRepairContract(r, easy) - } - this.Status = RepairContractResponse_ContractResponseStatus([]int32{0, 1, 2}[r.Intn(3)]) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 3) - } - return this -} - -func NewPopulatedRequestRepairContracts(r randyGuard, easy bool) *RequestRepairContracts { - this := &RequestRepairContracts{} - this.FileHash = string(randStringGuard(r)) - this.RepairNode = string(randStringGuard(r)) - v71 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.RepairSignTime = *v71 - v72 := r.Intn(100) - this.RepairSignature = make([]byte, v72) - for i := 0; i < v72; i++ { - this.RepairSignature[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 5) - } - return this -} - -func NewPopulatedResponseRepairContracts(r randyGuard, easy bool) *ResponseRepairContracts { - this := &ResponseRepairContracts{} - this.FileHash = string(randStringGuard(r)) - this.RepairNode = string(randStringGuard(r)) - this.State = ResponseRepairContracts_RepairStat([]int32{0, 1, 2, 3}[r.Intn(4)]) - if r.Intn(5) != 0 { - this.Status = NewPopulatedFileStoreStatus(r, easy) - } - this.GuardPid = string(randStringGuard(r)) - v73 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.SignTime = *v73 - v74 := r.Intn(100) - this.GuardSignature = make([]byte, v74) - for i := 0; i < v74; i++ { - this.GuardSignature[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 8) - } - return this -} - -func NewPopulatedCancelContractRequest(r randyGuard, easy bool) *CancelContractRequest { - this := &CancelContractRequest{} - this.FileHash = string(randStringGuard(r)) - this.ShardHash = string(randStringGuard(r)) - this.ContractId = string(randStringGuard(r)) - this.RenterPid = string(randStringGuard(r)) - this.HostPid = string(randStringGuard(r)) - this.Reason = CancelContractRequest_CancelReason([]int32{0, 1, 2, 3}[r.Intn(4)]) - v75 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.SignTime = *v75 - v76 := r.Intn(100) - this.Signature = make([]byte, v76) - for i := 0; i < v76; i++ { - this.Signature[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 9) - } - return this -} - -func NewPopulatedChallengeJobRequest(r randyGuard, easy bool) *ChallengeJobRequest { - this := &ChallengeJobRequest{} - this.NodePid = string(randStringGuard(r)) - v77 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.RequestTime = *v77 - v78 := r.Intn(100) - this.Signature = make([]byte, v78) - for i := 0; i < v78; i++ { - this.Signature[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 4) - } - return this -} - -func NewPopulatedChallengeJobResponse(r randyGuard, easy bool) *ChallengeJobResponse { - this := &ChallengeJobResponse{} - this.NodePid = string(randStringGuard(r)) - this.IssuerPid = string(randStringGuard(r)) - this.JobId = string(randStringGuard(r)) - this.PackageUrl = string(randStringGuard(r)) - this.PackageQuestionsCount = int32(r.Int31()) - if r.Intn(2) == 0 { - this.PackageQuestionsCount *= -1 - } - v79 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.SendTime = *v79 - v80 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.JobFinishDeadline = *v80 - v81 := r.Intn(100) - this.Signature = make([]byte, v81) - for i := 0; i < v81; i++ { - this.Signature[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 9) - } - return this -} - -func NewPopulatedChallengeJobResult(r randyGuard, easy bool) *ChallengeJobResult { - this := &ChallengeJobResult{} - this.NodePid = string(randStringGuard(r)) - this.JobId = string(randStringGuard(r)) - if r.Intn(5) != 0 { - v82 := r.Intn(5) - this.Result = make([]*ShardChallengeResult, v82) - for i := 0; i < v82; i++ { - this.Result[i] = NewPopulatedShardChallengeResult(r, easy) - } - } - v83 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.SubmitTime = *v83 - v84 := r.Intn(100) - this.Signature = make([]byte, v84) - for i := 0; i < v84; i++ { - this.Signature[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 6) - } - return this -} - -func NewPopulatedShardChallengeResult(r randyGuard, easy bool) *ShardChallengeResult { - this := &ShardChallengeResult{} - this.HostPid = string(randStringGuard(r)) - this.FileHash = string(randStringGuard(r)) - this.ShardHash = string(randStringGuard(r)) - this.Nonce = string(randStringGuard(r)) - this.Result = string(randStringGuard(r)) - this.IsTimeout = bool(bool(r.Intn(2) == 0)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 7) - } - return this -} - -func NewPopulatedDeCentralQuestions(r randyGuard, easy bool) *DeCentralQuestions { - this := &DeCentralQuestions{} - if r.Intn(5) != 0 { - v85 := r.Intn(5) - this.Qs = make([]*DeQuestion, v85) - for i := 0; i < v85; i++ { - this.Qs[i] = NewPopulatedDeQuestion(r, easy) - } - } - this.Count = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Count *= -1 - } - this.Uuid = string(randStringGuard(r)) - this.Url = string(randStringGuard(r)) - if r.Intn(5) != 0 { - this.EndTime = github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 6) - } - return this -} - -func NewPopulatedDeQuestion(r randyGuard, easy bool) *DeQuestion { - this := &DeQuestion{} - this.ShardHash = string(randStringGuard(r)) - this.HostPid = string(randStringGuard(r)) - this.ChunkIndex = int32(r.Int31()) - if r.Intn(2) == 0 { - this.ChunkIndex *= -1 - } - this.Nonce = string(randStringGuard(r)) - this.FileHash = string(randStringGuard(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedGuard(r, 6) - } - return this -} - -type randyGuard interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneGuard(r randyGuard) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringGuard(r randyGuard) string { - v86 := r.Intn(100) - tmps := make([]rune, v86) - for i := 0; i < v86; i++ { - tmps[i] = randUTF8RuneGuard(r) - } - return string(tmps) -} -func randUnrecognizedGuard(r randyGuard, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldGuard(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldGuard(dAtA []byte, r randyGuard, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateGuard(dAtA, uint64(key)) - v87 := r.Int63() - if r.Intn(2) == 0 { - v87 *= -1 - } - dAtA = encodeVarintPopulateGuard(dAtA, uint64(v87)) - case 1: - dAtA = encodeVarintPopulateGuard(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateGuard(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateGuard(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateGuard(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateGuard(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *AdminQuery) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.RequesterPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.QueryDate) - n += 1 + l + sovGuard(uint64(l)) - if m.QueryCount != 0 { - n += 1 + sovGuard(uint64(m.QueryCount)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.RequestTime) - n += 1 + l + sovGuard(uint64(l)) - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DailySummary) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.QueryDate) - n += 1 + l + sovGuard(uint64(l)) - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime) - n += 1 + l + sovGuard(uint64(l)) - l = len(m.PreparerPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.WorkingStorageSize != 0 { - n += 1 + sovGuard(uint64(m.WorkingStorageSize)) - } - if m.NewContracts != 0 { - n += 1 + sovGuard(uint64(m.NewContracts)) - } - if m.NewContractsHost != 0 { - n += 1 + sovGuard(uint64(m.NewContractsHost)) - } - if m.NewContractsRenter != 0 { - n += 1 + sovGuard(uint64(m.NewContractsRenter)) - } - if m.NewContractsAveragePrice != 0 { - n += 1 + sovGuard(uint64(m.NewContractsAveragePrice)) - } - if m.NewFiles != 0 { - n += 1 + sovGuard(uint64(m.NewFiles)) - } - if m.NewShardsSize != 0 { - n += 1 + sovGuard(uint64(m.NewShardsSize)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HostSummary) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.QueryDate) - n += 1 + l + sovGuard(uint64(l)) - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime) - n += 1 + l + sovGuard(uint64(l)) - l = len(m.PreparerPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.RecordCount != 0 { - n += 1 + sovGuard(uint64(m.RecordCount)) - } - if len(m.Status) > 0 { - for _, e := range m.Status { - l = e.Size() - n += 1 + l + sovGuard(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TotalStateSummary) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.QueryDate) - n += 1 + l + sovGuard(uint64(l)) - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime) - n += 1 + l + sovGuard(uint64(l)) - l = len(m.PreparerPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.ValidContractCount != 0 { - n += 1 + sovGuard(uint64(m.ValidContractCount)) - } - if m.ExistedShardSize != 0 { - n += 1 + sovGuard(uint64(m.ExistedShardSize)) - } - if m.InvalidContractCount != 0 { - n += 1 + sovGuard(uint64(m.InvalidContractCount)) - } - if m.LostShardSize != 0 { - n += 1 + sovGuard(uint64(m.LostShardSize)) - } - if m.TotalHostReward != 0 { - n += 1 + sovGuard(uint64(m.TotalHostReward)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HostStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.HostPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.FileSize != 0 { - n += 1 + sovGuard(uint64(m.FileSize)) - } - if m.WorkAmount != 0 { - n += 1 + sovGuard(uint64(m.WorkAmount)) - } - if m.RewardBtt != 0 { - n += 1 + sovGuard(uint64(m.RewardBtt)) - } - if m.SuspectCheat { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Log) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.ChangeTime) - n += 1 + l + sovGuard(uint64(l)) - l = len(m.OriginatorPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.Change) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ContractMeta) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ContractId) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.RenterPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.HostPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.ShardHash) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.ShardIndex != 0 { - n += 1 + sovGuard(uint64(m.ShardIndex)) - } - if m.ShardFileSize != 0 { - n += 1 + sovGuard(uint64(m.ShardFileSize)) - } - l = len(m.FileHash) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.RentStart) - n += 1 + l + sovGuard(uint64(l)) - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.RentEnd) - n += 1 + l + sovGuard(uint64(l)) - l = len(m.GuardPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.EscrowPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.Price != 0 { - n += 1 + sovGuard(uint64(m.Price)) - } - if m.Amount != 0 { - n += 1 + sovGuard(uint64(m.Amount)) - } - if m.CollateralAmount != 0 { - n += 1 + sovGuard(uint64(m.CollateralAmount)) - } - if m.PayoutSchedule != 0 { - n += 1 + sovGuard(uint64(m.PayoutSchedule)) - } - if m.NumPayouts != 0 { - n += 2 + sovGuard(uint64(m.NumPayouts)) - } - if m.ContingentAmount != 0 { - n += 2 + sovGuard(uint64(m.ContingentAmount)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Contract) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ContractMeta.Size() - n += 1 + l + sovGuard(uint64(l)) - if m.State != 0 { - n += 1 + sovGuard(uint64(m.State)) - } - l = len(m.RenterSignature) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.HostSignature) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.EscrowSignedTime) - n += 1 + l + sovGuard(uint64(l)) - l = len(m.EscrowSignature) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if len(m.ChangeLog) > 0 { - for _, e := range m.ChangeLog { - l = e.Size() - n += 1 + l + sovGuard(uint64(l)) - } - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.LastModifyTime) - n += 1 + l + sovGuard(uint64(l)) - l = len(m.GuardSignature) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.PreparerPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.PreparerSignature) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.LastSuccessChallengeTime) - n += 1 + l + sovGuard(uint64(l)) - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.LastChallengeTime) - n += 1 + l + sovGuard(uint64(l)) - if m.ChallengeTimes != 0 { - n += 1 + sovGuard(uint64(m.ChallengeTimes)) - } - if m.ChallengeWarnTimes != 0 { - n += 1 + sovGuard(uint64(m.ChallengeWarnTimes)) - } - if m.ChallengeSuccessTimes != 0 { - n += 2 + sovGuard(uint64(m.ChallengeSuccessTimes)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.FirstChallengeSuccess) - n += 2 + l + sovGuard(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *FileStoreListResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Request != nil { - l = m.Request.Size() - n += 1 + l + sovGuard(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.CurrentTime) - n += 1 + l + sovGuard(uint64(l)) - if len(m.FileStoreMeta) > 0 { - for _, e := range m.FileStoreMeta { - l = e.Size() - n += 1 + l + sovGuard(uint64(l)) - } - } - if m.Count != 0 { - n += 1 + sovGuard(uint64(m.Count)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *FileStoreMeta) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.RenterPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.FileHash) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.FileSize != 0 { - n += 1 + sovGuard(uint64(m.FileSize)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.RentStart) - n += 1 + l + sovGuard(uint64(l)) - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.RentEnd) - n += 1 + l + sovGuard(uint64(l)) - if m.CheckFrequency != 0 { - n += 1 + sovGuard(uint64(m.CheckFrequency)) - } - if m.GuardFee != 0 { - n += 1 + sovGuard(uint64(m.GuardFee)) - } - if m.EscrowFee != 0 { - n += 1 + sovGuard(uint64(m.EscrowFee)) - } - if m.ShardCount != 0 { - n += 1 + sovGuard(uint64(m.ShardCount)) - } - if m.MinimumShards != 0 { - n += 1 + sovGuard(uint64(m.MinimumShards)) - } - if m.RecoverThreshold != 0 { - n += 1 + sovGuard(uint64(m.RecoverThreshold)) - } - l = len(m.EscrowPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.GuardPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.WarnChallengeTimesLimit != 0 { - n += 1 + sovGuard(uint64(m.WarnChallengeTimesLimit)) - } - if m.SuccessChallengeTimesLimit != 0 { - n += 1 + sovGuard(uint64(m.SuccessChallengeTimesLimit)) - } - if m.CheckFrequencyWarn != 0 { - n += 2 + sovGuard(uint64(m.CheckFrequencyWarn)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *FileStoreStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.FileStoreMeta.Size() - n += 1 + l + sovGuard(uint64(l)) - if m.State != 0 { - n += 1 + sovGuard(uint64(m.State)) - } - if len(m.Contracts) > 0 { - for _, e := range m.Contracts { - l = e.Size() - n += 1 + l + sovGuard(uint64(l)) - } - } - l = len(m.RenterSignature) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.GuardReceiveTime) - n += 1 + l + sovGuard(uint64(l)) - if len(m.ChangeLog) > 0 { - for _, e := range m.ChangeLog { - l = e.Size() - n += 1 + l + sovGuard(uint64(l)) - } - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.CurrentTime) - n += 1 + l + sovGuard(uint64(l)) - l = len(m.GuardSignature) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.RentalState != 0 { - n += 1 + sovGuard(uint64(m.RentalState)) - } - l = len(m.PreparerPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.PreparerSignature) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ChallengeQuestion) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ShardHash) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.HostPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.ChunkIndex != 0 { - n += 1 + sovGuard(uint64(m.ChunkIndex)) - } - l = len(m.Nonce) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.ExpectAnswer) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ProofOfReplicateChallenge) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ChallengeQuestion.Size() - n += 1 + l + sovGuard(uint64(l)) - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.ChallengeTime) - n += 1 + l + sovGuard(uint64(l)) - l = len(m.GuardPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.GuardSignature) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.HostAnswer) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.HostSignTime) - n += 1 + l + sovGuard(uint64(l)) - l = len(m.HostSignature) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *FileChallengeQuestions) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.FileHash) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if len(m.ShardQuestions) > 0 { - for _, e := range m.ShardQuestions { - l = e.Size() - n += 1 + l + sovGuard(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ShardChallengeQuestions) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.FileHash) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.ShardHash) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.PreparerPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.QuestionCount != 0 { - n += 1 + sovGuard(uint64(m.QuestionCount)) - } - if len(m.Questions) > 0 { - for _, e := range m.Questions { - l = e.Size() - n += 1 + l + sovGuard(uint64(l)) - } - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.PrepareTime) - n += 1 + l + sovGuard(uint64(l)) - l = len(m.PreparerSignature) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CheckFileStoreMetaRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.FileHash) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.RenterPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.RequesterPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.RequestTime) - n += 1 + l + sovGuard(uint64(l)) - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ListRenterFileInfoRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.RenterPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.RequesterPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.RequestPageSize != 0 { - n += 1 + sovGuard(uint64(m.RequestPageSize)) - } - if m.RequestPageIndex != 0 { - n += 1 + sovGuard(uint64(m.RequestPageIndex)) - } - if m.RequestTime != nil { - l = github_com_tron_us_protobuf_types.SizeOfStdTime(*m.RequestTime) - n += 1 + l + sovGuard(uint64(l)) - } - if m.LastModifyTime != nil { - l = github_com_tron_us_protobuf_types.SizeOfStdTime(*m.LastModifyTime) - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ListHostContractsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.HostPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.RequesterPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.RequestPageSize != 0 { - n += 1 + sovGuard(uint64(m.RequestPageSize)) - } - if m.RequestPageIndex != 0 { - n += 1 + sovGuard(uint64(m.RequestPageIndex)) - } - if m.LastModifyTimeSince != nil { - l = github_com_tron_us_protobuf_types.SizeOfStdTime(*m.LastModifyTimeSince) - n += 1 + l + sovGuard(uint64(l)) - } - if m.LastModifyTimeTo != nil { - l = github_com_tron_us_protobuf_types.SizeOfStdTime(*m.LastModifyTimeTo) - n += 1 + l + sovGuard(uint64(l)) - } - if m.State != 0 { - n += 1 + sovGuard(uint64(m.State)) - } - if m.RequestTime != nil { - l = github_com_tron_us_protobuf_types.SizeOfStdTime(*m.RequestTime) - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ContractsList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Request != nil { - l = m.Request.Size() - n += 1 + l + sovGuard(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.GenerateTime) - n += 1 + l + sovGuard(uint64(l)) - if len(m.Contracts) > 0 { - for _, e := range m.Contracts { - l = e.Size() - n += 1 + l + sovGuard(uint64(l)) - } - } - if m.Count != 0 { - n += 1 + sovGuard(uint64(m.Count)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ReadyForChallengeRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.RenterPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.FileHash) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.ShardHash) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.ContractId) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.HostPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.PrepareTime) - n += 1 + l + sovGuard(uint64(l)) - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.IsRepair { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RequestChallengeQuestion) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Question != nil { - l = m.Question.Size() - n += 1 + l + sovGuard(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.PrepareTime) - n += 1 + l + sovGuard(uint64(l)) - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.IsRepair { - n += 2 - } - l = len(m.FileHash) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ResponseChallengeQuestion) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Answer != nil { - l = m.Answer.Size() - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.HostPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResolveTime) - n += 1 + l + sovGuard(uint64(l)) - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.IsRepair { - n += 2 - } - l = len(m.FileHash) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ForceRepairRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.RenterPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.FileHash) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.AuthPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Result) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovGuard(uint64(m.Code)) - } - l = len(m.Message) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime) - n += 1 + l + sovGuard(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RepairContract) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.FileHash) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if len(m.LostShardHash) > 0 { - for _, s := range m.LostShardHash { - l = len(s) - n += 1 + l + sovGuard(uint64(l)) - } - } - if m.FileSize != 0 { - n += 1 + sovGuard(uint64(m.FileSize)) - } - if m.DownloadRewardAmount != 0 { - n += 1 + sovGuard(uint64(m.DownloadRewardAmount)) - } - if m.RepairRewardAmount != 0 { - n += 1 + sovGuard(uint64(m.RepairRewardAmount)) - } - l = len(m.RepairPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.RepairSignTime) - n += 1 + l + sovGuard(uint64(l)) - l = len(m.RepairSignature) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.DownloadContractId) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.RepairContractId) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.GuardSignTime) - n += 1 + l + sovGuard(uint64(l)) - l = len(m.GuardSignature) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RepairContractResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Contract != nil { - l = m.Contract.Size() - n += 1 + l + sovGuard(uint64(l)) - } - if m.Status != 0 { - n += 1 + sovGuard(uint64(m.Status)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RequestRepairContracts) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.FileHash) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.RepairNode) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.RepairSignTime) - n += 1 + l + sovGuard(uint64(l)) - l = len(m.RepairSignature) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ResponseRepairContracts) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.FileHash) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.RepairNode) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.State != 0 { - n += 1 + sovGuard(uint64(m.State)) - } - if m.Status != nil { - l = m.Status.Size() - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.GuardPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.SignTime) - n += 1 + l + sovGuard(uint64(l)) - l = len(m.GuardSignature) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CancelContractRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.FileHash) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.ShardHash) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.ContractId) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.RenterPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.HostPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.Reason != 0 { - n += 1 + sovGuard(uint64(m.Reason)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.SignTime) - n += 1 + l + sovGuard(uint64(l)) - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ChallengeJobRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.NodePid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.RequestTime) - n += 1 + l + sovGuard(uint64(l)) - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ChallengeJobResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.NodePid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.IssuerPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.JobId) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.PackageUrl) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.PackageQuestionsCount != 0 { - n += 1 + sovGuard(uint64(m.PackageQuestionsCount)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.SendTime) - n += 1 + l + sovGuard(uint64(l)) - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.JobFinishDeadline) - n += 1 + l + sovGuard(uint64(l)) - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ChallengeJobResult) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.NodePid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.JobId) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if len(m.Result) > 0 { - for _, e := range m.Result { - l = e.Size() - n += 1 + l + sovGuard(uint64(l)) - } - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.SubmitTime) - n += 1 + l + sovGuard(uint64(l)) - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ShardChallengeResult) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.HostPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.FileHash) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.ShardHash) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.Nonce) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.Result) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.IsTimeout { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DeCentralQuestions) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Qs) > 0 { - for _, e := range m.Qs { - l = e.Size() - n += 1 + l + sovGuard(uint64(l)) - } - } - if m.Count != 0 { - n += 1 + sovGuard(uint64(m.Count)) - } - l = len(m.Uuid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.Url) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.EndTime != nil { - l = github_com_tron_us_protobuf_types.SizeOfStdTime(*m.EndTime) - n += 1 + l + sovGuard(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DeQuestion) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ShardHash) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.HostPid) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.ChunkIndex != 0 { - n += 1 + sovGuard(uint64(m.ChunkIndex)) - } - l = len(m.Nonce) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - l = len(m.FileHash) - if l > 0 { - n += 1 + l + sovGuard(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovGuard(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGuard(x uint64) (n int) { - return sovGuard(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *AdminQuery) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AdminQuery: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AdminQuery: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequesterPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequesterPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field QueryDate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.QueryDate, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field QueryCount", wireType) - } - m.QueryCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.QueryCount |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.RequestTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DailySummary) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DailySummary: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DailySummary: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field QueryDate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.QueryDate, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.ResponseTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PreparerPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PreparerPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WorkingStorageSize", wireType) - } - m.WorkingStorageSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.WorkingStorageSize |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NewContracts", wireType) - } - m.NewContracts = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NewContracts |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NewContractsHost", wireType) - } - m.NewContractsHost = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NewContractsHost |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NewContractsRenter", wireType) - } - m.NewContractsRenter = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NewContractsRenter |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NewContractsAveragePrice", wireType) - } - m.NewContractsAveragePrice = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NewContractsAveragePrice |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NewFiles", wireType) - } - m.NewFiles = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NewFiles |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NewShardsSize", wireType) - } - m.NewShardsSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NewShardsSize |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HostSummary) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HostSummary: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HostSummary: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field QueryDate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.QueryDate, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.ResponseTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PreparerPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PreparerPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RecordCount", wireType) - } - m.RecordCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RecordCount |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Status = append(m.Status, &HostStatus{}) - if err := m.Status[len(m.Status)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TotalStateSummary) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TotalStateSummary: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TotalStateSummary: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field QueryDate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.QueryDate, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.ResponseTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PreparerPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PreparerPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidContractCount", wireType) - } - m.ValidContractCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ValidContractCount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExistedShardSize", wireType) - } - m.ExistedShardSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ExistedShardSize |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field InvalidContractCount", wireType) - } - m.InvalidContractCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.InvalidContractCount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LostShardSize", wireType) - } - m.LostShardSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LostShardSize |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalHostReward", wireType) - } - m.TotalHostReward = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalHostReward |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HostStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HostStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HostStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FileSize", wireType) - } - m.FileSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FileSize |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WorkAmount", wireType) - } - m.WorkAmount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.WorkAmount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardBtt", wireType) - } - m.RewardBtt = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RewardBtt |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SuspectCheat", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.SuspectCheat = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Log) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Log: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Log: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChangeTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.ChangeTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OriginatorPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OriginatorPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Change", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Change = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ContractMeta) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ContractMeta: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ContractMeta: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContractId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RenterPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RenterPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ShardHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ShardHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ShardIndex", wireType) - } - m.ShardIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ShardIndex |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ShardFileSize", wireType) - } - m.ShardFileSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ShardFileSize |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FileHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FileHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RentStart", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.RentStart, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RentEnd", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.RentEnd, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GuardPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GuardPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EscrowPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) - } - m.Price = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Price |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - m.Amount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Amount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 14: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CollateralAmount", wireType) - } - m.CollateralAmount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CollateralAmount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 15: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PayoutSchedule", wireType) - } - m.PayoutSchedule = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PayoutSchedule |= ContractMeta_Schedule(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 16: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NumPayouts", wireType) - } - m.NumPayouts = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NumPayouts |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 17: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ContingentAmount", wireType) - } - m.ContingentAmount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ContingentAmount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Contract) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Contract: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Contract: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ContractMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - m.State = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.State |= Contract_ContractState(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RenterSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RenterSignature = append(m.RenterSignature[:0], dAtA[iNdEx:postIndex]...) - if m.RenterSignature == nil { - m.RenterSignature = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostSignature = append(m.HostSignature[:0], dAtA[iNdEx:postIndex]...) - if m.HostSignature == nil { - m.HostSignature = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowSignedTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.EscrowSignedTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EscrowSignature = append(m.EscrowSignature[:0], dAtA[iNdEx:postIndex]...) - if m.EscrowSignature == nil { - m.EscrowSignature = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChangeLog", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChangeLog = append(m.ChangeLog, &Log{}) - if err := m.ChangeLog[len(m.ChangeLog)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastModifyTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.LastModifyTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GuardSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GuardSignature = append(m.GuardSignature[:0], dAtA[iNdEx:postIndex]...) - if m.GuardSignature == nil { - m.GuardSignature = []byte{} - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PreparerPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PreparerPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PreparerSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PreparerSignature = append(m.PreparerSignature[:0], dAtA[iNdEx:postIndex]...) - if m.PreparerSignature == nil { - m.PreparerSignature = []byte{} - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastSuccessChallengeTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.LastSuccessChallengeTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastChallengeTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.LastChallengeTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 14: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ChallengeTimes", wireType) - } - m.ChallengeTimes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ChallengeTimes |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 15: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ChallengeWarnTimes", wireType) - } - m.ChallengeWarnTimes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ChallengeWarnTimes |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 16: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ChallengeSuccessTimes", wireType) - } - m.ChallengeSuccessTimes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ChallengeSuccessTimes |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FirstChallengeSuccess", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.FirstChallengeSuccess, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FileStoreListResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FileStoreListResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FileStoreListResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Request == nil { - m.Request = &ListRenterFileInfoRequest{} - } - if err := m.Request.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CurrentTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.CurrentTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FileStoreMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FileStoreMeta = append(m.FileStoreMeta, &FileStoreMeta{}) - if err := m.FileStoreMeta[len(m.FileStoreMeta)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) - } - m.Count = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Count |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FileStoreMeta) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FileStoreMeta: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FileStoreMeta: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RenterPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RenterPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FileHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FileHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FileSize", wireType) - } - m.FileSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FileSize |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RentStart", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.RentStart, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RentEnd", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.RentEnd, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CheckFrequency", wireType) - } - m.CheckFrequency = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CheckFrequency |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GuardFee", wireType) - } - m.GuardFee = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.GuardFee |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowFee", wireType) - } - m.EscrowFee = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EscrowFee |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ShardCount", wireType) - } - m.ShardCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ShardCount |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MinimumShards", wireType) - } - m.MinimumShards = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MinimumShards |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RecoverThreshold", wireType) - } - m.RecoverThreshold = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RecoverThreshold |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EscrowPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GuardPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GuardPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 14: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WarnChallengeTimesLimit", wireType) - } - m.WarnChallengeTimesLimit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.WarnChallengeTimesLimit |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 15: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SuccessChallengeTimesLimit", wireType) - } - m.SuccessChallengeTimesLimit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SuccessChallengeTimesLimit |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 16: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CheckFrequencyWarn", wireType) - } - m.CheckFrequencyWarn = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CheckFrequencyWarn |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FileStoreStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FileStoreStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FileStoreStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FileStoreMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.FileStoreMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - m.State = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.State |= FileStoreStatus_MetaState(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Contracts", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Contracts = append(m.Contracts, &Contract{}) - if err := m.Contracts[len(m.Contracts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RenterSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RenterSignature = append(m.RenterSignature[:0], dAtA[iNdEx:postIndex]...) - if m.RenterSignature == nil { - m.RenterSignature = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GuardReceiveTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.GuardReceiveTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChangeLog", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChangeLog = append(m.ChangeLog, &Log{}) - if err := m.ChangeLog[len(m.ChangeLog)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CurrentTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.CurrentTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GuardSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GuardSignature = append(m.GuardSignature[:0], dAtA[iNdEx:postIndex]...) - if m.GuardSignature == nil { - m.GuardSignature = []byte{} - } - iNdEx = postIndex - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RentalState", wireType) - } - m.RentalState = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RentalState |= FileStoreStatus_RentalState(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PreparerPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PreparerPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PreparerSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PreparerSignature = append(m.PreparerSignature[:0], dAtA[iNdEx:postIndex]...) - if m.PreparerSignature == nil { - m.PreparerSignature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ChallengeQuestion) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ChallengeQuestion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ChallengeQuestion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ShardHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ShardHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ChunkIndex", wireType) - } - m.ChunkIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ChunkIndex |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Nonce = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpectAnswer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ExpectAnswer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProofOfReplicateChallenge) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ProofOfReplicateChallenge: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProofOfReplicateChallenge: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChallengeQuestion", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ChallengeQuestion.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChallengeTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.ChallengeTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GuardPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GuardPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GuardSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GuardSignature = append(m.GuardSignature[:0], dAtA[iNdEx:postIndex]...) - if m.GuardSignature == nil { - m.GuardSignature = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostAnswer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostAnswer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostSignTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.HostSignTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostSignature = append(m.HostSignature[:0], dAtA[iNdEx:postIndex]...) - if m.HostSignature == nil { - m.HostSignature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FileChallengeQuestions) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FileChallengeQuestions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FileChallengeQuestions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FileHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FileHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ShardQuestions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ShardQuestions = append(m.ShardQuestions, &ShardChallengeQuestions{}) - if err := m.ShardQuestions[len(m.ShardQuestions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ShardChallengeQuestions) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ShardChallengeQuestions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ShardChallengeQuestions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FileHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FileHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ShardHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ShardHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PreparerPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PreparerPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field QuestionCount", wireType) - } - m.QuestionCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.QuestionCount |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Questions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Questions = append(m.Questions, &ChallengeQuestion{}) - if err := m.Questions[len(m.Questions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PrepareTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.PrepareTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PreparerSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PreparerSignature = append(m.PreparerSignature[:0], dAtA[iNdEx:postIndex]...) - if m.PreparerSignature == nil { - m.PreparerSignature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CheckFileStoreMetaRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CheckFileStoreMetaRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CheckFileStoreMetaRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FileHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FileHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RenterPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RenterPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequesterPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequesterPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.RequestTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListRenterFileInfoRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListRenterFileInfoRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListRenterFileInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RenterPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RenterPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequesterPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequesterPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestPageSize", wireType) - } - m.RequestPageSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RequestPageSize |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestPageIndex", wireType) - } - m.RequestPageIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RequestPageIndex |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RequestTime == nil { - m.RequestTime = new(time.Time) - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(m.RequestTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastModifyTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LastModifyTime == nil { - m.LastModifyTime = new(time.Time) - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(m.LastModifyTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListHostContractsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListHostContractsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListHostContractsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequesterPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequesterPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestPageSize", wireType) - } - m.RequestPageSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RequestPageSize |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestPageIndex", wireType) - } - m.RequestPageIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RequestPageIndex |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastModifyTimeSince", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LastModifyTimeSince == nil { - m.LastModifyTimeSince = new(time.Time) - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(m.LastModifyTimeSince, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastModifyTimeTo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LastModifyTimeTo == nil { - m.LastModifyTimeTo = new(time.Time) - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(m.LastModifyTimeTo, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - m.State = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.State |= ListHostContractsRequest_SelectState(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RequestTime == nil { - m.RequestTime = new(time.Time) - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(m.RequestTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ContractsList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ContractsList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ContractsList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Request == nil { - m.Request = &ListHostContractsRequest{} - } - if err := m.Request.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GenerateTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.GenerateTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Contracts", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Contracts = append(m.Contracts, &Contract{}) - if err := m.Contracts[len(m.Contracts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) - } - m.Count = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Count |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ReadyForChallengeRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ReadyForChallengeRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ReadyForChallengeRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RenterPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RenterPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FileHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FileHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ShardHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ShardHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContractId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PrepareTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.PrepareTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsRepair", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsRepair = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RequestChallengeQuestion) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RequestChallengeQuestion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RequestChallengeQuestion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Question", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Question == nil { - m.Question = &ChallengeQuestion{} - } - if err := m.Question.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PrepareTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.PrepareTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsRepair", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsRepair = bool(v != 0) - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FileHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FileHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ResponseChallengeQuestion) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResponseChallengeQuestion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResponseChallengeQuestion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Answer", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Answer == nil { - m.Answer = &ChallengeQuestion{} - } - if err := m.Answer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResolveTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.ResolveTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsRepair", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsRepair = bool(v != 0) - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FileHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FileHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ForceRepairRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ForceRepairRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ForceRepairRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RenterPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RenterPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FileHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FileHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AuthPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Result) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Result: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Result: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= ResponseCode(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.ResponseTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RepairContract) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RepairContract: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RepairContract: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FileHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FileHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LostShardHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LostShardHash = append(m.LostShardHash, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FileSize", wireType) - } - m.FileSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FileSize |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DownloadRewardAmount", wireType) - } - m.DownloadRewardAmount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DownloadRewardAmount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RepairRewardAmount", wireType) - } - m.RepairRewardAmount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RepairRewardAmount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RepairPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RepairPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RepairSignTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.RepairSignTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RepairSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RepairSignature = append(m.RepairSignature[:0], dAtA[iNdEx:postIndex]...) - if m.RepairSignature == nil { - m.RepairSignature = []byte{} - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DownloadContractId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DownloadContractId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RepairContractId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RepairContractId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GuardSignTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.GuardSignTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GuardSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GuardSignature = append(m.GuardSignature[:0], dAtA[iNdEx:postIndex]...) - if m.GuardSignature == nil { - m.GuardSignature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RepairContractResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RepairContractResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RepairContractResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Contract", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Contract == nil { - m.Contract = &RepairContract{} - } - if err := m.Contract.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - m.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Status |= RepairContractResponse_ContractResponseStatus(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RequestRepairContracts) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RequestRepairContracts: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RequestRepairContracts: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FileHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FileHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RepairNode", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RepairNode = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RepairSignTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.RepairSignTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RepairSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RepairSignature = append(m.RepairSignature[:0], dAtA[iNdEx:postIndex]...) - if m.RepairSignature == nil { - m.RepairSignature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ResponseRepairContracts) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResponseRepairContracts: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResponseRepairContracts: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FileHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FileHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RepairNode", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RepairNode = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - m.State = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.State |= ResponseRepairContracts_RepairStat(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Status == nil { - m.Status = &FileStoreStatus{} - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GuardPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GuardPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SignTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.SignTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GuardSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GuardSignature = append(m.GuardSignature[:0], dAtA[iNdEx:postIndex]...) - if m.GuardSignature == nil { - m.GuardSignature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CancelContractRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CancelContractRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CancelContractRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FileHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FileHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ShardHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ShardHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContractId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RenterPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RenterPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) - } - m.Reason = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Reason |= CancelContractRequest_CancelReason(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SignTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.SignTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ChallengeJobRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ChallengeJobRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ChallengeJobRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodePid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NodePid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.RequestTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ChallengeJobResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ChallengeJobResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ChallengeJobResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodePid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NodePid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IssuerPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IssuerPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JobId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.JobId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PackageUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PackageUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PackageQuestionsCount", wireType) - } - m.PackageQuestionsCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PackageQuestionsCount |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SendTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.SendTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JobFinishDeadline", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.JobFinishDeadline, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ChallengeJobResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ChallengeJobResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ChallengeJobResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodePid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NodePid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JobId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.JobId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Result = append(m.Result, &ShardChallengeResult{}) - if err := m.Result[len(m.Result)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubmitTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.SubmitTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ShardChallengeResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ShardChallengeResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ShardChallengeResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FileHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FileHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ShardHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ShardHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Nonce = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Result = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsTimeout", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsTimeout = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeCentralQuestions) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeCentralQuestions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeCentralQuestions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Qs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Qs = append(m.Qs, &DeQuestion{}) - if err := m.Qs[len(m.Qs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) - } - m.Count = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Count |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uuid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Uuid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Url = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EndTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.EndTime == nil { - m.EndTime = new(time.Time) - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(m.EndTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeQuestion) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeQuestion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeQuestion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ShardHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ShardHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ChunkIndex", wireType) - } - m.ChunkIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ChunkIndex |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Nonce = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FileHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGuard - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGuard - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGuard - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FileHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGuard(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGuard - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGuard(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGuard - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGuard - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGuard - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGuard - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGuard - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGuard - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGuard = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGuard = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGuard = fmt.Errorf("proto: unexpected end of group") -) diff --git a/protos/guard/guard.proto b/protos/guard/guard.proto deleted file mode 100644 index dbc5c58..0000000 --- a/protos/guard/guard.proto +++ /dev/null @@ -1,608 +0,0 @@ -syntax = "proto3"; - -package guard; - -// gogo plugin toggles -option (gogoproto.gogoproto_import) = true; -option (gogoproto.goproto_registration) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.messagename_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.unmarshaler_all) = true; -// golang option -option go_package = "guard"; -// java options -option java_multiple_files = true; -option java_outer_classname = "GuardProto"; -option java_package = "io.btfs.guard"; - -import "github.com/tron-us/protobuf/gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; - -service GuardService { - rpc SubmitFileStoreMeta(FileStoreStatus) returns (Result); - rpc SendQuestions(FileChallengeQuestions) returns (Result); //used for renter send the questions to guard - rpc CheckFileStoreMeta(CheckFileStoreMetaRequest) returns (FileStoreStatus); //reserved for other nodes to check contract status - rpc ReadyForChallenge(ReadyForChallengeRequest) returns (Result); - rpc ForceRepair(ForceRepairRequest) returns (Result); - rpc ListHostContracts(ListHostContractsRequest) returns (ContractsList); - rpc RetrieveFileInfo(ListRenterFileInfoRequest) returns (FileStoreListResponse); - rpc RequestChallenge(ReadyForChallengeRequest) returns (RequestChallengeQuestion); - rpc ResponseChallenge(ResponseChallengeQuestion) returns (Result); - rpc SubmitRepairContract(RepairContract) returns (RepairContractResponse); - rpc RequestForRepairContracts(RequestRepairContracts) returns (ResponseRepairContracts); - rpc ReportFailToDownload(CancelContractRequest) returns (Result); - //used for decentral challenge - rpc RequestForChallengeJob(ChallengeJobRequest) returns (ChallengeJobResponse); - rpc SubmitChallengeJobResult(ChallengeJobResult) returns (Result); - //used by btfs scan - rpc AdminGetDailySummary(AdminQuery) returns (DailySummary); - rpc AdminGetDailyHostsRankNew(AdminQuery) returns (HostSummary); //query the hosts of the day's new contracts' file size - rpc AdminGetDailyHostsRankTotal(AdminQuery) returns (HostSummary); //query the hosts of total storage file size - rpc AdminGetDailyTotalState(AdminQuery) returns (TotalStateSummary); //query the shard size and contracts for total storage -} - -message AdminQuery { - string requester_pid = 1; - google.protobuf.Timestamp query_date = 2 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - int32 query_count = 3; //for the daily summary query, it is always 1; only the not_cheat records count, cheat records will be return same time - google.protobuf.Timestamp request_time = 4 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - bytes signature = 5; -} - -message DailySummary { - google.protobuf.Timestamp query_date = 1 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - google.protobuf.Timestamp response_time = 2 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - string preparer_pid = 3; //the system who generate the result, should be guard's peer id - bytes signature = 4; - int64 working_storage_size = 5; //total working storage size of the day - int64 new_contracts = 6; //the day's new contracts count - int64 new_contracts_host = 7; //count of the hosts who receive and pass challenge the day - int64 new_contracts_renter = 8; //count of the renters who upload contract the day - int64 new_contracts_average_price = 9; //average price of the day's contracts - int64 new_files = 10; //files count of the day - int64 new_shards_size = 11; //all shards file size of the day -} - -message HostSummary { - google.protobuf.Timestamp query_date = 1 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - google.protobuf.Timestamp response_time = 2 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - string preparer_pid = 3; //the system who generate the result, should be guard's peer id - bytes signature = 4; - int32 record_count = 5; - repeated HostStatus status = 6; -} - -message TotalStateSummary { - google.protobuf.Timestamp query_date = 1 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - google.protobuf.Timestamp response_time = 2 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - string preparer_pid = 3; - bytes signature = 4; - int64 valid_contract_count = 5; - int64 existed_shard_size = 6; - int64 invalid_contract_count = 7; - int64 lost_shard_size = 8; - int64 total_host_reward = 9; -} - -message HostStatus { - string host_pid = 1; - int64 file_size = 2; - int64 work_amount = 3; //amount the hosts received or will receive in the contracts - int64 reward_btt = 4; //only have value for new contract query - bool suspect_cheat = 5; -} - -message Log { - google.protobuf.Timestamp change_time = 1 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - string originator_pid = 2; - string change = 3; -} - -//the relationship of the objects from Guard's view -// FileStoreMeta (1:n) Contract (1:n) payout -//contract is the signed document between the renter and host for one shard's storage -// the contract information contains buyer, seller, escrow, guard , storage shard's information, rent duration, amount, payment method(periodically and times) -//ContractMeta is the information which will not be changed after proposal -//Contract technically is the contract execution record, it contains the contractMeta and state information -message ContractMeta { - //Contract proposed by renter, will not be changed after renter proposed - string contract_id = 1; //one id which generated by renter, and will be check unique by escrow service - string renter_pid = 2; //renter's wallet peerId - string host_pid = 3; //host’s wallet peerId - string shard_hash = 4; //shard’s hash - int32 shard_index = 5; //shard’s sequence of the original file - int64 shard_file_size = 6; //shard’s file size - string file_hash = 7; //original file's hash, reserved point32 back to FileStoreMeta - google.protobuf.Timestamp rent_start = 8 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; //rent start time - google.protobuf.Timestamp rent_end = 9 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; //rent end time - string guard_pid = 10; //renter proposed guard's peerId - string escrow_pid = 11; //renter proposed escrow's peerId - int64 price = 12; //the price which agreed by host and rental, on the first phase, it equal to the proposed_price - int64 amount = 13; //the amount which agreed by host and rental, on the first phase, it should be equal file_size*duration*agreed_price - int64 collateral_amount = 14; - enum Schedule { - MONTHLY = 0; - QUARTERLY = 1; - ANNUALLY = 2; - } - Schedule payout_schedule = 15; // schedule for payouts - int32 num_payouts = 16; // numbers of payouts - int64 contingent_amount = 17; -} - -message Contract { - //the contract executor record, changed frequently after proposal - ContractMeta contract = 1 [ - (gogoproto.embed) = true, - (gogoproto.nullable) = false - ]; - enum ContractState { - DRAFT = 0; //the contract was draft, but the escrow service did not received the money - SIGNED = 1; // the escrow service received the money from renter, the contract was start. - UPLOADED = 2; //the first challenge was done, which means the shard was in the host, all pending payouts can be issued now - LOST = 3; // the challenge failed, the following payout should be hold or even stopped - CANCELED = 4; //if the shard was rebuild after LOST, or after some days of NO QUESTION, it go to CANCELED status - CLOSED = 5; // the all work in such contract was done - RENEWED = 6; // the contract got renewed for guard repair - OBSOLETE = 7; //the contract was replaced with some other contract after it was canceled or renewed - WARN = 8; //the shard is in warn status - DRAFT_WARN = 9; // get the warn status before the first success challenge - READY_CHALLENGE = 10; //got the host's request it is ready for challenge - RECREATED = 11; //renew the specific contract for new duration - REQUEST_CHALLENGE = 12; //host request challenge - } - ContractState state = 2; - bytes renter_signature = 3; //renter’s signature for the sub contract - bytes host_signature = 4; //host’s signature from the sub contract - google.protobuf.Timestamp escrow_signed_time = 5 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; //contract signed time - bytes escrow_signature = 6; //escrow's signature - repeated Log change_log = 7 [(gogoproto.pgtag) = "-"]; //TBD one field to store the contract change log, need to discuss whether need the field - google.protobuf.Timestamp last_modify_time = 8 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - bytes guard_signature = 9; - string preparer_pid = 10; //while the contract got renewed, some stakeholder take renter's place to prepare such contract - bytes preparer_signature = 11; - google.protobuf.Timestamp last_success_challenge_time = 12 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - google.protobuf.Timestamp last_challenge_time = 13 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - int32 challenge_times = 14; //total challenge times till now - int32 challenge_warn_times = 15; //record times of timeout response after last success challenge time - int32 challenge_success_times = 16; //record times of success after the contract was put into the warn status - google.protobuf.Timestamp first_challenge_success = 17 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; -} - -message FileStoreListResponse { - ListRenterFileInfoRequest request = 1; - google.protobuf.Timestamp current_time = 2 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - repeated FileStoreMeta file_store_meta = 3; - int32 count = 4; - bytes signature = 5; -} - -message FileStoreMeta { - //file store meta prepared by renter, will not changed after proposal - string renter_pid = 1; // buyer wallet peerId - string file_hash = 2; // file’s hash - int64 file_size = 3; // file’s size - google.protobuf.Timestamp rent_start = 4 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; //rent start time - google.protobuf.Timestamp rent_end = 5 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; //rent end time - int32 check_frequency = 6; //reserve: shard check frequency in days, 1 means check once per day - int64 guard_fee = 7; // reserve: the fee which guard will charge for supporting - int64 escrow_fee = 8; //reserve: the fee which escrow will charge for supporting - int32 shard_count = 9; //shard's count, by default is 30 - int32 minimum_shards = 10; //minimum count of shards which can recover the whole file, by default is 10 - int32 recover_threshold = 11; //reserved field, indicate the threshold for starting to recover - string escrow_pid = 12; - string guard_pid = 13; - int32 warn_challenge_times_limit = 14; //reserve: indicate how many times warn challenge will take the contract to cancel status, renter cannot set it now, use 7 as default - int32 success_challenge_times_limit = 15; //reserve: indicate how many times success will take the contract from warn status back to right, renter cannot set it now, use 1 as default - int32 check_frequency_warn = 16; //reserve: check frequency in days while in warn status, renter cannot set it now, use 1 as default -} - -message FileStoreStatus { - FileStoreMeta file_store_meta = 1 [ - (gogoproto.embed) = true, - (gogoproto.nullable) = false - ]; - enum MetaState { - DRAFT = 0; //the proposal was submit by renter - UPLOADING = 1; //all related contracts were signed, and renter is uploading shards and questions - RUNNING = 2; //guard complete the first challenge for all shards - PARTIAL_LOST = 3; //some shards were lost, but the whole file is safe - LOST = 4; //some shards were lost and the whole file cannot be recovered now - DONE = 5; //all contracts were done - CANCELED = 6; //reserved for the cancel contract - RECREATED = 7; //file storage was renewed for additional period - } - MetaState state = 2; - repeated Contract contracts = 3 [(gogoproto.pgtag) = "-"]; - bytes renter_signature = 4; //rental's signature for the first full file status with contracts - google.protobuf.Timestamp guard_receive_time = 5 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; //guard received time, which used to calculate the timeout for cancel - repeated Log change_log = 6 [(gogoproto.pgtag) = "-"]; - google.protobuf.Timestamp current_time = 7 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; //the time for generate the status - bytes guard_signature = 8; - enum RentalState { - NEW = 0; //the rental was first initialized - PARTIAL_NEW = 1; //part of the file status was new, indicate that some contracts were rebuild - EXPIRED = 2; //the file rental was expired, indicate that all shards can be removed from host - RENEW = 3; //the contract got renewed - RECREATE = 4; //storage period was extended - } - RentalState rental_state = 9; - string preparer_pid = 10; //the stakeholder who prepared such file, if the file is NEW state, the preparer is rental - bytes preparer_signature = 11; //preparer's signature for FileStoreMeta -} - -message ChallengeQuestion { - string shard_hash = 1; //shard hash - string host_pid = 2; //host's peerId - int32 chunk_index = 3; //the chunk's index for calculation - string nonce = 4; //the challenge questions's random nonce - string expect_answer = 5; //the challenge expected answer -} - -message ProofOfReplicateChallenge { - ChallengeQuestion question = 1 [ - (gogoproto.embed) = true, - (gogoproto.nullable) = false - ]; //of course expect_answer should be clear before send to the host` - google.protobuf.Timestamp challenge_time = 2 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; //challenge time from guard - string guard_pid = 3; //guard's peerId - bytes guard_signature = 4; //guard signed for the challenge - string host_answer = 5; //challenge answer - google.protobuf.Timestamp host_sign_time = 6 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; //response time from host - bytes host_signature = 7; -} - -message FileChallengeQuestions { - string file_hash = 1; - repeated ShardChallengeQuestions shard_questions = 2; -} - -message ShardChallengeQuestions { - string file_hash = 1; //file's hash - string shard_hash = 2; - string preparer_pid = 3; //challenge questions preparer's peerId, it is renter peerId at phase 1 - int32 question_count = 4; - repeated ChallengeQuestion questions = 5; - google.protobuf.Timestamp prepare_time = 6 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - bytes preparer_signature = 7; -} - -message CheckFileStoreMetaRequest { - string file_hash = 1; - string renter_pid = 2; - string requester_pid = 3; - google.protobuf.Timestamp request_time = 4 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - bytes signature = 5; //requester signed -} - -message ListRenterFileInfoRequest { - string renter_pid = 1; - string requester_pid = 2; - int32 request_page_size = 3; - int32 request_page_index = 4; - google.protobuf.Timestamp request_time = 5 [ - (gogoproto.nullable) = true, - (gogoproto.stdtime) = true - ]; - google.protobuf.Timestamp last_modify_time = 6 [ - (gogoproto.nullable) = true, - (gogoproto.stdtime) = true - ]; - bytes signature = 7; -} - -message ListHostContractsRequest { - string host_pid = 1; - string requester_pid = 2; - int32 request_page_size = 3; - int32 request_page_index = 4; - google.protobuf.Timestamp last_modify_time_since = 5 [ - (gogoproto.nullable) = true, - (gogoproto.stdtime) = true - ]; - google.protobuf.Timestamp last_modify_time_to = 6 [ - (gogoproto.nullable) = true, - (gogoproto.stdtime) = true - ]; - enum SelectState { - ALL = 0; - ACTIVE = 1; - CLOSED = 2; - } - SelectState state = 7; - google.protobuf.Timestamp request_time = 8 [ - (gogoproto.nullable) = true, - (gogoproto.stdtime) = true - ]; - bytes signature = 9; //requester signed -} - -message ContractsList { - ListHostContractsRequest request = 1; - google.protobuf.Timestamp generate_time = 2 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - repeated Contract contracts = 3; - int32 count = 4; - bytes signature = 5; -} - -message ReadyForChallengeRequest { - string renter_pid = 1; - string file_hash = 2; - string shard_hash = 3; - string contract_id = 4; - string host_pid = 5; - google.protobuf.Timestamp prepare_time = 6 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - bytes signature = 7; - bool is_repair = 8; -} - -message RequestChallengeQuestion { - ChallengeQuestion question = 1; - google.protobuf.Timestamp prepare_time = 2 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - bytes signature = 3; - bool is_repair = 4; - string file_hash = 5; -} - -message ResponseChallengeQuestion { - ChallengeQuestion answer = 1; - string host_pid = 2; - google.protobuf.Timestamp resolve_time = 3 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - bytes signature = 4; - bool is_repair = 5; - string file_hash = 6; -} - -message ForceRepairRequest { - string renter_pid = 1; - string file_hash = 2; - string auth_pid = 3; //the peer who was authorized to issue force repair request - bytes signature = 4; -} - -enum ResponseCode { - SUCCESS = 0; - SIGNATURE_FORMAT_ERROR = 1; - COMPUTE_ADDRESS_ERROR = 2; - OTHER_ERROR = 20; -} - -message Result { - ResponseCode code = 1; - string message = 2; - google.protobuf.Timestamp response_time = 3 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; -} - -message RepairContract { - string file_hash = 1; - repeated string lost_shard_hash = 2; - int64 file_size = 3; - int64 download_reward_amount = 4; - int64 repair_reward_amount = 5; - string repair_pid = 6; - google.protobuf.Timestamp repair_sign_time = 7 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - bytes repair_signature = 8; - string download_contract_id = 9; - string repair_contract_id = 10; - google.protobuf.Timestamp guard_sign_time = 11 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - bytes guard_signature = 12; -} - -message RepairContractResponse { - RepairContract contract = 1; - enum ContractResponseStatus { - BOTH_SIGNED = 0; //the contract signed with guard signature - WAIT_LIST = 1; //guard cannot sign the contract now for some reason, - REJECTED = 2; - } - ContractResponseStatus status = 2; -} - -message RequestRepairContracts { - string file_hash = 1; - string repair_node = 2; - google.protobuf.Timestamp repair_sign_time = 3 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - bytes repair_signature = 4; -} - -message ResponseRepairContracts { - string file_hash = 1; - string repair_node = 2; - enum RepairStat { - CONTRACT_READY = 0; - DOWNLOAD_NOT_DONE = 1; //repair node need to pass the requestChallenge for the download file - REQUEST_AGAIN = 2; //the contract is uploading by another repair node which download file before, and the contracts can assigned to current repair node if that node did not complete work in given time - CONTRACT_CLOSED = 3; //the contract is done by another repair node, and current repair node can get the download reward - } - RepairStat state = 3; - FileStoreStatus status = 4; - string guard_pid = 5; - google.protobuf.Timestamp sign_time = 6 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - bytes guard_signature = 7; -} - -message CancelContractRequest { - string file_hash = 1; - string shard_hash = 2; - string contract_id = 3; - string renter_pid = 4; - string host_pid = 5; - enum CancelReason { - HOST_REQUEST = 0; - DOWNLOAD_FAIL = 1; - RENTER_REQUEST = 2; - OTHER = 3; - } - CancelReason reason = 6; - google.protobuf.Timestamp sign_time = 7 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - bytes signature = 8; -} - -message ChallengeJobRequest { - string node_pid = 1; - google.protobuf.Timestamp request_time = 2 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - bytes signature = 3; -} - -message ChallengeJobResponse { - string node_pid = 1; - string issuer_pid = 2; - string job_id = 3; - string package_url = 4; - int32 package_questions_count = 5; - google.protobuf.Timestamp send_time = 6 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - google.protobuf.Timestamp job_finish_deadline = 7 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - bytes signature = 8; -} - -message ChallengeJobResult { - string node_pid = 1; - string job_id = 2; - repeated ShardChallengeResult result = 3; - google.protobuf.Timestamp submit_time = 4 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - bytes signature = 5; -} - -message ShardChallengeResult { - string host_pid = 1; - string file_hash = 2; - string shard_hash = 3; - string nonce = 4; - string result = 5; - bool is_timeout = 6; -} - -message DeCentralQuestions { - repeated DeQuestion qs = 1; - int32 count = 2; - string uuid = 3; - string url = 4; - google.protobuf.Timestamp end_time = 5 [(gogoproto.stdtime) = true]; -} - -message DeQuestion { - string shard_hash = 1; //shard hash - string host_pid = 2; //host's peerId - int32 chunk_index = 3; //the chunk's index for calculation - string nonce = 4; //the challenge questions's random nonce - string file_hash = 5; -} diff --git a/protos/hub/hub.pb.go b/protos/hub/hub.pb.go deleted file mode 100644 index ecef60a..0000000 --- a/protos/hub/hub.pb.go +++ /dev/null @@ -1,6369 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: protos/hub/hub.proto - -package hub - -import ( - context "context" - encoding_binary "encoding/binary" - fmt "fmt" - node "github.com/bittorrent/go-btfs-common/protos/node" - _ "github.com/gogo/protobuf/types" - golang_proto "github.com/golang/protobuf/proto" - _ "github.com/tron-us/protobuf/gogoproto" - proto "github.com/tron-us/protobuf/proto" - github_com_tron_us_protobuf_types "github.com/tron-us/protobuf/types" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = golang_proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type ResponseCode int32 - -const ( - ResponseCode_SUCCESS ResponseCode = 0 - ResponseCode_SIGNATURE_FORMAT_ERROR ResponseCode = 1 - ResponseCode_COMPUTE_ADDRESS_ERROR ResponseCode = 2 - ResponseCode_TIMEOUT_ERROR ResponseCode = 3 - ResponseCode_OTHER_ERROR ResponseCode = 20 -) - -var ResponseCode_name = map[int32]string{ - 0: "SUCCESS", - 1: "SIGNATURE_FORMAT_ERROR", - 2: "COMPUTE_ADDRESS_ERROR", - 3: "TIMEOUT_ERROR", - 20: "OTHER_ERROR", -} - -var ResponseCode_value = map[string]int32{ - "SUCCESS": 0, - "SIGNATURE_FORMAT_ERROR": 1, - "COMPUTE_ADDRESS_ERROR": 2, - "TIMEOUT_ERROR": 3, - "OTHER_ERROR": 20, -} - -func (x ResponseCode) String() string { - return proto.EnumName(ResponseCode_name, int32(x)) -} - -func (ResponseCode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_c704b5990190a69f, []int{0} -} - -type HostsReq_Mode int32 - -const ( - HostsReq_SCORE HostsReq_Mode = 0 - HostsReq_GEO HostsReq_Mode = 1 - HostsReq_REP HostsReq_Mode = 2 - HostsReq_PRICE HostsReq_Mode = 3 - HostsReq_SPEED HostsReq_Mode = 4 - HostsReq_TESTNET HostsReq_Mode = 5 -) - -var HostsReq_Mode_name = map[int32]string{ - 0: "SCORE", - 1: "GEO", - 2: "REP", - 3: "PRICE", - 4: "SPEED", - 5: "TESTNET", -} - -var HostsReq_Mode_value = map[string]int32{ - "SCORE": 0, - "GEO": 1, - "REP": 2, - "PRICE": 3, - "SPEED": 4, - "TESTNET": 5, -} - -func (x HostsReq_Mode) String() string { - return proto.EnumName(HostsReq_Mode_name, int32(x)) -} - -func (HostsReq_Mode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_c704b5990190a69f, []int{4, 0} -} - -type RecycleReq_ESIndex int32 - -const ( - RecycleReq_NODES RecycleReq_ESIndex = 0 - RecycleReq_NETWORK RecycleReq_ESIndex = 1 - RecycleReq_TESTNET_NODES RecycleReq_ESIndex = 2 -) - -var RecycleReq_ESIndex_name = map[int32]string{ - 0: "NODES", - 1: "NETWORK", - 2: "TESTNET_NODES", -} - -var RecycleReq_ESIndex_value = map[string]int32{ - "NODES": 0, - "NETWORK": 1, - "TESTNET_NODES": 2, -} - -func (x RecycleReq_ESIndex) String() string { - return proto.EnumName(RecycleReq_ESIndex_name, int32(x)) -} - -func (RecycleReq_ESIndex) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_c704b5990190a69f, []int{11, 0} -} - -type NodesReq struct { - NodeId []string `protobuf:"bytes,1,rep,name=node_id,json=nodeId,proto3" json:"node_id,omitempty" pg:"node_id"` - RequesterId string `protobuf:"bytes,2,opt,name=requester_id,json=requesterId,proto3" json:"requester_id,omitempty" pg:"requester_id"` - Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *NodesReq) Reset() { *m = NodesReq{} } -func (m *NodesReq) String() string { return proto.CompactTextString(m) } -func (*NodesReq) ProtoMessage() {} -func (*NodesReq) Descriptor() ([]byte, []int) { - return fileDescriptor_c704b5990190a69f, []int{0} -} -func (m *NodesReq) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodesReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NodesReq.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *NodesReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodesReq.Merge(m, src) -} -func (m *NodesReq) XXX_Size() int { - return m.Size() -} -func (m *NodesReq) XXX_DiscardUnknown() { - xxx_messageInfo_NodesReq.DiscardUnknown(m) -} - -var xxx_messageInfo_NodesReq proto.InternalMessageInfo - -func (m *NodesReq) GetNodeId() []string { - if m != nil { - return m.NodeId - } - return nil -} - -func (m *NodesReq) GetRequesterId() string { - if m != nil { - return m.RequesterId - } - return "" -} - -func (m *NodesReq) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (*NodesReq) XXX_MessageName() string { - return "hub.NodesReq" -} - -type SettingsReq struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" pg:"id"` - RespSize int32 `protobuf:"varint,2,opt,name=resp_size,json=respSize,proto3" json:"resp_size,omitempty" pg:"resp_size"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SettingsReq) Reset() { *m = SettingsReq{} } -func (m *SettingsReq) String() string { return proto.CompactTextString(m) } -func (*SettingsReq) ProtoMessage() {} -func (*SettingsReq) Descriptor() ([]byte, []int) { - return fileDescriptor_c704b5990190a69f, []int{1} -} -func (m *SettingsReq) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SettingsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SettingsReq.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SettingsReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_SettingsReq.Merge(m, src) -} -func (m *SettingsReq) XXX_Size() int { - return m.Size() -} -func (m *SettingsReq) XXX_DiscardUnknown() { - xxx_messageInfo_SettingsReq.DiscardUnknown(m) -} - -var xxx_messageInfo_SettingsReq proto.InternalMessageInfo - -func (m *SettingsReq) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *SettingsReq) GetRespSize() int32 { - if m != nil { - return m.RespSize - } - return 0 -} - -func (*SettingsReq) XXX_MessageName() string { - return "hub.SettingsReq" -} - -type SettingsResp struct { - Code ResponseCode `protobuf:"varint,1,opt,name=code,proto3,enum=hub.ResponseCode" json:"code,omitempty" pg:"code"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty" pg:"message"` - ResponseTime time.Time `protobuf:"bytes,3,opt,name=response_time,json=responseTime,proto3,stdtime" json:"response_time" pg:"response_time"` - SettingsData *SettingsData `protobuf:"bytes,4,opt,name=settings_data,json=settingsData,proto3" json:"settings_data,omitempty" pg:"settings_data"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SettingsResp) Reset() { *m = SettingsResp{} } -func (m *SettingsResp) String() string { return proto.CompactTextString(m) } -func (*SettingsResp) ProtoMessage() {} -func (*SettingsResp) Descriptor() ([]byte, []int) { - return fileDescriptor_c704b5990190a69f, []int{2} -} -func (m *SettingsResp) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SettingsResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SettingsResp.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SettingsResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_SettingsResp.Merge(m, src) -} -func (m *SettingsResp) XXX_Size() int { - return m.Size() -} -func (m *SettingsResp) XXX_DiscardUnknown() { - xxx_messageInfo_SettingsResp.DiscardUnknown(m) -} - -var xxx_messageInfo_SettingsResp proto.InternalMessageInfo - -func (m *SettingsResp) GetCode() ResponseCode { - if m != nil { - return m.Code - } - return ResponseCode_SUCCESS -} - -func (m *SettingsResp) GetMessage() string { - if m != nil { - return m.Message - } - return "" -} - -func (m *SettingsResp) GetResponseTime() time.Time { - if m != nil { - return m.ResponseTime - } - return time.Time{} -} - -func (m *SettingsResp) GetSettingsData() *SettingsData { - if m != nil { - return m.SettingsData - } - return nil -} - -func (*SettingsResp) XXX_MessageName() string { - return "hub.SettingsResp" -} - -type SettingsData struct { - StoragePriceAsk float64 `protobuf:"fixed64,1,opt,name=storage_price_ask,json=storagePriceAsk,proto3" json:"storage_price_ask,omitempty" pg:"storage_price_ask"` - BandwidthPriceAsk float64 `protobuf:"fixed64,2,opt,name=bandwidth_price_ask,json=bandwidthPriceAsk,proto3" json:"bandwidth_price_ask,omitempty" pg:"bandwidth_price_ask"` - StorageTimeMin float64 `protobuf:"fixed64,3,opt,name=storage_time_min,json=storageTimeMin,proto3" json:"storage_time_min,omitempty" pg:"storage_time_min"` - BandwidthLimit float64 `protobuf:"fixed64,4,opt,name=bandwidth_limit,json=bandwidthLimit,proto3" json:"bandwidth_limit,omitempty" pg:"bandwidth_limit"` - CollateralStake float64 `protobuf:"fixed64,5,opt,name=collateral_stake,json=collateralStake,proto3" json:"collateral_stake,omitempty" pg:"collateral_stake"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SettingsData) Reset() { *m = SettingsData{} } -func (m *SettingsData) String() string { return proto.CompactTextString(m) } -func (*SettingsData) ProtoMessage() {} -func (*SettingsData) Descriptor() ([]byte, []int) { - return fileDescriptor_c704b5990190a69f, []int{3} -} -func (m *SettingsData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SettingsData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SettingsData.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SettingsData) XXX_Merge(src proto.Message) { - xxx_messageInfo_SettingsData.Merge(m, src) -} -func (m *SettingsData) XXX_Size() int { - return m.Size() -} -func (m *SettingsData) XXX_DiscardUnknown() { - xxx_messageInfo_SettingsData.DiscardUnknown(m) -} - -var xxx_messageInfo_SettingsData proto.InternalMessageInfo - -func (m *SettingsData) GetStoragePriceAsk() float64 { - if m != nil { - return m.StoragePriceAsk - } - return 0 -} - -func (m *SettingsData) GetBandwidthPriceAsk() float64 { - if m != nil { - return m.BandwidthPriceAsk - } - return 0 -} - -func (m *SettingsData) GetStorageTimeMin() float64 { - if m != nil { - return m.StorageTimeMin - } - return 0 -} - -func (m *SettingsData) GetBandwidthLimit() float64 { - if m != nil { - return m.BandwidthLimit - } - return 0 -} - -func (m *SettingsData) GetCollateralStake() float64 { - if m != nil { - return m.CollateralStake - } - return 0 -} - -func (*SettingsData) XXX_MessageName() string { - return "hub.SettingsData" -} - -type HostsReq struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" pg:"id"` - RespSize int32 `protobuf:"varint,2,opt,name=resp_size,json=respSize,proto3" json:"resp_size,omitempty" pg:"resp_size"` - Mode HostsReq_Mode `protobuf:"varint,3,opt,name=mode,proto3,enum=hub.HostsReq_Mode" json:"mode,omitempty" pg:"mode"` - Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty" pg:"version"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *HostsReq) Reset() { *m = HostsReq{} } -func (m *HostsReq) String() string { return proto.CompactTextString(m) } -func (*HostsReq) ProtoMessage() {} -func (*HostsReq) Descriptor() ([]byte, []int) { - return fileDescriptor_c704b5990190a69f, []int{4} -} -func (m *HostsReq) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HostsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HostsReq.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *HostsReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_HostsReq.Merge(m, src) -} -func (m *HostsReq) XXX_Size() int { - return m.Size() -} -func (m *HostsReq) XXX_DiscardUnknown() { - xxx_messageInfo_HostsReq.DiscardUnknown(m) -} - -var xxx_messageInfo_HostsReq proto.InternalMessageInfo - -func (m *HostsReq) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *HostsReq) GetRespSize() int32 { - if m != nil { - return m.RespSize - } - return 0 -} - -func (m *HostsReq) GetMode() HostsReq_Mode { - if m != nil { - return m.Mode - } - return HostsReq_SCORE -} - -func (m *HostsReq) GetVersion() string { - if m != nil { - return m.Version - } - return "" -} - -func (*HostsReq) XXX_MessageName() string { - return "hub.HostsReq" -} - -type RolesHostsReq struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" pg:"id"` - RespSize int32 `protobuf:"varint,2,opt,name=resp_size,json=respSize,proto3" json:"resp_size,omitempty" pg:"resp_size"` - Role node.NodeRole `protobuf:"varint,3,opt,name=role,proto3,enum=node.NodeRole" json:"role,omitempty" pg:"role"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *RolesHostsReq) Reset() { *m = RolesHostsReq{} } -func (m *RolesHostsReq) String() string { return proto.CompactTextString(m) } -func (*RolesHostsReq) ProtoMessage() {} -func (*RolesHostsReq) Descriptor() ([]byte, []int) { - return fileDescriptor_c704b5990190a69f, []int{5} -} -func (m *RolesHostsReq) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RolesHostsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RolesHostsReq.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RolesHostsReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_RolesHostsReq.Merge(m, src) -} -func (m *RolesHostsReq) XXX_Size() int { - return m.Size() -} -func (m *RolesHostsReq) XXX_DiscardUnknown() { - xxx_messageInfo_RolesHostsReq.DiscardUnknown(m) -} - -var xxx_messageInfo_RolesHostsReq proto.InternalMessageInfo - -func (m *RolesHostsReq) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *RolesHostsReq) GetRespSize() int32 { - if m != nil { - return m.RespSize - } - return 0 -} - -func (m *RolesHostsReq) GetRole() node.NodeRole { - if m != nil { - return m.Role - } - return node.NodeRole_RENTER -} - -func (*RolesHostsReq) XXX_MessageName() string { - return "hub.RolesHostsReq" -} - -type HostsResp struct { - Code ResponseCode `protobuf:"varint,1,opt,name=code,proto3,enum=hub.ResponseCode" json:"code,omitempty" pg:"code"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty" pg:"message"` - Hosts *HostsData `protobuf:"bytes,3,opt,name=hosts,proto3" json:"hosts,omitempty" pg:"hosts"` - RespSize int32 `protobuf:"varint,4,opt,name=resp_size,json=respSize,proto3" json:"resp_size,omitempty" pg:"resp_size"` - Mode string `protobuf:"bytes,5,opt,name=mode,proto3" json:"mode,omitempty" pg:"mode"` - ResponseTime time.Time `protobuf:"bytes,6,opt,name=response_time,json=responseTime,proto3,stdtime" json:"response_time" pg:"response_time"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *HostsResp) Reset() { *m = HostsResp{} } -func (m *HostsResp) String() string { return proto.CompactTextString(m) } -func (*HostsResp) ProtoMessage() {} -func (*HostsResp) Descriptor() ([]byte, []int) { - return fileDescriptor_c704b5990190a69f, []int{6} -} -func (m *HostsResp) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HostsResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HostsResp.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *HostsResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_HostsResp.Merge(m, src) -} -func (m *HostsResp) XXX_Size() int { - return m.Size() -} -func (m *HostsResp) XXX_DiscardUnknown() { - xxx_messageInfo_HostsResp.DiscardUnknown(m) -} - -var xxx_messageInfo_HostsResp proto.InternalMessageInfo - -func (m *HostsResp) GetCode() ResponseCode { - if m != nil { - return m.Code - } - return ResponseCode_SUCCESS -} - -func (m *HostsResp) GetMessage() string { - if m != nil { - return m.Message - } - return "" -} - -func (m *HostsResp) GetHosts() *HostsData { - if m != nil { - return m.Hosts - } - return nil -} - -func (m *HostsResp) GetRespSize() int32 { - if m != nil { - return m.RespSize - } - return 0 -} - -func (m *HostsResp) GetMode() string { - if m != nil { - return m.Mode - } - return "" -} - -func (m *HostsResp) GetResponseTime() time.Time { - if m != nil { - return m.ResponseTime - } - return time.Time{} -} - -func (*HostsResp) XXX_MessageName() string { - return "hub.HostsResp" -} - -type StatsReq struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" pg:"id"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *StatsReq) Reset() { *m = StatsReq{} } -func (m *StatsReq) String() string { return proto.CompactTextString(m) } -func (*StatsReq) ProtoMessage() {} -func (*StatsReq) Descriptor() ([]byte, []int) { - return fileDescriptor_c704b5990190a69f, []int{7} -} -func (m *StatsReq) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StatsReq.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *StatsReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatsReq.Merge(m, src) -} -func (m *StatsReq) XXX_Size() int { - return m.Size() -} -func (m *StatsReq) XXX_DiscardUnknown() { - xxx_messageInfo_StatsReq.DiscardUnknown(m) -} - -var xxx_messageInfo_StatsReq proto.InternalMessageInfo - -func (m *StatsReq) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (*StatsReq) XXX_MessageName() string { - return "hub.StatsReq" -} - -type StatsResp struct { - Code ResponseCode `protobuf:"varint,1,opt,name=code,proto3,enum=hub.ResponseCode" json:"code,omitempty" pg:"code"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty" pg:"message"` - ResponseTime time.Time `protobuf:"bytes,3,opt,name=response_time,json=responseTime,proto3,stdtime" json:"response_time" pg:"response_time"` - node.StorageStat_HostStats `protobuf:"bytes,4,opt,name=stats,proto3,embedded=stats" json:"stats" pg:"stats"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *StatsResp) Reset() { *m = StatsResp{} } -func (m *StatsResp) String() string { return proto.CompactTextString(m) } -func (*StatsResp) ProtoMessage() {} -func (*StatsResp) Descriptor() ([]byte, []int) { - return fileDescriptor_c704b5990190a69f, []int{8} -} -func (m *StatsResp) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatsResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StatsResp.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *StatsResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatsResp.Merge(m, src) -} -func (m *StatsResp) XXX_Size() int { - return m.Size() -} -func (m *StatsResp) XXX_DiscardUnknown() { - xxx_messageInfo_StatsResp.DiscardUnknown(m) -} - -var xxx_messageInfo_StatsResp proto.InternalMessageInfo - -func (m *StatsResp) GetCode() ResponseCode { - if m != nil { - return m.Code - } - return ResponseCode_SUCCESS -} - -func (m *StatsResp) GetMessage() string { - if m != nil { - return m.Message - } - return "" -} - -func (m *StatsResp) GetResponseTime() time.Time { - if m != nil { - return m.ResponseTime - } - return time.Time{} -} - -func (*StatsResp) XXX_MessageName() string { - return "hub.StatsResp" -} - -type Candidate struct { - NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty" pg:"node_id"` - HeartBeats uint64 `protobuf:"varint,2,opt,name=heart_beats,json=heartBeats,proto3" json:"heart_beats,omitempty" pg:"heart_beats"` - UploadAverage float32 `protobuf:"fixed32,3,opt,name=upload_average,json=uploadAverage,proto3" json:"upload_average,omitempty" pg:"upload_average"` - UploadVariance float32 `protobuf:"fixed32,4,opt,name=upload_variance,json=uploadVariance,proto3" json:"upload_variance,omitempty" pg:"upload_variance"` - DownloadAverage float32 `protobuf:"fixed32,5,opt,name=download_average,json=downloadAverage,proto3" json:"download_average,omitempty" pg:"download_average"` - DownloadVariance float32 `protobuf:"fixed32,6,opt,name=download_variance,json=downloadVariance,proto3" json:"download_variance,omitempty" pg:"download_variance"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Candidate) Reset() { *m = Candidate{} } -func (m *Candidate) String() string { return proto.CompactTextString(m) } -func (*Candidate) ProtoMessage() {} -func (*Candidate) Descriptor() ([]byte, []int) { - return fileDescriptor_c704b5990190a69f, []int{9} -} -func (m *Candidate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Candidate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Candidate.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Candidate) XXX_Merge(src proto.Message) { - xxx_messageInfo_Candidate.Merge(m, src) -} -func (m *Candidate) XXX_Size() int { - return m.Size() -} -func (m *Candidate) XXX_DiscardUnknown() { - xxx_messageInfo_Candidate.DiscardUnknown(m) -} - -var xxx_messageInfo_Candidate proto.InternalMessageInfo - -func (m *Candidate) GetNodeId() string { - if m != nil { - return m.NodeId - } - return "" -} - -func (m *Candidate) GetHeartBeats() uint64 { - if m != nil { - return m.HeartBeats - } - return 0 -} - -func (m *Candidate) GetUploadAverage() float32 { - if m != nil { - return m.UploadAverage - } - return 0 -} - -func (m *Candidate) GetUploadVariance() float32 { - if m != nil { - return m.UploadVariance - } - return 0 -} - -func (m *Candidate) GetDownloadAverage() float32 { - if m != nil { - return m.DownloadAverage - } - return 0 -} - -func (m *Candidate) GetDownloadVariance() float32 { - if m != nil { - return m.DownloadVariance - } - return 0 -} - -func (*Candidate) XXX_MessageName() string { - return "hub.Candidate" -} - -type ParseReq struct { - Candidates []*Candidate `protobuf:"bytes,1,rep,name=candidates,proto3" json:"candidates,omitempty" pg:"candidates"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ParseReq) Reset() { *m = ParseReq{} } -func (m *ParseReq) String() string { return proto.CompactTextString(m) } -func (*ParseReq) ProtoMessage() {} -func (*ParseReq) Descriptor() ([]byte, []int) { - return fileDescriptor_c704b5990190a69f, []int{10} -} -func (m *ParseReq) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ParseReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ParseReq.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ParseReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_ParseReq.Merge(m, src) -} -func (m *ParseReq) XXX_Size() int { - return m.Size() -} -func (m *ParseReq) XXX_DiscardUnknown() { - xxx_messageInfo_ParseReq.DiscardUnknown(m) -} - -var xxx_messageInfo_ParseReq proto.InternalMessageInfo - -func (m *ParseReq) GetCandidates() []*Candidate { - if m != nil { - return m.Candidates - } - return nil -} - -func (*ParseReq) XXX_MessageName() string { - return "hub.ParseReq" -} - -type RecycleReq struct { - EsIndex RecycleReq_ESIndex `protobuf:"varint,1,opt,name=es_index,json=esIndex,proto3,enum=hub.RecycleReq_ESIndex" json:"es_index,omitempty" pg:"es_index"` - TimeScopeInHours int64 `protobuf:"varint,2,opt,name=time_scope_in_hours,json=timeScopeInHours,proto3" json:"time_scope_in_hours,omitempty" pg:"time_scope_in_hours"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *RecycleReq) Reset() { *m = RecycleReq{} } -func (m *RecycleReq) String() string { return proto.CompactTextString(m) } -func (*RecycleReq) ProtoMessage() {} -func (*RecycleReq) Descriptor() ([]byte, []int) { - return fileDescriptor_c704b5990190a69f, []int{11} -} -func (m *RecycleReq) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RecycleReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RecycleReq.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RecycleReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_RecycleReq.Merge(m, src) -} -func (m *RecycleReq) XXX_Size() int { - return m.Size() -} -func (m *RecycleReq) XXX_DiscardUnknown() { - xxx_messageInfo_RecycleReq.DiscardUnknown(m) -} - -var xxx_messageInfo_RecycleReq proto.InternalMessageInfo - -func (m *RecycleReq) GetEsIndex() RecycleReq_ESIndex { - if m != nil { - return m.EsIndex - } - return RecycleReq_NODES -} - -func (m *RecycleReq) GetTimeScopeInHours() int64 { - if m != nil { - return m.TimeScopeInHours - } - return 0 -} - -func (*RecycleReq) XXX_MessageName() string { - return "hub.RecycleReq" -} - -type ParseResp struct { - Code ResponseCode `protobuf:"varint,1,opt,name=code,proto3,enum=hub.ResponseCode" json:"code,omitempty" pg:"code"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty" pg:"message"` - ResponseTime time.Time `protobuf:"bytes,3,opt,name=response_time,json=responseTime,proto3,stdtime" json:"response_time" pg:"response_time"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ParseResp) Reset() { *m = ParseResp{} } -func (m *ParseResp) String() string { return proto.CompactTextString(m) } -func (*ParseResp) ProtoMessage() {} -func (*ParseResp) Descriptor() ([]byte, []int) { - return fileDescriptor_c704b5990190a69f, []int{12} -} -func (m *ParseResp) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ParseResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ParseResp.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ParseResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_ParseResp.Merge(m, src) -} -func (m *ParseResp) XXX_Size() int { - return m.Size() -} -func (m *ParseResp) XXX_DiscardUnknown() { - xxx_messageInfo_ParseResp.DiscardUnknown(m) -} - -var xxx_messageInfo_ParseResp proto.InternalMessageInfo - -func (m *ParseResp) GetCode() ResponseCode { - if m != nil { - return m.Code - } - return ResponseCode_SUCCESS -} - -func (m *ParseResp) GetMessage() string { - if m != nil { - return m.Message - } - return "" -} - -func (m *ParseResp) GetResponseTime() time.Time { - if m != nil { - return m.ResponseTime - } - return time.Time{} -} - -func (*ParseResp) XXX_MessageName() string { - return "hub.ParseResp" -} - -type HostsData struct { - Hosts []*Host `protobuf:"bytes,1,rep,name=hosts,proto3" json:"hosts,omitempty" pg:"hosts"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *HostsData) Reset() { *m = HostsData{} } -func (m *HostsData) String() string { return proto.CompactTextString(m) } -func (*HostsData) ProtoMessage() {} -func (*HostsData) Descriptor() ([]byte, []int) { - return fileDescriptor_c704b5990190a69f, []int{13} -} -func (m *HostsData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HostsData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HostsData.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *HostsData) XXX_Merge(src proto.Message) { - xxx_messageInfo_HostsData.Merge(m, src) -} -func (m *HostsData) XXX_Size() int { - return m.Size() -} -func (m *HostsData) XXX_DiscardUnknown() { - xxx_messageInfo_HostsData.DiscardUnknown(m) -} - -var xxx_messageInfo_HostsData proto.InternalMessageInfo - -func (m *HostsData) GetHosts() []*Host { - if m != nil { - return m.Hosts - } - return nil -} - -func (*HostsData) XXX_MessageName() string { - return "hub.HostsData" -} - -type Host struct { - NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id" pg:"node_id"` - CreateTimestamp time.Time `protobuf:"bytes,2,opt,name=create_timestamp,json=createTimestamp,proto3,stdtime" json:"create_timestamp" pg:"create_timestamp"` - UpdateTimestamp time.Time `protobuf:"bytes,3,opt,name=update_timestamp,json=updateTimestamp,proto3,stdtime" json:"update_timestamp" pg:"update_timestamp"` - Region string `protobuf:"bytes,4,opt,name=region,proto3" json:"region" pg:"region"` - BtfsVersion string `protobuf:"bytes,5,opt,name=btfs_version,json=btfsVersion,proto3" json:"btfs_version" pg:"btfs_version"` - Score float32 `protobuf:"fixed32,6,opt,name=score,proto3" json:"score" pg:"score"` - HeartBeats uint64 `protobuf:"varint,7,opt,name=heart_beats,json=heartBeats,proto3" json:"heart_beats" pg:"heart_beats"` - Uptime float32 `protobuf:"fixed32,8,opt,name=uptime,proto3" json:"uptime" pg:"uptime"` - Age uint64 `protobuf:"varint,9,opt,name=age,proto3" json:"age" pg:"age"` - Reputation float32 `protobuf:"fixed32,10,opt,name=reputation,proto3" json:"reputation" pg:"reputation"` - UploadAverage float32 `protobuf:"fixed32,11,opt,name=upload_average,json=uploadAverage,proto3" json:"upload_average" pg:"upload_average"` - UploadVariance float32 `protobuf:"fixed32,12,opt,name=upload_variance,json=uploadVariance,proto3" json:"upload_variance" pg:"upload_variance"` - DownloadAverage float32 `protobuf:"fixed32,13,opt,name=download_average,json=downloadAverage,proto3" json:"download_average" pg:"download_average"` - DownloadVariance float32 `protobuf:"fixed32,14,opt,name=download_variance,json=downloadVariance,proto3" json:"download_variance" pg:"download_variance"` - Location Location `protobuf:"bytes,15,opt,name=location,proto3" json:"location" pg:"location"` - StorageVolumeCap float32 `protobuf:"fixed32,16,opt,name=storage_volume_cap,json=storageVolumeCap,proto3" json:"storage_volume_cap" pg:"storage_volume_cap"` - StorageVolumeLeft float32 `protobuf:"fixed32,17,opt,name=storage_volume_left,json=storageVolumeLeft,proto3" json:"storage_volume_left" pg:"storage_volume_left"` - StorageTimeMin uint64 `protobuf:"varint,18,opt,name=storage_time_min,json=storageTimeMin,proto3" json:"storage_time_min" pg:"storage_time_min"` - StoragePriceAsk uint64 `protobuf:"varint,19,opt,name=storage_price_ask,json=storagePriceAsk,proto3" json:"storage_price_ask" pg:"storage_price_ask"` - StoragePriceEst uint64 `protobuf:"varint,20,opt,name=storage_price_est,json=storagePriceEst,proto3" json:"storage_price_est" pg:"storage_price_est"` - BandwidthLimit float64 `protobuf:"fixed64,21,opt,name=bandwidth_limit,json=bandwidthLimit,proto3" json:"bandwidth_limit" pg:"bandwidth_limit"` - BandwidthPriceAsk uint64 `protobuf:"varint,22,opt,name=bandwidth_price_ask,json=bandwidthPriceAsk,proto3" json:"bandwidth_price_ask" pg:"bandwidth_price_ask"` - BandwidthPriceEst uint64 `protobuf:"varint,23,opt,name=bandwidth_price_est,json=bandwidthPriceEst,proto3" json:"bandwidth_price_est" pg:"bandwidth_price_est"` - CollateralStake uint64 `protobuf:"varint,24,opt,name=collateral_stake,json=collateralStake,proto3" json:"collateral_stake" pg:"collateral_stake"` - CollateralLost uint64 `protobuf:"varint,25,opt,name=collateral_lost,json=collateralLost,proto3" json:"collateral_lost" pg:"collateral_lost"` - CollateralBurn uint64 `protobuf:"varint,26,opt,name=collateral_burn,json=collateralBurn,proto3" json:"collateral_burn" pg:"collateral_burn"` - CountryShort string `protobuf:"bytes,27,opt,name=country_short,json=countryShort,proto3" json:"country_short" pg:"country_short"` - node.Node_ExperimentalFlags `protobuf:"bytes,28,opt,name=flg,proto3,embedded=flg" json:"flg" pg:"flg"` - Discovery float32 `protobuf:"fixed32,29,opt,name=discovery,proto3" json:"discovery" pg:"discovery"` - UptimeScore float32 `protobuf:"fixed32,30,opt,name=uptime_score,json=uptimeScore,proto3" json:"uptime_score" pg:"uptime_score"` - AgeScore float32 `protobuf:"fixed32,31,opt,name=age_score,json=ageScore,proto3" json:"age_score" pg:"age_score"` - VersionScore float32 `protobuf:"fixed32,32,opt,name=version_score,json=versionScore,proto3" json:"version_score" pg:"version_score"` - UploadSpeedScore float32 `protobuf:"fixed32,33,opt,name=upload_speed_score,json=uploadSpeedScore,proto3" json:"upload_speed_score" pg:"upload_speed_score"` - DownloadSpeedScore float32 `protobuf:"fixed32,34,opt,name=download_speed_score,json=downloadSpeedScore,proto3" json:"download_speed_score" pg:"download_speed_score"` - Roles []node.NodeRole `protobuf:"varint,35,rep,packed,name=roles,proto3,enum=node.NodeRole" json:"roles" pg:"roles,array"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Host) Reset() { *m = Host{} } -func (m *Host) String() string { return proto.CompactTextString(m) } -func (*Host) ProtoMessage() {} -func (*Host) Descriptor() ([]byte, []int) { - return fileDescriptor_c704b5990190a69f, []int{14} -} -func (m *Host) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Host) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Host.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Host) XXX_Merge(src proto.Message) { - xxx_messageInfo_Host.Merge(m, src) -} -func (m *Host) XXX_Size() int { - return m.Size() -} -func (m *Host) XXX_DiscardUnknown() { - xxx_messageInfo_Host.DiscardUnknown(m) -} - -var xxx_messageInfo_Host proto.InternalMessageInfo - -func (m *Host) GetNodeId() string { - if m != nil { - return m.NodeId - } - return "" -} - -func (m *Host) GetCreateTimestamp() time.Time { - if m != nil { - return m.CreateTimestamp - } - return time.Time{} -} - -func (m *Host) GetUpdateTimestamp() time.Time { - if m != nil { - return m.UpdateTimestamp - } - return time.Time{} -} - -func (m *Host) GetRegion() string { - if m != nil { - return m.Region - } - return "" -} - -func (m *Host) GetBtfsVersion() string { - if m != nil { - return m.BtfsVersion - } - return "" -} - -func (m *Host) GetScore() float32 { - if m != nil { - return m.Score - } - return 0 -} - -func (m *Host) GetHeartBeats() uint64 { - if m != nil { - return m.HeartBeats - } - return 0 -} - -func (m *Host) GetUptime() float32 { - if m != nil { - return m.Uptime - } - return 0 -} - -func (m *Host) GetAge() uint64 { - if m != nil { - return m.Age - } - return 0 -} - -func (m *Host) GetReputation() float32 { - if m != nil { - return m.Reputation - } - return 0 -} - -func (m *Host) GetUploadAverage() float32 { - if m != nil { - return m.UploadAverage - } - return 0 -} - -func (m *Host) GetUploadVariance() float32 { - if m != nil { - return m.UploadVariance - } - return 0 -} - -func (m *Host) GetDownloadAverage() float32 { - if m != nil { - return m.DownloadAverage - } - return 0 -} - -func (m *Host) GetDownloadVariance() float32 { - if m != nil { - return m.DownloadVariance - } - return 0 -} - -func (m *Host) GetLocation() Location { - if m != nil { - return m.Location - } - return Location{} -} - -func (m *Host) GetStorageVolumeCap() float32 { - if m != nil { - return m.StorageVolumeCap - } - return 0 -} - -func (m *Host) GetStorageVolumeLeft() float32 { - if m != nil { - return m.StorageVolumeLeft - } - return 0 -} - -func (m *Host) GetStorageTimeMin() uint64 { - if m != nil { - return m.StorageTimeMin - } - return 0 -} - -func (m *Host) GetStoragePriceAsk() uint64 { - if m != nil { - return m.StoragePriceAsk - } - return 0 -} - -func (m *Host) GetStoragePriceEst() uint64 { - if m != nil { - return m.StoragePriceEst - } - return 0 -} - -func (m *Host) GetBandwidthLimit() float64 { - if m != nil { - return m.BandwidthLimit - } - return 0 -} - -func (m *Host) GetBandwidthPriceAsk() uint64 { - if m != nil { - return m.BandwidthPriceAsk - } - return 0 -} - -func (m *Host) GetBandwidthPriceEst() uint64 { - if m != nil { - return m.BandwidthPriceEst - } - return 0 -} - -func (m *Host) GetCollateralStake() uint64 { - if m != nil { - return m.CollateralStake - } - return 0 -} - -func (m *Host) GetCollateralLost() uint64 { - if m != nil { - return m.CollateralLost - } - return 0 -} - -func (m *Host) GetCollateralBurn() uint64 { - if m != nil { - return m.CollateralBurn - } - return 0 -} - -func (m *Host) GetCountryShort() string { - if m != nil { - return m.CountryShort - } - return "" -} - -func (m *Host) GetDiscovery() float32 { - if m != nil { - return m.Discovery - } - return 0 -} - -func (m *Host) GetUptimeScore() float32 { - if m != nil { - return m.UptimeScore - } - return 0 -} - -func (m *Host) GetAgeScore() float32 { - if m != nil { - return m.AgeScore - } - return 0 -} - -func (m *Host) GetVersionScore() float32 { - if m != nil { - return m.VersionScore - } - return 0 -} - -func (m *Host) GetUploadSpeedScore() float32 { - if m != nil { - return m.UploadSpeedScore - } - return 0 -} - -func (m *Host) GetDownloadSpeedScore() float32 { - if m != nil { - return m.DownloadSpeedScore - } - return 0 -} - -func (m *Host) GetRoles() []node.NodeRole { - if m != nil { - return m.Roles - } - return nil -} - -func (*Host) XXX_MessageName() string { - return "hub.Host" -} - -type Location struct { - Lat float64 `protobuf:"fixed64,1,opt,name=lat,proto3" json:"lat,omitempty" pg:"lat"` - Lon float64 `protobuf:"fixed64,2,opt,name=lon,proto3" json:"lon,omitempty" pg:"lon"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Location) Reset() { *m = Location{} } -func (m *Location) String() string { return proto.CompactTextString(m) } -func (*Location) ProtoMessage() {} -func (*Location) Descriptor() ([]byte, []int) { - return fileDescriptor_c704b5990190a69f, []int{15} -} -func (m *Location) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Location) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Location.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Location) XXX_Merge(src proto.Message) { - xxx_messageInfo_Location.Merge(m, src) -} -func (m *Location) XXX_Size() int { - return m.Size() -} -func (m *Location) XXX_DiscardUnknown() { - xxx_messageInfo_Location.DiscardUnknown(m) -} - -var xxx_messageInfo_Location proto.InternalMessageInfo - -func (m *Location) GetLat() float64 { - if m != nil { - return m.Lat - } - return 0 -} - -func (m *Location) GetLon() float64 { - if m != nil { - return m.Lon - } - return 0 -} - -func (*Location) XXX_MessageName() string { - return "hub.Location" -} -func init() { - proto.RegisterEnum("hub.ResponseCode", ResponseCode_name, ResponseCode_value) - golang_proto.RegisterEnum("hub.ResponseCode", ResponseCode_name, ResponseCode_value) - proto.RegisterEnum("hub.HostsReq_Mode", HostsReq_Mode_name, HostsReq_Mode_value) - golang_proto.RegisterEnum("hub.HostsReq_Mode", HostsReq_Mode_name, HostsReq_Mode_value) - proto.RegisterEnum("hub.RecycleReq_ESIndex", RecycleReq_ESIndex_name, RecycleReq_ESIndex_value) - golang_proto.RegisterEnum("hub.RecycleReq_ESIndex", RecycleReq_ESIndex_name, RecycleReq_ESIndex_value) - proto.RegisterType((*NodesReq)(nil), "hub.NodesReq") - golang_proto.RegisterType((*NodesReq)(nil), "hub.NodesReq") - proto.RegisterType((*SettingsReq)(nil), "hub.SettingsReq") - golang_proto.RegisterType((*SettingsReq)(nil), "hub.SettingsReq") - proto.RegisterType((*SettingsResp)(nil), "hub.SettingsResp") - golang_proto.RegisterType((*SettingsResp)(nil), "hub.SettingsResp") - proto.RegisterType((*SettingsData)(nil), "hub.SettingsData") - golang_proto.RegisterType((*SettingsData)(nil), "hub.SettingsData") - proto.RegisterType((*HostsReq)(nil), "hub.HostsReq") - golang_proto.RegisterType((*HostsReq)(nil), "hub.HostsReq") - proto.RegisterType((*RolesHostsReq)(nil), "hub.RolesHostsReq") - golang_proto.RegisterType((*RolesHostsReq)(nil), "hub.RolesHostsReq") - proto.RegisterType((*HostsResp)(nil), "hub.HostsResp") - golang_proto.RegisterType((*HostsResp)(nil), "hub.HostsResp") - proto.RegisterType((*StatsReq)(nil), "hub.StatsReq") - golang_proto.RegisterType((*StatsReq)(nil), "hub.StatsReq") - proto.RegisterType((*StatsResp)(nil), "hub.StatsResp") - golang_proto.RegisterType((*StatsResp)(nil), "hub.StatsResp") - proto.RegisterType((*Candidate)(nil), "hub.Candidate") - golang_proto.RegisterType((*Candidate)(nil), "hub.Candidate") - proto.RegisterType((*ParseReq)(nil), "hub.ParseReq") - golang_proto.RegisterType((*ParseReq)(nil), "hub.ParseReq") - proto.RegisterType((*RecycleReq)(nil), "hub.RecycleReq") - golang_proto.RegisterType((*RecycleReq)(nil), "hub.RecycleReq") - proto.RegisterType((*ParseResp)(nil), "hub.ParseResp") - golang_proto.RegisterType((*ParseResp)(nil), "hub.ParseResp") - proto.RegisterType((*HostsData)(nil), "hub.HostsData") - golang_proto.RegisterType((*HostsData)(nil), "hub.HostsData") - proto.RegisterType((*Host)(nil), "hub.Host") - golang_proto.RegisterType((*Host)(nil), "hub.Host") - proto.RegisterType((*Location)(nil), "hub.Location") - golang_proto.RegisterType((*Location)(nil), "hub.Location") -} - -func init() { proto.RegisterFile("protos/hub/hub.proto", fileDescriptor_c704b5990190a69f) } -func init() { golang_proto.RegisterFile("protos/hub/hub.proto", fileDescriptor_c704b5990190a69f) } - -var fileDescriptor_c704b5990190a69f = []byte{ - // 1768 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0x4f, 0x6f, 0x1b, 0xc7, - 0x15, 0xf7, 0xf2, 0x8f, 0x44, 0x3e, 0x8a, 0x7f, 0x34, 0x56, 0x6c, 0x46, 0x76, 0x25, 0x65, 0xdd, - 0xb4, 0x8e, 0x23, 0x53, 0x86, 0xd2, 0x04, 0x85, 0x73, 0x12, 0xa5, 0xb5, 0x25, 0xd4, 0x12, 0xd5, - 0x59, 0xca, 0x05, 0x7a, 0xd9, 0x2e, 0x77, 0x47, 0xd4, 0xc2, 0xe4, 0x0e, 0xbd, 0x33, 0x2b, 0x47, - 0xf9, 0x14, 0xbd, 0xb5, 0xc7, 0xa2, 0x40, 0x2f, 0xbd, 0xf6, 0xd8, 0x4b, 0x7b, 0xf3, 0x31, 0x28, - 0x7a, 0x4e, 0x0a, 0xfb, 0xd2, 0x4b, 0xfb, 0x15, 0x5a, 0xbc, 0x99, 0x59, 0x92, 0xa2, 0x18, 0xd8, - 0x0e, 0x72, 0xc8, 0x41, 0x02, 0xe7, 0xf7, 0x7e, 0xef, 0xed, 0x7b, 0x6f, 0xde, 0x9b, 0x79, 0x03, - 0x2b, 0xa3, 0x84, 0x4b, 0x2e, 0xb6, 0xce, 0xd2, 0x1e, 0xfe, 0xb5, 0xd4, 0x92, 0xe4, 0xcf, 0xd2, - 0xde, 0xea, 0xe7, 0xfd, 0x48, 0x22, 0x14, 0xf0, 0xe1, 0x56, 0x2f, 0x92, 0x92, 0x27, 0x09, 0x8b, - 0xe5, 0x56, 0x9f, 0xdf, 0xef, 0xc9, 0x53, 0x71, 0x3f, 0xe0, 0xc3, 0x21, 0x8f, 0xb7, 0x8c, 0x7e, - 0xcc, 0x43, 0xa6, 0xfe, 0x69, 0x0b, 0xab, 0x0f, 0xa6, 0x94, 0x65, 0xc2, 0xe3, 0xfb, 0xa9, 0xd0, - 0xd4, 0x5e, 0x7a, 0xba, 0xd5, 0xe7, 0x7d, 0xae, 0x16, 0xea, 0x97, 0xd1, 0x58, 0xef, 0x73, 0xde, - 0x1f, 0xb0, 0x09, 0x4b, 0x46, 0x43, 0x26, 0xa4, 0x3f, 0x1c, 0x69, 0x82, 0x1d, 0x42, 0xe9, 0x88, - 0x87, 0x4c, 0x50, 0xf6, 0x9c, 0xdc, 0x84, 0x45, 0xfc, 0x98, 0x17, 0x85, 0x4d, 0x6b, 0x23, 0x7f, - 0xb7, 0x4c, 0x17, 0x70, 0x79, 0x10, 0x92, 0x0f, 0x60, 0x29, 0x61, 0xcf, 0x53, 0x26, 0x24, 0x4b, - 0x50, 0x9a, 0xdb, 0xb0, 0xee, 0x96, 0x69, 0x65, 0x8c, 0x1d, 0x84, 0xe4, 0x36, 0x94, 0x45, 0xd4, - 0x8f, 0x7d, 0x99, 0x26, 0xac, 0x99, 0xdf, 0xb0, 0xee, 0x2e, 0xd1, 0x09, 0x60, 0x3f, 0x84, 0x8a, - 0xcb, 0xa4, 0x8c, 0xe2, 0xbe, 0xfa, 0x50, 0x0d, 0x72, 0xea, 0x1b, 0x68, 0x25, 0x17, 0x85, 0xe4, - 0x16, 0x94, 0x13, 0x26, 0x46, 0x9e, 0x88, 0xbe, 0x64, 0xca, 0x78, 0x91, 0x96, 0x10, 0x70, 0xa3, - 0x2f, 0x99, 0xfd, 0x0f, 0x0b, 0x96, 0x26, 0xca, 0x62, 0x44, 0x3e, 0x84, 0x42, 0xc0, 0x43, 0xa6, - 0xf4, 0x6b, 0xdb, 0xcb, 0x2d, 0xcc, 0x08, 0x0a, 0x78, 0x2c, 0xd8, 0x2e, 0x0f, 0x19, 0x55, 0x62, - 0xd2, 0x84, 0xc5, 0x21, 0x13, 0xc2, 0xef, 0x33, 0xe3, 0x6f, 0xb6, 0x24, 0x07, 0x50, 0x4d, 0x0c, - 0xdf, 0xc3, 0x7c, 0x28, 0x7f, 0x2b, 0xdb, 0xab, 0x2d, 0x9d, 0xac, 0x56, 0x96, 0xac, 0x56, 0x37, - 0x4b, 0x56, 0xbb, 0xf4, 0xf2, 0xeb, 0xf5, 0x6b, 0xbf, 0xfd, 0x66, 0xdd, 0xa2, 0x4b, 0x99, 0x2a, - 0x0a, 0xc9, 0x67, 0x50, 0x15, 0xc6, 0x37, 0x2f, 0xf4, 0xa5, 0xdf, 0x2c, 0x28, 0x53, 0xda, 0xa9, - 0xcc, 0xeb, 0x3d, 0x5f, 0xfa, 0x74, 0x49, 0x4c, 0xad, 0xec, 0x7f, 0x4f, 0x05, 0x85, 0x00, 0xb9, - 0x07, 0xcb, 0x42, 0xf2, 0xc4, 0xef, 0x33, 0x6f, 0x94, 0x44, 0x01, 0xf3, 0x7c, 0xf1, 0x4c, 0x45, - 0x68, 0xd1, 0xba, 0x11, 0x1c, 0x23, 0xbe, 0x23, 0x9e, 0x91, 0x16, 0x5c, 0xef, 0xf9, 0x71, 0xf8, - 0x22, 0x0a, 0xe5, 0xd9, 0x14, 0x3b, 0xa7, 0xd8, 0xcb, 0x63, 0xd1, 0x98, 0x7f, 0x17, 0x1a, 0x99, - 0x6d, 0x0c, 0xd7, 0x1b, 0x46, 0xb1, 0x0a, 0xd9, 0xa2, 0x35, 0x83, 0x63, 0x2c, 0x87, 0x51, 0x4c, - 0x7e, 0x0a, 0xf5, 0x89, 0xe5, 0x41, 0x34, 0x8c, 0xa4, 0x0a, 0xc8, 0xa2, 0xb5, 0x31, 0xfc, 0x04, - 0x51, 0xf2, 0x11, 0x34, 0x02, 0x3e, 0x18, 0xf8, 0x92, 0x25, 0xfe, 0xc0, 0x13, 0xd2, 0x7f, 0xc6, - 0x9a, 0x45, 0xed, 0xed, 0x04, 0x77, 0x11, 0xb6, 0xff, 0x6e, 0x41, 0x69, 0x9f, 0x0b, 0xf9, 0xce, - 0x3b, 0x4f, 0x7e, 0x02, 0x85, 0x21, 0x6e, 0x74, 0x5e, 0x6d, 0x34, 0x51, 0x39, 0xcd, 0x2c, 0xb5, - 0x0e, 0xd5, 0x4e, 0x0f, 0xcd, 0x4e, 0x9f, 0xb3, 0x44, 0x44, 0x3c, 0x56, 0xde, 0x96, 0x69, 0xb6, - 0xb4, 0x1f, 0x41, 0x01, 0x79, 0xa4, 0x0c, 0x45, 0x77, 0xb7, 0x43, 0x9d, 0xc6, 0x35, 0xb2, 0x08, - 0xf9, 0xc7, 0x4e, 0xa7, 0x61, 0xe1, 0x0f, 0xea, 0x1c, 0x37, 0x72, 0x28, 0x3c, 0xa6, 0x07, 0xbb, - 0x4e, 0x23, 0xaf, 0x78, 0xc7, 0x8e, 0xb3, 0xd7, 0x28, 0x90, 0x0a, 0x2c, 0x76, 0x1d, 0xb7, 0x7b, - 0xe4, 0x74, 0x1b, 0x45, 0xfb, 0x37, 0x50, 0xa5, 0x7c, 0xc0, 0xc4, 0x77, 0x8b, 0xc3, 0x86, 0x42, - 0xc2, 0x07, 0x59, 0x1c, 0xb5, 0x96, 0xea, 0x68, 0xec, 0x3a, 0xb4, 0x49, 0x95, 0xcc, 0xfe, 0xaf, - 0x05, 0x65, 0x63, 0xfd, 0xfb, 0x28, 0xf1, 0x1f, 0x43, 0xf1, 0x0c, 0xad, 0x99, 0xd2, 0xae, 0x4d, - 0x72, 0xa7, 0x8a, 0x51, 0x0b, 0x2f, 0x7b, 0x5d, 0x98, 0xf1, 0x9a, 0x98, 0xec, 0x17, 0x95, 0x65, - 0x9d, 0xe9, 0x2b, 0x9d, 0xb3, 0xf0, 0x5d, 0x3b, 0xc7, 0x5e, 0x85, 0x92, 0x2b, 0xfd, 0xb9, 0xd9, - 0xb4, 0xff, 0x69, 0x41, 0xd9, 0x08, 0x7f, 0x60, 0xfd, 0xfe, 0x39, 0x14, 0x05, 0x3a, 0x66, 0xfa, - 0xfc, 0x96, 0xde, 0x4b, 0x57, 0x77, 0x11, 0xba, 0xac, 0x92, 0xac, 0x7c, 0xd7, 0x36, 0xbe, 0xfa, - 0x7a, 0xdd, 0xa2, 0x5a, 0xc7, 0xfe, 0x8f, 0x05, 0xe5, 0x5d, 0x3f, 0x0e, 0xa3, 0xd0, 0x97, 0xec, - 0xf2, 0x69, 0x6b, 0x4d, 0x9d, 0xb6, 0xeb, 0x50, 0x39, 0x63, 0x7e, 0x22, 0xbd, 0x1e, 0xc3, 0x2f, - 0x61, 0x30, 0x05, 0x0a, 0x0a, 0x6a, 0x23, 0x42, 0x3e, 0x84, 0x5a, 0x3a, 0x1a, 0x70, 0x3f, 0xf4, - 0xfc, 0x73, 0x86, 0x1f, 0x56, 0x01, 0xe5, 0x68, 0x55, 0xa3, 0x3b, 0x1a, 0xc4, 0x66, 0x36, 0xb4, - 0x73, 0x3f, 0x89, 0xfc, 0x38, 0xd0, 0x7b, 0x9c, 0xa3, 0x46, 0xfb, 0xa9, 0x41, 0xb1, 0x99, 0x43, - 0xfe, 0x22, 0xbe, 0x64, 0xb1, 0xa8, 0x98, 0xf5, 0x0c, 0xcf, 0x6c, 0x7e, 0x0c, 0xcb, 0x63, 0xea, - 0xd8, 0xea, 0x82, 0xe2, 0x8e, 0x6d, 0x64, 0x76, 0xed, 0x87, 0x50, 0x3a, 0xf6, 0x13, 0xc1, 0x70, - 0x8b, 0x5b, 0x00, 0x41, 0x16, 0xba, 0x50, 0xd7, 0x4b, 0x56, 0x95, 0xe3, 0x8c, 0xd0, 0x29, 0x86, - 0xfd, 0x27, 0x0b, 0x80, 0xb2, 0xe0, 0x22, 0x18, 0x28, 0xf5, 0x6d, 0x28, 0x31, 0xe1, 0x45, 0x71, - 0xc8, 0xbe, 0x30, 0x75, 0x70, 0xd3, 0xd4, 0x41, 0x46, 0x69, 0x39, 0xee, 0x01, 0x8a, 0xe9, 0x22, - 0x13, 0xea, 0x07, 0xb9, 0x0f, 0xd7, 0xd5, 0x71, 0x27, 0x02, 0x3e, 0x62, 0x5e, 0x14, 0x7b, 0x67, - 0x3c, 0x4d, 0x74, 0x3e, 0xf3, 0xb4, 0x81, 0x22, 0x17, 0x25, 0x07, 0xf1, 0x3e, 0xe2, 0xf6, 0xcf, - 0x60, 0xd1, 0x98, 0xc0, 0x63, 0xe0, 0xa8, 0xb3, 0xe7, 0xb8, 0x8d, 0x6b, 0x78, 0x0c, 0x1c, 0x39, - 0xdd, 0x5f, 0x75, 0xe8, 0x2f, 0x1a, 0x16, 0x59, 0x86, 0xaa, 0x39, 0x13, 0x3c, 0x2d, 0xcf, 0xd9, - 0xbf, 0xb3, 0xa0, 0x6c, 0x82, 0xfc, 0x61, 0x95, 0xaa, 0xbd, 0x69, 0x0e, 0x14, 0x75, 0xbd, 0xac, - 0x67, 0xe7, 0x81, 0xce, 0x7c, 0x79, 0x7c, 0x1e, 0x98, 0xa3, 0xc0, 0xfe, 0x6b, 0x05, 0x0a, 0xb8, - 0xfe, 0xf6, 0xb2, 0xec, 0x40, 0x23, 0x48, 0x98, 0x2f, 0xb5, 0x63, 0xea, 0xdb, 0xca, 0xfb, 0xb7, - 0xf5, 0xae, 0xae, 0xb5, 0xc7, 0x22, 0x34, 0x98, 0x8e, 0xc2, 0xcb, 0x06, 0xdf, 0x25, 0xdc, 0xba, - 0xd6, 0x9e, 0x18, 0xbc, 0x01, 0x0b, 0x09, 0xeb, 0x4f, 0xae, 0x01, 0xb3, 0xc2, 0xf1, 0x05, 0x87, - 0x2b, 0x2f, 0xbb, 0x24, 0xf4, 0x89, 0x56, 0x41, 0xec, 0xa9, 0x86, 0xc8, 0x0a, 0x14, 0x45, 0xc0, - 0x93, 0xac, 0x96, 0xf5, 0x62, 0xb6, 0x13, 0x17, 0xaf, 0x74, 0xe2, 0x0d, 0x58, 0x48, 0x47, 0x6a, - 0x9f, 0x4a, 0x4a, 0xcf, 0xac, 0x48, 0x03, 0xf2, 0xb8, 0xb9, 0x65, 0xa5, 0x80, 0x3f, 0xc9, 0x1a, - 0x40, 0xc2, 0x46, 0xa9, 0xf4, 0x25, 0x7a, 0x00, 0x8a, 0x3d, 0x85, 0xcc, 0xe9, 0xe9, 0xca, 0x5b, - 0xf6, 0xf4, 0xd2, 0x5b, 0xf7, 0x74, 0xf5, 0x1d, 0x7a, 0xba, 0x36, 0xbf, 0xa7, 0xc9, 0x16, 0x94, - 0x06, 0x3c, 0xd0, 0x51, 0xd4, 0xd5, 0x66, 0x55, 0x55, 0x2d, 0x3d, 0x31, 0x60, 0xbb, 0x80, 0xfb, - 0x43, 0xc7, 0x24, 0xb2, 0x09, 0x24, 0x1b, 0x3e, 0xce, 0xf9, 0x20, 0x1d, 0x32, 0x2f, 0xf0, 0x47, - 0xcd, 0x86, 0x36, 0x6f, 0x24, 0x4f, 0x95, 0x60, 0xd7, 0x1f, 0xe1, 0x68, 0x33, 0xc3, 0x1e, 0xb0, - 0x53, 0xd9, 0x5c, 0x56, 0xf4, 0xe5, 0x4b, 0xf4, 0x27, 0xec, 0x54, 0xce, 0x1d, 0x6d, 0x88, 0xca, - 0xfa, 0xec, 0x68, 0x33, 0x77, 0xc0, 0xba, 0xae, 0xa8, 0x57, 0x06, 0xac, 0x2b, 0x5c, 0x26, 0x64, - 0x73, 0xe5, 0x2a, 0xd7, 0x11, 0x72, 0xde, 0xc8, 0xf4, 0xde, 0xdc, 0x91, 0xe9, 0x5b, 0xa6, 0xb6, - 0x1b, 0xca, 0xec, 0x9c, 0xa9, 0x6d, 0x0e, 0x1f, 0xdd, 0xb8, 0x39, 0x8f, 0x8f, 0x8e, 0xcc, 0x1b, - 0xc9, 0x9a, 0xda, 0xe7, 0x99, 0x91, 0x0c, 0x7d, 0x9e, 0xa2, 0x0e, 0xb8, 0x90, 0xcd, 0xf7, 0x75, - 0xd2, 0x26, 0xf0, 0x13, 0xae, 0x83, 0x9b, 0x22, 0xf6, 0xd2, 0x24, 0x6e, 0xae, 0xce, 0x12, 0xdb, - 0x69, 0x12, 0x93, 0x3b, 0x50, 0x0d, 0x78, 0x1a, 0xcb, 0xe4, 0xc2, 0x13, 0x67, 0x3c, 0x91, 0xcd, - 0x5b, 0xaa, 0xc7, 0x96, 0x0c, 0xe8, 0x22, 0x46, 0x7e, 0x0e, 0xf9, 0xd3, 0x41, 0xbf, 0x79, 0x5b, - 0x95, 0xcd, 0xed, 0xc9, 0x18, 0xd4, 0x72, 0xbe, 0x18, 0xb1, 0x24, 0x1a, 0xb2, 0x58, 0xfa, 0x83, - 0x47, 0x03, 0xbf, 0x3f, 0x7d, 0x77, 0xa2, 0x0a, 0xbe, 0x2e, 0xc2, 0x48, 0x04, 0xfc, 0x9c, 0x25, - 0x17, 0xcd, 0x1f, 0xa9, 0x62, 0x98, 0x00, 0xd8, 0xdf, 0xba, 0xef, 0x3c, 0xdd, 0xc3, 0x6b, 0x8a, - 0x50, 0xd1, 0x98, 0xab, 0x3a, 0xf9, 0x16, 0x94, 0x71, 0x37, 0xb5, 0x7c, 0x5d, 0xc9, 0x4b, 0x78, - 0x63, 0x2b, 0xe1, 0x1d, 0xa8, 0x9a, 0xa3, 0xc1, 0x10, 0x36, 0x14, 0x61, 0xc9, 0x80, 0x9a, 0xb4, - 0x09, 0xc4, 0x74, 0x9e, 0x18, 0x31, 0x16, 0x1a, 0xe6, 0x07, 0xba, 0x8e, 0xb5, 0xc4, 0x45, 0x81, - 0x66, 0x3f, 0x80, 0x95, 0x71, 0x4f, 0x4d, 0xf3, 0x6d, 0xc5, 0x27, 0x99, 0x6c, 0x4a, 0xe3, 0x53, - 0x28, 0xe2, 0x20, 0x28, 0x9a, 0x77, 0x36, 0xf2, 0x57, 0xa7, 0xc4, 0x76, 0xfd, 0xcf, 0xdf, 0xac, - 0x57, 0x14, 0x61, 0xd3, 0x4f, 0x12, 0xff, 0x82, 0x6a, 0xf6, 0xc3, 0xc2, 0x1f, 0xfe, 0xb8, 0x6e, - 0xd9, 0x2d, 0x28, 0x65, 0x0d, 0x88, 0x67, 0xcf, 0xc0, 0x97, 0xe6, 0xed, 0x80, 0x3f, 0x15, 0xc2, - 0x63, 0xf3, 0x3e, 0xc0, 0x9f, 0xf7, 0xce, 0x61, 0x69, 0xfa, 0x5a, 0xc2, 0x5b, 0xce, 0x3d, 0xd9, - 0xdd, 0x75, 0x5c, 0xbc, 0xf2, 0x56, 0xe1, 0x86, 0x7b, 0xf0, 0xf8, 0x68, 0xa7, 0x7b, 0x42, 0x1d, - 0xef, 0x51, 0x87, 0x1e, 0xee, 0x74, 0x3d, 0x87, 0xd2, 0x0e, 0x6d, 0x58, 0xe4, 0x7d, 0x78, 0x6f, - 0xb7, 0x73, 0x78, 0x7c, 0xd2, 0x75, 0xbc, 0x9d, 0xbd, 0x3d, 0xea, 0xb8, 0xae, 0x11, 0xe5, 0xd4, - 0xe5, 0x78, 0x70, 0xe8, 0x74, 0x4e, 0x32, 0x76, 0x9e, 0xd4, 0xa1, 0xd2, 0xe9, 0xee, 0x3b, 0xd4, - 0x00, 0x2b, 0xdb, 0xff, 0xb3, 0xa0, 0xbe, 0x9f, 0xf6, 0x7e, 0x99, 0xb2, 0xe4, 0xc2, 0x65, 0xc9, - 0x79, 0x14, 0x30, 0xb2, 0x0d, 0x95, 0xc7, 0x4c, 0x66, 0x8f, 0x21, 0xd2, 0xb8, 0xf4, 0x74, 0xa2, - 0xec, 0xf9, 0xea, 0xf2, 0x0c, 0x22, 0x46, 0xe4, 0x23, 0x28, 0x3d, 0x66, 0x52, 0x5d, 0x6f, 0xa4, - 0x7a, 0xe9, 0x5d, 0xb0, 0x5a, 0x9b, 0x5e, 0x8e, 0xa9, 0x6a, 0x22, 0x33, 0xd4, 0x6c, 0xec, 0x34, - 0xd4, 0xc9, 0xa0, 0xf9, 0x31, 0x80, 0xf2, 0x4c, 0x3d, 0x88, 0x0d, 0x39, 0x7b, 0x1c, 0x5f, 0xb1, - 0xfb, 0x29, 0xd4, 0x33, 0x17, 0xda, 0x17, 0xea, 0x71, 0x40, 0xf4, 0x0b, 0xe5, 0xd2, 0x43, 0x61, - 0x56, 0x6d, 0xfb, 0x2f, 0x39, 0x95, 0x01, 0x35, 0x32, 0x64, 0x19, 0x78, 0x00, 0xf5, 0x13, 0x75, - 0x95, 0xed, 0x8d, 0x4b, 0x5a, 0x7f, 0x3c, 0x9b, 0x9e, 0x8c, 0x95, 0xc9, 0x9c, 0xb1, 0x09, 0x15, - 0xad, 0xa1, 0x6b, 0xe7, 0x0d, 0xec, 0x16, 0x54, 0x35, 0xfb, 0x88, 0xc9, 0x17, 0x3c, 0x79, 0xf6, - 0x26, 0xfe, 0x3d, 0x58, 0x34, 0x73, 0x15, 0xa9, 0xcf, 0x4c, 0x59, 0x57, 0xb8, 0x5b, 0x50, 0xd3, - 0xb6, 0xdb, 0xf2, 0x54, 0xb8, 0x81, 0x1f, 0xbf, 0xc9, 0xf8, 0x27, 0x40, 0xa6, 0x5c, 0xdf, 0x8f, - 0xf0, 0x3c, 0x7d, 0x53, 0xbc, 0xed, 0xcf, 0x5e, 0xbe, 0x5a, 0xb3, 0xbe, 0x7a, 0xb5, 0x66, 0xfd, - 0xeb, 0xd5, 0x9a, 0xf5, 0xfb, 0xd7, 0x6b, 0xd6, 0xdf, 0x5e, 0xaf, 0x59, 0x2f, 0x5f, 0xaf, 0x59, - 0x50, 0x89, 0x78, 0x0b, 0x2f, 0x72, 0x54, 0x68, 0x97, 0x30, 0xb3, 0x38, 0x32, 0x1c, 0x5b, 0xbf, - 0xce, 0x9f, 0xa5, 0xbd, 0xde, 0x82, 0x1a, 0x20, 0x3e, 0xf9, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xae, 0x88, 0x46, 0x95, 0x91, 0x11, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// HubQueryServiceClient is the client API for HubQueryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type HubQueryServiceClient interface { - GetSettings(ctx context.Context, in *SettingsReq, opts ...grpc.CallOption) (*SettingsResp, error) - GetHosts(ctx context.Context, in *HostsReq, opts ...grpc.CallOption) (*HostsResp, error) - GetStats(ctx context.Context, in *StatsReq, opts ...grpc.CallOption) (*StatsResp, error) - QueryNodes(ctx context.Context, in *NodesReq, opts ...grpc.CallOption) (*HostsResp, error) - GetHostsByRoles(ctx context.Context, in *RolesHostsReq, opts ...grpc.CallOption) (*HostsResp, error) -} - -type hubQueryServiceClient struct { - cc *grpc.ClientConn -} - -func NewHubQueryServiceClient(cc *grpc.ClientConn) HubQueryServiceClient { - return &hubQueryServiceClient{cc} -} - -func (c *hubQueryServiceClient) GetSettings(ctx context.Context, in *SettingsReq, opts ...grpc.CallOption) (*SettingsResp, error) { - out := new(SettingsResp) - err := c.cc.Invoke(ctx, "/hub.HubQueryService/GetSettings", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *hubQueryServiceClient) GetHosts(ctx context.Context, in *HostsReq, opts ...grpc.CallOption) (*HostsResp, error) { - out := new(HostsResp) - err := c.cc.Invoke(ctx, "/hub.HubQueryService/GetHosts", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *hubQueryServiceClient) GetStats(ctx context.Context, in *StatsReq, opts ...grpc.CallOption) (*StatsResp, error) { - out := new(StatsResp) - err := c.cc.Invoke(ctx, "/hub.HubQueryService/GetStats", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *hubQueryServiceClient) QueryNodes(ctx context.Context, in *NodesReq, opts ...grpc.CallOption) (*HostsResp, error) { - out := new(HostsResp) - err := c.cc.Invoke(ctx, "/hub.HubQueryService/QueryNodes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *hubQueryServiceClient) GetHostsByRoles(ctx context.Context, in *RolesHostsReq, opts ...grpc.CallOption) (*HostsResp, error) { - out := new(HostsResp) - err := c.cc.Invoke(ctx, "/hub.HubQueryService/GetHostsByRoles", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// HubQueryServiceServer is the server API for HubQueryService service. -type HubQueryServiceServer interface { - GetSettings(context.Context, *SettingsReq) (*SettingsResp, error) - GetHosts(context.Context, *HostsReq) (*HostsResp, error) - GetStats(context.Context, *StatsReq) (*StatsResp, error) - QueryNodes(context.Context, *NodesReq) (*HostsResp, error) - GetHostsByRoles(context.Context, *RolesHostsReq) (*HostsResp, error) -} - -// UnimplementedHubQueryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedHubQueryServiceServer struct { -} - -func (*UnimplementedHubQueryServiceServer) GetSettings(ctx context.Context, req *SettingsReq) (*SettingsResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSettings not implemented") -} -func (*UnimplementedHubQueryServiceServer) GetHosts(ctx context.Context, req *HostsReq) (*HostsResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetHosts not implemented") -} -func (*UnimplementedHubQueryServiceServer) GetStats(ctx context.Context, req *StatsReq) (*StatsResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetStats not implemented") -} -func (*UnimplementedHubQueryServiceServer) QueryNodes(ctx context.Context, req *NodesReq) (*HostsResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method QueryNodes not implemented") -} -func (*UnimplementedHubQueryServiceServer) GetHostsByRoles(ctx context.Context, req *RolesHostsReq) (*HostsResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetHostsByRoles not implemented") -} - -func RegisterHubQueryServiceServer(s *grpc.Server, srv HubQueryServiceServer) { - s.RegisterService(&_HubQueryService_serviceDesc, srv) -} - -func _HubQueryService_GetSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SettingsReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HubQueryServiceServer).GetSettings(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/hub.HubQueryService/GetSettings", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HubQueryServiceServer).GetSettings(ctx, req.(*SettingsReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _HubQueryService_GetHosts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(HostsReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HubQueryServiceServer).GetHosts(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/hub.HubQueryService/GetHosts", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HubQueryServiceServer).GetHosts(ctx, req.(*HostsReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _HubQueryService_GetStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(StatsReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HubQueryServiceServer).GetStats(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/hub.HubQueryService/GetStats", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HubQueryServiceServer).GetStats(ctx, req.(*StatsReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _HubQueryService_QueryNodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(NodesReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HubQueryServiceServer).QueryNodes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/hub.HubQueryService/QueryNodes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HubQueryServiceServer).QueryNodes(ctx, req.(*NodesReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _HubQueryService_GetHostsByRoles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RolesHostsReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HubQueryServiceServer).GetHostsByRoles(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/hub.HubQueryService/GetHostsByRoles", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HubQueryServiceServer).GetHostsByRoles(ctx, req.(*RolesHostsReq)) - } - return interceptor(ctx, in, info, handler) -} - -var _HubQueryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "hub.HubQueryService", - HandlerType: (*HubQueryServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetSettings", - Handler: _HubQueryService_GetSettings_Handler, - }, - { - MethodName: "GetHosts", - Handler: _HubQueryService_GetHosts_Handler, - }, - { - MethodName: "GetStats", - Handler: _HubQueryService_GetStats_Handler, - }, - { - MethodName: "QueryNodes", - Handler: _HubQueryService_QueryNodes_Handler, - }, - { - MethodName: "GetHostsByRoles", - Handler: _HubQueryService_GetHostsByRoles_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "protos/hub/hub.proto", -} - -// HubParseServiceClient is the client API for HubParseService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type HubParseServiceClient interface { - UpdateDiscovery(ctx context.Context, in *ParseReq, opts ...grpc.CallOption) (*ParseResp, error) - UpdateScore(ctx context.Context, in *ParseReq, opts ...grpc.CallOption) (*ParseResp, error) - UpdateNetwork(ctx context.Context, in *ParseReq, opts ...grpc.CallOption) (*ParseResp, error) - Recycle(ctx context.Context, in *RecycleReq, opts ...grpc.CallOption) (*ParseResp, error) - UpdateBtfsScan(ctx context.Context, in *ParseReq, opts ...grpc.CallOption) (*ParseResp, error) - UpdateScoreHistory(ctx context.Context, in *ParseReq, opts ...grpc.CallOption) (*ParseResp, error) -} - -type hubParseServiceClient struct { - cc *grpc.ClientConn -} - -func NewHubParseServiceClient(cc *grpc.ClientConn) HubParseServiceClient { - return &hubParseServiceClient{cc} -} - -func (c *hubParseServiceClient) UpdateDiscovery(ctx context.Context, in *ParseReq, opts ...grpc.CallOption) (*ParseResp, error) { - out := new(ParseResp) - err := c.cc.Invoke(ctx, "/hub.HubParseService/UpdateDiscovery", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *hubParseServiceClient) UpdateScore(ctx context.Context, in *ParseReq, opts ...grpc.CallOption) (*ParseResp, error) { - out := new(ParseResp) - err := c.cc.Invoke(ctx, "/hub.HubParseService/UpdateScore", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *hubParseServiceClient) UpdateNetwork(ctx context.Context, in *ParseReq, opts ...grpc.CallOption) (*ParseResp, error) { - out := new(ParseResp) - err := c.cc.Invoke(ctx, "/hub.HubParseService/UpdateNetwork", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *hubParseServiceClient) Recycle(ctx context.Context, in *RecycleReq, opts ...grpc.CallOption) (*ParseResp, error) { - out := new(ParseResp) - err := c.cc.Invoke(ctx, "/hub.HubParseService/Recycle", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *hubParseServiceClient) UpdateBtfsScan(ctx context.Context, in *ParseReq, opts ...grpc.CallOption) (*ParseResp, error) { - out := new(ParseResp) - err := c.cc.Invoke(ctx, "/hub.HubParseService/UpdateBtfsScan", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *hubParseServiceClient) UpdateScoreHistory(ctx context.Context, in *ParseReq, opts ...grpc.CallOption) (*ParseResp, error) { - out := new(ParseResp) - err := c.cc.Invoke(ctx, "/hub.HubParseService/UpdateScoreHistory", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// HubParseServiceServer is the server API for HubParseService service. -type HubParseServiceServer interface { - UpdateDiscovery(context.Context, *ParseReq) (*ParseResp, error) - UpdateScore(context.Context, *ParseReq) (*ParseResp, error) - UpdateNetwork(context.Context, *ParseReq) (*ParseResp, error) - Recycle(context.Context, *RecycleReq) (*ParseResp, error) - UpdateBtfsScan(context.Context, *ParseReq) (*ParseResp, error) - UpdateScoreHistory(context.Context, *ParseReq) (*ParseResp, error) -} - -// UnimplementedHubParseServiceServer can be embedded to have forward compatible implementations. -type UnimplementedHubParseServiceServer struct { -} - -func (*UnimplementedHubParseServiceServer) UpdateDiscovery(ctx context.Context, req *ParseReq) (*ParseResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateDiscovery not implemented") -} -func (*UnimplementedHubParseServiceServer) UpdateScore(ctx context.Context, req *ParseReq) (*ParseResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateScore not implemented") -} -func (*UnimplementedHubParseServiceServer) UpdateNetwork(ctx context.Context, req *ParseReq) (*ParseResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateNetwork not implemented") -} -func (*UnimplementedHubParseServiceServer) Recycle(ctx context.Context, req *RecycleReq) (*ParseResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method Recycle not implemented") -} -func (*UnimplementedHubParseServiceServer) UpdateBtfsScan(ctx context.Context, req *ParseReq) (*ParseResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateBtfsScan not implemented") -} -func (*UnimplementedHubParseServiceServer) UpdateScoreHistory(ctx context.Context, req *ParseReq) (*ParseResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateScoreHistory not implemented") -} - -func RegisterHubParseServiceServer(s *grpc.Server, srv HubParseServiceServer) { - s.RegisterService(&_HubParseService_serviceDesc, srv) -} - -func _HubParseService_UpdateDiscovery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ParseReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HubParseServiceServer).UpdateDiscovery(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/hub.HubParseService/UpdateDiscovery", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HubParseServiceServer).UpdateDiscovery(ctx, req.(*ParseReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _HubParseService_UpdateScore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ParseReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HubParseServiceServer).UpdateScore(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/hub.HubParseService/UpdateScore", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HubParseServiceServer).UpdateScore(ctx, req.(*ParseReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _HubParseService_UpdateNetwork_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ParseReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HubParseServiceServer).UpdateNetwork(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/hub.HubParseService/UpdateNetwork", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HubParseServiceServer).UpdateNetwork(ctx, req.(*ParseReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _HubParseService_Recycle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RecycleReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HubParseServiceServer).Recycle(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/hub.HubParseService/Recycle", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HubParseServiceServer).Recycle(ctx, req.(*RecycleReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _HubParseService_UpdateBtfsScan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ParseReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HubParseServiceServer).UpdateBtfsScan(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/hub.HubParseService/UpdateBtfsScan", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HubParseServiceServer).UpdateBtfsScan(ctx, req.(*ParseReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _HubParseService_UpdateScoreHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ParseReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HubParseServiceServer).UpdateScoreHistory(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/hub.HubParseService/UpdateScoreHistory", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HubParseServiceServer).UpdateScoreHistory(ctx, req.(*ParseReq)) - } - return interceptor(ctx, in, info, handler) -} - -var _HubParseService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "hub.HubParseService", - HandlerType: (*HubParseServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "UpdateDiscovery", - Handler: _HubParseService_UpdateDiscovery_Handler, - }, - { - MethodName: "UpdateScore", - Handler: _HubParseService_UpdateScore_Handler, - }, - { - MethodName: "UpdateNetwork", - Handler: _HubParseService_UpdateNetwork_Handler, - }, - { - MethodName: "Recycle", - Handler: _HubParseService_Recycle_Handler, - }, - { - MethodName: "UpdateBtfsScan", - Handler: _HubParseService_UpdateBtfsScan_Handler, - }, - { - MethodName: "UpdateScoreHistory", - Handler: _HubParseService_UpdateScoreHistory_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "protos/hub/hub.proto", -} - -func (m *NodesReq) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NodesReq) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NodesReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintHub(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x1a - } - if len(m.RequesterId) > 0 { - i -= len(m.RequesterId) - copy(dAtA[i:], m.RequesterId) - i = encodeVarintHub(dAtA, i, uint64(len(m.RequesterId))) - i-- - dAtA[i] = 0x12 - } - if len(m.NodeId) > 0 { - for iNdEx := len(m.NodeId) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.NodeId[iNdEx]) - copy(dAtA[i:], m.NodeId[iNdEx]) - i = encodeVarintHub(dAtA, i, uint64(len(m.NodeId[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *SettingsReq) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SettingsReq) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SettingsReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.RespSize != 0 { - i = encodeVarintHub(dAtA, i, uint64(m.RespSize)) - i-- - dAtA[i] = 0x10 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintHub(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SettingsResp) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SettingsResp) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SettingsResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.SettingsData != nil { - { - size, err := m.SettingsData.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintHub(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - n2, err2 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.ResponseTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime):]) - if err2 != nil { - return 0, err2 - } - i -= n2 - i = encodeVarintHub(dAtA, i, uint64(n2)) - i-- - dAtA[i] = 0x1a - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintHub(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = encodeVarintHub(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *SettingsData) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SettingsData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SettingsData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.CollateralStake != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.CollateralStake)))) - i-- - dAtA[i] = 0x29 - } - if m.BandwidthLimit != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.BandwidthLimit)))) - i-- - dAtA[i] = 0x21 - } - if m.StorageTimeMin != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.StorageTimeMin)))) - i-- - dAtA[i] = 0x19 - } - if m.BandwidthPriceAsk != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.BandwidthPriceAsk)))) - i-- - dAtA[i] = 0x11 - } - if m.StoragePriceAsk != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.StoragePriceAsk)))) - i-- - dAtA[i] = 0x9 - } - return len(dAtA) - i, nil -} - -func (m *HostsReq) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HostsReq) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HostsReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintHub(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x22 - } - if m.Mode != 0 { - i = encodeVarintHub(dAtA, i, uint64(m.Mode)) - i-- - dAtA[i] = 0x18 - } - if m.RespSize != 0 { - i = encodeVarintHub(dAtA, i, uint64(m.RespSize)) - i-- - dAtA[i] = 0x10 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintHub(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RolesHostsReq) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RolesHostsReq) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RolesHostsReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Role != 0 { - i = encodeVarintHub(dAtA, i, uint64(m.Role)) - i-- - dAtA[i] = 0x18 - } - if m.RespSize != 0 { - i = encodeVarintHub(dAtA, i, uint64(m.RespSize)) - i-- - dAtA[i] = 0x10 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintHub(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *HostsResp) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HostsResp) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HostsResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - n3, err3 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.ResponseTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime):]) - if err3 != nil { - return 0, err3 - } - i -= n3 - i = encodeVarintHub(dAtA, i, uint64(n3)) - i-- - dAtA[i] = 0x32 - if len(m.Mode) > 0 { - i -= len(m.Mode) - copy(dAtA[i:], m.Mode) - i = encodeVarintHub(dAtA, i, uint64(len(m.Mode))) - i-- - dAtA[i] = 0x2a - } - if m.RespSize != 0 { - i = encodeVarintHub(dAtA, i, uint64(m.RespSize)) - i-- - dAtA[i] = 0x20 - } - if m.Hosts != nil { - { - size, err := m.Hosts.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintHub(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintHub(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = encodeVarintHub(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *StatsReq) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StatsReq) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StatsReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintHub(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *StatsResp) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StatsResp) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StatsResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - { - size, err := m.StorageStat_HostStats.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintHub(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - n6, err6 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.ResponseTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime):]) - if err6 != nil { - return 0, err6 - } - i -= n6 - i = encodeVarintHub(dAtA, i, uint64(n6)) - i-- - dAtA[i] = 0x1a - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintHub(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = encodeVarintHub(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Candidate) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Candidate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Candidate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.DownloadVariance != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.DownloadVariance)))) - i-- - dAtA[i] = 0x35 - } - if m.DownloadAverage != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.DownloadAverage)))) - i-- - dAtA[i] = 0x2d - } - if m.UploadVariance != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.UploadVariance)))) - i-- - dAtA[i] = 0x25 - } - if m.UploadAverage != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.UploadAverage)))) - i-- - dAtA[i] = 0x1d - } - if m.HeartBeats != 0 { - i = encodeVarintHub(dAtA, i, uint64(m.HeartBeats)) - i-- - dAtA[i] = 0x10 - } - if len(m.NodeId) > 0 { - i -= len(m.NodeId) - copy(dAtA[i:], m.NodeId) - i = encodeVarintHub(dAtA, i, uint64(len(m.NodeId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ParseReq) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ParseReq) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ParseReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Candidates) > 0 { - for iNdEx := len(m.Candidates) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Candidates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintHub(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *RecycleReq) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RecycleReq) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RecycleReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.TimeScopeInHours != 0 { - i = encodeVarintHub(dAtA, i, uint64(m.TimeScopeInHours)) - i-- - dAtA[i] = 0x10 - } - if m.EsIndex != 0 { - i = encodeVarintHub(dAtA, i, uint64(m.EsIndex)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ParseResp) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ParseResp) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ParseResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - n7, err7 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.ResponseTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime):]) - if err7 != nil { - return 0, err7 - } - i -= n7 - i = encodeVarintHub(dAtA, i, uint64(n7)) - i-- - dAtA[i] = 0x1a - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintHub(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = encodeVarintHub(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *HostsData) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HostsData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HostsData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Hosts) > 0 { - for iNdEx := len(m.Hosts) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Hosts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintHub(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Host) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Host) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Host) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Roles) > 0 { - dAtA9 := make([]byte, len(m.Roles)*10) - var j8 int - for _, num := range m.Roles { - for num >= 1<<7 { - dAtA9[j8] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j8++ - } - dAtA9[j8] = uint8(num) - j8++ - } - i -= j8 - copy(dAtA[i:], dAtA9[:j8]) - i = encodeVarintHub(dAtA, i, uint64(j8)) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x9a - } - if m.DownloadSpeedScore != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.DownloadSpeedScore)))) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x95 - } - if m.UploadSpeedScore != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.UploadSpeedScore)))) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x8d - } - if m.VersionScore != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.VersionScore)))) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x85 - } - if m.AgeScore != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.AgeScore)))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xfd - } - if m.UptimeScore != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.UptimeScore)))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xf5 - } - if m.Discovery != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Discovery)))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xed - } - { - size, err := m.Node_ExperimentalFlags.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintHub(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xe2 - if len(m.CountryShort) > 0 { - i -= len(m.CountryShort) - copy(dAtA[i:], m.CountryShort) - i = encodeVarintHub(dAtA, i, uint64(len(m.CountryShort))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xda - } - if m.CollateralBurn != 0 { - i = encodeVarintHub(dAtA, i, uint64(m.CollateralBurn)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xd0 - } - if m.CollateralLost != 0 { - i = encodeVarintHub(dAtA, i, uint64(m.CollateralLost)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xc8 - } - if m.CollateralStake != 0 { - i = encodeVarintHub(dAtA, i, uint64(m.CollateralStake)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xc0 - } - if m.BandwidthPriceEst != 0 { - i = encodeVarintHub(dAtA, i, uint64(m.BandwidthPriceEst)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb8 - } - if m.BandwidthPriceAsk != 0 { - i = encodeVarintHub(dAtA, i, uint64(m.BandwidthPriceAsk)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb0 - } - if m.BandwidthLimit != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.BandwidthLimit)))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa9 - } - if m.StoragePriceEst != 0 { - i = encodeVarintHub(dAtA, i, uint64(m.StoragePriceEst)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa0 - } - if m.StoragePriceAsk != 0 { - i = encodeVarintHub(dAtA, i, uint64(m.StoragePriceAsk)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x98 - } - if m.StorageTimeMin != 0 { - i = encodeVarintHub(dAtA, i, uint64(m.StorageTimeMin)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x90 - } - if m.StorageVolumeLeft != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.StorageVolumeLeft)))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x8d - } - if m.StorageVolumeCap != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.StorageVolumeCap)))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x85 - } - { - size, err := m.Location.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintHub(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x7a - if m.DownloadVariance != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.DownloadVariance)))) - i-- - dAtA[i] = 0x75 - } - if m.DownloadAverage != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.DownloadAverage)))) - i-- - dAtA[i] = 0x6d - } - if m.UploadVariance != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.UploadVariance)))) - i-- - dAtA[i] = 0x65 - } - if m.UploadAverage != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.UploadAverage)))) - i-- - dAtA[i] = 0x5d - } - if m.Reputation != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Reputation)))) - i-- - dAtA[i] = 0x55 - } - if m.Age != 0 { - i = encodeVarintHub(dAtA, i, uint64(m.Age)) - i-- - dAtA[i] = 0x48 - } - if m.Uptime != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Uptime)))) - i-- - dAtA[i] = 0x45 - } - if m.HeartBeats != 0 { - i = encodeVarintHub(dAtA, i, uint64(m.HeartBeats)) - i-- - dAtA[i] = 0x38 - } - if m.Score != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Score)))) - i-- - dAtA[i] = 0x35 - } - if len(m.BtfsVersion) > 0 { - i -= len(m.BtfsVersion) - copy(dAtA[i:], m.BtfsVersion) - i = encodeVarintHub(dAtA, i, uint64(len(m.BtfsVersion))) - i-- - dAtA[i] = 0x2a - } - if len(m.Region) > 0 { - i -= len(m.Region) - copy(dAtA[i:], m.Region) - i = encodeVarintHub(dAtA, i, uint64(len(m.Region))) - i-- - dAtA[i] = 0x22 - } - n12, err12 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.UpdateTimestamp, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.UpdateTimestamp):]) - if err12 != nil { - return 0, err12 - } - i -= n12 - i = encodeVarintHub(dAtA, i, uint64(n12)) - i-- - dAtA[i] = 0x1a - n13, err13 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.CreateTimestamp, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.CreateTimestamp):]) - if err13 != nil { - return 0, err13 - } - i -= n13 - i = encodeVarintHub(dAtA, i, uint64(n13)) - i-- - dAtA[i] = 0x12 - if len(m.NodeId) > 0 { - i -= len(m.NodeId) - copy(dAtA[i:], m.NodeId) - i = encodeVarintHub(dAtA, i, uint64(len(m.NodeId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Location) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Location) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Location) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Lon != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Lon)))) - i-- - dAtA[i] = 0x11 - } - if m.Lat != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Lat)))) - i-- - dAtA[i] = 0x9 - } - return len(dAtA) - i, nil -} - -func encodeVarintHub(dAtA []byte, offset int, v uint64) int { - offset -= sovHub(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *NodesReq) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.NodeId) > 0 { - for _, s := range m.NodeId { - l = len(s) - n += 1 + l + sovHub(uint64(l)) - } - } - l = len(m.RequesterId) - if l > 0 { - n += 1 + l + sovHub(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovHub(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SettingsReq) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovHub(uint64(l)) - } - if m.RespSize != 0 { - n += 1 + sovHub(uint64(m.RespSize)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SettingsResp) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovHub(uint64(m.Code)) - } - l = len(m.Message) - if l > 0 { - n += 1 + l + sovHub(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime) - n += 1 + l + sovHub(uint64(l)) - if m.SettingsData != nil { - l = m.SettingsData.Size() - n += 1 + l + sovHub(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SettingsData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.StoragePriceAsk != 0 { - n += 9 - } - if m.BandwidthPriceAsk != 0 { - n += 9 - } - if m.StorageTimeMin != 0 { - n += 9 - } - if m.BandwidthLimit != 0 { - n += 9 - } - if m.CollateralStake != 0 { - n += 9 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HostsReq) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovHub(uint64(l)) - } - if m.RespSize != 0 { - n += 1 + sovHub(uint64(m.RespSize)) - } - if m.Mode != 0 { - n += 1 + sovHub(uint64(m.Mode)) - } - l = len(m.Version) - if l > 0 { - n += 1 + l + sovHub(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RolesHostsReq) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovHub(uint64(l)) - } - if m.RespSize != 0 { - n += 1 + sovHub(uint64(m.RespSize)) - } - if m.Role != 0 { - n += 1 + sovHub(uint64(m.Role)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HostsResp) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovHub(uint64(m.Code)) - } - l = len(m.Message) - if l > 0 { - n += 1 + l + sovHub(uint64(l)) - } - if m.Hosts != nil { - l = m.Hosts.Size() - n += 1 + l + sovHub(uint64(l)) - } - if m.RespSize != 0 { - n += 1 + sovHub(uint64(m.RespSize)) - } - l = len(m.Mode) - if l > 0 { - n += 1 + l + sovHub(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime) - n += 1 + l + sovHub(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *StatsReq) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovHub(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *StatsResp) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovHub(uint64(m.Code)) - } - l = len(m.Message) - if l > 0 { - n += 1 + l + sovHub(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime) - n += 1 + l + sovHub(uint64(l)) - l = m.StorageStat_HostStats.Size() - n += 1 + l + sovHub(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Candidate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.NodeId) - if l > 0 { - n += 1 + l + sovHub(uint64(l)) - } - if m.HeartBeats != 0 { - n += 1 + sovHub(uint64(m.HeartBeats)) - } - if m.UploadAverage != 0 { - n += 5 - } - if m.UploadVariance != 0 { - n += 5 - } - if m.DownloadAverage != 0 { - n += 5 - } - if m.DownloadVariance != 0 { - n += 5 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ParseReq) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Candidates) > 0 { - for _, e := range m.Candidates { - l = e.Size() - n += 1 + l + sovHub(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RecycleReq) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.EsIndex != 0 { - n += 1 + sovHub(uint64(m.EsIndex)) - } - if m.TimeScopeInHours != 0 { - n += 1 + sovHub(uint64(m.TimeScopeInHours)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ParseResp) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovHub(uint64(m.Code)) - } - l = len(m.Message) - if l > 0 { - n += 1 + l + sovHub(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime) - n += 1 + l + sovHub(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HostsData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Hosts) > 0 { - for _, e := range m.Hosts { - l = e.Size() - n += 1 + l + sovHub(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Host) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.NodeId) - if l > 0 { - n += 1 + l + sovHub(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.CreateTimestamp) - n += 1 + l + sovHub(uint64(l)) - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.UpdateTimestamp) - n += 1 + l + sovHub(uint64(l)) - l = len(m.Region) - if l > 0 { - n += 1 + l + sovHub(uint64(l)) - } - l = len(m.BtfsVersion) - if l > 0 { - n += 1 + l + sovHub(uint64(l)) - } - if m.Score != 0 { - n += 5 - } - if m.HeartBeats != 0 { - n += 1 + sovHub(uint64(m.HeartBeats)) - } - if m.Uptime != 0 { - n += 5 - } - if m.Age != 0 { - n += 1 + sovHub(uint64(m.Age)) - } - if m.Reputation != 0 { - n += 5 - } - if m.UploadAverage != 0 { - n += 5 - } - if m.UploadVariance != 0 { - n += 5 - } - if m.DownloadAverage != 0 { - n += 5 - } - if m.DownloadVariance != 0 { - n += 5 - } - l = m.Location.Size() - n += 1 + l + sovHub(uint64(l)) - if m.StorageVolumeCap != 0 { - n += 6 - } - if m.StorageVolumeLeft != 0 { - n += 6 - } - if m.StorageTimeMin != 0 { - n += 2 + sovHub(uint64(m.StorageTimeMin)) - } - if m.StoragePriceAsk != 0 { - n += 2 + sovHub(uint64(m.StoragePriceAsk)) - } - if m.StoragePriceEst != 0 { - n += 2 + sovHub(uint64(m.StoragePriceEst)) - } - if m.BandwidthLimit != 0 { - n += 10 - } - if m.BandwidthPriceAsk != 0 { - n += 2 + sovHub(uint64(m.BandwidthPriceAsk)) - } - if m.BandwidthPriceEst != 0 { - n += 2 + sovHub(uint64(m.BandwidthPriceEst)) - } - if m.CollateralStake != 0 { - n += 2 + sovHub(uint64(m.CollateralStake)) - } - if m.CollateralLost != 0 { - n += 2 + sovHub(uint64(m.CollateralLost)) - } - if m.CollateralBurn != 0 { - n += 2 + sovHub(uint64(m.CollateralBurn)) - } - l = len(m.CountryShort) - if l > 0 { - n += 2 + l + sovHub(uint64(l)) - } - l = m.Node_ExperimentalFlags.Size() - n += 2 + l + sovHub(uint64(l)) - if m.Discovery != 0 { - n += 6 - } - if m.UptimeScore != 0 { - n += 6 - } - if m.AgeScore != 0 { - n += 6 - } - if m.VersionScore != 0 { - n += 6 - } - if m.UploadSpeedScore != 0 { - n += 6 - } - if m.DownloadSpeedScore != 0 { - n += 6 - } - if len(m.Roles) > 0 { - l = 0 - for _, e := range m.Roles { - l += sovHub(uint64(e)) - } - n += 2 + sovHub(uint64(l)) + l - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Location) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Lat != 0 { - n += 9 - } - if m.Lon != 0 { - n += 9 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovHub(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozHub(x uint64) (n int) { - return sovHub(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *NodesReq) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NodesReq: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NodesReq: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHub - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHub - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NodeId = append(m.NodeId, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequesterId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHub - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHub - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequesterId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthHub - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthHub - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHub(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHub - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHub - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SettingsReq) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SettingsReq: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SettingsReq: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHub - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHub - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RespSize", wireType) - } - m.RespSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RespSize |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipHub(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHub - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHub - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SettingsResp) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SettingsResp: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SettingsResp: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= ResponseCode(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHub - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHub - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHub - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHub - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.ResponseTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SettingsData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHub - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHub - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SettingsData == nil { - m.SettingsData = &SettingsData{} - } - if err := m.SettingsData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHub(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHub - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHub - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SettingsData) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SettingsData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SettingsData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field StoragePriceAsk", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.StoragePriceAsk = float64(math.Float64frombits(v)) - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field BandwidthPriceAsk", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.BandwidthPriceAsk = float64(math.Float64frombits(v)) - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageTimeMin", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.StorageTimeMin = float64(math.Float64frombits(v)) - case 4: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field BandwidthLimit", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.BandwidthLimit = float64(math.Float64frombits(v)) - case 5: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field CollateralStake", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.CollateralStake = float64(math.Float64frombits(v)) - default: - iNdEx = preIndex - skippy, err := skipHub(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHub - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHub - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HostsReq) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HostsReq: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HostsReq: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHub - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHub - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RespSize", wireType) - } - m.RespSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RespSize |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) - } - m.Mode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Mode |= HostsReq_Mode(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHub - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHub - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHub(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHub - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHub - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RolesHostsReq) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RolesHostsReq: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RolesHostsReq: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHub - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHub - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RespSize", wireType) - } - m.RespSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RespSize |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) - } - m.Role = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Role |= node.NodeRole(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipHub(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHub - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHub - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HostsResp) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HostsResp: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HostsResp: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= ResponseCode(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHub - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHub - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hosts", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHub - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHub - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Hosts == nil { - m.Hosts = &HostsData{} - } - if err := m.Hosts.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RespSize", wireType) - } - m.RespSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RespSize |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHub - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHub - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Mode = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHub - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHub - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.ResponseTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHub(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHub - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHub - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StatsReq) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StatsReq: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StatsReq: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHub - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHub - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHub(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHub - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHub - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StatsResp) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StatsResp: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StatsResp: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= ResponseCode(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHub - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHub - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHub - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHub - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.ResponseTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageStat_HostStats", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHub - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHub - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.StorageStat_HostStats.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHub(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHub - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHub - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Candidate) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Candidate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Candidate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHub - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHub - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NodeId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HeartBeats", wireType) - } - m.HeartBeats = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.HeartBeats |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field UploadAverage", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.UploadAverage = float32(math.Float32frombits(v)) - case 4: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field UploadVariance", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.UploadVariance = float32(math.Float32frombits(v)) - case 5: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field DownloadAverage", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.DownloadAverage = float32(math.Float32frombits(v)) - case 6: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field DownloadVariance", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.DownloadVariance = float32(math.Float32frombits(v)) - default: - iNdEx = preIndex - skippy, err := skipHub(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHub - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHub - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ParseReq) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ParseReq: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ParseReq: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Candidates", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHub - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHub - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Candidates = append(m.Candidates, &Candidate{}) - if err := m.Candidates[len(m.Candidates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHub(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHub - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHub - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RecycleReq) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RecycleReq: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RecycleReq: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EsIndex", wireType) - } - m.EsIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EsIndex |= RecycleReq_ESIndex(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeScopeInHours", wireType) - } - m.TimeScopeInHours = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TimeScopeInHours |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipHub(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHub - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHub - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ParseResp) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ParseResp: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ParseResp: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= ResponseCode(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHub - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHub - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHub - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHub - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.ResponseTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHub(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHub - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHub - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HostsData) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HostsData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HostsData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hosts", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHub - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHub - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hosts = append(m.Hosts, &Host{}) - if err := m.Hosts[len(m.Hosts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHub(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHub - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHub - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Host) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Host: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Host: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHub - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHub - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NodeId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreateTimestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHub - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHub - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.CreateTimestamp, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UpdateTimestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHub - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHub - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.UpdateTimestamp, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Region", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHub - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHub - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Region = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BtfsVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHub - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHub - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BtfsVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Score", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Score = float32(math.Float32frombits(v)) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HeartBeats", wireType) - } - m.HeartBeats = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.HeartBeats |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Uptime", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Uptime = float32(math.Float32frombits(v)) - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Age", wireType) - } - m.Age = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Age |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Reputation", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Reputation = float32(math.Float32frombits(v)) - case 11: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field UploadAverage", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.UploadAverage = float32(math.Float32frombits(v)) - case 12: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field UploadVariance", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.UploadVariance = float32(math.Float32frombits(v)) - case 13: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field DownloadAverage", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.DownloadAverage = float32(math.Float32frombits(v)) - case 14: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field DownloadVariance", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.DownloadVariance = float32(math.Float32frombits(v)) - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Location", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHub - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHub - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Location.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 16: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageVolumeCap", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.StorageVolumeCap = float32(math.Float32frombits(v)) - case 17: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageVolumeLeft", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.StorageVolumeLeft = float32(math.Float32frombits(v)) - case 18: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageTimeMin", wireType) - } - m.StorageTimeMin = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StorageTimeMin |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 19: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StoragePriceAsk", wireType) - } - m.StoragePriceAsk = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StoragePriceAsk |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 20: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StoragePriceEst", wireType) - } - m.StoragePriceEst = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StoragePriceEst |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 21: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field BandwidthLimit", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.BandwidthLimit = float64(math.Float64frombits(v)) - case 22: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BandwidthPriceAsk", wireType) - } - m.BandwidthPriceAsk = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BandwidthPriceAsk |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 23: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BandwidthPriceEst", wireType) - } - m.BandwidthPriceEst = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BandwidthPriceEst |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 24: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CollateralStake", wireType) - } - m.CollateralStake = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CollateralStake |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 25: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CollateralLost", wireType) - } - m.CollateralLost = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CollateralLost |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 26: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CollateralBurn", wireType) - } - m.CollateralBurn = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CollateralBurn |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 27: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CountryShort", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHub - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHub - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CountryShort = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 28: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Node_ExperimentalFlags", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHub - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHub - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Node_ExperimentalFlags.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 29: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Discovery", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Discovery = float32(math.Float32frombits(v)) - case 30: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field UptimeScore", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.UptimeScore = float32(math.Float32frombits(v)) - case 31: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field AgeScore", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.AgeScore = float32(math.Float32frombits(v)) - case 32: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field VersionScore", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.VersionScore = float32(math.Float32frombits(v)) - case 33: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field UploadSpeedScore", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.UploadSpeedScore = float32(math.Float32frombits(v)) - case 34: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field DownloadSpeedScore", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.DownloadSpeedScore = float32(math.Float32frombits(v)) - case 35: - if wireType == 0 { - var v node.NodeRole - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= node.NodeRole(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Roles = append(m.Roles, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthHub - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthHub - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - if elementCount != 0 && len(m.Roles) == 0 { - m.Roles = make([]node.NodeRole, 0, elementCount) - } - for iNdEx < postIndex { - var v node.NodeRole - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= node.NodeRole(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Roles = append(m.Roles, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Roles", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipHub(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHub - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHub - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Location) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHub - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Location: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Location: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Lat", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Lat = float64(math.Float64frombits(v)) - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Lon", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Lon = float64(math.Float64frombits(v)) - default: - iNdEx = preIndex - skippy, err := skipHub(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHub - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHub - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipHub(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHub - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHub - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHub - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthHub - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupHub - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthHub - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthHub = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowHub = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupHub = fmt.Errorf("proto: unexpected end of group") -) diff --git a/protos/hub/hub.proto b/protos/hub/hub.proto deleted file mode 100644 index 748e8ca..0000000 --- a/protos/hub/hub.proto +++ /dev/null @@ -1,218 +0,0 @@ -syntax = "proto3"; - -package hub; - -// gogo plugin toggles -option (gogoproto.gogoproto_import) = true; -option (gogoproto.goproto_registration) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.messagename_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.unmarshaler_all) = true; -// golang option -option go_package = "hub"; -// java options -option java_multiple_files = true; -option java_outer_classname = "HubProto"; -option java_package = "io.btfs.hub"; - -import "github.com/bittorrent/go-btfs-common/protos/node/node.proto"; -import "github.com/tron-us/protobuf/gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; - -// HubQueryService are interface for hub-query -service HubQueryService { - rpc GetSettings(SettingsReq) returns (SettingsResp); - rpc GetHosts(HostsReq) returns (HostsResp); - rpc GetStats(StatsReq) returns (StatsResp); - rpc QueryNodes(NodesReq) returns (HostsResp); //used by internal services - rpc GetHostsByRoles(RolesHostsReq) returns (HostsResp); -} - -message NodesReq { - repeated string node_id = 1; - string requester_id = 2; - bytes signature = 3; -} - -message SettingsReq { - string id = 1; - int32 resp_size = 2; -} - -enum ResponseCode { - SUCCESS = 0; - SIGNATURE_FORMAT_ERROR = 1; - COMPUTE_ADDRESS_ERROR = 2; - TIMEOUT_ERROR = 3; - OTHER_ERROR = 20; -} - -message SettingsResp { - ResponseCode code = 1; - string message = 2; - google.protobuf.Timestamp response_time = 3 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - SettingsData settings_data = 4; -} - -message SettingsData { - double storage_price_ask = 1; - double bandwidth_price_ask = 2; - double storage_time_min = 3; - double bandwidth_limit = 4; - double collateral_stake = 5; -} - -message HostsReq { - string id = 1; - int32 resp_size = 2; - enum Mode { - SCORE = 0; // default - GEO = 1; - REP = 2; - PRICE = 3; - SPEED = 4; - TESTNET = 5; - } - Mode mode = 3; - string version = 4; -} - -message RolesHostsReq { - string id = 1; - int32 resp_size = 2; - node.NodeRole role = 3; -} - -message HostsResp { - ResponseCode code = 1; - string message = 2; - HostsData hosts = 3; - int32 resp_size = 4; - string mode = 5; - google.protobuf.Timestamp response_time = 6 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; -} - -message StatsReq { - string id = 1; -} - -message StatsResp { - ResponseCode code = 1; - string message = 2; - google.protobuf.Timestamp response_time = 3 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - node.StorageStat.HostStats stats = 4 [ - (gogoproto.embed) = true, - (gogoproto.nullable) = false - ]; -} - -// HubParserService are interface for hub-parser -service HubParseService { - rpc UpdateDiscovery(ParseReq) returns (ParseResp); - rpc UpdateScore(ParseReq) returns (ParseResp); - rpc UpdateNetwork(ParseReq) returns (ParseResp); - rpc Recycle(RecycleReq) returns (ParseResp); - rpc UpdateBtfsScan(ParseReq) returns (ParseResp); - rpc UpdateScoreHistory(ParseReq) returns (ParseResp); -} - -message Candidate { - string node_id = 1; - uint64 heart_beats = 2; - float upload_average = 3; - float upload_variance = 4; - float download_average = 5; - float download_variance = 6; -} - -message ParseReq { - repeated Candidate candidates = 1; -} - -message RecycleReq { - enum ESIndex { - NODES = 0; - NETWORK = 1; - TESTNET_NODES = 2; - } - ESIndex es_index = 1; - int64 time_scope_in_hours = 2; -} - -message ParseResp { - ResponseCode code = 1; - string message = 2; - google.protobuf.Timestamp response_time = 3 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; -} - -// Below are common use messages for hub services - -message HostsData { - repeated Host hosts = 1; -} - -message Host { - option (gogoproto.json_no_omit_empty) = true; - string node_id = 1; - google.protobuf.Timestamp create_timestamp = 2 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - google.protobuf.Timestamp update_timestamp = 3 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - string region = 4; - string btfs_version = 5; - float score = 6; - uint64 heart_beats = 7; - float uptime = 8; - uint64 age = 9; - float reputation = 10; - float upload_average = 11; - float upload_variance = 12; - float download_average = 13; - float download_variance = 14; - Location location = 15 [(gogoproto.nullable) = false]; - float storage_volume_cap = 16; - float storage_volume_left = 17; - uint64 storage_time_min = 18; - uint64 storage_price_ask = 19; - uint64 storage_price_est = 20; - double bandwidth_limit = 21; - uint64 bandwidth_price_ask = 22; - uint64 bandwidth_price_est = 23; - uint64 collateral_stake = 24; - uint64 collateral_lost = 25; - uint64 collateral_burn = 26; - string country_short = 27; //if it is "", means no data related node_id find - node.Node.ExperimentalFlags flg = 28 [ - (gogoproto.embed) = true, - (gogoproto.nullable) = false - ]; - float discovery = 29; - float uptime_score = 30; - float age_score = 31; - float version_score = 32; - float upload_speed_score = 33; - float download_speed_score = 34; - repeated node.NodeRole roles = 35 [(gogoproto.pgtag) = "roles,array"]; -} - -message Location { - double lat = 1; - double lon = 2; -} diff --git a/protos/ledger/ledger.pb.go b/protos/ledger/ledger.pb.go deleted file mode 100644 index d7d063a..0000000 --- a/protos/ledger/ledger.pb.go +++ /dev/null @@ -1,5685 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: protos/ledger/ledger.proto - -package ledger - -import ( - context "context" - fmt "fmt" - golang_proto "github.com/golang/protobuf/proto" - _ "github.com/tron-us/protobuf/gogoproto" - proto "github.com/tron-us/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = golang_proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type Null struct { - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Null) Reset() { *m = Null{} } -func (m *Null) String() string { return proto.CompactTextString(m) } -func (*Null) ProtoMessage() {} -func (*Null) Descriptor() ([]byte, []int) { - return fileDescriptor_858b35020cfe9185, []int{0} -} -func (m *Null) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Null) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Null.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Null) XXX_Merge(src proto.Message) { - xxx_messageInfo_Null.Merge(m, src) -} -func (m *Null) XXX_Size() int { - return m.Size() -} -func (m *Null) XXX_DiscardUnknown() { - xxx_messageInfo_Null.DiscardUnknown(m) -} - -var xxx_messageInfo_Null proto.InternalMessageInfo - -func (*Null) XXX_MessageName() string { - return "ledger.Null" -} - -type PublicKey struct { - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty" pg:"key"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *PublicKey) Reset() { *m = PublicKey{} } -func (m *PublicKey) String() string { return proto.CompactTextString(m) } -func (*PublicKey) ProtoMessage() {} -func (*PublicKey) Descriptor() ([]byte, []int) { - return fileDescriptor_858b35020cfe9185, []int{1} -} -func (m *PublicKey) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PublicKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PublicKey.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *PublicKey) XXX_Merge(src proto.Message) { - xxx_messageInfo_PublicKey.Merge(m, src) -} -func (m *PublicKey) XXX_Size() int { - return m.Size() -} -func (m *PublicKey) XXX_DiscardUnknown() { - xxx_messageInfo_PublicKey.DiscardUnknown(m) -} - -var xxx_messageInfo_PublicKey proto.InternalMessageInfo - -func (m *PublicKey) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -func (*PublicKey) XXX_MessageName() string { - return "ledger.PublicKey" -} - -type SignedPublicKey struct { - Key *PublicKey `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty" pg:"key"` - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SignedPublicKey) Reset() { *m = SignedPublicKey{} } -func (m *SignedPublicKey) String() string { return proto.CompactTextString(m) } -func (*SignedPublicKey) ProtoMessage() {} -func (*SignedPublicKey) Descriptor() ([]byte, []int) { - return fileDescriptor_858b35020cfe9185, []int{2} -} -func (m *SignedPublicKey) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignedPublicKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignedPublicKey.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SignedPublicKey) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedPublicKey.Merge(m, src) -} -func (m *SignedPublicKey) XXX_Size() int { - return m.Size() -} -func (m *SignedPublicKey) XXX_DiscardUnknown() { - xxx_messageInfo_SignedPublicKey.DiscardUnknown(m) -} - -var xxx_messageInfo_SignedPublicKey proto.InternalMessageInfo - -func (m *SignedPublicKey) GetKey() *PublicKey { - if m != nil { - return m.Key - } - return nil -} - -func (m *SignedPublicKey) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (*SignedPublicKey) XXX_MessageName() string { - return "ledger.SignedPublicKey" -} - -type ChannelCommit struct { - Payer *PublicKey `protobuf:"bytes,1,opt,name=payer,proto3" json:"payer,omitempty" pg:"payer"` - Recipient *PublicKey `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty" pg:"recipient"` - Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty" pg:"amount"` - PayerId int64 `protobuf:"varint,4,opt,name=payer_id,json=payerId,proto3" json:"payer_id,omitempty" pg:"payer_id"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ChannelCommit) Reset() { *m = ChannelCommit{} } -func (m *ChannelCommit) String() string { return proto.CompactTextString(m) } -func (*ChannelCommit) ProtoMessage() {} -func (*ChannelCommit) Descriptor() ([]byte, []int) { - return fileDescriptor_858b35020cfe9185, []int{3} -} -func (m *ChannelCommit) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ChannelCommit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ChannelCommit.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ChannelCommit) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChannelCommit.Merge(m, src) -} -func (m *ChannelCommit) XXX_Size() int { - return m.Size() -} -func (m *ChannelCommit) XXX_DiscardUnknown() { - xxx_messageInfo_ChannelCommit.DiscardUnknown(m) -} - -var xxx_messageInfo_ChannelCommit proto.InternalMessageInfo - -func (m *ChannelCommit) GetPayer() *PublicKey { - if m != nil { - return m.Payer - } - return nil -} - -func (m *ChannelCommit) GetRecipient() *PublicKey { - if m != nil { - return m.Recipient - } - return nil -} - -func (m *ChannelCommit) GetAmount() int64 { - if m != nil { - return m.Amount - } - return 0 -} - -func (m *ChannelCommit) GetPayerId() int64 { - if m != nil { - return m.PayerId - } - return 0 -} - -func (*ChannelCommit) XXX_MessageName() string { - return "ledger.ChannelCommit" -} - -type SignedChannelCommit struct { - Channel *ChannelCommit `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel,omitempty" pg:"channel"` - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SignedChannelCommit) Reset() { *m = SignedChannelCommit{} } -func (m *SignedChannelCommit) String() string { return proto.CompactTextString(m) } -func (*SignedChannelCommit) ProtoMessage() {} -func (*SignedChannelCommit) Descriptor() ([]byte, []int) { - return fileDescriptor_858b35020cfe9185, []int{4} -} -func (m *SignedChannelCommit) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignedChannelCommit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignedChannelCommit.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SignedChannelCommit) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedChannelCommit.Merge(m, src) -} -func (m *SignedChannelCommit) XXX_Size() int { - return m.Size() -} -func (m *SignedChannelCommit) XXX_DiscardUnknown() { - xxx_messageInfo_SignedChannelCommit.DiscardUnknown(m) -} - -var xxx_messageInfo_SignedChannelCommit proto.InternalMessageInfo - -func (m *SignedChannelCommit) GetChannel() *ChannelCommit { - if m != nil { - return m.Channel - } - return nil -} - -func (m *SignedChannelCommit) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (*SignedChannelCommit) XXX_MessageName() string { - return "ledger.SignedChannelCommit" -} - -type CreateAccountResult struct { - Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty" pg:"account"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *CreateAccountResult) Reset() { *m = CreateAccountResult{} } -func (m *CreateAccountResult) String() string { return proto.CompactTextString(m) } -func (*CreateAccountResult) ProtoMessage() {} -func (*CreateAccountResult) Descriptor() ([]byte, []int) { - return fileDescriptor_858b35020cfe9185, []int{5} -} -func (m *CreateAccountResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CreateAccountResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CreateAccountResult.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *CreateAccountResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateAccountResult.Merge(m, src) -} -func (m *CreateAccountResult) XXX_Size() int { - return m.Size() -} -func (m *CreateAccountResult) XXX_DiscardUnknown() { - xxx_messageInfo_CreateAccountResult.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateAccountResult proto.InternalMessageInfo - -func (m *CreateAccountResult) GetAccount() *Account { - if m != nil { - return m.Account - } - return nil -} - -func (*CreateAccountResult) XXX_MessageName() string { - return "ledger.CreateAccountResult" -} - -type SignedCreateAccountRequest struct { - Key *PublicKey `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty" pg:"key"` - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - // client version number - ClientVersionNumber string `protobuf:"bytes,3,opt,name=client_version_number,json=clientVersionNumber,proto3" json:"client_version_number,omitempty" pg:"client_version_number"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SignedCreateAccountRequest) Reset() { *m = SignedCreateAccountRequest{} } -func (m *SignedCreateAccountRequest) String() string { return proto.CompactTextString(m) } -func (*SignedCreateAccountRequest) ProtoMessage() {} -func (*SignedCreateAccountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_858b35020cfe9185, []int{6} -} -func (m *SignedCreateAccountRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignedCreateAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignedCreateAccountRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SignedCreateAccountRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedCreateAccountRequest.Merge(m, src) -} -func (m *SignedCreateAccountRequest) XXX_Size() int { - return m.Size() -} -func (m *SignedCreateAccountRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SignedCreateAccountRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SignedCreateAccountRequest proto.InternalMessageInfo - -func (m *SignedCreateAccountRequest) GetKey() *PublicKey { - if m != nil { - return m.Key - } - return nil -} - -func (m *SignedCreateAccountRequest) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (m *SignedCreateAccountRequest) GetClientVersionNumber() string { - if m != nil { - return m.ClientVersionNumber - } - return "" -} - -func (*SignedCreateAccountRequest) XXX_MessageName() string { - return "ledger.SignedCreateAccountRequest" -} - -type SignedCreateAccountResult struct { - Balance int64 `protobuf:"varint,1,opt,name=balance,proto3" json:"balance,omitempty" pg:"balance"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SignedCreateAccountResult) Reset() { *m = SignedCreateAccountResult{} } -func (m *SignedCreateAccountResult) String() string { return proto.CompactTextString(m) } -func (*SignedCreateAccountResult) ProtoMessage() {} -func (*SignedCreateAccountResult) Descriptor() ([]byte, []int) { - return fileDescriptor_858b35020cfe9185, []int{7} -} -func (m *SignedCreateAccountResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignedCreateAccountResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignedCreateAccountResult.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SignedCreateAccountResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedCreateAccountResult.Merge(m, src) -} -func (m *SignedCreateAccountResult) XXX_Size() int { - return m.Size() -} -func (m *SignedCreateAccountResult) XXX_DiscardUnknown() { - xxx_messageInfo_SignedCreateAccountResult.DiscardUnknown(m) -} - -var xxx_messageInfo_SignedCreateAccountResult proto.InternalMessageInfo - -func (m *SignedCreateAccountResult) GetBalance() int64 { - if m != nil { - return m.Balance - } - return 0 -} - -func (*SignedCreateAccountResult) XXX_MessageName() string { - return "ledger.SignedCreateAccountResult" -} - -type Account struct { - Address *PublicKey `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" pg:"address"` - // Current available balance - Balance int64 `protobuf:"varint,2,opt,name=balance,proto3" json:"balance,omitempty" pg:"balance"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Account) Reset() { *m = Account{} } -func (m *Account) String() string { return proto.CompactTextString(m) } -func (*Account) ProtoMessage() {} -func (*Account) Descriptor() ([]byte, []int) { - return fileDescriptor_858b35020cfe9185, []int{8} -} -func (m *Account) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Account.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Account) XXX_Merge(src proto.Message) { - xxx_messageInfo_Account.Merge(m, src) -} -func (m *Account) XXX_Size() int { - return m.Size() -} -func (m *Account) XXX_DiscardUnknown() { - xxx_messageInfo_Account.DiscardUnknown(m) -} - -var xxx_messageInfo_Account proto.InternalMessageInfo - -func (m *Account) GetAddress() *PublicKey { - if m != nil { - return m.Address - } - return nil -} - -func (m *Account) GetBalance() int64 { - if m != nil { - return m.Balance - } - return 0 -} - -func (*Account) XXX_MessageName() string { - return "ledger.Account" -} - -type ChannelID struct { - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" pg:"id"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ChannelID) Reset() { *m = ChannelID{} } -func (m *ChannelID) String() string { return proto.CompactTextString(m) } -func (*ChannelID) ProtoMessage() {} -func (*ChannelID) Descriptor() ([]byte, []int) { - return fileDescriptor_858b35020cfe9185, []int{9} -} -func (m *ChannelID) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ChannelID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ChannelID.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ChannelID) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChannelID.Merge(m, src) -} -func (m *ChannelID) XXX_Size() int { - return m.Size() -} -func (m *ChannelID) XXX_DiscardUnknown() { - xxx_messageInfo_ChannelID.DiscardUnknown(m) -} - -var xxx_messageInfo_ChannelID proto.InternalMessageInfo - -func (m *ChannelID) GetId() int64 { - if m != nil { - return m.Id - } - return 0 -} - -func (*ChannelID) XXX_MessageName() string { - return "ledger.ChannelID" -} - -type ChannelInfo struct { - Id *ChannelID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" pg:"id"` - FromAccount *Account `protobuf:"bytes,2,opt,name=from_account,json=fromAccount,proto3" json:"from_account,omitempty" pg:"from_account"` - ToAccount *Account `protobuf:"bytes,3,opt,name=to_account,json=toAccount,proto3" json:"to_account,omitempty" pg:"to_account"` - CloseSequence int64 `protobuf:"varint,4,opt,name=close_sequence,json=closeSequence,proto3" json:"close_sequence,omitempty" pg:"close_sequence"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ChannelInfo) Reset() { *m = ChannelInfo{} } -func (m *ChannelInfo) String() string { return proto.CompactTextString(m) } -func (*ChannelInfo) ProtoMessage() {} -func (*ChannelInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_858b35020cfe9185, []int{10} -} -func (m *ChannelInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ChannelInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ChannelInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ChannelInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChannelInfo.Merge(m, src) -} -func (m *ChannelInfo) XXX_Size() int { - return m.Size() -} -func (m *ChannelInfo) XXX_DiscardUnknown() { - xxx_messageInfo_ChannelInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_ChannelInfo proto.InternalMessageInfo - -func (m *ChannelInfo) GetId() *ChannelID { - if m != nil { - return m.Id - } - return nil -} - -func (m *ChannelInfo) GetFromAccount() *Account { - if m != nil { - return m.FromAccount - } - return nil -} - -func (m *ChannelInfo) GetToAccount() *Account { - if m != nil { - return m.ToAccount - } - return nil -} - -func (m *ChannelInfo) GetCloseSequence() int64 { - if m != nil { - return m.CloseSequence - } - return 0 -} - -func (*ChannelInfo) XXX_MessageName() string { - return "ledger.ChannelInfo" -} - -type SignedChannelState struct { - Channel *ChannelState `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel,omitempty" pg:"channel"` - FromSignature []byte `protobuf:"bytes,2,opt,name=from_signature,json=fromSignature,proto3" json:"from_signature,omitempty" pg:"from_signature"` - ToSignature []byte `protobuf:"bytes,3,opt,name=to_signature,json=toSignature,proto3" json:"to_signature,omitempty" pg:"to_signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SignedChannelState) Reset() { *m = SignedChannelState{} } -func (m *SignedChannelState) String() string { return proto.CompactTextString(m) } -func (*SignedChannelState) ProtoMessage() {} -func (*SignedChannelState) Descriptor() ([]byte, []int) { - return fileDescriptor_858b35020cfe9185, []int{11} -} -func (m *SignedChannelState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignedChannelState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignedChannelState.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SignedChannelState) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedChannelState.Merge(m, src) -} -func (m *SignedChannelState) XXX_Size() int { - return m.Size() -} -func (m *SignedChannelState) XXX_DiscardUnknown() { - xxx_messageInfo_SignedChannelState.DiscardUnknown(m) -} - -var xxx_messageInfo_SignedChannelState proto.InternalMessageInfo - -func (m *SignedChannelState) GetChannel() *ChannelState { - if m != nil { - return m.Channel - } - return nil -} - -func (m *SignedChannelState) GetFromSignature() []byte { - if m != nil { - return m.FromSignature - } - return nil -} - -func (m *SignedChannelState) GetToSignature() []byte { - if m != nil { - return m.ToSignature - } - return nil -} - -func (*SignedChannelState) XXX_MessageName() string { - return "ledger.SignedChannelState" -} - -type ClosedChannelCursor struct { - Payer *PublicKey `protobuf:"bytes,1,opt,name=payer,proto3" json:"payer,omitempty" pg:"payer"` - CloseSequence int64 `protobuf:"varint,2,opt,name=close_sequence,json=closeSequence,proto3" json:"close_sequence,omitempty" pg:"close_sequence"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ClosedChannelCursor) Reset() { *m = ClosedChannelCursor{} } -func (m *ClosedChannelCursor) String() string { return proto.CompactTextString(m) } -func (*ClosedChannelCursor) ProtoMessage() {} -func (*ClosedChannelCursor) Descriptor() ([]byte, []int) { - return fileDescriptor_858b35020cfe9185, []int{12} -} -func (m *ClosedChannelCursor) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClosedChannelCursor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ClosedChannelCursor.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ClosedChannelCursor) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClosedChannelCursor.Merge(m, src) -} -func (m *ClosedChannelCursor) XXX_Size() int { - return m.Size() -} -func (m *ClosedChannelCursor) XXX_DiscardUnknown() { - xxx_messageInfo_ClosedChannelCursor.DiscardUnknown(m) -} - -var xxx_messageInfo_ClosedChannelCursor proto.InternalMessageInfo - -func (m *ClosedChannelCursor) GetPayer() *PublicKey { - if m != nil { - return m.Payer - } - return nil -} - -func (m *ClosedChannelCursor) GetCloseSequence() int64 { - if m != nil { - return m.CloseSequence - } - return 0 -} - -func (*ClosedChannelCursor) XXX_MessageName() string { - return "ledger.ClosedChannelCursor" -} - -type ChannelState struct { - Id *ChannelID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" pg:"id"` - Sequence int64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty" pg:"sequence"` - From *Account `protobuf:"bytes,3,opt,name=from,proto3" json:"from,omitempty" pg:"from"` - To *Account `protobuf:"bytes,4,opt,name=to,proto3" json:"to,omitempty" pg:"to"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ChannelState) Reset() { *m = ChannelState{} } -func (m *ChannelState) String() string { return proto.CompactTextString(m) } -func (*ChannelState) ProtoMessage() {} -func (*ChannelState) Descriptor() ([]byte, []int) { - return fileDescriptor_858b35020cfe9185, []int{13} -} -func (m *ChannelState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ChannelState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ChannelState.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ChannelState) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChannelState.Merge(m, src) -} -func (m *ChannelState) XXX_Size() int { - return m.Size() -} -func (m *ChannelState) XXX_DiscardUnknown() { - xxx_messageInfo_ChannelState.DiscardUnknown(m) -} - -var xxx_messageInfo_ChannelState proto.InternalMessageInfo - -func (m *ChannelState) GetId() *ChannelID { - if m != nil { - return m.Id - } - return nil -} - -func (m *ChannelState) GetSequence() int64 { - if m != nil { - return m.Sequence - } - return 0 -} - -func (m *ChannelState) GetFrom() *Account { - if m != nil { - return m.From - } - return nil -} - -func (m *ChannelState) GetTo() *Account { - if m != nil { - return m.To - } - return nil -} - -func (*ChannelState) XXX_MessageName() string { - return "ledger.ChannelState" -} - -type ChannelClosed struct { - State *SignedChannelState `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty" pg:"state"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ChannelClosed) Reset() { *m = ChannelClosed{} } -func (m *ChannelClosed) String() string { return proto.CompactTextString(m) } -func (*ChannelClosed) ProtoMessage() {} -func (*ChannelClosed) Descriptor() ([]byte, []int) { - return fileDescriptor_858b35020cfe9185, []int{14} -} -func (m *ChannelClosed) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ChannelClosed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ChannelClosed.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ChannelClosed) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChannelClosed.Merge(m, src) -} -func (m *ChannelClosed) XXX_Size() int { - return m.Size() -} -func (m *ChannelClosed) XXX_DiscardUnknown() { - xxx_messageInfo_ChannelClosed.DiscardUnknown(m) -} - -var xxx_messageInfo_ChannelClosed proto.InternalMessageInfo - -func (m *ChannelClosed) GetState() *SignedChannelState { - if m != nil { - return m.State - } - return nil -} - -func (*ChannelClosed) XXX_MessageName() string { - return "ledger.ChannelClosed" -} - -type SignedPublicKeyPair struct { - OldKey *PublicKey `protobuf:"bytes,1,opt,name=old_key,json=oldKey,proto3" json:"old_key,omitempty" pg:"old_key"` - NewKey *PublicKey `protobuf:"bytes,2,opt,name=new_key,json=newKey,proto3" json:"new_key,omitempty" pg:"new_key"` - OldSignature []byte `protobuf:"bytes,3,opt,name=old_signature,json=oldSignature,proto3" json:"old_signature,omitempty" pg:"old_signature"` - NewSignature []byte `protobuf:"bytes,4,opt,name=new_signature,json=newSignature,proto3" json:"new_signature,omitempty" pg:"new_signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SignedPublicKeyPair) Reset() { *m = SignedPublicKeyPair{} } -func (m *SignedPublicKeyPair) String() string { return proto.CompactTextString(m) } -func (*SignedPublicKeyPair) ProtoMessage() {} -func (*SignedPublicKeyPair) Descriptor() ([]byte, []int) { - return fileDescriptor_858b35020cfe9185, []int{15} -} -func (m *SignedPublicKeyPair) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignedPublicKeyPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignedPublicKeyPair.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SignedPublicKeyPair) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedPublicKeyPair.Merge(m, src) -} -func (m *SignedPublicKeyPair) XXX_Size() int { - return m.Size() -} -func (m *SignedPublicKeyPair) XXX_DiscardUnknown() { - xxx_messageInfo_SignedPublicKeyPair.DiscardUnknown(m) -} - -var xxx_messageInfo_SignedPublicKeyPair proto.InternalMessageInfo - -func (m *SignedPublicKeyPair) GetOldKey() *PublicKey { - if m != nil { - return m.OldKey - } - return nil -} - -func (m *SignedPublicKeyPair) GetNewKey() *PublicKey { - if m != nil { - return m.NewKey - } - return nil -} - -func (m *SignedPublicKeyPair) GetOldSignature() []byte { - if m != nil { - return m.OldSignature - } - return nil -} - -func (m *SignedPublicKeyPair) GetNewSignature() []byte { - if m != nil { - return m.NewSignature - } - return nil -} - -func (*SignedPublicKeyPair) XXX_MessageName() string { - return "ledger.SignedPublicKeyPair" -} - -type TransferRequest struct { - Payer *PublicKey `protobuf:"bytes,1,opt,name=payer,proto3" json:"payer,omitempty" pg:"payer"` - Recipient *PublicKey `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty" pg:"recipient"` - Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty" pg:"amount"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *TransferRequest) Reset() { *m = TransferRequest{} } -func (m *TransferRequest) String() string { return proto.CompactTextString(m) } -func (*TransferRequest) ProtoMessage() {} -func (*TransferRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_858b35020cfe9185, []int{16} -} -func (m *TransferRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransferRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransferRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TransferRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransferRequest.Merge(m, src) -} -func (m *TransferRequest) XXX_Size() int { - return m.Size() -} -func (m *TransferRequest) XXX_DiscardUnknown() { - xxx_messageInfo_TransferRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_TransferRequest proto.InternalMessageInfo - -func (m *TransferRequest) GetPayer() *PublicKey { - if m != nil { - return m.Payer - } - return nil -} - -func (m *TransferRequest) GetRecipient() *PublicKey { - if m != nil { - return m.Recipient - } - return nil -} - -func (m *TransferRequest) GetAmount() int64 { - if m != nil { - return m.Amount - } - return 0 -} - -func (*TransferRequest) XXX_MessageName() string { - return "ledger.TransferRequest" -} - -type SignedTransferRequest struct { - TransferRequest *TransferRequest `protobuf:"bytes,1,opt,name=transfer_request,json=transferRequest,proto3" json:"transfer_request,omitempty" pg:"transfer_request"` - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SignedTransferRequest) Reset() { *m = SignedTransferRequest{} } -func (m *SignedTransferRequest) String() string { return proto.CompactTextString(m) } -func (*SignedTransferRequest) ProtoMessage() {} -func (*SignedTransferRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_858b35020cfe9185, []int{17} -} -func (m *SignedTransferRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignedTransferRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignedTransferRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SignedTransferRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedTransferRequest.Merge(m, src) -} -func (m *SignedTransferRequest) XXX_Size() int { - return m.Size() -} -func (m *SignedTransferRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SignedTransferRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SignedTransferRequest proto.InternalMessageInfo - -func (m *SignedTransferRequest) GetTransferRequest() *TransferRequest { - if m != nil { - return m.TransferRequest - } - return nil -} - -func (m *SignedTransferRequest) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (*SignedTransferRequest) XXX_MessageName() string { - return "ledger.SignedTransferRequest" -} - -type TransferResult struct { - Balance int64 `protobuf:"varint,1,opt,name=balance,proto3" json:"balance,omitempty" pg:"balance"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *TransferResult) Reset() { *m = TransferResult{} } -func (m *TransferResult) String() string { return proto.CompactTextString(m) } -func (*TransferResult) ProtoMessage() {} -func (*TransferResult) Descriptor() ([]byte, []int) { - return fileDescriptor_858b35020cfe9185, []int{18} -} -func (m *TransferResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransferResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransferResult.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TransferResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransferResult.Merge(m, src) -} -func (m *TransferResult) XXX_Size() int { - return m.Size() -} -func (m *TransferResult) XXX_DiscardUnknown() { - xxx_messageInfo_TransferResult.DiscardUnknown(m) -} - -var xxx_messageInfo_TransferResult proto.InternalMessageInfo - -func (m *TransferResult) GetBalance() int64 { - if m != nil { - return m.Balance - } - return 0 -} - -func (*TransferResult) XXX_MessageName() string { - return "ledger.TransferResult" -} -func init() { - proto.RegisterType((*Null)(nil), "ledger.Null") - golang_proto.RegisterType((*Null)(nil), "ledger.Null") - proto.RegisterType((*PublicKey)(nil), "ledger.PublicKey") - golang_proto.RegisterType((*PublicKey)(nil), "ledger.PublicKey") - proto.RegisterType((*SignedPublicKey)(nil), "ledger.SignedPublicKey") - golang_proto.RegisterType((*SignedPublicKey)(nil), "ledger.SignedPublicKey") - proto.RegisterType((*ChannelCommit)(nil), "ledger.ChannelCommit") - golang_proto.RegisterType((*ChannelCommit)(nil), "ledger.ChannelCommit") - proto.RegisterType((*SignedChannelCommit)(nil), "ledger.SignedChannelCommit") - golang_proto.RegisterType((*SignedChannelCommit)(nil), "ledger.SignedChannelCommit") - proto.RegisterType((*CreateAccountResult)(nil), "ledger.CreateAccountResult") - golang_proto.RegisterType((*CreateAccountResult)(nil), "ledger.CreateAccountResult") - proto.RegisterType((*SignedCreateAccountRequest)(nil), "ledger.SignedCreateAccountRequest") - golang_proto.RegisterType((*SignedCreateAccountRequest)(nil), "ledger.SignedCreateAccountRequest") - proto.RegisterType((*SignedCreateAccountResult)(nil), "ledger.SignedCreateAccountResult") - golang_proto.RegisterType((*SignedCreateAccountResult)(nil), "ledger.SignedCreateAccountResult") - proto.RegisterType((*Account)(nil), "ledger.Account") - golang_proto.RegisterType((*Account)(nil), "ledger.Account") - proto.RegisterType((*ChannelID)(nil), "ledger.ChannelID") - golang_proto.RegisterType((*ChannelID)(nil), "ledger.ChannelID") - proto.RegisterType((*ChannelInfo)(nil), "ledger.ChannelInfo") - golang_proto.RegisterType((*ChannelInfo)(nil), "ledger.ChannelInfo") - proto.RegisterType((*SignedChannelState)(nil), "ledger.SignedChannelState") - golang_proto.RegisterType((*SignedChannelState)(nil), "ledger.SignedChannelState") - proto.RegisterType((*ClosedChannelCursor)(nil), "ledger.ClosedChannelCursor") - golang_proto.RegisterType((*ClosedChannelCursor)(nil), "ledger.ClosedChannelCursor") - proto.RegisterType((*ChannelState)(nil), "ledger.ChannelState") - golang_proto.RegisterType((*ChannelState)(nil), "ledger.ChannelState") - proto.RegisterType((*ChannelClosed)(nil), "ledger.ChannelClosed") - golang_proto.RegisterType((*ChannelClosed)(nil), "ledger.ChannelClosed") - proto.RegisterType((*SignedPublicKeyPair)(nil), "ledger.SignedPublicKeyPair") - golang_proto.RegisterType((*SignedPublicKeyPair)(nil), "ledger.SignedPublicKeyPair") - proto.RegisterType((*TransferRequest)(nil), "ledger.TransferRequest") - golang_proto.RegisterType((*TransferRequest)(nil), "ledger.TransferRequest") - proto.RegisterType((*SignedTransferRequest)(nil), "ledger.SignedTransferRequest") - golang_proto.RegisterType((*SignedTransferRequest)(nil), "ledger.SignedTransferRequest") - proto.RegisterType((*TransferResult)(nil), "ledger.TransferResult") - golang_proto.RegisterType((*TransferResult)(nil), "ledger.TransferResult") -} - -func init() { proto.RegisterFile("protos/ledger/ledger.proto", fileDescriptor_858b35020cfe9185) } -func init() { golang_proto.RegisterFile("protos/ledger/ledger.proto", fileDescriptor_858b35020cfe9185) } - -var fileDescriptor_858b35020cfe9185 = []byte{ - // 939 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xd7, 0xd8, 0xae, 0x1d, 0x3f, 0xff, 0x49, 0x19, 0x37, 0xc5, 0xdd, 0x52, 0xd3, 0x6c, 0x54, - 0x51, 0x82, 0xb0, 0xab, 0x20, 0x24, 0x6e, 0x34, 0x31, 0x52, 0xa9, 0x40, 0x91, 0xb5, 0x29, 0x1c, - 0x10, 0x92, 0xb5, 0x7f, 0xc6, 0xee, 0x8a, 0xf5, 0x4e, 0x98, 0x9d, 0x25, 0xe4, 0xcc, 0x9d, 0x4b, - 0x2f, 0x1c, 0xf8, 0x1c, 0x70, 0xe0, 0xc2, 0xb1, 0x47, 0x3e, 0x02, 0x24, 0x5f, 0x82, 0x23, 0x9a, - 0x7f, 0xbb, 0xd9, 0xf5, 0xc6, 0xe4, 0x80, 0x38, 0xd9, 0xf3, 0xde, 0xef, 0xbd, 0xf9, 0xbd, 0x79, - 0xbf, 0x79, 0xb3, 0x60, 0x9d, 0x32, 0xca, 0x69, 0x32, 0x89, 0x48, 0xb0, 0x24, 0x4c, 0xff, 0x8c, - 0xa5, 0x11, 0x37, 0xd5, 0xca, 0x7a, 0xb2, 0x0c, 0xf9, 0xcb, 0xd4, 0x1b, 0xfb, 0x74, 0x35, 0xe1, - 0x8c, 0xc6, 0xef, 0xa7, 0xc9, 0x44, 0x22, 0xbc, 0x74, 0x31, 0x59, 0xd2, 0x25, 0x95, 0x0b, 0xf9, - 0x4f, 0x45, 0xda, 0x4d, 0x68, 0x1c, 0xa7, 0x51, 0x64, 0x3f, 0x80, 0xf6, 0x2c, 0xf5, 0xa2, 0xd0, - 0xff, 0x8c, 0x9c, 0xe3, 0xdb, 0x50, 0xff, 0x86, 0x9c, 0x0f, 0xd1, 0x43, 0xf4, 0xb8, 0xeb, 0x88, - 0xbf, 0xf6, 0x0b, 0xd8, 0x3e, 0x09, 0x97, 0x31, 0x09, 0x72, 0xd0, 0x5e, 0x0e, 0xea, 0x1c, 0xbc, - 0x31, 0xd6, 0x7c, 0x32, 0xbf, 0x8c, 0xc3, 0x6f, 0x41, 0x3b, 0x09, 0x97, 0xb1, 0xcb, 0x53, 0x46, - 0x86, 0x35, 0x99, 0x2f, 0x37, 0xd8, 0x3f, 0x23, 0xe8, 0x4d, 0x5f, 0xba, 0x71, 0x4c, 0xa2, 0x29, - 0x5d, 0xad, 0x42, 0x8e, 0xdf, 0x81, 0x5b, 0xa7, 0xee, 0x39, 0x61, 0xd7, 0xa7, 0x55, 0x7e, 0x3c, - 0x81, 0x36, 0x23, 0x7e, 0x78, 0x1a, 0x92, 0x98, 0xcb, 0xc4, 0x95, 0xe0, 0x1c, 0x83, 0xef, 0x42, - 0xd3, 0x5d, 0xd1, 0x34, 0xe6, 0xc3, 0xfa, 0x43, 0xf4, 0xb8, 0xee, 0xe8, 0x15, 0xbe, 0x07, 0x5b, - 0x32, 0xe3, 0x3c, 0x0c, 0x86, 0x0d, 0xe9, 0x69, 0xc9, 0xf5, 0xf3, 0xc0, 0x0e, 0x60, 0xa0, 0x8a, - 0x2e, 0x72, 0x9c, 0x40, 0xcb, 0x57, 0x06, 0xcd, 0x72, 0xc7, 0x6c, 0x5c, 0xc0, 0x39, 0x06, 0xf5, - 0x2f, 0x87, 0xf0, 0x14, 0x06, 0x53, 0x46, 0x5c, 0x4e, 0x0e, 0x7d, 0x5f, 0x30, 0x72, 0x48, 0x92, - 0x46, 0x1c, 0xbf, 0x0b, 0x2d, 0x57, 0x19, 0xf4, 0x2e, 0xdb, 0x66, 0x17, 0x83, 0x33, 0x7e, 0xfb, - 0x15, 0x02, 0x4b, 0x13, 0x2d, 0x26, 0xfa, 0x36, 0x25, 0x09, 0xff, 0x0f, 0x1a, 0x85, 0x0f, 0x60, - 0xc7, 0x8f, 0xc4, 0x31, 0xce, 0xbf, 0x23, 0x2c, 0x09, 0x69, 0x3c, 0x8f, 0xd3, 0x95, 0x47, 0x98, - 0x3c, 0xcb, 0xb6, 0x33, 0x50, 0xce, 0x2f, 0x95, 0xef, 0x58, 0xba, 0xec, 0x0f, 0xe1, 0x5e, 0x25, - 0x29, 0x59, 0xdd, 0x10, 0x5a, 0x9e, 0x1b, 0xb9, 0xb1, 0x4f, 0x24, 0xaf, 0xba, 0x63, 0x96, 0xf6, - 0x0c, 0x5a, 0x1a, 0x8a, 0xdf, 0x83, 0x96, 0x1b, 0x04, 0x8c, 0x24, 0xc9, 0xf5, 0xe4, 0x0d, 0xe2, - 0x6a, 0xc6, 0x5a, 0x31, 0xe3, 0x7d, 0x68, 0xeb, 0xc6, 0x3c, 0xff, 0x04, 0xf7, 0xa1, 0x16, 0x06, - 0x7a, 0xcf, 0x5a, 0x18, 0xd8, 0xbf, 0x21, 0xe8, 0x18, 0x6f, 0xbc, 0xa0, 0x78, 0x37, 0xf3, 0x5f, - 0xd9, 0x2e, 0x0b, 0x17, 0x21, 0xf8, 0x00, 0xba, 0x0b, 0x46, 0x57, 0x73, 0xd3, 0x9e, 0x5a, 0x75, - 0x7b, 0x3a, 0x02, 0x64, 0x4a, 0x19, 0x03, 0x70, 0x9a, 0x45, 0xd4, 0xab, 0x23, 0xda, 0x9c, 0x1a, - 0xfc, 0x23, 0xe8, 0xfb, 0x11, 0x4d, 0xc8, 0x3c, 0x11, 0x4d, 0x14, 0x45, 0x29, 0x6d, 0xf6, 0xa4, - 0xf5, 0x44, 0x1b, 0xed, 0x1f, 0x11, 0xe0, 0x82, 0x44, 0x4f, 0xb8, 0xcb, 0x09, 0x1e, 0x97, 0x15, - 0x7a, 0xa7, 0x54, 0x89, 0x84, 0xe5, 0x02, 0x7d, 0x04, 0x7d, 0x59, 0x51, 0x59, 0x01, 0x3d, 0x61, - 0x3d, 0xc9, 0x54, 0xb0, 0x0b, 0x5d, 0x4e, 0xaf, 0x80, 0xea, 0x12, 0xd4, 0xe1, 0x34, 0x83, 0xd8, - 0x04, 0x06, 0x53, 0xc1, 0x30, 0xbb, 0x32, 0x29, 0x4b, 0x28, 0xbb, 0xf9, 0xb5, 0x5e, 0xaf, 0xbb, - 0x56, 0x55, 0xf7, 0x2b, 0x04, 0xdd, 0x42, 0xc5, 0x37, 0x68, 0x9b, 0x05, 0x5b, 0xa5, 0xa4, 0xd9, - 0x1a, 0xef, 0x41, 0x43, 0x94, 0x7a, 0x5d, 0x63, 0xa4, 0x13, 0xbf, 0x0d, 0x35, 0x4e, 0x65, 0x1f, - 0x2a, 0x20, 0x35, 0x4e, 0xed, 0xc3, 0x7c, 0x9a, 0xc9, 0x33, 0xc0, 0x4f, 0xe0, 0x56, 0x22, 0xe8, - 0x69, 0x62, 0x96, 0x09, 0x5a, 0x6f, 0x99, 0xa3, 0x80, 0xf6, 0xaf, 0xc8, 0xcc, 0x9c, 0xec, 0x68, - 0x66, 0x6e, 0xc8, 0xf0, 0x3e, 0xb4, 0x68, 0x14, 0xcc, 0x37, 0xde, 0xe3, 0x26, 0x8d, 0x02, 0x31, - 0x98, 0xf7, 0xa1, 0x15, 0x93, 0x33, 0x89, 0xbd, 0x76, 0x30, 0x36, 0x63, 0x72, 0xa6, 0x86, 0x78, - 0x4f, 0xe4, 0x2d, 0xf7, 0xb4, 0x4b, 0xa3, 0x20, 0xef, 0xfb, 0x1e, 0xf4, 0x44, 0xc2, 0x1c, 0xd4, - 0x50, 0xa0, 0x98, 0x9c, 0xe5, 0x9d, 0xff, 0x01, 0xc1, 0xf6, 0x0b, 0xe6, 0xc6, 0xc9, 0x82, 0x30, - 0x33, 0x79, 0xfe, 0xf7, 0x69, 0x6e, 0x9f, 0xc3, 0x8e, 0x3a, 0xbe, 0x32, 0x95, 0x23, 0xb8, 0xcd, - 0xb5, 0x69, 0xce, 0x94, 0x4d, 0xb3, 0x7a, 0xd3, 0x6c, 0x54, 0x0a, 0x71, 0xb6, 0x79, 0x29, 0xc7, - 0xe6, 0x39, 0xbe, 0x0f, 0xfd, 0x3c, 0xc3, 0xe6, 0x21, 0x77, 0xf0, 0x4b, 0x03, 0xb6, 0x74, 0xfb, - 0x13, 0xfc, 0x31, 0xf4, 0xd4, 0x88, 0xd4, 0x16, 0x7c, 0xbf, 0x52, 0x27, 0xea, 0x55, 0xb1, 0xd6, - 0xd5, 0x8d, 0x3f, 0x82, 0xfe, 0x33, 0xc2, 0xaf, 0x4e, 0xb1, 0x75, 0x90, 0x35, 0x28, 0x9b, 0x04, - 0xee, 0x10, 0xba, 0x52, 0xaa, 0x66, 0xe7, 0x0d, 0x0a, 0xb5, 0xd6, 0x5e, 0x39, 0xa5, 0xf1, 0x4f, - 0xe1, 0xce, 0x33, 0xc2, 0x8f, 0xc9, 0xf7, 0xbc, 0x70, 0xf1, 0xf3, 0x22, 0x2a, 0xe6, 0x41, 0x35, - 0x99, 0xec, 0x1c, 0xcc, 0x10, 0x5c, 0x97, 0x80, 0x95, 0x67, 0xad, 0x78, 0x54, 0xbe, 0xce, 0xde, - 0xeb, 0x42, 0x1a, 0xbb, 0x54, 0x54, 0xc5, 0x1b, 0x69, 0xed, 0x6e, 0xc4, 0xc8, 0xec, 0x4f, 0x61, - 0xf0, 0xc5, 0x69, 0x90, 0x9b, 0x67, 0xa9, 0x27, 0x6e, 0x50, 0xa9, 0x59, 0x85, 0x6b, 0x6b, 0x75, - 0x8d, 0x53, 0x7c, 0x63, 0xe1, 0x43, 0xd8, 0x32, 0x0a, 0xc1, 0x0f, 0x8a, 0x61, 0x25, 0xed, 0x59, - 0x77, 0xd7, 0x45, 0x29, 0x48, 0x1c, 0x4d, 0xff, 0xfe, 0x6b, 0x84, 0x5e, 0x5f, 0x8c, 0xd0, 0x1f, - 0x17, 0x23, 0xf4, 0xe7, 0xc5, 0x08, 0xfd, 0x74, 0x39, 0x42, 0xbf, 0x5f, 0x8e, 0xd0, 0xeb, 0xcb, - 0x11, 0x82, 0x7e, 0x48, 0xc7, 0x1e, 0x5f, 0x24, 0x3a, 0xf8, 0xa8, 0xf3, 0xb9, 0xfc, 0x9d, 0x89, - 0x2f, 0xbd, 0x19, 0xfa, 0x4a, 0x7f, 0x25, 0x7a, 0x4d, 0xf9, 0xe9, 0xf7, 0xc1, 0x3f, 0x01, 0x00, - 0x00, 0xff, 0xff, 0x29, 0xac, 0xd3, 0xbe, 0x52, 0x0a, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// ChannelsClient is the client API for Channels service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ChannelsClient interface { - // Creates a channel on the ledger and returns the ID of the ledger - CreateChannel(ctx context.Context, in *SignedChannelCommit, opts ...grpc.CallOption) (*ChannelID, error) - // Retrieves the state of a channel on the ledger. - GetChannelInfo(ctx context.Context, in *ChannelID, opts ...grpc.CallOption) (*ChannelInfo, error) - // Closes a channel on the ledger. - CloseChannel(ctx context.Context, in *SignedChannelState, opts ...grpc.CallOption) (*ChannelClosed, error) - // Retrieves the state of the next closed channel with the given payer - // returns OUT_OF_RANGE status if there are no more closed channels - GetNextClosedChannel(ctx context.Context, in *ClosedChannelCursor, opts ...grpc.CallOption) (*ChannelInfo, error) - // Create an account and return - CreateAccount(ctx context.Context, in *PublicKey, opts ...grpc.CallOption) (*CreateAccountResult, error) - // Create an account, securely, and return - SignedCreateAccount(ctx context.Context, in *SignedCreateAccountRequest, opts ...grpc.CallOption) (*SignedCreateAccountResult, error) - // Update an account pub key (BIP 44 compatible) - UpdateAccountPubKey(ctx context.Context, in *SignedPublicKeyPair, opts ...grpc.CallOption) (*Null, error) - // Transfers funds from one off-chain account to another - Transfer(ctx context.Context, in *SignedTransferRequest, opts ...grpc.CallOption) (*TransferResult, error) -} - -type channelsClient struct { - cc *grpc.ClientConn -} - -func NewChannelsClient(cc *grpc.ClientConn) ChannelsClient { - return &channelsClient{cc} -} - -func (c *channelsClient) CreateChannel(ctx context.Context, in *SignedChannelCommit, opts ...grpc.CallOption) (*ChannelID, error) { - out := new(ChannelID) - err := c.cc.Invoke(ctx, "/ledger.Channels/CreateChannel", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *channelsClient) GetChannelInfo(ctx context.Context, in *ChannelID, opts ...grpc.CallOption) (*ChannelInfo, error) { - out := new(ChannelInfo) - err := c.cc.Invoke(ctx, "/ledger.Channels/GetChannelInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *channelsClient) CloseChannel(ctx context.Context, in *SignedChannelState, opts ...grpc.CallOption) (*ChannelClosed, error) { - out := new(ChannelClosed) - err := c.cc.Invoke(ctx, "/ledger.Channels/CloseChannel", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *channelsClient) GetNextClosedChannel(ctx context.Context, in *ClosedChannelCursor, opts ...grpc.CallOption) (*ChannelInfo, error) { - out := new(ChannelInfo) - err := c.cc.Invoke(ctx, "/ledger.Channels/GetNextClosedChannel", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *channelsClient) CreateAccount(ctx context.Context, in *PublicKey, opts ...grpc.CallOption) (*CreateAccountResult, error) { - out := new(CreateAccountResult) - err := c.cc.Invoke(ctx, "/ledger.Channels/CreateAccount", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *channelsClient) SignedCreateAccount(ctx context.Context, in *SignedCreateAccountRequest, opts ...grpc.CallOption) (*SignedCreateAccountResult, error) { - out := new(SignedCreateAccountResult) - err := c.cc.Invoke(ctx, "/ledger.Channels/SignedCreateAccount", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *channelsClient) UpdateAccountPubKey(ctx context.Context, in *SignedPublicKeyPair, opts ...grpc.CallOption) (*Null, error) { - out := new(Null) - err := c.cc.Invoke(ctx, "/ledger.Channels/UpdateAccountPubKey", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *channelsClient) Transfer(ctx context.Context, in *SignedTransferRequest, opts ...grpc.CallOption) (*TransferResult, error) { - out := new(TransferResult) - err := c.cc.Invoke(ctx, "/ledger.Channels/Transfer", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ChannelsServer is the server API for Channels service. -type ChannelsServer interface { - // Creates a channel on the ledger and returns the ID of the ledger - CreateChannel(context.Context, *SignedChannelCommit) (*ChannelID, error) - // Retrieves the state of a channel on the ledger. - GetChannelInfo(context.Context, *ChannelID) (*ChannelInfo, error) - // Closes a channel on the ledger. - CloseChannel(context.Context, *SignedChannelState) (*ChannelClosed, error) - // Retrieves the state of the next closed channel with the given payer - // returns OUT_OF_RANGE status if there are no more closed channels - GetNextClosedChannel(context.Context, *ClosedChannelCursor) (*ChannelInfo, error) - // Create an account and return - CreateAccount(context.Context, *PublicKey) (*CreateAccountResult, error) - // Create an account, securely, and return - SignedCreateAccount(context.Context, *SignedCreateAccountRequest) (*SignedCreateAccountResult, error) - // Update an account pub key (BIP 44 compatible) - UpdateAccountPubKey(context.Context, *SignedPublicKeyPair) (*Null, error) - // Transfers funds from one off-chain account to another - Transfer(context.Context, *SignedTransferRequest) (*TransferResult, error) -} - -// UnimplementedChannelsServer can be embedded to have forward compatible implementations. -type UnimplementedChannelsServer struct { -} - -func (*UnimplementedChannelsServer) CreateChannel(ctx context.Context, req *SignedChannelCommit) (*ChannelID, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateChannel not implemented") -} -func (*UnimplementedChannelsServer) GetChannelInfo(ctx context.Context, req *ChannelID) (*ChannelInfo, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetChannelInfo not implemented") -} -func (*UnimplementedChannelsServer) CloseChannel(ctx context.Context, req *SignedChannelState) (*ChannelClosed, error) { - return nil, status.Errorf(codes.Unimplemented, "method CloseChannel not implemented") -} -func (*UnimplementedChannelsServer) GetNextClosedChannel(ctx context.Context, req *ClosedChannelCursor) (*ChannelInfo, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetNextClosedChannel not implemented") -} -func (*UnimplementedChannelsServer) CreateAccount(ctx context.Context, req *PublicKey) (*CreateAccountResult, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateAccount not implemented") -} -func (*UnimplementedChannelsServer) SignedCreateAccount(ctx context.Context, req *SignedCreateAccountRequest) (*SignedCreateAccountResult, error) { - return nil, status.Errorf(codes.Unimplemented, "method SignedCreateAccount not implemented") -} -func (*UnimplementedChannelsServer) UpdateAccountPubKey(ctx context.Context, req *SignedPublicKeyPair) (*Null, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateAccountPubKey not implemented") -} -func (*UnimplementedChannelsServer) Transfer(ctx context.Context, req *SignedTransferRequest) (*TransferResult, error) { - return nil, status.Errorf(codes.Unimplemented, "method Transfer not implemented") -} - -func RegisterChannelsServer(s *grpc.Server, srv ChannelsServer) { - s.RegisterService(&_Channels_serviceDesc, srv) -} - -func _Channels_CreateChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SignedChannelCommit) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ChannelsServer).CreateChannel(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ledger.Channels/CreateChannel", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ChannelsServer).CreateChannel(ctx, req.(*SignedChannelCommit)) - } - return interceptor(ctx, in, info, handler) -} - -func _Channels_GetChannelInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ChannelID) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ChannelsServer).GetChannelInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ledger.Channels/GetChannelInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ChannelsServer).GetChannelInfo(ctx, req.(*ChannelID)) - } - return interceptor(ctx, in, info, handler) -} - -func _Channels_CloseChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SignedChannelState) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ChannelsServer).CloseChannel(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ledger.Channels/CloseChannel", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ChannelsServer).CloseChannel(ctx, req.(*SignedChannelState)) - } - return interceptor(ctx, in, info, handler) -} - -func _Channels_GetNextClosedChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ClosedChannelCursor) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ChannelsServer).GetNextClosedChannel(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ledger.Channels/GetNextClosedChannel", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ChannelsServer).GetNextClosedChannel(ctx, req.(*ClosedChannelCursor)) - } - return interceptor(ctx, in, info, handler) -} - -func _Channels_CreateAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PublicKey) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ChannelsServer).CreateAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ledger.Channels/CreateAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ChannelsServer).CreateAccount(ctx, req.(*PublicKey)) - } - return interceptor(ctx, in, info, handler) -} - -func _Channels_SignedCreateAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SignedCreateAccountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ChannelsServer).SignedCreateAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ledger.Channels/SignedCreateAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ChannelsServer).SignedCreateAccount(ctx, req.(*SignedCreateAccountRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Channels_UpdateAccountPubKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SignedPublicKeyPair) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ChannelsServer).UpdateAccountPubKey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ledger.Channels/UpdateAccountPubKey", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ChannelsServer).UpdateAccountPubKey(ctx, req.(*SignedPublicKeyPair)) - } - return interceptor(ctx, in, info, handler) -} - -func _Channels_Transfer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SignedTransferRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ChannelsServer).Transfer(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ledger.Channels/Transfer", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ChannelsServer).Transfer(ctx, req.(*SignedTransferRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Channels_serviceDesc = grpc.ServiceDesc{ - ServiceName: "ledger.Channels", - HandlerType: (*ChannelsServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateChannel", - Handler: _Channels_CreateChannel_Handler, - }, - { - MethodName: "GetChannelInfo", - Handler: _Channels_GetChannelInfo_Handler, - }, - { - MethodName: "CloseChannel", - Handler: _Channels_CloseChannel_Handler, - }, - { - MethodName: "GetNextClosedChannel", - Handler: _Channels_GetNextClosedChannel_Handler, - }, - { - MethodName: "CreateAccount", - Handler: _Channels_CreateAccount_Handler, - }, - { - MethodName: "SignedCreateAccount", - Handler: _Channels_SignedCreateAccount_Handler, - }, - { - MethodName: "UpdateAccountPubKey", - Handler: _Channels_UpdateAccountPubKey_Handler, - }, - { - MethodName: "Transfer", - Handler: _Channels_Transfer_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "protos/ledger/ledger.proto", -} - -func (m *Null) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Null) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Null) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - return len(dAtA) - i, nil -} - -func (m *PublicKey) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PublicKey) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PublicKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintLedger(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SignedPublicKey) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignedPublicKey) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignedPublicKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintLedger(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if m.Key != nil { - { - size, err := m.Key.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLedger(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ChannelCommit) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ChannelCommit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ChannelCommit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.PayerId != 0 { - i = encodeVarintLedger(dAtA, i, uint64(m.PayerId)) - i-- - dAtA[i] = 0x20 - } - if m.Amount != 0 { - i = encodeVarintLedger(dAtA, i, uint64(m.Amount)) - i-- - dAtA[i] = 0x18 - } - if m.Recipient != nil { - { - size, err := m.Recipient.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLedger(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Payer != nil { - { - size, err := m.Payer.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLedger(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SignedChannelCommit) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignedChannelCommit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignedChannelCommit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintLedger(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if m.Channel != nil { - { - size, err := m.Channel.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLedger(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CreateAccountResult) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CreateAccountResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CreateAccountResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Account != nil { - { - size, err := m.Account.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLedger(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SignedCreateAccountRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignedCreateAccountRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignedCreateAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.ClientVersionNumber) > 0 { - i -= len(m.ClientVersionNumber) - copy(dAtA[i:], m.ClientVersionNumber) - i = encodeVarintLedger(dAtA, i, uint64(len(m.ClientVersionNumber))) - i-- - dAtA[i] = 0x1a - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintLedger(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if m.Key != nil { - { - size, err := m.Key.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLedger(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SignedCreateAccountResult) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignedCreateAccountResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignedCreateAccountResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Balance != 0 { - i = encodeVarintLedger(dAtA, i, uint64(m.Balance)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Account) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Account) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Account) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Balance != 0 { - i = encodeVarintLedger(dAtA, i, uint64(m.Balance)) - i-- - dAtA[i] = 0x10 - } - if m.Address != nil { - { - size, err := m.Address.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLedger(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ChannelID) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ChannelID) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ChannelID) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Id != 0 { - i = encodeVarintLedger(dAtA, i, uint64(m.Id)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ChannelInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ChannelInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ChannelInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.CloseSequence != 0 { - i = encodeVarintLedger(dAtA, i, uint64(m.CloseSequence)) - i-- - dAtA[i] = 0x20 - } - if m.ToAccount != nil { - { - size, err := m.ToAccount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLedger(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.FromAccount != nil { - { - size, err := m.FromAccount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLedger(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Id != nil { - { - size, err := m.Id.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLedger(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SignedChannelState) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignedChannelState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignedChannelState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.ToSignature) > 0 { - i -= len(m.ToSignature) - copy(dAtA[i:], m.ToSignature) - i = encodeVarintLedger(dAtA, i, uint64(len(m.ToSignature))) - i-- - dAtA[i] = 0x1a - } - if len(m.FromSignature) > 0 { - i -= len(m.FromSignature) - copy(dAtA[i:], m.FromSignature) - i = encodeVarintLedger(dAtA, i, uint64(len(m.FromSignature))) - i-- - dAtA[i] = 0x12 - } - if m.Channel != nil { - { - size, err := m.Channel.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLedger(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ClosedChannelCursor) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClosedChannelCursor) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ClosedChannelCursor) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.CloseSequence != 0 { - i = encodeVarintLedger(dAtA, i, uint64(m.CloseSequence)) - i-- - dAtA[i] = 0x10 - } - if m.Payer != nil { - { - size, err := m.Payer.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLedger(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ChannelState) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ChannelState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ChannelState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.To != nil { - { - size, err := m.To.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLedger(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.From != nil { - { - size, err := m.From.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLedger(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Sequence != 0 { - i = encodeVarintLedger(dAtA, i, uint64(m.Sequence)) - i-- - dAtA[i] = 0x10 - } - if m.Id != nil { - { - size, err := m.Id.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLedger(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ChannelClosed) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ChannelClosed) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ChannelClosed) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.State != nil { - { - size, err := m.State.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLedger(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SignedPublicKeyPair) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignedPublicKeyPair) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignedPublicKeyPair) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.NewSignature) > 0 { - i -= len(m.NewSignature) - copy(dAtA[i:], m.NewSignature) - i = encodeVarintLedger(dAtA, i, uint64(len(m.NewSignature))) - i-- - dAtA[i] = 0x22 - } - if len(m.OldSignature) > 0 { - i -= len(m.OldSignature) - copy(dAtA[i:], m.OldSignature) - i = encodeVarintLedger(dAtA, i, uint64(len(m.OldSignature))) - i-- - dAtA[i] = 0x1a - } - if m.NewKey != nil { - { - size, err := m.NewKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLedger(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.OldKey != nil { - { - size, err := m.OldKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLedger(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TransferRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TransferRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransferRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Amount != 0 { - i = encodeVarintLedger(dAtA, i, uint64(m.Amount)) - i-- - dAtA[i] = 0x18 - } - if m.Recipient != nil { - { - size, err := m.Recipient.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLedger(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Payer != nil { - { - size, err := m.Payer.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLedger(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SignedTransferRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignedTransferRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignedTransferRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintLedger(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if m.TransferRequest != nil { - { - size, err := m.TransferRequest.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLedger(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TransferResult) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TransferResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransferResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Balance != 0 { - i = encodeVarintLedger(dAtA, i, uint64(m.Balance)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintLedger(dAtA []byte, offset int, v uint64) int { - offset -= sovLedger(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedNull(r randyLedger, easy bool) *Null { - this := &Null{} - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLedger(r, 1) - } - return this -} - -func NewPopulatedPublicKey(r randyLedger, easy bool) *PublicKey { - this := &PublicKey{} - v1 := r.Intn(100) - this.Key = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Key[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLedger(r, 2) - } - return this -} - -func NewPopulatedSignedPublicKey(r randyLedger, easy bool) *SignedPublicKey { - this := &SignedPublicKey{} - if r.Intn(5) != 0 { - this.Key = NewPopulatedPublicKey(r, easy) - } - v2 := r.Intn(100) - this.Signature = make([]byte, v2) - for i := 0; i < v2; i++ { - this.Signature[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLedger(r, 3) - } - return this -} - -func NewPopulatedChannelCommit(r randyLedger, easy bool) *ChannelCommit { - this := &ChannelCommit{} - if r.Intn(5) != 0 { - this.Payer = NewPopulatedPublicKey(r, easy) - } - if r.Intn(5) != 0 { - this.Recipient = NewPopulatedPublicKey(r, easy) - } - this.Amount = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Amount *= -1 - } - this.PayerId = int64(r.Int63()) - if r.Intn(2) == 0 { - this.PayerId *= -1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLedger(r, 5) - } - return this -} - -func NewPopulatedSignedChannelCommit(r randyLedger, easy bool) *SignedChannelCommit { - this := &SignedChannelCommit{} - if r.Intn(5) != 0 { - this.Channel = NewPopulatedChannelCommit(r, easy) - } - v3 := r.Intn(100) - this.Signature = make([]byte, v3) - for i := 0; i < v3; i++ { - this.Signature[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLedger(r, 3) - } - return this -} - -func NewPopulatedCreateAccountResult(r randyLedger, easy bool) *CreateAccountResult { - this := &CreateAccountResult{} - if r.Intn(5) != 0 { - this.Account = NewPopulatedAccount(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLedger(r, 2) - } - return this -} - -func NewPopulatedSignedCreateAccountRequest(r randyLedger, easy bool) *SignedCreateAccountRequest { - this := &SignedCreateAccountRequest{} - if r.Intn(5) != 0 { - this.Key = NewPopulatedPublicKey(r, easy) - } - v4 := r.Intn(100) - this.Signature = make([]byte, v4) - for i := 0; i < v4; i++ { - this.Signature[i] = byte(r.Intn(256)) - } - this.ClientVersionNumber = string(randStringLedger(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLedger(r, 4) - } - return this -} - -func NewPopulatedSignedCreateAccountResult(r randyLedger, easy bool) *SignedCreateAccountResult { - this := &SignedCreateAccountResult{} - this.Balance = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Balance *= -1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLedger(r, 2) - } - return this -} - -func NewPopulatedAccount(r randyLedger, easy bool) *Account { - this := &Account{} - if r.Intn(5) != 0 { - this.Address = NewPopulatedPublicKey(r, easy) - } - this.Balance = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Balance *= -1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLedger(r, 3) - } - return this -} - -func NewPopulatedChannelID(r randyLedger, easy bool) *ChannelID { - this := &ChannelID{} - this.Id = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Id *= -1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLedger(r, 2) - } - return this -} - -func NewPopulatedChannelInfo(r randyLedger, easy bool) *ChannelInfo { - this := &ChannelInfo{} - if r.Intn(5) != 0 { - this.Id = NewPopulatedChannelID(r, easy) - } - if r.Intn(5) != 0 { - this.FromAccount = NewPopulatedAccount(r, easy) - } - if r.Intn(5) != 0 { - this.ToAccount = NewPopulatedAccount(r, easy) - } - this.CloseSequence = int64(r.Int63()) - if r.Intn(2) == 0 { - this.CloseSequence *= -1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLedger(r, 5) - } - return this -} - -func NewPopulatedSignedChannelState(r randyLedger, easy bool) *SignedChannelState { - this := &SignedChannelState{} - if r.Intn(5) != 0 { - this.Channel = NewPopulatedChannelState(r, easy) - } - v5 := r.Intn(100) - this.FromSignature = make([]byte, v5) - for i := 0; i < v5; i++ { - this.FromSignature[i] = byte(r.Intn(256)) - } - v6 := r.Intn(100) - this.ToSignature = make([]byte, v6) - for i := 0; i < v6; i++ { - this.ToSignature[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLedger(r, 4) - } - return this -} - -func NewPopulatedClosedChannelCursor(r randyLedger, easy bool) *ClosedChannelCursor { - this := &ClosedChannelCursor{} - if r.Intn(5) != 0 { - this.Payer = NewPopulatedPublicKey(r, easy) - } - this.CloseSequence = int64(r.Int63()) - if r.Intn(2) == 0 { - this.CloseSequence *= -1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLedger(r, 3) - } - return this -} - -func NewPopulatedChannelState(r randyLedger, easy bool) *ChannelState { - this := &ChannelState{} - if r.Intn(5) != 0 { - this.Id = NewPopulatedChannelID(r, easy) - } - this.Sequence = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sequence *= -1 - } - if r.Intn(5) != 0 { - this.From = NewPopulatedAccount(r, easy) - } - if r.Intn(5) != 0 { - this.To = NewPopulatedAccount(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLedger(r, 5) - } - return this -} - -func NewPopulatedChannelClosed(r randyLedger, easy bool) *ChannelClosed { - this := &ChannelClosed{} - if r.Intn(5) != 0 { - this.State = NewPopulatedSignedChannelState(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLedger(r, 2) - } - return this -} - -func NewPopulatedSignedPublicKeyPair(r randyLedger, easy bool) *SignedPublicKeyPair { - this := &SignedPublicKeyPair{} - if r.Intn(5) != 0 { - this.OldKey = NewPopulatedPublicKey(r, easy) - } - if r.Intn(5) != 0 { - this.NewKey = NewPopulatedPublicKey(r, easy) - } - v7 := r.Intn(100) - this.OldSignature = make([]byte, v7) - for i := 0; i < v7; i++ { - this.OldSignature[i] = byte(r.Intn(256)) - } - v8 := r.Intn(100) - this.NewSignature = make([]byte, v8) - for i := 0; i < v8; i++ { - this.NewSignature[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLedger(r, 5) - } - return this -} - -func NewPopulatedTransferRequest(r randyLedger, easy bool) *TransferRequest { - this := &TransferRequest{} - if r.Intn(5) != 0 { - this.Payer = NewPopulatedPublicKey(r, easy) - } - if r.Intn(5) != 0 { - this.Recipient = NewPopulatedPublicKey(r, easy) - } - this.Amount = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Amount *= -1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLedger(r, 4) - } - return this -} - -func NewPopulatedSignedTransferRequest(r randyLedger, easy bool) *SignedTransferRequest { - this := &SignedTransferRequest{} - if r.Intn(5) != 0 { - this.TransferRequest = NewPopulatedTransferRequest(r, easy) - } - v9 := r.Intn(100) - this.Signature = make([]byte, v9) - for i := 0; i < v9; i++ { - this.Signature[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLedger(r, 3) - } - return this -} - -func NewPopulatedTransferResult(r randyLedger, easy bool) *TransferResult { - this := &TransferResult{} - this.Balance = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Balance *= -1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLedger(r, 2) - } - return this -} - -type randyLedger interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneLedger(r randyLedger) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringLedger(r randyLedger) string { - v10 := r.Intn(100) - tmps := make([]rune, v10) - for i := 0; i < v10; i++ { - tmps[i] = randUTF8RuneLedger(r) - } - return string(tmps) -} -func randUnrecognizedLedger(r randyLedger, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldLedger(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldLedger(dAtA []byte, r randyLedger, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateLedger(dAtA, uint64(key)) - v11 := r.Int63() - if r.Intn(2) == 0 { - v11 *= -1 - } - dAtA = encodeVarintPopulateLedger(dAtA, uint64(v11)) - case 1: - dAtA = encodeVarintPopulateLedger(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateLedger(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateLedger(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateLedger(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateLedger(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *Null) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *PublicKey) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovLedger(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SignedPublicKey) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Key != nil { - l = m.Key.Size() - n += 1 + l + sovLedger(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovLedger(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ChannelCommit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Payer != nil { - l = m.Payer.Size() - n += 1 + l + sovLedger(uint64(l)) - } - if m.Recipient != nil { - l = m.Recipient.Size() - n += 1 + l + sovLedger(uint64(l)) - } - if m.Amount != 0 { - n += 1 + sovLedger(uint64(m.Amount)) - } - if m.PayerId != 0 { - n += 1 + sovLedger(uint64(m.PayerId)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SignedChannelCommit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Channel != nil { - l = m.Channel.Size() - n += 1 + l + sovLedger(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovLedger(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CreateAccountResult) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Account != nil { - l = m.Account.Size() - n += 1 + l + sovLedger(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SignedCreateAccountRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Key != nil { - l = m.Key.Size() - n += 1 + l + sovLedger(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovLedger(uint64(l)) - } - l = len(m.ClientVersionNumber) - if l > 0 { - n += 1 + l + sovLedger(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SignedCreateAccountResult) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Balance != 0 { - n += 1 + sovLedger(uint64(m.Balance)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Account) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Address != nil { - l = m.Address.Size() - n += 1 + l + sovLedger(uint64(l)) - } - if m.Balance != 0 { - n += 1 + sovLedger(uint64(m.Balance)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ChannelID) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != 0 { - n += 1 + sovLedger(uint64(m.Id)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ChannelInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != nil { - l = m.Id.Size() - n += 1 + l + sovLedger(uint64(l)) - } - if m.FromAccount != nil { - l = m.FromAccount.Size() - n += 1 + l + sovLedger(uint64(l)) - } - if m.ToAccount != nil { - l = m.ToAccount.Size() - n += 1 + l + sovLedger(uint64(l)) - } - if m.CloseSequence != 0 { - n += 1 + sovLedger(uint64(m.CloseSequence)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SignedChannelState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Channel != nil { - l = m.Channel.Size() - n += 1 + l + sovLedger(uint64(l)) - } - l = len(m.FromSignature) - if l > 0 { - n += 1 + l + sovLedger(uint64(l)) - } - l = len(m.ToSignature) - if l > 0 { - n += 1 + l + sovLedger(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ClosedChannelCursor) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Payer != nil { - l = m.Payer.Size() - n += 1 + l + sovLedger(uint64(l)) - } - if m.CloseSequence != 0 { - n += 1 + sovLedger(uint64(m.CloseSequence)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ChannelState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != nil { - l = m.Id.Size() - n += 1 + l + sovLedger(uint64(l)) - } - if m.Sequence != 0 { - n += 1 + sovLedger(uint64(m.Sequence)) - } - if m.From != nil { - l = m.From.Size() - n += 1 + l + sovLedger(uint64(l)) - } - if m.To != nil { - l = m.To.Size() - n += 1 + l + sovLedger(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ChannelClosed) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.State != nil { - l = m.State.Size() - n += 1 + l + sovLedger(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SignedPublicKeyPair) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.OldKey != nil { - l = m.OldKey.Size() - n += 1 + l + sovLedger(uint64(l)) - } - if m.NewKey != nil { - l = m.NewKey.Size() - n += 1 + l + sovLedger(uint64(l)) - } - l = len(m.OldSignature) - if l > 0 { - n += 1 + l + sovLedger(uint64(l)) - } - l = len(m.NewSignature) - if l > 0 { - n += 1 + l + sovLedger(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TransferRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Payer != nil { - l = m.Payer.Size() - n += 1 + l + sovLedger(uint64(l)) - } - if m.Recipient != nil { - l = m.Recipient.Size() - n += 1 + l + sovLedger(uint64(l)) - } - if m.Amount != 0 { - n += 1 + sovLedger(uint64(m.Amount)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SignedTransferRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TransferRequest != nil { - l = m.TransferRequest.Size() - n += 1 + l + sovLedger(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovLedger(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TransferResult) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Balance != 0 { - n += 1 + sovLedger(uint64(m.Balance)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovLedger(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozLedger(x uint64) (n int) { - return sovLedger(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Null) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Null: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Null: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipLedger(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PublicKey) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PublicKey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PublicKey: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthLedger - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthLedger - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLedger(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignedPublicKey) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignedPublicKey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignedPublicKey: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLedger - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLedger - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Key == nil { - m.Key = &PublicKey{} - } - if err := m.Key.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthLedger - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthLedger - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLedger(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ChannelCommit) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ChannelCommit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ChannelCommit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payer", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLedger - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLedger - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Payer == nil { - m.Payer = &PublicKey{} - } - if err := m.Payer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLedger - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLedger - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Recipient == nil { - m.Recipient = &PublicKey{} - } - if err := m.Recipient.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - m.Amount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Amount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PayerId", wireType) - } - m.PayerId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PayerId |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipLedger(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignedChannelCommit) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignedChannelCommit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignedChannelCommit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Channel", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLedger - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLedger - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Channel == nil { - m.Channel = &ChannelCommit{} - } - if err := m.Channel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthLedger - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthLedger - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLedger(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CreateAccountResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CreateAccountResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CreateAccountResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLedger - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLedger - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Account == nil { - m.Account = &Account{} - } - if err := m.Account.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLedger(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignedCreateAccountRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignedCreateAccountRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignedCreateAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLedger - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLedger - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Key == nil { - m.Key = &PublicKey{} - } - if err := m.Key.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthLedger - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthLedger - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientVersionNumber", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthLedger - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthLedger - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClientVersionNumber = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLedger(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignedCreateAccountResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignedCreateAccountResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignedCreateAccountResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) - } - m.Balance = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Balance |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipLedger(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Account) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Account: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Account: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLedger - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLedger - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Address == nil { - m.Address = &PublicKey{} - } - if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) - } - m.Balance = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Balance |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipLedger(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ChannelID) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ChannelID: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ChannelID: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - m.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Id |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipLedger(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ChannelInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ChannelInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ChannelInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLedger - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLedger - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Id == nil { - m.Id = &ChannelID{} - } - if err := m.Id.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FromAccount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLedger - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLedger - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FromAccount == nil { - m.FromAccount = &Account{} - } - if err := m.FromAccount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ToAccount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLedger - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLedger - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ToAccount == nil { - m.ToAccount = &Account{} - } - if err := m.ToAccount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CloseSequence", wireType) - } - m.CloseSequence = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CloseSequence |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipLedger(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignedChannelState) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignedChannelState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignedChannelState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Channel", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLedger - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLedger - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Channel == nil { - m.Channel = &ChannelState{} - } - if err := m.Channel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FromSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthLedger - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthLedger - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FromSignature = append(m.FromSignature[:0], dAtA[iNdEx:postIndex]...) - if m.FromSignature == nil { - m.FromSignature = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ToSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthLedger - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthLedger - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ToSignature = append(m.ToSignature[:0], dAtA[iNdEx:postIndex]...) - if m.ToSignature == nil { - m.ToSignature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLedger(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ClosedChannelCursor) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClosedChannelCursor: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClosedChannelCursor: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payer", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLedger - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLedger - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Payer == nil { - m.Payer = &PublicKey{} - } - if err := m.Payer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CloseSequence", wireType) - } - m.CloseSequence = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CloseSequence |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipLedger(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ChannelState) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ChannelState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ChannelState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLedger - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLedger - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Id == nil { - m.Id = &ChannelID{} - } - if err := m.Id.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) - } - m.Sequence = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Sequence |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLedger - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLedger - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.From == nil { - m.From = &Account{} - } - if err := m.From.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLedger - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLedger - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.To == nil { - m.To = &Account{} - } - if err := m.To.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLedger(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ChannelClosed) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ChannelClosed: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ChannelClosed: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLedger - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLedger - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.State == nil { - m.State = &SignedChannelState{} - } - if err := m.State.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLedger(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignedPublicKeyPair) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignedPublicKeyPair: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignedPublicKeyPair: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OldKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLedger - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLedger - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.OldKey == nil { - m.OldKey = &PublicKey{} - } - if err := m.OldKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NewKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLedger - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLedger - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NewKey == nil { - m.NewKey = &PublicKey{} - } - if err := m.NewKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OldSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthLedger - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthLedger - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OldSignature = append(m.OldSignature[:0], dAtA[iNdEx:postIndex]...) - if m.OldSignature == nil { - m.OldSignature = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NewSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthLedger - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthLedger - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NewSignature = append(m.NewSignature[:0], dAtA[iNdEx:postIndex]...) - if m.NewSignature == nil { - m.NewSignature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLedger(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransferRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TransferRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TransferRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payer", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLedger - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLedger - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Payer == nil { - m.Payer = &PublicKey{} - } - if err := m.Payer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLedger - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLedger - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Recipient == nil { - m.Recipient = &PublicKey{} - } - if err := m.Recipient.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - m.Amount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Amount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipLedger(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignedTransferRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignedTransferRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignedTransferRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TransferRequest", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLedger - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLedger - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TransferRequest == nil { - m.TransferRequest = &TransferRequest{} - } - if err := m.TransferRequest.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthLedger - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthLedger - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLedger(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransferResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TransferResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TransferResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) - } - m.Balance = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLedger - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Balance |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipLedger(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthLedger - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipLedger(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowLedger - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowLedger - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowLedger - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthLedger - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupLedger - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthLedger - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthLedger = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowLedger = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupLedger = fmt.Errorf("proto: unexpected end of group") -) diff --git a/protos/ledger/ledger.proto b/protos/ledger/ledger.proto deleted file mode 100755 index 0a77fa1..0000000 --- a/protos/ledger/ledger.proto +++ /dev/null @@ -1,140 +0,0 @@ -syntax = "proto3"; - -package ledger; - -// gogo plugin toggles -option (gogoproto.gogoproto_import) = true; -option (gogoproto.goproto_registration) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.messagename_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.unmarshaler_all) = true; -// golang option -option go_package = "ledger"; -// java options -option java_multiple_files = true; -option java_outer_classname = "LedgerProto"; -option java_package = "io.btfs.ledger"; - -import "github.com/tron-us/protobuf/gogoproto/gogo.proto"; - -// Interface exported by the server. -service Channels { - // Creates a channel on the ledger and returns the ID of the ledger - rpc CreateChannel(SignedChannelCommit) returns (ChannelID); - // Retrieves the state of a channel on the ledger. - rpc GetChannelInfo(ChannelID) returns (ChannelInfo); - // Closes a channel on the ledger. - rpc CloseChannel(SignedChannelState) returns (ChannelClosed); - // Retrieves the state of the next closed channel with the given payer - // returns OUT_OF_RANGE status if there are no more closed channels - rpc GetNextClosedChannel(ClosedChannelCursor) returns (ChannelInfo); - // Create an account and return - rpc CreateAccount(PublicKey) returns (CreateAccountResult); - // Create an account, securely, and return - rpc SignedCreateAccount(SignedCreateAccountRequest) returns (SignedCreateAccountResult); - // Update an account pub key (BIP 44 compatible) - rpc UpdateAccountPubKey(SignedPublicKeyPair) returns (Null); - // Transfers funds from one off-chain account to another - rpc Transfer(SignedTransferRequest) returns (TransferResult); -} - -message Null {} - -message PublicKey { - bytes key = 1; -} - -message SignedPublicKey { - PublicKey key = 1; - bytes signature = 2; -} - -message ChannelCommit { - PublicKey payer = 1; - PublicKey recipient = 2; - int64 amount = 3; - int64 payer_id = 4; -} - -message SignedChannelCommit { - ChannelCommit channel = 1; - bytes signature = 2; -} - -message CreateAccountResult { - Account account = 1; -} - -message SignedCreateAccountRequest { - PublicKey key = 1; - bytes signature = 2; - // client version number - string client_version_number = 3; -} - -message SignedCreateAccountResult { - int64 balance = 1; -} - -message Account { - PublicKey address = 1; - // Current available balance - int64 balance = 2; -} - -message ChannelID { - int64 id = 1; -} - -message ChannelInfo { - ChannelID id = 1; - Account from_account = 2; - Account to_account = 3; - int64 close_sequence = 4; -} - -message SignedChannelState { - ChannelState channel = 1; - bytes from_signature = 2; - bytes to_signature = 3; -} - -message ClosedChannelCursor { - PublicKey payer = 1; - int64 close_sequence = 2; -} - -message ChannelState { - ChannelID id = 1; - int64 sequence = 2; - Account from = 3; - Account to = 4; -} - -message ChannelClosed { - SignedChannelState state = 1; -} - -message SignedPublicKeyPair { - PublicKey old_key = 1; - PublicKey new_key = 2; - bytes old_signature = 3; - bytes new_signature = 4; -} - -message TransferRequest { - PublicKey payer = 1; - PublicKey recipient = 2; - int64 amount = 3; -} - -message SignedTransferRequest { - TransferRequest transfer_request = 1; - bytes signature = 2; -} - -message TransferResult { - int64 balance = 1; -} diff --git a/protos/node/node.pb.go b/protos/node/node.pb.go deleted file mode 100644 index d2378c3..0000000 --- a/protos/node/node.pb.go +++ /dev/null @@ -1,10645 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: protos/node/node.proto - -package node - -import ( - encoding_binary "encoding/binary" - fmt "fmt" - guard "github.com/bittorrent/go-btfs-common/protos/guard" - _ "github.com/gogo/protobuf/types" - golang_proto "github.com/golang/protobuf/proto" - _ "github.com/tron-us/protobuf/gogoproto" - proto "github.com/tron-us/protobuf/proto" - github_com_tron_us_protobuf_types "github.com/tron-us/protobuf/types" - io "io" - math "math" - math_bits "math/bits" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = golang_proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type NodeRole int32 - -const ( - NodeRole_RENTER NodeRole = 0 - NodeRole_HOST NodeRole = 1 - NodeRole_REPAIRER NodeRole = 2 - NodeRole_CHALLENGER NodeRole = 3 - NodeRole_NETWORK_CHECKER NodeRole = 4 - NodeRole_REPUTATION_CHECKER NodeRole = 5 - NodeRole_CDN_PROVIDER NodeRole = 6 - NodeRole_OTHER NodeRole = 20 -) - -var NodeRole_name = map[int32]string{ - 0: "RENTER", - 1: "HOST", - 2: "REPAIRER", - 3: "CHALLENGER", - 4: "NETWORK_CHECKER", - 5: "REPUTATION_CHECKER", - 6: "CDN_PROVIDER", - 20: "OTHER", -} - -var NodeRole_value = map[string]int32{ - "RENTER": 0, - "HOST": 1, - "REPAIRER": 2, - "CHALLENGER": 3, - "NETWORK_CHECKER": 4, - "REPUTATION_CHECKER": 5, - "CDN_PROVIDER": 6, - "OTHER": 20, -} - -func (x NodeRole) String() string { - return proto.EnumName(NodeRole_name, int32(x)) -} - -func (NodeRole) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_35f8e1f5ec2240a2, []int{0} -} - -type DiscoveryErrorCode int32 - -const ( - DiscoveryErrorCode_SUCCESS DiscoveryErrorCode = 0 - DiscoveryErrorCode_UNCONNECTED DiscoveryErrorCode = 1 - DiscoveryErrorCode_TIMEOUT DiscoveryErrorCode = 2 - DiscoveryErrorCode_ABSOLUTELY_UNOPEN DiscoveryErrorCode = 3 - DiscoveryErrorCode_OTHER_REASON DiscoveryErrorCode = 10 -) - -var DiscoveryErrorCode_name = map[int32]string{ - 0: "SUCCESS", - 1: "UNCONNECTED", - 2: "TIMEOUT", - 3: "ABSOLUTELY_UNOPEN", - 10: "OTHER_REASON", -} - -var DiscoveryErrorCode_value = map[string]int32{ - "SUCCESS": 0, - "UNCONNECTED": 1, - "TIMEOUT": 2, - "ABSOLUTELY_UNOPEN": 3, - "OTHER_REASON": 10, -} - -func (x DiscoveryErrorCode) String() string { - return proto.EnumName(DiscoveryErrorCode_name, int32(x)) -} - -func (DiscoveryErrorCode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_35f8e1f5ec2240a2, []int{1} -} - -type ContractStat_Role int32 - -const ( - ContractStat_HOST ContractStat_Role = 0 - ContractStat_RENTER ContractStat_Role = 1 - ContractStat_RESERVED ContractStat_Role = 2 -) - -var ContractStat_Role_name = map[int32]string{ - 0: "HOST", - 1: "RENTER", - 2: "RESERVED", -} - -var ContractStat_Role_value = map[string]int32{ - "HOST": 0, - "RENTER": 1, - "RESERVED": 2, -} - -func (x ContractStat_Role) String() string { - return proto.EnumName(ContractStat_Role_name, int32(x)) -} - -func (ContractStat_Role) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_35f8e1f5ec2240a2, []int{6, 0} -} - -type PayLoadInfo struct { - NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty" pg:"node_id"` - Node *Node `protobuf:"bytes,2,opt,name=node,proto3" json:"node,omitempty" pg:"node"` - DiscoveryNodes []*DiscoveryNode `protobuf:"bytes,3,rep,name=discovery_nodes,json=discoveryNodes,proto3" json:"discovery_nodes,omitempty" pg:"discovery_nodes"` - LastTime time.Time `protobuf:"bytes,4,opt,name=last_time,json=lastTime,proto3,stdtime" json:"last_time" pg:"last_time"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *PayLoadInfo) Reset() { *m = PayLoadInfo{} } -func (m *PayLoadInfo) String() string { return proto.CompactTextString(m) } -func (*PayLoadInfo) ProtoMessage() {} -func (*PayLoadInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_35f8e1f5ec2240a2, []int{0} -} -func (m *PayLoadInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PayLoadInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PayLoadInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *PayLoadInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_PayLoadInfo.Merge(m, src) -} -func (m *PayLoadInfo) XXX_Size() int { - return m.Size() -} -func (m *PayLoadInfo) XXX_DiscardUnknown() { - xxx_messageInfo_PayLoadInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_PayLoadInfo proto.InternalMessageInfo - -func (m *PayLoadInfo) GetNodeId() string { - if m != nil { - return m.NodeId - } - return "" -} - -func (m *PayLoadInfo) GetNode() *Node { - if m != nil { - return m.Node - } - return nil -} - -func (m *PayLoadInfo) GetDiscoveryNodes() []*DiscoveryNode { - if m != nil { - return m.DiscoveryNodes - } - return nil -} - -func (m *PayLoadInfo) GetLastTime() time.Time { - if m != nil { - return m.LastTime - } - return time.Time{} -} - -func (*PayLoadInfo) XXX_MessageName() string { - return "node.PayLoadInfo" -} - -type DiscoveryNode struct { - ToNodeId string `protobuf:"bytes,1,opt,name=to_node_id,json=toNodeId,proto3" json:"to_node_id,omitempty" pg:"to_node_id"` - NodeConnectLatency int32 `protobuf:"varint,2,opt,name=node_connect_latency,json=nodeConnectLatency,proto3" json:"node_connect_latency,omitempty" pg:"node_connect_latency"` - ErrCode DiscoveryErrorCode `protobuf:"varint,3,opt,name=err_code,json=errCode,proto3,enum=node.DiscoveryErrorCode" json:"err_code,omitempty" pg:"err_code"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *DiscoveryNode) Reset() { *m = DiscoveryNode{} } -func (m *DiscoveryNode) String() string { return proto.CompactTextString(m) } -func (*DiscoveryNode) ProtoMessage() {} -func (*DiscoveryNode) Descriptor() ([]byte, []int) { - return fileDescriptor_35f8e1f5ec2240a2, []int{1} -} -func (m *DiscoveryNode) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DiscoveryNode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DiscoveryNode.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DiscoveryNode) XXX_Merge(src proto.Message) { - xxx_messageInfo_DiscoveryNode.Merge(m, src) -} -func (m *DiscoveryNode) XXX_Size() int { - return m.Size() -} -func (m *DiscoveryNode) XXX_DiscardUnknown() { - xxx_messageInfo_DiscoveryNode.DiscardUnknown(m) -} - -var xxx_messageInfo_DiscoveryNode proto.InternalMessageInfo - -func (m *DiscoveryNode) GetToNodeId() string { - if m != nil { - return m.ToNodeId - } - return "" -} - -func (m *DiscoveryNode) GetNodeConnectLatency() int32 { - if m != nil { - return m.NodeConnectLatency - } - return 0 -} - -func (m *DiscoveryNode) GetErrCode() DiscoveryErrorCode { - if m != nil { - return m.ErrCode - } - return DiscoveryErrorCode_SUCCESS -} - -func (*DiscoveryNode) XXX_MessageName() string { - return "node.DiscoveryNode" -} - -type DiscoveryTab struct { - tableName string `pg:"node_discovery,alias:t,discard_unknown_columns"` - NodeId string `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty" pg:"node_id"` - ConnectCnt uint32 `protobuf:"varint,3,opt,name=connect_cnt,json=connectCnt,proto3" json:"connect_cnt,omitempty" pg:"connect_cnt"` - AvgConnectLatency int32 `protobuf:"varint,4,opt,name=avg_connect_latency,json=avgConnectLatency,proto3" json:"avg_connect_latency,omitempty" pg:"avg_connect_latency"` - ErrCode DiscoveryErrorCode `protobuf:"varint,5,opt,name=err_code,json=errCode,proto3,enum=node.DiscoveryErrorCode" json:"err_code,omitempty" pg:"err_code"` - DiscoveryLabel int32 `protobuf:"varint,6,opt,name=discovery_label,json=discoveryLabel,proto3" json:"discovery_label,omitempty" pg:"discovery_label"` - TimeCreated time.Time `protobuf:"bytes,7,opt,name=time_created,json=timeCreated,proto3,stdtime" json:"time_created" pg:"time_created"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *DiscoveryTab) Reset() { *m = DiscoveryTab{} } -func (m *DiscoveryTab) String() string { return proto.CompactTextString(m) } -func (*DiscoveryTab) ProtoMessage() {} -func (*DiscoveryTab) Descriptor() ([]byte, []int) { - return fileDescriptor_35f8e1f5ec2240a2, []int{2} -} -func (m *DiscoveryTab) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DiscoveryTab) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DiscoveryTab.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DiscoveryTab) XXX_Merge(src proto.Message) { - xxx_messageInfo_DiscoveryTab.Merge(m, src) -} -func (m *DiscoveryTab) XXX_Size() int { - return m.Size() -} -func (m *DiscoveryTab) XXX_DiscardUnknown() { - xxx_messageInfo_DiscoveryTab.DiscardUnknown(m) -} - -var xxx_messageInfo_DiscoveryTab proto.InternalMessageInfo - -func (m *DiscoveryTab) GettableName() string { - if m != nil { - return m.tableName - } - return "" -} - -func (m *DiscoveryTab) GetNodeId() string { - if m != nil { - return m.NodeId - } - return "" -} - -func (m *DiscoveryTab) GetConnectCnt() uint32 { - if m != nil { - return m.ConnectCnt - } - return 0 -} - -func (m *DiscoveryTab) GetAvgConnectLatency() int32 { - if m != nil { - return m.AvgConnectLatency - } - return 0 -} - -func (m *DiscoveryTab) GetErrCode() DiscoveryErrorCode { - if m != nil { - return m.ErrCode - } - return DiscoveryErrorCode_SUCCESS -} - -func (m *DiscoveryTab) GetDiscoveryLabel() int32 { - if m != nil { - return m.DiscoveryLabel - } - return 0 -} - -func (m *DiscoveryTab) GetTimeCreated() time.Time { - if m != nil { - return m.TimeCreated - } - return time.Time{} -} - -func (*DiscoveryTab) XXX_MessageName() string { - return "node.DiscoveryTab" -} - -type Node struct { - tableName string `pg:"node_metrics,alias:t,discard_unknown_columns"` - NodeId string `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty" pg:"node_id"` - BtfsVersion string `protobuf:"bytes,3,opt,name=btfs_version,json=btfsVersion,proto3" json:"btfs_version,omitempty" pg:"btfs_version"` - UpTime uint64 `protobuf:"varint,4,opt,name=up_time,json=upTime,proto3" json:"up_time,omitempty" pg:"up_time"` - StorageUsed uint64 `protobuf:"varint,5,opt,name=storage_used,json=storageUsed,proto3" json:"storage_used,omitempty" pg:"storage_used"` - StorageVolumeCap uint64 `protobuf:"varint,6,opt,name=storage_volume_cap,json=storageVolumeCap,proto3" json:"storage_volume_cap,omitempty" pg:"storage_volume_cap"` - MemoryUsed uint64 `protobuf:"varint,7,opt,name=memory_used,json=memoryUsed,proto3" json:"memory_used,omitempty" pg:"memory_used"` - CpuUsed float64 `protobuf:"fixed64,8,opt,name=cpu_used,json=cpuUsed,proto3" json:"cpu_used,omitempty" pg:"cpu_used"` - Upload uint64 `protobuf:"varint,9,opt,name=upload,proto3" json:"upload,omitempty" pg:"upload"` - Download uint64 `protobuf:"varint,10,opt,name=download,proto3" json:"download,omitempty" pg:"download"` - TotalUpload uint64 `protobuf:"varint,11,opt,name=total_upload,json=totalUpload,proto3" json:"total_upload,omitempty" pg:"total_upload"` - TotalDownload uint64 `protobuf:"varint,12,opt,name=total_download,json=totalDownload,proto3" json:"total_download,omitempty" pg:"total_download"` - StoragePriceDeal uint64 `protobuf:"varint,13,opt,name=storage_price_deal,json=storagePriceDeal,proto3" json:"storage_price_deal,omitempty" pg:"storage_price_deal"` - BandwidthPriceDeal uint64 `protobuf:"varint,14,opt,name=bandwidth_price_deal,json=bandwidthPriceDeal,proto3" json:"bandwidth_price_deal,omitempty" pg:"bandwidth_price_deal"` - Node_Settings `protobuf:"bytes,15,opt,name=settings,proto3,embedded=settings" json:"settings" pg:"settings"` - Reputation float64 `protobuf:"fixed64,16,opt,name=reputation,proto3" json:"reputation,omitempty" pg:"reputation"` - BlocksUp uint64 `protobuf:"varint,17,opt,name=blocks_up,json=blocksUp,proto3" json:"blocks_up,omitempty" pg:"blocks_up"` - BlocksDown uint64 `protobuf:"varint,18,opt,name=blocks_down,json=blocksDown,proto3" json:"blocks_down,omitempty" pg:"blocks_down"` - OsType string `protobuf:"bytes,19,opt,name=os_type,json=osType,proto3" json:"os_type,omitempty" pg:"os_type"` - ArchType string `protobuf:"bytes,20,opt,name=arch_type,json=archType,proto3" json:"arch_type,omitempty" pg:"arch_type"` - CpuInfo string `protobuf:"bytes,21,opt,name=cpu_info,json=cpuInfo,proto3" json:"cpu_info,omitempty" pg:"cpu_info"` - PeersConnected uint64 `protobuf:"varint,23,opt,name=peers_connected,json=peersConnected,proto3" json:"peers_connected,omitempty" pg:"peers_connected"` - TimeCreated time.Time `protobuf:"bytes,24,opt,name=time_created,json=timeCreated,proto3,stdtime" json:"time_created" pg:"time_created"` - HVal string `protobuf:"bytes,25,opt,name=h_val,json=hVal,proto3" json:"h_val,omitempty" pg:"h_val"` - Node_Geo `protobuf:"bytes,26,opt,name=geo,proto3,embedded=geo" json:"geo" pg:"geo"` - Node_ExperimentalFlags `protobuf:"bytes,27,opt,name=flg,proto3,embedded=flg" json:"flg" pg:"flg"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Node) Reset() { *m = Node{} } -func (m *Node) String() string { return proto.CompactTextString(m) } -func (*Node) ProtoMessage() {} -func (*Node) Descriptor() ([]byte, []int) { - return fileDescriptor_35f8e1f5ec2240a2, []int{3} -} -func (m *Node) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Node.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Node) XXX_Merge(src proto.Message) { - xxx_messageInfo_Node.Merge(m, src) -} -func (m *Node) XXX_Size() int { - return m.Size() -} -func (m *Node) XXX_DiscardUnknown() { - xxx_messageInfo_Node.DiscardUnknown(m) -} - -var xxx_messageInfo_Node proto.InternalMessageInfo - -func (m *Node) GettableName() string { - if m != nil { - return m.tableName - } - return "" -} - -func (m *Node) GetNodeId() string { - if m != nil { - return m.NodeId - } - return "" -} - -func (m *Node) GetBtfsVersion() string { - if m != nil { - return m.BtfsVersion - } - return "" -} - -func (m *Node) GetUpTime() uint64 { - if m != nil { - return m.UpTime - } - return 0 -} - -func (m *Node) GetStorageUsed() uint64 { - if m != nil { - return m.StorageUsed - } - return 0 -} - -func (m *Node) GetStorageVolumeCap() uint64 { - if m != nil { - return m.StorageVolumeCap - } - return 0 -} - -func (m *Node) GetMemoryUsed() uint64 { - if m != nil { - return m.MemoryUsed - } - return 0 -} - -func (m *Node) GetCpuUsed() float64 { - if m != nil { - return m.CpuUsed - } - return 0 -} - -func (m *Node) GetUpload() uint64 { - if m != nil { - return m.Upload - } - return 0 -} - -func (m *Node) GetDownload() uint64 { - if m != nil { - return m.Download - } - return 0 -} - -func (m *Node) GetTotalUpload() uint64 { - if m != nil { - return m.TotalUpload - } - return 0 -} - -func (m *Node) GetTotalDownload() uint64 { - if m != nil { - return m.TotalDownload - } - return 0 -} - -func (m *Node) GetStoragePriceDeal() uint64 { - if m != nil { - return m.StoragePriceDeal - } - return 0 -} - -func (m *Node) GetBandwidthPriceDeal() uint64 { - if m != nil { - return m.BandwidthPriceDeal - } - return 0 -} - -func (m *Node) GetReputation() float64 { - if m != nil { - return m.Reputation - } - return 0 -} - -func (m *Node) GetBlocksUp() uint64 { - if m != nil { - return m.BlocksUp - } - return 0 -} - -func (m *Node) GetBlocksDown() uint64 { - if m != nil { - return m.BlocksDown - } - return 0 -} - -func (m *Node) GetOsType() string { - if m != nil { - return m.OsType - } - return "" -} - -func (m *Node) GetArchType() string { - if m != nil { - return m.ArchType - } - return "" -} - -func (m *Node) GetCpuInfo() string { - if m != nil { - return m.CpuInfo - } - return "" -} - -func (m *Node) GetPeersConnected() uint64 { - if m != nil { - return m.PeersConnected - } - return 0 -} - -func (m *Node) GetTimeCreated() time.Time { - if m != nil { - return m.TimeCreated - } - return time.Time{} -} - -func (m *Node) GetHVal() string { - if m != nil { - return m.HVal - } - return "" -} - -func (*Node) XXX_MessageName() string { - return "node.Node" -} - -type Node_Settings struct { - StoragePriceAsk uint64 `protobuf:"varint,1,opt,name=storage_price_ask,json=storagePriceAsk,proto3" json:"storage_price_ask,omitempty" pg:"storage_price_ask"` - BandwidthPriceAsk uint64 `protobuf:"varint,2,opt,name=bandwidth_price_ask,json=bandwidthPriceAsk,proto3" json:"bandwidth_price_ask,omitempty" pg:"bandwidth_price_ask"` - StorageTimeMin uint64 `protobuf:"varint,3,opt,name=storage_time_min,json=storageTimeMin,proto3" json:"storage_time_min,omitempty" pg:"storage_time_min"` - BandwidthLimit float64 `protobuf:"fixed64,4,opt,name=bandwidth_limit,json=bandwidthLimit,proto3" json:"bandwidth_limit,omitempty" pg:"bandwidth_limit"` - CollateralStake uint64 `protobuf:"varint,5,opt,name=collateral_stake,json=collateralStake,proto3" json:"collateral_stake,omitempty" pg:"collateral_stake"` - StoragePriceDefault uint64 `protobuf:"varint,6,opt,name=storage_price_default,json=storagePriceDefault,proto3" json:"storage_price_default,omitempty" pg:"storage_price_default"` - CustomizedPricing bool `protobuf:"varint,7,opt,name=customized_pricing,json=customizedPricing,proto3" json:"customized_pricing,omitempty" pg:"customized_pricing"` - Roles []NodeRole `protobuf:"varint,8,rep,packed,name=roles,proto3,enum=node.NodeRole" json:"roles,omitempty" pg:"roles,array"` - RepairPriceDefault uint64 `protobuf:"varint,9,opt,name=repair_price_default,json=repairPriceDefault,proto3" json:"repair_price_default,omitempty" pg:"repair_price_default"` - RepairPriceCustomized uint64 `protobuf:"varint,10,opt,name=repair_price_customized,json=repairPriceCustomized,proto3" json:"repair_price_customized,omitempty" pg:"repair_price_customized"` - RepairCustomizedPricing bool `protobuf:"varint,11,opt,name=repair_customized_pricing,json=repairCustomizedPricing,proto3" json:"repair_customized_pricing,omitempty" pg:"repair_customized_pricing"` - ChallengePriceDefault uint64 `protobuf:"varint,12,opt,name=challenge_price_default,json=challengePriceDefault,proto3" json:"challenge_price_default,omitempty" pg:"challenge_price_default"` - ChallengePriceCustomized uint64 `protobuf:"varint,13,opt,name=challenge_price_customized,json=challengePriceCustomized,proto3" json:"challenge_price_customized,omitempty" pg:"challenge_price_customized"` - ChallengeCustomizedPricing bool `protobuf:"varint,14,opt,name=challenge_customized_pricing,json=challengeCustomizedPricing,proto3" json:"challenge_customized_pricing,omitempty" pg:"challenge_customized_pricing"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Node_Settings) Reset() { *m = Node_Settings{} } -func (m *Node_Settings) String() string { return proto.CompactTextString(m) } -func (*Node_Settings) ProtoMessage() {} -func (*Node_Settings) Descriptor() ([]byte, []int) { - return fileDescriptor_35f8e1f5ec2240a2, []int{3, 0} -} -func (m *Node_Settings) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Node_Settings) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Node_Settings.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Node_Settings) XXX_Merge(src proto.Message) { - xxx_messageInfo_Node_Settings.Merge(m, src) -} -func (m *Node_Settings) XXX_Size() int { - return m.Size() -} -func (m *Node_Settings) XXX_DiscardUnknown() { - xxx_messageInfo_Node_Settings.DiscardUnknown(m) -} - -var xxx_messageInfo_Node_Settings proto.InternalMessageInfo - -func (m *Node_Settings) GetStoragePriceAsk() uint64 { - if m != nil { - return m.StoragePriceAsk - } - return 0 -} - -func (m *Node_Settings) GetBandwidthPriceAsk() uint64 { - if m != nil { - return m.BandwidthPriceAsk - } - return 0 -} - -func (m *Node_Settings) GetStorageTimeMin() uint64 { - if m != nil { - return m.StorageTimeMin - } - return 0 -} - -func (m *Node_Settings) GetBandwidthLimit() float64 { - if m != nil { - return m.BandwidthLimit - } - return 0 -} - -func (m *Node_Settings) GetCollateralStake() uint64 { - if m != nil { - return m.CollateralStake - } - return 0 -} - -func (m *Node_Settings) GetStoragePriceDefault() uint64 { - if m != nil { - return m.StoragePriceDefault - } - return 0 -} - -func (m *Node_Settings) GetCustomizedPricing() bool { - if m != nil { - return m.CustomizedPricing - } - return false -} - -func (m *Node_Settings) GetRoles() []NodeRole { - if m != nil { - return m.Roles - } - return nil -} - -func (m *Node_Settings) GetRepairPriceDefault() uint64 { - if m != nil { - return m.RepairPriceDefault - } - return 0 -} - -func (m *Node_Settings) GetRepairPriceCustomized() uint64 { - if m != nil { - return m.RepairPriceCustomized - } - return 0 -} - -func (m *Node_Settings) GetRepairCustomizedPricing() bool { - if m != nil { - return m.RepairCustomizedPricing - } - return false -} - -func (m *Node_Settings) GetChallengePriceDefault() uint64 { - if m != nil { - return m.ChallengePriceDefault - } - return 0 -} - -func (m *Node_Settings) GetChallengePriceCustomized() uint64 { - if m != nil { - return m.ChallengePriceCustomized - } - return 0 -} - -func (m *Node_Settings) GetChallengeCustomizedPricing() bool { - if m != nil { - return m.ChallengeCustomizedPricing - } - return false -} - -func (*Node_Settings) XXX_MessageName() string { - return "node.Node.Settings" -} - -type Node_Geo struct { - CountryShort string `protobuf:"bytes,1,opt,name=country_short,json=countryShort,proto3" json:"country_short,omitempty" pg:"country_short"` - Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty" pg:"region"` - Latitude float32 `protobuf:"fixed32,3,opt,name=latitude,proto3" json:"latitude,omitempty" pg:"latitude"` - Longitude float32 `protobuf:"fixed32,4,opt,name=longitude,proto3" json:"longitude,omitempty" pg:"longitude"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Node_Geo) Reset() { *m = Node_Geo{} } -func (m *Node_Geo) String() string { return proto.CompactTextString(m) } -func (*Node_Geo) ProtoMessage() {} -func (*Node_Geo) Descriptor() ([]byte, []int) { - return fileDescriptor_35f8e1f5ec2240a2, []int{3, 1} -} -func (m *Node_Geo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Node_Geo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Node_Geo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Node_Geo) XXX_Merge(src proto.Message) { - xxx_messageInfo_Node_Geo.Merge(m, src) -} -func (m *Node_Geo) XXX_Size() int { - return m.Size() -} -func (m *Node_Geo) XXX_DiscardUnknown() { - xxx_messageInfo_Node_Geo.DiscardUnknown(m) -} - -var xxx_messageInfo_Node_Geo proto.InternalMessageInfo - -func (m *Node_Geo) GetCountryShort() string { - if m != nil { - return m.CountryShort - } - return "" -} - -func (m *Node_Geo) GetRegion() string { - if m != nil { - return m.Region - } - return "" -} - -func (m *Node_Geo) GetLatitude() float32 { - if m != nil { - return m.Latitude - } - return 0 -} - -func (m *Node_Geo) GetLongitude() float32 { - if m != nil { - return m.Longitude - } - return 0 -} - -func (*Node_Geo) XXX_MessageName() string { - return "node.Node.Geo" -} - -type Node_ExperimentalFlags struct { - Analytics bool `protobuf:"varint,1,opt,name=analytics,proto3" json:"analytics,omitempty" pg:"analytics"` - FilestoreEnabled bool `protobuf:"varint,2,opt,name=filestore_enabled,json=filestoreEnabled,proto3" json:"filestore_enabled,omitempty" pg:"filestore_enabled"` - HostsSyncEnabled bool `protobuf:"varint,3,opt,name=hosts_sync_enabled,json=hostsSyncEnabled,proto3" json:"hosts_sync_enabled,omitempty" pg:"hosts_sync_enabled"` - HostsSyncMode string `protobuf:"bytes,4,opt,name=hosts_sync_mode,json=hostsSyncMode,proto3" json:"hosts_sync_mode,omitempty" pg:"hosts_sync_mode"` - Libp2PStreamMounting bool `protobuf:"varint,5,opt,name=libp2p_stream_mounting,json=libp2pStreamMounting,proto3" json:"libp2p_stream_mounting,omitempty" pg:"libp2p_stream_mounting"` - P2PHttpProxy bool `protobuf:"varint,6,opt,name=p2p_http_proxy,json=p2pHttpProxy,proto3" json:"p2p_http_proxy,omitempty" pg:"p2p_http_proxy"` - PreferTls bool `protobuf:"varint,7,opt,name=prefer_tls,json=preferTls,proto3" json:"prefer_tls,omitempty" pg:"prefer_tls"` - Quic bool `protobuf:"varint,8,opt,name=quic,proto3" json:"quic,omitempty" pg:"quic"` - RemoveOnUnpin bool `protobuf:"varint,9,opt,name=remove_on_unpin,json=removeOnUnpin,proto3" json:"remove_on_unpin,omitempty" pg:"remove_on_unpin"` - ShardingEnabled bool `protobuf:"varint,10,opt,name=sharding_enabled,json=shardingEnabled,proto3" json:"sharding_enabled,omitempty" pg:"sharding_enabled"` - StorageClientEnabled bool `protobuf:"varint,11,opt,name=storage_client_enabled,json=storageClientEnabled,proto3" json:"storage_client_enabled,omitempty" pg:"storage_client_enabled"` - StorageHostEnabled bool `protobuf:"varint,12,opt,name=storage_host_enabled,json=storageHostEnabled,proto3" json:"storage_host_enabled,omitempty" pg:"storage_host_enabled"` - StrategicProviding bool `protobuf:"varint,13,opt,name=strategic_providing,json=strategicProviding,proto3" json:"strategic_providing,omitempty" pg:"strategic_providing"` - UrlStoreEnabled bool `protobuf:"varint,14,opt,name=url_store_enabled,json=urlStoreEnabled,proto3" json:"url_store_enabled,omitempty" pg:"url_store_enabled"` - DisableAutoUpdate bool `protobuf:"varint,15,opt,name=disable_auto_update,json=disableAutoUpdate,proto3" json:"disable_auto_update,omitempty" pg:"disable_auto_update"` - GraphsyncEnabled bool `protobuf:"varint,16,opt,name=graphsync_enabled,json=graphsyncEnabled,proto3" json:"graphsync_enabled,omitempty" pg:"graphsync_enabled"` - RepairHostEnabled bool `protobuf:"varint,17,opt,name=repair_host_enabled,json=repairHostEnabled,proto3" json:"repair_host_enabled,omitempty" pg:"repair_host_enabled"` - ChallengeHostEnabled bool `protobuf:"varint,18,opt,name=challenge_host_enabled,json=challengeHostEnabled,proto3" json:"challenge_host_enabled,omitempty" pg:"challenge_host_enabled"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Node_ExperimentalFlags) Reset() { *m = Node_ExperimentalFlags{} } -func (m *Node_ExperimentalFlags) String() string { return proto.CompactTextString(m) } -func (*Node_ExperimentalFlags) ProtoMessage() {} -func (*Node_ExperimentalFlags) Descriptor() ([]byte, []int) { - return fileDescriptor_35f8e1f5ec2240a2, []int{3, 2} -} -func (m *Node_ExperimentalFlags) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Node_ExperimentalFlags) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Node_ExperimentalFlags.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Node_ExperimentalFlags) XXX_Merge(src proto.Message) { - xxx_messageInfo_Node_ExperimentalFlags.Merge(m, src) -} -func (m *Node_ExperimentalFlags) XXX_Size() int { - return m.Size() -} -func (m *Node_ExperimentalFlags) XXX_DiscardUnknown() { - xxx_messageInfo_Node_ExperimentalFlags.DiscardUnknown(m) -} - -var xxx_messageInfo_Node_ExperimentalFlags proto.InternalMessageInfo - -func (m *Node_ExperimentalFlags) GetAnalytics() bool { - if m != nil { - return m.Analytics - } - return false -} - -func (m *Node_ExperimentalFlags) GetFilestoreEnabled() bool { - if m != nil { - return m.FilestoreEnabled - } - return false -} - -func (m *Node_ExperimentalFlags) GetHostsSyncEnabled() bool { - if m != nil { - return m.HostsSyncEnabled - } - return false -} - -func (m *Node_ExperimentalFlags) GetHostsSyncMode() string { - if m != nil { - return m.HostsSyncMode - } - return "" -} - -func (m *Node_ExperimentalFlags) GetLibp2PStreamMounting() bool { - if m != nil { - return m.Libp2PStreamMounting - } - return false -} - -func (m *Node_ExperimentalFlags) GetP2PHttpProxy() bool { - if m != nil { - return m.P2PHttpProxy - } - return false -} - -func (m *Node_ExperimentalFlags) GetPreferTls() bool { - if m != nil { - return m.PreferTls - } - return false -} - -func (m *Node_ExperimentalFlags) GetQuic() bool { - if m != nil { - return m.Quic - } - return false -} - -func (m *Node_ExperimentalFlags) GetRemoveOnUnpin() bool { - if m != nil { - return m.RemoveOnUnpin - } - return false -} - -func (m *Node_ExperimentalFlags) GetShardingEnabled() bool { - if m != nil { - return m.ShardingEnabled - } - return false -} - -func (m *Node_ExperimentalFlags) GetStorageClientEnabled() bool { - if m != nil { - return m.StorageClientEnabled - } - return false -} - -func (m *Node_ExperimentalFlags) GetStorageHostEnabled() bool { - if m != nil { - return m.StorageHostEnabled - } - return false -} - -func (m *Node_ExperimentalFlags) GetStrategicProviding() bool { - if m != nil { - return m.StrategicProviding - } - return false -} - -func (m *Node_ExperimentalFlags) GetUrlStoreEnabled() bool { - if m != nil { - return m.UrlStoreEnabled - } - return false -} - -func (m *Node_ExperimentalFlags) GetDisableAutoUpdate() bool { - if m != nil { - return m.DisableAutoUpdate - } - return false -} - -func (m *Node_ExperimentalFlags) GetGraphsyncEnabled() bool { - if m != nil { - return m.GraphsyncEnabled - } - return false -} - -func (m *Node_ExperimentalFlags) GetRepairHostEnabled() bool { - if m != nil { - return m.RepairHostEnabled - } - return false -} - -func (m *Node_ExperimentalFlags) GetChallengeHostEnabled() bool { - if m != nil { - return m.ChallengeHostEnabled - } - return false -} - -func (*Node_ExperimentalFlags) XXX_MessageName() string { - return "node.Node.ExperimentalFlags" -} - -type NodeContractStat struct { - tableName string `pg:"all_miners,alias:t,discard_unknown_columns"` - NodeId string `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty" pg:"node_id"` - BigMiner bool `protobuf:"varint,3,opt,name=big_miner,json=bigMiner,proto3" json:"big_miner,omitempty" pg:"big_miner"` - LastModifyTime time.Time `protobuf:"bytes,4,opt,name=last_modify_time,json=lastModifyTime,proto3,stdtime" json:"last_modify_time" pg:"last_modify_time"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *NodeContractStat) Reset() { *m = NodeContractStat{} } -func (m *NodeContractStat) String() string { return proto.CompactTextString(m) } -func (*NodeContractStat) ProtoMessage() {} -func (*NodeContractStat) Descriptor() ([]byte, []int) { - return fileDescriptor_35f8e1f5ec2240a2, []int{4} -} -func (m *NodeContractStat) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeContractStat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NodeContractStat.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *NodeContractStat) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeContractStat.Merge(m, src) -} -func (m *NodeContractStat) XXX_Size() int { - return m.Size() -} -func (m *NodeContractStat) XXX_DiscardUnknown() { - xxx_messageInfo_NodeContractStat.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeContractStat proto.InternalMessageInfo - -func (m *NodeContractStat) GettableName() string { - if m != nil { - return m.tableName - } - return "" -} - -func (m *NodeContractStat) GetNodeId() string { - if m != nil { - return m.NodeId - } - return "" -} - -func (m *NodeContractStat) GetBigMiner() bool { - if m != nil { - return m.BigMiner - } - return false -} - -func (m *NodeContractStat) GetLastModifyTime() time.Time { - if m != nil { - return m.LastModifyTime - } - return time.Time{} -} - -func (*NodeContractStat) XXX_MessageName() string { - return "node.NodeContractStat" -} - -type StorageStat struct { - HostStats StorageStat_Host `protobuf:"bytes,1,opt,name=host_stats,json=hostStats,proto3" json:"host_stats" pg:"host_stats"` - RenterStats StorageStat_Renter `protobuf:"bytes,2,opt,name=renter_stats,json=renterStats,proto3" json:"renter_stats" pg:"renter_stats"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *StorageStat) Reset() { *m = StorageStat{} } -func (m *StorageStat) String() string { return proto.CompactTextString(m) } -func (*StorageStat) ProtoMessage() {} -func (*StorageStat) Descriptor() ([]byte, []int) { - return fileDescriptor_35f8e1f5ec2240a2, []int{5} -} -func (m *StorageStat) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StorageStat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StorageStat.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *StorageStat) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageStat.Merge(m, src) -} -func (m *StorageStat) XXX_Size() int { - return m.Size() -} -func (m *StorageStat) XXX_DiscardUnknown() { - xxx_messageInfo_StorageStat.DiscardUnknown(m) -} - -var xxx_messageInfo_StorageStat proto.InternalMessageInfo - -func (m *StorageStat) GetHostStats() StorageStat_Host { - if m != nil { - return m.HostStats - } - return StorageStat_Host{} -} - -func (m *StorageStat) GetRenterStats() StorageStat_Renter { - if m != nil { - return m.RenterStats - } - return StorageStat_Renter{} -} - -func (*StorageStat) XXX_MessageName() string { - return "node.StorageStat" -} - -type StorageStat_HostStats struct { - Uptime float32 `protobuf:"fixed32,1,opt,name=uptime,proto3" json:"uptime" pg:"uptime"` - Score float32 `protobuf:"fixed32,2,opt,name=score,proto3" json:"score" pg:"score"` - UptimeScore float32 `protobuf:"fixed32,3,opt,name=uptime_score,json=uptimeScore,proto3" json:"uptime_score" pg:"uptime_score"` - AgeScore float32 `protobuf:"fixed32,4,opt,name=age_score,json=ageScore,proto3" json:"age_score" pg:"age_score"` - VersionScore float32 `protobuf:"fixed32,5,opt,name=version_score,json=versionScore,proto3" json:"version_score" pg:"version_score"` - SpeedScore float32 `protobuf:"fixed32,6,opt,name=speed_score,json=speedScore,proto3" json:"speed_score" pg:"speed_score"` - UploadSpeedScore float32 `protobuf:"fixed32,7,opt,name=upload_speed_score,json=uploadSpeedScore,proto3" json:"upload_speed_score" pg:"upload_speed_score"` - DownloadSpeedScore float32 `protobuf:"fixed32,8,opt,name=download_speed_score,json=downloadSpeedScore,proto3" json:"download_speed_score" pg:"download_speed_score"` - UptimeWeight float32 `protobuf:"fixed32,9,opt,name=uptime_weight,json=uptimeWeight,proto3" json:"uptime_weight" pg:"uptime_weight"` - AgeWeight float32 `protobuf:"fixed32,10,opt,name=age_weight,json=ageWeight,proto3" json:"age_weight" pg:"age_weight"` - VersionWeight float32 `protobuf:"fixed32,11,opt,name=version_weight,json=versionWeight,proto3" json:"version_weight" pg:"version_weight"` - SpeedWeight float32 `protobuf:"fixed32,12,opt,name=speed_weight,json=speedWeight,proto3" json:"speed_weight" pg:"speed_weight"` - UploadSpeedWeight float32 `protobuf:"fixed32,13,opt,name=upload_speed_weight,json=uploadSpeedWeight,proto3" json:"upload_speed_weight" pg:"upload_speed_weight"` - DownloadSpeedWeight float32 `protobuf:"fixed32,14,opt,name=download_speed_weight,json=downloadSpeedWeight,proto3" json:"download_speed_weight" pg:"download_speed_weight"` - LastUpdated time.Time `protobuf:"bytes,15,opt,name=last_updated,json=lastUpdated,proto3,stdtime" json:"last_updated" pg:"last_updated"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *StorageStat_HostStats) Reset() { *m = StorageStat_HostStats{} } -func (m *StorageStat_HostStats) String() string { return proto.CompactTextString(m) } -func (*StorageStat_HostStats) ProtoMessage() {} -func (*StorageStat_HostStats) Descriptor() ([]byte, []int) { - return fileDescriptor_35f8e1f5ec2240a2, []int{5, 0} -} -func (m *StorageStat_HostStats) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StorageStat_HostStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StorageStat_HostStats.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *StorageStat_HostStats) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageStat_HostStats.Merge(m, src) -} -func (m *StorageStat_HostStats) XXX_Size() int { - return m.Size() -} -func (m *StorageStat_HostStats) XXX_DiscardUnknown() { - xxx_messageInfo_StorageStat_HostStats.DiscardUnknown(m) -} - -var xxx_messageInfo_StorageStat_HostStats proto.InternalMessageInfo - -func (m *StorageStat_HostStats) GetUptime() float32 { - if m != nil { - return m.Uptime - } - return 0 -} - -func (m *StorageStat_HostStats) GetScore() float32 { - if m != nil { - return m.Score - } - return 0 -} - -func (m *StorageStat_HostStats) GetUptimeScore() float32 { - if m != nil { - return m.UptimeScore - } - return 0 -} - -func (m *StorageStat_HostStats) GetAgeScore() float32 { - if m != nil { - return m.AgeScore - } - return 0 -} - -func (m *StorageStat_HostStats) GetVersionScore() float32 { - if m != nil { - return m.VersionScore - } - return 0 -} - -func (m *StorageStat_HostStats) GetSpeedScore() float32 { - if m != nil { - return m.SpeedScore - } - return 0 -} - -func (m *StorageStat_HostStats) GetUploadSpeedScore() float32 { - if m != nil { - return m.UploadSpeedScore - } - return 0 -} - -func (m *StorageStat_HostStats) GetDownloadSpeedScore() float32 { - if m != nil { - return m.DownloadSpeedScore - } - return 0 -} - -func (m *StorageStat_HostStats) GetUptimeWeight() float32 { - if m != nil { - return m.UptimeWeight - } - return 0 -} - -func (m *StorageStat_HostStats) GetAgeWeight() float32 { - if m != nil { - return m.AgeWeight - } - return 0 -} - -func (m *StorageStat_HostStats) GetVersionWeight() float32 { - if m != nil { - return m.VersionWeight - } - return 0 -} - -func (m *StorageStat_HostStats) GetSpeedWeight() float32 { - if m != nil { - return m.SpeedWeight - } - return 0 -} - -func (m *StorageStat_HostStats) GetUploadSpeedWeight() float32 { - if m != nil { - return m.UploadSpeedWeight - } - return 0 -} - -func (m *StorageStat_HostStats) GetDownloadSpeedWeight() float32 { - if m != nil { - return m.DownloadSpeedWeight - } - return 0 -} - -func (m *StorageStat_HostStats) GetLastUpdated() time.Time { - if m != nil { - return m.LastUpdated - } - return time.Time{} -} - -func (*StorageStat_HostStats) XXX_MessageName() string { - return "node.StorageStat.HostStats" -} - -type StorageStat_Host struct { - Online bool `protobuf:"varint,1,opt,name=online,proto3" json:"online" pg:"online"` - StorageUsed int64 `protobuf:"varint,2,opt,name=storage_used,json=storageUsed,proto3" json:"storage_used" pg:"storage_used"` - StorageCap int64 `protobuf:"varint,3,opt,name=storage_cap,json=storageCap,proto3" json:"storage_cap" pg:"storage_cap"` - StorageDiskTotal int64 `protobuf:"varint,4,opt,name=storage_disk_total,json=storageDiskTotal,proto3" json:"storage_disk_total" pg:"storage_disk_total"` - StorageDiskAvailable int64 `protobuf:"varint,5,opt,name=storage_disk_available,json=storageDiskAvailable,proto3" json:"storage_disk_available" pg:"storage_disk_available"` - StorageStat_HostStats `protobuf:"bytes,6,opt,name=stats,proto3,embedded=stats" json:"" pg:""` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *StorageStat_Host) Reset() { *m = StorageStat_Host{} } -func (m *StorageStat_Host) String() string { return proto.CompactTextString(m) } -func (*StorageStat_Host) ProtoMessage() {} -func (*StorageStat_Host) Descriptor() ([]byte, []int) { - return fileDescriptor_35f8e1f5ec2240a2, []int{5, 1} -} -func (m *StorageStat_Host) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StorageStat_Host) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StorageStat_Host.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *StorageStat_Host) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageStat_Host.Merge(m, src) -} -func (m *StorageStat_Host) XXX_Size() int { - return m.Size() -} -func (m *StorageStat_Host) XXX_DiscardUnknown() { - xxx_messageInfo_StorageStat_Host.DiscardUnknown(m) -} - -var xxx_messageInfo_StorageStat_Host proto.InternalMessageInfo - -func (m *StorageStat_Host) GetOnline() bool { - if m != nil { - return m.Online - } - return false -} - -func (m *StorageStat_Host) GetStorageUsed() int64 { - if m != nil { - return m.StorageUsed - } - return 0 -} - -func (m *StorageStat_Host) GetStorageCap() int64 { - if m != nil { - return m.StorageCap - } - return 0 -} - -func (m *StorageStat_Host) GetStorageDiskTotal() int64 { - if m != nil { - return m.StorageDiskTotal - } - return 0 -} - -func (m *StorageStat_Host) GetStorageDiskAvailable() int64 { - if m != nil { - return m.StorageDiskAvailable - } - return 0 -} - -func (*StorageStat_Host) XXX_MessageName() string { - return "node.StorageStat.Host" -} - -type StorageStat_Renter struct { - Reserved string `protobuf:"bytes,1,opt,name=reserved,proto3" json:"reserved" pg:"reserved"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *StorageStat_Renter) Reset() { *m = StorageStat_Renter{} } -func (m *StorageStat_Renter) String() string { return proto.CompactTextString(m) } -func (*StorageStat_Renter) ProtoMessage() {} -func (*StorageStat_Renter) Descriptor() ([]byte, []int) { - return fileDescriptor_35f8e1f5ec2240a2, []int{5, 2} -} -func (m *StorageStat_Renter) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StorageStat_Renter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StorageStat_Renter.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *StorageStat_Renter) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageStat_Renter.Merge(m, src) -} -func (m *StorageStat_Renter) XXX_Size() int { - return m.Size() -} -func (m *StorageStat_Renter) XXX_DiscardUnknown() { - xxx_messageInfo_StorageStat_Renter.DiscardUnknown(m) -} - -var xxx_messageInfo_StorageStat_Renter proto.InternalMessageInfo - -func (m *StorageStat_Renter) GetReserved() string { - if m != nil { - return m.Reserved - } - return "" -} - -func (*StorageStat_Renter) XXX_MessageName() string { - return "node.StorageStat.Renter" -} - -type ContractStat struct { - ActiveContractNum int64 `protobuf:"varint,1,opt,name=active_contract_num,json=activeContractNum,proto3" json:"active_contract_num" pg:"active_contract_num"` - CompensationPaid int64 `protobuf:"varint,2,opt,name=compensation_paid,json=compensationPaid,proto3" json:"compensation_paid" pg:"compensation_paid"` - CompensationOutstanding int64 `protobuf:"varint,3,opt,name=compensation_outstanding,json=compensationOutstanding,proto3" json:"compensation_outstanding" pg:"compensation_outstanding"` - FirstContractStart time.Time `protobuf:"bytes,4,opt,name=first_contract_start,json=firstContractStart,proto3,stdtime" json:"first_contract_start" pg:"first_contract_start"` - LastContractEnd time.Time `protobuf:"bytes,5,opt,name=last_contract_end,json=lastContractEnd,proto3,stdtime" json:"last_contract_end" pg:"last_contract_end"` - Role ContractStat_Role `protobuf:"varint,6,opt,name=role,proto3,enum=node.ContractStat_Role" json:"role" pg:"role"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ContractStat) Reset() { *m = ContractStat{} } -func (m *ContractStat) String() string { return proto.CompactTextString(m) } -func (*ContractStat) ProtoMessage() {} -func (*ContractStat) Descriptor() ([]byte, []int) { - return fileDescriptor_35f8e1f5ec2240a2, []int{6} -} -func (m *ContractStat) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContractStat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ContractStat.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ContractStat) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContractStat.Merge(m, src) -} -func (m *ContractStat) XXX_Size() int { - return m.Size() -} -func (m *ContractStat) XXX_DiscardUnknown() { - xxx_messageInfo_ContractStat.DiscardUnknown(m) -} - -var xxx_messageInfo_ContractStat proto.InternalMessageInfo - -func (m *ContractStat) GetActiveContractNum() int64 { - if m != nil { - return m.ActiveContractNum - } - return 0 -} - -func (m *ContractStat) GetCompensationPaid() int64 { - if m != nil { - return m.CompensationPaid - } - return 0 -} - -func (m *ContractStat) GetCompensationOutstanding() int64 { - if m != nil { - return m.CompensationOutstanding - } - return 0 -} - -func (m *ContractStat) GetFirstContractStart() time.Time { - if m != nil { - return m.FirstContractStart - } - return time.Time{} -} - -func (m *ContractStat) GetLastContractEnd() time.Time { - if m != nil { - return m.LastContractEnd - } - return time.Time{} -} - -func (m *ContractStat) GetRole() ContractStat_Role { - if m != nil { - return m.Role - } - return ContractStat_HOST -} - -func (*ContractStat) XXX_MessageName() string { - return "node.ContractStat" -} - -type Contracts struct { - Contracts []*Contracts_Contract `protobuf:"bytes,1,rep,name=contracts,proto3" json:"contracts" pg:"contracts"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Contracts) Reset() { *m = Contracts{} } -func (m *Contracts) String() string { return proto.CompactTextString(m) } -func (*Contracts) ProtoMessage() {} -func (*Contracts) Descriptor() ([]byte, []int) { - return fileDescriptor_35f8e1f5ec2240a2, []int{7} -} -func (m *Contracts) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Contracts) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Contracts.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Contracts) XXX_Merge(src proto.Message) { - xxx_messageInfo_Contracts.Merge(m, src) -} -func (m *Contracts) XXX_Size() int { - return m.Size() -} -func (m *Contracts) XXX_DiscardUnknown() { - xxx_messageInfo_Contracts.DiscardUnknown(m) -} - -var xxx_messageInfo_Contracts proto.InternalMessageInfo - -func (m *Contracts) GetContracts() []*Contracts_Contract { - if m != nil { - return m.Contracts - } - return nil -} - -func (*Contracts) XXX_MessageName() string { - return "node.Contracts" -} - -type Contracts_Contract struct { - ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id" pg:"contract_id"` - HostId string `protobuf:"bytes,2,opt,name=host_id,json=hostId,proto3" json:"host_id" pg:"host_id"` - RenterId string `protobuf:"bytes,3,opt,name=renter_id,json=renterId,proto3" json:"renter_id" pg:"renter_id"` - Status guard.Contract_ContractState `protobuf:"varint,4,opt,name=status,proto3,enum=guard.Contract_ContractState" json:"status" pg:"status"` - StartTime time.Time `protobuf:"bytes,5,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time" pg:"start_time"` - EndTime time.Time `protobuf:"bytes,6,opt,name=end_time,json=endTime,proto3,stdtime" json:"end_time" pg:"end_time"` - NextEscrowTime time.Time `protobuf:"bytes,7,opt,name=next_escrow_time,json=nextEscrowTime,proto3,stdtime" json:"next_escrow_time" pg:"next_escrow_time"` - CompensationPaid int64 `protobuf:"varint,8,opt,name=compensation_paid,json=compensationPaid,proto3" json:"compensation_paid" pg:"compensation_paid"` - CompensationOutstanding int64 `protobuf:"varint,9,opt,name=compensation_outstanding,json=compensationOutstanding,proto3" json:"compensation_outstanding" pg:"compensation_outstanding"` - UnitPrice int64 `protobuf:"varint,10,opt,name=unit_price,json=unitPrice,proto3" json:"unit_price" pg:"unit_price"` - ShardSize int64 `protobuf:"varint,11,opt,name=shard_size,json=shardSize,proto3" json:"shard_size" pg:"shard_size"` - ShardHash string `protobuf:"bytes,12,opt,name=shard_hash,json=shardHash,proto3" json:"shard_hash" pg:"shard_hash"` - FileHash string `protobuf:"bytes,13,opt,name=file_hash,json=fileHash,proto3" json:"file_hash" pg:"file_hash"` - LastModifyTime time.Time `protobuf:"bytes,14,opt,name=last_modify_time,json=lastModifyTime,proto3,stdtime" json:"last_modify_time" pg:"last_modify_time"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Contracts_Contract) Reset() { *m = Contracts_Contract{} } -func (m *Contracts_Contract) String() string { return proto.CompactTextString(m) } -func (*Contracts_Contract) ProtoMessage() {} -func (*Contracts_Contract) Descriptor() ([]byte, []int) { - return fileDescriptor_35f8e1f5ec2240a2, []int{7, 0} -} -func (m *Contracts_Contract) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Contracts_Contract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Contracts_Contract.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Contracts_Contract) XXX_Merge(src proto.Message) { - xxx_messageInfo_Contracts_Contract.Merge(m, src) -} -func (m *Contracts_Contract) XXX_Size() int { - return m.Size() -} -func (m *Contracts_Contract) XXX_DiscardUnknown() { - xxx_messageInfo_Contracts_Contract.DiscardUnknown(m) -} - -var xxx_messageInfo_Contracts_Contract proto.InternalMessageInfo - -func (m *Contracts_Contract) GetContractId() string { - if m != nil { - return m.ContractId - } - return "" -} - -func (m *Contracts_Contract) GetHostId() string { - if m != nil { - return m.HostId - } - return "" -} - -func (m *Contracts_Contract) GetRenterId() string { - if m != nil { - return m.RenterId - } - return "" -} - -func (m *Contracts_Contract) GetStatus() guard.Contract_ContractState { - if m != nil { - return m.Status - } - return guard.Contract_DRAFT -} - -func (m *Contracts_Contract) GetStartTime() time.Time { - if m != nil { - return m.StartTime - } - return time.Time{} -} - -func (m *Contracts_Contract) GetEndTime() time.Time { - if m != nil { - return m.EndTime - } - return time.Time{} -} - -func (m *Contracts_Contract) GetNextEscrowTime() time.Time { - if m != nil { - return m.NextEscrowTime - } - return time.Time{} -} - -func (m *Contracts_Contract) GetCompensationPaid() int64 { - if m != nil { - return m.CompensationPaid - } - return 0 -} - -func (m *Contracts_Contract) GetCompensationOutstanding() int64 { - if m != nil { - return m.CompensationOutstanding - } - return 0 -} - -func (m *Contracts_Contract) GetUnitPrice() int64 { - if m != nil { - return m.UnitPrice - } - return 0 -} - -func (m *Contracts_Contract) GetShardSize() int64 { - if m != nil { - return m.ShardSize - } - return 0 -} - -func (m *Contracts_Contract) GetShardHash() string { - if m != nil { - return m.ShardHash - } - return "" -} - -func (m *Contracts_Contract) GetFileHash() string { - if m != nil { - return m.FileHash - } - return "" -} - -func (m *Contracts_Contract) GetLastModifyTime() time.Time { - if m != nil { - return m.LastModifyTime - } - return time.Time{} -} - -func (*Contracts_Contract) XXX_MessageName() string { - return "node.Contracts.Contract" -} - -type BtfsScanTab struct { - tableName string `pg:"btfs_scan,alias:t,discard_unknown_columns"` - StorageVolumeLeft float64 `protobuf:"fixed64,2,opt,name=storage_volume_left,json=storageVolumeLeft,proto3" json:"storage_volume_left,omitempty" pg:"storage_volume_left"` - OnlineMinersNumber uint32 `protobuf:"varint,3,opt,name=online_miners_number,json=onlineMinersNumber,proto3" json:"online_miners_number,omitempty" pg:"online_miners_number"` - CountryDistribute map[string]int32 `protobuf:"bytes,4,rep,name=country_distribute,json=countryDistribute,proto3" json:"country_distribute,omitempty" pg:"country_distribute" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - ScoreDistribute map[string]int32 `protobuf:"bytes,5,rep,name=score_distribute,json=scoreDistribute,proto3" json:"score_distribute,omitempty" pg:"score_distribute" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - TimeCreated time.Time `protobuf:"bytes,6,opt,name=time_created,json=timeCreated,proto3,stdtime" json:"time_created" pg:"time_created"` - StorageAlreadyUsed float64 `protobuf:"fixed64,7,opt,name=storage_already_used,json=storageAlreadyUsed,proto3" json:"storage_already_used,omitempty" pg:"storage_already_used"` - Price float64 `protobuf:"fixed64,8,opt,name=price,proto3" json:"price,omitempty" pg:"price"` - DateCreated time.Time `protobuf:"bytes,9,opt,name=date_created,json=dateCreated,proto3,stdtime" json:"date_created" pg:"date_created"` - NewRank string `protobuf:"bytes,10,opt,name=new_rank,json=newRank,proto3" json:"new_rank,omitempty" pg:"new_rank"` - TotalRank string `protobuf:"bytes,11,opt,name=total_rank,json=totalRank,proto3" json:"total_rank,omitempty" pg:"total_rank"` - ContractAllCount uint32 `protobuf:"varint,12,opt,name=contract_all_count,json=contractAllCount,proto3" json:"contract_all_count,omitempty" pg:"contract_all_count"` - ContractFailCount uint32 `protobuf:"varint,13,opt,name=contract_fail_count,json=contractFailCount,proto3" json:"contract_fail_count,omitempty" pg:"contract_fail_count"` - ContractAllStorage float64 `protobuf:"fixed64,14,opt,name=contract_all_storage,json=contractAllStorage,proto3" json:"contract_all_storage,omitempty" pg:"contract_all_storage"` - ContractFailStorage float64 `protobuf:"fixed64,15,opt,name=contract_fail_storage,json=contractFailStorage,proto3" json:"contract_fail_storage,omitempty" pg:"contract_fail_storage"` - StorageLeftWhenContract float64 `protobuf:"fixed64,16,opt,name=storage_left_when_contract,json=storageLeftWhenContract,proto3" json:"storage_left_when_contract,omitempty" pg:"storage_left_when_contract"` - SuperOnlineMinersCount uint32 `protobuf:"varint,17,opt,name=super_online_miners_count,json=superOnlineMinersCount,proto3" json:"super_online_miners_count,omitempty" pg:"super_online_miners_count"` - NewOnlineMinersCount uint32 `protobuf:"varint,18,opt,name=new_online_miners_count,json=newOnlineMinersCount,proto3" json:"new_online_miners_count,omitempty" pg:"new_online_miners_count"` - MinersAllAmount int64 `protobuf:"varint,19,opt,name=miners_all_amount,json=minersAllAmount,proto3" json:"miners_all_amount,omitempty" pg:"miners_all_amount"` - TotalMiners int64 `protobuf:"varint,20,opt,name=total_miners,json=totalMiners,proto3" json:"total_miners,omitempty" pg:"total_miners"` - BigMiners int64 `protobuf:"varint,21,opt,name=big_miners,json=bigMiners,proto3" json:"big_miners,omitempty" pg:"big_miners"` - VersionDistribute map[string]int32 `protobuf:"bytes,22,rep,name=version_distribute,json=versionDistribute,proto3" json:"version_distribute,omitempty" pg:"version_distribute" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *BtfsScanTab) Reset() { *m = BtfsScanTab{} } -func (m *BtfsScanTab) String() string { return proto.CompactTextString(m) } -func (*BtfsScanTab) ProtoMessage() {} -func (*BtfsScanTab) Descriptor() ([]byte, []int) { - return fileDescriptor_35f8e1f5ec2240a2, []int{8} -} -func (m *BtfsScanTab) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BtfsScanTab) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BtfsScanTab.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BtfsScanTab) XXX_Merge(src proto.Message) { - xxx_messageInfo_BtfsScanTab.Merge(m, src) -} -func (m *BtfsScanTab) XXX_Size() int { - return m.Size() -} -func (m *BtfsScanTab) XXX_DiscardUnknown() { - xxx_messageInfo_BtfsScanTab.DiscardUnknown(m) -} - -var xxx_messageInfo_BtfsScanTab proto.InternalMessageInfo - -func (m *BtfsScanTab) GettableName() string { - if m != nil { - return m.tableName - } - return "" -} - -func (m *BtfsScanTab) GetStorageVolumeLeft() float64 { - if m != nil { - return m.StorageVolumeLeft - } - return 0 -} - -func (m *BtfsScanTab) GetOnlineMinersNumber() uint32 { - if m != nil { - return m.OnlineMinersNumber - } - return 0 -} - -func (m *BtfsScanTab) GetCountryDistribute() map[string]int32 { - if m != nil { - return m.CountryDistribute - } - return nil -} - -func (m *BtfsScanTab) GetScoreDistribute() map[string]int32 { - if m != nil { - return m.ScoreDistribute - } - return nil -} - -func (m *BtfsScanTab) GetTimeCreated() time.Time { - if m != nil { - return m.TimeCreated - } - return time.Time{} -} - -func (m *BtfsScanTab) GetStorageAlreadyUsed() float64 { - if m != nil { - return m.StorageAlreadyUsed - } - return 0 -} - -func (m *BtfsScanTab) GetPrice() float64 { - if m != nil { - return m.Price - } - return 0 -} - -func (m *BtfsScanTab) GetDateCreated() time.Time { - if m != nil { - return m.DateCreated - } - return time.Time{} -} - -func (m *BtfsScanTab) GetNewRank() string { - if m != nil { - return m.NewRank - } - return "" -} - -func (m *BtfsScanTab) GetTotalRank() string { - if m != nil { - return m.TotalRank - } - return "" -} - -func (m *BtfsScanTab) GetContractAllCount() uint32 { - if m != nil { - return m.ContractAllCount - } - return 0 -} - -func (m *BtfsScanTab) GetContractFailCount() uint32 { - if m != nil { - return m.ContractFailCount - } - return 0 -} - -func (m *BtfsScanTab) GetContractAllStorage() float64 { - if m != nil { - return m.ContractAllStorage - } - return 0 -} - -func (m *BtfsScanTab) GetContractFailStorage() float64 { - if m != nil { - return m.ContractFailStorage - } - return 0 -} - -func (m *BtfsScanTab) GetStorageLeftWhenContract() float64 { - if m != nil { - return m.StorageLeftWhenContract - } - return 0 -} - -func (m *BtfsScanTab) GetSuperOnlineMinersCount() uint32 { - if m != nil { - return m.SuperOnlineMinersCount - } - return 0 -} - -func (m *BtfsScanTab) GetNewOnlineMinersCount() uint32 { - if m != nil { - return m.NewOnlineMinersCount - } - return 0 -} - -func (m *BtfsScanTab) GetMinersAllAmount() int64 { - if m != nil { - return m.MinersAllAmount - } - return 0 -} - -func (m *BtfsScanTab) GetTotalMiners() int64 { - if m != nil { - return m.TotalMiners - } - return 0 -} - -func (m *BtfsScanTab) GetBigMiners() int64 { - if m != nil { - return m.BigMiners - } - return 0 -} - -func (m *BtfsScanTab) GetVersionDistribute() map[string]int32 { - if m != nil { - return m.VersionDistribute - } - return nil -} - -func (*BtfsScanTab) XXX_MessageName() string { - return "node.BtfsScanTab" -} - -type ScoreHistoryTab struct { - tableName string `pg:"score_history,alias:t,discard_unknown_columns"` - NodeId string `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty" pg:"node_id"` - StorageVolumeCap uint64 `protobuf:"varint,3,opt,name=storage_volume_cap,json=storageVolumeCap,proto3" json:"storage_volume_cap,omitempty" pg:"storage_volume_cap"` - StorageVolumeLeft uint64 `protobuf:"varint,4,opt,name=storage_volume_left,json=storageVolumeLeft,proto3" json:"storage_volume_left,omitempty" pg:"storage_volume_left"` - Score uint32 `protobuf:"varint,5,opt,name=score,proto3" json:"score,omitempty" pg:"score"` - DateCreated time.Time `protobuf:"bytes,6,opt,name=date_created,json=dateCreated,proto3,stdtime" json:"date_created" pg:"date_created"` - TimeCreated time.Time `protobuf:"bytes,7,opt,name=time_created,json=timeCreated,proto3,stdtime" json:"time_created" pg:"time_created"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ScoreHistoryTab) Reset() { *m = ScoreHistoryTab{} } -func (m *ScoreHistoryTab) String() string { return proto.CompactTextString(m) } -func (*ScoreHistoryTab) ProtoMessage() {} -func (*ScoreHistoryTab) Descriptor() ([]byte, []int) { - return fileDescriptor_35f8e1f5ec2240a2, []int{9} -} -func (m *ScoreHistoryTab) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ScoreHistoryTab) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ScoreHistoryTab.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ScoreHistoryTab) XXX_Merge(src proto.Message) { - xxx_messageInfo_ScoreHistoryTab.Merge(m, src) -} -func (m *ScoreHistoryTab) XXX_Size() int { - return m.Size() -} -func (m *ScoreHistoryTab) XXX_DiscardUnknown() { - xxx_messageInfo_ScoreHistoryTab.DiscardUnknown(m) -} - -var xxx_messageInfo_ScoreHistoryTab proto.InternalMessageInfo - -func (m *ScoreHistoryTab) GettableName() string { - if m != nil { - return m.tableName - } - return "" -} - -func (m *ScoreHistoryTab) GetNodeId() string { - if m != nil { - return m.NodeId - } - return "" -} - -func (m *ScoreHistoryTab) GetStorageVolumeCap() uint64 { - if m != nil { - return m.StorageVolumeCap - } - return 0 -} - -func (m *ScoreHistoryTab) GetStorageVolumeLeft() uint64 { - if m != nil { - return m.StorageVolumeLeft - } - return 0 -} - -func (m *ScoreHistoryTab) GetScore() uint32 { - if m != nil { - return m.Score - } - return 0 -} - -func (m *ScoreHistoryTab) GetDateCreated() time.Time { - if m != nil { - return m.DateCreated - } - return time.Time{} -} - -func (m *ScoreHistoryTab) GetTimeCreated() time.Time { - if m != nil { - return m.TimeCreated - } - return time.Time{} -} - -func (*ScoreHistoryTab) XXX_MessageName() string { - return "node.ScoreHistoryTab" -} - -type AirdropRewardHistoryTab struct { - tableName string `pg:"airdrop_reward_history,alias:t,discard_unknown_columns"` - Type uint32 `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty" pg:"type"` - NodeId string `protobuf:"bytes,3,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty" pg:"node_id"` - IsSuspect bool `protobuf:"varint,5,opt,name=is_suspect,json=isSuspect,proto3" json:"is_suspect,omitempty" pg:"is_suspect"` - Weight uint32 `protobuf:"varint,6,opt,name=weight,proto3" json:"weight,omitempty" pg:"weight"` - Stake uint32 `protobuf:"varint,7,opt,name=stake,proto3" json:"stake,omitempty" pg:"stake"` - DateCreated time.Time `protobuf:"bytes,8,opt,name=date_created,json=dateCreated,proto3,stdtime" json:"date_created" pg:"date_created"` - TimeCreated time.Time `protobuf:"bytes,9,opt,name=time_created,json=timeCreated,proto3,stdtime" json:"time_created" pg:"time_created"` - FileCount uint32 `protobuf:"varint,10,opt,name=file_count,json=fileCount,proto3" json:"file_count,omitempty" pg:"file_count"` - FileSize uint64 `protobuf:"varint,11,opt,name=file_size,json=fileSize,proto3" json:"file_size,omitempty" pg:"file_size"` - ShouldReward uint64 `protobuf:"varint,12,opt,name=should_reward,json=shouldReward,proto3" json:"should_reward,omitempty" pg:"should_reward"` - ActualReward uint64 `protobuf:"varint,13,opt,name=actual_reward,json=actualReward,proto3" json:"actual_reward,omitempty" pg:"actual_reward"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *AirdropRewardHistoryTab) Reset() { *m = AirdropRewardHistoryTab{} } -func (m *AirdropRewardHistoryTab) String() string { return proto.CompactTextString(m) } -func (*AirdropRewardHistoryTab) ProtoMessage() {} -func (*AirdropRewardHistoryTab) Descriptor() ([]byte, []int) { - return fileDescriptor_35f8e1f5ec2240a2, []int{10} -} -func (m *AirdropRewardHistoryTab) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AirdropRewardHistoryTab) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AirdropRewardHistoryTab.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AirdropRewardHistoryTab) XXX_Merge(src proto.Message) { - xxx_messageInfo_AirdropRewardHistoryTab.Merge(m, src) -} -func (m *AirdropRewardHistoryTab) XXX_Size() int { - return m.Size() -} -func (m *AirdropRewardHistoryTab) XXX_DiscardUnknown() { - xxx_messageInfo_AirdropRewardHistoryTab.DiscardUnknown(m) -} - -var xxx_messageInfo_AirdropRewardHistoryTab proto.InternalMessageInfo - -func (m *AirdropRewardHistoryTab) GettableName() string { - if m != nil { - return m.tableName - } - return "" -} - -func (m *AirdropRewardHistoryTab) GetType() uint32 { - if m != nil { - return m.Type - } - return 0 -} - -func (m *AirdropRewardHistoryTab) GetNodeId() string { - if m != nil { - return m.NodeId - } - return "" -} - -func (m *AirdropRewardHistoryTab) GetIsSuspect() bool { - if m != nil { - return m.IsSuspect - } - return false -} - -func (m *AirdropRewardHistoryTab) GetWeight() uint32 { - if m != nil { - return m.Weight - } - return 0 -} - -func (m *AirdropRewardHistoryTab) GetStake() uint32 { - if m != nil { - return m.Stake - } - return 0 -} - -func (m *AirdropRewardHistoryTab) GetDateCreated() time.Time { - if m != nil { - return m.DateCreated - } - return time.Time{} -} - -func (m *AirdropRewardHistoryTab) GetTimeCreated() time.Time { - if m != nil { - return m.TimeCreated - } - return time.Time{} -} - -func (m *AirdropRewardHistoryTab) GetFileCount() uint32 { - if m != nil { - return m.FileCount - } - return 0 -} - -func (m *AirdropRewardHistoryTab) GetFileSize() uint64 { - if m != nil { - return m.FileSize - } - return 0 -} - -func (m *AirdropRewardHistoryTab) GetShouldReward() uint64 { - if m != nil { - return m.ShouldReward - } - return 0 -} - -func (m *AirdropRewardHistoryTab) GetActualReward() uint64 { - if m != nil { - return m.ActualReward - } - return 0 -} - -func (*AirdropRewardHistoryTab) XXX_MessageName() string { - return "node.AirdropRewardHistoryTab" -} -func init() { - proto.RegisterEnum("node.NodeRole", NodeRole_name, NodeRole_value) - golang_proto.RegisterEnum("node.NodeRole", NodeRole_name, NodeRole_value) - proto.RegisterEnum("node.DiscoveryErrorCode", DiscoveryErrorCode_name, DiscoveryErrorCode_value) - golang_proto.RegisterEnum("node.DiscoveryErrorCode", DiscoveryErrorCode_name, DiscoveryErrorCode_value) - proto.RegisterEnum("node.ContractStat_Role", ContractStat_Role_name, ContractStat_Role_value) - golang_proto.RegisterEnum("node.ContractStat_Role", ContractStat_Role_name, ContractStat_Role_value) - proto.RegisterType((*PayLoadInfo)(nil), "node.PayLoadInfo") - golang_proto.RegisterType((*PayLoadInfo)(nil), "node.PayLoadInfo") - proto.RegisterType((*DiscoveryNode)(nil), "node.DiscoveryNode") - golang_proto.RegisterType((*DiscoveryNode)(nil), "node.DiscoveryNode") - proto.RegisterType((*DiscoveryTab)(nil), "node.DiscoveryTab") - golang_proto.RegisterType((*DiscoveryTab)(nil), "node.DiscoveryTab") - proto.RegisterType((*Node)(nil), "node.Node") - golang_proto.RegisterType((*Node)(nil), "node.Node") - proto.RegisterType((*Node_Settings)(nil), "node.Node.Settings") - golang_proto.RegisterType((*Node_Settings)(nil), "node.Node.Settings") - proto.RegisterType((*Node_Geo)(nil), "node.Node.Geo") - golang_proto.RegisterType((*Node_Geo)(nil), "node.Node.Geo") - proto.RegisterType((*Node_ExperimentalFlags)(nil), "node.Node.ExperimentalFlags") - golang_proto.RegisterType((*Node_ExperimentalFlags)(nil), "node.Node.ExperimentalFlags") - proto.RegisterType((*NodeContractStat)(nil), "node.NodeContractStat") - golang_proto.RegisterType((*NodeContractStat)(nil), "node.NodeContractStat") - proto.RegisterType((*StorageStat)(nil), "node.StorageStat") - golang_proto.RegisterType((*StorageStat)(nil), "node.StorageStat") - proto.RegisterType((*StorageStat_HostStats)(nil), "node.StorageStat.HostStats") - golang_proto.RegisterType((*StorageStat_HostStats)(nil), "node.StorageStat.HostStats") - proto.RegisterType((*StorageStat_Host)(nil), "node.StorageStat.Host") - golang_proto.RegisterType((*StorageStat_Host)(nil), "node.StorageStat.Host") - proto.RegisterType((*StorageStat_Renter)(nil), "node.StorageStat.Renter") - golang_proto.RegisterType((*StorageStat_Renter)(nil), "node.StorageStat.Renter") - proto.RegisterType((*ContractStat)(nil), "node.ContractStat") - golang_proto.RegisterType((*ContractStat)(nil), "node.ContractStat") - proto.RegisterType((*Contracts)(nil), "node.Contracts") - golang_proto.RegisterType((*Contracts)(nil), "node.Contracts") - proto.RegisterType((*Contracts_Contract)(nil), "node.Contracts.Contract") - golang_proto.RegisterType((*Contracts_Contract)(nil), "node.Contracts.Contract") - proto.RegisterType((*BtfsScanTab)(nil), "node.BtfsScanTab") - golang_proto.RegisterType((*BtfsScanTab)(nil), "node.BtfsScanTab") - proto.RegisterMapType((map[string]int32)(nil), "node.BtfsScanTab.CountryDistributeEntry") - golang_proto.RegisterMapType((map[string]int32)(nil), "node.BtfsScanTab.CountryDistributeEntry") - proto.RegisterMapType((map[string]int32)(nil), "node.BtfsScanTab.ScoreDistributeEntry") - golang_proto.RegisterMapType((map[string]int32)(nil), "node.BtfsScanTab.ScoreDistributeEntry") - proto.RegisterMapType((map[string]int32)(nil), "node.BtfsScanTab.VersionDistributeEntry") - golang_proto.RegisterMapType((map[string]int32)(nil), "node.BtfsScanTab.VersionDistributeEntry") - proto.RegisterType((*ScoreHistoryTab)(nil), "node.ScoreHistoryTab") - golang_proto.RegisterType((*ScoreHistoryTab)(nil), "node.ScoreHistoryTab") - proto.RegisterType((*AirdropRewardHistoryTab)(nil), "node.AirdropRewardHistoryTab") - golang_proto.RegisterType((*AirdropRewardHistoryTab)(nil), "node.AirdropRewardHistoryTab") -} - -func init() { proto.RegisterFile("protos/node/node.proto", fileDescriptor_35f8e1f5ec2240a2) } -func init() { golang_proto.RegisterFile("protos/node/node.proto", fileDescriptor_35f8e1f5ec2240a2) } - -var fileDescriptor_35f8e1f5ec2240a2 = []byte{ - // 3390 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x5a, 0x4f, 0x6f, 0x1b, 0x49, - 0x76, 0x1f, 0x8a, 0x94, 0x44, 0x3e, 0x52, 0x14, 0x59, 0x92, 0x25, 0x5a, 0x33, 0x96, 0x1c, 0x4d, - 0x76, 0xd7, 0xf1, 0x7a, 0x68, 0x47, 0xf3, 0x27, 0x3b, 0x9e, 0x5d, 0x4c, 0x24, 0x8a, 0x6b, 0x19, - 0x2b, 0x53, 0xda, 0x26, 0xe5, 0x41, 0x72, 0x48, 0xa3, 0xd4, 0x5d, 0x22, 0x1b, 0x6a, 0x76, 0x77, - 0xba, 0xaa, 0xa5, 0xd1, 0x20, 0xf7, 0x04, 0x48, 0x02, 0xe4, 0x90, 0x43, 0x4e, 0x41, 0x90, 0x43, - 0x0e, 0xb9, 0x04, 0xc8, 0x27, 0xc8, 0x2d, 0x73, 0xdc, 0x0f, 0x10, 0x78, 0x37, 0x33, 0xb7, 0x20, - 0x97, 0xf8, 0x92, 0x1c, 0x83, 0xf7, 0xaa, 0xba, 0xd9, 0x94, 0x38, 0x8b, 0x91, 0xe1, 0x8b, 0xc0, - 0x7e, 0xef, 0xf7, 0x5e, 0xd7, 0xfb, 0x5b, 0xaf, 0xaa, 0x05, 0x6b, 0x51, 0x1c, 0xaa, 0x50, 0x3e, - 0x0e, 0x42, 0x57, 0xd0, 0x9f, 0x36, 0x11, 0x58, 0x09, 0x7f, 0x6f, 0xfc, 0x6c, 0xe8, 0xa9, 0x51, - 0x72, 0xda, 0x76, 0xc2, 0xf1, 0xe3, 0x53, 0x4f, 0xa9, 0x30, 0x8e, 0x45, 0xa0, 0x1e, 0x0f, 0xc3, - 0x0f, 0x4e, 0xd5, 0x99, 0xfc, 0xc0, 0x09, 0xc7, 0xe3, 0x30, 0x78, 0x6c, 0x54, 0x0c, 0x13, 0x1e, - 0xbb, 0xfa, 0xaf, 0x56, 0xb2, 0xf1, 0x24, 0x27, 0xae, 0xe2, 0x30, 0xf8, 0x20, 0x91, 0x1a, 0x7c, - 0x9a, 0x9c, 0x3d, 0x1e, 0x86, 0xc3, 0x90, 0x1e, 0xe8, 0x97, 0x91, 0xd8, 0x1a, 0x86, 0xe1, 0xd0, - 0x17, 0x13, 0x94, 0xf2, 0xc6, 0x42, 0x2a, 0x3e, 0x8e, 0x34, 0x60, 0xfb, 0xdf, 0x0b, 0x50, 0x3d, - 0xe6, 0x57, 0x87, 0x21, 0x77, 0x9f, 0x07, 0x67, 0x21, 0x5b, 0x87, 0x45, 0x5c, 0xa9, 0xed, 0xb9, - 0xad, 0xc2, 0xfd, 0xc2, 0x83, 0x8a, 0xb5, 0x80, 0x8f, 0xcf, 0x5d, 0xb6, 0x09, 0x64, 0x42, 0x6b, - 0xee, 0x7e, 0xe1, 0x41, 0x75, 0x07, 0xda, 0x64, 0x5b, 0x2f, 0x74, 0x85, 0x45, 0x74, 0xf6, 0x53, - 0x58, 0x76, 0x3d, 0xe9, 0x84, 0x17, 0x22, 0xbe, 0xb2, 0x91, 0x22, 0x5b, 0xc5, 0xfb, 0xc5, 0x07, - 0xd5, 0x9d, 0x15, 0x0d, 0xdd, 0x4f, 0x99, 0x24, 0x53, 0x77, 0xf3, 0x8f, 0x92, 0xed, 0x42, 0xc5, - 0xe7, 0x52, 0xd9, 0xb8, 0xbc, 0x56, 0x89, 0x5e, 0xb1, 0xd1, 0xd6, 0x6b, 0x6f, 0xa7, 0x6b, 0x6f, - 0x0f, 0xd2, 0xb5, 0xef, 0x95, 0xbf, 0x7e, 0xb5, 0xf5, 0xce, 0xdf, 0xfc, 0x7a, 0xab, 0x60, 0x95, - 0x51, 0x0c, 0x19, 0xdb, 0x7f, 0x5b, 0x80, 0xa5, 0xa9, 0x97, 0xb0, 0xf7, 0x00, 0x54, 0x68, 0x4f, - 0x9b, 0x53, 0x56, 0x61, 0x4f, 0x1b, 0xf4, 0x04, 0x56, 0x89, 0xe5, 0x84, 0x41, 0x20, 0x1c, 0x65, - 0xfb, 0x5c, 0x89, 0xc0, 0xb9, 0x22, 0x03, 0xe7, 0x2d, 0x86, 0xbc, 0x8e, 0x66, 0x1d, 0x6a, 0x0e, - 0xfb, 0x10, 0xca, 0x22, 0x8e, 0x6d, 0x07, 0xdd, 0x50, 0xbc, 0x5f, 0x78, 0x50, 0xdf, 0x69, 0x5d, - 0xb3, 0xad, 0x1b, 0xc7, 0x61, 0xdc, 0x41, 0x03, 0x17, 0x45, 0x4c, 0x3f, 0xb6, 0xff, 0x77, 0x0e, - 0x6a, 0x19, 0x7f, 0xc0, 0x4f, 0xd9, 0x4b, 0x00, 0xc5, 0x4f, 0x7d, 0x61, 0x07, 0x7c, 0x2c, 0xf4, - 0xaa, 0xf6, 0xfe, 0xe0, 0xf5, 0xab, 0xad, 0x0f, 0xa3, 0xe1, 0xd3, 0x6d, 0x5a, 0x51, 0xe6, 0x9b, - 0x47, 0xdc, 0xf7, 0xb8, 0x7c, 0xaa, 0x1e, 0x21, 0x85, 0xc7, 0xae, 0x9d, 0x04, 0xe7, 0x41, 0x78, - 0x19, 0xd8, 0x4e, 0xe8, 0x27, 0xe3, 0x40, 0x6e, 0x5b, 0x15, 0x52, 0xd5, 0xe3, 0x63, 0x91, 0x8f, - 0xdc, 0xdc, 0x54, 0xe4, 0xb6, 0xa0, 0x9a, 0xda, 0xe8, 0x04, 0x8a, 0x56, 0xbe, 0x64, 0x81, 0x21, - 0x75, 0x02, 0xc5, 0xda, 0xb0, 0xc2, 0x2f, 0x86, 0x37, 0x1c, 0x51, 0x22, 0x47, 0x34, 0xf9, 0xc5, - 0xf0, 0xb7, 0xf8, 0x61, 0xfe, 0x7b, 0xfa, 0x81, 0xfd, 0x28, 0x9f, 0x1f, 0x3e, 0x3f, 0x15, 0x7e, - 0x6b, 0x81, 0x5e, 0x30, 0x49, 0x85, 0x43, 0xa4, 0xb2, 0x67, 0x50, 0xc3, 0x2c, 0xb0, 0x9d, 0x58, - 0x70, 0x25, 0xdc, 0xd6, 0xe2, 0x2d, 0xb2, 0xa1, 0x8a, 0x92, 0x1d, 0x2d, 0xb8, 0xfd, 0x3f, 0xab, - 0x50, 0xa2, 0x3c, 0x18, 0xcc, 0xf0, 0xf8, 0xc7, 0xaf, 0x5f, 0x6d, 0xfd, 0x7e, 0xe6, 0xf1, 0xb1, - 0x50, 0xb1, 0xe7, 0xc8, 0xb7, 0xe3, 0xef, 0xdf, 0x81, 0x1a, 0x56, 0xb3, 0x7d, 0x21, 0x62, 0xe9, - 0x85, 0x01, 0x39, 0xbc, 0x62, 0x55, 0x91, 0xf6, 0x52, 0x93, 0x50, 0x36, 0x89, 0x26, 0xc9, 0x5e, - 0xb2, 0x16, 0x92, 0x08, 0xed, 0x41, 0x59, 0xa9, 0xc2, 0x98, 0x0f, 0x85, 0x9d, 0x48, 0xe1, 0x92, - 0x7b, 0x4b, 0x56, 0xd5, 0xd0, 0x4e, 0xa4, 0x70, 0xd9, 0x23, 0x60, 0x29, 0xe4, 0x02, 0x97, 0x25, - 0x6c, 0x87, 0x47, 0xe4, 0xcb, 0x92, 0xd5, 0x30, 0x9c, 0x97, 0xc4, 0xe8, 0xf0, 0x08, 0x83, 0x3f, - 0x16, 0xe3, 0x30, 0xbe, 0xd2, 0xfa, 0x16, 0x09, 0x06, 0x9a, 0x44, 0xea, 0xee, 0x42, 0xd9, 0x89, - 0x12, 0xcd, 0x2d, 0xdf, 0x2f, 0x3c, 0x28, 0x58, 0x8b, 0x4e, 0x94, 0x10, 0x6b, 0x0d, 0x16, 0x92, - 0xc8, 0x0f, 0xb9, 0xdb, 0xaa, 0xa4, 0x8b, 0xc4, 0x27, 0xb6, 0x01, 0x65, 0x37, 0xbc, 0x0c, 0x88, - 0x03, 0xc4, 0xc9, 0x9e, 0xd1, 0x00, 0x15, 0x2a, 0xee, 0xdb, 0x46, 0xb2, 0xaa, 0x0d, 0x20, 0xda, - 0x89, 0x16, 0xff, 0x01, 0xd4, 0x35, 0x24, 0x53, 0x52, 0x23, 0xd0, 0x12, 0x51, 0xf7, 0x53, 0x4d, - 0x39, 0x3b, 0xa3, 0xd8, 0x73, 0x84, 0xed, 0x0a, 0xee, 0xb7, 0x96, 0xa6, 0xec, 0x3c, 0x46, 0xc6, - 0xbe, 0xe0, 0x3e, 0x56, 0xf3, 0x29, 0x0f, 0xdc, 0x4b, 0xcf, 0x55, 0xa3, 0x3c, 0xbe, 0x4e, 0x78, - 0x96, 0xf1, 0x26, 0x12, 0x9f, 0x42, 0x59, 0x0a, 0xa5, 0xbc, 0x60, 0x28, 0x5b, 0xcb, 0x94, 0x63, - 0x2b, 0x93, 0xa6, 0xd6, 0xee, 0x1b, 0x96, 0x4e, 0xae, 0x5f, 0xbd, 0xc2, 0x56, 0x93, 0xc2, 0xd9, - 0x26, 0x40, 0x2c, 0xa2, 0x44, 0x71, 0x85, 0xf1, 0x6d, 0x90, 0xd7, 0x72, 0x14, 0xf6, 0x2e, 0x54, - 0x4e, 0xfd, 0xd0, 0x39, 0x97, 0x76, 0x12, 0xb5, 0x9a, 0xda, 0x43, 0x9a, 0x70, 0x42, 0x11, 0x31, - 0x4c, 0xb4, 0xbf, 0xc5, 0x74, 0x44, 0x34, 0x09, 0x8d, 0xc7, 0xe4, 0x08, 0xa5, 0xad, 0xae, 0x22, - 0xd1, 0x5a, 0xd1, 0x89, 0x15, 0xca, 0xc1, 0x55, 0x24, 0x50, 0x2d, 0x8f, 0x9d, 0x91, 0x66, 0xad, - 0xea, 0x76, 0x86, 0x04, 0x62, 0x9a, 0x38, 0x7a, 0xc1, 0x59, 0xd8, 0xba, 0x43, 0x3c, 0x8c, 0x23, - 0xf5, 0xf4, 0x1f, 0xc1, 0x72, 0x24, 0x44, 0x2c, 0xd3, 0x0a, 0x17, 0x6e, 0x6b, 0x9d, 0xde, 0x5a, - 0x27, 0x72, 0x27, 0xa5, 0xde, 0x28, 0xbd, 0xd6, 0x1b, 0x96, 0x1e, 0x5b, 0x81, 0xf9, 0x91, 0x7d, - 0xc1, 0xfd, 0xd6, 0x5d, 0x5a, 0x49, 0x69, 0xf4, 0x92, 0xfb, 0xec, 0x21, 0x14, 0x87, 0x22, 0x6c, - 0x6d, 0x90, 0xd2, 0x7a, 0xce, 0xd7, 0xcf, 0x44, 0x98, 0x73, 0x33, 0x82, 0xd8, 0x4f, 0xa0, 0x78, - 0xe6, 0x0f, 0x5b, 0xef, 0x12, 0xf6, 0xbd, 0x1c, 0xb6, 0xfb, 0x65, 0x24, 0x62, 0x6f, 0x2c, 0x02, - 0xc5, 0xfd, 0x9f, 0xfb, 0x7c, 0x2a, 0x40, 0x28, 0xb2, 0xf1, 0x1f, 0xf3, 0x50, 0x4e, 0x83, 0xc7, - 0x1e, 0x42, 0x73, 0x3a, 0x87, 0xb8, 0x3c, 0xa7, 0x06, 0x50, 0xb2, 0x96, 0xf3, 0x29, 0xb4, 0x2b, - 0xcf, 0xb1, 0x0b, 0x5e, 0xcf, 0x20, 0x44, 0xcf, 0x11, 0xba, 0x39, 0x9d, 0x40, 0x88, 0x7f, 0x00, - 0x69, 0x16, 0x52, 0x21, 0xdb, 0x63, 0x4f, 0x97, 0x7a, 0xc9, 0xaa, 0x1b, 0x3a, 0xba, 0xe9, 0x85, - 0x17, 0xa0, 0xff, 0x27, 0x9a, 0x7d, 0x6f, 0xec, 0x29, 0xaa, 0xfa, 0x82, 0x55, 0xcf, 0xc8, 0x87, - 0x48, 0x65, 0xbf, 0x07, 0x0d, 0x27, 0xf4, 0xb1, 0xff, 0xc6, 0xdc, 0xb7, 0xa5, 0xe2, 0xe7, 0xc2, - 0x74, 0x80, 0xe5, 0x09, 0xbd, 0x8f, 0x64, 0xb6, 0x03, 0x77, 0xae, 0x57, 0xc7, 0x19, 0x4f, 0x7c, - 0x65, 0x1a, 0xc1, 0xca, 0x74, 0x81, 0x10, 0x8b, 0x7d, 0x00, 0xcc, 0x49, 0xa4, 0x0a, 0xc7, 0xde, - 0x57, 0xc2, 0x25, 0x31, 0x2f, 0x18, 0x52, 0x4b, 0x28, 0x5b, 0xcd, 0x09, 0xe7, 0x58, 0x33, 0xd8, - 0xc7, 0x30, 0x1f, 0x87, 0xbe, 0x90, 0xad, 0xf2, 0xfd, 0xe2, 0x83, 0x7a, 0x3e, 0x62, 0x56, 0xe8, - 0x8b, 0xbd, 0xe5, 0x7f, 0xfe, 0xf5, 0x56, 0x95, 0x00, 0x8f, 0x78, 0x1c, 0xf3, 0x2b, 0x4b, 0xa3, - 0xb1, 0x12, 0x63, 0x11, 0x71, 0x2f, 0xbe, 0xb6, 0x30, 0xdd, 0x43, 0x98, 0xe6, 0x4d, 0xad, 0xeb, - 0x13, 0x58, 0x9f, 0x92, 0x98, 0x2c, 0xc5, 0xb4, 0x97, 0x3b, 0x39, 0xa1, 0x4e, 0xc6, 0x64, 0x4f, - 0xe1, 0xae, 0x91, 0x9b, 0x61, 0x56, 0x95, 0xcc, 0x32, 0x8a, 0x3b, 0x37, 0x8c, 0xfb, 0x04, 0xd6, - 0x9d, 0x11, 0xf7, 0x7d, 0x11, 0xdc, 0xf0, 0xa0, 0xee, 0x46, 0x77, 0x32, 0xf6, 0xd4, 0x5a, 0x7f, - 0x0a, 0x1b, 0xd7, 0xe5, 0x72, 0xcb, 0xd5, 0xdd, 0xa9, 0x35, 0x2d, 0x9a, 0x5b, 0xf1, 0x1f, 0xc2, - 0x7b, 0x13, 0xe9, 0x19, 0x8b, 0xae, 0xd3, 0xa2, 0x27, 0x6f, 0xb8, 0xb1, 0xee, 0x8d, 0x3f, 0x83, - 0xe2, 0x33, 0x11, 0xb2, 0xf7, 0x61, 0xc9, 0x09, 0x93, 0x40, 0xc5, 0x57, 0xb6, 0x1c, 0x85, 0xb1, - 0x32, 0xd3, 0x4d, 0xcd, 0x10, 0xfb, 0x48, 0xc3, 0xfe, 0x1d, 0x8b, 0x21, 0xb6, 0x28, 0xb3, 0x41, - 0xe9, 0x27, 0xec, 0xdf, 0x3e, 0x57, 0x9e, 0x4a, 0xcc, 0x1c, 0x33, 0x67, 0x65, 0xcf, 0xec, 0x3d, - 0xa8, 0xf8, 0x61, 0x30, 0xd4, 0xcc, 0x12, 0x31, 0x27, 0x84, 0x8d, 0xbf, 0x5f, 0x80, 0xe6, 0x8d, - 0x0a, 0x44, 0x19, 0x1e, 0x70, 0xff, 0x4a, 0x79, 0x8e, 0xa4, 0x85, 0x94, 0xad, 0x09, 0x81, 0xfd, - 0x18, 0x9a, 0x67, 0x9e, 0x2f, 0x30, 0x21, 0x85, 0x2d, 0x02, 0xdc, 0x3f, 0xf5, 0x8e, 0x59, 0xb6, - 0x1a, 0x19, 0xa3, 0xab, 0xe9, 0xd8, 0xf4, 0x47, 0xa1, 0x54, 0xd2, 0x96, 0x57, 0x81, 0x93, 0xa1, - 0x8b, 0x1a, 0x4d, 0x9c, 0xfe, 0x55, 0xe0, 0xa4, 0xe8, 0x1f, 0xc2, 0x72, 0x0e, 0x3d, 0x0e, 0xcd, - 0x92, 0x2b, 0xd6, 0x52, 0x06, 0x7d, 0x81, 0x03, 0xc0, 0x47, 0xb0, 0xe6, 0x7b, 0xa7, 0xd1, 0x4e, - 0x64, 0x4b, 0x15, 0x0b, 0x3e, 0xb6, 0xc7, 0xe8, 0x26, 0x74, 0xf8, 0x3c, 0x69, 0x5e, 0xd5, 0xdc, - 0x3e, 0x31, 0x5f, 0x18, 0x1e, 0xfb, 0x5d, 0xa8, 0xa3, 0xc8, 0x48, 0xa9, 0xc8, 0x8e, 0xe2, 0xf0, - 0xcb, 0x2b, 0xaa, 0xad, 0xb2, 0x55, 0x8b, 0x76, 0xa2, 0x03, 0xa5, 0xa2, 0x63, 0xa4, 0xb1, 0x7b, - 0x00, 0x51, 0x2c, 0xce, 0x44, 0x6c, 0x2b, 0x5f, 0x9a, 0x62, 0xaa, 0x68, 0xca, 0xc0, 0x97, 0x8c, - 0x41, 0xe9, 0x4f, 0x13, 0xcf, 0xa1, 0xad, 0xb5, 0x6c, 0xd1, 0x6f, 0x5c, 0x76, 0x2c, 0xc6, 0xe1, - 0x85, 0xb0, 0xc3, 0xc0, 0x4e, 0x82, 0xc8, 0x0b, 0xa8, 0x38, 0xca, 0xd6, 0x92, 0x26, 0x1f, 0x05, - 0x27, 0x48, 0xc4, 0x76, 0x20, 0x47, 0x3c, 0x76, 0xbd, 0x60, 0x98, 0xb9, 0x02, 0x08, 0xb8, 0x9c, - 0xd2, 0x53, 0x4f, 0x7c, 0x04, 0x6b, 0x69, 0x3b, 0x70, 0x7c, 0x4f, 0x04, 0x2a, 0x13, 0xd0, 0x75, - 0xb0, 0x6a, 0xb8, 0x1d, 0x62, 0xa6, 0x52, 0x4f, 0x20, 0xa5, 0xdb, 0xe8, 0xb0, 0x4c, 0xa6, 0x46, - 0x32, 0xe9, 0xf6, 0x7b, 0x10, 0xca, 0x4c, 0xe2, 0x31, 0xac, 0x48, 0x15, 0x73, 0x25, 0x86, 0x9e, - 0x83, 0x4e, 0xb9, 0xf0, 0x70, 0x15, 0x94, 0xf7, 0x24, 0x60, 0x58, 0xc7, 0x29, 0x07, 0x3b, 0x70, - 0x12, 0x63, 0x2f, 0xcb, 0x47, 0x5f, 0xa7, 0xf9, 0x72, 0x12, 0xfb, 0xfd, 0x7c, 0xf0, 0xdb, 0xb0, - 0xe2, 0x7a, 0x92, 0x26, 0x35, 0x9e, 0xa8, 0xd0, 0x4e, 0x22, 0x97, 0x2b, 0x41, 0x9b, 0x73, 0xd9, - 0x6a, 0x1a, 0xd6, 0x6e, 0xa2, 0xc2, 0x13, 0x62, 0x60, 0x66, 0x0d, 0x63, 0x1e, 0x8d, 0xa6, 0x72, - 0xa5, 0xa1, 0x73, 0x25, 0x63, 0xe4, 0x94, 0x9b, 0x66, 0x31, 0x65, 0x6a, 0x53, 0x2b, 0xd7, 0xac, - 0xbc, 0xa5, 0x1f, 0xc1, 0xda, 0xa4, 0x54, 0xa7, 0x44, 0x98, 0xf6, 0x68, 0xc6, 0xcd, 0x49, 0x6d, - 0xff, 0x77, 0x01, 0x1a, 0x3d, 0x7d, 0x72, 0x50, 0x31, 0x77, 0x54, 0x5f, 0x71, 0xc5, 0xac, 0x19, - 0xf3, 0xe7, 0x87, 0xaf, 0x5f, 0x6d, 0x3d, 0xc6, 0xf9, 0x93, 0xfb, 0x3e, 0x6e, 0x1d, 0x22, 0x7e, - 0x4b, 0xd3, 0x27, 0xce, 0x1e, 0xde, 0x50, 0xab, 0x34, 0x85, 0x53, 0x3e, 0xf5, 0x86, 0x2f, 0xf0, - 0x99, 0xf5, 0xa0, 0x41, 0xc7, 0xac, 0x71, 0xe8, 0x7a, 0x67, 0x57, 0xb7, 0x3f, 0x6d, 0xd5, 0x51, - 0xfa, 0x05, 0x09, 0xd3, 0x99, 0xeb, 0x5f, 0xcb, 0x50, 0xed, 0xeb, 0x2c, 0x21, 0x4b, 0x3f, 0x03, - 0x20, 0x57, 0x49, 0xc5, 0x95, 0x6e, 0x05, 0xd5, 0x9d, 0x35, 0xbd, 0x6f, 0xe4, 0x60, 0x6d, 0xf4, - 0xd8, 0x5e, 0x09, 0xb5, 0x5a, 0x15, 0xc4, 0x23, 0x11, 0xcf, 0x80, 0x35, 0x3c, 0x0d, 0x8b, 0xd8, - 0x88, 0xeb, 0x93, 0x66, 0xeb, 0xa6, 0xb8, 0x45, 0x28, 0xa3, 0xa0, 0xaa, 0x65, 0x48, 0xc5, 0xc6, - 0x6f, 0x4a, 0x50, 0x39, 0xc8, 0x14, 0xd2, 0xfc, 0x4a, 0x36, 0x16, 0xa8, 0x91, 0x99, 0x27, 0xb6, - 0x0a, 0xf3, 0xd2, 0x09, 0x63, 0x7d, 0x96, 0x9d, 0xb3, 0xf4, 0x03, 0x4e, 0xae, 0x9a, 0x6f, 0x6b, - 0xa6, 0xee, 0x8c, 0x55, 0x4d, 0xeb, 0x13, 0x04, 0x07, 0xb0, 0x61, 0xca, 0xd7, 0xcd, 0xb1, 0x8c, - 0x8b, 0x22, 0xe6, 0xfb, 0xb0, 0x64, 0x26, 0x7e, 0x03, 0x98, 0x27, 0x40, 0xcd, 0x10, 0x35, 0x68, - 0x0b, 0xaa, 0x32, 0x12, 0xc2, 0x35, 0x90, 0x05, 0x82, 0x00, 0x91, 0x34, 0xe0, 0x11, 0x30, 0x3d, - 0x39, 0xdb, 0x79, 0xdc, 0x22, 0xe1, 0x1a, 0x9a, 0xd3, 0x9f, 0xa0, 0x9f, 0xc0, 0x6a, 0x3a, 0x44, - 0x4f, 0xe1, 0xcb, 0x84, 0x67, 0x29, 0x2f, 0x27, 0xf1, 0x3e, 0x2c, 0x19, 0x2b, 0x2f, 0x85, 0x37, - 0x1c, 0xe9, 0x6d, 0x79, 0xce, 0x32, 0xa6, 0x7f, 0x41, 0x34, 0xec, 0x69, 0x68, 0xa7, 0x41, 0x80, - 0xde, 0x05, 0xf8, 0x30, 0x65, 0xff, 0x00, 0xea, 0xa9, 0xa5, 0x06, 0x52, 0x25, 0x48, 0x6a, 0xbf, - 0x81, 0xe1, 0x59, 0x86, 0xd6, 0x64, 0x40, 0x35, 0xed, 0x50, 0xa2, 0x19, 0x48, 0x1b, 0x56, 0xa6, - 0xac, 0x35, 0xc8, 0x25, 0x42, 0x36, 0x73, 0xe6, 0x1a, 0xfc, 0x0e, 0xdc, 0xb9, 0x66, 0xaf, 0x91, - 0xa8, 0x93, 0xc4, 0xca, 0x94, 0xc1, 0x46, 0xe6, 0x19, 0xd4, 0x28, 0xe7, 0x75, 0x37, 0x71, 0xcd, - 0xac, 0xff, 0x3d, 0x87, 0x5a, 0x94, 0xd4, 0xdd, 0xc6, 0x7d, 0x5a, 0xfa, 0x87, 0x7f, 0xdc, 0x2a, - 0x6c, 0xfc, 0xf5, 0x1c, 0x94, 0x30, 0xc5, 0x30, 0xbb, 0xc2, 0xc0, 0xf7, 0x02, 0x61, 0xb6, 0x3c, - 0xf3, 0x74, 0xe3, 0x08, 0x87, 0x49, 0x56, 0x9c, 0x3e, 0xc2, 0x61, 0x16, 0xa4, 0xdd, 0x9a, 0x47, - 0x94, 0x69, 0x45, 0x0b, 0xd2, 0x16, 0xcd, 0xa3, 0xfc, 0xd9, 0xc7, 0xf5, 0xe4, 0xb9, 0x4d, 0x27, - 0x23, 0xca, 0xb8, 0x62, 0x76, 0xf6, 0xd9, 0xf7, 0xe4, 0xf9, 0x00, 0xe9, 0xf9, 0xe6, 0x4f, 0x68, - 0x7e, 0xc1, 0x3d, 0x1f, 0x3b, 0x05, 0xa5, 0x60, 0x31, 0x6b, 0xfe, 0x28, 0xb1, 0x9b, 0xf2, 0xd8, - 0xe7, 0x30, 0xaf, 0xeb, 0x6c, 0x81, 0x1c, 0xf2, 0xee, 0xec, 0x32, 0xa5, 0x4a, 0xda, 0xab, 0xa5, - 0x33, 0xf6, 0x7f, 0x61, 0xc9, 0x69, 0x39, 0xe3, 0x8f, 0x87, 0xb0, 0xa0, 0xeb, 0x11, 0xc7, 0x8a, - 0x58, 0x48, 0x11, 0x5f, 0x88, 0xec, 0xb2, 0x25, 0x7d, 0xd6, 0x58, 0xfd, 0x77, 0xfb, 0x5f, 0x8a, - 0x50, 0x9b, 0xea, 0x8f, 0x6d, 0x58, 0xe1, 0x8e, 0xf2, 0x2e, 0xe8, 0x2e, 0x86, 0xc8, 0x76, 0x90, - 0x8c, 0x49, 0x47, 0xd1, 0x6a, 0x6a, 0x56, 0x2a, 0xd0, 0x4b, 0xc6, 0xd8, 0xf7, 0x9d, 0x70, 0x1c, - 0x89, 0x40, 0xd2, 0x71, 0xcb, 0x8e, 0xb8, 0x97, 0xba, 0xb9, 0x91, 0x67, 0x1c, 0x73, 0xcf, 0x65, - 0x9f, 0x42, 0x6b, 0x0a, 0x1c, 0x26, 0x4a, 0x2a, 0x1e, 0xd0, 0xb6, 0xa5, 0x1d, 0xbf, 0x9e, 0xe7, - 0x1f, 0x4d, 0xd8, 0xec, 0x25, 0xac, 0x9e, 0x79, 0xb1, 0x54, 0x93, 0x65, 0x49, 0xc5, 0x63, 0x75, - 0xab, 0x8e, 0xc9, 0x48, 0x43, 0xce, 0xdc, 0x58, 0xb1, 0x63, 0x68, 0x52, 0x46, 0x66, 0x6a, 0x45, - 0xa0, 0x4f, 0xfa, 0xdf, 0x57, 0xe9, 0x32, 0x8a, 0xa7, 0x3a, 0xbb, 0x81, 0xcb, 0x7e, 0x0c, 0x25, - 0x1c, 0xbe, 0x29, 0x94, 0xf5, 0x9d, 0x75, 0x1d, 0xca, 0xbc, 0x8f, 0xdb, 0x38, 0xb2, 0x5b, 0x04, - 0xda, 0x7e, 0x08, 0x25, 0x7c, 0x62, 0x65, 0x28, 0x1d, 0x1c, 0xf5, 0x07, 0x8d, 0x77, 0x18, 0xc0, - 0x82, 0xd5, 0xed, 0x0d, 0xba, 0x56, 0xa3, 0xc0, 0x6a, 0x50, 0xb6, 0xba, 0xfd, 0xae, 0xf5, 0xb2, - 0xbb, 0xdf, 0x98, 0x33, 0x11, 0x7b, 0x3d, 0x0f, 0x95, 0x54, 0x9b, 0x64, 0x9f, 0x40, 0x25, 0x5d, - 0x39, 0xf6, 0xf8, 0xe2, 0xa4, 0x49, 0x67, 0x98, 0xec, 0x97, 0x35, 0x81, 0x6e, 0xfc, 0xd3, 0x3c, - 0x94, 0x53, 0xba, 0xb9, 0x94, 0xd2, 0xe6, 0x67, 0x97, 0x73, 0x90, 0x92, 0x9e, 0xbb, 0xb8, 0xc1, - 0xd1, 0x56, 0x32, 0xd9, 0xe0, 0xf0, 0x51, 0x6f, 0x70, 0x66, 0x9b, 0xf0, 0x5c, 0x73, 0xb7, 0x52, - 0xd6, 0x84, 0xe7, 0x2e, 0xfb, 0x18, 0x16, 0x30, 0x39, 0x13, 0x49, 0x41, 0xaa, 0xef, 0xdc, 0x6b, - 0xeb, 0xfb, 0xd3, 0xf4, 0xbd, 0x53, 0x4e, 0x11, 0x96, 0x01, 0xb3, 0x0e, 0x00, 0x85, 0x56, 0xef, - 0x88, 0xb7, 0x09, 0x45, 0x85, 0xe4, 0xe8, 0xee, 0xe6, 0x73, 0x28, 0x8b, 0xc0, 0xd5, 0x2a, 0x16, - 0x6e, 0xa1, 0x62, 0x51, 0x04, 0x2e, 0x29, 0xe8, 0x41, 0x23, 0x10, 0x5f, 0x2a, 0x5b, 0x48, 0x27, - 0x0e, 0x2f, 0xb5, 0xa2, 0xdb, 0xdc, 0x7e, 0xd5, 0x51, 0xba, 0x4b, 0xc2, 0xa4, 0x6f, 0x66, 0x9d, - 0x94, 0xdf, 0xa0, 0x4e, 0x2a, 0xbf, 0xbd, 0x4e, 0xee, 0x01, 0x24, 0x81, 0xa7, 0xf4, 0x71, 0x88, - 0xb6, 0x8b, 0xa2, 0x55, 0x41, 0x0a, 0x1d, 0x7f, 0x90, 0x4d, 0xe3, 0xaa, 0x2d, 0xbd, 0xaf, 0x04, - 0x6d, 0x15, 0x45, 0xab, 0x42, 0x94, 0xbe, 0xf7, 0x55, 0x8e, 0x3d, 0xe2, 0x72, 0x44, 0x9b, 0x44, - 0xc5, 0xb0, 0x0f, 0xb8, 0x1c, 0x61, 0xb8, 0xf1, 0x94, 0xa0, 0xb9, 0x4b, 0x3a, 0xdc, 0x48, 0x20, - 0xe6, 0xac, 0x79, 0xa6, 0xfe, 0xe6, 0xf3, 0xcc, 0x54, 0x9b, 0xfa, 0xab, 0x2a, 0x54, 0xf7, 0xd4, - 0x99, 0xec, 0x3b, 0x3c, 0x18, 0xf0, 0x53, 0xf6, 0xcb, 0x19, 0x53, 0xdc, 0xce, 0xeb, 0x57, 0x5b, - 0x6d, 0x9c, 0xe2, 0xe8, 0xc2, 0x4f, 0x3a, 0x3c, 0xb8, 0xd5, 0x10, 0xd7, 0x86, 0x95, 0x6b, 0x57, - 0x79, 0xbe, 0x38, 0x53, 0x94, 0xef, 0x05, 0xab, 0x39, 0x75, 0x97, 0x77, 0x28, 0xce, 0x14, 0x6e, - 0xf7, 0x7a, 0x93, 0x31, 0x13, 0x23, 0xb6, 0xc9, 0x53, 0x33, 0xe6, 0x2d, 0x59, 0x4c, 0xf3, 0x68, - 0xd2, 0x93, 0x3d, 0xe2, 0xb0, 0x2f, 0x80, 0xa5, 0xe7, 0x44, 0xd7, 0x93, 0x2a, 0xf6, 0x4e, 0x13, - 0x85, 0xa3, 0x0b, 0x16, 0xed, 0x03, 0x5d, 0xb4, 0x39, 0x1b, 0xdb, 0x1d, 0x8d, 0xdd, 0xcf, 0xa0, - 0x5d, 0x7c, 0xb4, 0x9a, 0xce, 0x75, 0x3a, 0xfb, 0x25, 0x34, 0x68, 0xd4, 0xc8, 0xab, 0x9d, 0x27, - 0xb5, 0x3f, 0xbc, 0xa9, 0x96, 0x46, 0x8f, 0xeb, 0x4a, 0x97, 0xe5, 0x34, 0xf5, 0xc6, 0xed, 0xd3, - 0xc2, 0x9b, 0xde, 0x3e, 0xe5, 0x8e, 0x35, 0xdc, 0x8f, 0x05, 0x77, 0x73, 0x97, 0x9f, 0x85, 0xec, - 0x58, 0xb3, 0xab, 0x59, 0xb4, 0x21, 0xaf, 0xc2, 0xbc, 0x4e, 0x5e, 0x7d, 0x03, 0xaa, 0x1f, 0x70, - 0x41, 0xb8, 0xf3, 0x67, 0x0b, 0xaa, 0xdc, 0x66, 0x41, 0x28, 0x99, 0x2e, 0xe8, 0x2e, 0x94, 0x03, - 0x71, 0x69, 0xc7, 0x3c, 0x38, 0xa7, 0xf2, 0xa8, 0x58, 0x8b, 0x81, 0xb8, 0xb4, 0x78, 0x70, 0x8e, - 0xd9, 0xaf, 0x2f, 0x43, 0x89, 0x59, 0xd5, 0xd9, 0x4f, 0x14, 0x62, 0x3f, 0xc2, 0xf8, 0x99, 0x36, - 0x89, 0x27, 0x05, 0x0a, 0x04, 0x15, 0xc9, 0x12, 0xd6, 0xb0, 0xe6, 0xec, 0xfa, 0x3e, 0x05, 0x0e, - 0xf3, 0x29, 0x43, 0x9f, 0x71, 0x2f, 0x85, 0x2f, 0x11, 0xbc, 0x99, 0xb2, 0x7e, 0xce, 0x3d, 0x83, - 0x7f, 0x02, 0xab, 0x53, 0xda, 0x8d, 0x67, 0xa8, 0x84, 0x0a, 0x16, 0xcb, 0xe9, 0x37, 0x63, 0x01, - 0x0e, 0x60, 0xd3, 0x6f, 0x48, 0x45, 0x96, 0x49, 0x64, 0x25, 0xff, 0x8e, 0x54, 0xe6, 0x33, 0xd8, - 0x48, 0xc3, 0x81, 0xe9, 0x6d, 0x5f, 0x8e, 0x44, 0x90, 0xed, 0x7d, 0xe6, 0xf6, 0x74, 0xdd, 0x20, - 0x30, 0xcd, 0xbf, 0x18, 0x89, 0x20, 0xdb, 0x27, 0x3e, 0x85, 0xbb, 0x32, 0x89, 0x44, 0x6c, 0x4f, - 0x27, 0xbe, 0x36, 0xac, 0x49, 0x86, 0xad, 0x11, 0xe0, 0x28, 0x97, 0xfc, 0xda, 0xba, 0x8f, 0x61, - 0x1d, 0xbd, 0x3e, 0x4b, 0x90, 0x91, 0xe0, 0x6a, 0x20, 0x2e, 0x6f, 0x8a, 0x3d, 0x84, 0xa6, 0xc1, - 0xa2, 0x4b, 0x38, 0x5d, 0x15, 0xd0, 0x45, 0x6c, 0xd1, 0x5a, 0xd6, 0x8c, 0x5d, 0xdf, 0xdf, 0x25, - 0xf2, 0xe4, 0xb6, 0x5b, 0x33, 0xe8, 0x52, 0xb6, 0x68, 0x6e, 0xbb, 0xb5, 0x4e, 0x0c, 0x70, 0x76, - 0x1e, 0x93, 0x74, 0x33, 0x5b, 0xb4, 0x2a, 0xe9, 0x81, 0x4c, 0x62, 0x81, 0xa6, 0xb3, 0x74, 0xae, - 0x92, 0xd6, 0xbe, 0xab, 0x40, 0xcd, 0x07, 0x84, 0x1b, 0x05, 0x7a, 0x71, 0x9d, 0xbe, 0xb1, 0x0f, - 0x6b, 0xb3, 0xab, 0x99, 0x35, 0xa0, 0x78, 0x2e, 0xae, 0xcc, 0x96, 0x8b, 0x3f, 0x31, 0xfd, 0x2f, - 0xb8, 0x9f, 0x08, 0xf3, 0xed, 0x4b, 0x3f, 0x3c, 0x9d, 0xfb, 0x49, 0x61, 0x63, 0x0f, 0x56, 0x67, - 0x15, 0xef, 0xad, 0x74, 0xec, 0xc3, 0xda, 0xec, 0x65, 0xdf, 0x46, 0xcb, 0xf6, 0x9f, 0x17, 0x61, - 0x99, 0x96, 0x72, 0xe0, 0x61, 0xae, 0xd0, 0xa7, 0xb4, 0x93, 0x19, 0x2d, 0xf9, 0x93, 0xd7, 0xaf, - 0xb6, 0x76, 0xb0, 0x25, 0xeb, 0xf6, 0x34, 0xd2, 0xe8, 0xb7, 0x73, 0xb6, 0x9e, 0xfd, 0xe9, 0xa5, - 0xf8, 0x1d, 0x9f, 0x5e, 0xbe, 0xa3, 0xbb, 0xeb, 0x0f, 0x3e, 0x33, 0xba, 0x7b, 0x76, 0x2c, 0x9d, - 0xa7, 0xec, 0x34, 0xc7, 0xd2, 0xeb, 0x4d, 0x68, 0xe1, 0x4d, 0x9b, 0xd0, 0x5b, 0xfb, 0xae, 0xf6, - 0x97, 0x25, 0x58, 0xdf, 0xf5, 0x62, 0x37, 0x0e, 0x23, 0x4b, 0x5c, 0xe2, 0x3e, 0x3d, 0x89, 0xc8, - 0x9f, 0xcc, 0x88, 0xc8, 0xe7, 0xaf, 0x5f, 0x6d, 0x7d, 0x46, 0x57, 0x1d, 0x5a, 0xc8, 0x8e, 0x49, - 0xea, 0x8d, 0x42, 0xc3, 0xa0, 0x44, 0x5f, 0x3f, 0xe6, 0xc8, 0x45, 0xf4, 0x3b, 0x1f, 0xae, 0xe2, - 0x54, 0xb8, 0xee, 0x01, 0x78, 0xd2, 0x96, 0x89, 0x8c, 0x84, 0xa3, 0xcc, 0x55, 0x5f, 0xc5, 0x93, - 0x7d, 0x4d, 0xc0, 0x03, 0x9c, 0x39, 0x3d, 0x2e, 0x90, 0x36, 0xf3, 0x44, 0x71, 0xa0, 0xab, 0xf7, - 0x45, 0x13, 0x07, 0xba, 0x70, 0xbf, 0x1e, 0x87, 0xf2, 0xdb, 0x8a, 0x43, 0xe5, 0x4d, 0xb7, 0xb9, - 0x7b, 0x00, 0x34, 0x19, 0xe9, 0x96, 0x06, 0xb4, 0x58, 0x9a, 0x95, 0x74, 0x1f, 0x4b, 0x07, 0xa7, - 0x6c, 0xea, 0x2a, 0xe9, 0xc1, 0x89, 0x86, 0xae, 0xf7, 0x61, 0x49, 0x8e, 0xc2, 0xc4, 0x77, 0x4d, - 0x30, 0xcc, 0xa5, 0x77, 0x4d, 0x13, 0x75, 0x58, 0x11, 0xc4, 0x1d, 0x95, 0xe0, 0xe6, 0xa4, 0x41, - 0xfa, 0x7a, 0xbb, 0xa6, 0x89, 0x1a, 0xf4, 0xf0, 0x2f, 0x0a, 0x50, 0x4e, 0xbf, 0x09, 0xe4, 0x0e, - 0x12, 0xef, 0x64, 0xc7, 0x0b, 0x73, 0xa4, 0x38, 0xde, 0x7d, 0x6e, 0x75, 0xad, 0xc6, 0x1c, 0xab, - 0x03, 0x74, 0x0e, 0x76, 0x0f, 0x0f, 0xbb, 0xbd, 0x67, 0x5d, 0xab, 0x51, 0x64, 0x2b, 0xb0, 0xdc, - 0xeb, 0x0e, 0xbe, 0x38, 0xb2, 0x7e, 0x61, 0x77, 0x0e, 0xba, 0x9d, 0x5f, 0x74, 0xad, 0x46, 0x89, - 0xad, 0x01, 0xb3, 0xba, 0xc7, 0x27, 0x83, 0xdd, 0xc1, 0xf3, 0xa3, 0x5e, 0x46, 0x9f, 0x67, 0x0d, - 0xa8, 0x75, 0xf6, 0x7b, 0xf6, 0xb1, 0x75, 0xf4, 0xf2, 0xf9, 0x7e, 0xd7, 0x6a, 0x2c, 0xb0, 0x0a, - 0xcc, 0x1f, 0x0d, 0x0e, 0xba, 0x56, 0x63, 0xf5, 0xe1, 0x08, 0xd8, 0xcd, 0x2f, 0xd0, 0xac, 0x0a, - 0x8b, 0xfd, 0x93, 0x4e, 0xa7, 0xdb, 0xef, 0x37, 0xde, 0x61, 0xcb, 0x50, 0x3d, 0xe9, 0x75, 0x8e, - 0x7a, 0xbd, 0x6e, 0x67, 0xd0, 0xdd, 0x6f, 0x14, 0x90, 0x3b, 0x78, 0xfe, 0xa2, 0x7b, 0x74, 0x32, - 0x68, 0xcc, 0xb1, 0x3b, 0xd0, 0xdc, 0xdd, 0xeb, 0x1f, 0x1d, 0x9e, 0x0c, 0xba, 0x87, 0x7f, 0x64, - 0x9f, 0xf4, 0x8e, 0x8e, 0xbb, 0xbd, 0x46, 0x11, 0x5f, 0x4a, 0xaf, 0xb0, 0xad, 0xee, 0x6e, 0xff, - 0xa8, 0xd7, 0x80, 0xbd, 0x9f, 0xfd, 0xdf, 0x7f, 0x6e, 0x16, 0xbe, 0xfe, 0x66, 0xb3, 0xf0, 0xab, - 0x6f, 0x36, 0x0b, 0xbf, 0xf9, 0x66, 0xb3, 0xf0, 0x77, 0xdf, 0x6e, 0x16, 0xfe, 0xed, 0xdb, 0xcd, - 0xc2, 0xd7, 0xdf, 0x6e, 0x16, 0xa0, 0xe6, 0x85, 0x6d, 0x1c, 0x08, 0xa9, 0x7d, 0xef, 0x55, 0xd0, - 0x3b, 0xc7, 0x18, 0xd5, 0xe3, 0xc2, 0x1f, 0xd3, 0xff, 0x4a, 0x9c, 0x2e, 0x50, 0x90, 0x3f, 0xfc, - 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7c, 0x43, 0x92, 0x43, 0x2d, 0x22, 0x00, 0x00, -} - -func (m *PayLoadInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PayLoadInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PayLoadInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - n1, err1 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.LastTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.LastTime):]) - if err1 != nil { - return 0, err1 - } - i -= n1 - i = encodeVarintNode(dAtA, i, uint64(n1)) - i-- - dAtA[i] = 0x22 - if len(m.DiscoveryNodes) > 0 { - for iNdEx := len(m.DiscoveryNodes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DiscoveryNodes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintNode(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.Node != nil { - { - size, err := m.Node.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintNode(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.NodeId) > 0 { - i -= len(m.NodeId) - copy(dAtA[i:], m.NodeId) - i = encodeVarintNode(dAtA, i, uint64(len(m.NodeId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DiscoveryNode) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DiscoveryNode) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DiscoveryNode) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.ErrCode != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.ErrCode)) - i-- - dAtA[i] = 0x18 - } - if m.NodeConnectLatency != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.NodeConnectLatency)) - i-- - dAtA[i] = 0x10 - } - if len(m.ToNodeId) > 0 { - i -= len(m.ToNodeId) - copy(dAtA[i:], m.ToNodeId) - i = encodeVarintNode(dAtA, i, uint64(len(m.ToNodeId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DiscoveryTab) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DiscoveryTab) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DiscoveryTab) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - n3, err3 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.TimeCreated, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.TimeCreated):]) - if err3 != nil { - return 0, err3 - } - i -= n3 - i = encodeVarintNode(dAtA, i, uint64(n3)) - i-- - dAtA[i] = 0x3a - if m.DiscoveryLabel != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.DiscoveryLabel)) - i-- - dAtA[i] = 0x30 - } - if m.ErrCode != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.ErrCode)) - i-- - dAtA[i] = 0x28 - } - if m.AvgConnectLatency != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.AvgConnectLatency)) - i-- - dAtA[i] = 0x20 - } - if m.ConnectCnt != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.ConnectCnt)) - i-- - dAtA[i] = 0x18 - } - if len(m.NodeId) > 0 { - i -= len(m.NodeId) - copy(dAtA[i:], m.NodeId) - i = encodeVarintNode(dAtA, i, uint64(len(m.NodeId))) - i-- - dAtA[i] = 0x12 - } - if len(m.tableName) > 0 { - i -= len(m.tableName) - copy(dAtA[i:], m.tableName) - i = encodeVarintNode(dAtA, i, uint64(len(m.tableName))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Node) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Node) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Node) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - { - size, err := m.Node_ExperimentalFlags.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintNode(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xda - { - size, err := m.Node_Geo.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintNode(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xd2 - if len(m.HVal) > 0 { - i -= len(m.HVal) - copy(dAtA[i:], m.HVal) - i = encodeVarintNode(dAtA, i, uint64(len(m.HVal))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xca - } - n6, err6 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.TimeCreated, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.TimeCreated):]) - if err6 != nil { - return 0, err6 - } - i -= n6 - i = encodeVarintNode(dAtA, i, uint64(n6)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xc2 - if m.PeersConnected != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.PeersConnected)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb8 - } - if len(m.CpuInfo) > 0 { - i -= len(m.CpuInfo) - copy(dAtA[i:], m.CpuInfo) - i = encodeVarintNode(dAtA, i, uint64(len(m.CpuInfo))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xaa - } - if len(m.ArchType) > 0 { - i -= len(m.ArchType) - copy(dAtA[i:], m.ArchType) - i = encodeVarintNode(dAtA, i, uint64(len(m.ArchType))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa2 - } - if len(m.OsType) > 0 { - i -= len(m.OsType) - copy(dAtA[i:], m.OsType) - i = encodeVarintNode(dAtA, i, uint64(len(m.OsType))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x9a - } - if m.BlocksDown != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.BlocksDown)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x90 - } - if m.BlocksUp != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.BlocksUp)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x88 - } - if m.Reputation != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Reputation)))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x81 - } - { - size, err := m.Node_Settings.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintNode(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x7a - if m.BandwidthPriceDeal != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.BandwidthPriceDeal)) - i-- - dAtA[i] = 0x70 - } - if m.StoragePriceDeal != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.StoragePriceDeal)) - i-- - dAtA[i] = 0x68 - } - if m.TotalDownload != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.TotalDownload)) - i-- - dAtA[i] = 0x60 - } - if m.TotalUpload != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.TotalUpload)) - i-- - dAtA[i] = 0x58 - } - if m.Download != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.Download)) - i-- - dAtA[i] = 0x50 - } - if m.Upload != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.Upload)) - i-- - dAtA[i] = 0x48 - } - if m.CpuUsed != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.CpuUsed)))) - i-- - dAtA[i] = 0x41 - } - if m.MemoryUsed != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.MemoryUsed)) - i-- - dAtA[i] = 0x38 - } - if m.StorageVolumeCap != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.StorageVolumeCap)) - i-- - dAtA[i] = 0x30 - } - if m.StorageUsed != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.StorageUsed)) - i-- - dAtA[i] = 0x28 - } - if m.UpTime != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.UpTime)) - i-- - dAtA[i] = 0x20 - } - if len(m.BtfsVersion) > 0 { - i -= len(m.BtfsVersion) - copy(dAtA[i:], m.BtfsVersion) - i = encodeVarintNode(dAtA, i, uint64(len(m.BtfsVersion))) - i-- - dAtA[i] = 0x1a - } - if len(m.NodeId) > 0 { - i -= len(m.NodeId) - copy(dAtA[i:], m.NodeId) - i = encodeVarintNode(dAtA, i, uint64(len(m.NodeId))) - i-- - dAtA[i] = 0x12 - } - if len(m.tableName) > 0 { - i -= len(m.tableName) - copy(dAtA[i:], m.tableName) - i = encodeVarintNode(dAtA, i, uint64(len(m.tableName))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Node_Settings) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Node_Settings) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Node_Settings) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.ChallengeCustomizedPricing { - i-- - if m.ChallengeCustomizedPricing { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x70 - } - if m.ChallengePriceCustomized != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.ChallengePriceCustomized)) - i-- - dAtA[i] = 0x68 - } - if m.ChallengePriceDefault != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.ChallengePriceDefault)) - i-- - dAtA[i] = 0x60 - } - if m.RepairCustomizedPricing { - i-- - if m.RepairCustomizedPricing { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x58 - } - if m.RepairPriceCustomized != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.RepairPriceCustomized)) - i-- - dAtA[i] = 0x50 - } - if m.RepairPriceDefault != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.RepairPriceDefault)) - i-- - dAtA[i] = 0x48 - } - if len(m.Roles) > 0 { - dAtA9 := make([]byte, len(m.Roles)*10) - var j8 int - for _, num := range m.Roles { - for num >= 1<<7 { - dAtA9[j8] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j8++ - } - dAtA9[j8] = uint8(num) - j8++ - } - i -= j8 - copy(dAtA[i:], dAtA9[:j8]) - i = encodeVarintNode(dAtA, i, uint64(j8)) - i-- - dAtA[i] = 0x42 - } - if m.CustomizedPricing { - i-- - if m.CustomizedPricing { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x38 - } - if m.StoragePriceDefault != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.StoragePriceDefault)) - i-- - dAtA[i] = 0x30 - } - if m.CollateralStake != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.CollateralStake)) - i-- - dAtA[i] = 0x28 - } - if m.BandwidthLimit != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.BandwidthLimit)))) - i-- - dAtA[i] = 0x21 - } - if m.StorageTimeMin != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.StorageTimeMin)) - i-- - dAtA[i] = 0x18 - } - if m.BandwidthPriceAsk != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.BandwidthPriceAsk)) - i-- - dAtA[i] = 0x10 - } - if m.StoragePriceAsk != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.StoragePriceAsk)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Node_Geo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Node_Geo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Node_Geo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Longitude != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Longitude)))) - i-- - dAtA[i] = 0x25 - } - if m.Latitude != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Latitude)))) - i-- - dAtA[i] = 0x1d - } - if len(m.Region) > 0 { - i -= len(m.Region) - copy(dAtA[i:], m.Region) - i = encodeVarintNode(dAtA, i, uint64(len(m.Region))) - i-- - dAtA[i] = 0x12 - } - if len(m.CountryShort) > 0 { - i -= len(m.CountryShort) - copy(dAtA[i:], m.CountryShort) - i = encodeVarintNode(dAtA, i, uint64(len(m.CountryShort))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Node_ExperimentalFlags) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Node_ExperimentalFlags) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Node_ExperimentalFlags) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.ChallengeHostEnabled { - i-- - if m.ChallengeHostEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x90 - } - if m.RepairHostEnabled { - i-- - if m.RepairHostEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x88 - } - if m.GraphsyncEnabled { - i-- - if m.GraphsyncEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x80 - } - if m.DisableAutoUpdate { - i-- - if m.DisableAutoUpdate { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x78 - } - if m.UrlStoreEnabled { - i-- - if m.UrlStoreEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x70 - } - if m.StrategicProviding { - i-- - if m.StrategicProviding { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x68 - } - if m.StorageHostEnabled { - i-- - if m.StorageHostEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x60 - } - if m.StorageClientEnabled { - i-- - if m.StorageClientEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x58 - } - if m.ShardingEnabled { - i-- - if m.ShardingEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x50 - } - if m.RemoveOnUnpin { - i-- - if m.RemoveOnUnpin { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x48 - } - if m.Quic { - i-- - if m.Quic { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if m.PreferTls { - i-- - if m.PreferTls { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x38 - } - if m.P2PHttpProxy { - i-- - if m.P2PHttpProxy { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - if m.Libp2PStreamMounting { - i-- - if m.Libp2PStreamMounting { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if len(m.HostsSyncMode) > 0 { - i -= len(m.HostsSyncMode) - copy(dAtA[i:], m.HostsSyncMode) - i = encodeVarintNode(dAtA, i, uint64(len(m.HostsSyncMode))) - i-- - dAtA[i] = 0x22 - } - if m.HostsSyncEnabled { - i-- - if m.HostsSyncEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if m.FilestoreEnabled { - i-- - if m.FilestoreEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if m.Analytics { - i-- - if m.Analytics { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *NodeContractStat) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NodeContractStat) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NodeContractStat) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - n10, err10 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.LastModifyTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.LastModifyTime):]) - if err10 != nil { - return 0, err10 - } - i -= n10 - i = encodeVarintNode(dAtA, i, uint64(n10)) - i-- - dAtA[i] = 0x22 - if m.BigMiner { - i-- - if m.BigMiner { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if len(m.NodeId) > 0 { - i -= len(m.NodeId) - copy(dAtA[i:], m.NodeId) - i = encodeVarintNode(dAtA, i, uint64(len(m.NodeId))) - i-- - dAtA[i] = 0x12 - } - if len(m.tableName) > 0 { - i -= len(m.tableName) - copy(dAtA[i:], m.tableName) - i = encodeVarintNode(dAtA, i, uint64(len(m.tableName))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *StorageStat) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StorageStat) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StorageStat) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - { - size, err := m.RenterStats.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintNode(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.HostStats.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintNode(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *StorageStat_HostStats) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StorageStat_HostStats) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StorageStat_HostStats) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - n13, err13 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.LastUpdated, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.LastUpdated):]) - if err13 != nil { - return 0, err13 - } - i -= n13 - i = encodeVarintNode(dAtA, i, uint64(n13)) - i-- - dAtA[i] = 0x7a - if m.DownloadSpeedWeight != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.DownloadSpeedWeight)))) - i-- - dAtA[i] = 0x75 - } - if m.UploadSpeedWeight != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.UploadSpeedWeight)))) - i-- - dAtA[i] = 0x6d - } - if m.SpeedWeight != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.SpeedWeight)))) - i-- - dAtA[i] = 0x65 - } - if m.VersionWeight != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.VersionWeight)))) - i-- - dAtA[i] = 0x5d - } - if m.AgeWeight != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.AgeWeight)))) - i-- - dAtA[i] = 0x55 - } - if m.UptimeWeight != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.UptimeWeight)))) - i-- - dAtA[i] = 0x4d - } - if m.DownloadSpeedScore != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.DownloadSpeedScore)))) - i-- - dAtA[i] = 0x45 - } - if m.UploadSpeedScore != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.UploadSpeedScore)))) - i-- - dAtA[i] = 0x3d - } - if m.SpeedScore != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.SpeedScore)))) - i-- - dAtA[i] = 0x35 - } - if m.VersionScore != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.VersionScore)))) - i-- - dAtA[i] = 0x2d - } - if m.AgeScore != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.AgeScore)))) - i-- - dAtA[i] = 0x25 - } - if m.UptimeScore != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.UptimeScore)))) - i-- - dAtA[i] = 0x1d - } - if m.Score != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Score)))) - i-- - dAtA[i] = 0x15 - } - if m.Uptime != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Uptime)))) - i-- - dAtA[i] = 0xd - } - return len(dAtA) - i, nil -} - -func (m *StorageStat_Host) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StorageStat_Host) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StorageStat_Host) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - { - size, err := m.StorageStat_HostStats.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintNode(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - if m.StorageDiskAvailable != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.StorageDiskAvailable)) - i-- - dAtA[i] = 0x28 - } - if m.StorageDiskTotal != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.StorageDiskTotal)) - i-- - dAtA[i] = 0x20 - } - if m.StorageCap != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.StorageCap)) - i-- - dAtA[i] = 0x18 - } - if m.StorageUsed != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.StorageUsed)) - i-- - dAtA[i] = 0x10 - } - if m.Online { - i-- - if m.Online { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *StorageStat_Renter) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StorageStat_Renter) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StorageStat_Renter) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Reserved) > 0 { - i -= len(m.Reserved) - copy(dAtA[i:], m.Reserved) - i = encodeVarintNode(dAtA, i, uint64(len(m.Reserved))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ContractStat) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ContractStat) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ContractStat) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Role != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.Role)) - i-- - dAtA[i] = 0x30 - } - n15, err15 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.LastContractEnd, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.LastContractEnd):]) - if err15 != nil { - return 0, err15 - } - i -= n15 - i = encodeVarintNode(dAtA, i, uint64(n15)) - i-- - dAtA[i] = 0x2a - n16, err16 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.FirstContractStart, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.FirstContractStart):]) - if err16 != nil { - return 0, err16 - } - i -= n16 - i = encodeVarintNode(dAtA, i, uint64(n16)) - i-- - dAtA[i] = 0x22 - if m.CompensationOutstanding != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.CompensationOutstanding)) - i-- - dAtA[i] = 0x18 - } - if m.CompensationPaid != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.CompensationPaid)) - i-- - dAtA[i] = 0x10 - } - if m.ActiveContractNum != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.ActiveContractNum)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Contracts) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Contracts) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Contracts) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Contracts) > 0 { - for iNdEx := len(m.Contracts) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Contracts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintNode(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Contracts_Contract) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Contracts_Contract) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Contracts_Contract) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - n17, err17 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.LastModifyTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.LastModifyTime):]) - if err17 != nil { - return 0, err17 - } - i -= n17 - i = encodeVarintNode(dAtA, i, uint64(n17)) - i-- - dAtA[i] = 0x72 - if len(m.FileHash) > 0 { - i -= len(m.FileHash) - copy(dAtA[i:], m.FileHash) - i = encodeVarintNode(dAtA, i, uint64(len(m.FileHash))) - i-- - dAtA[i] = 0x6a - } - if len(m.ShardHash) > 0 { - i -= len(m.ShardHash) - copy(dAtA[i:], m.ShardHash) - i = encodeVarintNode(dAtA, i, uint64(len(m.ShardHash))) - i-- - dAtA[i] = 0x62 - } - if m.ShardSize != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.ShardSize)) - i-- - dAtA[i] = 0x58 - } - if m.UnitPrice != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.UnitPrice)) - i-- - dAtA[i] = 0x50 - } - if m.CompensationOutstanding != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.CompensationOutstanding)) - i-- - dAtA[i] = 0x48 - } - if m.CompensationPaid != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.CompensationPaid)) - i-- - dAtA[i] = 0x40 - } - n18, err18 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.NextEscrowTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.NextEscrowTime):]) - if err18 != nil { - return 0, err18 - } - i -= n18 - i = encodeVarintNode(dAtA, i, uint64(n18)) - i-- - dAtA[i] = 0x3a - n19, err19 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.EndTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.EndTime):]) - if err19 != nil { - return 0, err19 - } - i -= n19 - i = encodeVarintNode(dAtA, i, uint64(n19)) - i-- - dAtA[i] = 0x32 - n20, err20 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.StartTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.StartTime):]) - if err20 != nil { - return 0, err20 - } - i -= n20 - i = encodeVarintNode(dAtA, i, uint64(n20)) - i-- - dAtA[i] = 0x2a - if m.Status != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.Status)) - i-- - dAtA[i] = 0x20 - } - if len(m.RenterId) > 0 { - i -= len(m.RenterId) - copy(dAtA[i:], m.RenterId) - i = encodeVarintNode(dAtA, i, uint64(len(m.RenterId))) - i-- - dAtA[i] = 0x1a - } - if len(m.HostId) > 0 { - i -= len(m.HostId) - copy(dAtA[i:], m.HostId) - i = encodeVarintNode(dAtA, i, uint64(len(m.HostId))) - i-- - dAtA[i] = 0x12 - } - if len(m.ContractId) > 0 { - i -= len(m.ContractId) - copy(dAtA[i:], m.ContractId) - i = encodeVarintNode(dAtA, i, uint64(len(m.ContractId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BtfsScanTab) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BtfsScanTab) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BtfsScanTab) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.VersionDistribute) > 0 { - for k := range m.VersionDistribute { - v := m.VersionDistribute[k] - baseI := i - i = encodeVarintNode(dAtA, i, uint64(v)) - i-- - dAtA[i] = 0x10 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintNode(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintNode(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb2 - } - } - if m.BigMiners != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.BigMiners)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa8 - } - if m.TotalMiners != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.TotalMiners)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa0 - } - if m.MinersAllAmount != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.MinersAllAmount)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x98 - } - if m.NewOnlineMinersCount != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.NewOnlineMinersCount)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x90 - } - if m.SuperOnlineMinersCount != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.SuperOnlineMinersCount)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x88 - } - if m.StorageLeftWhenContract != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.StorageLeftWhenContract)))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x81 - } - if m.ContractFailStorage != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.ContractFailStorage)))) - i-- - dAtA[i] = 0x79 - } - if m.ContractAllStorage != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.ContractAllStorage)))) - i-- - dAtA[i] = 0x71 - } - if m.ContractFailCount != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.ContractFailCount)) - i-- - dAtA[i] = 0x68 - } - if m.ContractAllCount != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.ContractAllCount)) - i-- - dAtA[i] = 0x60 - } - if len(m.TotalRank) > 0 { - i -= len(m.TotalRank) - copy(dAtA[i:], m.TotalRank) - i = encodeVarintNode(dAtA, i, uint64(len(m.TotalRank))) - i-- - dAtA[i] = 0x5a - } - if len(m.NewRank) > 0 { - i -= len(m.NewRank) - copy(dAtA[i:], m.NewRank) - i = encodeVarintNode(dAtA, i, uint64(len(m.NewRank))) - i-- - dAtA[i] = 0x52 - } - n21, err21 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.DateCreated, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.DateCreated):]) - if err21 != nil { - return 0, err21 - } - i -= n21 - i = encodeVarintNode(dAtA, i, uint64(n21)) - i-- - dAtA[i] = 0x4a - if m.Price != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Price)))) - i-- - dAtA[i] = 0x41 - } - if m.StorageAlreadyUsed != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.StorageAlreadyUsed)))) - i-- - dAtA[i] = 0x39 - } - n22, err22 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.TimeCreated, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.TimeCreated):]) - if err22 != nil { - return 0, err22 - } - i -= n22 - i = encodeVarintNode(dAtA, i, uint64(n22)) - i-- - dAtA[i] = 0x32 - if len(m.ScoreDistribute) > 0 { - for k := range m.ScoreDistribute { - v := m.ScoreDistribute[k] - baseI := i - i = encodeVarintNode(dAtA, i, uint64(v)) - i-- - dAtA[i] = 0x10 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintNode(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintNode(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x2a - } - } - if len(m.CountryDistribute) > 0 { - for k := range m.CountryDistribute { - v := m.CountryDistribute[k] - baseI := i - i = encodeVarintNode(dAtA, i, uint64(v)) - i-- - dAtA[i] = 0x10 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintNode(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintNode(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x22 - } - } - if m.OnlineMinersNumber != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.OnlineMinersNumber)) - i-- - dAtA[i] = 0x18 - } - if m.StorageVolumeLeft != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.StorageVolumeLeft)))) - i-- - dAtA[i] = 0x11 - } - if len(m.tableName) > 0 { - i -= len(m.tableName) - copy(dAtA[i:], m.tableName) - i = encodeVarintNode(dAtA, i, uint64(len(m.tableName))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ScoreHistoryTab) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ScoreHistoryTab) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ScoreHistoryTab) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - n23, err23 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.TimeCreated, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.TimeCreated):]) - if err23 != nil { - return 0, err23 - } - i -= n23 - i = encodeVarintNode(dAtA, i, uint64(n23)) - i-- - dAtA[i] = 0x3a - n24, err24 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.DateCreated, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.DateCreated):]) - if err24 != nil { - return 0, err24 - } - i -= n24 - i = encodeVarintNode(dAtA, i, uint64(n24)) - i-- - dAtA[i] = 0x32 - if m.Score != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.Score)) - i-- - dAtA[i] = 0x28 - } - if m.StorageVolumeLeft != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.StorageVolumeLeft)) - i-- - dAtA[i] = 0x20 - } - if m.StorageVolumeCap != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.StorageVolumeCap)) - i-- - dAtA[i] = 0x18 - } - if len(m.NodeId) > 0 { - i -= len(m.NodeId) - copy(dAtA[i:], m.NodeId) - i = encodeVarintNode(dAtA, i, uint64(len(m.NodeId))) - i-- - dAtA[i] = 0x12 - } - if len(m.tableName) > 0 { - i -= len(m.tableName) - copy(dAtA[i:], m.tableName) - i = encodeVarintNode(dAtA, i, uint64(len(m.tableName))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AirdropRewardHistoryTab) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AirdropRewardHistoryTab) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AirdropRewardHistoryTab) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.ActualReward != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.ActualReward)) - i-- - dAtA[i] = 0x68 - } - if m.ShouldReward != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.ShouldReward)) - i-- - dAtA[i] = 0x60 - } - if m.FileSize != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.FileSize)) - i-- - dAtA[i] = 0x58 - } - if m.FileCount != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.FileCount)) - i-- - dAtA[i] = 0x50 - } - n25, err25 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.TimeCreated, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.TimeCreated):]) - if err25 != nil { - return 0, err25 - } - i -= n25 - i = encodeVarintNode(dAtA, i, uint64(n25)) - i-- - dAtA[i] = 0x4a - n26, err26 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.DateCreated, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.DateCreated):]) - if err26 != nil { - return 0, err26 - } - i -= n26 - i = encodeVarintNode(dAtA, i, uint64(n26)) - i-- - dAtA[i] = 0x42 - if m.Stake != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.Stake)) - i-- - dAtA[i] = 0x38 - } - if m.Weight != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.Weight)) - i-- - dAtA[i] = 0x30 - } - if m.IsSuspect { - i-- - if m.IsSuspect { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if len(m.NodeId) > 0 { - i -= len(m.NodeId) - copy(dAtA[i:], m.NodeId) - i = encodeVarintNode(dAtA, i, uint64(len(m.NodeId))) - i-- - dAtA[i] = 0x1a - } - if m.Type != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x10 - } - if len(m.tableName) > 0 { - i -= len(m.tableName) - copy(dAtA[i:], m.tableName) - i = encodeVarintNode(dAtA, i, uint64(len(m.tableName))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintNode(dAtA []byte, offset int, v uint64) int { - offset -= sovNode(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedPayLoadInfo(r randyNode, easy bool) *PayLoadInfo { - this := &PayLoadInfo{} - this.NodeId = string(randStringNode(r)) - if r.Intn(5) != 0 { - this.Node = NewPopulatedNode(r, easy) - } - if r.Intn(5) != 0 { - v1 := r.Intn(5) - this.DiscoveryNodes = make([]*DiscoveryNode, v1) - for i := 0; i < v1; i++ { - this.DiscoveryNodes[i] = NewPopulatedDiscoveryNode(r, easy) - } - } - v2 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.LastTime = *v2 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedNode(r, 5) - } - return this -} - -func NewPopulatedDiscoveryNode(r randyNode, easy bool) *DiscoveryNode { - this := &DiscoveryNode{} - this.ToNodeId = string(randStringNode(r)) - this.NodeConnectLatency = int32(r.Int31()) - if r.Intn(2) == 0 { - this.NodeConnectLatency *= -1 - } - this.ErrCode = DiscoveryErrorCode([]int32{0, 1, 2, 3, 10}[r.Intn(5)]) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedNode(r, 4) - } - return this -} - -func NewPopulatedDiscoveryTab(r randyNode, easy bool) *DiscoveryTab { - this := &DiscoveryTab{} - this.tableName = string(randStringNode(r)) - this.NodeId = string(randStringNode(r)) - this.ConnectCnt = uint32(r.Uint32()) - this.AvgConnectLatency = int32(r.Int31()) - if r.Intn(2) == 0 { - this.AvgConnectLatency *= -1 - } - this.ErrCode = DiscoveryErrorCode([]int32{0, 1, 2, 3, 10}[r.Intn(5)]) - this.DiscoveryLabel = int32(r.Int31()) - if r.Intn(2) == 0 { - this.DiscoveryLabel *= -1 - } - v3 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.TimeCreated = *v3 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedNode(r, 8) - } - return this -} - -func NewPopulatedNode(r randyNode, easy bool) *Node { - this := &Node{} - this.tableName = string(randStringNode(r)) - this.NodeId = string(randStringNode(r)) - this.BtfsVersion = string(randStringNode(r)) - this.UpTime = uint64(uint64(r.Uint32())) - this.StorageUsed = uint64(uint64(r.Uint32())) - this.StorageVolumeCap = uint64(uint64(r.Uint32())) - this.MemoryUsed = uint64(uint64(r.Uint32())) - this.CpuUsed = float64(r.Float64()) - if r.Intn(2) == 0 { - this.CpuUsed *= -1 - } - this.Upload = uint64(uint64(r.Uint32())) - this.Download = uint64(uint64(r.Uint32())) - this.TotalUpload = uint64(uint64(r.Uint32())) - this.TotalDownload = uint64(uint64(r.Uint32())) - this.StoragePriceDeal = uint64(uint64(r.Uint32())) - this.BandwidthPriceDeal = uint64(uint64(r.Uint32())) - v4 := NewPopulatedNode_Settings(r, easy) - this.Node_Settings = *v4 - this.Reputation = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Reputation *= -1 - } - this.BlocksUp = uint64(uint64(r.Uint32())) - this.BlocksDown = uint64(uint64(r.Uint32())) - this.OsType = string(randStringNode(r)) - this.ArchType = string(randStringNode(r)) - this.CpuInfo = string(randStringNode(r)) - this.PeersConnected = uint64(uint64(r.Uint32())) - v5 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.TimeCreated = *v5 - this.HVal = string(randStringNode(r)) - v6 := NewPopulatedNode_Geo(r, easy) - this.Node_Geo = *v6 - v7 := NewPopulatedNode_ExperimentalFlags(r, easy) - this.Node_ExperimentalFlags = *v7 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedNode(r, 28) - } - return this -} - -func NewPopulatedNode_Settings(r randyNode, easy bool) *Node_Settings { - this := &Node_Settings{} - this.StoragePriceAsk = uint64(uint64(r.Uint32())) - this.BandwidthPriceAsk = uint64(uint64(r.Uint32())) - this.StorageTimeMin = uint64(uint64(r.Uint32())) - this.BandwidthLimit = float64(r.Float64()) - if r.Intn(2) == 0 { - this.BandwidthLimit *= -1 - } - this.CollateralStake = uint64(uint64(r.Uint32())) - this.StoragePriceDefault = uint64(uint64(r.Uint32())) - this.CustomizedPricing = bool(bool(r.Intn(2) == 0)) - v8 := r.Intn(10) - this.Roles = make([]NodeRole, v8) - for i := 0; i < v8; i++ { - this.Roles[i] = NodeRole([]int32{0, 1, 2, 3, 4, 5, 6, 20}[r.Intn(8)]) - } - this.RepairPriceDefault = uint64(uint64(r.Uint32())) - this.RepairPriceCustomized = uint64(uint64(r.Uint32())) - this.RepairCustomizedPricing = bool(bool(r.Intn(2) == 0)) - this.ChallengePriceDefault = uint64(uint64(r.Uint32())) - this.ChallengePriceCustomized = uint64(uint64(r.Uint32())) - this.ChallengeCustomizedPricing = bool(bool(r.Intn(2) == 0)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedNode(r, 15) - } - return this -} - -func NewPopulatedNode_Geo(r randyNode, easy bool) *Node_Geo { - this := &Node_Geo{} - this.CountryShort = string(randStringNode(r)) - this.Region = string(randStringNode(r)) - this.Latitude = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Latitude *= -1 - } - this.Longitude = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Longitude *= -1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedNode(r, 5) - } - return this -} - -func NewPopulatedNode_ExperimentalFlags(r randyNode, easy bool) *Node_ExperimentalFlags { - this := &Node_ExperimentalFlags{} - this.Analytics = bool(bool(r.Intn(2) == 0)) - this.FilestoreEnabled = bool(bool(r.Intn(2) == 0)) - this.HostsSyncEnabled = bool(bool(r.Intn(2) == 0)) - this.HostsSyncMode = string(randStringNode(r)) - this.Libp2PStreamMounting = bool(bool(r.Intn(2) == 0)) - this.P2PHttpProxy = bool(bool(r.Intn(2) == 0)) - this.PreferTls = bool(bool(r.Intn(2) == 0)) - this.Quic = bool(bool(r.Intn(2) == 0)) - this.RemoveOnUnpin = bool(bool(r.Intn(2) == 0)) - this.ShardingEnabled = bool(bool(r.Intn(2) == 0)) - this.StorageClientEnabled = bool(bool(r.Intn(2) == 0)) - this.StorageHostEnabled = bool(bool(r.Intn(2) == 0)) - this.StrategicProviding = bool(bool(r.Intn(2) == 0)) - this.UrlStoreEnabled = bool(bool(r.Intn(2) == 0)) - this.DisableAutoUpdate = bool(bool(r.Intn(2) == 0)) - this.GraphsyncEnabled = bool(bool(r.Intn(2) == 0)) - this.RepairHostEnabled = bool(bool(r.Intn(2) == 0)) - this.ChallengeHostEnabled = bool(bool(r.Intn(2) == 0)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedNode(r, 19) - } - return this -} - -func NewPopulatedNodeContractStat(r randyNode, easy bool) *NodeContractStat { - this := &NodeContractStat{} - this.tableName = string(randStringNode(r)) - this.NodeId = string(randStringNode(r)) - this.BigMiner = bool(bool(r.Intn(2) == 0)) - v9 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.LastModifyTime = *v9 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedNode(r, 5) - } - return this -} - -func NewPopulatedStorageStat(r randyNode, easy bool) *StorageStat { - this := &StorageStat{} - v10 := NewPopulatedStorageStat_Host(r, easy) - this.HostStats = *v10 - v11 := NewPopulatedStorageStat_Renter(r, easy) - this.RenterStats = *v11 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedNode(r, 3) - } - return this -} - -func NewPopulatedStorageStat_HostStats(r randyNode, easy bool) *StorageStat_HostStats { - this := &StorageStat_HostStats{} - this.Uptime = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Uptime *= -1 - } - this.Score = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Score *= -1 - } - this.UptimeScore = float32(r.Float32()) - if r.Intn(2) == 0 { - this.UptimeScore *= -1 - } - this.AgeScore = float32(r.Float32()) - if r.Intn(2) == 0 { - this.AgeScore *= -1 - } - this.VersionScore = float32(r.Float32()) - if r.Intn(2) == 0 { - this.VersionScore *= -1 - } - this.SpeedScore = float32(r.Float32()) - if r.Intn(2) == 0 { - this.SpeedScore *= -1 - } - this.UploadSpeedScore = float32(r.Float32()) - if r.Intn(2) == 0 { - this.UploadSpeedScore *= -1 - } - this.DownloadSpeedScore = float32(r.Float32()) - if r.Intn(2) == 0 { - this.DownloadSpeedScore *= -1 - } - this.UptimeWeight = float32(r.Float32()) - if r.Intn(2) == 0 { - this.UptimeWeight *= -1 - } - this.AgeWeight = float32(r.Float32()) - if r.Intn(2) == 0 { - this.AgeWeight *= -1 - } - this.VersionWeight = float32(r.Float32()) - if r.Intn(2) == 0 { - this.VersionWeight *= -1 - } - this.SpeedWeight = float32(r.Float32()) - if r.Intn(2) == 0 { - this.SpeedWeight *= -1 - } - this.UploadSpeedWeight = float32(r.Float32()) - if r.Intn(2) == 0 { - this.UploadSpeedWeight *= -1 - } - this.DownloadSpeedWeight = float32(r.Float32()) - if r.Intn(2) == 0 { - this.DownloadSpeedWeight *= -1 - } - v12 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.LastUpdated = *v12 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedNode(r, 16) - } - return this -} - -func NewPopulatedStorageStat_Host(r randyNode, easy bool) *StorageStat_Host { - this := &StorageStat_Host{} - this.Online = bool(bool(r.Intn(2) == 0)) - this.StorageUsed = int64(r.Int63()) - if r.Intn(2) == 0 { - this.StorageUsed *= -1 - } - this.StorageCap = int64(r.Int63()) - if r.Intn(2) == 0 { - this.StorageCap *= -1 - } - this.StorageDiskTotal = int64(r.Int63()) - if r.Intn(2) == 0 { - this.StorageDiskTotal *= -1 - } - this.StorageDiskAvailable = int64(r.Int63()) - if r.Intn(2) == 0 { - this.StorageDiskAvailable *= -1 - } - v13 := NewPopulatedStorageStat_HostStats(r, easy) - this.StorageStat_HostStats = *v13 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedNode(r, 7) - } - return this -} - -func NewPopulatedStorageStat_Renter(r randyNode, easy bool) *StorageStat_Renter { - this := &StorageStat_Renter{} - this.Reserved = string(randStringNode(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedNode(r, 2) - } - return this -} - -func NewPopulatedContractStat(r randyNode, easy bool) *ContractStat { - this := &ContractStat{} - this.ActiveContractNum = int64(r.Int63()) - if r.Intn(2) == 0 { - this.ActiveContractNum *= -1 - } - this.CompensationPaid = int64(r.Int63()) - if r.Intn(2) == 0 { - this.CompensationPaid *= -1 - } - this.CompensationOutstanding = int64(r.Int63()) - if r.Intn(2) == 0 { - this.CompensationOutstanding *= -1 - } - v14 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.FirstContractStart = *v14 - v15 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.LastContractEnd = *v15 - this.Role = ContractStat_Role([]int32{0, 1, 2}[r.Intn(3)]) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedNode(r, 7) - } - return this -} - -func NewPopulatedContracts(r randyNode, easy bool) *Contracts { - this := &Contracts{} - if r.Intn(5) != 0 { - v16 := r.Intn(5) - this.Contracts = make([]*Contracts_Contract, v16) - for i := 0; i < v16; i++ { - this.Contracts[i] = NewPopulatedContracts_Contract(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedNode(r, 2) - } - return this -} - -func NewPopulatedContracts_Contract(r randyNode, easy bool) *Contracts_Contract { - this := &Contracts_Contract{} - this.ContractId = string(randStringNode(r)) - this.HostId = string(randStringNode(r)) - this.RenterId = string(randStringNode(r)) - this.Status = guard.Contract_ContractState([]int32{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}[r.Intn(13)]) - v17 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.StartTime = *v17 - v18 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.EndTime = *v18 - v19 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.NextEscrowTime = *v19 - this.CompensationPaid = int64(r.Int63()) - if r.Intn(2) == 0 { - this.CompensationPaid *= -1 - } - this.CompensationOutstanding = int64(r.Int63()) - if r.Intn(2) == 0 { - this.CompensationOutstanding *= -1 - } - this.UnitPrice = int64(r.Int63()) - if r.Intn(2) == 0 { - this.UnitPrice *= -1 - } - this.ShardSize = int64(r.Int63()) - if r.Intn(2) == 0 { - this.ShardSize *= -1 - } - this.ShardHash = string(randStringNode(r)) - this.FileHash = string(randStringNode(r)) - v20 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.LastModifyTime = *v20 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedNode(r, 15) - } - return this -} - -func NewPopulatedBtfsScanTab(r randyNode, easy bool) *BtfsScanTab { - this := &BtfsScanTab{} - this.tableName = string(randStringNode(r)) - this.StorageVolumeLeft = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StorageVolumeLeft *= -1 - } - this.OnlineMinersNumber = uint32(r.Uint32()) - if r.Intn(5) != 0 { - v21 := r.Intn(10) - this.CountryDistribute = make(map[string]int32) - for i := 0; i < v21; i++ { - v22 := randStringNode(r) - this.CountryDistribute[v22] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.CountryDistribute[v22] *= -1 - } - } - } - if r.Intn(5) != 0 { - v23 := r.Intn(10) - this.ScoreDistribute = make(map[string]int32) - for i := 0; i < v23; i++ { - v24 := randStringNode(r) - this.ScoreDistribute[v24] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.ScoreDistribute[v24] *= -1 - } - } - } - v25 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.TimeCreated = *v25 - this.StorageAlreadyUsed = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StorageAlreadyUsed *= -1 - } - this.Price = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Price *= -1 - } - v26 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.DateCreated = *v26 - this.NewRank = string(randStringNode(r)) - this.TotalRank = string(randStringNode(r)) - this.ContractAllCount = uint32(r.Uint32()) - this.ContractFailCount = uint32(r.Uint32()) - this.ContractAllStorage = float64(r.Float64()) - if r.Intn(2) == 0 { - this.ContractAllStorage *= -1 - } - this.ContractFailStorage = float64(r.Float64()) - if r.Intn(2) == 0 { - this.ContractFailStorage *= -1 - } - this.StorageLeftWhenContract = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StorageLeftWhenContract *= -1 - } - this.SuperOnlineMinersCount = uint32(r.Uint32()) - this.NewOnlineMinersCount = uint32(r.Uint32()) - this.MinersAllAmount = int64(r.Int63()) - if r.Intn(2) == 0 { - this.MinersAllAmount *= -1 - } - this.TotalMiners = int64(r.Int63()) - if r.Intn(2) == 0 { - this.TotalMiners *= -1 - } - this.BigMiners = int64(r.Int63()) - if r.Intn(2) == 0 { - this.BigMiners *= -1 - } - if r.Intn(5) != 0 { - v27 := r.Intn(10) - this.VersionDistribute = make(map[string]int32) - for i := 0; i < v27; i++ { - v28 := randStringNode(r) - this.VersionDistribute[v28] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.VersionDistribute[v28] *= -1 - } - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedNode(r, 23) - } - return this -} - -func NewPopulatedScoreHistoryTab(r randyNode, easy bool) *ScoreHistoryTab { - this := &ScoreHistoryTab{} - this.tableName = string(randStringNode(r)) - this.NodeId = string(randStringNode(r)) - this.StorageVolumeCap = uint64(uint64(r.Uint32())) - this.StorageVolumeLeft = uint64(uint64(r.Uint32())) - this.Score = uint32(r.Uint32()) - v29 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.DateCreated = *v29 - v30 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.TimeCreated = *v30 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedNode(r, 8) - } - return this -} - -func NewPopulatedAirdropRewardHistoryTab(r randyNode, easy bool) *AirdropRewardHistoryTab { - this := &AirdropRewardHistoryTab{} - this.tableName = string(randStringNode(r)) - this.Type = uint32(r.Uint32()) - this.NodeId = string(randStringNode(r)) - this.IsSuspect = bool(bool(r.Intn(2) == 0)) - this.Weight = uint32(r.Uint32()) - this.Stake = uint32(r.Uint32()) - v31 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.DateCreated = *v31 - v32 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.TimeCreated = *v32 - this.FileCount = uint32(r.Uint32()) - this.FileSize = uint64(uint64(r.Uint32())) - this.ShouldReward = uint64(uint64(r.Uint32())) - this.ActualReward = uint64(uint64(r.Uint32())) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedNode(r, 14) - } - return this -} - -type randyNode interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneNode(r randyNode) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringNode(r randyNode) string { - v33 := r.Intn(100) - tmps := make([]rune, v33) - for i := 0; i < v33; i++ { - tmps[i] = randUTF8RuneNode(r) - } - return string(tmps) -} -func randUnrecognizedNode(r randyNode, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldNode(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldNode(dAtA []byte, r randyNode, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateNode(dAtA, uint64(key)) - v34 := r.Int63() - if r.Intn(2) == 0 { - v34 *= -1 - } - dAtA = encodeVarintPopulateNode(dAtA, uint64(v34)) - case 1: - dAtA = encodeVarintPopulateNode(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateNode(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateNode(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateNode(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateNode(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *PayLoadInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.NodeId) - if l > 0 { - n += 1 + l + sovNode(uint64(l)) - } - if m.Node != nil { - l = m.Node.Size() - n += 1 + l + sovNode(uint64(l)) - } - if len(m.DiscoveryNodes) > 0 { - for _, e := range m.DiscoveryNodes { - l = e.Size() - n += 1 + l + sovNode(uint64(l)) - } - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.LastTime) - n += 1 + l + sovNode(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DiscoveryNode) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ToNodeId) - if l > 0 { - n += 1 + l + sovNode(uint64(l)) - } - if m.NodeConnectLatency != 0 { - n += 1 + sovNode(uint64(m.NodeConnectLatency)) - } - if m.ErrCode != 0 { - n += 1 + sovNode(uint64(m.ErrCode)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DiscoveryTab) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.tableName) - if l > 0 { - n += 1 + l + sovNode(uint64(l)) - } - l = len(m.NodeId) - if l > 0 { - n += 1 + l + sovNode(uint64(l)) - } - if m.ConnectCnt != 0 { - n += 1 + sovNode(uint64(m.ConnectCnt)) - } - if m.AvgConnectLatency != 0 { - n += 1 + sovNode(uint64(m.AvgConnectLatency)) - } - if m.ErrCode != 0 { - n += 1 + sovNode(uint64(m.ErrCode)) - } - if m.DiscoveryLabel != 0 { - n += 1 + sovNode(uint64(m.DiscoveryLabel)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.TimeCreated) - n += 1 + l + sovNode(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Node) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.tableName) - if l > 0 { - n += 1 + l + sovNode(uint64(l)) - } - l = len(m.NodeId) - if l > 0 { - n += 1 + l + sovNode(uint64(l)) - } - l = len(m.BtfsVersion) - if l > 0 { - n += 1 + l + sovNode(uint64(l)) - } - if m.UpTime != 0 { - n += 1 + sovNode(uint64(m.UpTime)) - } - if m.StorageUsed != 0 { - n += 1 + sovNode(uint64(m.StorageUsed)) - } - if m.StorageVolumeCap != 0 { - n += 1 + sovNode(uint64(m.StorageVolumeCap)) - } - if m.MemoryUsed != 0 { - n += 1 + sovNode(uint64(m.MemoryUsed)) - } - if m.CpuUsed != 0 { - n += 9 - } - if m.Upload != 0 { - n += 1 + sovNode(uint64(m.Upload)) - } - if m.Download != 0 { - n += 1 + sovNode(uint64(m.Download)) - } - if m.TotalUpload != 0 { - n += 1 + sovNode(uint64(m.TotalUpload)) - } - if m.TotalDownload != 0 { - n += 1 + sovNode(uint64(m.TotalDownload)) - } - if m.StoragePriceDeal != 0 { - n += 1 + sovNode(uint64(m.StoragePriceDeal)) - } - if m.BandwidthPriceDeal != 0 { - n += 1 + sovNode(uint64(m.BandwidthPriceDeal)) - } - l = m.Node_Settings.Size() - n += 1 + l + sovNode(uint64(l)) - if m.Reputation != 0 { - n += 10 - } - if m.BlocksUp != 0 { - n += 2 + sovNode(uint64(m.BlocksUp)) - } - if m.BlocksDown != 0 { - n += 2 + sovNode(uint64(m.BlocksDown)) - } - l = len(m.OsType) - if l > 0 { - n += 2 + l + sovNode(uint64(l)) - } - l = len(m.ArchType) - if l > 0 { - n += 2 + l + sovNode(uint64(l)) - } - l = len(m.CpuInfo) - if l > 0 { - n += 2 + l + sovNode(uint64(l)) - } - if m.PeersConnected != 0 { - n += 2 + sovNode(uint64(m.PeersConnected)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.TimeCreated) - n += 2 + l + sovNode(uint64(l)) - l = len(m.HVal) - if l > 0 { - n += 2 + l + sovNode(uint64(l)) - } - l = m.Node_Geo.Size() - n += 2 + l + sovNode(uint64(l)) - l = m.Node_ExperimentalFlags.Size() - n += 2 + l + sovNode(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Node_Settings) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.StoragePriceAsk != 0 { - n += 1 + sovNode(uint64(m.StoragePriceAsk)) - } - if m.BandwidthPriceAsk != 0 { - n += 1 + sovNode(uint64(m.BandwidthPriceAsk)) - } - if m.StorageTimeMin != 0 { - n += 1 + sovNode(uint64(m.StorageTimeMin)) - } - if m.BandwidthLimit != 0 { - n += 9 - } - if m.CollateralStake != 0 { - n += 1 + sovNode(uint64(m.CollateralStake)) - } - if m.StoragePriceDefault != 0 { - n += 1 + sovNode(uint64(m.StoragePriceDefault)) - } - if m.CustomizedPricing { - n += 2 - } - if len(m.Roles) > 0 { - l = 0 - for _, e := range m.Roles { - l += sovNode(uint64(e)) - } - n += 1 + sovNode(uint64(l)) + l - } - if m.RepairPriceDefault != 0 { - n += 1 + sovNode(uint64(m.RepairPriceDefault)) - } - if m.RepairPriceCustomized != 0 { - n += 1 + sovNode(uint64(m.RepairPriceCustomized)) - } - if m.RepairCustomizedPricing { - n += 2 - } - if m.ChallengePriceDefault != 0 { - n += 1 + sovNode(uint64(m.ChallengePriceDefault)) - } - if m.ChallengePriceCustomized != 0 { - n += 1 + sovNode(uint64(m.ChallengePriceCustomized)) - } - if m.ChallengeCustomizedPricing { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Node_Geo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.CountryShort) - if l > 0 { - n += 1 + l + sovNode(uint64(l)) - } - l = len(m.Region) - if l > 0 { - n += 1 + l + sovNode(uint64(l)) - } - if m.Latitude != 0 { - n += 5 - } - if m.Longitude != 0 { - n += 5 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Node_ExperimentalFlags) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Analytics { - n += 2 - } - if m.FilestoreEnabled { - n += 2 - } - if m.HostsSyncEnabled { - n += 2 - } - l = len(m.HostsSyncMode) - if l > 0 { - n += 1 + l + sovNode(uint64(l)) - } - if m.Libp2PStreamMounting { - n += 2 - } - if m.P2PHttpProxy { - n += 2 - } - if m.PreferTls { - n += 2 - } - if m.Quic { - n += 2 - } - if m.RemoveOnUnpin { - n += 2 - } - if m.ShardingEnabled { - n += 2 - } - if m.StorageClientEnabled { - n += 2 - } - if m.StorageHostEnabled { - n += 2 - } - if m.StrategicProviding { - n += 2 - } - if m.UrlStoreEnabled { - n += 2 - } - if m.DisableAutoUpdate { - n += 2 - } - if m.GraphsyncEnabled { - n += 3 - } - if m.RepairHostEnabled { - n += 3 - } - if m.ChallengeHostEnabled { - n += 3 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NodeContractStat) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.tableName) - if l > 0 { - n += 1 + l + sovNode(uint64(l)) - } - l = len(m.NodeId) - if l > 0 { - n += 1 + l + sovNode(uint64(l)) - } - if m.BigMiner { - n += 2 - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.LastModifyTime) - n += 1 + l + sovNode(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *StorageStat) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.HostStats.Size() - n += 1 + l + sovNode(uint64(l)) - l = m.RenterStats.Size() - n += 1 + l + sovNode(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *StorageStat_HostStats) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Uptime != 0 { - n += 5 - } - if m.Score != 0 { - n += 5 - } - if m.UptimeScore != 0 { - n += 5 - } - if m.AgeScore != 0 { - n += 5 - } - if m.VersionScore != 0 { - n += 5 - } - if m.SpeedScore != 0 { - n += 5 - } - if m.UploadSpeedScore != 0 { - n += 5 - } - if m.DownloadSpeedScore != 0 { - n += 5 - } - if m.UptimeWeight != 0 { - n += 5 - } - if m.AgeWeight != 0 { - n += 5 - } - if m.VersionWeight != 0 { - n += 5 - } - if m.SpeedWeight != 0 { - n += 5 - } - if m.UploadSpeedWeight != 0 { - n += 5 - } - if m.DownloadSpeedWeight != 0 { - n += 5 - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.LastUpdated) - n += 1 + l + sovNode(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *StorageStat_Host) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Online { - n += 2 - } - if m.StorageUsed != 0 { - n += 1 + sovNode(uint64(m.StorageUsed)) - } - if m.StorageCap != 0 { - n += 1 + sovNode(uint64(m.StorageCap)) - } - if m.StorageDiskTotal != 0 { - n += 1 + sovNode(uint64(m.StorageDiskTotal)) - } - if m.StorageDiskAvailable != 0 { - n += 1 + sovNode(uint64(m.StorageDiskAvailable)) - } - l = m.StorageStat_HostStats.Size() - n += 1 + l + sovNode(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *StorageStat_Renter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Reserved) - if l > 0 { - n += 1 + l + sovNode(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ContractStat) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ActiveContractNum != 0 { - n += 1 + sovNode(uint64(m.ActiveContractNum)) - } - if m.CompensationPaid != 0 { - n += 1 + sovNode(uint64(m.CompensationPaid)) - } - if m.CompensationOutstanding != 0 { - n += 1 + sovNode(uint64(m.CompensationOutstanding)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.FirstContractStart) - n += 1 + l + sovNode(uint64(l)) - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.LastContractEnd) - n += 1 + l + sovNode(uint64(l)) - if m.Role != 0 { - n += 1 + sovNode(uint64(m.Role)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Contracts) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Contracts) > 0 { - for _, e := range m.Contracts { - l = e.Size() - n += 1 + l + sovNode(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Contracts_Contract) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ContractId) - if l > 0 { - n += 1 + l + sovNode(uint64(l)) - } - l = len(m.HostId) - if l > 0 { - n += 1 + l + sovNode(uint64(l)) - } - l = len(m.RenterId) - if l > 0 { - n += 1 + l + sovNode(uint64(l)) - } - if m.Status != 0 { - n += 1 + sovNode(uint64(m.Status)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.StartTime) - n += 1 + l + sovNode(uint64(l)) - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.EndTime) - n += 1 + l + sovNode(uint64(l)) - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.NextEscrowTime) - n += 1 + l + sovNode(uint64(l)) - if m.CompensationPaid != 0 { - n += 1 + sovNode(uint64(m.CompensationPaid)) - } - if m.CompensationOutstanding != 0 { - n += 1 + sovNode(uint64(m.CompensationOutstanding)) - } - if m.UnitPrice != 0 { - n += 1 + sovNode(uint64(m.UnitPrice)) - } - if m.ShardSize != 0 { - n += 1 + sovNode(uint64(m.ShardSize)) - } - l = len(m.ShardHash) - if l > 0 { - n += 1 + l + sovNode(uint64(l)) - } - l = len(m.FileHash) - if l > 0 { - n += 1 + l + sovNode(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.LastModifyTime) - n += 1 + l + sovNode(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *BtfsScanTab) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.tableName) - if l > 0 { - n += 1 + l + sovNode(uint64(l)) - } - if m.StorageVolumeLeft != 0 { - n += 9 - } - if m.OnlineMinersNumber != 0 { - n += 1 + sovNode(uint64(m.OnlineMinersNumber)) - } - if len(m.CountryDistribute) > 0 { - for k, v := range m.CountryDistribute { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovNode(uint64(len(k))) + 1 + sovNode(uint64(v)) - n += mapEntrySize + 1 + sovNode(uint64(mapEntrySize)) - } - } - if len(m.ScoreDistribute) > 0 { - for k, v := range m.ScoreDistribute { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovNode(uint64(len(k))) + 1 + sovNode(uint64(v)) - n += mapEntrySize + 1 + sovNode(uint64(mapEntrySize)) - } - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.TimeCreated) - n += 1 + l + sovNode(uint64(l)) - if m.StorageAlreadyUsed != 0 { - n += 9 - } - if m.Price != 0 { - n += 9 - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.DateCreated) - n += 1 + l + sovNode(uint64(l)) - l = len(m.NewRank) - if l > 0 { - n += 1 + l + sovNode(uint64(l)) - } - l = len(m.TotalRank) - if l > 0 { - n += 1 + l + sovNode(uint64(l)) - } - if m.ContractAllCount != 0 { - n += 1 + sovNode(uint64(m.ContractAllCount)) - } - if m.ContractFailCount != 0 { - n += 1 + sovNode(uint64(m.ContractFailCount)) - } - if m.ContractAllStorage != 0 { - n += 9 - } - if m.ContractFailStorage != 0 { - n += 9 - } - if m.StorageLeftWhenContract != 0 { - n += 10 - } - if m.SuperOnlineMinersCount != 0 { - n += 2 + sovNode(uint64(m.SuperOnlineMinersCount)) - } - if m.NewOnlineMinersCount != 0 { - n += 2 + sovNode(uint64(m.NewOnlineMinersCount)) - } - if m.MinersAllAmount != 0 { - n += 2 + sovNode(uint64(m.MinersAllAmount)) - } - if m.TotalMiners != 0 { - n += 2 + sovNode(uint64(m.TotalMiners)) - } - if m.BigMiners != 0 { - n += 2 + sovNode(uint64(m.BigMiners)) - } - if len(m.VersionDistribute) > 0 { - for k, v := range m.VersionDistribute { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovNode(uint64(len(k))) + 1 + sovNode(uint64(v)) - n += mapEntrySize + 2 + sovNode(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ScoreHistoryTab) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.tableName) - if l > 0 { - n += 1 + l + sovNode(uint64(l)) - } - l = len(m.NodeId) - if l > 0 { - n += 1 + l + sovNode(uint64(l)) - } - if m.StorageVolumeCap != 0 { - n += 1 + sovNode(uint64(m.StorageVolumeCap)) - } - if m.StorageVolumeLeft != 0 { - n += 1 + sovNode(uint64(m.StorageVolumeLeft)) - } - if m.Score != 0 { - n += 1 + sovNode(uint64(m.Score)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.DateCreated) - n += 1 + l + sovNode(uint64(l)) - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.TimeCreated) - n += 1 + l + sovNode(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AirdropRewardHistoryTab) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.tableName) - if l > 0 { - n += 1 + l + sovNode(uint64(l)) - } - if m.Type != 0 { - n += 1 + sovNode(uint64(m.Type)) - } - l = len(m.NodeId) - if l > 0 { - n += 1 + l + sovNode(uint64(l)) - } - if m.IsSuspect { - n += 2 - } - if m.Weight != 0 { - n += 1 + sovNode(uint64(m.Weight)) - } - if m.Stake != 0 { - n += 1 + sovNode(uint64(m.Stake)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.DateCreated) - n += 1 + l + sovNode(uint64(l)) - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.TimeCreated) - n += 1 + l + sovNode(uint64(l)) - if m.FileCount != 0 { - n += 1 + sovNode(uint64(m.FileCount)) - } - if m.FileSize != 0 { - n += 1 + sovNode(uint64(m.FileSize)) - } - if m.ShouldReward != 0 { - n += 1 + sovNode(uint64(m.ShouldReward)) - } - if m.ActualReward != 0 { - n += 1 + sovNode(uint64(m.ActualReward)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovNode(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozNode(x uint64) (n int) { - return sovNode(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *PayLoadInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PayLoadInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PayLoadInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NodeId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Node == nil { - m.Node = &Node{} - } - if err := m.Node.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DiscoveryNodes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DiscoveryNodes = append(m.DiscoveryNodes, &DiscoveryNode{}) - if err := m.DiscoveryNodes[len(m.DiscoveryNodes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.LastTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNode(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DiscoveryNode) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DiscoveryNode: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DiscoveryNode: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ToNodeId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ToNodeId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeConnectLatency", wireType) - } - m.NodeConnectLatency = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NodeConnectLatency |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ErrCode", wireType) - } - m.ErrCode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ErrCode |= DiscoveryErrorCode(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipNode(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DiscoveryTab) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DiscoveryTab: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DiscoveryTab: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field tableName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.tableName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NodeId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ConnectCnt", wireType) - } - m.ConnectCnt = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ConnectCnt |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AvgConnectLatency", wireType) - } - m.AvgConnectLatency = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AvgConnectLatency |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ErrCode", wireType) - } - m.ErrCode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ErrCode |= DiscoveryErrorCode(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DiscoveryLabel", wireType) - } - m.DiscoveryLabel = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DiscoveryLabel |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeCreated", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.TimeCreated, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNode(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Node) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Node: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Node: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field tableName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.tableName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NodeId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BtfsVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BtfsVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UpTime", wireType) - } - m.UpTime = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.UpTime |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageUsed", wireType) - } - m.StorageUsed = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StorageUsed |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageVolumeCap", wireType) - } - m.StorageVolumeCap = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StorageVolumeCap |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MemoryUsed", wireType) - } - m.MemoryUsed = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MemoryUsed |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field CpuUsed", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.CpuUsed = float64(math.Float64frombits(v)) - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Upload", wireType) - } - m.Upload = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Upload |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Download", wireType) - } - m.Download = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Download |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalUpload", wireType) - } - m.TotalUpload = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalUpload |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalDownload", wireType) - } - m.TotalDownload = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalDownload |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StoragePriceDeal", wireType) - } - m.StoragePriceDeal = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StoragePriceDeal |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 14: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BandwidthPriceDeal", wireType) - } - m.BandwidthPriceDeal = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BandwidthPriceDeal |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Node_Settings", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Node_Settings.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 16: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Reputation", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Reputation = float64(math.Float64frombits(v)) - case 17: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlocksUp", wireType) - } - m.BlocksUp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlocksUp |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 18: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlocksDown", wireType) - } - m.BlocksDown = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlocksDown |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 19: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OsType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OsType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 20: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ArchType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ArchType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 21: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CpuInfo", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CpuInfo = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 23: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PeersConnected", wireType) - } - m.PeersConnected = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PeersConnected |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 24: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeCreated", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.TimeCreated, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 25: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HVal", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HVal = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 26: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Node_Geo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Node_Geo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 27: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Node_ExperimentalFlags", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Node_ExperimentalFlags.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNode(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Node_Settings) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Settings: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Settings: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StoragePriceAsk", wireType) - } - m.StoragePriceAsk = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StoragePriceAsk |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BandwidthPriceAsk", wireType) - } - m.BandwidthPriceAsk = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BandwidthPriceAsk |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageTimeMin", wireType) - } - m.StorageTimeMin = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StorageTimeMin |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field BandwidthLimit", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.BandwidthLimit = float64(math.Float64frombits(v)) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CollateralStake", wireType) - } - m.CollateralStake = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CollateralStake |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StoragePriceDefault", wireType) - } - m.StoragePriceDefault = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StoragePriceDefault |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CustomizedPricing", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.CustomizedPricing = bool(v != 0) - case 8: - if wireType == 0 { - var v NodeRole - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= NodeRole(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Roles = append(m.Roles, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - if elementCount != 0 && len(m.Roles) == 0 { - m.Roles = make([]NodeRole, 0, elementCount) - } - for iNdEx < postIndex { - var v NodeRole - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= NodeRole(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Roles = append(m.Roles, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Roles", wireType) - } - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RepairPriceDefault", wireType) - } - m.RepairPriceDefault = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RepairPriceDefault |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RepairPriceCustomized", wireType) - } - m.RepairPriceCustomized = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RepairPriceCustomized |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RepairCustomizedPricing", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.RepairCustomizedPricing = bool(v != 0) - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ChallengePriceDefault", wireType) - } - m.ChallengePriceDefault = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ChallengePriceDefault |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ChallengePriceCustomized", wireType) - } - m.ChallengePriceCustomized = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ChallengePriceCustomized |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 14: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ChallengeCustomizedPricing", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ChallengeCustomizedPricing = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipNode(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Node_Geo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Geo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Geo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CountryShort", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CountryShort = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Region", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Region = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Latitude", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Latitude = float32(math.Float32frombits(v)) - case 4: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Longitude", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Longitude = float32(math.Float32frombits(v)) - default: - iNdEx = preIndex - skippy, err := skipNode(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Node_ExperimentalFlags) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExperimentalFlags: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExperimentalFlags: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Analytics", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Analytics = bool(v != 0) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FilestoreEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.FilestoreEnabled = bool(v != 0) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HostsSyncEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.HostsSyncEnabled = bool(v != 0) - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostsSyncMode", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostsSyncMode = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Libp2PStreamMounting", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Libp2PStreamMounting = bool(v != 0) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field P2PHttpProxy", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.P2PHttpProxy = bool(v != 0) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PreferTls", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.PreferTls = bool(v != 0) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Quic", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Quic = bool(v != 0) - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RemoveOnUnpin", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.RemoveOnUnpin = bool(v != 0) - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ShardingEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ShardingEnabled = bool(v != 0) - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageClientEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.StorageClientEnabled = bool(v != 0) - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageHostEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.StorageHostEnabled = bool(v != 0) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StrategicProviding", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.StrategicProviding = bool(v != 0) - case 14: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UrlStoreEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.UrlStoreEnabled = bool(v != 0) - case 15: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DisableAutoUpdate", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.DisableAutoUpdate = bool(v != 0) - case 16: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GraphsyncEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.GraphsyncEnabled = bool(v != 0) - case 17: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RepairHostEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.RepairHostEnabled = bool(v != 0) - case 18: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ChallengeHostEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ChallengeHostEnabled = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipNode(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NodeContractStat) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NodeContractStat: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NodeContractStat: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field tableName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.tableName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NodeId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BigMiner", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.BigMiner = bool(v != 0) - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastModifyTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.LastModifyTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNode(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StorageStat) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StorageStat: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StorageStat: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostStats", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.HostStats.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RenterStats", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.RenterStats.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNode(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StorageStat_HostStats) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HostStats: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HostStats: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Uptime", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Uptime = float32(math.Float32frombits(v)) - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Score", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Score = float32(math.Float32frombits(v)) - case 3: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field UptimeScore", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.UptimeScore = float32(math.Float32frombits(v)) - case 4: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field AgeScore", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.AgeScore = float32(math.Float32frombits(v)) - case 5: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field VersionScore", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.VersionScore = float32(math.Float32frombits(v)) - case 6: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field SpeedScore", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.SpeedScore = float32(math.Float32frombits(v)) - case 7: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field UploadSpeedScore", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.UploadSpeedScore = float32(math.Float32frombits(v)) - case 8: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field DownloadSpeedScore", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.DownloadSpeedScore = float32(math.Float32frombits(v)) - case 9: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field UptimeWeight", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.UptimeWeight = float32(math.Float32frombits(v)) - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field AgeWeight", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.AgeWeight = float32(math.Float32frombits(v)) - case 11: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field VersionWeight", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.VersionWeight = float32(math.Float32frombits(v)) - case 12: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field SpeedWeight", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.SpeedWeight = float32(math.Float32frombits(v)) - case 13: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field UploadSpeedWeight", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.UploadSpeedWeight = float32(math.Float32frombits(v)) - case 14: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field DownloadSpeedWeight", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.DownloadSpeedWeight = float32(math.Float32frombits(v)) - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastUpdated", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.LastUpdated, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNode(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StorageStat_Host) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Host: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Host: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Online", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Online = bool(v != 0) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageUsed", wireType) - } - m.StorageUsed = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StorageUsed |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageCap", wireType) - } - m.StorageCap = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StorageCap |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageDiskTotal", wireType) - } - m.StorageDiskTotal = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StorageDiskTotal |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageDiskAvailable", wireType) - } - m.StorageDiskAvailable = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StorageDiskAvailable |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageStat_HostStats", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.StorageStat_HostStats.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNode(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StorageStat_Renter) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Renter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Renter: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reserved", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Reserved = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNode(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ContractStat) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ContractStat: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ContractStat: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ActiveContractNum", wireType) - } - m.ActiveContractNum = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ActiveContractNum |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CompensationPaid", wireType) - } - m.CompensationPaid = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CompensationPaid |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CompensationOutstanding", wireType) - } - m.CompensationOutstanding = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CompensationOutstanding |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FirstContractStart", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.FirstContractStart, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastContractEnd", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.LastContractEnd, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) - } - m.Role = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Role |= ContractStat_Role(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipNode(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Contracts) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Contracts: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Contracts: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Contracts", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Contracts = append(m.Contracts, &Contracts_Contract{}) - if err := m.Contracts[len(m.Contracts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNode(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Contracts_Contract) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Contract: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Contract: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContractId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RenterId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RenterId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - m.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Status |= guard.Contract_ContractState(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.StartTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EndTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.EndTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NextEscrowTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.NextEscrowTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CompensationPaid", wireType) - } - m.CompensationPaid = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CompensationPaid |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CompensationOutstanding", wireType) - } - m.CompensationOutstanding = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CompensationOutstanding |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UnitPrice", wireType) - } - m.UnitPrice = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.UnitPrice |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ShardSize", wireType) - } - m.ShardSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ShardSize |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ShardHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ShardHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FileHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FileHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastModifyTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.LastModifyTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNode(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BtfsScanTab) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BtfsScanTab: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BtfsScanTab: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field tableName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.tableName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageVolumeLeft", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.StorageVolumeLeft = float64(math.Float64frombits(v)) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field OnlineMinersNumber", wireType) - } - m.OnlineMinersNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.OnlineMinersNumber |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CountryDistribute", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CountryDistribute == nil { - m.CountryDistribute = make(map[string]int32) - } - var mapkey string - var mapvalue int32 - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthNode - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthNode - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapvalue |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipNode(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.CountryDistribute[mapkey] = mapvalue - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ScoreDistribute", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ScoreDistribute == nil { - m.ScoreDistribute = make(map[string]int32) - } - var mapkey string - var mapvalue int32 - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthNode - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthNode - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapvalue |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipNode(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.ScoreDistribute[mapkey] = mapvalue - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeCreated", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.TimeCreated, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageAlreadyUsed", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.StorageAlreadyUsed = float64(math.Float64frombits(v)) - case 8: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Price = float64(math.Float64frombits(v)) - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DateCreated", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.DateCreated, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NewRank", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NewRank = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalRank", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TotalRank = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractAllCount", wireType) - } - m.ContractAllCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ContractAllCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractFailCount", wireType) - } - m.ContractFailCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ContractFailCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 14: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractAllStorage", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.ContractAllStorage = float64(math.Float64frombits(v)) - case 15: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractFailStorage", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.ContractFailStorage = float64(math.Float64frombits(v)) - case 16: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageLeftWhenContract", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.StorageLeftWhenContract = float64(math.Float64frombits(v)) - case 17: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SuperOnlineMinersCount", wireType) - } - m.SuperOnlineMinersCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SuperOnlineMinersCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 18: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NewOnlineMinersCount", wireType) - } - m.NewOnlineMinersCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NewOnlineMinersCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 19: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MinersAllAmount", wireType) - } - m.MinersAllAmount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MinersAllAmount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 20: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalMiners", wireType) - } - m.TotalMiners = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalMiners |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 21: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BigMiners", wireType) - } - m.BigMiners = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BigMiners |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 22: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VersionDistribute", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.VersionDistribute == nil { - m.VersionDistribute = make(map[string]int32) - } - var mapkey string - var mapvalue int32 - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthNode - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthNode - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapvalue |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipNode(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.VersionDistribute[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNode(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ScoreHistoryTab) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ScoreHistoryTab: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ScoreHistoryTab: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field tableName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.tableName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NodeId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageVolumeCap", wireType) - } - m.StorageVolumeCap = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StorageVolumeCap |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageVolumeLeft", wireType) - } - m.StorageVolumeLeft = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StorageVolumeLeft |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Score", wireType) - } - m.Score = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Score |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DateCreated", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.DateCreated, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeCreated", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.TimeCreated, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNode(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AirdropRewardHistoryTab) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AirdropRewardHistoryTab: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AirdropRewardHistoryTab: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field tableName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.tableName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NodeId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsSuspect", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsSuspect = bool(v != 0) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType) - } - m.Weight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Weight |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Stake", wireType) - } - m.Stake = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Stake |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DateCreated", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.DateCreated, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeCreated", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.TimeCreated, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FileCount", wireType) - } - m.FileCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FileCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FileSize", wireType) - } - m.FileSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FileSize |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ShouldReward", wireType) - } - m.ShouldReward = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ShouldReward |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ActualReward", wireType) - } - m.ActualReward = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ActualReward |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipNode(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipNode(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowNode - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowNode - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowNode - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthNode - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupNode - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthNode - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthNode = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowNode = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupNode = fmt.Errorf("proto: unexpected end of group") -) diff --git a/protos/node/node.proto b/protos/node/node.proto deleted file mode 100644 index 86f98b5..0000000 --- a/protos/node/node.proto +++ /dev/null @@ -1,330 +0,0 @@ -syntax = "proto3"; - -package node; - -// gogo plugin toggles -option (gogoproto.gogoproto_import) = true; -option (gogoproto.goproto_registration) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.messagename_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.unmarshaler_all) = true; -// golang option -option go_package = "node"; -// java options -option java_multiple_files = true; -option java_outer_classname = "NodeProto"; -option java_package = "io.btfs.node"; - -import "github.com/bittorrent/go-btfs-common/protos/guard/guard.proto"; -import "github.com/tron-us/protobuf/gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; - -enum NodeRole { - RENTER = 0; - HOST = 1; - REPAIRER = 2; - CHALLENGER = 3; - NETWORK_CHECKER = 4; - REPUTATION_CHECKER = 5; - CDN_PROVIDER = 6; - OTHER = 20; -} - -message PayLoadInfo { - string node_id = 1; - Node node = 2; - repeated DiscoveryNode discovery_nodes = 3; - google.protobuf.Timestamp last_time = 4 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; -} - -enum DiscoveryErrorCode { - SUCCESS = 0; - UNCONNECTED = 1; - TIMEOUT = 2; - ABSOLUTELY_UNOPEN = 3; - OTHER_REASON = 10; -} - -message DiscoveryNode { - string to_node_id = 1; - int32 node_connect_latency = 2; - DiscoveryErrorCode err_code = 3; -} - -message DiscoveryTab { - string table_name = 1 [(gogoproto.moretags) = "pg:\"node_discovery,alias:t,discard_unknown_columns\""]; - string node_id = 2; - uint32 connect_cnt = 3; - int32 avg_connect_latency = 4; - DiscoveryErrorCode err_code = 5; - int32 discovery_label = 6; - google.protobuf.Timestamp time_created = 7 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; -} - -message Node { - message Settings { - uint64 storage_price_ask = 1; - uint64 bandwidth_price_ask = 2; - uint64 storage_time_min = 3; - double bandwidth_limit = 4; - uint64 collateral_stake = 5; - uint64 storage_price_default = 6; // network default - bool customized_pricing = 7; // whether to use storage_price_ask - repeated NodeRole roles = 8 [(gogoproto.pgtag) = "roles,array"]; - uint64 repair_price_default = 9; - uint64 repair_price_customized = 10; - bool repair_customized_pricing = 11; - uint64 challenge_price_default = 12; - uint64 challenge_price_customized = 13; - bool challenge_customized_pricing = 14; - } - message Geo { - string country_short = 1; - string region = 2; - float latitude = 3; - float longitude = 4; - } - message ExperimentalFlags { - bool analytics = 1; - bool filestore_enabled = 2; - bool hosts_sync_enabled = 3; - string hosts_sync_mode = 4; - bool libp2p_stream_mounting = 5; - bool p2p_http_proxy = 6; - bool prefer_tls = 7; // deprecated - bool quic = 8; - bool remove_on_unpin = 9; - bool sharding_enabled = 10; - bool storage_client_enabled = 11; - bool storage_host_enabled = 12; - bool strategic_providing = 13; - bool url_store_enabled = 14; - bool disable_auto_update = 15; - bool graphsync_enabled = 16; - bool repair_host_enabled = 17; - bool challenge_host_enabled = 18; - } - string table_name = 1 [(gogoproto.moretags) = "pg:\"node_metrics,alias:t,discard_unknown_columns\""]; - string node_id = 2; - string btfs_version = 3; - uint64 up_time = 4; - uint64 storage_used = 5; - uint64 storage_volume_cap = 6; - uint64 memory_used = 7; - double cpu_used = 8; - uint64 upload = 9; - uint64 download = 10; - uint64 total_upload = 11; - uint64 total_download = 12; - uint64 storage_price_deal = 13; - uint64 bandwidth_price_deal = 14; - Settings settings = 15 [ - (gogoproto.embed) = true, - (gogoproto.nullable) = false - ]; - double reputation = 16; - uint64 blocks_up = 17; - uint64 blocks_down = 18; - string os_type = 19; - string arch_type = 20; - string cpu_info = 21; - uint64 peers_connected = 23; - google.protobuf.Timestamp time_created = 24 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - string h_val = 25; - Geo geo = 26 [ - (gogoproto.embed) = true, - (gogoproto.nullable) = false - ]; - ExperimentalFlags flg = 27 [ - (gogoproto.embed) = true, - (gogoproto.nullable) = false - ]; -} - -message NodeContractStat { - string table_name = 1 [(gogoproto.moretags) = "pg:\"all_miners,alias:t,discard_unknown_columns\""]; - string node_id = 2; - bool big_miner = 3; - google.protobuf.Timestamp last_modify_time = 4 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; -} - -message StorageStat { - option (gogoproto.json_no_omit_empty) = true; - message HostStats { - option (gogoproto.json_no_omit_empty) = true; - float uptime = 1; - float score = 2; - float uptime_score = 3; - float age_score = 4; - float version_score = 5; - float speed_score = 6; - float upload_speed_score = 7; - float download_speed_score = 8; - float uptime_weight = 9; - float age_weight = 10; - float version_weight = 11; - float speed_weight = 12; - float upload_speed_weight = 13; - float download_speed_weight = 14; - google.protobuf.Timestamp last_updated = 15 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - } - message Host { - option (gogoproto.json_no_omit_empty) = true; - bool online = 1; - int64 storage_used = 2; - int64 storage_cap = 3; - int64 storage_disk_total = 4; - int64 storage_disk_available = 5; - HostStats stats = 6 [ - (gogoproto.embed) = true, - (gogoproto.jsontag) = "", - (gogoproto.nullable) = false - ]; - } - message Renter { - option (gogoproto.json_no_omit_empty) = true; - string reserved = 1; - } - Host host_stats = 1 [(gogoproto.nullable) = false]; - Renter renter_stats = 2 [(gogoproto.nullable) = false]; -} - -message ContractStat { - option (gogoproto.json_no_omit_empty) = true; - enum Role { - HOST = 0; - RENTER = 1; - RESERVED = 2; - } - int64 active_contract_num = 1; - int64 compensation_paid = 2; - int64 compensation_outstanding = 3; - google.protobuf.Timestamp first_contract_start = 4 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - google.protobuf.Timestamp last_contract_end = 5 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - Role role = 6; -} - -message Contracts { - option (gogoproto.json_no_omit_empty) = true; - message Contract { - option (gogoproto.json_no_omit_empty) = true; - string contract_id = 1; - string host_id = 2; - string renter_id = 3; - guard.Contract.ContractState status = 4; - google.protobuf.Timestamp start_time = 5 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - google.protobuf.Timestamp end_time = 6 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - google.protobuf.Timestamp next_escrow_time = 7 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - int64 compensation_paid = 8; - int64 compensation_outstanding = 9; - int64 unit_price = 10; - int64 shard_size = 11; - string shard_hash = 12; - string file_hash = 13; - google.protobuf.Timestamp last_modify_time = 14 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - } - repeated Contract contracts = 1; -} - -message BtfsScanTab { - string table_name = 1 [(gogoproto.moretags) = "pg:\"btfs_scan,alias:t,discard_unknown_columns\""]; - double storage_volume_left = 2; - uint32 online_miners_number = 3; - map country_distribute = 4; - map score_distribute = 5; - google.protobuf.Timestamp time_created = 6 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - double storage_already_used = 7; - double price = 8; - google.protobuf.Timestamp date_created = 9 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - string new_rank = 10; - string total_rank = 11; - uint32 contract_all_count = 12; - uint32 contract_fail_count = 13; - double contract_all_storage = 14; - double contract_fail_storage = 15; - double storage_left_when_contract = 16; - uint32 super_online_miners_count = 17; - uint32 new_online_miners_count = 18; - int64 miners_all_amount = 19; - int64 total_miners = 20; - int64 big_miners = 21; - map version_distribute = 22; -} - -message ScoreHistoryTab { - string table_name = 1 [(gogoproto.moretags) = "pg:\"score_history,alias:t,discard_unknown_columns\""]; - string node_id = 2; - uint64 storage_volume_cap = 3; - uint64 storage_volume_left = 4; - uint32 score = 5; - google.protobuf.Timestamp date_created = 6 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - google.protobuf.Timestamp time_created = 7 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; -} - -message AirdropRewardHistoryTab { - string table_name = 1 [(gogoproto.moretags) = "pg:\"airdrop_reward_history,alias:t,discard_unknown_columns\""]; - uint32 type = 2; - string node_id = 3; - bool is_suspect = 5; - uint32 weight = 6; - uint32 stake = 7; - google.protobuf.Timestamp date_created = 8 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - google.protobuf.Timestamp time_created = 9 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - uint32 file_count = 10; - uint64 file_size = 11; - uint64 should_reward = 12; - uint64 actual_reward = 13; -} diff --git a/protos/online/online.pb.go b/protos/online/online.pb.go deleted file mode 100644 index de79676..0000000 --- a/protos/online/online.pb.go +++ /dev/null @@ -1,1744 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: protos/online/online.proto - -package online - -import ( - context "context" - fmt "fmt" - node "github.com/bittorrent/go-btfs-common/protos/node" - _ "github.com/gogo/protobuf/types" - golang_proto "github.com/golang/protobuf/proto" - _ "github.com/tron-us/protobuf/gogoproto" - proto "github.com/tron-us/protobuf/proto" - github_com_tron_us_protobuf_types "github.com/tron-us/protobuf/types" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = golang_proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type ResponseCode int32 - -const ( - ResponseCode_SUCCESS ResponseCode = 0 - ResponseCode_SIGNATURE_FORMAT_ERROR ResponseCode = 1 - ResponseCode_COMPUTE_ADDRESS_ERROR ResponseCode = 2 - ResponseCode_TIMEOUT_ERROR ResponseCode = 3 - ResponseCode_OTHER_ERROR ResponseCode = 20 -) - -var ResponseCode_name = map[int32]string{ - 0: "SUCCESS", - 1: "SIGNATURE_FORMAT_ERROR", - 2: "COMPUTE_ADDRESS_ERROR", - 3: "TIMEOUT_ERROR", - 20: "OTHER_ERROR", -} - -var ResponseCode_value = map[string]int32{ - "SUCCESS": 0, - "SIGNATURE_FORMAT_ERROR": 1, - "COMPUTE_ADDRESS_ERROR": 2, - "TIMEOUT_ERROR": 3, - "OTHER_ERROR": 20, -} - -func (x ResponseCode) String() string { - return proto.EnumName(ResponseCode_name, int32(x)) -} - -func (ResponseCode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_ee5923c3111b600a, []int{0} -} - -type ReqSignMetrics struct { - PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty" pg:"public_key"` - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty" pg:"payload"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ReqSignMetrics) Reset() { *m = ReqSignMetrics{} } -func (m *ReqSignMetrics) String() string { return proto.CompactTextString(m) } -func (*ReqSignMetrics) ProtoMessage() {} -func (*ReqSignMetrics) Descriptor() ([]byte, []int) { - return fileDescriptor_ee5923c3111b600a, []int{0} -} -func (m *ReqSignMetrics) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ReqSignMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ReqSignMetrics.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ReqSignMetrics) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReqSignMetrics.Merge(m, src) -} -func (m *ReqSignMetrics) XXX_Size() int { - return m.Size() -} -func (m *ReqSignMetrics) XXX_DiscardUnknown() { - xxx_messageInfo_ReqSignMetrics.DiscardUnknown(m) -} - -var xxx_messageInfo_ReqSignMetrics proto.InternalMessageInfo - -func (m *ReqSignMetrics) GetPublicKey() []byte { - if m != nil { - return m.PublicKey - } - return nil -} - -func (m *ReqSignMetrics) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (m *ReqSignMetrics) GetPayload() []byte { - if m != nil { - return m.Payload - } - return nil -} - -func (*ReqSignMetrics) XXX_MessageName() string { - return "online.ReqSignMetrics" -} - -type PayLoadInfo struct { - NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty" pg:"node_id"` - Node *node.Node `protobuf:"bytes,2,opt,name=node,proto3" json:"node,omitempty" pg:"node"` - LastSignedInfo *SignedInfo `protobuf:"bytes,3,opt,name=last_signed_info,json=lastSignedInfo,proto3" json:"last_signed_info,omitempty" pg:"last_signed_info"` - LastSignature string `protobuf:"bytes,4,opt,name=last_signature,json=lastSignature,proto3" json:"last_signature,omitempty" pg:"last_signature"` - LastTime time.Time `protobuf:"bytes,5,opt,name=last_time,json=lastTime,proto3,stdtime" json:"last_time" pg:"last_time"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *PayLoadInfo) Reset() { *m = PayLoadInfo{} } -func (m *PayLoadInfo) String() string { return proto.CompactTextString(m) } -func (*PayLoadInfo) ProtoMessage() {} -func (*PayLoadInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ee5923c3111b600a, []int{1} -} -func (m *PayLoadInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PayLoadInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PayLoadInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *PayLoadInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_PayLoadInfo.Merge(m, src) -} -func (m *PayLoadInfo) XXX_Size() int { - return m.Size() -} -func (m *PayLoadInfo) XXX_DiscardUnknown() { - xxx_messageInfo_PayLoadInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_PayLoadInfo proto.InternalMessageInfo - -func (m *PayLoadInfo) GetNodeId() string { - if m != nil { - return m.NodeId - } - return "" -} - -func (m *PayLoadInfo) GetNode() *node.Node { - if m != nil { - return m.Node - } - return nil -} - -func (m *PayLoadInfo) GetLastSignedInfo() *SignedInfo { - if m != nil { - return m.LastSignedInfo - } - return nil -} - -func (m *PayLoadInfo) GetLastSignature() string { - if m != nil { - return m.LastSignature - } - return "" -} - -func (m *PayLoadInfo) GetLastTime() time.Time { - if m != nil { - return m.LastTime - } - return time.Time{} -} - -func (*PayLoadInfo) XXX_MessageName() string { - return "online.PayLoadInfo" -} - -type RespSignMetrics struct { - Code ResponseCode `protobuf:"varint,1,opt,name=code,proto3,enum=online.ResponseCode" json:"code,omitempty" pg:"code"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty" pg:"message"` - SignedInfo *SignedInfo `protobuf:"bytes,3,opt,name=signed_info,json=signedInfo,proto3" json:"signed_info,omitempty" pg:"signed_info"` - Signature string `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *RespSignMetrics) Reset() { *m = RespSignMetrics{} } -func (m *RespSignMetrics) String() string { return proto.CompactTextString(m) } -func (*RespSignMetrics) ProtoMessage() {} -func (*RespSignMetrics) Descriptor() ([]byte, []int) { - return fileDescriptor_ee5923c3111b600a, []int{2} -} -func (m *RespSignMetrics) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RespSignMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RespSignMetrics.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RespSignMetrics) XXX_Merge(src proto.Message) { - xxx_messageInfo_RespSignMetrics.Merge(m, src) -} -func (m *RespSignMetrics) XXX_Size() int { - return m.Size() -} -func (m *RespSignMetrics) XXX_DiscardUnknown() { - xxx_messageInfo_RespSignMetrics.DiscardUnknown(m) -} - -var xxx_messageInfo_RespSignMetrics proto.InternalMessageInfo - -func (m *RespSignMetrics) GetCode() ResponseCode { - if m != nil { - return m.Code - } - return ResponseCode_SUCCESS -} - -func (m *RespSignMetrics) GetMessage() string { - if m != nil { - return m.Message - } - return "" -} - -func (m *RespSignMetrics) GetSignedInfo() *SignedInfo { - if m != nil { - return m.SignedInfo - } - return nil -} - -func (m *RespSignMetrics) GetSignature() string { - if m != nil { - return m.Signature - } - return "" -} - -func (*RespSignMetrics) XXX_MessageName() string { - return "online.RespSignMetrics" -} - -type SignedInfo struct { - Peer string `protobuf:"bytes,1,opt,name=peer,proto3" json:"peer,omitempty" pg:"peer"` - CreatedTime uint32 `protobuf:"varint,2,opt,name=created_time,json=createdTime,proto3" json:"created_time,omitempty" pg:"created_time"` - Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty" pg:"version"` - Nonce uint32 `protobuf:"varint,4,opt,name=nonce,proto3" json:"nonce,omitempty" pg:"nonce"` - BttcAddress string `protobuf:"bytes,5,opt,name=bttc_address,json=bttcAddress,proto3" json:"bttc_address,omitempty" pg:"bttc_address"` - SignedTime uint32 `protobuf:"varint,6,opt,name=signed_time,json=signedTime,proto3" json:"signed_time,omitempty" pg:"signed_time"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SignedInfo) Reset() { *m = SignedInfo{} } -func (m *SignedInfo) String() string { return proto.CompactTextString(m) } -func (*SignedInfo) ProtoMessage() {} -func (*SignedInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ee5923c3111b600a, []int{3} -} -func (m *SignedInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignedInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignedInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SignedInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedInfo.Merge(m, src) -} -func (m *SignedInfo) XXX_Size() int { - return m.Size() -} -func (m *SignedInfo) XXX_DiscardUnknown() { - xxx_messageInfo_SignedInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_SignedInfo proto.InternalMessageInfo - -func (m *SignedInfo) GetPeer() string { - if m != nil { - return m.Peer - } - return "" -} - -func (m *SignedInfo) GetCreatedTime() uint32 { - if m != nil { - return m.CreatedTime - } - return 0 -} - -func (m *SignedInfo) GetVersion() string { - if m != nil { - return m.Version - } - return "" -} - -func (m *SignedInfo) GetNonce() uint32 { - if m != nil { - return m.Nonce - } - return 0 -} - -func (m *SignedInfo) GetBttcAddress() string { - if m != nil { - return m.BttcAddress - } - return "" -} - -func (m *SignedInfo) GetSignedTime() uint32 { - if m != nil { - return m.SignedTime - } - return 0 -} - -func (*SignedInfo) XXX_MessageName() string { - return "online.SignedInfo" -} -func init() { - proto.RegisterEnum("online.ResponseCode", ResponseCode_name, ResponseCode_value) - golang_proto.RegisterEnum("online.ResponseCode", ResponseCode_name, ResponseCode_value) - proto.RegisterType((*ReqSignMetrics)(nil), "online.ReqSignMetrics") - golang_proto.RegisterType((*ReqSignMetrics)(nil), "online.ReqSignMetrics") - proto.RegisterType((*PayLoadInfo)(nil), "online.PayLoadInfo") - golang_proto.RegisterType((*PayLoadInfo)(nil), "online.PayLoadInfo") - proto.RegisterType((*RespSignMetrics)(nil), "online.RespSignMetrics") - golang_proto.RegisterType((*RespSignMetrics)(nil), "online.RespSignMetrics") - proto.RegisterType((*SignedInfo)(nil), "online.SignedInfo") - golang_proto.RegisterType((*SignedInfo)(nil), "online.SignedInfo") -} - -func init() { proto.RegisterFile("protos/online/online.proto", fileDescriptor_ee5923c3111b600a) } -func init() { golang_proto.RegisterFile("protos/online/online.proto", fileDescriptor_ee5923c3111b600a) } - -var fileDescriptor_ee5923c3111b600a = []byte{ - // 677 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xc1, 0x6e, 0xd3, 0x4a, - 0x14, 0xed, 0xb4, 0x69, 0xda, 0x5c, 0x37, 0x69, 0x3b, 0xea, 0x6b, 0xf3, 0xa2, 0xf7, 0x12, 0x88, - 0x84, 0x54, 0x21, 0xd5, 0x41, 0xe9, 0x12, 0x24, 0x94, 0xa6, 0x01, 0x22, 0x48, 0x13, 0x8d, 0x93, - 0x0d, 0x1b, 0xcb, 0xb1, 0x27, 0xc6, 0x22, 0x99, 0x31, 0x9e, 0x49, 0xa5, 0xfc, 0x05, 0x4b, 0x3e, - 0x81, 0x3f, 0x60, 0xcb, 0xb2, 0x4b, 0xbe, 0x00, 0x50, 0xbb, 0xe7, 0x1b, 0xd0, 0xcc, 0xd8, 0x8d, - 0xd9, 0xb1, 0x49, 0xe6, 0xde, 0x7b, 0xee, 0x3d, 0x73, 0xce, 0xb5, 0x0d, 0xb5, 0x38, 0xe1, 0x92, - 0x8b, 0x16, 0x67, 0xf3, 0x88, 0xd1, 0xf4, 0xcf, 0xd6, 0x49, 0x5c, 0x34, 0x51, 0xed, 0x69, 0x18, - 0xc9, 0x77, 0xcb, 0xa9, 0xed, 0xf3, 0x45, 0x6b, 0x1a, 0x49, 0xc9, 0x93, 0x84, 0x32, 0xd9, 0x0a, - 0xf9, 0xd9, 0x54, 0xce, 0xc4, 0x99, 0xcf, 0x17, 0x0b, 0xce, 0x5a, 0xe9, 0x20, 0xc6, 0x03, 0xaa, - 0x7f, 0xcc, 0x90, 0xda, 0x93, 0x5c, 0xb3, 0x4c, 0x38, 0x3b, 0x5b, 0x0a, 0x03, 0x9d, 0x2e, 0x67, - 0xad, 0x90, 0x87, 0x5c, 0x07, 0xfa, 0x94, 0x76, 0x34, 0x42, 0xce, 0xc3, 0x39, 0x5d, 0xa3, 0x64, - 0xb4, 0xa0, 0x42, 0x7a, 0x8b, 0xd8, 0x00, 0x9a, 0x21, 0x54, 0x08, 0xfd, 0xe0, 0x44, 0x21, 0x1b, - 0x50, 0x99, 0x44, 0xbe, 0xc0, 0xff, 0x03, 0xc4, 0xcb, 0xe9, 0x3c, 0xf2, 0xdd, 0xf7, 0x74, 0x55, - 0x45, 0x0f, 0xd0, 0xe9, 0x1e, 0x29, 0x99, 0xcc, 0x6b, 0xba, 0xc2, 0xff, 0x41, 0x49, 0x44, 0x21, - 0xf3, 0xe4, 0x32, 0xa1, 0xd5, 0x4d, 0x53, 0xbd, 0x4f, 0xe0, 0x2a, 0xec, 0xc4, 0xde, 0x6a, 0xce, - 0xbd, 0xa0, 0xba, 0xa5, 0x6b, 0x59, 0xd8, 0xfc, 0x85, 0xc0, 0x1a, 0x79, 0xab, 0x37, 0xdc, 0x0b, - 0xfa, 0x6c, 0xc6, 0xf1, 0x09, 0xec, 0x28, 0x65, 0x6e, 0x14, 0x68, 0x8e, 0x12, 0x29, 0xaa, 0xb0, - 0x1f, 0xe0, 0x3a, 0x14, 0xd4, 0x49, 0xcf, 0xb6, 0xda, 0x60, 0x6b, 0xfd, 0x57, 0x3c, 0xa0, 0x44, - 0xe7, 0xf1, 0x33, 0x38, 0x98, 0x7b, 0x42, 0xba, 0x8a, 0x94, 0x06, 0x6e, 0xc4, 0x66, 0x5c, 0x73, - 0x59, 0x6d, 0x6c, 0xa7, 0x96, 0x3b, 0xba, 0xa4, 0x68, 0x48, 0x45, 0x61, 0xd7, 0x31, 0x7e, 0x04, - 0x95, 0xfb, 0x6e, 0xa3, 0xa1, 0xa0, 0xd9, 0xcb, 0x19, 0xce, 0xe8, 0xe8, 0x40, 0x49, 0xc3, 0x94, - 0x5d, 0xd5, 0x6d, 0x3d, 0xbd, 0x66, 0x1b, 0x2f, 0xed, 0xcc, 0x4b, 0x7b, 0x9c, 0x79, 0x79, 0xb1, - 0x7b, 0xf3, 0xbd, 0xb1, 0xf1, 0xf1, 0x47, 0x03, 0x91, 0x5d, 0xd5, 0xa6, 0x0a, 0xcd, 0xcf, 0x08, - 0xf6, 0x09, 0x15, 0x71, 0xde, 0xdb, 0x53, 0x28, 0xf8, 0x4a, 0x9b, 0x52, 0x5c, 0x69, 0x1f, 0x65, - 0xf7, 0x55, 0x30, 0xce, 0x04, 0xed, 0x6a, 0x95, 0x0a, 0xa1, 0x8c, 0x5c, 0x50, 0x21, 0xbc, 0xd0, - 0x18, 0x51, 0x22, 0x59, 0x88, 0xcf, 0xc1, 0xfa, 0x3b, 0xe9, 0x20, 0xd6, 0xb2, 0xff, 0xd8, 0x9a, - 0x51, 0xbc, 0x4e, 0x34, 0xbf, 0x20, 0x80, 0x9c, 0x47, 0x18, 0x0a, 0x31, 0xa5, 0x49, 0xba, 0x17, - 0x7d, 0xc6, 0x0f, 0x61, 0xcf, 0x4f, 0xa8, 0x27, 0x69, 0x60, 0x3c, 0x51, 0x97, 0x2a, 0x13, 0x2b, - 0xcd, 0x29, 0xc1, 0xea, 0xca, 0xd7, 0x34, 0x11, 0x11, 0x67, 0xfa, 0x52, 0x25, 0x92, 0x85, 0xf8, - 0x08, 0xb6, 0x19, 0x67, 0xbe, 0x61, 0x2e, 0x13, 0x13, 0xa8, 0x91, 0x53, 0x29, 0x7d, 0xd7, 0x0b, - 0x82, 0x84, 0x0a, 0xa1, 0x6d, 0x2e, 0x11, 0x4b, 0xe5, 0x3a, 0x26, 0x85, 0x1b, 0xf7, 0x5a, 0x35, - 0x69, 0x51, 0xb7, 0xa7, 0xba, 0x14, 0xe7, 0xe3, 0x6b, 0xd8, 0xcb, 0x9b, 0x87, 0x2d, 0xd8, 0x71, - 0x26, 0xdd, 0x6e, 0xcf, 0x71, 0x0e, 0x36, 0x70, 0x0d, 0x8e, 0x9d, 0xfe, 0xcb, 0xab, 0xce, 0x78, - 0x42, 0x7a, 0xee, 0x8b, 0x21, 0x19, 0x74, 0xc6, 0x6e, 0x8f, 0x90, 0x21, 0x39, 0x40, 0xf8, 0x5f, - 0xf8, 0xa7, 0x3b, 0x1c, 0x8c, 0x26, 0xe3, 0x9e, 0xdb, 0xb9, 0xbc, 0x24, 0x3d, 0xc7, 0x49, 0x4b, - 0x9b, 0xf8, 0x10, 0xca, 0xe3, 0xfe, 0xa0, 0x37, 0x9c, 0x64, 0xe8, 0x2d, 0xbc, 0x0f, 0xd6, 0x70, - 0xfc, 0xaa, 0x47, 0xd2, 0xc4, 0x51, 0x7b, 0x02, 0xe5, 0xa1, 0x36, 0xdc, 0xa1, 0xc9, 0x75, 0xe4, - 0x53, 0x7c, 0x09, 0x87, 0x93, 0x38, 0xf0, 0x24, 0xcd, 0xaf, 0xfb, 0x78, 0xbd, 0xe0, 0xfc, 0x2b, - 0x56, 0x3b, 0xc9, 0x2f, 0x3e, 0x57, 0xb8, 0x78, 0x7e, 0x73, 0x5b, 0x47, 0xdf, 0x6e, 0xeb, 0xe8, - 0xe7, 0x6d, 0x1d, 0x7d, 0xba, 0xab, 0xa3, 0xaf, 0x77, 0x75, 0x74, 0x73, 0x57, 0x47, 0x50, 0x89, - 0xb8, 0xad, 0xbe, 0x10, 0x69, 0xe7, 0x85, 0x65, 0xe8, 0x47, 0xea, 0x59, 0x1c, 0xa1, 0xb7, 0xe9, - 0xe7, 0x65, 0x5a, 0xd4, 0x0f, 0xe7, 0xf9, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x86, 0x30, 0x93, - 0x65, 0x8b, 0x04, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// OnlineServiceClient is the client API for OnlineService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type OnlineServiceClient interface { - UpdateSignMetrics(ctx context.Context, in *ReqSignMetrics, opts ...grpc.CallOption) (*RespSignMetrics, error) -} - -type onlineServiceClient struct { - cc *grpc.ClientConn -} - -func NewOnlineServiceClient(cc *grpc.ClientConn) OnlineServiceClient { - return &onlineServiceClient{cc} -} - -func (c *onlineServiceClient) UpdateSignMetrics(ctx context.Context, in *ReqSignMetrics, opts ...grpc.CallOption) (*RespSignMetrics, error) { - out := new(RespSignMetrics) - err := c.cc.Invoke(ctx, "/online.OnlineService/UpdateSignMetrics", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// OnlineServiceServer is the server API for OnlineService service. -type OnlineServiceServer interface { - UpdateSignMetrics(context.Context, *ReqSignMetrics) (*RespSignMetrics, error) -} - -// UnimplementedOnlineServiceServer can be embedded to have forward compatible implementations. -type UnimplementedOnlineServiceServer struct { -} - -func (*UnimplementedOnlineServiceServer) UpdateSignMetrics(ctx context.Context, req *ReqSignMetrics) (*RespSignMetrics, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateSignMetrics not implemented") -} - -func RegisterOnlineServiceServer(s *grpc.Server, srv OnlineServiceServer) { - s.RegisterService(&_OnlineService_serviceDesc, srv) -} - -func _OnlineService_UpdateSignMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ReqSignMetrics) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(OnlineServiceServer).UpdateSignMetrics(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/online.OnlineService/UpdateSignMetrics", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(OnlineServiceServer).UpdateSignMetrics(ctx, req.(*ReqSignMetrics)) - } - return interceptor(ctx, in, info, handler) -} - -var _OnlineService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "online.OnlineService", - HandlerType: (*OnlineServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "UpdateSignMetrics", - Handler: _OnlineService_UpdateSignMetrics_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "protos/online/online.proto", -} - -func (m *ReqSignMetrics) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ReqSignMetrics) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ReqSignMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Payload) > 0 { - i -= len(m.Payload) - copy(dAtA[i:], m.Payload) - i = encodeVarintOnline(dAtA, i, uint64(len(m.Payload))) - i-- - dAtA[i] = 0x1a - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintOnline(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if len(m.PublicKey) > 0 { - i -= len(m.PublicKey) - copy(dAtA[i:], m.PublicKey) - i = encodeVarintOnline(dAtA, i, uint64(len(m.PublicKey))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PayLoadInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PayLoadInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PayLoadInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - n1, err1 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.LastTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.LastTime):]) - if err1 != nil { - return 0, err1 - } - i -= n1 - i = encodeVarintOnline(dAtA, i, uint64(n1)) - i-- - dAtA[i] = 0x2a - if len(m.LastSignature) > 0 { - i -= len(m.LastSignature) - copy(dAtA[i:], m.LastSignature) - i = encodeVarintOnline(dAtA, i, uint64(len(m.LastSignature))) - i-- - dAtA[i] = 0x22 - } - if m.LastSignedInfo != nil { - { - size, err := m.LastSignedInfo.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintOnline(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Node != nil { - { - size, err := m.Node.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintOnline(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.NodeId) > 0 { - i -= len(m.NodeId) - copy(dAtA[i:], m.NodeId) - i = encodeVarintOnline(dAtA, i, uint64(len(m.NodeId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RespSignMetrics) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RespSignMetrics) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RespSignMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintOnline(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x22 - } - if m.SignedInfo != nil { - { - size, err := m.SignedInfo.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintOnline(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintOnline(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = encodeVarintOnline(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *SignedInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignedInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignedInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.SignedTime != 0 { - i = encodeVarintOnline(dAtA, i, uint64(m.SignedTime)) - i-- - dAtA[i] = 0x30 - } - if len(m.BttcAddress) > 0 { - i -= len(m.BttcAddress) - copy(dAtA[i:], m.BttcAddress) - i = encodeVarintOnline(dAtA, i, uint64(len(m.BttcAddress))) - i-- - dAtA[i] = 0x2a - } - if m.Nonce != 0 { - i = encodeVarintOnline(dAtA, i, uint64(m.Nonce)) - i-- - dAtA[i] = 0x20 - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintOnline(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x1a - } - if m.CreatedTime != 0 { - i = encodeVarintOnline(dAtA, i, uint64(m.CreatedTime)) - i-- - dAtA[i] = 0x10 - } - if len(m.Peer) > 0 { - i -= len(m.Peer) - copy(dAtA[i:], m.Peer) - i = encodeVarintOnline(dAtA, i, uint64(len(m.Peer))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintOnline(dAtA []byte, offset int, v uint64) int { - offset -= sovOnline(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ReqSignMetrics) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PublicKey) - if l > 0 { - n += 1 + l + sovOnline(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovOnline(uint64(l)) - } - l = len(m.Payload) - if l > 0 { - n += 1 + l + sovOnline(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *PayLoadInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.NodeId) - if l > 0 { - n += 1 + l + sovOnline(uint64(l)) - } - if m.Node != nil { - l = m.Node.Size() - n += 1 + l + sovOnline(uint64(l)) - } - if m.LastSignedInfo != nil { - l = m.LastSignedInfo.Size() - n += 1 + l + sovOnline(uint64(l)) - } - l = len(m.LastSignature) - if l > 0 { - n += 1 + l + sovOnline(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.LastTime) - n += 1 + l + sovOnline(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RespSignMetrics) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovOnline(uint64(m.Code)) - } - l = len(m.Message) - if l > 0 { - n += 1 + l + sovOnline(uint64(l)) - } - if m.SignedInfo != nil { - l = m.SignedInfo.Size() - n += 1 + l + sovOnline(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovOnline(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SignedInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Peer) - if l > 0 { - n += 1 + l + sovOnline(uint64(l)) - } - if m.CreatedTime != 0 { - n += 1 + sovOnline(uint64(m.CreatedTime)) - } - l = len(m.Version) - if l > 0 { - n += 1 + l + sovOnline(uint64(l)) - } - if m.Nonce != 0 { - n += 1 + sovOnline(uint64(m.Nonce)) - } - l = len(m.BttcAddress) - if l > 0 { - n += 1 + l + sovOnline(uint64(l)) - } - if m.SignedTime != 0 { - n += 1 + sovOnline(uint64(m.SignedTime)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovOnline(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozOnline(x uint64) (n int) { - return sovOnline(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ReqSignMetrics) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOnline - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ReqSignMetrics: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ReqSignMetrics: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOnline - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOnline - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthOnline - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PublicKey = append(m.PublicKey[:0], dAtA[iNdEx:postIndex]...) - if m.PublicKey == nil { - m.PublicKey = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOnline - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOnline - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthOnline - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOnline - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOnline - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthOnline - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) - if m.Payload == nil { - m.Payload = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOnline(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOnline - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthOnline - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PayLoadInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOnline - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PayLoadInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PayLoadInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOnline - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOnline - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOnline - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NodeId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOnline - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOnline - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthOnline - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Node == nil { - m.Node = &node.Node{} - } - if err := m.Node.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastSignedInfo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOnline - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOnline - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthOnline - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LastSignedInfo == nil { - m.LastSignedInfo = &SignedInfo{} - } - if err := m.LastSignedInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastSignature", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOnline - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOnline - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOnline - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LastSignature = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOnline - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOnline - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthOnline - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.LastTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOnline(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOnline - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthOnline - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RespSignMetrics) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOnline - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RespSignMetrics: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RespSignMetrics: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOnline - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= ResponseCode(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOnline - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOnline - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOnline - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SignedInfo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOnline - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOnline - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthOnline - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SignedInfo == nil { - m.SignedInfo = &SignedInfo{} - } - if err := m.SignedInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOnline - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOnline - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOnline - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOnline(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOnline - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthOnline - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignedInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOnline - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignedInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignedInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Peer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOnline - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOnline - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOnline - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Peer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CreatedTime", wireType) - } - m.CreatedTime = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOnline - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CreatedTime |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOnline - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOnline - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOnline - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - m.Nonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOnline - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Nonce |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BttcAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOnline - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOnline - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOnline - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BttcAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SignedTime", wireType) - } - m.SignedTime = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOnline - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SignedTime |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipOnline(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOnline - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthOnline - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipOnline(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOnline - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOnline - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOnline - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthOnline - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupOnline - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthOnline - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthOnline = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowOnline = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupOnline = fmt.Errorf("proto: unexpected end of group") -) diff --git a/protos/online/online.proto b/protos/online/online.proto deleted file mode 100644 index 93f7919..0000000 --- a/protos/online/online.proto +++ /dev/null @@ -1,66 +0,0 @@ -syntax = "proto3"; - -package online; - -// gogo plugin toggles -option (gogoproto.gogoproto_import) = true; -option (gogoproto.goproto_registration) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.messagename_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.unmarshaler_all) = true; -// golang option -option go_package = "online"; -// java options -option java_multiple_files = true; -option java_outer_classname = "OnlineProto"; -option java_package = "io.btfs.online"; - -import "github.com/bittorrent/go-btfs-common/protos/node/node.proto"; -import "github.com/tron-us/protobuf/gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; - -service OnlineService { - rpc UpdateSignMetrics(ReqSignMetrics) returns (RespSignMetrics); -} - -message ReqSignMetrics { - bytes public_key = 1; - bytes signature = 2; - bytes payload = 3; -} - -message PayLoadInfo { - string node_id = 1; - node.Node node = 2; - SignedInfo last_signed_info = 3; - string last_signature = 4; - google.protobuf.Timestamp last_time = 5 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; -} - -enum ResponseCode { - SUCCESS = 0; - SIGNATURE_FORMAT_ERROR = 1; - COMPUTE_ADDRESS_ERROR = 2; - TIMEOUT_ERROR = 3; - OTHER_ERROR = 20; -} - -message RespSignMetrics { - ResponseCode code = 1; - string message = 2; - SignedInfo signed_info = 3; - string signature = 4; -} - -message SignedInfo { - string peer = 1; - uint32 created_time = 2; - string version = 3; - uint32 nonce = 4; - string bttc_address = 5; - uint32 signed_time = 6; -} diff --git a/protos/protocol/api/api.pb.go b/protos/protocol/api/api.pb.go deleted file mode 100644 index 8448906..0000000 --- a/protos/protocol/api/api.pb.go +++ /dev/null @@ -1,6225 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: protos/protocol/api/api.proto - -package protocol_api - -import ( - context "context" - fmt "fmt" - core "github.com/bittorrent/go-btfs-common/protos/protocol/core" - proto "github.com/tron-us/protobuf/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type ReturnResponseCode int32 - -const ( - Return_SUCCESS ReturnResponseCode = 0 - Return_SIGERROR ReturnResponseCode = 1 - Return_CONTRACT_VALIDATE_ERROR ReturnResponseCode = 2 - Return_CONTRACT_EXE_ERROR ReturnResponseCode = 3 - Return_BANDWITH_ERROR ReturnResponseCode = 4 - Return_DUP_TRANSACTION_ERROR ReturnResponseCode = 5 - Return_TAPOS_ERROR ReturnResponseCode = 6 - Return_TOO_BIG_TRANSACTION_ERROR ReturnResponseCode = 7 - Return_TRANSACTION_EXPIRATION_ERROR ReturnResponseCode = 8 - Return_SERVER_BUSY ReturnResponseCode = 9 - Return_OTHER_ERROR ReturnResponseCode = 20 -) - -var ReturnResponseCode_name = map[int32]string{ - 0: "SUCCESS", - 1: "SIGERROR", - 2: "CONTRACT_VALIDATE_ERROR", - 3: "CONTRACT_EXE_ERROR", - 4: "BANDWITH_ERROR", - 5: "DUP_TRANSACTION_ERROR", - 6: "TAPOS_ERROR", - 7: "TOO_BIG_TRANSACTION_ERROR", - 8: "TRANSACTION_EXPIRATION_ERROR", - 9: "SERVER_BUSY", - 20: "OTHER_ERROR", -} - -var ReturnResponseCode_value = map[string]int32{ - "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, -} - -func (x ReturnResponseCode) String() string { - return proto.EnumName(ReturnResponseCode_name, int32(x)) -} - -func (ReturnResponseCode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_93f388d8c446adbc, []int{0, 0} -} - -type Return struct { - Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty" pg:"result"` - Code ReturnResponseCode `protobuf:"varint,2,opt,name=code,proto3,enum=protocol.ReturnResponseCode" json:"code,omitempty" pg:"code"` - Message []byte `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty" pg:"message"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Return) Reset() { *m = Return{} } -func (m *Return) String() string { return proto.CompactTextString(m) } -func (*Return) ProtoMessage() {} -func (*Return) Descriptor() ([]byte, []int) { - return fileDescriptor_93f388d8c446adbc, []int{0} -} -func (m *Return) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Return.Unmarshal(m, b) -} -func (m *Return) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Return.Marshal(b, m, deterministic) -} -func (m *Return) XXX_Merge(src proto.Message) { - xxx_messageInfo_Return.Merge(m, src) -} -func (m *Return) XXX_Size() int { - return xxx_messageInfo_Return.Size(m) -} -func (m *Return) XXX_DiscardUnknown() { - xxx_messageInfo_Return.DiscardUnknown(m) -} - -var xxx_messageInfo_Return proto.InternalMessageInfo - -func (m *Return) GetResult() bool { - if m != nil { - return m.Result - } - return false -} - -func (m *Return) GetCode() ReturnResponseCode { - if m != nil { - return m.Code - } - return Return_SUCCESS -} - -func (m *Return) GetMessage() []byte { - if m != nil { - return m.Message - } - return nil -} - -type BlockReference struct { - BlockNum int64 `protobuf:"varint,1,opt,name=block_num,json=blockNum,proto3" json:"block_num,omitempty" pg:"block_num"` - BlockHash []byte `protobuf:"bytes,2,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty" pg:"block_hash"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *BlockReference) Reset() { *m = BlockReference{} } -func (m *BlockReference) String() string { return proto.CompactTextString(m) } -func (*BlockReference) ProtoMessage() {} -func (*BlockReference) Descriptor() ([]byte, []int) { - return fileDescriptor_93f388d8c446adbc, []int{1} -} -func (m *BlockReference) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BlockReference.Unmarshal(m, b) -} -func (m *BlockReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BlockReference.Marshal(b, m, deterministic) -} -func (m *BlockReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockReference.Merge(m, src) -} -func (m *BlockReference) XXX_Size() int { - return xxx_messageInfo_BlockReference.Size(m) -} -func (m *BlockReference) XXX_DiscardUnknown() { - xxx_messageInfo_BlockReference.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockReference proto.InternalMessageInfo - -func (m *BlockReference) GetBlockNum() int64 { - if m != nil { - return m.BlockNum - } - return 0 -} - -func (m *BlockReference) GetBlockHash() []byte { - if m != nil { - return m.BlockHash - } - return nil -} - -type WitnessList struct { - Witnesses []*core.Witness `protobuf:"bytes,1,rep,name=witnesses,proto3" json:"witnesses,omitempty" pg:"witnesses"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *WitnessList) Reset() { *m = WitnessList{} } -func (m *WitnessList) String() string { return proto.CompactTextString(m) } -func (*WitnessList) ProtoMessage() {} -func (*WitnessList) Descriptor() ([]byte, []int) { - return fileDescriptor_93f388d8c446adbc, []int{2} -} -func (m *WitnessList) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_WitnessList.Unmarshal(m, b) -} -func (m *WitnessList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_WitnessList.Marshal(b, m, deterministic) -} -func (m *WitnessList) XXX_Merge(src proto.Message) { - xxx_messageInfo_WitnessList.Merge(m, src) -} -func (m *WitnessList) XXX_Size() int { - return xxx_messageInfo_WitnessList.Size(m) -} -func (m *WitnessList) XXX_DiscardUnknown() { - xxx_messageInfo_WitnessList.DiscardUnknown(m) -} - -var xxx_messageInfo_WitnessList proto.InternalMessageInfo - -func (m *WitnessList) GetWitnesses() []*core.Witness { - if m != nil { - return m.Witnesses - } - return nil -} - -type ProposalList struct { - Proposals []*core.Proposal `protobuf:"bytes,1,rep,name=proposals,proto3" json:"proposals,omitempty" pg:"proposals"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ProposalList) Reset() { *m = ProposalList{} } -func (m *ProposalList) String() string { return proto.CompactTextString(m) } -func (*ProposalList) ProtoMessage() {} -func (*ProposalList) Descriptor() ([]byte, []int) { - return fileDescriptor_93f388d8c446adbc, []int{3} -} -func (m *ProposalList) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ProposalList.Unmarshal(m, b) -} -func (m *ProposalList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ProposalList.Marshal(b, m, deterministic) -} -func (m *ProposalList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProposalList.Merge(m, src) -} -func (m *ProposalList) XXX_Size() int { - return xxx_messageInfo_ProposalList.Size(m) -} -func (m *ProposalList) XXX_DiscardUnknown() { - xxx_messageInfo_ProposalList.DiscardUnknown(m) -} - -var xxx_messageInfo_ProposalList proto.InternalMessageInfo - -func (m *ProposalList) GetProposals() []*core.Proposal { - if m != nil { - return m.Proposals - } - return nil -} - -type ExchangeList struct { - Exchanges []*core.Exchange `protobuf:"bytes,1,rep,name=exchanges,proto3" json:"exchanges,omitempty" pg:"exchanges"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ExchangeList) Reset() { *m = ExchangeList{} } -func (m *ExchangeList) String() string { return proto.CompactTextString(m) } -func (*ExchangeList) ProtoMessage() {} -func (*ExchangeList) Descriptor() ([]byte, []int) { - return fileDescriptor_93f388d8c446adbc, []int{4} -} -func (m *ExchangeList) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ExchangeList.Unmarshal(m, b) -} -func (m *ExchangeList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ExchangeList.Marshal(b, m, deterministic) -} -func (m *ExchangeList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExchangeList.Merge(m, src) -} -func (m *ExchangeList) XXX_Size() int { - return xxx_messageInfo_ExchangeList.Size(m) -} -func (m *ExchangeList) XXX_DiscardUnknown() { - xxx_messageInfo_ExchangeList.DiscardUnknown(m) -} - -var xxx_messageInfo_ExchangeList proto.InternalMessageInfo - -func (m *ExchangeList) GetExchanges() []*core.Exchange { - if m != nil { - return m.Exchanges - } - return nil -} - -type AssetIssueList struct { - AssetIssue []*core.AssetIssueContract `protobuf:"bytes,1,rep,name=assetIssue,proto3" json:"assetIssue,omitempty" pg:"assetIssue"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *AssetIssueList) Reset() { *m = AssetIssueList{} } -func (m *AssetIssueList) String() string { return proto.CompactTextString(m) } -func (*AssetIssueList) ProtoMessage() {} -func (*AssetIssueList) Descriptor() ([]byte, []int) { - return fileDescriptor_93f388d8c446adbc, []int{5} -} -func (m *AssetIssueList) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AssetIssueList.Unmarshal(m, b) -} -func (m *AssetIssueList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AssetIssueList.Marshal(b, m, deterministic) -} -func (m *AssetIssueList) XXX_Merge(src proto.Message) { - xxx_messageInfo_AssetIssueList.Merge(m, src) -} -func (m *AssetIssueList) XXX_Size() int { - return xxx_messageInfo_AssetIssueList.Size(m) -} -func (m *AssetIssueList) XXX_DiscardUnknown() { - xxx_messageInfo_AssetIssueList.DiscardUnknown(m) -} - -var xxx_messageInfo_AssetIssueList proto.InternalMessageInfo - -func (m *AssetIssueList) GetAssetIssue() []*core.AssetIssueContract { - if m != nil { - return m.AssetIssue - } - return nil -} - -type BlockList struct { - Block []*core.Block `protobuf:"bytes,1,rep,name=block,proto3" json:"block,omitempty" pg:"block"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *BlockList) Reset() { *m = BlockList{} } -func (m *BlockList) String() string { return proto.CompactTextString(m) } -func (*BlockList) ProtoMessage() {} -func (*BlockList) Descriptor() ([]byte, []int) { - return fileDescriptor_93f388d8c446adbc, []int{6} -} -func (m *BlockList) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BlockList.Unmarshal(m, b) -} -func (m *BlockList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BlockList.Marshal(b, m, deterministic) -} -func (m *BlockList) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockList.Merge(m, src) -} -func (m *BlockList) XXX_Size() int { - return xxx_messageInfo_BlockList.Size(m) -} -func (m *BlockList) XXX_DiscardUnknown() { - xxx_messageInfo_BlockList.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockList proto.InternalMessageInfo - -func (m *BlockList) GetBlock() []*core.Block { - if m != nil { - return m.Block - } - return nil -} - -type TransactionList struct { - Transaction []*core.Transaction `protobuf:"bytes,1,rep,name=transaction,proto3" json:"transaction,omitempty" pg:"transaction"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *TransactionList) Reset() { *m = TransactionList{} } -func (m *TransactionList) String() string { return proto.CompactTextString(m) } -func (*TransactionList) ProtoMessage() {} -func (*TransactionList) Descriptor() ([]byte, []int) { - return fileDescriptor_93f388d8c446adbc, []int{7} -} -func (m *TransactionList) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TransactionList.Unmarshal(m, b) -} -func (m *TransactionList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TransactionList.Marshal(b, m, deterministic) -} -func (m *TransactionList) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionList.Merge(m, src) -} -func (m *TransactionList) XXX_Size() int { - return xxx_messageInfo_TransactionList.Size(m) -} -func (m *TransactionList) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionList.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionList proto.InternalMessageInfo - -func (m *TransactionList) GetTransaction() []*core.Transaction { - if m != nil { - return m.Transaction - } - return nil -} - -type DelegatedResourceMessage struct { - FromAddress []byte `protobuf:"bytes,1,opt,name=fromAddress,proto3" json:"fromAddress,omitempty" pg:"fromAddress"` - ToAddress []byte `protobuf:"bytes,2,opt,name=toAddress,proto3" json:"toAddress,omitempty" pg:"toAddress"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *DelegatedResourceMessage) Reset() { *m = DelegatedResourceMessage{} } -func (m *DelegatedResourceMessage) String() string { return proto.CompactTextString(m) } -func (*DelegatedResourceMessage) ProtoMessage() {} -func (*DelegatedResourceMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_93f388d8c446adbc, []int{8} -} -func (m *DelegatedResourceMessage) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DelegatedResourceMessage.Unmarshal(m, b) -} -func (m *DelegatedResourceMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DelegatedResourceMessage.Marshal(b, m, deterministic) -} -func (m *DelegatedResourceMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_DelegatedResourceMessage.Merge(m, src) -} -func (m *DelegatedResourceMessage) XXX_Size() int { - return xxx_messageInfo_DelegatedResourceMessage.Size(m) -} -func (m *DelegatedResourceMessage) XXX_DiscardUnknown() { - xxx_messageInfo_DelegatedResourceMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_DelegatedResourceMessage proto.InternalMessageInfo - -func (m *DelegatedResourceMessage) GetFromAddress() []byte { - if m != nil { - return m.FromAddress - } - return nil -} - -func (m *DelegatedResourceMessage) GetToAddress() []byte { - if m != nil { - return m.ToAddress - } - return nil -} - -type DelegatedResourceList struct { - DelegatedResource []*core.DelegatedResource `protobuf:"bytes,1,rep,name=delegatedResource,proto3" json:"delegatedResource,omitempty" pg:"delegatedResource"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *DelegatedResourceList) Reset() { *m = DelegatedResourceList{} } -func (m *DelegatedResourceList) String() string { return proto.CompactTextString(m) } -func (*DelegatedResourceList) ProtoMessage() {} -func (*DelegatedResourceList) Descriptor() ([]byte, []int) { - return fileDescriptor_93f388d8c446adbc, []int{9} -} -func (m *DelegatedResourceList) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DelegatedResourceList.Unmarshal(m, b) -} -func (m *DelegatedResourceList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DelegatedResourceList.Marshal(b, m, deterministic) -} -func (m *DelegatedResourceList) XXX_Merge(src proto.Message) { - xxx_messageInfo_DelegatedResourceList.Merge(m, src) -} -func (m *DelegatedResourceList) XXX_Size() int { - return xxx_messageInfo_DelegatedResourceList.Size(m) -} -func (m *DelegatedResourceList) XXX_DiscardUnknown() { - xxx_messageInfo_DelegatedResourceList.DiscardUnknown(m) -} - -var xxx_messageInfo_DelegatedResourceList proto.InternalMessageInfo - -func (m *DelegatedResourceList) GetDelegatedResource() []*core.DelegatedResource { - if m != nil { - return m.DelegatedResource - } - return nil -} - -// Gossip node list -type NodeList struct { - Nodes []*Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty" pg:"nodes"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *NodeList) Reset() { *m = NodeList{} } -func (m *NodeList) String() string { return proto.CompactTextString(m) } -func (*NodeList) ProtoMessage() {} -func (*NodeList) Descriptor() ([]byte, []int) { - return fileDescriptor_93f388d8c446adbc, []int{10} -} -func (m *NodeList) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NodeList.Unmarshal(m, b) -} -func (m *NodeList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NodeList.Marshal(b, m, deterministic) -} -func (m *NodeList) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeList.Merge(m, src) -} -func (m *NodeList) XXX_Size() int { - return xxx_messageInfo_NodeList.Size(m) -} -func (m *NodeList) XXX_DiscardUnknown() { - xxx_messageInfo_NodeList.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeList proto.InternalMessageInfo - -func (m *NodeList) GetNodes() []*Node { - if m != nil { - return m.Nodes - } - return nil -} - -// Gossip node -type Node struct { - Address *Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" pg:"address"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Node) Reset() { *m = Node{} } -func (m *Node) String() string { return proto.CompactTextString(m) } -func (*Node) ProtoMessage() {} -func (*Node) Descriptor() ([]byte, []int) { - return fileDescriptor_93f388d8c446adbc, []int{11} -} -func (m *Node) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Node.Unmarshal(m, b) -} -func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Node.Marshal(b, m, deterministic) -} -func (m *Node) XXX_Merge(src proto.Message) { - xxx_messageInfo_Node.Merge(m, src) -} -func (m *Node) XXX_Size() int { - return xxx_messageInfo_Node.Size(m) -} -func (m *Node) XXX_DiscardUnknown() { - xxx_messageInfo_Node.DiscardUnknown(m) -} - -var xxx_messageInfo_Node proto.InternalMessageInfo - -func (m *Node) GetAddress() *Address { - if m != nil { - return m.Address - } - return nil -} - -// Gossip node address -type Address struct { - Host []byte `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty" pg:"host"` - Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty" pg:"port"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Address) Reset() { *m = Address{} } -func (m *Address) String() string { return proto.CompactTextString(m) } -func (*Address) ProtoMessage() {} -func (*Address) Descriptor() ([]byte, []int) { - return fileDescriptor_93f388d8c446adbc, []int{12} -} -func (m *Address) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Address.Unmarshal(m, b) -} -func (m *Address) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Address.Marshal(b, m, deterministic) -} -func (m *Address) XXX_Merge(src proto.Message) { - xxx_messageInfo_Address.Merge(m, src) -} -func (m *Address) XXX_Size() int { - return xxx_messageInfo_Address.Size(m) -} -func (m *Address) XXX_DiscardUnknown() { - xxx_messageInfo_Address.DiscardUnknown(m) -} - -var xxx_messageInfo_Address proto.InternalMessageInfo - -func (m *Address) GetHost() []byte { - if m != nil { - return m.Host - } - return nil -} - -func (m *Address) GetPort() int32 { - if m != nil { - return m.Port - } - return 0 -} - -type EmptyMessage struct { - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *EmptyMessage) Reset() { *m = EmptyMessage{} } -func (m *EmptyMessage) String() string { return proto.CompactTextString(m) } -func (*EmptyMessage) ProtoMessage() {} -func (*EmptyMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_93f388d8c446adbc, []int{13} -} -func (m *EmptyMessage) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EmptyMessage.Unmarshal(m, b) -} -func (m *EmptyMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EmptyMessage.Marshal(b, m, deterministic) -} -func (m *EmptyMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_EmptyMessage.Merge(m, src) -} -func (m *EmptyMessage) XXX_Size() int { - return xxx_messageInfo_EmptyMessage.Size(m) -} -func (m *EmptyMessage) XXX_DiscardUnknown() { - xxx_messageInfo_EmptyMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_EmptyMessage proto.InternalMessageInfo - -type NumberMessage struct { - Num int64 `protobuf:"varint,1,opt,name=num,proto3" json:"num,omitempty" pg:"num"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *NumberMessage) Reset() { *m = NumberMessage{} } -func (m *NumberMessage) String() string { return proto.CompactTextString(m) } -func (*NumberMessage) ProtoMessage() {} -func (*NumberMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_93f388d8c446adbc, []int{14} -} -func (m *NumberMessage) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NumberMessage.Unmarshal(m, b) -} -func (m *NumberMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NumberMessage.Marshal(b, m, deterministic) -} -func (m *NumberMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_NumberMessage.Merge(m, src) -} -func (m *NumberMessage) XXX_Size() int { - return xxx_messageInfo_NumberMessage.Size(m) -} -func (m *NumberMessage) XXX_DiscardUnknown() { - xxx_messageInfo_NumberMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_NumberMessage proto.InternalMessageInfo - -func (m *NumberMessage) GetNum() int64 { - if m != nil { - return m.Num - } - return 0 -} - -type BytesMessage struct { - Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty" pg:"value"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *BytesMessage) Reset() { *m = BytesMessage{} } -func (m *BytesMessage) String() string { return proto.CompactTextString(m) } -func (*BytesMessage) ProtoMessage() {} -func (*BytesMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_93f388d8c446adbc, []int{15} -} -func (m *BytesMessage) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BytesMessage.Unmarshal(m, b) -} -func (m *BytesMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BytesMessage.Marshal(b, m, deterministic) -} -func (m *BytesMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_BytesMessage.Merge(m, src) -} -func (m *BytesMessage) XXX_Size() int { - return xxx_messageInfo_BytesMessage.Size(m) -} -func (m *BytesMessage) XXX_DiscardUnknown() { - xxx_messageInfo_BytesMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_BytesMessage proto.InternalMessageInfo - -func (m *BytesMessage) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -type TimeMessage struct { - BeginInMilliseconds int64 `protobuf:"varint,1,opt,name=beginInMilliseconds,proto3" json:"beginInMilliseconds,omitempty" pg:"beginInMilliseconds"` - EndInMilliseconds int64 `protobuf:"varint,2,opt,name=endInMilliseconds,proto3" json:"endInMilliseconds,omitempty" pg:"endInMilliseconds"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *TimeMessage) Reset() { *m = TimeMessage{} } -func (m *TimeMessage) String() string { return proto.CompactTextString(m) } -func (*TimeMessage) ProtoMessage() {} -func (*TimeMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_93f388d8c446adbc, []int{16} -} -func (m *TimeMessage) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TimeMessage.Unmarshal(m, b) -} -func (m *TimeMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TimeMessage.Marshal(b, m, deterministic) -} -func (m *TimeMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_TimeMessage.Merge(m, src) -} -func (m *TimeMessage) XXX_Size() int { - return xxx_messageInfo_TimeMessage.Size(m) -} -func (m *TimeMessage) XXX_DiscardUnknown() { - xxx_messageInfo_TimeMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_TimeMessage proto.InternalMessageInfo - -func (m *TimeMessage) GetBeginInMilliseconds() int64 { - if m != nil { - return m.BeginInMilliseconds - } - return 0 -} - -func (m *TimeMessage) GetEndInMilliseconds() int64 { - if m != nil { - return m.EndInMilliseconds - } - return 0 -} - -type BlockLimit struct { - StartNum int64 `protobuf:"varint,1,opt,name=startNum,proto3" json:"startNum,omitempty" pg:"startNum"` - EndNum int64 `protobuf:"varint,2,opt,name=endNum,proto3" json:"endNum,omitempty" pg:"endNum"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *BlockLimit) Reset() { *m = BlockLimit{} } -func (m *BlockLimit) String() string { return proto.CompactTextString(m) } -func (*BlockLimit) ProtoMessage() {} -func (*BlockLimit) Descriptor() ([]byte, []int) { - return fileDescriptor_93f388d8c446adbc, []int{17} -} -func (m *BlockLimit) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BlockLimit.Unmarshal(m, b) -} -func (m *BlockLimit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BlockLimit.Marshal(b, m, deterministic) -} -func (m *BlockLimit) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockLimit.Merge(m, src) -} -func (m *BlockLimit) XXX_Size() int { - return xxx_messageInfo_BlockLimit.Size(m) -} -func (m *BlockLimit) XXX_DiscardUnknown() { - xxx_messageInfo_BlockLimit.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockLimit proto.InternalMessageInfo - -func (m *BlockLimit) GetStartNum() int64 { - if m != nil { - return m.StartNum - } - return 0 -} - -func (m *BlockLimit) GetEndNum() int64 { - if m != nil { - return m.EndNum - } - return 0 -} - -type TransactionLimit struct { - TransactionId []byte `protobuf:"bytes,1,opt,name=transactionId,proto3" json:"transactionId,omitempty" pg:"transactionId"` - LimitNum int64 `protobuf:"varint,2,opt,name=limitNum,proto3" json:"limitNum,omitempty" pg:"limitNum"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *TransactionLimit) Reset() { *m = TransactionLimit{} } -func (m *TransactionLimit) String() string { return proto.CompactTextString(m) } -func (*TransactionLimit) ProtoMessage() {} -func (*TransactionLimit) Descriptor() ([]byte, []int) { - return fileDescriptor_93f388d8c446adbc, []int{18} -} -func (m *TransactionLimit) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TransactionLimit.Unmarshal(m, b) -} -func (m *TransactionLimit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TransactionLimit.Marshal(b, m, deterministic) -} -func (m *TransactionLimit) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionLimit.Merge(m, src) -} -func (m *TransactionLimit) XXX_Size() int { - return xxx_messageInfo_TransactionLimit.Size(m) -} -func (m *TransactionLimit) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionLimit.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionLimit proto.InternalMessageInfo - -func (m *TransactionLimit) GetTransactionId() []byte { - if m != nil { - return m.TransactionId - } - return nil -} - -func (m *TransactionLimit) GetLimitNum() int64 { - if m != nil { - return m.LimitNum - } - return 0 -} - -type AccountPaginated struct { - Account *core.Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty" pg:"account"` - Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty" pg:"offset"` - Limit int64 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty" pg:"limit"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *AccountPaginated) Reset() { *m = AccountPaginated{} } -func (m *AccountPaginated) String() string { return proto.CompactTextString(m) } -func (*AccountPaginated) ProtoMessage() {} -func (*AccountPaginated) Descriptor() ([]byte, []int) { - return fileDescriptor_93f388d8c446adbc, []int{19} -} -func (m *AccountPaginated) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AccountPaginated.Unmarshal(m, b) -} -func (m *AccountPaginated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AccountPaginated.Marshal(b, m, deterministic) -} -func (m *AccountPaginated) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountPaginated.Merge(m, src) -} -func (m *AccountPaginated) XXX_Size() int { - return xxx_messageInfo_AccountPaginated.Size(m) -} -func (m *AccountPaginated) XXX_DiscardUnknown() { - xxx_messageInfo_AccountPaginated.DiscardUnknown(m) -} - -var xxx_messageInfo_AccountPaginated proto.InternalMessageInfo - -func (m *AccountPaginated) GetAccount() *core.Account { - if m != nil { - return m.Account - } - return nil -} - -func (m *AccountPaginated) GetOffset() int64 { - if m != nil { - return m.Offset - } - return 0 -} - -func (m *AccountPaginated) GetLimit() int64 { - if m != nil { - return m.Limit - } - return 0 -} - -type TimePaginatedMessage struct { - TimeMessage *TimeMessage `protobuf:"bytes,1,opt,name=timeMessage,proto3" json:"timeMessage,omitempty" pg:"timeMessage"` - Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty" pg:"offset"` - Limit int64 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty" pg:"limit"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *TimePaginatedMessage) Reset() { *m = TimePaginatedMessage{} } -func (m *TimePaginatedMessage) String() string { return proto.CompactTextString(m) } -func (*TimePaginatedMessage) ProtoMessage() {} -func (*TimePaginatedMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_93f388d8c446adbc, []int{20} -} -func (m *TimePaginatedMessage) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TimePaginatedMessage.Unmarshal(m, b) -} -func (m *TimePaginatedMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TimePaginatedMessage.Marshal(b, m, deterministic) -} -func (m *TimePaginatedMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_TimePaginatedMessage.Merge(m, src) -} -func (m *TimePaginatedMessage) XXX_Size() int { - return xxx_messageInfo_TimePaginatedMessage.Size(m) -} -func (m *TimePaginatedMessage) XXX_DiscardUnknown() { - xxx_messageInfo_TimePaginatedMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_TimePaginatedMessage proto.InternalMessageInfo - -func (m *TimePaginatedMessage) GetTimeMessage() *TimeMessage { - if m != nil { - return m.TimeMessage - } - return nil -} - -func (m *TimePaginatedMessage) GetOffset() int64 { - if m != nil { - return m.Offset - } - return 0 -} - -func (m *TimePaginatedMessage) GetLimit() int64 { - if m != nil { - return m.Limit - } - return 0 -} - -//deprecated -type AccountNetMessage struct { - FreeNetUsed int64 `protobuf:"varint,1,opt,name=freeNetUsed,proto3" json:"freeNetUsed,omitempty" pg:"freeNetUsed"` - FreeNetLimit int64 `protobuf:"varint,2,opt,name=freeNetLimit,proto3" json:"freeNetLimit,omitempty" pg:"freeNetLimit"` - NetUsed int64 `protobuf:"varint,3,opt,name=NetUsed,proto3" json:"NetUsed,omitempty" pg:"NetUsed"` - NetLimit int64 `protobuf:"varint,4,opt,name=NetLimit,proto3" json:"NetLimit,omitempty" pg:"NetLimit"` - AssetNetUsed map[string]int64 `protobuf:"bytes,5,rep,name=assetNetUsed,proto3" json:"assetNetUsed,omitempty" pg:"assetNetUsed" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - AssetNetLimit map[string]int64 `protobuf:"bytes,6,rep,name=assetNetLimit,proto3" json:"assetNetLimit,omitempty" pg:"assetNetLimit" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - TotalNetLimit int64 `protobuf:"varint,7,opt,name=TotalNetLimit,proto3" json:"TotalNetLimit,omitempty" pg:"TotalNetLimit"` - TotalNetWeight int64 `protobuf:"varint,8,opt,name=TotalNetWeight,proto3" json:"TotalNetWeight,omitempty" pg:"TotalNetWeight"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *AccountNetMessage) Reset() { *m = AccountNetMessage{} } -func (m *AccountNetMessage) String() string { return proto.CompactTextString(m) } -func (*AccountNetMessage) ProtoMessage() {} -func (*AccountNetMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_93f388d8c446adbc, []int{21} -} -func (m *AccountNetMessage) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AccountNetMessage.Unmarshal(m, b) -} -func (m *AccountNetMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AccountNetMessage.Marshal(b, m, deterministic) -} -func (m *AccountNetMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountNetMessage.Merge(m, src) -} -func (m *AccountNetMessage) XXX_Size() int { - return xxx_messageInfo_AccountNetMessage.Size(m) -} -func (m *AccountNetMessage) XXX_DiscardUnknown() { - xxx_messageInfo_AccountNetMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_AccountNetMessage proto.InternalMessageInfo - -func (m *AccountNetMessage) GetFreeNetUsed() int64 { - if m != nil { - return m.FreeNetUsed - } - return 0 -} - -func (m *AccountNetMessage) GetFreeNetLimit() int64 { - if m != nil { - return m.FreeNetLimit - } - return 0 -} - -func (m *AccountNetMessage) GetNetUsed() int64 { - if m != nil { - return m.NetUsed - } - return 0 -} - -func (m *AccountNetMessage) GetNetLimit() int64 { - if m != nil { - return m.NetLimit - } - return 0 -} - -func (m *AccountNetMessage) GetAssetNetUsed() map[string]int64 { - if m != nil { - return m.AssetNetUsed - } - return nil -} - -func (m *AccountNetMessage) GetAssetNetLimit() map[string]int64 { - if m != nil { - return m.AssetNetLimit - } - return nil -} - -func (m *AccountNetMessage) GetTotalNetLimit() int64 { - if m != nil { - return m.TotalNetLimit - } - return 0 -} - -func (m *AccountNetMessage) GetTotalNetWeight() int64 { - if m != nil { - return m.TotalNetWeight - } - return 0 -} - -type AccountResourceMessage struct { - FreeNetUsed int64 `protobuf:"varint,1,opt,name=freeNetUsed,proto3" json:"freeNetUsed,omitempty" pg:"freeNetUsed"` - FreeNetLimit int64 `protobuf:"varint,2,opt,name=freeNetLimit,proto3" json:"freeNetLimit,omitempty" pg:"freeNetLimit"` - NetUsed int64 `protobuf:"varint,3,opt,name=NetUsed,proto3" json:"NetUsed,omitempty" pg:"NetUsed"` - NetLimit int64 `protobuf:"varint,4,opt,name=NetLimit,proto3" json:"NetLimit,omitempty" pg:"NetLimit"` - AssetNetUsed map[string]int64 `protobuf:"bytes,5,rep,name=assetNetUsed,proto3" json:"assetNetUsed,omitempty" pg:"assetNetUsed" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - AssetNetLimit map[string]int64 `protobuf:"bytes,6,rep,name=assetNetLimit,proto3" json:"assetNetLimit,omitempty" pg:"assetNetLimit" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - TotalNetLimit int64 `protobuf:"varint,7,opt,name=TotalNetLimit,proto3" json:"TotalNetLimit,omitempty" pg:"TotalNetLimit"` - TotalNetWeight int64 `protobuf:"varint,8,opt,name=TotalNetWeight,proto3" json:"TotalNetWeight,omitempty" pg:"TotalNetWeight"` - EnergyUsed int64 `protobuf:"varint,13,opt,name=EnergyUsed,proto3" json:"EnergyUsed,omitempty" pg:"EnergyUsed"` - EnergyLimit int64 `protobuf:"varint,14,opt,name=EnergyLimit,proto3" json:"EnergyLimit,omitempty" pg:"EnergyLimit"` - TotalEnergyLimit int64 `protobuf:"varint,15,opt,name=TotalEnergyLimit,proto3" json:"TotalEnergyLimit,omitempty" pg:"TotalEnergyLimit"` - TotalEnergyWeight int64 `protobuf:"varint,16,opt,name=TotalEnergyWeight,proto3" json:"TotalEnergyWeight,omitempty" pg:"TotalEnergyWeight"` - StorageUsed int64 `protobuf:"varint,21,opt,name=storageUsed,proto3" json:"storageUsed,omitempty" pg:"storageUsed"` - StorageLimit int64 `protobuf:"varint,22,opt,name=storageLimit,proto3" json:"storageLimit,omitempty" pg:"storageLimit"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *AccountResourceMessage) Reset() { *m = AccountResourceMessage{} } -func (m *AccountResourceMessage) String() string { return proto.CompactTextString(m) } -func (*AccountResourceMessage) ProtoMessage() {} -func (*AccountResourceMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_93f388d8c446adbc, []int{22} -} -func (m *AccountResourceMessage) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AccountResourceMessage.Unmarshal(m, b) -} -func (m *AccountResourceMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AccountResourceMessage.Marshal(b, m, deterministic) -} -func (m *AccountResourceMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountResourceMessage.Merge(m, src) -} -func (m *AccountResourceMessage) XXX_Size() int { - return xxx_messageInfo_AccountResourceMessage.Size(m) -} -func (m *AccountResourceMessage) XXX_DiscardUnknown() { - xxx_messageInfo_AccountResourceMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_AccountResourceMessage proto.InternalMessageInfo - -func (m *AccountResourceMessage) GetFreeNetUsed() int64 { - if m != nil { - return m.FreeNetUsed - } - return 0 -} - -func (m *AccountResourceMessage) GetFreeNetLimit() int64 { - if m != nil { - return m.FreeNetLimit - } - return 0 -} - -func (m *AccountResourceMessage) GetNetUsed() int64 { - if m != nil { - return m.NetUsed - } - return 0 -} - -func (m *AccountResourceMessage) GetNetLimit() int64 { - if m != nil { - return m.NetLimit - } - return 0 -} - -func (m *AccountResourceMessage) GetAssetNetUsed() map[string]int64 { - if m != nil { - return m.AssetNetUsed - } - return nil -} - -func (m *AccountResourceMessage) GetAssetNetLimit() map[string]int64 { - if m != nil { - return m.AssetNetLimit - } - return nil -} - -func (m *AccountResourceMessage) GetTotalNetLimit() int64 { - if m != nil { - return m.TotalNetLimit - } - return 0 -} - -func (m *AccountResourceMessage) GetTotalNetWeight() int64 { - if m != nil { - return m.TotalNetWeight - } - return 0 -} - -func (m *AccountResourceMessage) GetEnergyUsed() int64 { - if m != nil { - return m.EnergyUsed - } - return 0 -} - -func (m *AccountResourceMessage) GetEnergyLimit() int64 { - if m != nil { - return m.EnergyLimit - } - return 0 -} - -func (m *AccountResourceMessage) GetTotalEnergyLimit() int64 { - if m != nil { - return m.TotalEnergyLimit - } - return 0 -} - -func (m *AccountResourceMessage) GetTotalEnergyWeight() int64 { - if m != nil { - return m.TotalEnergyWeight - } - return 0 -} - -func (m *AccountResourceMessage) GetStorageUsed() int64 { - if m != nil { - return m.StorageUsed - } - return 0 -} - -func (m *AccountResourceMessage) GetStorageLimit() int64 { - if m != nil { - return m.StorageLimit - } - return 0 -} - -type PaginatedMessage struct { - Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty" pg:"offset"` - Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty" pg:"limit"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *PaginatedMessage) Reset() { *m = PaginatedMessage{} } -func (m *PaginatedMessage) String() string { return proto.CompactTextString(m) } -func (*PaginatedMessage) ProtoMessage() {} -func (*PaginatedMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_93f388d8c446adbc, []int{23} -} -func (m *PaginatedMessage) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PaginatedMessage.Unmarshal(m, b) -} -func (m *PaginatedMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PaginatedMessage.Marshal(b, m, deterministic) -} -func (m *PaginatedMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_PaginatedMessage.Merge(m, src) -} -func (m *PaginatedMessage) XXX_Size() int { - return xxx_messageInfo_PaginatedMessage.Size(m) -} -func (m *PaginatedMessage) XXX_DiscardUnknown() { - xxx_messageInfo_PaginatedMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_PaginatedMessage proto.InternalMessageInfo - -func (m *PaginatedMessage) GetOffset() int64 { - if m != nil { - return m.Offset - } - return 0 -} - -func (m *PaginatedMessage) GetLimit() int64 { - if m != nil { - return m.Limit - } - return 0 -} - -type EasyTransferMessage struct { - PassPhrase []byte `protobuf:"bytes,1,opt,name=passPhrase,proto3" json:"passPhrase,omitempty" pg:"passPhrase"` - ToAddress []byte `protobuf:"bytes,2,opt,name=toAddress,proto3" json:"toAddress,omitempty" pg:"toAddress"` - Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty" pg:"amount"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *EasyTransferMessage) Reset() { *m = EasyTransferMessage{} } -func (m *EasyTransferMessage) String() string { return proto.CompactTextString(m) } -func (*EasyTransferMessage) ProtoMessage() {} -func (*EasyTransferMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_93f388d8c446adbc, []int{24} -} -func (m *EasyTransferMessage) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EasyTransferMessage.Unmarshal(m, b) -} -func (m *EasyTransferMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EasyTransferMessage.Marshal(b, m, deterministic) -} -func (m *EasyTransferMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_EasyTransferMessage.Merge(m, src) -} -func (m *EasyTransferMessage) XXX_Size() int { - return xxx_messageInfo_EasyTransferMessage.Size(m) -} -func (m *EasyTransferMessage) XXX_DiscardUnknown() { - xxx_messageInfo_EasyTransferMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_EasyTransferMessage proto.InternalMessageInfo - -func (m *EasyTransferMessage) GetPassPhrase() []byte { - if m != nil { - return m.PassPhrase - } - return nil -} - -func (m *EasyTransferMessage) GetToAddress() []byte { - if m != nil { - return m.ToAddress - } - return nil -} - -func (m *EasyTransferMessage) GetAmount() int64 { - if m != nil { - return m.Amount - } - return 0 -} - -type EasyTransferByPrivateMessage struct { - PrivateKey []byte `protobuf:"bytes,1,opt,name=privateKey,proto3" json:"privateKey,omitempty" pg:"privateKey"` - ToAddress []byte `protobuf:"bytes,2,opt,name=toAddress,proto3" json:"toAddress,omitempty" pg:"toAddress"` - Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty" pg:"amount"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *EasyTransferByPrivateMessage) Reset() { *m = EasyTransferByPrivateMessage{} } -func (m *EasyTransferByPrivateMessage) String() string { return proto.CompactTextString(m) } -func (*EasyTransferByPrivateMessage) ProtoMessage() {} -func (*EasyTransferByPrivateMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_93f388d8c446adbc, []int{25} -} -func (m *EasyTransferByPrivateMessage) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EasyTransferByPrivateMessage.Unmarshal(m, b) -} -func (m *EasyTransferByPrivateMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EasyTransferByPrivateMessage.Marshal(b, m, deterministic) -} -func (m *EasyTransferByPrivateMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_EasyTransferByPrivateMessage.Merge(m, src) -} -func (m *EasyTransferByPrivateMessage) XXX_Size() int { - return xxx_messageInfo_EasyTransferByPrivateMessage.Size(m) -} -func (m *EasyTransferByPrivateMessage) XXX_DiscardUnknown() { - xxx_messageInfo_EasyTransferByPrivateMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_EasyTransferByPrivateMessage proto.InternalMessageInfo - -func (m *EasyTransferByPrivateMessage) GetPrivateKey() []byte { - if m != nil { - return m.PrivateKey - } - return nil -} - -func (m *EasyTransferByPrivateMessage) GetToAddress() []byte { - if m != nil { - return m.ToAddress - } - return nil -} - -func (m *EasyTransferByPrivateMessage) GetAmount() int64 { - if m != nil { - return m.Amount - } - return 0 -} - -type EasyTransferResponse struct { - Transaction *core.Transaction `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty" pg:"transaction"` - Result *Return `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty" pg:"result"` - Txid []byte `protobuf:"bytes,3,opt,name=txid,proto3" json:"txid,omitempty" pg:"txid"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *EasyTransferResponse) Reset() { *m = EasyTransferResponse{} } -func (m *EasyTransferResponse) String() string { return proto.CompactTextString(m) } -func (*EasyTransferResponse) ProtoMessage() {} -func (*EasyTransferResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_93f388d8c446adbc, []int{26} -} -func (m *EasyTransferResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EasyTransferResponse.Unmarshal(m, b) -} -func (m *EasyTransferResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EasyTransferResponse.Marshal(b, m, deterministic) -} -func (m *EasyTransferResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_EasyTransferResponse.Merge(m, src) -} -func (m *EasyTransferResponse) XXX_Size() int { - return xxx_messageInfo_EasyTransferResponse.Size(m) -} -func (m *EasyTransferResponse) XXX_DiscardUnknown() { - xxx_messageInfo_EasyTransferResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_EasyTransferResponse proto.InternalMessageInfo - -func (m *EasyTransferResponse) GetTransaction() *core.Transaction { - if m != nil { - return m.Transaction - } - return nil -} - -func (m *EasyTransferResponse) GetResult() *Return { - if m != nil { - return m.Result - } - return nil -} - -func (m *EasyTransferResponse) GetTxid() []byte { - if m != nil { - return m.Txid - } - return nil -} - -type AddressPrKeyPairMessage struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" pg:"address"` - PrivateKey string `protobuf:"bytes,2,opt,name=privateKey,proto3" json:"privateKey,omitempty" pg:"privateKey"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *AddressPrKeyPairMessage) Reset() { *m = AddressPrKeyPairMessage{} } -func (m *AddressPrKeyPairMessage) String() string { return proto.CompactTextString(m) } -func (*AddressPrKeyPairMessage) ProtoMessage() {} -func (*AddressPrKeyPairMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_93f388d8c446adbc, []int{27} -} -func (m *AddressPrKeyPairMessage) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AddressPrKeyPairMessage.Unmarshal(m, b) -} -func (m *AddressPrKeyPairMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AddressPrKeyPairMessage.Marshal(b, m, deterministic) -} -func (m *AddressPrKeyPairMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddressPrKeyPairMessage.Merge(m, src) -} -func (m *AddressPrKeyPairMessage) XXX_Size() int { - return xxx_messageInfo_AddressPrKeyPairMessage.Size(m) -} -func (m *AddressPrKeyPairMessage) XXX_DiscardUnknown() { - xxx_messageInfo_AddressPrKeyPairMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_AddressPrKeyPairMessage proto.InternalMessageInfo - -func (m *AddressPrKeyPairMessage) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *AddressPrKeyPairMessage) GetPrivateKey() string { - if m != nil { - return m.PrivateKey - } - return "" -} - -type TransactionExtention struct { - Transaction *core.Transaction `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty" pg:"transaction"` - Txid []byte `protobuf:"bytes,2,opt,name=txid,proto3" json:"txid,omitempty" pg:"txid"` - ConstantResult [][]byte `protobuf:"bytes,3,rep,name=constant_result,json=constantResult,proto3" json:"constant_result,omitempty" pg:"constant_result"` - Result *Return `protobuf:"bytes,4,opt,name=result,proto3" json:"result,omitempty" pg:"result"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *TransactionExtention) Reset() { *m = TransactionExtention{} } -func (m *TransactionExtention) String() string { return proto.CompactTextString(m) } -func (*TransactionExtention) ProtoMessage() {} -func (*TransactionExtention) Descriptor() ([]byte, []int) { - return fileDescriptor_93f388d8c446adbc, []int{28} -} -func (m *TransactionExtention) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TransactionExtention.Unmarshal(m, b) -} -func (m *TransactionExtention) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TransactionExtention.Marshal(b, m, deterministic) -} -func (m *TransactionExtention) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionExtention.Merge(m, src) -} -func (m *TransactionExtention) XXX_Size() int { - return xxx_messageInfo_TransactionExtention.Size(m) -} -func (m *TransactionExtention) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionExtention.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionExtention proto.InternalMessageInfo - -func (m *TransactionExtention) GetTransaction() *core.Transaction { - if m != nil { - return m.Transaction - } - return nil -} - -func (m *TransactionExtention) GetTxid() []byte { - if m != nil { - return m.Txid - } - return nil -} - -func (m *TransactionExtention) GetConstantResult() [][]byte { - if m != nil { - return m.ConstantResult - } - return nil -} - -func (m *TransactionExtention) GetResult() *Return { - if m != nil { - return m.Result - } - return nil -} - -type BlockExtention struct { - Transactions []*TransactionExtention `protobuf:"bytes,1,rep,name=transactions,proto3" json:"transactions,omitempty" pg:"transactions"` - BlockHeader *core.BlockHeader `protobuf:"bytes,2,opt,name=block_header,json=blockHeader,proto3" json:"block_header,omitempty" pg:"block_header"` - Blockid []byte `protobuf:"bytes,3,opt,name=blockid,proto3" json:"blockid,omitempty" pg:"blockid"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *BlockExtention) Reset() { *m = BlockExtention{} } -func (m *BlockExtention) String() string { return proto.CompactTextString(m) } -func (*BlockExtention) ProtoMessage() {} -func (*BlockExtention) Descriptor() ([]byte, []int) { - return fileDescriptor_93f388d8c446adbc, []int{29} -} -func (m *BlockExtention) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BlockExtention.Unmarshal(m, b) -} -func (m *BlockExtention) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BlockExtention.Marshal(b, m, deterministic) -} -func (m *BlockExtention) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockExtention.Merge(m, src) -} -func (m *BlockExtention) XXX_Size() int { - return xxx_messageInfo_BlockExtention.Size(m) -} -func (m *BlockExtention) XXX_DiscardUnknown() { - xxx_messageInfo_BlockExtention.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockExtention proto.InternalMessageInfo - -func (m *BlockExtention) GetTransactions() []*TransactionExtention { - if m != nil { - return m.Transactions - } - return nil -} - -func (m *BlockExtention) GetBlockHeader() *core.BlockHeader { - if m != nil { - return m.BlockHeader - } - return nil -} - -func (m *BlockExtention) GetBlockid() []byte { - if m != nil { - return m.Blockid - } - return nil -} - -type BlockListExtention struct { - Block []*BlockExtention `protobuf:"bytes,1,rep,name=block,proto3" json:"block,omitempty" pg:"block"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *BlockListExtention) Reset() { *m = BlockListExtention{} } -func (m *BlockListExtention) String() string { return proto.CompactTextString(m) } -func (*BlockListExtention) ProtoMessage() {} -func (*BlockListExtention) Descriptor() ([]byte, []int) { - return fileDescriptor_93f388d8c446adbc, []int{30} -} -func (m *BlockListExtention) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BlockListExtention.Unmarshal(m, b) -} -func (m *BlockListExtention) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BlockListExtention.Marshal(b, m, deterministic) -} -func (m *BlockListExtention) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockListExtention.Merge(m, src) -} -func (m *BlockListExtention) XXX_Size() int { - return xxx_messageInfo_BlockListExtention.Size(m) -} -func (m *BlockListExtention) XXX_DiscardUnknown() { - xxx_messageInfo_BlockListExtention.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockListExtention proto.InternalMessageInfo - -func (m *BlockListExtention) GetBlock() []*BlockExtention { - if m != nil { - return m.Block - } - return nil -} - -type TransactionListExtention struct { - Transaction []*TransactionExtention `protobuf:"bytes,1,rep,name=transaction,proto3" json:"transaction,omitempty" pg:"transaction"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *TransactionListExtention) Reset() { *m = TransactionListExtention{} } -func (m *TransactionListExtention) String() string { return proto.CompactTextString(m) } -func (*TransactionListExtention) ProtoMessage() {} -func (*TransactionListExtention) Descriptor() ([]byte, []int) { - return fileDescriptor_93f388d8c446adbc, []int{31} -} -func (m *TransactionListExtention) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TransactionListExtention.Unmarshal(m, b) -} -func (m *TransactionListExtention) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TransactionListExtention.Marshal(b, m, deterministic) -} -func (m *TransactionListExtention) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionListExtention.Merge(m, src) -} -func (m *TransactionListExtention) XXX_Size() int { - return xxx_messageInfo_TransactionListExtention.Size(m) -} -func (m *TransactionListExtention) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionListExtention.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionListExtention proto.InternalMessageInfo - -func (m *TransactionListExtention) GetTransaction() []*TransactionExtention { - if m != nil { - return m.Transaction - } - return nil -} - -func init() { - proto.RegisterEnum("protocol.ReturnResponseCode", ReturnResponseCode_name, ReturnResponseCode_value) - proto.RegisterType((*Return)(nil), "protocol.Return") - proto.RegisterType((*BlockReference)(nil), "protocol.BlockReference") - proto.RegisterType((*WitnessList)(nil), "protocol.WitnessList") - proto.RegisterType((*ProposalList)(nil), "protocol.ProposalList") - proto.RegisterType((*ExchangeList)(nil), "protocol.ExchangeList") - proto.RegisterType((*AssetIssueList)(nil), "protocol.AssetIssueList") - proto.RegisterType((*BlockList)(nil), "protocol.BlockList") - proto.RegisterType((*TransactionList)(nil), "protocol.TransactionList") - proto.RegisterType((*DelegatedResourceMessage)(nil), "protocol.DelegatedResourceMessage") - proto.RegisterType((*DelegatedResourceList)(nil), "protocol.DelegatedResourceList") - proto.RegisterType((*NodeList)(nil), "protocol.NodeList") - proto.RegisterType((*Node)(nil), "protocol.Node") - proto.RegisterType((*Address)(nil), "protocol.Address") - proto.RegisterType((*EmptyMessage)(nil), "protocol.EmptyMessage") - proto.RegisterType((*NumberMessage)(nil), "protocol.NumberMessage") - proto.RegisterType((*BytesMessage)(nil), "protocol.BytesMessage") - proto.RegisterType((*TimeMessage)(nil), "protocol.TimeMessage") - proto.RegisterType((*BlockLimit)(nil), "protocol.BlockLimit") - proto.RegisterType((*TransactionLimit)(nil), "protocol.TransactionLimit") - proto.RegisterType((*AccountPaginated)(nil), "protocol.AccountPaginated") - proto.RegisterType((*TimePaginatedMessage)(nil), "protocol.TimePaginatedMessage") - proto.RegisterType((*AccountNetMessage)(nil), "protocol.AccountNetMessage") - proto.RegisterMapType((map[string]int64)(nil), "protocol.AccountNetMessage.AssetNetLimitEntry") - proto.RegisterMapType((map[string]int64)(nil), "protocol.AccountNetMessage.AssetNetUsedEntry") - proto.RegisterType((*AccountResourceMessage)(nil), "protocol.AccountResourceMessage") - proto.RegisterMapType((map[string]int64)(nil), "protocol.AccountResourceMessage.AssetNetLimitEntry") - proto.RegisterMapType((map[string]int64)(nil), "protocol.AccountResourceMessage.AssetNetUsedEntry") - proto.RegisterType((*PaginatedMessage)(nil), "protocol.PaginatedMessage") - proto.RegisterType((*EasyTransferMessage)(nil), "protocol.EasyTransferMessage") - proto.RegisterType((*EasyTransferByPrivateMessage)(nil), "protocol.EasyTransferByPrivateMessage") - proto.RegisterType((*EasyTransferResponse)(nil), "protocol.EasyTransferResponse") - proto.RegisterType((*AddressPrKeyPairMessage)(nil), "protocol.AddressPrKeyPairMessage") - proto.RegisterType((*TransactionExtention)(nil), "protocol.TransactionExtention") - proto.RegisterType((*BlockExtention)(nil), "protocol.BlockExtention") - proto.RegisterType((*BlockListExtention)(nil), "protocol.BlockListExtention") - proto.RegisterType((*TransactionListExtention)(nil), "protocol.TransactionListExtention") -} - -func init() { proto.RegisterFile("protos/protocol/api/api.proto", fileDescriptor_93f388d8c446adbc) } - -var fileDescriptor_93f388d8c446adbc = []byte{ - // 3744 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x5b, 0x5b, 0x6f, 0x1c, 0xc9, - 0x75, 0x4e, 0x53, 0x94, 0x44, 0x1e, 0x8e, 0x78, 0x39, 0x22, 0x29, 0x6a, 0x44, 0x4a, 0x54, 0xef, - 0x7a, 0x97, 0x58, 0xdb, 0xd2, 0xee, 0x08, 0xce, 0x7a, 0xed, 0xac, 0x57, 0xbc, 0x8c, 0xb9, 0xb3, - 0x92, 0x86, 0x54, 0xcf, 0x50, 0xda, 0x5d, 0x3b, 0x20, 0x9a, 0x33, 0xc5, 0x61, 0x7b, 0x67, 0xba, - 0x07, 0xdd, 0x45, 0x51, 0xb3, 0x88, 0xf3, 0xb0, 0x31, 0x12, 0x6f, 0x2e, 0x08, 0x92, 0x00, 0x49, - 0x80, 0x3c, 0x04, 0x08, 0x02, 0xc4, 0x49, 0x9e, 0xf2, 0x92, 0xfc, 0x81, 0xfc, 0x83, 0xfc, 0x85, - 0xfc, 0x83, 0x00, 0x79, 0xc8, 0x53, 0x50, 0xd5, 0x55, 0xdd, 0xd5, 0xdd, 0xd5, 0xd3, 0x4d, 0x4a, - 0x76, 0xe2, 0x07, 0x41, 0xec, 0x73, 0x4e, 0x9d, 0xf3, 0x9d, 0x4b, 0xdd, 0x6b, 0x60, 0x6d, 0xe8, - 0x7b, 0xd4, 0x0b, 0xee, 0xf3, 0xff, 0x3a, 0x5e, 0xff, 0xbe, 0x3d, 0x74, 0xd8, 0xbf, 0x7b, 0x9c, - 0x80, 0x53, 0x92, 0x5e, 0x5d, 0xed, 0x79, 0x5e, 0xaf, 0x4f, 0x42, 0xbe, 0xeb, 0x7a, 0xd4, 0xa6, - 0x8e, 0xe7, 0x06, 0xa1, 0x5c, 0xf5, 0x8d, 0xb4, 0x9a, 0x8e, 0xe7, 0x93, 0xfb, 0xdb, 0x9e, 0x4b, - 0x7d, 0xbb, 0x43, 0x85, 0xd0, 0x1d, 0xad, 0x50, 0xdb, 0xf7, 0xdc, 0x50, 0xc0, 0xfc, 0xaf, 0x09, - 0xb8, 0x62, 0x11, 0x7a, 0xea, 0xbb, 0xb8, 0x0c, 0x57, 0x7c, 0x12, 0x9c, 0xf6, 0xe9, 0x8a, 0xb1, - 0x6e, 0x6c, 0x4c, 0x59, 0xe2, 0x0b, 0x6b, 0x30, 0xd9, 0xf1, 0xba, 0x64, 0x65, 0x62, 0xdd, 0xd8, - 0x98, 0xad, 0xdd, 0xbe, 0x27, 0x75, 0xdd, 0x0b, 0xdb, 0xdd, 0xf3, 0x49, 0x30, 0xf4, 0xdc, 0x80, - 0x1c, 0x32, 0x29, 0x8b, 0xcb, 0xe2, 0x0a, 0x5c, 0x1d, 0x90, 0x20, 0xb0, 0x7b, 0x64, 0xe5, 0xd2, - 0xba, 0xb1, 0x51, 0xb1, 0xe4, 0xa7, 0xf9, 0xd5, 0x04, 0x5c, 0x4b, 0xb4, 0xc0, 0x19, 0xb8, 0xda, - 0x3a, 0xd8, 0xde, 0xae, 0xb7, 0x5a, 0xf3, 0xbf, 0x81, 0x15, 0x98, 0x6a, 0x35, 0x76, 0xeb, 0x96, - 0xb5, 0x67, 0xcd, 0x1b, 0x78, 0x0b, 0x6e, 0x6c, 0xef, 0x35, 0xdb, 0xd6, 0xe6, 0x76, 0xfb, 0xf0, - 0xd9, 0xe6, 0xe3, 0xc6, 0xce, 0x66, 0xbb, 0x7e, 0x18, 0x32, 0x27, 0x70, 0x19, 0x30, 0x62, 0xd6, - 0x3f, 0x95, 0xf4, 0x4b, 0x88, 0x30, 0xbb, 0xb5, 0xd9, 0xdc, 0x79, 0xde, 0x68, 0x7f, 0x2c, 0x68, - 0x93, 0x78, 0x13, 0x96, 0x76, 0x0e, 0xf6, 0x0f, 0xdb, 0xd6, 0x66, 0xb3, 0xb5, 0xb9, 0xdd, 0x6e, - 0xec, 0x35, 0x05, 0xeb, 0x32, 0xce, 0xc1, 0x4c, 0x7b, 0x73, 0x7f, 0xaf, 0x25, 0x08, 0x57, 0x70, - 0x0d, 0x6e, 0xb6, 0xf7, 0xf6, 0x0e, 0xb7, 0x1a, 0xbb, 0x1a, 0xf9, 0xab, 0xb8, 0x0e, 0xab, 0x09, - 0xf2, 0xa7, 0xfb, 0x0d, 0x6b, 0x53, 0x91, 0x98, 0x62, 0x1a, 0x5b, 0x75, 0xeb, 0x59, 0xdd, 0x3a, - 0xdc, 0x3a, 0x68, 0x7d, 0x36, 0x3f, 0xcd, 0x08, 0x7b, 0xed, 0x8f, 0xeb, 0x96, 0x90, 0x58, 0x34, - 0x1f, 0xc3, 0xec, 0x56, 0xdf, 0xeb, 0x7c, 0x61, 0x91, 0x63, 0xe2, 0x13, 0xb7, 0x43, 0xf0, 0x16, - 0x4c, 0x1f, 0x31, 0xca, 0xa1, 0x7b, 0x3a, 0xe0, 0xf1, 0xbf, 0x64, 0x4d, 0x71, 0x42, 0xf3, 0x74, - 0x80, 0x6b, 0x00, 0x21, 0xf3, 0xc4, 0x0e, 0x4e, 0x78, 0x1e, 0x2a, 0x56, 0x28, 0xfe, 0xb1, 0x1d, - 0x9c, 0x98, 0x3f, 0x80, 0x99, 0xe7, 0x0e, 0x75, 0x49, 0x10, 0x3c, 0x76, 0x02, 0x8a, 0xf7, 0x61, - 0xfa, 0x2c, 0xfc, 0x24, 0xc1, 0x8a, 0xb1, 0x7e, 0x69, 0x63, 0xa6, 0xb6, 0x10, 0x27, 0x4d, 0x48, - 0x5a, 0xb1, 0x8c, 0xf9, 0x10, 0x2a, 0xfb, 0xbe, 0x37, 0xf4, 0x02, 0xbb, 0xcf, 0x15, 0xbc, 0x0b, - 0xd3, 0x43, 0xf1, 0x2d, 0x15, 0x60, 0xac, 0x40, 0x8a, 0x5a, 0xb1, 0x10, 0xd3, 0x50, 0x7f, 0xd9, - 0x39, 0xb1, 0xdd, 0x1e, 0x91, 0x1a, 0x88, 0xf8, 0xd6, 0x68, 0x90, 0xa2, 0x56, 0x2c, 0x64, 0x36, - 0x61, 0x76, 0x33, 0x08, 0x08, 0x6d, 0x04, 0xc1, 0x69, 0xa8, 0xe3, 0xb7, 0x00, 0xec, 0x88, 0x22, - 0x94, 0xac, 0xc6, 0x4a, 0x62, 0x69, 0x59, 0xf2, 0x96, 0x22, 0x6f, 0xd6, 0x60, 0x9a, 0x47, 0x98, - 0xab, 0xfa, 0x06, 0x5c, 0xe6, 0xd1, 0x12, 0x5a, 0xe6, 0x62, 0x2d, 0x61, 0x16, 0x42, 0xae, 0xf9, - 0x09, 0xcc, 0xb5, 0x7d, 0xdb, 0x0d, 0xec, 0x0e, 0xeb, 0x67, 0xbc, 0xe5, 0xfb, 0x30, 0x43, 0x63, - 0x92, 0x68, 0xbf, 0x14, 0xb7, 0x57, 0xe4, 0x2d, 0x55, 0xd2, 0xfc, 0x1c, 0x56, 0x76, 0x48, 0x9f, - 0xf4, 0x6c, 0x4a, 0xba, 0x16, 0x09, 0xbc, 0x53, 0xbf, 0x43, 0x9e, 0x84, 0x5d, 0x00, 0xd7, 0x61, - 0xe6, 0xd8, 0xf7, 0x06, 0x9b, 0xdd, 0xae, 0x4f, 0x82, 0x80, 0x67, 0xbb, 0x62, 0xa9, 0x24, 0x5c, - 0x85, 0x69, 0xea, 0x49, 0xbe, 0xc8, 0x77, 0x44, 0x30, 0x8f, 0x60, 0x29, 0xa3, 0x9b, 0xa3, 0x6d, - 0xc0, 0x42, 0x37, 0xcd, 0x10, 0x98, 0x6f, 0xc5, 0x98, 0x33, 0x6d, 0xad, 0x6c, 0x2b, 0xf3, 0x5d, - 0x98, 0x6a, 0x7a, 0xdd, 0x50, 0xed, 0x9b, 0x70, 0xd9, 0xf5, 0xba, 0x51, 0x26, 0x67, 0x63, 0x55, - 0x4c, 0xc4, 0x0a, 0x99, 0xe6, 0x03, 0x98, 0x64, 0x9f, 0xf8, 0x4d, 0xb8, 0x6a, 0x2b, 0x9e, 0x25, - 0x8a, 0x4f, 0x78, 0x60, 0x49, 0x09, 0xf3, 0x3d, 0xb8, 0x2a, 0x7d, 0x46, 0x98, 0x3c, 0xf1, 0x02, - 0x2a, 0xc2, 0xc1, 0xff, 0x66, 0xb4, 0xa1, 0xe7, 0x53, 0x1e, 0x82, 0xcb, 0x16, 0xff, 0xdb, 0x9c, - 0x85, 0x4a, 0x7d, 0x30, 0xa4, 0x23, 0x11, 0x4d, 0xf3, 0x2e, 0x5c, 0x6b, 0x9e, 0x0e, 0x8e, 0x88, - 0x2f, 0xc3, 0x3b, 0x0f, 0x97, 0xe2, 0x4e, 0xc4, 0xfe, 0x34, 0xdf, 0x84, 0xca, 0xd6, 0x88, 0x92, - 0x40, 0x4a, 0x2c, 0xc2, 0xe5, 0x17, 0x76, 0x9f, 0x57, 0x15, 0xb3, 0x15, 0x7e, 0x98, 0x03, 0x98, - 0x69, 0x3b, 0x83, 0x28, 0x4b, 0xef, 0xc2, 0xf5, 0x23, 0xd2, 0x73, 0xdc, 0x86, 0xfb, 0xc4, 0xe9, - 0xf7, 0x9d, 0x80, 0x74, 0x3c, 0xb7, 0x1b, 0x08, 0xb5, 0x3a, 0x16, 0x7e, 0x0b, 0x16, 0x88, 0xdb, - 0x4d, 0xc9, 0x4f, 0x70, 0xf9, 0x2c, 0xc3, 0x7c, 0x08, 0x20, 0x2a, 0x74, 0xe0, 0x50, 0xac, 0xc2, - 0x54, 0x40, 0x6d, 0x9f, 0x36, 0xe3, 0xee, 0x2f, 0xbf, 0xd9, 0xc0, 0x4c, 0xdc, 0x2e, 0xe3, 0x84, - 0xca, 0xc4, 0x97, 0xd9, 0x86, 0xf9, 0x44, 0xbd, 0x32, 0x3d, 0x6f, 0xc2, 0x35, 0xa5, 0x0c, 0x1b, - 0x5d, 0xe1, 0x62, 0x92, 0xc8, 0xac, 0xf5, 0x99, 0x78, 0xac, 0x33, 0xfa, 0x36, 0x07, 0x30, 0xbf, - 0xd9, 0xe9, 0x78, 0xa7, 0x2e, 0xdd, 0xb7, 0x7b, 0x8e, 0xcb, 0xaa, 0x82, 0xe7, 0x34, 0xa4, 0x69, - 0x72, 0x1a, 0x32, 0x2c, 0x29, 0xc1, 0xe0, 0x7a, 0xc7, 0xc7, 0x01, 0xa1, 0x12, 0x6e, 0xf8, 0xc5, - 0xa2, 0xce, 0x8d, 0xf0, 0x19, 0xe1, 0x92, 0x15, 0x7e, 0x98, 0x3f, 0x85, 0x45, 0x16, 0xf5, 0xc8, - 0x96, 0x0c, 0x3f, 0xeb, 0x79, 0x71, 0x36, 0x84, 0x59, 0xb5, 0xe7, 0xc5, 0x4c, 0x4b, 0x95, 0x3c, - 0xa7, 0xf9, 0xaf, 0x27, 0x61, 0x41, 0x78, 0xd0, 0x24, 0x34, 0xd1, 0x43, 0x09, 0x69, 0x12, 0x7a, - 0x10, 0x90, 0xae, 0x48, 0x88, 0x4a, 0x42, 0x13, 0x2a, 0xe2, 0x93, 0xc7, 0x5d, 0xd8, 0x4a, 0xd0, - 0xd8, 0x24, 0x28, 0x35, 0x84, 0x36, 0xe5, 0x27, 0x8b, 0x7f, 0xd4, 0x72, 0x32, 0x8c, 0x7f, 0xd4, - 0xea, 0x29, 0x54, 0xf8, 0x38, 0x26, 0x9b, 0x5e, 0xe6, 0x9d, 0xee, 0xdb, 0x99, 0x80, 0xc7, 0x70, - 0xc3, 0xb1, 0x50, 0xc8, 0xd7, 0x5d, 0xea, 0x8f, 0xac, 0x84, 0x0a, 0x6c, 0xc3, 0x35, 0xf9, 0x1d, - 0xda, 0xbc, 0xc2, 0x75, 0xde, 0x2b, 0xa3, 0x93, 0x37, 0x08, 0x95, 0x26, 0x95, 0xb0, 0x52, 0x6b, - 0x7b, 0xd4, 0xee, 0x47, 0x5a, 0xaf, 0x72, 0x4f, 0x92, 0x44, 0x7c, 0x0b, 0x66, 0x25, 0xe1, 0x39, - 0x71, 0x7a, 0x27, 0x74, 0x65, 0x8a, 0x8b, 0xa5, 0xa8, 0xd5, 0x8f, 0x60, 0x21, 0xe3, 0x06, 0xeb, - 0xca, 0x5f, 0x90, 0x11, 0x8f, 0xff, 0xb4, 0xc5, 0xfe, 0x8c, 0xbb, 0x6e, 0x18, 0xf0, 0xf0, 0xe3, - 0x7b, 0x13, 0xdf, 0x35, 0xaa, 0x0f, 0x01, 0xb3, 0x98, 0xcf, 0xa3, 0xc1, 0xfc, 0x9f, 0xcb, 0xb0, - 0x2c, 0xab, 0x59, 0x37, 0x64, 0xff, 0x1f, 0x15, 0xc4, 0x33, 0x6d, 0x41, 0xd4, 0xb2, 0x3d, 0x30, - 0x89, 0xb9, 0xb0, 0x2a, 0x3e, 0xd3, 0x57, 0xc5, 0x83, 0xd2, 0x8a, 0x7f, 0x45, 0xa5, 0x81, 0xb7, - 0x01, 0xea, 0x2e, 0xf1, 0x7b, 0x23, 0xee, 0xfe, 0x35, 0x2e, 0xa3, 0x50, 0x58, 0x72, 0xc2, 0xaf, - 0xd0, 0xd6, 0x6c, 0x98, 0x1c, 0x85, 0x84, 0xef, 0xc0, 0x3c, 0xd7, 0xa9, 0x8a, 0xcd, 0x71, 0xb1, - 0x0c, 0x9d, 0x8d, 0xe2, 0x0a, 0x4d, 0x00, 0x9b, 0x0f, 0x47, 0xf1, 0x0c, 0x83, 0xd9, 0x0e, 0xa8, - 0xe7, 0xdb, 0x3d, 0xc2, 0xc1, 0x2d, 0x85, 0xb6, 0x15, 0x12, 0x2b, 0x0c, 0xf1, 0x19, 0xda, 0x5d, - 0x0e, 0x0b, 0x43, 0xa5, 0xfd, 0x7f, 0x28, 0xfe, 0x87, 0x30, 0x9f, 0x19, 0x83, 0xe3, 0xa1, 0xd4, - 0xd0, 0x0f, 0xa5, 0x13, 0xea, 0x50, 0xfa, 0x05, 0x5c, 0xaf, 0xdb, 0xc1, 0x88, 0x4f, 0x49, 0xc7, - 0xf1, 0x74, 0x7c, 0x1b, 0x60, 0x68, 0x07, 0xc1, 0xfe, 0x89, 0x6f, 0x07, 0x72, 0xc6, 0x55, 0x28, - 0xe3, 0xd7, 0x3a, 0x0c, 0x82, 0x3d, 0xe0, 0x13, 0x4f, 0xd8, 0x63, 0xc4, 0x97, 0x49, 0x61, 0x55, - 0x35, 0xb6, 0x35, 0xda, 0xf7, 0x9d, 0x17, 0x36, 0x25, 0xaa, 0xd5, 0x90, 0xf2, 0x48, 0x44, 0x80, - 0x59, 0x8d, 0x28, 0x17, 0xb4, 0xfa, 0x27, 0x06, 0x2c, 0xaa, 0x66, 0x2d, 0xb1, 0x91, 0xc9, 0xae, - 0x13, 0x8d, 0x72, 0xeb, 0x44, 0xdc, 0x88, 0x36, 0x5d, 0x13, 0xbc, 0xcd, 0x7c, 0x7a, 0x7b, 0x15, - 0x6d, 0xc3, 0x10, 0x26, 0xe9, 0x4b, 0xa7, 0x2b, 0xf6, 0x53, 0xfc, 0x6f, 0xb3, 0x05, 0x37, 0x04, - 0xe4, 0x7d, 0xff, 0x11, 0x19, 0xed, 0xdb, 0x4e, 0x14, 0xf6, 0x95, 0xe4, 0x32, 0x6c, 0x3a, 0x5a, - 0x73, 0xa5, 0x42, 0x33, 0xc1, 0x99, 0x0a, 0xc5, 0xfc, 0x57, 0x03, 0x16, 0x15, 0xbc, 0xf5, 0x97, - 0x94, 0xb8, 0x1c, 0xeb, 0x85, 0x9d, 0x94, 0xd0, 0x27, 0x62, 0xe8, 0xf8, 0x36, 0xcc, 0x75, 0x3c, - 0x37, 0xa0, 0xb6, 0x4b, 0x0f, 0x45, 0x04, 0x2e, 0xad, 0x5f, 0xda, 0xa8, 0x58, 0xb3, 0x92, 0x6c, - 0x85, 0x7e, 0xc7, 0x11, 0x9a, 0x1c, 0x1f, 0x21, 0xf3, 0x17, 0x86, 0xd8, 0x56, 0xc5, 0x90, 0xb7, - 0xa0, 0xa2, 0x00, 0x91, 0x2b, 0xd8, 0xdb, 0x5a, 0xcc, 0x51, 0x2b, 0x2b, 0xd1, 0x06, 0xbf, 0x0b, - 0x15, 0xb1, 0xfb, 0x22, 0x76, 0x97, 0xf8, 0x22, 0x51, 0x4b, 0xa9, 0x4d, 0xc4, 0xc7, 0x9c, 0x69, - 0xcd, 0x1c, 0xc5, 0x1f, 0x2c, 0x07, 0xfc, 0x33, 0xca, 0x9a, 0xfc, 0x34, 0x77, 0x00, 0xa3, 0xed, - 0x49, 0x8c, 0xf6, 0x5e, 0x72, 0x9f, 0xb2, 0x92, 0x32, 0x11, 0x03, 0x14, 0x1b, 0x96, 0x1f, 0xc3, - 0x4a, 0x6a, 0xc3, 0x12, 0xeb, 0x7a, 0xa8, 0xdb, 0xb9, 0x14, 0x39, 0xae, 0x36, 0xa9, 0xfd, 0xd5, - 0x63, 0xb8, 0xf2, 0xdc, 0xee, 0xf7, 0x09, 0xc5, 0x1e, 0xc0, 0x2e, 0xa1, 0x62, 0x3a, 0xc0, 0xec, - 0xe2, 0xaf, 0x9a, 0x25, 0x99, 0x0f, 0xbe, 0xfa, 0x8f, 0xff, 0xfc, 0x8b, 0x89, 0x6f, 0x9b, 0x78, - 0xff, 0x8c, 0x2b, 0xb9, 0xdf, 0x23, 0x54, 0x2c, 0x11, 0xbf, 0x67, 0xbc, 0xf3, 0xf9, 0x22, 0x6a, - 0x18, 0x18, 0xc0, 0x6c, 0x6c, 0x68, 0x6b, 0xd4, 0xe8, 0x96, 0x34, 0xf6, 0x7d, 0x6e, 0xec, 0x3b, - 0xe6, 0x72, 0x56, 0xe7, 0xd1, 0xc8, 0xe9, 0x32, 0x83, 0x2b, 0x98, 0xc3, 0xc4, 0xaf, 0x0d, 0x58, - 0xd8, 0xf6, 0x89, 0x4d, 0x89, 0x12, 0x14, 0xac, 0xa6, 0x62, 0x75, 0x4c, 0x7c, 0xb9, 0xd3, 0xac, - 0xea, 0x8b, 0xde, 0xdc, 0xe4, 0x28, 0xbe, 0x6f, 0xde, 0x94, 0x86, 0x3a, 0x5c, 0xab, 0x12, 0x54, - 0x06, 0xe4, 0x16, 0xe6, 0xf3, 0x71, 0x1f, 0x30, 0x03, 0xa5, 0x36, 0x16, 0x4b, 0x41, 0x4e, 0xf1, - 0xe7, 0x06, 0x2c, 0x6e, 0xf9, 0x9e, 0xdd, 0xed, 0xd8, 0x01, 0x55, 0x1d, 0xd4, 0x3b, 0x51, 0xcd, - 0xf4, 0x2f, 0x73, 0x97, 0xbb, 0xb5, 0x69, 0xae, 0x4a, 0xd8, 0x47, 0x52, 0x5d, 0xca, 0xb3, 0xdb, - 0x38, 0x56, 0x04, 0xbf, 0x32, 0xe0, 0xda, 0xc1, 0xb0, 0x6b, 0x53, 0x22, 0x4b, 0xe9, 0x4e, 0x26, - 0x95, 0x21, 0xbf, 0x28, 0xd2, 0x1f, 0x70, 0x48, 0x0f, 0xcc, 0x25, 0x69, 0xef, 0x94, 0x37, 0x53, - 0xea, 0xeb, 0x06, 0xea, 0x79, 0xf8, 0xbb, 0x50, 0x69, 0x45, 0x25, 0xd6, 0xe8, 0xa2, 0x12, 0x3f, - 0x95, 0x5e, 0x84, 0xe0, 0x7d, 0x8e, 0xe0, 0x3d, 0x73, 0x51, 0x5a, 0x09, 0xa2, 0xa2, 0x0a, 0xeb, - 0x6d, 0x19, 0xb5, 0x2c, 0x7c, 0x0a, 0xb3, 0x89, 0x18, 0xd4, 0x8a, 0x83, 0x50, 0x94, 0xe2, 0x3f, - 0x35, 0x00, 0x9f, 0x79, 0x94, 0x88, 0xb3, 0x1d, 0x19, 0xdc, 0xb5, 0xb8, 0x99, 0xc2, 0x2d, 0x72, - 0x6c, 0x9b, 0x3b, 0xf6, 0xa1, 0x59, 0x95, 0xe8, 0x5f, 0x78, 0x94, 0x88, 0xc3, 0x22, 0x25, 0xbe, - 0xab, 0x38, 0x46, 0x00, 0xf7, 0x65, 0xa2, 0x5b, 0x84, 0x52, 0xc7, 0xed, 0xa9, 0x3e, 0x26, 0x18, - 0xa5, 0x7d, 0xfc, 0x14, 0x16, 0xc2, 0x86, 0xea, 0x5a, 0xed, 0x8d, 0xb4, 0x56, 0x85, 0x59, 0x5a, - 0x73, 0x1b, 0xae, 0x67, 0x83, 0x57, 0x2b, 0x8a, 0x5e, 0x89, 0x6e, 0x37, 0x1f, 0xf6, 0xe4, 0xf8, - 0xa4, 0x0a, 0xc7, 0x9e, 0x5f, 0xe5, 0x25, 0xe4, 0x23, 0x9e, 0x90, 0x0f, 0xcc, 0x95, 0xe4, 0xa8, - 0xc1, 0x57, 0xdc, 0x0e, 0x53, 0xc0, 0xd2, 0x51, 0xc5, 0x5c, 0x36, 0x3e, 0x95, 0xc3, 0x5b, 0x6c, - 0xb3, 0x56, 0x00, 0xa5, 0xc8, 0xbb, 0xb8, 0x27, 0x8b, 0xb8, 0xa8, 0x09, 0x16, 0xa4, 0x57, 0xea, - 0xc9, 0xa2, 0x9e, 0xb4, 0x3d, 0x59, 0xf0, 0xe2, 0x9e, 0x24, 0x0c, 0xd6, 0x8a, 0x41, 0x94, 0xf1, - 0x4b, 0xc4, 0x2a, 0x77, 0x84, 0x0a, 0xf9, 0xe7, 0xf6, 0x4b, 0xa4, 0x45, 0x3b, 0x42, 0x25, 0x78, - 0xcc, 0xaf, 0x04, 0x86, 0x5a, 0x31, 0x88, 0xf2, 0x7e, 0xe5, 0xe7, 0xeb, 0x95, 0xfc, 0xd2, 0xe7, - 0x2b, 0xc1, 0x8b, 0xfd, 0x1a, 0x93, 0xaf, 0x0b, 0xf8, 0x25, 0x67, 0x44, 0x5e, 0xc6, 0xaa, 0xca, - 0x04, 0xe3, 0xdc, 0x7e, 0x51, 0xd1, 0x9a, 0x77, 0xa4, 0x94, 0x5f, 0x09, 0x1e, 0xf3, 0x2b, 0x61, - 0xaa, 0x56, 0x0c, 0xa2, 0xc8, 0xaf, 0xbf, 0x33, 0x60, 0x69, 0xdf, 0xf6, 0xa9, 0xd3, 0x71, 0x86, - 0xc9, 0x21, 0xe4, 0x6d, 0xe5, 0x24, 0x5e, 0x27, 0x50, 0xe4, 0x67, 0x83, 0xfb, 0xb9, 0x6d, 0xae, - 0x49, 0x5f, 0x86, 0xb1, 0x96, 0xe4, 0x90, 0x72, 0x07, 0xc7, 0xcb, 0xa0, 0x0d, 0xcb, 0x5a, 0x08, - 0xb5, 0xf2, 0x20, 0xcb, 0xe4, 0xf7, 0x87, 0x3e, 0x21, 0x5f, 0x92, 0x2d, 0xbb, 0x6f, 0xbb, 0x1d, - 0xa2, 0x86, 0x36, 0xc1, 0x38, 0x77, 0x7e, 0x8f, 0x79, 0xeb, 0xa3, 0xb0, 0x75, 0x2a, 0xbf, 0x09, - 0x1e, 0xcb, 0x6f, 0xc2, 0x54, 0xad, 0x18, 0x44, 0x91, 0x5f, 0x7f, 0x68, 0xc0, 0xdc, 0x81, 0x7b, - 0x9c, 0xf0, 0xec, 0xae, 0x32, 0x99, 0x25, 0x59, 0x45, 0xbe, 0x7d, 0xc8, 0x7d, 0x7b, 0xdf, 0xbc, - 0x11, 0x8d, 0x93, 0x6e, 0xc6, 0xbb, 0x9b, 0x98, 0xc7, 0xc5, 0x03, 0x98, 0x4f, 0x19, 0xac, 0x95, - 0x01, 0x53, 0x6a, 0x8e, 0x10, 0x6d, 0x33, 0x7d, 0x33, 0xc1, 0x38, 0xff, 0x1c, 0x21, 0x5a, 0xeb, - 0xfa, 0x66, 0x82, 0xc7, 0xe7, 0x08, 0xd5, 0x54, 0xad, 0x18, 0x44, 0x99, 0xdc, 0x3d, 0x77, 0xe8, - 0x49, 0xd7, 0xb7, 0xcf, 0x34, 0xb9, 0x4b, 0xb1, 0xce, 0x9d, 0xbb, 0x33, 0xd1, 0x5e, 0x9f, 0xbb, - 0x14, 0x97, 0xe5, 0x2e, 0x65, 0xb0, 0x56, 0x06, 0x4c, 0x91, 0x8f, 0x5f, 0xc2, 0x8c, 0x58, 0xa4, - 0xf2, 0x28, 0xae, 0xa5, 0xd7, 0x59, 0xa5, 0xd2, 0xf6, 0x1d, 0xee, 0xda, 0x7d, 0xf3, 0x7a, 0x6a, - 0x21, 0x2e, 0x93, 0xb6, 0x84, 0x3a, 0x0e, 0x3e, 0x81, 0x8a, 0x62, 0xa4, 0x56, 0x64, 0xbc, 0xc8, - 0x15, 0x0b, 0x66, 0xe5, 0x95, 0x65, 0x38, 0xb9, 0xe0, 0x7a, 0xf6, 0x32, 0xf3, 0x9c, 0xd3, 0x4e, - 0x1b, 0xe6, 0x64, 0xcb, 0xcd, 0xe1, 0xd0, 0xf7, 0x5e, 0x24, 0x2a, 0x20, 0xc5, 0xba, 0x08, 0xd2, - 0x1d, 0xd2, 0x27, 0x7a, 0xa4, 0x21, 0xa7, 0xb4, 0xce, 0x4f, 0x00, 0xb6, 0x4e, 0x47, 0xad, 0xf0, - 0xb0, 0x51, 0x5d, 0xf4, 0xc5, 0xd4, 0xf3, 0x78, 0x1d, 0xb7, 0xe2, 0x17, 0x6a, 0xaa, 0xd7, 0x29, - 0x56, 0x69, 0xad, 0x8f, 0x61, 0xa6, 0x45, 0xfa, 0x7d, 0x09, 0x71, 0x4d, 0xdd, 0x8e, 0x45, 0xe4, - 0xf3, 0xc4, 0x50, 0x5e, 0x2f, 0x67, 0xb3, 0x9d, 0xe4, 0x5c, 0x44, 0x67, 0xc3, 0xfd, 0x09, 0xe9, - 0x50, 0x9d, 0xce, 0x90, 0x53, 0x5a, 0xe7, 0x33, 0x98, 0x97, 0x2d, 0x65, 0x1f, 0x45, 0x33, 0xab, - 0x55, 0xf2, 0x4a, 0xeb, 0xfd, 0x31, 0x5c, 0x97, 0x6d, 0xd5, 0xbd, 0xfe, 0x37, 0xb2, 0xaa, 0x15, - 0x76, 0x69, 0xed, 0x3f, 0x81, 0xe9, 0xc7, 0x4e, 0x40, 0x9b, 0x5e, 0x97, 0x04, 0xb8, 0xac, 0xe8, - 0x54, 0x2e, 0x64, 0xab, 0x98, 0xbc, 0x1f, 0x66, 0x0d, 0xcc, 0xf7, 0xf8, 0x50, 0xf0, 0x4d, 0x73, - 0x41, 0x76, 0xf8, 0xbe, 0x13, 0x50, 0x7e, 0x6f, 0xcc, 0x06, 0x82, 0xeb, 0x98, 0xa5, 0xe3, 0x9f, - 0x1b, 0xb0, 0xbc, 0x4b, 0x68, 0xbc, 0x68, 0xd8, 0x1a, 0x8d, 0x39, 0x80, 0x5a, 0xd1, 0x6d, 0x67, - 0xb8, 0xe9, 0x47, 0xdc, 0x74, 0xdd, 0xbc, 0xad, 0x9e, 0xfe, 0x44, 0x8b, 0x98, 0xa3, 0x91, 0xb2, - 0x22, 0x5f, 0xc7, 0x02, 0x21, 0xfc, 0x12, 0xae, 0xc5, 0xe7, 0x53, 0x4d, 0xa2, 0x85, 0x72, 0x6b, - 0xcc, 0xb5, 0x5a, 0x76, 0x2a, 0x8b, 0xcf, 0xa2, 0xdc, 0xcc, 0x54, 0x96, 0xe0, 0x61, 0x03, 0x30, - 0xb6, 0x2d, 0xef, 0x64, 0x74, 0x00, 0xd6, 0x8b, 0x6e, 0x70, 0x58, 0x6c, 0xaf, 0xa7, 0x62, 0xdb, - 0xb4, 0x07, 0x44, 0x4d, 0xa9, 0x7a, 0x61, 0x5e, 0x1d, 0xbb, 0x59, 0x34, 0xeb, 0xdc, 0xa7, 0x8f, - 0xcc, 0x5b, 0x39, 0xc1, 0x73, 0xed, 0x01, 0x9f, 0xc6, 0xd6, 0x70, 0x9c, 0x04, 0x3e, 0x82, 0x1b, - 0x09, 0x4c, 0x2c, 0x7b, 0x05, 0xb8, 0x72, 0xb3, 0x8e, 0x0d, 0x58, 0x48, 0x39, 0xd8, 0xe8, 0x5e, - 0xcc, 0x3d, 0x1c, 0xc0, 0xcc, 0x2e, 0xa1, 0x4d, 0xef, 0x8c, 0x1f, 0xc2, 0xe6, 0x96, 0x7d, 0xfa, - 0x55, 0x49, 0x76, 0xfa, 0xeb, 0x11, 0xea, 0x7a, 0x67, 0xfc, 0xe8, 0x36, 0x35, 0xfd, 0x29, 0x1c, - 0x7c, 0x08, 0x15, 0xc5, 0x5c, 0x2d, 0xd7, 0x5e, 0xee, 0xe9, 0x30, 0x52, 0x5e, 0xa4, 0x9c, 0xb8, - 0x35, 0x6a, 0x9e, 0x0e, 0xf0, 0x86, 0xd2, 0x23, 0xd5, 0xa7, 0x12, 0x59, 0xcc, 0xba, 0xf2, 0xe4, - 0xb0, 0x8e, 0x46, 0xee, 0xe9, 0x20, 0x5b, 0x9e, 0x31, 0x0f, 0xb7, 0xf9, 0xd1, 0x6d, 0x6c, 0xb5, - 0x96, 0x6f, 0x36, 0x1f, 0xfa, 0x53, 0x58, 0xdb, 0x25, 0x34, 0x31, 0x34, 0xf1, 0x83, 0xe0, 0x2d, - 0xf9, 0x14, 0x2a, 0x57, 0x67, 0x1e, 0x03, 0x87, 0x3c, 0x9e, 0x02, 0xd7, 0x98, 0x22, 0xc8, 0xc4, - 0x22, 0x73, 0xc2, 0x17, 0xfb, 0x9b, 0x39, 0xe1, 0x53, 0x59, 0xf8, 0x07, 0x61, 0xef, 0x12, 0x26, - 0xf9, 0x61, 0x54, 0x93, 0xbc, 0xa4, 0xb8, 0x98, 0xb2, 0x10, 0xde, 0xfd, 0x5d, 0xcf, 0x50, 0x03, - 0x7d, 0x97, 0x12, 0x06, 0xf8, 0x65, 0x9b, 0x4b, 0x5e, 0xd2, 0x6c, 0x97, 0x4a, 0x4b, 0xe0, 0x27, - 0xb0, 0xa8, 0x01, 0x52, 0xcb, 0x41, 0xb2, 0xaa, 0x41, 0x92, 0x58, 0xf6, 0xaa, 0x5e, 0xd9, 0x94, - 0x04, 0x74, 0x6c, 0x46, 0xce, 0xed, 0x18, 0x57, 0x29, 0xca, 0x4c, 0xef, 0x98, 0x94, 0xc0, 0x27, - 0x09, 0xc7, 0x24, 0x96, 0x31, 0x25, 0x37, 0xde, 0xb7, 0x9f, 0x1b, 0x7c, 0x6c, 0x55, 0xea, 0x6e, - 0x6c, 0xa9, 0x94, 0x3d, 0x39, 0xed, 0x11, 0xf5, 0xf8, 0x5b, 0x96, 0x8d, 0x72, 0x72, 0x9a, 0x15, - 0xc0, 0x3d, 0x98, 0xdd, 0x21, 0xc3, 0xbe, 0x37, 0x8a, 0xc6, 0x1f, 0x65, 0x45, 0x14, 0x2e, 0x5c, - 0x5a, 0x03, 0xdb, 0x2f, 0xbf, 0xd2, 0xf8, 0x01, 0x1f, 0xbe, 0x22, 0x6d, 0x79, 0x3e, 0x29, 0x91, - 0x4b, 0xe8, 0xc7, 0xa7, 0x30, 0xd7, 0xf6, 0x9d, 0x5e, 0x2f, 0xbe, 0x72, 0xc0, 0x84, 0x49, 0xce, - 0x3a, 0x1f, 0xa4, 0x11, 0x5c, 0x63, 0xf1, 0x7f, 0x2e, 0x5f, 0x20, 0xe6, 0x8e, 0x71, 0x4b, 0x99, - 0xf3, 0x21, 0x5e, 0x44, 0x99, 0x51, 0x8a, 0xad, 0x1a, 0xa2, 0xf7, 0x8c, 0xa9, 0x51, 0x2a, 0xc1, - 0xc3, 0xbf, 0x37, 0x78, 0xe5, 0x64, 0xde, 0xc0, 0xa9, 0x8b, 0xaf, 0xbc, 0x87, 0x7b, 0xd5, 0x3b, - 0x63, 0x64, 0x38, 0xb0, 0xcc, 0x4d, 0x49, 0x8f, 0xd0, 0xe8, 0x6d, 0x9d, 0x2f, 0x24, 0x53, 0x37, - 0x25, 0x3a, 0x11, 0xfc, 0x77, 0x03, 0xd6, 0x75, 0x30, 0xe5, 0xf5, 0x84, 0xdb, 0x25, 0x2f, 0x73, - 0x53, 0xf9, 0xf6, 0x18, 0x98, 0xaa, 0x02, 0xf3, 0x90, 0xc3, 0xfd, 0xcc, 0xdc, 0x18, 0x87, 0x45, - 0xde, 0x5c, 0xb0, 0x16, 0x0c, 0xfa, 0x3b, 0x58, 0x5a, 0x9c, 0x2d, 0x97, 0x58, 0x5c, 0xe4, 0xde, - 0x25, 0x3f, 0xd1, 0xcb, 0xd9, 0x8d, 0x4e, 0x7e, 0xa6, 0xa3, 0x77, 0xa7, 0x9a, 0x4c, 0x47, 0x3c, - 0xfc, 0x5b, 0x03, 0x56, 0x76, 0x49, 0xfc, 0x88, 0x2d, 0xf1, 0xc4, 0xb5, 0xaa, 0x1e, 0x50, 0x25, - 0x5f, 0x3d, 0xe4, 0x62, 0xd9, 0xe3, 0x58, 0x1a, 0xe6, 0xba, 0xe2, 0xfe, 0x50, 0x36, 0x96, 0x76, - 0x19, 0x06, 0x06, 0xcb, 0xc4, 0x42, 0x31, 0xfc, 0x1d, 0x98, 0x63, 0x00, 0x05, 0x69, 0xec, 0x88, - 0xa3, 0x79, 0x7f, 0x9b, 0x3d, 0x39, 0x60, 0x86, 0x04, 0x53, 0x8e, 0x35, 0xca, 0xc9, 0x41, 0x8a, - 0x2b, 0x73, 0x23, 0xb7, 0x03, 0xa5, 0x72, 0xa3, 0x3e, 0xf2, 0xd5, 0xe7, 0x26, 0x7a, 0xd1, 0xab, - 0xc9, 0x4d, 0xc4, 0xcb, 0xe4, 0x26, 0xf1, 0x78, 0xb8, 0x64, 0x6e, 0x12, 0x58, 0xc6, 0xe6, 0x46, - 0xda, 0x2d, 0xc8, 0x8d, 0x2a, 0x26, 0x72, 0x23, 0x6d, 0x94, 0xcd, 0x8d, 0x94, 0xd7, 0xe6, 0x46, - 0xea, 0xd7, 0xe7, 0x46, 0xe5, 0xe2, 0x1f, 0x87, 0xf3, 0xd1, 0xf6, 0x89, 0xed, 0xb8, 0xfb, 0xb6, - 0x6f, 0x0f, 0x08, 0x25, 0x7e, 0x7e, 0x86, 0x6e, 0x2a, 0x33, 0x44, 0xb2, 0x89, 0x76, 0x4e, 0xea, - 0x30, 0x99, 0x61, 0x24, 0x93, 0x9d, 0x93, 0x52, 0x02, 0x6c, 0x7a, 0x5c, 0xc8, 0x2c, 0xcd, 0xcb, - 0x2c, 0x4c, 0x53, 0x5b, 0xb1, 0xcc, 0xfd, 0x78, 0x62, 0x1b, 0x20, 0xd3, 0xa3, 0xdc, 0x8f, 0x67, - 0xf8, 0xf8, 0x0f, 0x06, 0x54, 0xd5, 0xca, 0x49, 0x61, 0x1a, 0x57, 0x3b, 0xf9, 0xb8, 0x5a, 0x1c, - 0xd7, 0x13, 0xd3, 0xd4, 0x95, 0x45, 0x16, 0xe0, 0x9b, 0x58, 0x42, 0x10, 0x7f, 0x66, 0x88, 0x47, - 0x67, 0xea, 0x3e, 0x3c, 0x2f, 0x66, 0x79, 0xeb, 0x96, 0xec, 0xe5, 0x1f, 0x65, 0x2a, 0x53, 0xf7, - 0xee, 0xca, 0xe5, 0x5f, 0x9a, 0x8d, 0x7f, 0x19, 0x6e, 0xa3, 0xd9, 0xba, 0xef, 0x89, 0xed, 0xb8, - 0x94, 0xb8, 0xb6, 0xdb, 0x21, 0x6d, 0x27, 0xb9, 0xab, 0x2a, 0x07, 0x46, 0xb7, 0x95, 0x66, 0xeb, - 0xcc, 0x41, 0xac, 0x98, 0x3a, 0xe1, 0x5e, 0x2f, 0xb9, 0x95, 0xd6, 0x08, 0xe1, 0x1f, 0x65, 0xd6, - 0x5c, 0x2d, 0xa7, 0xe7, 0xe2, 0x4d, 0xed, 0xda, 0x81, 0xb1, 0x2e, 0xb8, 0xec, 0x0a, 0x9c, 0x9e, - 0x3b, 0x76, 0xd9, 0xc5, 0x04, 0x70, 0x9f, 0x2f, 0x6e, 0x53, 0x16, 0x6b, 0xe3, 0xd0, 0x14, 0x1f, - 0xa1, 0xca, 0x9b, 0x44, 0xf9, 0xa8, 0x2c, 0x67, 0xfc, 0xc8, 0xa1, 0xe7, 0xde, 0x20, 0x86, 0xea, - 0xf4, 0x37, 0x88, 0xc2, 0xd4, 0xef, 0x1b, 0x50, 0x51, 0xdf, 0xa9, 0xa9, 0x6b, 0x48, 0xcd, 0x1b, - 0x3d, 0xd5, 0x17, 0xdd, 0xf3, 0xb6, 0xec, 0x56, 0x88, 0xd8, 0xc1, 0x48, 0x5e, 0x82, 0xa5, 0xb6, - 0x42, 0x2a, 0x0b, 0xff, 0xc9, 0x80, 0x25, 0xed, 0x3b, 0x3d, 0x7c, 0x4b, 0x6f, 0x32, 0xfd, 0x90, - 0xaf, 0x10, 0x5a, 0xe6, 0x3e, 0x4b, 0xb5, 0x7f, 0x34, 0x12, 0xef, 0xda, 0x52, 0xf7, 0x59, 0x5a, - 0x19, 0x56, 0x91, 0x73, 0xbb, 0xc4, 0x25, 0xbe, 0x3e, 0x69, 0x89, 0x3e, 0x72, 0x37, 0xf3, 0xa3, - 0x86, 0xf4, 0x0b, 0x3c, 0xdd, 0x1c, 0x10, 0xea, 0x56, 0x32, 0x98, 0x98, 0x03, 0x12, 0x5c, 0xfc, - 0xeb, 0xb0, 0xe3, 0x2a, 0xb5, 0xd5, 0x70, 0x8f, 0xbd, 0xb1, 0x33, 0x91, 0xbe, 0x5a, 0x59, 0x33, - 0x6d, 0xd7, 0x55, 0xfa, 0x80, 0xe3, 0x1e, 0x7b, 0x72, 0x5e, 0x4a, 0x76, 0x5d, 0x8d, 0x50, 0xed, - 0xbf, 0xe7, 0x60, 0x36, 0x7c, 0x19, 0xd6, 0xf2, 0xfa, 0x4e, 0xd7, 0xa1, 0x23, 0x3c, 0xbb, 0xc0, - 0x0b, 0xb1, 0x74, 0xc7, 0x0d, 0x84, 0xb2, 0xd4, 0x4b, 0xb1, 0xb8, 0xe3, 0x6a, 0x04, 0xf0, 0xf7, - 0x8c, 0x0b, 0x3e, 0x19, 0x4b, 0x47, 0x44, 0xa3, 0x3c, 0x1b, 0x91, 0x1c, 0x21, 0xfc, 0xda, 0x78, - 0xc5, 0x2d, 0x4d, 0xba, 0x8c, 0x23, 0x43, 0x99, 0xad, 0x4d, 0x5c, 0xc6, 0x7a, 0x19, 0x56, 0x38, - 0xaf, 0x65, 0xb6, 0x7e, 0xca, 0x21, 0x3d, 0x32, 0xef, 0xea, 0x7c, 0xcf, 0x4c, 0x8a, 0x6f, 0x60, - 0xb1, 0x1c, 0xfe, 0xdb, 0x2f, 0x63, 0xf6, 0xee, 0x70, 0x9c, 0xbf, 0x6d, 0xbe, 0xa3, 0xb1, 0x3f, - 0x66, 0x16, 0xff, 0x16, 0x9e, 0xa3, 0x01, 0xfe, 0xf4, 0x82, 0x87, 0x80, 0xe9, 0xf3, 0x0e, 0xd5, - 0x96, 0x7a, 0x18, 0x18, 0x9f, 0x77, 0xe8, 0x24, 0x5e, 0xc3, 0xa1, 0xe0, 0xcf, 0x8c, 0x8b, 0x9f, - 0x0a, 0xe6, 0x16, 0x67, 0xe6, 0x74, 0x50, 0x53, 0x9c, 0xbf, 0x1e, 0xa7, 0x84, 0x3f, 0xfa, 0x25, - 0x1e, 0x0b, 0x60, 0xe7, 0x57, 0xb0, 0x99, 0xc7, 0x0f, 0x5f, 0x69, 0xc7, 0x82, 0x1f, 0xbd, 0xe2, - 0x76, 0x90, 0x0d, 0x3b, 0xaf, 0xe1, 0x0c, 0x2d, 0xbd, 0x14, 0x57, 0xcb, 0x48, 0x73, 0x96, 0x16, - 0x2f, 0xc5, 0xc7, 0x08, 0xe2, 0x2f, 0x5e, 0xeb, 0x54, 0xfa, 0x23, 0x0e, 0xf1, 0xc0, 0x7c, 0x6b, - 0xbc, 0x65, 0x75, 0x4a, 0xdd, 0xc0, 0x92, 0xc2, 0xf8, 0x37, 0xaf, 0x77, 0x0d, 0xf2, 0x84, 0x63, - 0xdd, 0x35, 0xef, 0x64, 0xcd, 0x67, 0xd6, 0x22, 0x77, 0xb1, 0x48, 0xaa, 0xf6, 0x8f, 0x93, 0x30, - 0x17, 0x4e, 0xfc, 0xbc, 0x33, 0x06, 0xac, 0x33, 0xfe, 0x8b, 0xc1, 0xef, 0x6d, 0x94, 0x28, 0x05, - 0x3f, 0xf4, 0xbd, 0x41, 0xfb, 0xc4, 0x09, 0xd4, 0x01, 0x3d, 0xfd, 0x9b, 0xc2, 0x9c, 0x08, 0xf3, - 0x11, 0x3d, 0x7d, 0x2e, 0x45, 0xa4, 0xb1, 0xf4, 0xca, 0xfd, 0xd8, 0xf7, 0x06, 0xf4, 0xc4, 0x09, - 0x92, 0xe7, 0x52, 0x85, 0xe2, 0xf8, 0x39, 0x3f, 0x7e, 0xd0, 0x41, 0xae, 0x8d, 0xc5, 0x6c, 0xe6, - 0x62, 0x8e, 0x07, 0xa7, 0x7f, 0x36, 0x60, 0x29, 0xa5, 0xbc, 0xed, 0xbd, 0x4a, 0x34, 0xd2, 0xf5, - 0x96, 0xeb, 0x1e, 0xf5, 0x64, 0x2c, 0xe2, 0x7a, 0x2b, 0x10, 0xc6, 0x4f, 0xd3, 0x3d, 0x43, 0x80, - 0x7d, 0xe5, 0x38, 0xd4, 0xfe, 0x6c, 0x02, 0xa6, 0x76, 0x6c, 0x6a, 0x1f, 0xd9, 0x01, 0xc1, 0x3a, - 0x2c, 0xf4, 0xc4, 0xb0, 0x1f, 0xff, 0xe6, 0xbd, 0xec, 0x24, 0x16, 0xb7, 0x78, 0x14, 0x8e, 0xd2, - 0x23, 0xd7, 0x1e, 0x38, 0x9d, 0x7d, 0xdf, 0x1b, 0x12, 0x9f, 0x3a, 0x63, 0xc6, 0x2a, 0xf5, 0x57, - 0xcf, 0x99, 0x46, 0xbf, 0x79, 0xb1, 0x29, 0x1d, 0x3f, 0xb8, 0xf0, 0x44, 0x5a, 0x9b, 0xe6, 0x3f, - 0x00, 0x3c, 0xf3, 0xfc, 0x2f, 0xb6, 0x66, 0x3f, 0xaf, 0x44, 0x4c, 0x7b, 0xe8, 0x1c, 0x5d, 0xe1, - 0x5f, 0x0f, 0xfe, 0x37, 0x00, 0x00, 0xff, 0xff, 0x90, 0x14, 0x99, 0x5f, 0x1e, 0x42, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// WalletClient is the client API for Wallet service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type WalletClient interface { - GetAccount(ctx context.Context, in *core.Account, opts ...grpc.CallOption) (*core.Account, error) - GetAccountById(ctx context.Context, in *core.Account, opts ...grpc.CallOption) (*core.Account, error) - //Please use CreateTransaction2 instead of this function. - CreateTransaction(ctx context.Context, in *core.TransferContract, opts ...grpc.CallOption) (*core.Transaction, error) - //Use this function instead of CreateTransaction. - CreateTransaction2(ctx context.Context, in *core.TransferContract, opts ...grpc.CallOption) (*TransactionExtention, error) - BroadcastTransaction(ctx context.Context, in *core.Transaction, opts ...grpc.CallOption) (*Return, error) - //Please use UpdateAccount2 instead of this function. - UpdateAccount(ctx context.Context, in *core.AccountUpdateContract, opts ...grpc.CallOption) (*core.Transaction, error) - SetAccountId(ctx context.Context, in *core.SetAccountIdContract, opts ...grpc.CallOption) (*core.Transaction, error) - //Use this function instead of UpdateAccount. - UpdateAccount2(ctx context.Context, in *core.AccountUpdateContract, opts ...grpc.CallOption) (*TransactionExtention, error) - //Please use VoteWitnessAccount2 instead of this function. - VoteWitnessAccount(ctx context.Context, in *core.VoteWitnessContract, opts ...grpc.CallOption) (*core.Transaction, error) - //modify the consume_user_resource_percent - UpdateSetting(ctx context.Context, in *core.UpdateSettingContract, opts ...grpc.CallOption) (*TransactionExtention, error) - //modify the energy_limit - UpdateEnergyLimit(ctx context.Context, in *core.UpdateEnergyLimitContract, opts ...grpc.CallOption) (*TransactionExtention, error) - //Use this function instead of VoteWitnessAccount. - VoteWitnessAccount2(ctx context.Context, in *core.VoteWitnessContract, opts ...grpc.CallOption) (*TransactionExtention, error) - //Please use CreateAssetIssue2 instead of this function. - CreateAssetIssue(ctx context.Context, in *core.AssetIssueContract, opts ...grpc.CallOption) (*core.Transaction, error) - //Use this function instead of CreateAssetIssue. - CreateAssetIssue2(ctx context.Context, in *core.AssetIssueContract, opts ...grpc.CallOption) (*TransactionExtention, error) - //Please use UpdateWitness2 instead of this function. - UpdateWitness(ctx context.Context, in *core.WitnessUpdateContract, opts ...grpc.CallOption) (*core.Transaction, error) - //Use this function instead of UpdateWitness. - UpdateWitness2(ctx context.Context, in *core.WitnessUpdateContract, opts ...grpc.CallOption) (*TransactionExtention, error) - //Please use CreateAccount2 instead of this function. - CreateAccount(ctx context.Context, in *core.AccountCreateContract, opts ...grpc.CallOption) (*core.Transaction, error) - //Use this function instead of CreateAccount. - CreateAccount2(ctx context.Context, in *core.AccountCreateContract, opts ...grpc.CallOption) (*TransactionExtention, error) - //Please use CreateWitness2 instead of this function. - CreateWitness(ctx context.Context, in *core.WitnessCreateContract, opts ...grpc.CallOption) (*core.Transaction, error) - //Use this function instead of CreateWitness. - CreateWitness2(ctx context.Context, in *core.WitnessCreateContract, opts ...grpc.CallOption) (*TransactionExtention, error) - //Please use TransferAsset2 instead of this function. - TransferAsset(ctx context.Context, in *core.TransferAssetContract, opts ...grpc.CallOption) (*core.Transaction, error) - //Use this function instead of TransferAsset. - TransferAsset2(ctx context.Context, in *core.TransferAssetContract, opts ...grpc.CallOption) (*TransactionExtention, error) - //Please use ParticipateAssetIssue2 instead of this function. - ParticipateAssetIssue(ctx context.Context, in *core.ParticipateAssetIssueContract, opts ...grpc.CallOption) (*core.Transaction, error) - //Use this function instead of ParticipateAssetIssue. - ParticipateAssetIssue2(ctx context.Context, in *core.ParticipateAssetIssueContract, opts ...grpc.CallOption) (*TransactionExtention, error) - //Please use FreezeBalance2 instead of this function. - FreezeBalance(ctx context.Context, in *core.FreezeBalanceContract, opts ...grpc.CallOption) (*core.Transaction, error) - //Use this function instead of FreezeBalance. - FreezeBalance2(ctx context.Context, in *core.FreezeBalanceContract, opts ...grpc.CallOption) (*TransactionExtention, error) - //Please use UnfreezeBalance2 instead of this function. - UnfreezeBalance(ctx context.Context, in *core.UnfreezeBalanceContract, opts ...grpc.CallOption) (*core.Transaction, error) - //Use this function instead of UnfreezeBalance. - UnfreezeBalance2(ctx context.Context, in *core.UnfreezeBalanceContract, opts ...grpc.CallOption) (*TransactionExtention, error) - //Please use UnfreezeAsset2 instead of this function. - UnfreezeAsset(ctx context.Context, in *core.UnfreezeAssetContract, opts ...grpc.CallOption) (*core.Transaction, error) - //Use this function instead of UnfreezeAsset. - UnfreezeAsset2(ctx context.Context, in *core.UnfreezeAssetContract, opts ...grpc.CallOption) (*TransactionExtention, error) - //Please use WithdrawBalance2 instead of this function. - WithdrawBalance(ctx context.Context, in *core.WithdrawBalanceContract, opts ...grpc.CallOption) (*core.Transaction, error) - //Use this function instead of WithdrawBalance. - WithdrawBalance2(ctx context.Context, in *core.WithdrawBalanceContract, opts ...grpc.CallOption) (*TransactionExtention, error) - //Please use UpdateAsset2 instead of this function. - UpdateAsset(ctx context.Context, in *core.UpdateAssetContract, opts ...grpc.CallOption) (*core.Transaction, error) - //Use this function instead of UpdateAsset. - UpdateAsset2(ctx context.Context, in *core.UpdateAssetContract, opts ...grpc.CallOption) (*TransactionExtention, error) - ProposalCreate(ctx context.Context, in *core.ProposalCreateContract, opts ...grpc.CallOption) (*TransactionExtention, error) - ProposalApprove(ctx context.Context, in *core.ProposalApproveContract, opts ...grpc.CallOption) (*TransactionExtention, error) - ProposalDelete(ctx context.Context, in *core.ProposalDeleteContract, opts ...grpc.CallOption) (*TransactionExtention, error) - BuyStorage(ctx context.Context, in *core.BuyStorageContract, opts ...grpc.CallOption) (*TransactionExtention, error) - BuyStorageBytes(ctx context.Context, in *core.BuyStorageBytesContract, opts ...grpc.CallOption) (*TransactionExtention, error) - SellStorage(ctx context.Context, in *core.SellStorageContract, opts ...grpc.CallOption) (*TransactionExtention, error) - ExchangeCreate(ctx context.Context, in *core.ExchangeCreateContract, opts ...grpc.CallOption) (*TransactionExtention, error) - ExchangeInject(ctx context.Context, in *core.ExchangeInjectContract, opts ...grpc.CallOption) (*TransactionExtention, error) - ExchangeWithdraw(ctx context.Context, in *core.ExchangeWithdrawContract, opts ...grpc.CallOption) (*TransactionExtention, error) - ExchangeTransaction(ctx context.Context, in *core.ExchangeTransactionContract, opts ...grpc.CallOption) (*TransactionExtention, error) - ListNodes(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*NodeList, error) - GetAssetIssueByAccount(ctx context.Context, in *core.Account, opts ...grpc.CallOption) (*AssetIssueList, error) - GetAccountNet(ctx context.Context, in *core.Account, opts ...grpc.CallOption) (*AccountNetMessage, error) - GetAccountResource(ctx context.Context, in *core.Account, opts ...grpc.CallOption) (*AccountResourceMessage, error) - GetAssetIssueByName(ctx context.Context, in *BytesMessage, opts ...grpc.CallOption) (*core.AssetIssueContract, error) - GetAssetIssueListByName(ctx context.Context, in *BytesMessage, opts ...grpc.CallOption) (*AssetIssueList, error) - GetAssetIssueById(ctx context.Context, in *BytesMessage, opts ...grpc.CallOption) (*core.AssetIssueContract, error) - //Please use GetNowBlock2 instead of this function. - GetNowBlock(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*core.Block, error) - //Use this function instead of GetNowBlock. - GetNowBlock2(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*BlockExtention, error) - //Please use GetBlockByNum2 instead of this function. - GetBlockByNum(ctx context.Context, in *NumberMessage, opts ...grpc.CallOption) (*core.Block, error) - //Use this function instead of GetBlockByNum. - GetBlockByNum2(ctx context.Context, in *NumberMessage, opts ...grpc.CallOption) (*BlockExtention, error) - GetTransactionCountByBlockNum(ctx context.Context, in *NumberMessage, opts ...grpc.CallOption) (*NumberMessage, error) - GetBlockById(ctx context.Context, in *BytesMessage, opts ...grpc.CallOption) (*core.Block, error) - //Please use GetBlockByLimitNext2 instead of this function. - GetBlockByLimitNext(ctx context.Context, in *BlockLimit, opts ...grpc.CallOption) (*BlockList, error) - //Use this function instead of GetBlockByLimitNext. - GetBlockByLimitNext2(ctx context.Context, in *BlockLimit, opts ...grpc.CallOption) (*BlockListExtention, error) - //Please use GetBlockByLatestNum2 instead of this function. - GetBlockByLatestNum(ctx context.Context, in *NumberMessage, opts ...grpc.CallOption) (*BlockList, error) - //Use this function instead of GetBlockByLatestNum. - GetBlockByLatestNum2(ctx context.Context, in *NumberMessage, opts ...grpc.CallOption) (*BlockListExtention, error) - GetTransactionById(ctx context.Context, in *BytesMessage, opts ...grpc.CallOption) (*core.Transaction, error) - DeployContract(ctx context.Context, in *core.CreateSmartContract, opts ...grpc.CallOption) (*TransactionExtention, error) - GetContract(ctx context.Context, in *BytesMessage, opts ...grpc.CallOption) (*core.SmartContract, error) - TriggerContract(ctx context.Context, in *core.TriggerSmartContract, opts ...grpc.CallOption) (*TransactionExtention, error) - ListWitnesses(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*WitnessList, error) - GetDelegatedResource(ctx context.Context, in *DelegatedResourceMessage, opts ...grpc.CallOption) (*DelegatedResourceList, error) - GetDelegatedResourceAccountIndex(ctx context.Context, in *BytesMessage, opts ...grpc.CallOption) (*core.DelegatedResourceAccountIndex, error) - ListProposals(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*ProposalList, error) - GetPaginatedProposalList(ctx context.Context, in *PaginatedMessage, opts ...grpc.CallOption) (*ProposalList, error) - GetProposalById(ctx context.Context, in *BytesMessage, opts ...grpc.CallOption) (*core.Proposal, error) - ListExchanges(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*ExchangeList, error) - GetPaginatedExchangeList(ctx context.Context, in *PaginatedMessage, opts ...grpc.CallOption) (*ExchangeList, error) - GetExchangeById(ctx context.Context, in *BytesMessage, opts ...grpc.CallOption) (*core.Exchange, error) - GetChainParameters(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*core.ChainParameters, error) - GetAssetIssueList(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*AssetIssueList, error) - GetPaginatedAssetIssueList(ctx context.Context, in *PaginatedMessage, opts ...grpc.CallOption) (*AssetIssueList, error) - TotalTransaction(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*NumberMessage, error) - GetNextMaintenanceTime(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*NumberMessage, error) - //Warning: do not invoke this interface provided by others. - //Please use GetTransactionSign2 instead of this function. - GetTransactionSign(ctx context.Context, in *core.TransactionSign, opts ...grpc.CallOption) (*core.Transaction, error) - //Warning: do not invoke this interface provided by others. - //Use this function instead of GetTransactionSign. - GetTransactionSign2(ctx context.Context, in *core.TransactionSign, opts ...grpc.CallOption) (*TransactionExtention, error) - //Warning: do not invoke this interface provided by others. - CreateAddress(ctx context.Context, in *BytesMessage, opts ...grpc.CallOption) (*BytesMessage, error) - //Warning: do not invoke this interface provided by others. - EasyTransfer(ctx context.Context, in *EasyTransferMessage, opts ...grpc.CallOption) (*EasyTransferResponse, error) - //Warning: do not invoke this interface provided by others. - EasyTransferByPrivate(ctx context.Context, in *EasyTransferByPrivateMessage, opts ...grpc.CallOption) (*EasyTransferResponse, error) - //Warning: do not invoke this interface provided by others. - GenerateAddress(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*AddressPrKeyPairMessage, error) - GetTransactionInfoById(ctx context.Context, in *BytesMessage, opts ...grpc.CallOption) (*core.TransactionInfo, error) -} - -type walletClient struct { - cc *grpc.ClientConn -} - -func NewWalletClient(cc *grpc.ClientConn) WalletClient { - return &walletClient{cc} -} - -func (c *walletClient) GetAccount(ctx context.Context, in *core.Account, opts ...grpc.CallOption) (*core.Account, error) { - out := new(core.Account) - err := c.cc.Invoke(ctx, "/protocol.Wallet/GetAccount", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetAccountById(ctx context.Context, in *core.Account, opts ...grpc.CallOption) (*core.Account, error) { - out := new(core.Account) - err := c.cc.Invoke(ctx, "/protocol.Wallet/GetAccountById", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) CreateTransaction(ctx context.Context, in *core.TransferContract, opts ...grpc.CallOption) (*core.Transaction, error) { - out := new(core.Transaction) - err := c.cc.Invoke(ctx, "/protocol.Wallet/CreateTransaction", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) CreateTransaction2(ctx context.Context, in *core.TransferContract, opts ...grpc.CallOption) (*TransactionExtention, error) { - out := new(TransactionExtention) - err := c.cc.Invoke(ctx, "/protocol.Wallet/CreateTransaction2", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) BroadcastTransaction(ctx context.Context, in *core.Transaction, opts ...grpc.CallOption) (*Return, error) { - out := new(Return) - err := c.cc.Invoke(ctx, "/protocol.Wallet/BroadcastTransaction", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) UpdateAccount(ctx context.Context, in *core.AccountUpdateContract, opts ...grpc.CallOption) (*core.Transaction, error) { - out := new(core.Transaction) - err := c.cc.Invoke(ctx, "/protocol.Wallet/UpdateAccount", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) SetAccountId(ctx context.Context, in *core.SetAccountIdContract, opts ...grpc.CallOption) (*core.Transaction, error) { - out := new(core.Transaction) - err := c.cc.Invoke(ctx, "/protocol.Wallet/SetAccountId", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) UpdateAccount2(ctx context.Context, in *core.AccountUpdateContract, opts ...grpc.CallOption) (*TransactionExtention, error) { - out := new(TransactionExtention) - err := c.cc.Invoke(ctx, "/protocol.Wallet/UpdateAccount2", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) VoteWitnessAccount(ctx context.Context, in *core.VoteWitnessContract, opts ...grpc.CallOption) (*core.Transaction, error) { - out := new(core.Transaction) - err := c.cc.Invoke(ctx, "/protocol.Wallet/VoteWitnessAccount", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) UpdateSetting(ctx context.Context, in *core.UpdateSettingContract, opts ...grpc.CallOption) (*TransactionExtention, error) { - out := new(TransactionExtention) - err := c.cc.Invoke(ctx, "/protocol.Wallet/UpdateSetting", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) UpdateEnergyLimit(ctx context.Context, in *core.UpdateEnergyLimitContract, opts ...grpc.CallOption) (*TransactionExtention, error) { - out := new(TransactionExtention) - err := c.cc.Invoke(ctx, "/protocol.Wallet/UpdateEnergyLimit", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) VoteWitnessAccount2(ctx context.Context, in *core.VoteWitnessContract, opts ...grpc.CallOption) (*TransactionExtention, error) { - out := new(TransactionExtention) - err := c.cc.Invoke(ctx, "/protocol.Wallet/VoteWitnessAccount2", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) CreateAssetIssue(ctx context.Context, in *core.AssetIssueContract, opts ...grpc.CallOption) (*core.Transaction, error) { - out := new(core.Transaction) - err := c.cc.Invoke(ctx, "/protocol.Wallet/CreateAssetIssue", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) CreateAssetIssue2(ctx context.Context, in *core.AssetIssueContract, opts ...grpc.CallOption) (*TransactionExtention, error) { - out := new(TransactionExtention) - err := c.cc.Invoke(ctx, "/protocol.Wallet/CreateAssetIssue2", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) UpdateWitness(ctx context.Context, in *core.WitnessUpdateContract, opts ...grpc.CallOption) (*core.Transaction, error) { - out := new(core.Transaction) - err := c.cc.Invoke(ctx, "/protocol.Wallet/UpdateWitness", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) UpdateWitness2(ctx context.Context, in *core.WitnessUpdateContract, opts ...grpc.CallOption) (*TransactionExtention, error) { - out := new(TransactionExtention) - err := c.cc.Invoke(ctx, "/protocol.Wallet/UpdateWitness2", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) CreateAccount(ctx context.Context, in *core.AccountCreateContract, opts ...grpc.CallOption) (*core.Transaction, error) { - out := new(core.Transaction) - err := c.cc.Invoke(ctx, "/protocol.Wallet/CreateAccount", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) CreateAccount2(ctx context.Context, in *core.AccountCreateContract, opts ...grpc.CallOption) (*TransactionExtention, error) { - out := new(TransactionExtention) - err := c.cc.Invoke(ctx, "/protocol.Wallet/CreateAccount2", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) CreateWitness(ctx context.Context, in *core.WitnessCreateContract, opts ...grpc.CallOption) (*core.Transaction, error) { - out := new(core.Transaction) - err := c.cc.Invoke(ctx, "/protocol.Wallet/CreateWitness", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) CreateWitness2(ctx context.Context, in *core.WitnessCreateContract, opts ...grpc.CallOption) (*TransactionExtention, error) { - out := new(TransactionExtention) - err := c.cc.Invoke(ctx, "/protocol.Wallet/CreateWitness2", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) TransferAsset(ctx context.Context, in *core.TransferAssetContract, opts ...grpc.CallOption) (*core.Transaction, error) { - out := new(core.Transaction) - err := c.cc.Invoke(ctx, "/protocol.Wallet/TransferAsset", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) TransferAsset2(ctx context.Context, in *core.TransferAssetContract, opts ...grpc.CallOption) (*TransactionExtention, error) { - out := new(TransactionExtention) - err := c.cc.Invoke(ctx, "/protocol.Wallet/TransferAsset2", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) ParticipateAssetIssue(ctx context.Context, in *core.ParticipateAssetIssueContract, opts ...grpc.CallOption) (*core.Transaction, error) { - out := new(core.Transaction) - err := c.cc.Invoke(ctx, "/protocol.Wallet/ParticipateAssetIssue", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) ParticipateAssetIssue2(ctx context.Context, in *core.ParticipateAssetIssueContract, opts ...grpc.CallOption) (*TransactionExtention, error) { - out := new(TransactionExtention) - err := c.cc.Invoke(ctx, "/protocol.Wallet/ParticipateAssetIssue2", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) FreezeBalance(ctx context.Context, in *core.FreezeBalanceContract, opts ...grpc.CallOption) (*core.Transaction, error) { - out := new(core.Transaction) - err := c.cc.Invoke(ctx, "/protocol.Wallet/FreezeBalance", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) FreezeBalance2(ctx context.Context, in *core.FreezeBalanceContract, opts ...grpc.CallOption) (*TransactionExtention, error) { - out := new(TransactionExtention) - err := c.cc.Invoke(ctx, "/protocol.Wallet/FreezeBalance2", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) UnfreezeBalance(ctx context.Context, in *core.UnfreezeBalanceContract, opts ...grpc.CallOption) (*core.Transaction, error) { - out := new(core.Transaction) - err := c.cc.Invoke(ctx, "/protocol.Wallet/UnfreezeBalance", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) UnfreezeBalance2(ctx context.Context, in *core.UnfreezeBalanceContract, opts ...grpc.CallOption) (*TransactionExtention, error) { - out := new(TransactionExtention) - err := c.cc.Invoke(ctx, "/protocol.Wallet/UnfreezeBalance2", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) UnfreezeAsset(ctx context.Context, in *core.UnfreezeAssetContract, opts ...grpc.CallOption) (*core.Transaction, error) { - out := new(core.Transaction) - err := c.cc.Invoke(ctx, "/protocol.Wallet/UnfreezeAsset", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) UnfreezeAsset2(ctx context.Context, in *core.UnfreezeAssetContract, opts ...grpc.CallOption) (*TransactionExtention, error) { - out := new(TransactionExtention) - err := c.cc.Invoke(ctx, "/protocol.Wallet/UnfreezeAsset2", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) WithdrawBalance(ctx context.Context, in *core.WithdrawBalanceContract, opts ...grpc.CallOption) (*core.Transaction, error) { - out := new(core.Transaction) - err := c.cc.Invoke(ctx, "/protocol.Wallet/WithdrawBalance", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) WithdrawBalance2(ctx context.Context, in *core.WithdrawBalanceContract, opts ...grpc.CallOption) (*TransactionExtention, error) { - out := new(TransactionExtention) - err := c.cc.Invoke(ctx, "/protocol.Wallet/WithdrawBalance2", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) UpdateAsset(ctx context.Context, in *core.UpdateAssetContract, opts ...grpc.CallOption) (*core.Transaction, error) { - out := new(core.Transaction) - err := c.cc.Invoke(ctx, "/protocol.Wallet/UpdateAsset", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) UpdateAsset2(ctx context.Context, in *core.UpdateAssetContract, opts ...grpc.CallOption) (*TransactionExtention, error) { - out := new(TransactionExtention) - err := c.cc.Invoke(ctx, "/protocol.Wallet/UpdateAsset2", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) ProposalCreate(ctx context.Context, in *core.ProposalCreateContract, opts ...grpc.CallOption) (*TransactionExtention, error) { - out := new(TransactionExtention) - err := c.cc.Invoke(ctx, "/protocol.Wallet/ProposalCreate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) ProposalApprove(ctx context.Context, in *core.ProposalApproveContract, opts ...grpc.CallOption) (*TransactionExtention, error) { - out := new(TransactionExtention) - err := c.cc.Invoke(ctx, "/protocol.Wallet/ProposalApprove", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) ProposalDelete(ctx context.Context, in *core.ProposalDeleteContract, opts ...grpc.CallOption) (*TransactionExtention, error) { - out := new(TransactionExtention) - err := c.cc.Invoke(ctx, "/protocol.Wallet/ProposalDelete", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) BuyStorage(ctx context.Context, in *core.BuyStorageContract, opts ...grpc.CallOption) (*TransactionExtention, error) { - out := new(TransactionExtention) - err := c.cc.Invoke(ctx, "/protocol.Wallet/BuyStorage", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) BuyStorageBytes(ctx context.Context, in *core.BuyStorageBytesContract, opts ...grpc.CallOption) (*TransactionExtention, error) { - out := new(TransactionExtention) - err := c.cc.Invoke(ctx, "/protocol.Wallet/BuyStorageBytes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) SellStorage(ctx context.Context, in *core.SellStorageContract, opts ...grpc.CallOption) (*TransactionExtention, error) { - out := new(TransactionExtention) - err := c.cc.Invoke(ctx, "/protocol.Wallet/SellStorage", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) ExchangeCreate(ctx context.Context, in *core.ExchangeCreateContract, opts ...grpc.CallOption) (*TransactionExtention, error) { - out := new(TransactionExtention) - err := c.cc.Invoke(ctx, "/protocol.Wallet/ExchangeCreate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) ExchangeInject(ctx context.Context, in *core.ExchangeInjectContract, opts ...grpc.CallOption) (*TransactionExtention, error) { - out := new(TransactionExtention) - err := c.cc.Invoke(ctx, "/protocol.Wallet/ExchangeInject", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) ExchangeWithdraw(ctx context.Context, in *core.ExchangeWithdrawContract, opts ...grpc.CallOption) (*TransactionExtention, error) { - out := new(TransactionExtention) - err := c.cc.Invoke(ctx, "/protocol.Wallet/ExchangeWithdraw", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) ExchangeTransaction(ctx context.Context, in *core.ExchangeTransactionContract, opts ...grpc.CallOption) (*TransactionExtention, error) { - out := new(TransactionExtention) - err := c.cc.Invoke(ctx, "/protocol.Wallet/ExchangeTransaction", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) ListNodes(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*NodeList, error) { - out := new(NodeList) - err := c.cc.Invoke(ctx, "/protocol.Wallet/ListNodes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetAssetIssueByAccount(ctx context.Context, in *core.Account, opts ...grpc.CallOption) (*AssetIssueList, error) { - out := new(AssetIssueList) - err := c.cc.Invoke(ctx, "/protocol.Wallet/GetAssetIssueByAccount", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetAccountNet(ctx context.Context, in *core.Account, opts ...grpc.CallOption) (*AccountNetMessage, error) { - out := new(AccountNetMessage) - err := c.cc.Invoke(ctx, "/protocol.Wallet/GetAccountNet", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetAccountResource(ctx context.Context, in *core.Account, opts ...grpc.CallOption) (*AccountResourceMessage, error) { - out := new(AccountResourceMessage) - err := c.cc.Invoke(ctx, "/protocol.Wallet/GetAccountResource", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetAssetIssueByName(ctx context.Context, in *BytesMessage, opts ...grpc.CallOption) (*core.AssetIssueContract, error) { - out := new(core.AssetIssueContract) - err := c.cc.Invoke(ctx, "/protocol.Wallet/GetAssetIssueByName", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetAssetIssueListByName(ctx context.Context, in *BytesMessage, opts ...grpc.CallOption) (*AssetIssueList, error) { - out := new(AssetIssueList) - err := c.cc.Invoke(ctx, "/protocol.Wallet/GetAssetIssueListByName", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetAssetIssueById(ctx context.Context, in *BytesMessage, opts ...grpc.CallOption) (*core.AssetIssueContract, error) { - out := new(core.AssetIssueContract) - err := c.cc.Invoke(ctx, "/protocol.Wallet/GetAssetIssueById", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetNowBlock(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*core.Block, error) { - out := new(core.Block) - err := c.cc.Invoke(ctx, "/protocol.Wallet/GetNowBlock", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetNowBlock2(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*BlockExtention, error) { - out := new(BlockExtention) - err := c.cc.Invoke(ctx, "/protocol.Wallet/GetNowBlock2", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetBlockByNum(ctx context.Context, in *NumberMessage, opts ...grpc.CallOption) (*core.Block, error) { - out := new(core.Block) - err := c.cc.Invoke(ctx, "/protocol.Wallet/GetBlockByNum", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetBlockByNum2(ctx context.Context, in *NumberMessage, opts ...grpc.CallOption) (*BlockExtention, error) { - out := new(BlockExtention) - err := c.cc.Invoke(ctx, "/protocol.Wallet/GetBlockByNum2", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetTransactionCountByBlockNum(ctx context.Context, in *NumberMessage, opts ...grpc.CallOption) (*NumberMessage, error) { - out := new(NumberMessage) - err := c.cc.Invoke(ctx, "/protocol.Wallet/GetTransactionCountByBlockNum", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetBlockById(ctx context.Context, in *BytesMessage, opts ...grpc.CallOption) (*core.Block, error) { - out := new(core.Block) - err := c.cc.Invoke(ctx, "/protocol.Wallet/GetBlockById", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetBlockByLimitNext(ctx context.Context, in *BlockLimit, opts ...grpc.CallOption) (*BlockList, error) { - out := new(BlockList) - err := c.cc.Invoke(ctx, "/protocol.Wallet/GetBlockByLimitNext", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetBlockByLimitNext2(ctx context.Context, in *BlockLimit, opts ...grpc.CallOption) (*BlockListExtention, error) { - out := new(BlockListExtention) - err := c.cc.Invoke(ctx, "/protocol.Wallet/GetBlockByLimitNext2", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetBlockByLatestNum(ctx context.Context, in *NumberMessage, opts ...grpc.CallOption) (*BlockList, error) { - out := new(BlockList) - err := c.cc.Invoke(ctx, "/protocol.Wallet/GetBlockByLatestNum", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetBlockByLatestNum2(ctx context.Context, in *NumberMessage, opts ...grpc.CallOption) (*BlockListExtention, error) { - out := new(BlockListExtention) - err := c.cc.Invoke(ctx, "/protocol.Wallet/GetBlockByLatestNum2", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetTransactionById(ctx context.Context, in *BytesMessage, opts ...grpc.CallOption) (*core.Transaction, error) { - out := new(core.Transaction) - err := c.cc.Invoke(ctx, "/protocol.Wallet/GetTransactionById", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) DeployContract(ctx context.Context, in *core.CreateSmartContract, opts ...grpc.CallOption) (*TransactionExtention, error) { - out := new(TransactionExtention) - err := c.cc.Invoke(ctx, "/protocol.Wallet/DeployContract", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetContract(ctx context.Context, in *BytesMessage, opts ...grpc.CallOption) (*core.SmartContract, error) { - out := new(core.SmartContract) - err := c.cc.Invoke(ctx, "/protocol.Wallet/GetContract", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) TriggerContract(ctx context.Context, in *core.TriggerSmartContract, opts ...grpc.CallOption) (*TransactionExtention, error) { - out := new(TransactionExtention) - err := c.cc.Invoke(ctx, "/protocol.Wallet/TriggerContract", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) ListWitnesses(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*WitnessList, error) { - out := new(WitnessList) - err := c.cc.Invoke(ctx, "/protocol.Wallet/ListWitnesses", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetDelegatedResource(ctx context.Context, in *DelegatedResourceMessage, opts ...grpc.CallOption) (*DelegatedResourceList, error) { - out := new(DelegatedResourceList) - err := c.cc.Invoke(ctx, "/protocol.Wallet/GetDelegatedResource", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetDelegatedResourceAccountIndex(ctx context.Context, in *BytesMessage, opts ...grpc.CallOption) (*core.DelegatedResourceAccountIndex, error) { - out := new(core.DelegatedResourceAccountIndex) - err := c.cc.Invoke(ctx, "/protocol.Wallet/GetDelegatedResourceAccountIndex", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) ListProposals(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*ProposalList, error) { - out := new(ProposalList) - err := c.cc.Invoke(ctx, "/protocol.Wallet/ListProposals", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetPaginatedProposalList(ctx context.Context, in *PaginatedMessage, opts ...grpc.CallOption) (*ProposalList, error) { - out := new(ProposalList) - err := c.cc.Invoke(ctx, "/protocol.Wallet/GetPaginatedProposalList", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetProposalById(ctx context.Context, in *BytesMessage, opts ...grpc.CallOption) (*core.Proposal, error) { - out := new(core.Proposal) - err := c.cc.Invoke(ctx, "/protocol.Wallet/GetProposalById", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) ListExchanges(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*ExchangeList, error) { - out := new(ExchangeList) - err := c.cc.Invoke(ctx, "/protocol.Wallet/ListExchanges", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetPaginatedExchangeList(ctx context.Context, in *PaginatedMessage, opts ...grpc.CallOption) (*ExchangeList, error) { - out := new(ExchangeList) - err := c.cc.Invoke(ctx, "/protocol.Wallet/GetPaginatedExchangeList", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetExchangeById(ctx context.Context, in *BytesMessage, opts ...grpc.CallOption) (*core.Exchange, error) { - out := new(core.Exchange) - err := c.cc.Invoke(ctx, "/protocol.Wallet/GetExchangeById", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetChainParameters(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*core.ChainParameters, error) { - out := new(core.ChainParameters) - err := c.cc.Invoke(ctx, "/protocol.Wallet/GetChainParameters", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetAssetIssueList(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*AssetIssueList, error) { - out := new(AssetIssueList) - err := c.cc.Invoke(ctx, "/protocol.Wallet/GetAssetIssueList", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetPaginatedAssetIssueList(ctx context.Context, in *PaginatedMessage, opts ...grpc.CallOption) (*AssetIssueList, error) { - out := new(AssetIssueList) - err := c.cc.Invoke(ctx, "/protocol.Wallet/GetPaginatedAssetIssueList", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) TotalTransaction(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*NumberMessage, error) { - out := new(NumberMessage) - err := c.cc.Invoke(ctx, "/protocol.Wallet/TotalTransaction", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetNextMaintenanceTime(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*NumberMessage, error) { - out := new(NumberMessage) - err := c.cc.Invoke(ctx, "/protocol.Wallet/GetNextMaintenanceTime", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetTransactionSign(ctx context.Context, in *core.TransactionSign, opts ...grpc.CallOption) (*core.Transaction, error) { - out := new(core.Transaction) - err := c.cc.Invoke(ctx, "/protocol.Wallet/GetTransactionSign", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetTransactionSign2(ctx context.Context, in *core.TransactionSign, opts ...grpc.CallOption) (*TransactionExtention, error) { - out := new(TransactionExtention) - err := c.cc.Invoke(ctx, "/protocol.Wallet/GetTransactionSign2", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) CreateAddress(ctx context.Context, in *BytesMessage, opts ...grpc.CallOption) (*BytesMessage, error) { - out := new(BytesMessage) - err := c.cc.Invoke(ctx, "/protocol.Wallet/CreateAddress", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) EasyTransfer(ctx context.Context, in *EasyTransferMessage, opts ...grpc.CallOption) (*EasyTransferResponse, error) { - out := new(EasyTransferResponse) - err := c.cc.Invoke(ctx, "/protocol.Wallet/EasyTransfer", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) EasyTransferByPrivate(ctx context.Context, in *EasyTransferByPrivateMessage, opts ...grpc.CallOption) (*EasyTransferResponse, error) { - out := new(EasyTransferResponse) - err := c.cc.Invoke(ctx, "/protocol.Wallet/EasyTransferByPrivate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GenerateAddress(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*AddressPrKeyPairMessage, error) { - out := new(AddressPrKeyPairMessage) - err := c.cc.Invoke(ctx, "/protocol.Wallet/GenerateAddress", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetTransactionInfoById(ctx context.Context, in *BytesMessage, opts ...grpc.CallOption) (*core.TransactionInfo, error) { - out := new(core.TransactionInfo) - err := c.cc.Invoke(ctx, "/protocol.Wallet/GetTransactionInfoById", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// WalletServer is the server API for Wallet service. -type WalletServer interface { - GetAccount(context.Context, *core.Account) (*core.Account, error) - GetAccountById(context.Context, *core.Account) (*core.Account, error) - //Please use CreateTransaction2 instead of this function. - CreateTransaction(context.Context, *core.TransferContract) (*core.Transaction, error) - //Use this function instead of CreateTransaction. - CreateTransaction2(context.Context, *core.TransferContract) (*TransactionExtention, error) - BroadcastTransaction(context.Context, *core.Transaction) (*Return, error) - //Please use UpdateAccount2 instead of this function. - UpdateAccount(context.Context, *core.AccountUpdateContract) (*core.Transaction, error) - SetAccountId(context.Context, *core.SetAccountIdContract) (*core.Transaction, error) - //Use this function instead of UpdateAccount. - UpdateAccount2(context.Context, *core.AccountUpdateContract) (*TransactionExtention, error) - //Please use VoteWitnessAccount2 instead of this function. - VoteWitnessAccount(context.Context, *core.VoteWitnessContract) (*core.Transaction, error) - //modify the consume_user_resource_percent - UpdateSetting(context.Context, *core.UpdateSettingContract) (*TransactionExtention, error) - //modify the energy_limit - UpdateEnergyLimit(context.Context, *core.UpdateEnergyLimitContract) (*TransactionExtention, error) - //Use this function instead of VoteWitnessAccount. - VoteWitnessAccount2(context.Context, *core.VoteWitnessContract) (*TransactionExtention, error) - //Please use CreateAssetIssue2 instead of this function. - CreateAssetIssue(context.Context, *core.AssetIssueContract) (*core.Transaction, error) - //Use this function instead of CreateAssetIssue. - CreateAssetIssue2(context.Context, *core.AssetIssueContract) (*TransactionExtention, error) - //Please use UpdateWitness2 instead of this function. - UpdateWitness(context.Context, *core.WitnessUpdateContract) (*core.Transaction, error) - //Use this function instead of UpdateWitness. - UpdateWitness2(context.Context, *core.WitnessUpdateContract) (*TransactionExtention, error) - //Please use CreateAccount2 instead of this function. - CreateAccount(context.Context, *core.AccountCreateContract) (*core.Transaction, error) - //Use this function instead of CreateAccount. - CreateAccount2(context.Context, *core.AccountCreateContract) (*TransactionExtention, error) - //Please use CreateWitness2 instead of this function. - CreateWitness(context.Context, *core.WitnessCreateContract) (*core.Transaction, error) - //Use this function instead of CreateWitness. - CreateWitness2(context.Context, *core.WitnessCreateContract) (*TransactionExtention, error) - //Please use TransferAsset2 instead of this function. - TransferAsset(context.Context, *core.TransferAssetContract) (*core.Transaction, error) - //Use this function instead of TransferAsset. - TransferAsset2(context.Context, *core.TransferAssetContract) (*TransactionExtention, error) - //Please use ParticipateAssetIssue2 instead of this function. - ParticipateAssetIssue(context.Context, *core.ParticipateAssetIssueContract) (*core.Transaction, error) - //Use this function instead of ParticipateAssetIssue. - ParticipateAssetIssue2(context.Context, *core.ParticipateAssetIssueContract) (*TransactionExtention, error) - //Please use FreezeBalance2 instead of this function. - FreezeBalance(context.Context, *core.FreezeBalanceContract) (*core.Transaction, error) - //Use this function instead of FreezeBalance. - FreezeBalance2(context.Context, *core.FreezeBalanceContract) (*TransactionExtention, error) - //Please use UnfreezeBalance2 instead of this function. - UnfreezeBalance(context.Context, *core.UnfreezeBalanceContract) (*core.Transaction, error) - //Use this function instead of UnfreezeBalance. - UnfreezeBalance2(context.Context, *core.UnfreezeBalanceContract) (*TransactionExtention, error) - //Please use UnfreezeAsset2 instead of this function. - UnfreezeAsset(context.Context, *core.UnfreezeAssetContract) (*core.Transaction, error) - //Use this function instead of UnfreezeAsset. - UnfreezeAsset2(context.Context, *core.UnfreezeAssetContract) (*TransactionExtention, error) - //Please use WithdrawBalance2 instead of this function. - WithdrawBalance(context.Context, *core.WithdrawBalanceContract) (*core.Transaction, error) - //Use this function instead of WithdrawBalance. - WithdrawBalance2(context.Context, *core.WithdrawBalanceContract) (*TransactionExtention, error) - //Please use UpdateAsset2 instead of this function. - UpdateAsset(context.Context, *core.UpdateAssetContract) (*core.Transaction, error) - //Use this function instead of UpdateAsset. - UpdateAsset2(context.Context, *core.UpdateAssetContract) (*TransactionExtention, error) - ProposalCreate(context.Context, *core.ProposalCreateContract) (*TransactionExtention, error) - ProposalApprove(context.Context, *core.ProposalApproveContract) (*TransactionExtention, error) - ProposalDelete(context.Context, *core.ProposalDeleteContract) (*TransactionExtention, error) - BuyStorage(context.Context, *core.BuyStorageContract) (*TransactionExtention, error) - BuyStorageBytes(context.Context, *core.BuyStorageBytesContract) (*TransactionExtention, error) - SellStorage(context.Context, *core.SellStorageContract) (*TransactionExtention, error) - ExchangeCreate(context.Context, *core.ExchangeCreateContract) (*TransactionExtention, error) - ExchangeInject(context.Context, *core.ExchangeInjectContract) (*TransactionExtention, error) - ExchangeWithdraw(context.Context, *core.ExchangeWithdrawContract) (*TransactionExtention, error) - ExchangeTransaction(context.Context, *core.ExchangeTransactionContract) (*TransactionExtention, error) - ListNodes(context.Context, *EmptyMessage) (*NodeList, error) - GetAssetIssueByAccount(context.Context, *core.Account) (*AssetIssueList, error) - GetAccountNet(context.Context, *core.Account) (*AccountNetMessage, error) - GetAccountResource(context.Context, *core.Account) (*AccountResourceMessage, error) - GetAssetIssueByName(context.Context, *BytesMessage) (*core.AssetIssueContract, error) - GetAssetIssueListByName(context.Context, *BytesMessage) (*AssetIssueList, error) - GetAssetIssueById(context.Context, *BytesMessage) (*core.AssetIssueContract, error) - //Please use GetNowBlock2 instead of this function. - GetNowBlock(context.Context, *EmptyMessage) (*core.Block, error) - //Use this function instead of GetNowBlock. - GetNowBlock2(context.Context, *EmptyMessage) (*BlockExtention, error) - //Please use GetBlockByNum2 instead of this function. - GetBlockByNum(context.Context, *NumberMessage) (*core.Block, error) - //Use this function instead of GetBlockByNum. - GetBlockByNum2(context.Context, *NumberMessage) (*BlockExtention, error) - GetTransactionCountByBlockNum(context.Context, *NumberMessage) (*NumberMessage, error) - GetBlockById(context.Context, *BytesMessage) (*core.Block, error) - //Please use GetBlockByLimitNext2 instead of this function. - GetBlockByLimitNext(context.Context, *BlockLimit) (*BlockList, error) - //Use this function instead of GetBlockByLimitNext. - GetBlockByLimitNext2(context.Context, *BlockLimit) (*BlockListExtention, error) - //Please use GetBlockByLatestNum2 instead of this function. - GetBlockByLatestNum(context.Context, *NumberMessage) (*BlockList, error) - //Use this function instead of GetBlockByLatestNum. - GetBlockByLatestNum2(context.Context, *NumberMessage) (*BlockListExtention, error) - GetTransactionById(context.Context, *BytesMessage) (*core.Transaction, error) - DeployContract(context.Context, *core.CreateSmartContract) (*TransactionExtention, error) - GetContract(context.Context, *BytesMessage) (*core.SmartContract, error) - TriggerContract(context.Context, *core.TriggerSmartContract) (*TransactionExtention, error) - ListWitnesses(context.Context, *EmptyMessage) (*WitnessList, error) - GetDelegatedResource(context.Context, *DelegatedResourceMessage) (*DelegatedResourceList, error) - GetDelegatedResourceAccountIndex(context.Context, *BytesMessage) (*core.DelegatedResourceAccountIndex, error) - ListProposals(context.Context, *EmptyMessage) (*ProposalList, error) - GetPaginatedProposalList(context.Context, *PaginatedMessage) (*ProposalList, error) - GetProposalById(context.Context, *BytesMessage) (*core.Proposal, error) - ListExchanges(context.Context, *EmptyMessage) (*ExchangeList, error) - GetPaginatedExchangeList(context.Context, *PaginatedMessage) (*ExchangeList, error) - GetExchangeById(context.Context, *BytesMessage) (*core.Exchange, error) - GetChainParameters(context.Context, *EmptyMessage) (*core.ChainParameters, error) - GetAssetIssueList(context.Context, *EmptyMessage) (*AssetIssueList, error) - GetPaginatedAssetIssueList(context.Context, *PaginatedMessage) (*AssetIssueList, error) - TotalTransaction(context.Context, *EmptyMessage) (*NumberMessage, error) - GetNextMaintenanceTime(context.Context, *EmptyMessage) (*NumberMessage, error) - //Warning: do not invoke this interface provided by others. - //Please use GetTransactionSign2 instead of this function. - GetTransactionSign(context.Context, *core.TransactionSign) (*core.Transaction, error) - //Warning: do not invoke this interface provided by others. - //Use this function instead of GetTransactionSign. - GetTransactionSign2(context.Context, *core.TransactionSign) (*TransactionExtention, error) - //Warning: do not invoke this interface provided by others. - CreateAddress(context.Context, *BytesMessage) (*BytesMessage, error) - //Warning: do not invoke this interface provided by others. - EasyTransfer(context.Context, *EasyTransferMessage) (*EasyTransferResponse, error) - //Warning: do not invoke this interface provided by others. - EasyTransferByPrivate(context.Context, *EasyTransferByPrivateMessage) (*EasyTransferResponse, error) - //Warning: do not invoke this interface provided by others. - GenerateAddress(context.Context, *EmptyMessage) (*AddressPrKeyPairMessage, error) - GetTransactionInfoById(context.Context, *BytesMessage) (*core.TransactionInfo, error) -} - -// UnimplementedWalletServer can be embedded to have forward compatible implementations. -type UnimplementedWalletServer struct { -} - -func (*UnimplementedWalletServer) GetAccount(ctx context.Context, req *core.Account) (*core.Account, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAccount not implemented") -} -func (*UnimplementedWalletServer) GetAccountById(ctx context.Context, req *core.Account) (*core.Account, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAccountById not implemented") -} -func (*UnimplementedWalletServer) CreateTransaction(ctx context.Context, req *core.TransferContract) (*core.Transaction, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateTransaction not implemented") -} -func (*UnimplementedWalletServer) CreateTransaction2(ctx context.Context, req *core.TransferContract) (*TransactionExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateTransaction2 not implemented") -} -func (*UnimplementedWalletServer) BroadcastTransaction(ctx context.Context, req *core.Transaction) (*Return, error) { - return nil, status.Errorf(codes.Unimplemented, "method BroadcastTransaction not implemented") -} -func (*UnimplementedWalletServer) UpdateAccount(ctx context.Context, req *core.AccountUpdateContract) (*core.Transaction, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateAccount not implemented") -} -func (*UnimplementedWalletServer) SetAccountId(ctx context.Context, req *core.SetAccountIdContract) (*core.Transaction, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetAccountId not implemented") -} -func (*UnimplementedWalletServer) UpdateAccount2(ctx context.Context, req *core.AccountUpdateContract) (*TransactionExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateAccount2 not implemented") -} -func (*UnimplementedWalletServer) VoteWitnessAccount(ctx context.Context, req *core.VoteWitnessContract) (*core.Transaction, error) { - return nil, status.Errorf(codes.Unimplemented, "method VoteWitnessAccount not implemented") -} -func (*UnimplementedWalletServer) UpdateSetting(ctx context.Context, req *core.UpdateSettingContract) (*TransactionExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateSetting not implemented") -} -func (*UnimplementedWalletServer) UpdateEnergyLimit(ctx context.Context, req *core.UpdateEnergyLimitContract) (*TransactionExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateEnergyLimit not implemented") -} -func (*UnimplementedWalletServer) VoteWitnessAccount2(ctx context.Context, req *core.VoteWitnessContract) (*TransactionExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method VoteWitnessAccount2 not implemented") -} -func (*UnimplementedWalletServer) CreateAssetIssue(ctx context.Context, req *core.AssetIssueContract) (*core.Transaction, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateAssetIssue not implemented") -} -func (*UnimplementedWalletServer) CreateAssetIssue2(ctx context.Context, req *core.AssetIssueContract) (*TransactionExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateAssetIssue2 not implemented") -} -func (*UnimplementedWalletServer) UpdateWitness(ctx context.Context, req *core.WitnessUpdateContract) (*core.Transaction, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateWitness not implemented") -} -func (*UnimplementedWalletServer) UpdateWitness2(ctx context.Context, req *core.WitnessUpdateContract) (*TransactionExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateWitness2 not implemented") -} -func (*UnimplementedWalletServer) CreateAccount(ctx context.Context, req *core.AccountCreateContract) (*core.Transaction, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateAccount not implemented") -} -func (*UnimplementedWalletServer) CreateAccount2(ctx context.Context, req *core.AccountCreateContract) (*TransactionExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateAccount2 not implemented") -} -func (*UnimplementedWalletServer) CreateWitness(ctx context.Context, req *core.WitnessCreateContract) (*core.Transaction, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateWitness not implemented") -} -func (*UnimplementedWalletServer) CreateWitness2(ctx context.Context, req *core.WitnessCreateContract) (*TransactionExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateWitness2 not implemented") -} -func (*UnimplementedWalletServer) TransferAsset(ctx context.Context, req *core.TransferAssetContract) (*core.Transaction, error) { - return nil, status.Errorf(codes.Unimplemented, "method TransferAsset not implemented") -} -func (*UnimplementedWalletServer) TransferAsset2(ctx context.Context, req *core.TransferAssetContract) (*TransactionExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method TransferAsset2 not implemented") -} -func (*UnimplementedWalletServer) ParticipateAssetIssue(ctx context.Context, req *core.ParticipateAssetIssueContract) (*core.Transaction, error) { - return nil, status.Errorf(codes.Unimplemented, "method ParticipateAssetIssue not implemented") -} -func (*UnimplementedWalletServer) ParticipateAssetIssue2(ctx context.Context, req *core.ParticipateAssetIssueContract) (*TransactionExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method ParticipateAssetIssue2 not implemented") -} -func (*UnimplementedWalletServer) FreezeBalance(ctx context.Context, req *core.FreezeBalanceContract) (*core.Transaction, error) { - return nil, status.Errorf(codes.Unimplemented, "method FreezeBalance not implemented") -} -func (*UnimplementedWalletServer) FreezeBalance2(ctx context.Context, req *core.FreezeBalanceContract) (*TransactionExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method FreezeBalance2 not implemented") -} -func (*UnimplementedWalletServer) UnfreezeBalance(ctx context.Context, req *core.UnfreezeBalanceContract) (*core.Transaction, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnfreezeBalance not implemented") -} -func (*UnimplementedWalletServer) UnfreezeBalance2(ctx context.Context, req *core.UnfreezeBalanceContract) (*TransactionExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnfreezeBalance2 not implemented") -} -func (*UnimplementedWalletServer) UnfreezeAsset(ctx context.Context, req *core.UnfreezeAssetContract) (*core.Transaction, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnfreezeAsset not implemented") -} -func (*UnimplementedWalletServer) UnfreezeAsset2(ctx context.Context, req *core.UnfreezeAssetContract) (*TransactionExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnfreezeAsset2 not implemented") -} -func (*UnimplementedWalletServer) WithdrawBalance(ctx context.Context, req *core.WithdrawBalanceContract) (*core.Transaction, error) { - return nil, status.Errorf(codes.Unimplemented, "method WithdrawBalance not implemented") -} -func (*UnimplementedWalletServer) WithdrawBalance2(ctx context.Context, req *core.WithdrawBalanceContract) (*TransactionExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method WithdrawBalance2 not implemented") -} -func (*UnimplementedWalletServer) UpdateAsset(ctx context.Context, req *core.UpdateAssetContract) (*core.Transaction, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateAsset not implemented") -} -func (*UnimplementedWalletServer) UpdateAsset2(ctx context.Context, req *core.UpdateAssetContract) (*TransactionExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateAsset2 not implemented") -} -func (*UnimplementedWalletServer) ProposalCreate(ctx context.Context, req *core.ProposalCreateContract) (*TransactionExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method ProposalCreate not implemented") -} -func (*UnimplementedWalletServer) ProposalApprove(ctx context.Context, req *core.ProposalApproveContract) (*TransactionExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method ProposalApprove not implemented") -} -func (*UnimplementedWalletServer) ProposalDelete(ctx context.Context, req *core.ProposalDeleteContract) (*TransactionExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method ProposalDelete not implemented") -} -func (*UnimplementedWalletServer) BuyStorage(ctx context.Context, req *core.BuyStorageContract) (*TransactionExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method BuyStorage not implemented") -} -func (*UnimplementedWalletServer) BuyStorageBytes(ctx context.Context, req *core.BuyStorageBytesContract) (*TransactionExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method BuyStorageBytes not implemented") -} -func (*UnimplementedWalletServer) SellStorage(ctx context.Context, req *core.SellStorageContract) (*TransactionExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method SellStorage not implemented") -} -func (*UnimplementedWalletServer) ExchangeCreate(ctx context.Context, req *core.ExchangeCreateContract) (*TransactionExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method ExchangeCreate not implemented") -} -func (*UnimplementedWalletServer) ExchangeInject(ctx context.Context, req *core.ExchangeInjectContract) (*TransactionExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method ExchangeInject not implemented") -} -func (*UnimplementedWalletServer) ExchangeWithdraw(ctx context.Context, req *core.ExchangeWithdrawContract) (*TransactionExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method ExchangeWithdraw not implemented") -} -func (*UnimplementedWalletServer) ExchangeTransaction(ctx context.Context, req *core.ExchangeTransactionContract) (*TransactionExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method ExchangeTransaction not implemented") -} -func (*UnimplementedWalletServer) ListNodes(ctx context.Context, req *EmptyMessage) (*NodeList, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListNodes not implemented") -} -func (*UnimplementedWalletServer) GetAssetIssueByAccount(ctx context.Context, req *core.Account) (*AssetIssueList, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAssetIssueByAccount not implemented") -} -func (*UnimplementedWalletServer) GetAccountNet(ctx context.Context, req *core.Account) (*AccountNetMessage, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAccountNet not implemented") -} -func (*UnimplementedWalletServer) GetAccountResource(ctx context.Context, req *core.Account) (*AccountResourceMessage, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAccountResource not implemented") -} -func (*UnimplementedWalletServer) GetAssetIssueByName(ctx context.Context, req *BytesMessage) (*core.AssetIssueContract, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAssetIssueByName not implemented") -} -func (*UnimplementedWalletServer) GetAssetIssueListByName(ctx context.Context, req *BytesMessage) (*AssetIssueList, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAssetIssueListByName not implemented") -} -func (*UnimplementedWalletServer) GetAssetIssueById(ctx context.Context, req *BytesMessage) (*core.AssetIssueContract, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAssetIssueById not implemented") -} -func (*UnimplementedWalletServer) GetNowBlock(ctx context.Context, req *EmptyMessage) (*core.Block, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetNowBlock not implemented") -} -func (*UnimplementedWalletServer) GetNowBlock2(ctx context.Context, req *EmptyMessage) (*BlockExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetNowBlock2 not implemented") -} -func (*UnimplementedWalletServer) GetBlockByNum(ctx context.Context, req *NumberMessage) (*core.Block, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBlockByNum not implemented") -} -func (*UnimplementedWalletServer) GetBlockByNum2(ctx context.Context, req *NumberMessage) (*BlockExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBlockByNum2 not implemented") -} -func (*UnimplementedWalletServer) GetTransactionCountByBlockNum(ctx context.Context, req *NumberMessage) (*NumberMessage, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTransactionCountByBlockNum not implemented") -} -func (*UnimplementedWalletServer) GetBlockById(ctx context.Context, req *BytesMessage) (*core.Block, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBlockById not implemented") -} -func (*UnimplementedWalletServer) GetBlockByLimitNext(ctx context.Context, req *BlockLimit) (*BlockList, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBlockByLimitNext not implemented") -} -func (*UnimplementedWalletServer) GetBlockByLimitNext2(ctx context.Context, req *BlockLimit) (*BlockListExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBlockByLimitNext2 not implemented") -} -func (*UnimplementedWalletServer) GetBlockByLatestNum(ctx context.Context, req *NumberMessage) (*BlockList, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBlockByLatestNum not implemented") -} -func (*UnimplementedWalletServer) GetBlockByLatestNum2(ctx context.Context, req *NumberMessage) (*BlockListExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBlockByLatestNum2 not implemented") -} -func (*UnimplementedWalletServer) GetTransactionById(ctx context.Context, req *BytesMessage) (*core.Transaction, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTransactionById not implemented") -} -func (*UnimplementedWalletServer) DeployContract(ctx context.Context, req *core.CreateSmartContract) (*TransactionExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeployContract not implemented") -} -func (*UnimplementedWalletServer) GetContract(ctx context.Context, req *BytesMessage) (*core.SmartContract, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetContract not implemented") -} -func (*UnimplementedWalletServer) TriggerContract(ctx context.Context, req *core.TriggerSmartContract) (*TransactionExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method TriggerContract not implemented") -} -func (*UnimplementedWalletServer) ListWitnesses(ctx context.Context, req *EmptyMessage) (*WitnessList, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListWitnesses not implemented") -} -func (*UnimplementedWalletServer) GetDelegatedResource(ctx context.Context, req *DelegatedResourceMessage) (*DelegatedResourceList, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetDelegatedResource not implemented") -} -func (*UnimplementedWalletServer) GetDelegatedResourceAccountIndex(ctx context.Context, req *BytesMessage) (*core.DelegatedResourceAccountIndex, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetDelegatedResourceAccountIndex not implemented") -} -func (*UnimplementedWalletServer) ListProposals(ctx context.Context, req *EmptyMessage) (*ProposalList, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListProposals not implemented") -} -func (*UnimplementedWalletServer) GetPaginatedProposalList(ctx context.Context, req *PaginatedMessage) (*ProposalList, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPaginatedProposalList not implemented") -} -func (*UnimplementedWalletServer) GetProposalById(ctx context.Context, req *BytesMessage) (*core.Proposal, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetProposalById not implemented") -} -func (*UnimplementedWalletServer) ListExchanges(ctx context.Context, req *EmptyMessage) (*ExchangeList, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListExchanges not implemented") -} -func (*UnimplementedWalletServer) GetPaginatedExchangeList(ctx context.Context, req *PaginatedMessage) (*ExchangeList, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPaginatedExchangeList not implemented") -} -func (*UnimplementedWalletServer) GetExchangeById(ctx context.Context, req *BytesMessage) (*core.Exchange, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetExchangeById not implemented") -} -func (*UnimplementedWalletServer) GetChainParameters(ctx context.Context, req *EmptyMessage) (*core.ChainParameters, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetChainParameters not implemented") -} -func (*UnimplementedWalletServer) GetAssetIssueList(ctx context.Context, req *EmptyMessage) (*AssetIssueList, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAssetIssueList not implemented") -} -func (*UnimplementedWalletServer) GetPaginatedAssetIssueList(ctx context.Context, req *PaginatedMessage) (*AssetIssueList, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPaginatedAssetIssueList not implemented") -} -func (*UnimplementedWalletServer) TotalTransaction(ctx context.Context, req *EmptyMessage) (*NumberMessage, error) { - return nil, status.Errorf(codes.Unimplemented, "method TotalTransaction not implemented") -} -func (*UnimplementedWalletServer) GetNextMaintenanceTime(ctx context.Context, req *EmptyMessage) (*NumberMessage, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetNextMaintenanceTime not implemented") -} -func (*UnimplementedWalletServer) GetTransactionSign(ctx context.Context, req *core.TransactionSign) (*core.Transaction, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTransactionSign not implemented") -} -func (*UnimplementedWalletServer) GetTransactionSign2(ctx context.Context, req *core.TransactionSign) (*TransactionExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTransactionSign2 not implemented") -} -func (*UnimplementedWalletServer) CreateAddress(ctx context.Context, req *BytesMessage) (*BytesMessage, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateAddress not implemented") -} -func (*UnimplementedWalletServer) EasyTransfer(ctx context.Context, req *EasyTransferMessage) (*EasyTransferResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EasyTransfer not implemented") -} -func (*UnimplementedWalletServer) EasyTransferByPrivate(ctx context.Context, req *EasyTransferByPrivateMessage) (*EasyTransferResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EasyTransferByPrivate not implemented") -} -func (*UnimplementedWalletServer) GenerateAddress(ctx context.Context, req *EmptyMessage) (*AddressPrKeyPairMessage, error) { - return nil, status.Errorf(codes.Unimplemented, "method GenerateAddress not implemented") -} -func (*UnimplementedWalletServer) GetTransactionInfoById(ctx context.Context, req *BytesMessage) (*core.TransactionInfo, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTransactionInfoById not implemented") -} - -func RegisterWalletServer(s *grpc.Server, srv WalletServer) { - s.RegisterService(&_Wallet_serviceDesc, srv) -} - -func _Wallet_GetAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.Account) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/GetAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetAccount(ctx, req.(*core.Account)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetAccountById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.Account) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetAccountById(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/GetAccountById", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetAccountById(ctx, req.(*core.Account)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_CreateTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.TransferContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).CreateTransaction(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/CreateTransaction", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).CreateTransaction(ctx, req.(*core.TransferContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_CreateTransaction2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.TransferContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).CreateTransaction2(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/CreateTransaction2", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).CreateTransaction2(ctx, req.(*core.TransferContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_BroadcastTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.Transaction) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).BroadcastTransaction(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/BroadcastTransaction", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).BroadcastTransaction(ctx, req.(*core.Transaction)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_UpdateAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.AccountUpdateContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).UpdateAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/UpdateAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).UpdateAccount(ctx, req.(*core.AccountUpdateContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_SetAccountId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.SetAccountIdContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).SetAccountId(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/SetAccountId", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).SetAccountId(ctx, req.(*core.SetAccountIdContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_UpdateAccount2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.AccountUpdateContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).UpdateAccount2(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/UpdateAccount2", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).UpdateAccount2(ctx, req.(*core.AccountUpdateContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_VoteWitnessAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.VoteWitnessContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).VoteWitnessAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/VoteWitnessAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).VoteWitnessAccount(ctx, req.(*core.VoteWitnessContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_UpdateSetting_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.UpdateSettingContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).UpdateSetting(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/UpdateSetting", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).UpdateSetting(ctx, req.(*core.UpdateSettingContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_UpdateEnergyLimit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.UpdateEnergyLimitContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).UpdateEnergyLimit(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/UpdateEnergyLimit", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).UpdateEnergyLimit(ctx, req.(*core.UpdateEnergyLimitContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_VoteWitnessAccount2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.VoteWitnessContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).VoteWitnessAccount2(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/VoteWitnessAccount2", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).VoteWitnessAccount2(ctx, req.(*core.VoteWitnessContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_CreateAssetIssue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.AssetIssueContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).CreateAssetIssue(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/CreateAssetIssue", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).CreateAssetIssue(ctx, req.(*core.AssetIssueContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_CreateAssetIssue2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.AssetIssueContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).CreateAssetIssue2(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/CreateAssetIssue2", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).CreateAssetIssue2(ctx, req.(*core.AssetIssueContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_UpdateWitness_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.WitnessUpdateContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).UpdateWitness(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/UpdateWitness", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).UpdateWitness(ctx, req.(*core.WitnessUpdateContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_UpdateWitness2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.WitnessUpdateContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).UpdateWitness2(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/UpdateWitness2", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).UpdateWitness2(ctx, req.(*core.WitnessUpdateContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_CreateAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.AccountCreateContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).CreateAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/CreateAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).CreateAccount(ctx, req.(*core.AccountCreateContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_CreateAccount2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.AccountCreateContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).CreateAccount2(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/CreateAccount2", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).CreateAccount2(ctx, req.(*core.AccountCreateContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_CreateWitness_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.WitnessCreateContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).CreateWitness(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/CreateWitness", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).CreateWitness(ctx, req.(*core.WitnessCreateContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_CreateWitness2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.WitnessCreateContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).CreateWitness2(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/CreateWitness2", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).CreateWitness2(ctx, req.(*core.WitnessCreateContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_TransferAsset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.TransferAssetContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).TransferAsset(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/TransferAsset", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).TransferAsset(ctx, req.(*core.TransferAssetContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_TransferAsset2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.TransferAssetContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).TransferAsset2(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/TransferAsset2", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).TransferAsset2(ctx, req.(*core.TransferAssetContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_ParticipateAssetIssue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.ParticipateAssetIssueContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).ParticipateAssetIssue(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/ParticipateAssetIssue", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).ParticipateAssetIssue(ctx, req.(*core.ParticipateAssetIssueContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_ParticipateAssetIssue2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.ParticipateAssetIssueContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).ParticipateAssetIssue2(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/ParticipateAssetIssue2", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).ParticipateAssetIssue2(ctx, req.(*core.ParticipateAssetIssueContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_FreezeBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.FreezeBalanceContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).FreezeBalance(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/FreezeBalance", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).FreezeBalance(ctx, req.(*core.FreezeBalanceContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_FreezeBalance2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.FreezeBalanceContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).FreezeBalance2(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/FreezeBalance2", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).FreezeBalance2(ctx, req.(*core.FreezeBalanceContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_UnfreezeBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.UnfreezeBalanceContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).UnfreezeBalance(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/UnfreezeBalance", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).UnfreezeBalance(ctx, req.(*core.UnfreezeBalanceContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_UnfreezeBalance2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.UnfreezeBalanceContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).UnfreezeBalance2(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/UnfreezeBalance2", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).UnfreezeBalance2(ctx, req.(*core.UnfreezeBalanceContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_UnfreezeAsset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.UnfreezeAssetContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).UnfreezeAsset(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/UnfreezeAsset", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).UnfreezeAsset(ctx, req.(*core.UnfreezeAssetContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_UnfreezeAsset2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.UnfreezeAssetContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).UnfreezeAsset2(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/UnfreezeAsset2", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).UnfreezeAsset2(ctx, req.(*core.UnfreezeAssetContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_WithdrawBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.WithdrawBalanceContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).WithdrawBalance(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/WithdrawBalance", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).WithdrawBalance(ctx, req.(*core.WithdrawBalanceContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_WithdrawBalance2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.WithdrawBalanceContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).WithdrawBalance2(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/WithdrawBalance2", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).WithdrawBalance2(ctx, req.(*core.WithdrawBalanceContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_UpdateAsset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.UpdateAssetContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).UpdateAsset(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/UpdateAsset", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).UpdateAsset(ctx, req.(*core.UpdateAssetContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_UpdateAsset2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.UpdateAssetContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).UpdateAsset2(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/UpdateAsset2", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).UpdateAsset2(ctx, req.(*core.UpdateAssetContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_ProposalCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.ProposalCreateContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).ProposalCreate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/ProposalCreate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).ProposalCreate(ctx, req.(*core.ProposalCreateContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_ProposalApprove_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.ProposalApproveContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).ProposalApprove(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/ProposalApprove", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).ProposalApprove(ctx, req.(*core.ProposalApproveContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_ProposalDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.ProposalDeleteContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).ProposalDelete(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/ProposalDelete", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).ProposalDelete(ctx, req.(*core.ProposalDeleteContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_BuyStorage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.BuyStorageContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).BuyStorage(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/BuyStorage", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).BuyStorage(ctx, req.(*core.BuyStorageContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_BuyStorageBytes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.BuyStorageBytesContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).BuyStorageBytes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/BuyStorageBytes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).BuyStorageBytes(ctx, req.(*core.BuyStorageBytesContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_SellStorage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.SellStorageContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).SellStorage(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/SellStorage", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).SellStorage(ctx, req.(*core.SellStorageContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_ExchangeCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.ExchangeCreateContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).ExchangeCreate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/ExchangeCreate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).ExchangeCreate(ctx, req.(*core.ExchangeCreateContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_ExchangeInject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.ExchangeInjectContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).ExchangeInject(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/ExchangeInject", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).ExchangeInject(ctx, req.(*core.ExchangeInjectContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_ExchangeWithdraw_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.ExchangeWithdrawContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).ExchangeWithdraw(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/ExchangeWithdraw", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).ExchangeWithdraw(ctx, req.(*core.ExchangeWithdrawContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_ExchangeTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.ExchangeTransactionContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).ExchangeTransaction(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/ExchangeTransaction", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).ExchangeTransaction(ctx, req.(*core.ExchangeTransactionContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_ListNodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EmptyMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).ListNodes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/ListNodes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).ListNodes(ctx, req.(*EmptyMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetAssetIssueByAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.Account) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetAssetIssueByAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/GetAssetIssueByAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetAssetIssueByAccount(ctx, req.(*core.Account)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetAccountNet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.Account) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetAccountNet(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/GetAccountNet", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetAccountNet(ctx, req.(*core.Account)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetAccountResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.Account) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetAccountResource(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/GetAccountResource", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetAccountResource(ctx, req.(*core.Account)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetAssetIssueByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BytesMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetAssetIssueByName(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/GetAssetIssueByName", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetAssetIssueByName(ctx, req.(*BytesMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetAssetIssueListByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BytesMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetAssetIssueListByName(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/GetAssetIssueListByName", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetAssetIssueListByName(ctx, req.(*BytesMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetAssetIssueById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BytesMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetAssetIssueById(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/GetAssetIssueById", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetAssetIssueById(ctx, req.(*BytesMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetNowBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EmptyMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetNowBlock(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/GetNowBlock", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetNowBlock(ctx, req.(*EmptyMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetNowBlock2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EmptyMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetNowBlock2(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/GetNowBlock2", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetNowBlock2(ctx, req.(*EmptyMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetBlockByNum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(NumberMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetBlockByNum(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/GetBlockByNum", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetBlockByNum(ctx, req.(*NumberMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetBlockByNum2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(NumberMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetBlockByNum2(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/GetBlockByNum2", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetBlockByNum2(ctx, req.(*NumberMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetTransactionCountByBlockNum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(NumberMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetTransactionCountByBlockNum(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/GetTransactionCountByBlockNum", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetTransactionCountByBlockNum(ctx, req.(*NumberMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetBlockById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BytesMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetBlockById(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/GetBlockById", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetBlockById(ctx, req.(*BytesMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetBlockByLimitNext_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BlockLimit) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetBlockByLimitNext(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/GetBlockByLimitNext", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetBlockByLimitNext(ctx, req.(*BlockLimit)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetBlockByLimitNext2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BlockLimit) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetBlockByLimitNext2(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/GetBlockByLimitNext2", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetBlockByLimitNext2(ctx, req.(*BlockLimit)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetBlockByLatestNum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(NumberMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetBlockByLatestNum(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/GetBlockByLatestNum", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetBlockByLatestNum(ctx, req.(*NumberMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetBlockByLatestNum2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(NumberMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetBlockByLatestNum2(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/GetBlockByLatestNum2", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetBlockByLatestNum2(ctx, req.(*NumberMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetTransactionById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BytesMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetTransactionById(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/GetTransactionById", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetTransactionById(ctx, req.(*BytesMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_DeployContract_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.CreateSmartContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).DeployContract(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/DeployContract", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).DeployContract(ctx, req.(*core.CreateSmartContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetContract_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BytesMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetContract(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/GetContract", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetContract(ctx, req.(*BytesMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_TriggerContract_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.TriggerSmartContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).TriggerContract(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/TriggerContract", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).TriggerContract(ctx, req.(*core.TriggerSmartContract)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_ListWitnesses_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EmptyMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).ListWitnesses(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/ListWitnesses", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).ListWitnesses(ctx, req.(*EmptyMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetDelegatedResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DelegatedResourceMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetDelegatedResource(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/GetDelegatedResource", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetDelegatedResource(ctx, req.(*DelegatedResourceMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetDelegatedResourceAccountIndex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BytesMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetDelegatedResourceAccountIndex(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/GetDelegatedResourceAccountIndex", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetDelegatedResourceAccountIndex(ctx, req.(*BytesMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_ListProposals_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EmptyMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).ListProposals(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/ListProposals", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).ListProposals(ctx, req.(*EmptyMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetPaginatedProposalList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PaginatedMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetPaginatedProposalList(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/GetPaginatedProposalList", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetPaginatedProposalList(ctx, req.(*PaginatedMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetProposalById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BytesMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetProposalById(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/GetProposalById", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetProposalById(ctx, req.(*BytesMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_ListExchanges_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EmptyMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).ListExchanges(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/ListExchanges", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).ListExchanges(ctx, req.(*EmptyMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetPaginatedExchangeList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PaginatedMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetPaginatedExchangeList(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/GetPaginatedExchangeList", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetPaginatedExchangeList(ctx, req.(*PaginatedMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetExchangeById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BytesMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetExchangeById(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/GetExchangeById", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetExchangeById(ctx, req.(*BytesMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetChainParameters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EmptyMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetChainParameters(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/GetChainParameters", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetChainParameters(ctx, req.(*EmptyMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetAssetIssueList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EmptyMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetAssetIssueList(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/GetAssetIssueList", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetAssetIssueList(ctx, req.(*EmptyMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetPaginatedAssetIssueList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PaginatedMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetPaginatedAssetIssueList(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/GetPaginatedAssetIssueList", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetPaginatedAssetIssueList(ctx, req.(*PaginatedMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_TotalTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EmptyMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).TotalTransaction(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/TotalTransaction", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).TotalTransaction(ctx, req.(*EmptyMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetNextMaintenanceTime_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EmptyMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetNextMaintenanceTime(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/GetNextMaintenanceTime", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetNextMaintenanceTime(ctx, req.(*EmptyMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetTransactionSign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.TransactionSign) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetTransactionSign(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/GetTransactionSign", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetTransactionSign(ctx, req.(*core.TransactionSign)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetTransactionSign2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.TransactionSign) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetTransactionSign2(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/GetTransactionSign2", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetTransactionSign2(ctx, req.(*core.TransactionSign)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_CreateAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BytesMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).CreateAddress(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/CreateAddress", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).CreateAddress(ctx, req.(*BytesMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_EasyTransfer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EasyTransferMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).EasyTransfer(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/EasyTransfer", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).EasyTransfer(ctx, req.(*EasyTransferMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_EasyTransferByPrivate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EasyTransferByPrivateMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).EasyTransferByPrivate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/EasyTransferByPrivate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).EasyTransferByPrivate(ctx, req.(*EasyTransferByPrivateMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GenerateAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EmptyMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GenerateAddress(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/GenerateAddress", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GenerateAddress(ctx, req.(*EmptyMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetTransactionInfoById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BytesMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetTransactionInfoById(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Wallet/GetTransactionInfoById", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetTransactionInfoById(ctx, req.(*BytesMessage)) - } - return interceptor(ctx, in, info, handler) -} - -var _Wallet_serviceDesc = grpc.ServiceDesc{ - ServiceName: "protocol.Wallet", - HandlerType: (*WalletServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetAccount", - Handler: _Wallet_GetAccount_Handler, - }, - { - MethodName: "GetAccountById", - Handler: _Wallet_GetAccountById_Handler, - }, - { - MethodName: "CreateTransaction", - Handler: _Wallet_CreateTransaction_Handler, - }, - { - MethodName: "CreateTransaction2", - Handler: _Wallet_CreateTransaction2_Handler, - }, - { - MethodName: "BroadcastTransaction", - Handler: _Wallet_BroadcastTransaction_Handler, - }, - { - MethodName: "UpdateAccount", - Handler: _Wallet_UpdateAccount_Handler, - }, - { - MethodName: "SetAccountId", - Handler: _Wallet_SetAccountId_Handler, - }, - { - MethodName: "UpdateAccount2", - Handler: _Wallet_UpdateAccount2_Handler, - }, - { - MethodName: "VoteWitnessAccount", - Handler: _Wallet_VoteWitnessAccount_Handler, - }, - { - MethodName: "UpdateSetting", - Handler: _Wallet_UpdateSetting_Handler, - }, - { - MethodName: "UpdateEnergyLimit", - Handler: _Wallet_UpdateEnergyLimit_Handler, - }, - { - MethodName: "VoteWitnessAccount2", - Handler: _Wallet_VoteWitnessAccount2_Handler, - }, - { - MethodName: "CreateAssetIssue", - Handler: _Wallet_CreateAssetIssue_Handler, - }, - { - MethodName: "CreateAssetIssue2", - Handler: _Wallet_CreateAssetIssue2_Handler, - }, - { - MethodName: "UpdateWitness", - Handler: _Wallet_UpdateWitness_Handler, - }, - { - MethodName: "UpdateWitness2", - Handler: _Wallet_UpdateWitness2_Handler, - }, - { - MethodName: "CreateAccount", - Handler: _Wallet_CreateAccount_Handler, - }, - { - MethodName: "CreateAccount2", - Handler: _Wallet_CreateAccount2_Handler, - }, - { - MethodName: "CreateWitness", - Handler: _Wallet_CreateWitness_Handler, - }, - { - MethodName: "CreateWitness2", - Handler: _Wallet_CreateWitness2_Handler, - }, - { - MethodName: "TransferAsset", - Handler: _Wallet_TransferAsset_Handler, - }, - { - MethodName: "TransferAsset2", - Handler: _Wallet_TransferAsset2_Handler, - }, - { - MethodName: "ParticipateAssetIssue", - Handler: _Wallet_ParticipateAssetIssue_Handler, - }, - { - MethodName: "ParticipateAssetIssue2", - Handler: _Wallet_ParticipateAssetIssue2_Handler, - }, - { - MethodName: "FreezeBalance", - Handler: _Wallet_FreezeBalance_Handler, - }, - { - MethodName: "FreezeBalance2", - Handler: _Wallet_FreezeBalance2_Handler, - }, - { - MethodName: "UnfreezeBalance", - Handler: _Wallet_UnfreezeBalance_Handler, - }, - { - MethodName: "UnfreezeBalance2", - Handler: _Wallet_UnfreezeBalance2_Handler, - }, - { - MethodName: "UnfreezeAsset", - Handler: _Wallet_UnfreezeAsset_Handler, - }, - { - MethodName: "UnfreezeAsset2", - Handler: _Wallet_UnfreezeAsset2_Handler, - }, - { - MethodName: "WithdrawBalance", - Handler: _Wallet_WithdrawBalance_Handler, - }, - { - MethodName: "WithdrawBalance2", - Handler: _Wallet_WithdrawBalance2_Handler, - }, - { - MethodName: "UpdateAsset", - Handler: _Wallet_UpdateAsset_Handler, - }, - { - MethodName: "UpdateAsset2", - Handler: _Wallet_UpdateAsset2_Handler, - }, - { - MethodName: "ProposalCreate", - Handler: _Wallet_ProposalCreate_Handler, - }, - { - MethodName: "ProposalApprove", - Handler: _Wallet_ProposalApprove_Handler, - }, - { - MethodName: "ProposalDelete", - Handler: _Wallet_ProposalDelete_Handler, - }, - { - MethodName: "BuyStorage", - Handler: _Wallet_BuyStorage_Handler, - }, - { - MethodName: "BuyStorageBytes", - Handler: _Wallet_BuyStorageBytes_Handler, - }, - { - MethodName: "SellStorage", - Handler: _Wallet_SellStorage_Handler, - }, - { - MethodName: "ExchangeCreate", - Handler: _Wallet_ExchangeCreate_Handler, - }, - { - MethodName: "ExchangeInject", - Handler: _Wallet_ExchangeInject_Handler, - }, - { - MethodName: "ExchangeWithdraw", - Handler: _Wallet_ExchangeWithdraw_Handler, - }, - { - MethodName: "ExchangeTransaction", - Handler: _Wallet_ExchangeTransaction_Handler, - }, - { - MethodName: "ListNodes", - Handler: _Wallet_ListNodes_Handler, - }, - { - MethodName: "GetAssetIssueByAccount", - Handler: _Wallet_GetAssetIssueByAccount_Handler, - }, - { - MethodName: "GetAccountNet", - Handler: _Wallet_GetAccountNet_Handler, - }, - { - MethodName: "GetAccountResource", - Handler: _Wallet_GetAccountResource_Handler, - }, - { - MethodName: "GetAssetIssueByName", - Handler: _Wallet_GetAssetIssueByName_Handler, - }, - { - MethodName: "GetAssetIssueListByName", - Handler: _Wallet_GetAssetIssueListByName_Handler, - }, - { - MethodName: "GetAssetIssueById", - Handler: _Wallet_GetAssetIssueById_Handler, - }, - { - MethodName: "GetNowBlock", - Handler: _Wallet_GetNowBlock_Handler, - }, - { - MethodName: "GetNowBlock2", - Handler: _Wallet_GetNowBlock2_Handler, - }, - { - MethodName: "GetBlockByNum", - Handler: _Wallet_GetBlockByNum_Handler, - }, - { - MethodName: "GetBlockByNum2", - Handler: _Wallet_GetBlockByNum2_Handler, - }, - { - MethodName: "GetTransactionCountByBlockNum", - Handler: _Wallet_GetTransactionCountByBlockNum_Handler, - }, - { - MethodName: "GetBlockById", - Handler: _Wallet_GetBlockById_Handler, - }, - { - MethodName: "GetBlockByLimitNext", - Handler: _Wallet_GetBlockByLimitNext_Handler, - }, - { - MethodName: "GetBlockByLimitNext2", - Handler: _Wallet_GetBlockByLimitNext2_Handler, - }, - { - MethodName: "GetBlockByLatestNum", - Handler: _Wallet_GetBlockByLatestNum_Handler, - }, - { - MethodName: "GetBlockByLatestNum2", - Handler: _Wallet_GetBlockByLatestNum2_Handler, - }, - { - MethodName: "GetTransactionById", - Handler: _Wallet_GetTransactionById_Handler, - }, - { - MethodName: "DeployContract", - Handler: _Wallet_DeployContract_Handler, - }, - { - MethodName: "GetContract", - Handler: _Wallet_GetContract_Handler, - }, - { - MethodName: "TriggerContract", - Handler: _Wallet_TriggerContract_Handler, - }, - { - MethodName: "ListWitnesses", - Handler: _Wallet_ListWitnesses_Handler, - }, - { - MethodName: "GetDelegatedResource", - Handler: _Wallet_GetDelegatedResource_Handler, - }, - { - MethodName: "GetDelegatedResourceAccountIndex", - Handler: _Wallet_GetDelegatedResourceAccountIndex_Handler, - }, - { - MethodName: "ListProposals", - Handler: _Wallet_ListProposals_Handler, - }, - { - MethodName: "GetPaginatedProposalList", - Handler: _Wallet_GetPaginatedProposalList_Handler, - }, - { - MethodName: "GetProposalById", - Handler: _Wallet_GetProposalById_Handler, - }, - { - MethodName: "ListExchanges", - Handler: _Wallet_ListExchanges_Handler, - }, - { - MethodName: "GetPaginatedExchangeList", - Handler: _Wallet_GetPaginatedExchangeList_Handler, - }, - { - MethodName: "GetExchangeById", - Handler: _Wallet_GetExchangeById_Handler, - }, - { - MethodName: "GetChainParameters", - Handler: _Wallet_GetChainParameters_Handler, - }, - { - MethodName: "GetAssetIssueList", - Handler: _Wallet_GetAssetIssueList_Handler, - }, - { - MethodName: "GetPaginatedAssetIssueList", - Handler: _Wallet_GetPaginatedAssetIssueList_Handler, - }, - { - MethodName: "TotalTransaction", - Handler: _Wallet_TotalTransaction_Handler, - }, - { - MethodName: "GetNextMaintenanceTime", - Handler: _Wallet_GetNextMaintenanceTime_Handler, - }, - { - MethodName: "GetTransactionSign", - Handler: _Wallet_GetTransactionSign_Handler, - }, - { - MethodName: "GetTransactionSign2", - Handler: _Wallet_GetTransactionSign2_Handler, - }, - { - MethodName: "CreateAddress", - Handler: _Wallet_CreateAddress_Handler, - }, - { - MethodName: "EasyTransfer", - Handler: _Wallet_EasyTransfer_Handler, - }, - { - MethodName: "EasyTransferByPrivate", - Handler: _Wallet_EasyTransferByPrivate_Handler, - }, - { - MethodName: "GenerateAddress", - Handler: _Wallet_GenerateAddress_Handler, - }, - { - MethodName: "GetTransactionInfoById", - Handler: _Wallet_GetTransactionInfoById_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "protos/protocol/api/api.proto", -} - -// WalletSolidityClient is the client API for WalletSolidity service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type WalletSolidityClient interface { - GetAccount(ctx context.Context, in *core.Account, opts ...grpc.CallOption) (*core.Account, error) - GetAccountById(ctx context.Context, in *core.Account, opts ...grpc.CallOption) (*core.Account, error) - ListWitnesses(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*WitnessList, error) - GetAssetIssueList(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*AssetIssueList, error) - GetPaginatedAssetIssueList(ctx context.Context, in *PaginatedMessage, opts ...grpc.CallOption) (*AssetIssueList, error) - //Please use GetNowBlock2 instead of this function. - GetNowBlock(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*core.Block, error) - //Use this function instead of GetNowBlock. - GetNowBlock2(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*BlockExtention, error) - //Please use GetBlockByNum2 instead of this function. - GetBlockByNum(ctx context.Context, in *NumberMessage, opts ...grpc.CallOption) (*core.Block, error) - //Use this function instead of GetBlockByNum. - GetBlockByNum2(ctx context.Context, in *NumberMessage, opts ...grpc.CallOption) (*BlockExtention, error) - GetTransactionCountByBlockNum(ctx context.Context, in *NumberMessage, opts ...grpc.CallOption) (*NumberMessage, error) - GetDelegatedResource(ctx context.Context, in *DelegatedResourceMessage, opts ...grpc.CallOption) (*DelegatedResourceList, error) - GetDelegatedResourceAccountIndex(ctx context.Context, in *BytesMessage, opts ...grpc.CallOption) (*core.DelegatedResourceAccountIndex, error) - GetExchangeById(ctx context.Context, in *BytesMessage, opts ...grpc.CallOption) (*core.Exchange, error) - ListExchanges(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*ExchangeList, error) - GetTransactionById(ctx context.Context, in *BytesMessage, opts ...grpc.CallOption) (*core.Transaction, error) - GetTransactionInfoById(ctx context.Context, in *BytesMessage, opts ...grpc.CallOption) (*core.TransactionInfo, error) - //Warning: do not invoke this interface provided by others. - GenerateAddress(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*AddressPrKeyPairMessage, error) -} - -type walletSolidityClient struct { - cc *grpc.ClientConn -} - -func NewWalletSolidityClient(cc *grpc.ClientConn) WalletSolidityClient { - return &walletSolidityClient{cc} -} - -func (c *walletSolidityClient) GetAccount(ctx context.Context, in *core.Account, opts ...grpc.CallOption) (*core.Account, error) { - out := new(core.Account) - err := c.cc.Invoke(ctx, "/protocol.WalletSolidity/GetAccount", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletSolidityClient) GetAccountById(ctx context.Context, in *core.Account, opts ...grpc.CallOption) (*core.Account, error) { - out := new(core.Account) - err := c.cc.Invoke(ctx, "/protocol.WalletSolidity/GetAccountById", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletSolidityClient) ListWitnesses(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*WitnessList, error) { - out := new(WitnessList) - err := c.cc.Invoke(ctx, "/protocol.WalletSolidity/ListWitnesses", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletSolidityClient) GetAssetIssueList(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*AssetIssueList, error) { - out := new(AssetIssueList) - err := c.cc.Invoke(ctx, "/protocol.WalletSolidity/GetAssetIssueList", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletSolidityClient) GetPaginatedAssetIssueList(ctx context.Context, in *PaginatedMessage, opts ...grpc.CallOption) (*AssetIssueList, error) { - out := new(AssetIssueList) - err := c.cc.Invoke(ctx, "/protocol.WalletSolidity/GetPaginatedAssetIssueList", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletSolidityClient) GetNowBlock(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*core.Block, error) { - out := new(core.Block) - err := c.cc.Invoke(ctx, "/protocol.WalletSolidity/GetNowBlock", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletSolidityClient) GetNowBlock2(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*BlockExtention, error) { - out := new(BlockExtention) - err := c.cc.Invoke(ctx, "/protocol.WalletSolidity/GetNowBlock2", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletSolidityClient) GetBlockByNum(ctx context.Context, in *NumberMessage, opts ...grpc.CallOption) (*core.Block, error) { - out := new(core.Block) - err := c.cc.Invoke(ctx, "/protocol.WalletSolidity/GetBlockByNum", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletSolidityClient) GetBlockByNum2(ctx context.Context, in *NumberMessage, opts ...grpc.CallOption) (*BlockExtention, error) { - out := new(BlockExtention) - err := c.cc.Invoke(ctx, "/protocol.WalletSolidity/GetBlockByNum2", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletSolidityClient) GetTransactionCountByBlockNum(ctx context.Context, in *NumberMessage, opts ...grpc.CallOption) (*NumberMessage, error) { - out := new(NumberMessage) - err := c.cc.Invoke(ctx, "/protocol.WalletSolidity/GetTransactionCountByBlockNum", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletSolidityClient) GetDelegatedResource(ctx context.Context, in *DelegatedResourceMessage, opts ...grpc.CallOption) (*DelegatedResourceList, error) { - out := new(DelegatedResourceList) - err := c.cc.Invoke(ctx, "/protocol.WalletSolidity/GetDelegatedResource", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletSolidityClient) GetDelegatedResourceAccountIndex(ctx context.Context, in *BytesMessage, opts ...grpc.CallOption) (*core.DelegatedResourceAccountIndex, error) { - out := new(core.DelegatedResourceAccountIndex) - err := c.cc.Invoke(ctx, "/protocol.WalletSolidity/GetDelegatedResourceAccountIndex", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletSolidityClient) GetExchangeById(ctx context.Context, in *BytesMessage, opts ...grpc.CallOption) (*core.Exchange, error) { - out := new(core.Exchange) - err := c.cc.Invoke(ctx, "/protocol.WalletSolidity/GetExchangeById", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletSolidityClient) ListExchanges(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*ExchangeList, error) { - out := new(ExchangeList) - err := c.cc.Invoke(ctx, "/protocol.WalletSolidity/ListExchanges", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletSolidityClient) GetTransactionById(ctx context.Context, in *BytesMessage, opts ...grpc.CallOption) (*core.Transaction, error) { - out := new(core.Transaction) - err := c.cc.Invoke(ctx, "/protocol.WalletSolidity/GetTransactionById", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletSolidityClient) GetTransactionInfoById(ctx context.Context, in *BytesMessage, opts ...grpc.CallOption) (*core.TransactionInfo, error) { - out := new(core.TransactionInfo) - err := c.cc.Invoke(ctx, "/protocol.WalletSolidity/GetTransactionInfoById", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletSolidityClient) GenerateAddress(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*AddressPrKeyPairMessage, error) { - out := new(AddressPrKeyPairMessage) - err := c.cc.Invoke(ctx, "/protocol.WalletSolidity/GenerateAddress", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// WalletSolidityServer is the server API for WalletSolidity service. -type WalletSolidityServer interface { - GetAccount(context.Context, *core.Account) (*core.Account, error) - GetAccountById(context.Context, *core.Account) (*core.Account, error) - ListWitnesses(context.Context, *EmptyMessage) (*WitnessList, error) - GetAssetIssueList(context.Context, *EmptyMessage) (*AssetIssueList, error) - GetPaginatedAssetIssueList(context.Context, *PaginatedMessage) (*AssetIssueList, error) - //Please use GetNowBlock2 instead of this function. - GetNowBlock(context.Context, *EmptyMessage) (*core.Block, error) - //Use this function instead of GetNowBlock. - GetNowBlock2(context.Context, *EmptyMessage) (*BlockExtention, error) - //Please use GetBlockByNum2 instead of this function. - GetBlockByNum(context.Context, *NumberMessage) (*core.Block, error) - //Use this function instead of GetBlockByNum. - GetBlockByNum2(context.Context, *NumberMessage) (*BlockExtention, error) - GetTransactionCountByBlockNum(context.Context, *NumberMessage) (*NumberMessage, error) - GetDelegatedResource(context.Context, *DelegatedResourceMessage) (*DelegatedResourceList, error) - GetDelegatedResourceAccountIndex(context.Context, *BytesMessage) (*core.DelegatedResourceAccountIndex, error) - GetExchangeById(context.Context, *BytesMessage) (*core.Exchange, error) - ListExchanges(context.Context, *EmptyMessage) (*ExchangeList, error) - GetTransactionById(context.Context, *BytesMessage) (*core.Transaction, error) - GetTransactionInfoById(context.Context, *BytesMessage) (*core.TransactionInfo, error) - //Warning: do not invoke this interface provided by others. - GenerateAddress(context.Context, *EmptyMessage) (*AddressPrKeyPairMessage, error) -} - -// UnimplementedWalletSolidityServer can be embedded to have forward compatible implementations. -type UnimplementedWalletSolidityServer struct { -} - -func (*UnimplementedWalletSolidityServer) GetAccount(ctx context.Context, req *core.Account) (*core.Account, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAccount not implemented") -} -func (*UnimplementedWalletSolidityServer) GetAccountById(ctx context.Context, req *core.Account) (*core.Account, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAccountById not implemented") -} -func (*UnimplementedWalletSolidityServer) ListWitnesses(ctx context.Context, req *EmptyMessage) (*WitnessList, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListWitnesses not implemented") -} -func (*UnimplementedWalletSolidityServer) GetAssetIssueList(ctx context.Context, req *EmptyMessage) (*AssetIssueList, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAssetIssueList not implemented") -} -func (*UnimplementedWalletSolidityServer) GetPaginatedAssetIssueList(ctx context.Context, req *PaginatedMessage) (*AssetIssueList, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPaginatedAssetIssueList not implemented") -} -func (*UnimplementedWalletSolidityServer) GetNowBlock(ctx context.Context, req *EmptyMessage) (*core.Block, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetNowBlock not implemented") -} -func (*UnimplementedWalletSolidityServer) GetNowBlock2(ctx context.Context, req *EmptyMessage) (*BlockExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetNowBlock2 not implemented") -} -func (*UnimplementedWalletSolidityServer) GetBlockByNum(ctx context.Context, req *NumberMessage) (*core.Block, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBlockByNum not implemented") -} -func (*UnimplementedWalletSolidityServer) GetBlockByNum2(ctx context.Context, req *NumberMessage) (*BlockExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBlockByNum2 not implemented") -} -func (*UnimplementedWalletSolidityServer) GetTransactionCountByBlockNum(ctx context.Context, req *NumberMessage) (*NumberMessage, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTransactionCountByBlockNum not implemented") -} -func (*UnimplementedWalletSolidityServer) GetDelegatedResource(ctx context.Context, req *DelegatedResourceMessage) (*DelegatedResourceList, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetDelegatedResource not implemented") -} -func (*UnimplementedWalletSolidityServer) GetDelegatedResourceAccountIndex(ctx context.Context, req *BytesMessage) (*core.DelegatedResourceAccountIndex, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetDelegatedResourceAccountIndex not implemented") -} -func (*UnimplementedWalletSolidityServer) GetExchangeById(ctx context.Context, req *BytesMessage) (*core.Exchange, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetExchangeById not implemented") -} -func (*UnimplementedWalletSolidityServer) ListExchanges(ctx context.Context, req *EmptyMessage) (*ExchangeList, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListExchanges not implemented") -} -func (*UnimplementedWalletSolidityServer) GetTransactionById(ctx context.Context, req *BytesMessage) (*core.Transaction, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTransactionById not implemented") -} -func (*UnimplementedWalletSolidityServer) GetTransactionInfoById(ctx context.Context, req *BytesMessage) (*core.TransactionInfo, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTransactionInfoById not implemented") -} -func (*UnimplementedWalletSolidityServer) GenerateAddress(ctx context.Context, req *EmptyMessage) (*AddressPrKeyPairMessage, error) { - return nil, status.Errorf(codes.Unimplemented, "method GenerateAddress not implemented") -} - -func RegisterWalletSolidityServer(s *grpc.Server, srv WalletSolidityServer) { - s.RegisterService(&_WalletSolidity_serviceDesc, srv) -} - -func _WalletSolidity_GetAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.Account) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletSolidityServer).GetAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.WalletSolidity/GetAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletSolidityServer).GetAccount(ctx, req.(*core.Account)) - } - return interceptor(ctx, in, info, handler) -} - -func _WalletSolidity_GetAccountById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(core.Account) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletSolidityServer).GetAccountById(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.WalletSolidity/GetAccountById", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletSolidityServer).GetAccountById(ctx, req.(*core.Account)) - } - return interceptor(ctx, in, info, handler) -} - -func _WalletSolidity_ListWitnesses_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EmptyMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletSolidityServer).ListWitnesses(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.WalletSolidity/ListWitnesses", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletSolidityServer).ListWitnesses(ctx, req.(*EmptyMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _WalletSolidity_GetAssetIssueList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EmptyMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletSolidityServer).GetAssetIssueList(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.WalletSolidity/GetAssetIssueList", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletSolidityServer).GetAssetIssueList(ctx, req.(*EmptyMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _WalletSolidity_GetPaginatedAssetIssueList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PaginatedMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletSolidityServer).GetPaginatedAssetIssueList(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.WalletSolidity/GetPaginatedAssetIssueList", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletSolidityServer).GetPaginatedAssetIssueList(ctx, req.(*PaginatedMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _WalletSolidity_GetNowBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EmptyMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletSolidityServer).GetNowBlock(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.WalletSolidity/GetNowBlock", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletSolidityServer).GetNowBlock(ctx, req.(*EmptyMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _WalletSolidity_GetNowBlock2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EmptyMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletSolidityServer).GetNowBlock2(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.WalletSolidity/GetNowBlock2", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletSolidityServer).GetNowBlock2(ctx, req.(*EmptyMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _WalletSolidity_GetBlockByNum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(NumberMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletSolidityServer).GetBlockByNum(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.WalletSolidity/GetBlockByNum", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletSolidityServer).GetBlockByNum(ctx, req.(*NumberMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _WalletSolidity_GetBlockByNum2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(NumberMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletSolidityServer).GetBlockByNum2(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.WalletSolidity/GetBlockByNum2", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletSolidityServer).GetBlockByNum2(ctx, req.(*NumberMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _WalletSolidity_GetTransactionCountByBlockNum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(NumberMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletSolidityServer).GetTransactionCountByBlockNum(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.WalletSolidity/GetTransactionCountByBlockNum", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletSolidityServer).GetTransactionCountByBlockNum(ctx, req.(*NumberMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _WalletSolidity_GetDelegatedResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DelegatedResourceMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletSolidityServer).GetDelegatedResource(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.WalletSolidity/GetDelegatedResource", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletSolidityServer).GetDelegatedResource(ctx, req.(*DelegatedResourceMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _WalletSolidity_GetDelegatedResourceAccountIndex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BytesMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletSolidityServer).GetDelegatedResourceAccountIndex(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.WalletSolidity/GetDelegatedResourceAccountIndex", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletSolidityServer).GetDelegatedResourceAccountIndex(ctx, req.(*BytesMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _WalletSolidity_GetExchangeById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BytesMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletSolidityServer).GetExchangeById(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.WalletSolidity/GetExchangeById", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletSolidityServer).GetExchangeById(ctx, req.(*BytesMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _WalletSolidity_ListExchanges_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EmptyMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletSolidityServer).ListExchanges(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.WalletSolidity/ListExchanges", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletSolidityServer).ListExchanges(ctx, req.(*EmptyMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _WalletSolidity_GetTransactionById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BytesMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletSolidityServer).GetTransactionById(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.WalletSolidity/GetTransactionById", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletSolidityServer).GetTransactionById(ctx, req.(*BytesMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _WalletSolidity_GetTransactionInfoById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BytesMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletSolidityServer).GetTransactionInfoById(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.WalletSolidity/GetTransactionInfoById", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletSolidityServer).GetTransactionInfoById(ctx, req.(*BytesMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _WalletSolidity_GenerateAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EmptyMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletSolidityServer).GenerateAddress(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.WalletSolidity/GenerateAddress", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletSolidityServer).GenerateAddress(ctx, req.(*EmptyMessage)) - } - return interceptor(ctx, in, info, handler) -} - -var _WalletSolidity_serviceDesc = grpc.ServiceDesc{ - ServiceName: "protocol.WalletSolidity", - HandlerType: (*WalletSolidityServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetAccount", - Handler: _WalletSolidity_GetAccount_Handler, - }, - { - MethodName: "GetAccountById", - Handler: _WalletSolidity_GetAccountById_Handler, - }, - { - MethodName: "ListWitnesses", - Handler: _WalletSolidity_ListWitnesses_Handler, - }, - { - MethodName: "GetAssetIssueList", - Handler: _WalletSolidity_GetAssetIssueList_Handler, - }, - { - MethodName: "GetPaginatedAssetIssueList", - Handler: _WalletSolidity_GetPaginatedAssetIssueList_Handler, - }, - { - MethodName: "GetNowBlock", - Handler: _WalletSolidity_GetNowBlock_Handler, - }, - { - MethodName: "GetNowBlock2", - Handler: _WalletSolidity_GetNowBlock2_Handler, - }, - { - MethodName: "GetBlockByNum", - Handler: _WalletSolidity_GetBlockByNum_Handler, - }, - { - MethodName: "GetBlockByNum2", - Handler: _WalletSolidity_GetBlockByNum2_Handler, - }, - { - MethodName: "GetTransactionCountByBlockNum", - Handler: _WalletSolidity_GetTransactionCountByBlockNum_Handler, - }, - { - MethodName: "GetDelegatedResource", - Handler: _WalletSolidity_GetDelegatedResource_Handler, - }, - { - MethodName: "GetDelegatedResourceAccountIndex", - Handler: _WalletSolidity_GetDelegatedResourceAccountIndex_Handler, - }, - { - MethodName: "GetExchangeById", - Handler: _WalletSolidity_GetExchangeById_Handler, - }, - { - MethodName: "ListExchanges", - Handler: _WalletSolidity_ListExchanges_Handler, - }, - { - MethodName: "GetTransactionById", - Handler: _WalletSolidity_GetTransactionById_Handler, - }, - { - MethodName: "GetTransactionInfoById", - Handler: _WalletSolidity_GetTransactionInfoById_Handler, - }, - { - MethodName: "GenerateAddress", - Handler: _WalletSolidity_GenerateAddress_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "protos/protocol/api/api.proto", -} - -// WalletExtensionClient is the client API for WalletExtension service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type WalletExtensionClient interface { - //Please use GetTransactionsFromThis2 instead of this function. - GetTransactionsFromThis(ctx context.Context, in *AccountPaginated, opts ...grpc.CallOption) (*TransactionList, error) - //Use this function instead of GetTransactionsFromThis. - GetTransactionsFromThis2(ctx context.Context, in *AccountPaginated, opts ...grpc.CallOption) (*TransactionListExtention, error) - //Please use GetTransactionsToThis2 instead of this function. - GetTransactionsToThis(ctx context.Context, in *AccountPaginated, opts ...grpc.CallOption) (*TransactionList, error) - //Use this function instead of GetTransactionsToThis. - GetTransactionsToThis2(ctx context.Context, in *AccountPaginated, opts ...grpc.CallOption) (*TransactionListExtention, error) -} - -type walletExtensionClient struct { - cc *grpc.ClientConn -} - -func NewWalletExtensionClient(cc *grpc.ClientConn) WalletExtensionClient { - return &walletExtensionClient{cc} -} - -func (c *walletExtensionClient) GetTransactionsFromThis(ctx context.Context, in *AccountPaginated, opts ...grpc.CallOption) (*TransactionList, error) { - out := new(TransactionList) - err := c.cc.Invoke(ctx, "/protocol.WalletExtension/GetTransactionsFromThis", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletExtensionClient) GetTransactionsFromThis2(ctx context.Context, in *AccountPaginated, opts ...grpc.CallOption) (*TransactionListExtention, error) { - out := new(TransactionListExtention) - err := c.cc.Invoke(ctx, "/protocol.WalletExtension/GetTransactionsFromThis2", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletExtensionClient) GetTransactionsToThis(ctx context.Context, in *AccountPaginated, opts ...grpc.CallOption) (*TransactionList, error) { - out := new(TransactionList) - err := c.cc.Invoke(ctx, "/protocol.WalletExtension/GetTransactionsToThis", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletExtensionClient) GetTransactionsToThis2(ctx context.Context, in *AccountPaginated, opts ...grpc.CallOption) (*TransactionListExtention, error) { - out := new(TransactionListExtention) - err := c.cc.Invoke(ctx, "/protocol.WalletExtension/GetTransactionsToThis2", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// WalletExtensionServer is the server API for WalletExtension service. -type WalletExtensionServer interface { - //Please use GetTransactionsFromThis2 instead of this function. - GetTransactionsFromThis(context.Context, *AccountPaginated) (*TransactionList, error) - //Use this function instead of GetTransactionsFromThis. - GetTransactionsFromThis2(context.Context, *AccountPaginated) (*TransactionListExtention, error) - //Please use GetTransactionsToThis2 instead of this function. - GetTransactionsToThis(context.Context, *AccountPaginated) (*TransactionList, error) - //Use this function instead of GetTransactionsToThis. - GetTransactionsToThis2(context.Context, *AccountPaginated) (*TransactionListExtention, error) -} - -// UnimplementedWalletExtensionServer can be embedded to have forward compatible implementations. -type UnimplementedWalletExtensionServer struct { -} - -func (*UnimplementedWalletExtensionServer) GetTransactionsFromThis(ctx context.Context, req *AccountPaginated) (*TransactionList, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTransactionsFromThis not implemented") -} -func (*UnimplementedWalletExtensionServer) GetTransactionsFromThis2(ctx context.Context, req *AccountPaginated) (*TransactionListExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTransactionsFromThis2 not implemented") -} -func (*UnimplementedWalletExtensionServer) GetTransactionsToThis(ctx context.Context, req *AccountPaginated) (*TransactionList, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTransactionsToThis not implemented") -} -func (*UnimplementedWalletExtensionServer) GetTransactionsToThis2(ctx context.Context, req *AccountPaginated) (*TransactionListExtention, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTransactionsToThis2 not implemented") -} - -func RegisterWalletExtensionServer(s *grpc.Server, srv WalletExtensionServer) { - s.RegisterService(&_WalletExtension_serviceDesc, srv) -} - -func _WalletExtension_GetTransactionsFromThis_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AccountPaginated) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletExtensionServer).GetTransactionsFromThis(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.WalletExtension/GetTransactionsFromThis", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletExtensionServer).GetTransactionsFromThis(ctx, req.(*AccountPaginated)) - } - return interceptor(ctx, in, info, handler) -} - -func _WalletExtension_GetTransactionsFromThis2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AccountPaginated) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletExtensionServer).GetTransactionsFromThis2(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.WalletExtension/GetTransactionsFromThis2", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletExtensionServer).GetTransactionsFromThis2(ctx, req.(*AccountPaginated)) - } - return interceptor(ctx, in, info, handler) -} - -func _WalletExtension_GetTransactionsToThis_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AccountPaginated) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletExtensionServer).GetTransactionsToThis(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.WalletExtension/GetTransactionsToThis", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletExtensionServer).GetTransactionsToThis(ctx, req.(*AccountPaginated)) - } - return interceptor(ctx, in, info, handler) -} - -func _WalletExtension_GetTransactionsToThis2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AccountPaginated) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletExtensionServer).GetTransactionsToThis2(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.WalletExtension/GetTransactionsToThis2", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletExtensionServer).GetTransactionsToThis2(ctx, req.(*AccountPaginated)) - } - return interceptor(ctx, in, info, handler) -} - -var _WalletExtension_serviceDesc = grpc.ServiceDesc{ - ServiceName: "protocol.WalletExtension", - HandlerType: (*WalletExtensionServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetTransactionsFromThis", - Handler: _WalletExtension_GetTransactionsFromThis_Handler, - }, - { - MethodName: "GetTransactionsFromThis2", - Handler: _WalletExtension_GetTransactionsFromThis2_Handler, - }, - { - MethodName: "GetTransactionsToThis", - Handler: _WalletExtension_GetTransactionsToThis_Handler, - }, - { - MethodName: "GetTransactionsToThis2", - Handler: _WalletExtension_GetTransactionsToThis2_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "protos/protocol/api/api.proto", -} - -// DatabaseClient is the client API for Database service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type DatabaseClient interface { - // for tapos - GetBlockReference(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*BlockReference, error) - GetDynamicProperties(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*core.DynamicProperties, error) - GetNowBlock(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*core.Block, error) - GetBlockByNum(ctx context.Context, in *NumberMessage, opts ...grpc.CallOption) (*core.Block, error) -} - -type databaseClient struct { - cc *grpc.ClientConn -} - -func NewDatabaseClient(cc *grpc.ClientConn) DatabaseClient { - return &databaseClient{cc} -} - -func (c *databaseClient) GetBlockReference(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*BlockReference, error) { - out := new(BlockReference) - err := c.cc.Invoke(ctx, "/protocol.Database/getBlockReference", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *databaseClient) GetDynamicProperties(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*core.DynamicProperties, error) { - out := new(core.DynamicProperties) - err := c.cc.Invoke(ctx, "/protocol.Database/GetDynamicProperties", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *databaseClient) GetNowBlock(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*core.Block, error) { - out := new(core.Block) - err := c.cc.Invoke(ctx, "/protocol.Database/GetNowBlock", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *databaseClient) GetBlockByNum(ctx context.Context, in *NumberMessage, opts ...grpc.CallOption) (*core.Block, error) { - out := new(core.Block) - err := c.cc.Invoke(ctx, "/protocol.Database/GetBlockByNum", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// DatabaseServer is the server API for Database service. -type DatabaseServer interface { - // for tapos - GetBlockReference(context.Context, *EmptyMessage) (*BlockReference, error) - GetDynamicProperties(context.Context, *EmptyMessage) (*core.DynamicProperties, error) - GetNowBlock(context.Context, *EmptyMessage) (*core.Block, error) - GetBlockByNum(context.Context, *NumberMessage) (*core.Block, error) -} - -// UnimplementedDatabaseServer can be embedded to have forward compatible implementations. -type UnimplementedDatabaseServer struct { -} - -func (*UnimplementedDatabaseServer) GetBlockReference(ctx context.Context, req *EmptyMessage) (*BlockReference, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBlockReference not implemented") -} -func (*UnimplementedDatabaseServer) GetDynamicProperties(ctx context.Context, req *EmptyMessage) (*core.DynamicProperties, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetDynamicProperties not implemented") -} -func (*UnimplementedDatabaseServer) GetNowBlock(ctx context.Context, req *EmptyMessage) (*core.Block, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetNowBlock not implemented") -} -func (*UnimplementedDatabaseServer) GetBlockByNum(ctx context.Context, req *NumberMessage) (*core.Block, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBlockByNum not implemented") -} - -func RegisterDatabaseServer(s *grpc.Server, srv DatabaseServer) { - s.RegisterService(&_Database_serviceDesc, srv) -} - -func _Database_GetBlockReference_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EmptyMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DatabaseServer).GetBlockReference(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Database/GetBlockReference", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DatabaseServer).GetBlockReference(ctx, req.(*EmptyMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Database_GetDynamicProperties_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EmptyMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DatabaseServer).GetDynamicProperties(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Database/GetDynamicProperties", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DatabaseServer).GetDynamicProperties(ctx, req.(*EmptyMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Database_GetNowBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EmptyMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DatabaseServer).GetNowBlock(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Database/GetNowBlock", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DatabaseServer).GetNowBlock(ctx, req.(*EmptyMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _Database_GetBlockByNum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(NumberMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DatabaseServer).GetBlockByNum(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protocol.Database/GetBlockByNum", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DatabaseServer).GetBlockByNum(ctx, req.(*NumberMessage)) - } - return interceptor(ctx, in, info, handler) -} - -var _Database_serviceDesc = grpc.ServiceDesc{ - ServiceName: "protocol.Database", - HandlerType: (*DatabaseServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "getBlockReference", - Handler: _Database_GetBlockReference_Handler, - }, - { - MethodName: "GetDynamicProperties", - Handler: _Database_GetDynamicProperties_Handler, - }, - { - MethodName: "GetNowBlock", - Handler: _Database_GetNowBlock_Handler, - }, - { - MethodName: "GetBlockByNum", - Handler: _Database_GetBlockByNum_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "protos/protocol/api/api.proto", -} - -// NetworkClient is the client API for Network service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type NetworkClient interface { -} - -type networkClient struct { - cc *grpc.ClientConn -} - -func NewNetworkClient(cc *grpc.ClientConn) NetworkClient { - return &networkClient{cc} -} - -// NetworkServer is the server API for Network service. -type NetworkServer interface { -} - -// UnimplementedNetworkServer can be embedded to have forward compatible implementations. -type UnimplementedNetworkServer struct { -} - -func RegisterNetworkServer(s *grpc.Server, srv NetworkServer) { - s.RegisterService(&_Network_serviceDesc, srv) -} - -var _Network_serviceDesc = grpc.ServiceDesc{ - ServiceName: "protocol.Network", - HandlerType: (*NetworkServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{}, - Metadata: "protos/protocol/api/api.proto", -} diff --git a/protos/protocol/api/api.proto b/protos/protocol/api/api.proto deleted file mode 100644 index 0af4ddf..0000000 --- a/protos/protocol/api/api.proto +++ /dev/null @@ -1,860 +0,0 @@ -syntax = "proto3"; - -package protocol; - -option go_package = "protocol.api"; - -import "google/api/annotations.proto"; -import "protos/protocol/core/Contract.proto"; -import "protos/protocol/core/Tron.proto"; - -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); - //modify the energy_limit - rpc UpdateEnergyLimit(UpdateEnergyLimitContract) 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" - } - }; - } - 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) = { - 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 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" - body: "*" - additional_bindings: { - get: "/wallet/listproposals" - } - }; - } - 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" - 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 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" - 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 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" - 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 protocol'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 protocol'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; -} - -message DelegatedResourceMessage { - bytes fromAddress = 1; - bytes toAddress = 2; -} - -message DelegatedResourceList { - repeated DelegatedResource delegatedResource = 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; -} diff --git a/protos/protocol/core/Contract.pb.go b/protos/protocol/core/Contract.pb.go deleted file mode 100644 index 5e87acd..0000000 --- a/protos/protocol/core/Contract.pb.go +++ /dev/null @@ -1,2063 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: protos/protocol/core/Contract.proto - -package protocol_core - -import ( - fmt "fmt" - proto "github.com/tron-us/protobuf/proto" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type ResourceCode int32 - -const ( - ResourceCode_BANDWIDTH ResourceCode = 0 - ResourceCode_ENERGY ResourceCode = 1 -) - -var ResourceCode_name = map[int32]string{ - 0: "BANDWIDTH", - 1: "ENERGY", -} - -var ResourceCode_value = map[string]int32{ - "BANDWIDTH": 0, - "ENERGY": 1, -} - -func (x ResourceCode) String() string { - return proto.EnumName(ResourceCode_name, int32(x)) -} - -func (ResourceCode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_7b9dc9f6d5fa3557, []int{0} -} - -type AccountCreateContract struct { - OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" pg:"owner_address"` - AccountAddress []byte `protobuf:"bytes,2,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty" pg:"account_address"` - Type AccountType `protobuf:"varint,3,opt,name=type,proto3,enum=protocol.AccountType" json:"type,omitempty" pg:"type"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *AccountCreateContract) Reset() { *m = AccountCreateContract{} } -func (m *AccountCreateContract) String() string { return proto.CompactTextString(m) } -func (*AccountCreateContract) ProtoMessage() {} -func (*AccountCreateContract) Descriptor() ([]byte, []int) { - return fileDescriptor_7b9dc9f6d5fa3557, []int{0} -} -func (m *AccountCreateContract) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AccountCreateContract.Unmarshal(m, b) -} -func (m *AccountCreateContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AccountCreateContract.Marshal(b, m, deterministic) -} -func (m *AccountCreateContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountCreateContract.Merge(m, src) -} -func (m *AccountCreateContract) XXX_Size() int { - return xxx_messageInfo_AccountCreateContract.Size(m) -} -func (m *AccountCreateContract) XXX_DiscardUnknown() { - xxx_messageInfo_AccountCreateContract.DiscardUnknown(m) -} - -var xxx_messageInfo_AccountCreateContract proto.InternalMessageInfo - -func (m *AccountCreateContract) GetOwnerAddress() []byte { - if m != nil { - return m.OwnerAddress - } - return nil -} - -func (m *AccountCreateContract) GetAccountAddress() []byte { - if m != nil { - return m.AccountAddress - } - return nil -} - -func (m *AccountCreateContract) GetType() AccountType { - if m != nil { - return m.Type - } - return AccountType_Normal -} - -// Update account name. Account name is not unique now. -type AccountUpdateContract struct { - AccountName []byte `protobuf:"bytes,1,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty" pg:"account_name"` - OwnerAddress []byte `protobuf:"bytes,2,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" pg:"owner_address"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *AccountUpdateContract) Reset() { *m = AccountUpdateContract{} } -func (m *AccountUpdateContract) String() string { return proto.CompactTextString(m) } -func (*AccountUpdateContract) ProtoMessage() {} -func (*AccountUpdateContract) Descriptor() ([]byte, []int) { - return fileDescriptor_7b9dc9f6d5fa3557, []int{1} -} -func (m *AccountUpdateContract) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AccountUpdateContract.Unmarshal(m, b) -} -func (m *AccountUpdateContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AccountUpdateContract.Marshal(b, m, deterministic) -} -func (m *AccountUpdateContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountUpdateContract.Merge(m, src) -} -func (m *AccountUpdateContract) XXX_Size() int { - return xxx_messageInfo_AccountUpdateContract.Size(m) -} -func (m *AccountUpdateContract) XXX_DiscardUnknown() { - xxx_messageInfo_AccountUpdateContract.DiscardUnknown(m) -} - -var xxx_messageInfo_AccountUpdateContract proto.InternalMessageInfo - -func (m *AccountUpdateContract) GetAccountName() []byte { - if m != nil { - return m.AccountName - } - return nil -} - -func (m *AccountUpdateContract) GetOwnerAddress() []byte { - if m != nil { - return m.OwnerAddress - } - return nil -} - -// Set account id if the account has no id. Account id is unique and case insensitive. -type SetAccountIdContract struct { - AccountId []byte `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty" pg:"account_id"` - OwnerAddress []byte `protobuf:"bytes,2,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" pg:"owner_address"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SetAccountIdContract) Reset() { *m = SetAccountIdContract{} } -func (m *SetAccountIdContract) String() string { return proto.CompactTextString(m) } -func (*SetAccountIdContract) ProtoMessage() {} -func (*SetAccountIdContract) Descriptor() ([]byte, []int) { - return fileDescriptor_7b9dc9f6d5fa3557, []int{2} -} -func (m *SetAccountIdContract) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SetAccountIdContract.Unmarshal(m, b) -} -func (m *SetAccountIdContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SetAccountIdContract.Marshal(b, m, deterministic) -} -func (m *SetAccountIdContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetAccountIdContract.Merge(m, src) -} -func (m *SetAccountIdContract) XXX_Size() int { - return xxx_messageInfo_SetAccountIdContract.Size(m) -} -func (m *SetAccountIdContract) XXX_DiscardUnknown() { - xxx_messageInfo_SetAccountIdContract.DiscardUnknown(m) -} - -var xxx_messageInfo_SetAccountIdContract proto.InternalMessageInfo - -func (m *SetAccountIdContract) GetAccountId() []byte { - if m != nil { - return m.AccountId - } - return nil -} - -func (m *SetAccountIdContract) GetOwnerAddress() []byte { - if m != nil { - return m.OwnerAddress - } - return nil -} - -type TransferContract struct { - OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" pg:"owner_address"` - ToAddress []byte `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty" pg:"to_address"` - Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty" pg:"amount"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *TransferContract) Reset() { *m = TransferContract{} } -func (m *TransferContract) String() string { return proto.CompactTextString(m) } -func (*TransferContract) ProtoMessage() {} -func (*TransferContract) Descriptor() ([]byte, []int) { - return fileDescriptor_7b9dc9f6d5fa3557, []int{3} -} -func (m *TransferContract) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TransferContract.Unmarshal(m, b) -} -func (m *TransferContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TransferContract.Marshal(b, m, deterministic) -} -func (m *TransferContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransferContract.Merge(m, src) -} -func (m *TransferContract) XXX_Size() int { - return xxx_messageInfo_TransferContract.Size(m) -} -func (m *TransferContract) XXX_DiscardUnknown() { - xxx_messageInfo_TransferContract.DiscardUnknown(m) -} - -var xxx_messageInfo_TransferContract proto.InternalMessageInfo - -func (m *TransferContract) GetOwnerAddress() []byte { - if m != nil { - return m.OwnerAddress - } - return nil -} - -func (m *TransferContract) GetToAddress() []byte { - if m != nil { - return m.ToAddress - } - return nil -} - -func (m *TransferContract) GetAmount() int64 { - if m != nil { - return m.Amount - } - return 0 -} - -type TransferAssetContract struct { - AssetName []byte `protobuf:"bytes,1,opt,name=asset_name,json=assetName,proto3" json:"asset_name,omitempty" pg:"asset_name"` - OwnerAddress []byte `protobuf:"bytes,2,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" pg:"owner_address"` - ToAddress []byte `protobuf:"bytes,3,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty" pg:"to_address"` - Amount int64 `protobuf:"varint,4,opt,name=amount,proto3" json:"amount,omitempty" pg:"amount"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *TransferAssetContract) Reset() { *m = TransferAssetContract{} } -func (m *TransferAssetContract) String() string { return proto.CompactTextString(m) } -func (*TransferAssetContract) ProtoMessage() {} -func (*TransferAssetContract) Descriptor() ([]byte, []int) { - return fileDescriptor_7b9dc9f6d5fa3557, []int{4} -} -func (m *TransferAssetContract) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TransferAssetContract.Unmarshal(m, b) -} -func (m *TransferAssetContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TransferAssetContract.Marshal(b, m, deterministic) -} -func (m *TransferAssetContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransferAssetContract.Merge(m, src) -} -func (m *TransferAssetContract) XXX_Size() int { - return xxx_messageInfo_TransferAssetContract.Size(m) -} -func (m *TransferAssetContract) XXX_DiscardUnknown() { - xxx_messageInfo_TransferAssetContract.DiscardUnknown(m) -} - -var xxx_messageInfo_TransferAssetContract proto.InternalMessageInfo - -func (m *TransferAssetContract) GetAssetName() []byte { - if m != nil { - return m.AssetName - } - return nil -} - -func (m *TransferAssetContract) GetOwnerAddress() []byte { - if m != nil { - return m.OwnerAddress - } - return nil -} - -func (m *TransferAssetContract) GetToAddress() []byte { - if m != nil { - return m.ToAddress - } - return nil -} - -func (m *TransferAssetContract) GetAmount() int64 { - if m != nil { - return m.Amount - } - return 0 -} - -type VoteAssetContract struct { - OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" pg:"owner_address"` - VoteAddress [][]byte `protobuf:"bytes,2,rep,name=vote_address,json=voteAddress,proto3" json:"vote_address,omitempty" pg:"vote_address"` - Support bool `protobuf:"varint,3,opt,name=support,proto3" json:"support,omitempty" pg:"support"` - Count int32 `protobuf:"varint,5,opt,name=count,proto3" json:"count,omitempty" pg:"count"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *VoteAssetContract) Reset() { *m = VoteAssetContract{} } -func (m *VoteAssetContract) String() string { return proto.CompactTextString(m) } -func (*VoteAssetContract) ProtoMessage() {} -func (*VoteAssetContract) Descriptor() ([]byte, []int) { - return fileDescriptor_7b9dc9f6d5fa3557, []int{5} -} -func (m *VoteAssetContract) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_VoteAssetContract.Unmarshal(m, b) -} -func (m *VoteAssetContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_VoteAssetContract.Marshal(b, m, deterministic) -} -func (m *VoteAssetContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_VoteAssetContract.Merge(m, src) -} -func (m *VoteAssetContract) XXX_Size() int { - return xxx_messageInfo_VoteAssetContract.Size(m) -} -func (m *VoteAssetContract) XXX_DiscardUnknown() { - xxx_messageInfo_VoteAssetContract.DiscardUnknown(m) -} - -var xxx_messageInfo_VoteAssetContract proto.InternalMessageInfo - -func (m *VoteAssetContract) GetOwnerAddress() []byte { - if m != nil { - return m.OwnerAddress - } - return nil -} - -func (m *VoteAssetContract) GetVoteAddress() [][]byte { - if m != nil { - return m.VoteAddress - } - return nil -} - -func (m *VoteAssetContract) GetSupport() bool { - if m != nil { - return m.Support - } - return false -} - -func (m *VoteAssetContract) GetCount() int32 { - if m != nil { - return m.Count - } - return 0 -} - -type VoteWitnessContract struct { - OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" pg:"owner_address"` - Votes []*VoteWitnessContract_Vote `protobuf:"bytes,2,rep,name=votes,proto3" json:"votes,omitempty" pg:"votes"` - Support bool `protobuf:"varint,3,opt,name=support,proto3" json:"support,omitempty" pg:"support"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *VoteWitnessContract) Reset() { *m = VoteWitnessContract{} } -func (m *VoteWitnessContract) String() string { return proto.CompactTextString(m) } -func (*VoteWitnessContract) ProtoMessage() {} -func (*VoteWitnessContract) Descriptor() ([]byte, []int) { - return fileDescriptor_7b9dc9f6d5fa3557, []int{6} -} -func (m *VoteWitnessContract) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_VoteWitnessContract.Unmarshal(m, b) -} -func (m *VoteWitnessContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_VoteWitnessContract.Marshal(b, m, deterministic) -} -func (m *VoteWitnessContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_VoteWitnessContract.Merge(m, src) -} -func (m *VoteWitnessContract) XXX_Size() int { - return xxx_messageInfo_VoteWitnessContract.Size(m) -} -func (m *VoteWitnessContract) XXX_DiscardUnknown() { - xxx_messageInfo_VoteWitnessContract.DiscardUnknown(m) -} - -var xxx_messageInfo_VoteWitnessContract proto.InternalMessageInfo - -func (m *VoteWitnessContract) GetOwnerAddress() []byte { - if m != nil { - return m.OwnerAddress - } - return nil -} - -func (m *VoteWitnessContract) GetVotes() []*VoteWitnessContract_Vote { - if m != nil { - return m.Votes - } - return nil -} - -func (m *VoteWitnessContract) GetSupport() bool { - if m != nil { - return m.Support - } - return false -} - -type VoteWitnessContract_Vote struct { - VoteAddress []byte `protobuf:"bytes,1,opt,name=vote_address,json=voteAddress,proto3" json:"vote_address,omitempty" pg:"vote_address"` - VoteCount int64 `protobuf:"varint,2,opt,name=vote_count,json=voteCount,proto3" json:"vote_count,omitempty" pg:"vote_count"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *VoteWitnessContract_Vote) Reset() { *m = VoteWitnessContract_Vote{} } -func (m *VoteWitnessContract_Vote) String() string { return proto.CompactTextString(m) } -func (*VoteWitnessContract_Vote) ProtoMessage() {} -func (*VoteWitnessContract_Vote) Descriptor() ([]byte, []int) { - return fileDescriptor_7b9dc9f6d5fa3557, []int{6, 0} -} -func (m *VoteWitnessContract_Vote) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_VoteWitnessContract_Vote.Unmarshal(m, b) -} -func (m *VoteWitnessContract_Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_VoteWitnessContract_Vote.Marshal(b, m, deterministic) -} -func (m *VoteWitnessContract_Vote) XXX_Merge(src proto.Message) { - xxx_messageInfo_VoteWitnessContract_Vote.Merge(m, src) -} -func (m *VoteWitnessContract_Vote) XXX_Size() int { - return xxx_messageInfo_VoteWitnessContract_Vote.Size(m) -} -func (m *VoteWitnessContract_Vote) XXX_DiscardUnknown() { - xxx_messageInfo_VoteWitnessContract_Vote.DiscardUnknown(m) -} - -var xxx_messageInfo_VoteWitnessContract_Vote proto.InternalMessageInfo - -func (m *VoteWitnessContract_Vote) GetVoteAddress() []byte { - if m != nil { - return m.VoteAddress - } - return nil -} - -func (m *VoteWitnessContract_Vote) GetVoteCount() int64 { - if m != nil { - return m.VoteCount - } - return 0 -} - -type UpdateSettingContract struct { - OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" pg:"owner_address"` - ContractAddress []byte `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty" pg:"contract_address"` - ConsumeUserResourcePercent int64 `protobuf:"varint,3,opt,name=consume_user_resource_percent,json=consumeUserResourcePercent,proto3" json:"consume_user_resource_percent,omitempty" pg:"consume_user_resource_percent"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *UpdateSettingContract) Reset() { *m = UpdateSettingContract{} } -func (m *UpdateSettingContract) String() string { return proto.CompactTextString(m) } -func (*UpdateSettingContract) ProtoMessage() {} -func (*UpdateSettingContract) Descriptor() ([]byte, []int) { - return fileDescriptor_7b9dc9f6d5fa3557, []int{7} -} -func (m *UpdateSettingContract) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UpdateSettingContract.Unmarshal(m, b) -} -func (m *UpdateSettingContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UpdateSettingContract.Marshal(b, m, deterministic) -} -func (m *UpdateSettingContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpdateSettingContract.Merge(m, src) -} -func (m *UpdateSettingContract) XXX_Size() int { - return xxx_messageInfo_UpdateSettingContract.Size(m) -} -func (m *UpdateSettingContract) XXX_DiscardUnknown() { - xxx_messageInfo_UpdateSettingContract.DiscardUnknown(m) -} - -var xxx_messageInfo_UpdateSettingContract proto.InternalMessageInfo - -func (m *UpdateSettingContract) GetOwnerAddress() []byte { - if m != nil { - return m.OwnerAddress - } - return nil -} - -func (m *UpdateSettingContract) GetContractAddress() []byte { - if m != nil { - return m.ContractAddress - } - return nil -} - -func (m *UpdateSettingContract) GetConsumeUserResourcePercent() int64 { - if m != nil { - return m.ConsumeUserResourcePercent - } - return 0 -} - -type UpdateEnergyLimitContract struct { - OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" pg:"owner_address"` - ContractAddress []byte `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty" pg:"contract_address"` - OriginEnergyLimit int64 `protobuf:"varint,3,opt,name=origin_energy_limit,json=originEnergyLimit,proto3" json:"origin_energy_limit,omitempty" pg:"origin_energy_limit"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *UpdateEnergyLimitContract) Reset() { *m = UpdateEnergyLimitContract{} } -func (m *UpdateEnergyLimitContract) String() string { return proto.CompactTextString(m) } -func (*UpdateEnergyLimitContract) ProtoMessage() {} -func (*UpdateEnergyLimitContract) Descriptor() ([]byte, []int) { - return fileDescriptor_7b9dc9f6d5fa3557, []int{8} -} -func (m *UpdateEnergyLimitContract) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UpdateEnergyLimitContract.Unmarshal(m, b) -} -func (m *UpdateEnergyLimitContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UpdateEnergyLimitContract.Marshal(b, m, deterministic) -} -func (m *UpdateEnergyLimitContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpdateEnergyLimitContract.Merge(m, src) -} -func (m *UpdateEnergyLimitContract) XXX_Size() int { - return xxx_messageInfo_UpdateEnergyLimitContract.Size(m) -} -func (m *UpdateEnergyLimitContract) XXX_DiscardUnknown() { - xxx_messageInfo_UpdateEnergyLimitContract.DiscardUnknown(m) -} - -var xxx_messageInfo_UpdateEnergyLimitContract proto.InternalMessageInfo - -func (m *UpdateEnergyLimitContract) GetOwnerAddress() []byte { - if m != nil { - return m.OwnerAddress - } - return nil -} - -func (m *UpdateEnergyLimitContract) GetContractAddress() []byte { - if m != nil { - return m.ContractAddress - } - return nil -} - -func (m *UpdateEnergyLimitContract) GetOriginEnergyLimit() int64 { - if m != nil { - return m.OriginEnergyLimit - } - return 0 -} - -type WitnessCreateContract struct { - OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" pg:"owner_address"` - Url []byte `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty" pg:"url"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *WitnessCreateContract) Reset() { *m = WitnessCreateContract{} } -func (m *WitnessCreateContract) String() string { return proto.CompactTextString(m) } -func (*WitnessCreateContract) ProtoMessage() {} -func (*WitnessCreateContract) Descriptor() ([]byte, []int) { - return fileDescriptor_7b9dc9f6d5fa3557, []int{9} -} -func (m *WitnessCreateContract) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_WitnessCreateContract.Unmarshal(m, b) -} -func (m *WitnessCreateContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_WitnessCreateContract.Marshal(b, m, deterministic) -} -func (m *WitnessCreateContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_WitnessCreateContract.Merge(m, src) -} -func (m *WitnessCreateContract) XXX_Size() int { - return xxx_messageInfo_WitnessCreateContract.Size(m) -} -func (m *WitnessCreateContract) XXX_DiscardUnknown() { - xxx_messageInfo_WitnessCreateContract.DiscardUnknown(m) -} - -var xxx_messageInfo_WitnessCreateContract proto.InternalMessageInfo - -func (m *WitnessCreateContract) GetOwnerAddress() []byte { - if m != nil { - return m.OwnerAddress - } - return nil -} - -func (m *WitnessCreateContract) GetUrl() []byte { - if m != nil { - return m.Url - } - return nil -} - -type WitnessUpdateContract struct { - OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" pg:"owner_address"` - UpdateUrl []byte `protobuf:"bytes,12,opt,name=update_url,json=updateUrl,proto3" json:"update_url,omitempty" pg:"update_url"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *WitnessUpdateContract) Reset() { *m = WitnessUpdateContract{} } -func (m *WitnessUpdateContract) String() string { return proto.CompactTextString(m) } -func (*WitnessUpdateContract) ProtoMessage() {} -func (*WitnessUpdateContract) Descriptor() ([]byte, []int) { - return fileDescriptor_7b9dc9f6d5fa3557, []int{10} -} -func (m *WitnessUpdateContract) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_WitnessUpdateContract.Unmarshal(m, b) -} -func (m *WitnessUpdateContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_WitnessUpdateContract.Marshal(b, m, deterministic) -} -func (m *WitnessUpdateContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_WitnessUpdateContract.Merge(m, src) -} -func (m *WitnessUpdateContract) XXX_Size() int { - return xxx_messageInfo_WitnessUpdateContract.Size(m) -} -func (m *WitnessUpdateContract) XXX_DiscardUnknown() { - xxx_messageInfo_WitnessUpdateContract.DiscardUnknown(m) -} - -var xxx_messageInfo_WitnessUpdateContract proto.InternalMessageInfo - -func (m *WitnessUpdateContract) GetOwnerAddress() []byte { - if m != nil { - return m.OwnerAddress - } - return nil -} - -func (m *WitnessUpdateContract) GetUpdateUrl() []byte { - if m != nil { - return m.UpdateUrl - } - return nil -} - -type AssetIssueContract struct { - Id string `protobuf:"bytes,41,opt,name=id,proto3" json:"id,omitempty" pg:"id"` - OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" pg:"owner_address"` - Name []byte `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" pg:"name"` - Abbr []byte `protobuf:"bytes,3,opt,name=abbr,proto3" json:"abbr,omitempty" pg:"abbr"` - TotalSupply int64 `protobuf:"varint,4,opt,name=total_supply,json=totalSupply,proto3" json:"total_supply,omitempty" pg:"total_supply"` - FrozenSupply []*AssetIssueContract_FrozenSupply `protobuf:"bytes,5,rep,name=frozen_supply,json=frozenSupply,proto3" json:"frozen_supply,omitempty" pg:"frozen_supply"` - TrxNum int32 `protobuf:"varint,6,opt,name=trx_num,json=trxNum,proto3" json:"trx_num,omitempty" pg:"trx_num"` - Precision int32 `protobuf:"varint,7,opt,name=precision,proto3" json:"precision,omitempty" pg:"precision"` - Num int32 `protobuf:"varint,8,opt,name=num,proto3" json:"num,omitempty" pg:"num"` - StartTime int64 `protobuf:"varint,9,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty" pg:"start_time"` - EndTime int64 `protobuf:"varint,10,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty" pg:"end_time"` - Order int64 `protobuf:"varint,11,opt,name=order,proto3" json:"order,omitempty" pg:"order"` - VoteScore int32 `protobuf:"varint,16,opt,name=vote_score,json=voteScore,proto3" json:"vote_score,omitempty" pg:"vote_score"` - Description []byte `protobuf:"bytes,20,opt,name=description,proto3" json:"description,omitempty" pg:"description"` - Url []byte `protobuf:"bytes,21,opt,name=url,proto3" json:"url,omitempty" pg:"url"` - FreeAssetNetLimit int64 `protobuf:"varint,22,opt,name=free_asset_net_limit,json=freeAssetNetLimit,proto3" json:"free_asset_net_limit,omitempty" pg:"free_asset_net_limit"` - PublicFreeAssetNetLimit int64 `protobuf:"varint,23,opt,name=public_free_asset_net_limit,json=publicFreeAssetNetLimit,proto3" json:"public_free_asset_net_limit,omitempty" pg:"public_free_asset_net_limit"` - PublicFreeAssetNetUsage int64 `protobuf:"varint,24,opt,name=public_free_asset_net_usage,json=publicFreeAssetNetUsage,proto3" json:"public_free_asset_net_usage,omitempty" pg:"public_free_asset_net_usage"` - PublicLatestFreeNetTime int64 `protobuf:"varint,25,opt,name=public_latest_free_net_time,json=publicLatestFreeNetTime,proto3" json:"public_latest_free_net_time,omitempty" pg:"public_latest_free_net_time"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *AssetIssueContract) Reset() { *m = AssetIssueContract{} } -func (m *AssetIssueContract) String() string { return proto.CompactTextString(m) } -func (*AssetIssueContract) ProtoMessage() {} -func (*AssetIssueContract) Descriptor() ([]byte, []int) { - return fileDescriptor_7b9dc9f6d5fa3557, []int{11} -} -func (m *AssetIssueContract) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AssetIssueContract.Unmarshal(m, b) -} -func (m *AssetIssueContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AssetIssueContract.Marshal(b, m, deterministic) -} -func (m *AssetIssueContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_AssetIssueContract.Merge(m, src) -} -func (m *AssetIssueContract) XXX_Size() int { - return xxx_messageInfo_AssetIssueContract.Size(m) -} -func (m *AssetIssueContract) XXX_DiscardUnknown() { - xxx_messageInfo_AssetIssueContract.DiscardUnknown(m) -} - -var xxx_messageInfo_AssetIssueContract proto.InternalMessageInfo - -func (m *AssetIssueContract) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *AssetIssueContract) GetOwnerAddress() []byte { - if m != nil { - return m.OwnerAddress - } - return nil -} - -func (m *AssetIssueContract) GetName() []byte { - if m != nil { - return m.Name - } - return nil -} - -func (m *AssetIssueContract) GetAbbr() []byte { - if m != nil { - return m.Abbr - } - return nil -} - -func (m *AssetIssueContract) GetTotalSupply() int64 { - if m != nil { - return m.TotalSupply - } - return 0 -} - -func (m *AssetIssueContract) GetFrozenSupply() []*AssetIssueContract_FrozenSupply { - if m != nil { - return m.FrozenSupply - } - return nil -} - -func (m *AssetIssueContract) GetTrxNum() int32 { - if m != nil { - return m.TrxNum - } - return 0 -} - -func (m *AssetIssueContract) GetPrecision() int32 { - if m != nil { - return m.Precision - } - return 0 -} - -func (m *AssetIssueContract) GetNum() int32 { - if m != nil { - return m.Num - } - return 0 -} - -func (m *AssetIssueContract) GetStartTime() int64 { - if m != nil { - return m.StartTime - } - return 0 -} - -func (m *AssetIssueContract) GetEndTime() int64 { - if m != nil { - return m.EndTime - } - return 0 -} - -func (m *AssetIssueContract) GetOrder() int64 { - if m != nil { - return m.Order - } - return 0 -} - -func (m *AssetIssueContract) GetVoteScore() int32 { - if m != nil { - return m.VoteScore - } - return 0 -} - -func (m *AssetIssueContract) GetDescription() []byte { - if m != nil { - return m.Description - } - return nil -} - -func (m *AssetIssueContract) GetUrl() []byte { - if m != nil { - return m.Url - } - return nil -} - -func (m *AssetIssueContract) GetFreeAssetNetLimit() int64 { - if m != nil { - return m.FreeAssetNetLimit - } - return 0 -} - -func (m *AssetIssueContract) GetPublicFreeAssetNetLimit() int64 { - if m != nil { - return m.PublicFreeAssetNetLimit - } - return 0 -} - -func (m *AssetIssueContract) GetPublicFreeAssetNetUsage() int64 { - if m != nil { - return m.PublicFreeAssetNetUsage - } - return 0 -} - -func (m *AssetIssueContract) GetPublicLatestFreeNetTime() int64 { - if m != nil { - return m.PublicLatestFreeNetTime - } - return 0 -} - -type AssetIssueContract_FrozenSupply struct { - FrozenAmount int64 `protobuf:"varint,1,opt,name=frozen_amount,json=frozenAmount,proto3" json:"frozen_amount,omitempty" pg:"frozen_amount"` - FrozenDays int64 `protobuf:"varint,2,opt,name=frozen_days,json=frozenDays,proto3" json:"frozen_days,omitempty" pg:"frozen_days"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *AssetIssueContract_FrozenSupply) Reset() { *m = AssetIssueContract_FrozenSupply{} } -func (m *AssetIssueContract_FrozenSupply) String() string { return proto.CompactTextString(m) } -func (*AssetIssueContract_FrozenSupply) ProtoMessage() {} -func (*AssetIssueContract_FrozenSupply) Descriptor() ([]byte, []int) { - return fileDescriptor_7b9dc9f6d5fa3557, []int{11, 0} -} -func (m *AssetIssueContract_FrozenSupply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AssetIssueContract_FrozenSupply.Unmarshal(m, b) -} -func (m *AssetIssueContract_FrozenSupply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AssetIssueContract_FrozenSupply.Marshal(b, m, deterministic) -} -func (m *AssetIssueContract_FrozenSupply) XXX_Merge(src proto.Message) { - xxx_messageInfo_AssetIssueContract_FrozenSupply.Merge(m, src) -} -func (m *AssetIssueContract_FrozenSupply) XXX_Size() int { - return xxx_messageInfo_AssetIssueContract_FrozenSupply.Size(m) -} -func (m *AssetIssueContract_FrozenSupply) XXX_DiscardUnknown() { - xxx_messageInfo_AssetIssueContract_FrozenSupply.DiscardUnknown(m) -} - -var xxx_messageInfo_AssetIssueContract_FrozenSupply proto.InternalMessageInfo - -func (m *AssetIssueContract_FrozenSupply) GetFrozenAmount() int64 { - if m != nil { - return m.FrozenAmount - } - return 0 -} - -func (m *AssetIssueContract_FrozenSupply) GetFrozenDays() int64 { - if m != nil { - return m.FrozenDays - } - return 0 -} - -type ParticipateAssetIssueContract struct { - OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" pg:"owner_address"` - ToAddress []byte `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty" pg:"to_address"` - AssetName []byte `protobuf:"bytes,3,opt,name=asset_name,json=assetName,proto3" json:"asset_name,omitempty" pg:"asset_name"` - Amount int64 `protobuf:"varint,4,opt,name=amount,proto3" json:"amount,omitempty" pg:"amount"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ParticipateAssetIssueContract) Reset() { *m = ParticipateAssetIssueContract{} } -func (m *ParticipateAssetIssueContract) String() string { return proto.CompactTextString(m) } -func (*ParticipateAssetIssueContract) ProtoMessage() {} -func (*ParticipateAssetIssueContract) Descriptor() ([]byte, []int) { - return fileDescriptor_7b9dc9f6d5fa3557, []int{12} -} -func (m *ParticipateAssetIssueContract) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ParticipateAssetIssueContract.Unmarshal(m, b) -} -func (m *ParticipateAssetIssueContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ParticipateAssetIssueContract.Marshal(b, m, deterministic) -} -func (m *ParticipateAssetIssueContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_ParticipateAssetIssueContract.Merge(m, src) -} -func (m *ParticipateAssetIssueContract) XXX_Size() int { - return xxx_messageInfo_ParticipateAssetIssueContract.Size(m) -} -func (m *ParticipateAssetIssueContract) XXX_DiscardUnknown() { - xxx_messageInfo_ParticipateAssetIssueContract.DiscardUnknown(m) -} - -var xxx_messageInfo_ParticipateAssetIssueContract proto.InternalMessageInfo - -func (m *ParticipateAssetIssueContract) GetOwnerAddress() []byte { - if m != nil { - return m.OwnerAddress - } - return nil -} - -func (m *ParticipateAssetIssueContract) GetToAddress() []byte { - if m != nil { - return m.ToAddress - } - return nil -} - -func (m *ParticipateAssetIssueContract) GetAssetName() []byte { - if m != nil { - return m.AssetName - } - return nil -} - -func (m *ParticipateAssetIssueContract) GetAmount() int64 { - if m != nil { - return m.Amount - } - return 0 -} - -type FreezeBalanceContract struct { - OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" pg:"owner_address"` - FrozenBalance int64 `protobuf:"varint,2,opt,name=frozen_balance,json=frozenBalance,proto3" json:"frozen_balance,omitempty" pg:"frozen_balance"` - FrozenDuration int64 `protobuf:"varint,3,opt,name=frozen_duration,json=frozenDuration,proto3" json:"frozen_duration,omitempty" pg:"frozen_duration"` - Resource ResourceCode `protobuf:"varint,10,opt,name=resource,proto3,enum=protocol.ResourceCode" json:"resource,omitempty" pg:"resource"` - ReceiverAddress []byte `protobuf:"bytes,15,opt,name=receiver_address,json=receiverAddress,proto3" json:"receiver_address,omitempty" pg:"receiver_address"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *FreezeBalanceContract) Reset() { *m = FreezeBalanceContract{} } -func (m *FreezeBalanceContract) String() string { return proto.CompactTextString(m) } -func (*FreezeBalanceContract) ProtoMessage() {} -func (*FreezeBalanceContract) Descriptor() ([]byte, []int) { - return fileDescriptor_7b9dc9f6d5fa3557, []int{13} -} -func (m *FreezeBalanceContract) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FreezeBalanceContract.Unmarshal(m, b) -} -func (m *FreezeBalanceContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FreezeBalanceContract.Marshal(b, m, deterministic) -} -func (m *FreezeBalanceContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_FreezeBalanceContract.Merge(m, src) -} -func (m *FreezeBalanceContract) XXX_Size() int { - return xxx_messageInfo_FreezeBalanceContract.Size(m) -} -func (m *FreezeBalanceContract) XXX_DiscardUnknown() { - xxx_messageInfo_FreezeBalanceContract.DiscardUnknown(m) -} - -var xxx_messageInfo_FreezeBalanceContract proto.InternalMessageInfo - -func (m *FreezeBalanceContract) GetOwnerAddress() []byte { - if m != nil { - return m.OwnerAddress - } - return nil -} - -func (m *FreezeBalanceContract) GetFrozenBalance() int64 { - if m != nil { - return m.FrozenBalance - } - return 0 -} - -func (m *FreezeBalanceContract) GetFrozenDuration() int64 { - if m != nil { - return m.FrozenDuration - } - return 0 -} - -func (m *FreezeBalanceContract) GetResource() ResourceCode { - if m != nil { - return m.Resource - } - return ResourceCode_BANDWIDTH -} - -func (m *FreezeBalanceContract) GetReceiverAddress() []byte { - if m != nil { - return m.ReceiverAddress - } - return nil -} - -type UnfreezeBalanceContract struct { - OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" pg:"owner_address"` - Resource ResourceCode `protobuf:"varint,10,opt,name=resource,proto3,enum=protocol.ResourceCode" json:"resource,omitempty" pg:"resource"` - ReceiverAddress []byte `protobuf:"bytes,15,opt,name=receiver_address,json=receiverAddress,proto3" json:"receiver_address,omitempty" pg:"receiver_address"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *UnfreezeBalanceContract) Reset() { *m = UnfreezeBalanceContract{} } -func (m *UnfreezeBalanceContract) String() string { return proto.CompactTextString(m) } -func (*UnfreezeBalanceContract) ProtoMessage() {} -func (*UnfreezeBalanceContract) Descriptor() ([]byte, []int) { - return fileDescriptor_7b9dc9f6d5fa3557, []int{14} -} -func (m *UnfreezeBalanceContract) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UnfreezeBalanceContract.Unmarshal(m, b) -} -func (m *UnfreezeBalanceContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UnfreezeBalanceContract.Marshal(b, m, deterministic) -} -func (m *UnfreezeBalanceContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_UnfreezeBalanceContract.Merge(m, src) -} -func (m *UnfreezeBalanceContract) XXX_Size() int { - return xxx_messageInfo_UnfreezeBalanceContract.Size(m) -} -func (m *UnfreezeBalanceContract) XXX_DiscardUnknown() { - xxx_messageInfo_UnfreezeBalanceContract.DiscardUnknown(m) -} - -var xxx_messageInfo_UnfreezeBalanceContract proto.InternalMessageInfo - -func (m *UnfreezeBalanceContract) GetOwnerAddress() []byte { - if m != nil { - return m.OwnerAddress - } - return nil -} - -func (m *UnfreezeBalanceContract) GetResource() ResourceCode { - if m != nil { - return m.Resource - } - return ResourceCode_BANDWIDTH -} - -func (m *UnfreezeBalanceContract) GetReceiverAddress() []byte { - if m != nil { - return m.ReceiverAddress - } - return nil -} - -type UnfreezeAssetContract struct { - OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" pg:"owner_address"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *UnfreezeAssetContract) Reset() { *m = UnfreezeAssetContract{} } -func (m *UnfreezeAssetContract) String() string { return proto.CompactTextString(m) } -func (*UnfreezeAssetContract) ProtoMessage() {} -func (*UnfreezeAssetContract) Descriptor() ([]byte, []int) { - return fileDescriptor_7b9dc9f6d5fa3557, []int{15} -} -func (m *UnfreezeAssetContract) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UnfreezeAssetContract.Unmarshal(m, b) -} -func (m *UnfreezeAssetContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UnfreezeAssetContract.Marshal(b, m, deterministic) -} -func (m *UnfreezeAssetContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_UnfreezeAssetContract.Merge(m, src) -} -func (m *UnfreezeAssetContract) XXX_Size() int { - return xxx_messageInfo_UnfreezeAssetContract.Size(m) -} -func (m *UnfreezeAssetContract) XXX_DiscardUnknown() { - xxx_messageInfo_UnfreezeAssetContract.DiscardUnknown(m) -} - -var xxx_messageInfo_UnfreezeAssetContract proto.InternalMessageInfo - -func (m *UnfreezeAssetContract) GetOwnerAddress() []byte { - if m != nil { - return m.OwnerAddress - } - return nil -} - -type WithdrawBalanceContract struct { - OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" pg:"owner_address"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *WithdrawBalanceContract) Reset() { *m = WithdrawBalanceContract{} } -func (m *WithdrawBalanceContract) String() string { return proto.CompactTextString(m) } -func (*WithdrawBalanceContract) ProtoMessage() {} -func (*WithdrawBalanceContract) Descriptor() ([]byte, []int) { - return fileDescriptor_7b9dc9f6d5fa3557, []int{16} -} -func (m *WithdrawBalanceContract) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_WithdrawBalanceContract.Unmarshal(m, b) -} -func (m *WithdrawBalanceContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_WithdrawBalanceContract.Marshal(b, m, deterministic) -} -func (m *WithdrawBalanceContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_WithdrawBalanceContract.Merge(m, src) -} -func (m *WithdrawBalanceContract) XXX_Size() int { - return xxx_messageInfo_WithdrawBalanceContract.Size(m) -} -func (m *WithdrawBalanceContract) XXX_DiscardUnknown() { - xxx_messageInfo_WithdrawBalanceContract.DiscardUnknown(m) -} - -var xxx_messageInfo_WithdrawBalanceContract proto.InternalMessageInfo - -func (m *WithdrawBalanceContract) GetOwnerAddress() []byte { - if m != nil { - return m.OwnerAddress - } - return nil -} - -type UpdateAssetContract struct { - OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" pg:"owner_address"` - Description []byte `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty" pg:"description"` - Url []byte `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty" pg:"url"` - NewLimit int64 `protobuf:"varint,4,opt,name=new_limit,json=newLimit,proto3" json:"new_limit,omitempty" pg:"new_limit"` - NewPublicLimit int64 `protobuf:"varint,5,opt,name=new_public_limit,json=newPublicLimit,proto3" json:"new_public_limit,omitempty" pg:"new_public_limit"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *UpdateAssetContract) Reset() { *m = UpdateAssetContract{} } -func (m *UpdateAssetContract) String() string { return proto.CompactTextString(m) } -func (*UpdateAssetContract) ProtoMessage() {} -func (*UpdateAssetContract) Descriptor() ([]byte, []int) { - return fileDescriptor_7b9dc9f6d5fa3557, []int{17} -} -func (m *UpdateAssetContract) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UpdateAssetContract.Unmarshal(m, b) -} -func (m *UpdateAssetContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UpdateAssetContract.Marshal(b, m, deterministic) -} -func (m *UpdateAssetContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpdateAssetContract.Merge(m, src) -} -func (m *UpdateAssetContract) XXX_Size() int { - return xxx_messageInfo_UpdateAssetContract.Size(m) -} -func (m *UpdateAssetContract) XXX_DiscardUnknown() { - xxx_messageInfo_UpdateAssetContract.DiscardUnknown(m) -} - -var xxx_messageInfo_UpdateAssetContract proto.InternalMessageInfo - -func (m *UpdateAssetContract) GetOwnerAddress() []byte { - if m != nil { - return m.OwnerAddress - } - return nil -} - -func (m *UpdateAssetContract) GetDescription() []byte { - if m != nil { - return m.Description - } - return nil -} - -func (m *UpdateAssetContract) GetUrl() []byte { - if m != nil { - return m.Url - } - return nil -} - -func (m *UpdateAssetContract) GetNewLimit() int64 { - if m != nil { - return m.NewLimit - } - return 0 -} - -func (m *UpdateAssetContract) GetNewPublicLimit() int64 { - if m != nil { - return m.NewPublicLimit - } - return 0 -} - -type ProposalCreateContract struct { - OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" pg:"owner_address"` - Parameters map[int64]int64 `protobuf:"bytes,2,rep,name=parameters,proto3" json:"parameters,omitempty" pg:"parameters" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ProposalCreateContract) Reset() { *m = ProposalCreateContract{} } -func (m *ProposalCreateContract) String() string { return proto.CompactTextString(m) } -func (*ProposalCreateContract) ProtoMessage() {} -func (*ProposalCreateContract) Descriptor() ([]byte, []int) { - return fileDescriptor_7b9dc9f6d5fa3557, []int{18} -} -func (m *ProposalCreateContract) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ProposalCreateContract.Unmarshal(m, b) -} -func (m *ProposalCreateContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ProposalCreateContract.Marshal(b, m, deterministic) -} -func (m *ProposalCreateContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProposalCreateContract.Merge(m, src) -} -func (m *ProposalCreateContract) XXX_Size() int { - return xxx_messageInfo_ProposalCreateContract.Size(m) -} -func (m *ProposalCreateContract) XXX_DiscardUnknown() { - xxx_messageInfo_ProposalCreateContract.DiscardUnknown(m) -} - -var xxx_messageInfo_ProposalCreateContract proto.InternalMessageInfo - -func (m *ProposalCreateContract) GetOwnerAddress() []byte { - if m != nil { - return m.OwnerAddress - } - return nil -} - -func (m *ProposalCreateContract) GetParameters() map[int64]int64 { - if m != nil { - return m.Parameters - } - return nil -} - -type ProposalApproveContract struct { - OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" pg:"owner_address"` - ProposalId int64 `protobuf:"varint,2,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty" pg:"proposal_id"` - IsAddApproval bool `protobuf:"varint,3,opt,name=is_add_approval,json=isAddApproval,proto3" json:"is_add_approval,omitempty" pg:"is_add_approval"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ProposalApproveContract) Reset() { *m = ProposalApproveContract{} } -func (m *ProposalApproveContract) String() string { return proto.CompactTextString(m) } -func (*ProposalApproveContract) ProtoMessage() {} -func (*ProposalApproveContract) Descriptor() ([]byte, []int) { - return fileDescriptor_7b9dc9f6d5fa3557, []int{19} -} -func (m *ProposalApproveContract) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ProposalApproveContract.Unmarshal(m, b) -} -func (m *ProposalApproveContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ProposalApproveContract.Marshal(b, m, deterministic) -} -func (m *ProposalApproveContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProposalApproveContract.Merge(m, src) -} -func (m *ProposalApproveContract) XXX_Size() int { - return xxx_messageInfo_ProposalApproveContract.Size(m) -} -func (m *ProposalApproveContract) XXX_DiscardUnknown() { - xxx_messageInfo_ProposalApproveContract.DiscardUnknown(m) -} - -var xxx_messageInfo_ProposalApproveContract proto.InternalMessageInfo - -func (m *ProposalApproveContract) GetOwnerAddress() []byte { - if m != nil { - return m.OwnerAddress - } - return nil -} - -func (m *ProposalApproveContract) GetProposalId() int64 { - if m != nil { - return m.ProposalId - } - return 0 -} - -func (m *ProposalApproveContract) GetIsAddApproval() bool { - if m != nil { - return m.IsAddApproval - } - return false -} - -type ProposalDeleteContract struct { - OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" pg:"owner_address"` - ProposalId int64 `protobuf:"varint,2,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty" pg:"proposal_id"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ProposalDeleteContract) Reset() { *m = ProposalDeleteContract{} } -func (m *ProposalDeleteContract) String() string { return proto.CompactTextString(m) } -func (*ProposalDeleteContract) ProtoMessage() {} -func (*ProposalDeleteContract) Descriptor() ([]byte, []int) { - return fileDescriptor_7b9dc9f6d5fa3557, []int{20} -} -func (m *ProposalDeleteContract) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ProposalDeleteContract.Unmarshal(m, b) -} -func (m *ProposalDeleteContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ProposalDeleteContract.Marshal(b, m, deterministic) -} -func (m *ProposalDeleteContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProposalDeleteContract.Merge(m, src) -} -func (m *ProposalDeleteContract) XXX_Size() int { - return xxx_messageInfo_ProposalDeleteContract.Size(m) -} -func (m *ProposalDeleteContract) XXX_DiscardUnknown() { - xxx_messageInfo_ProposalDeleteContract.DiscardUnknown(m) -} - -var xxx_messageInfo_ProposalDeleteContract proto.InternalMessageInfo - -func (m *ProposalDeleteContract) GetOwnerAddress() []byte { - if m != nil { - return m.OwnerAddress - } - return nil -} - -func (m *ProposalDeleteContract) GetProposalId() int64 { - if m != nil { - return m.ProposalId - } - return 0 -} - -type CreateSmartContract struct { - OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" pg:"owner_address"` - NewContract *SmartContract `protobuf:"bytes,2,opt,name=new_contract,json=newContract,proto3" json:"new_contract,omitempty" pg:"new_contract"` - CallTokenValue int64 `protobuf:"varint,3,opt,name=call_token_value,json=callTokenValue,proto3" json:"call_token_value,omitempty" pg:"call_token_value"` - TokenId int64 `protobuf:"varint,4,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty" pg:"token_id"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *CreateSmartContract) Reset() { *m = CreateSmartContract{} } -func (m *CreateSmartContract) String() string { return proto.CompactTextString(m) } -func (*CreateSmartContract) ProtoMessage() {} -func (*CreateSmartContract) Descriptor() ([]byte, []int) { - return fileDescriptor_7b9dc9f6d5fa3557, []int{21} -} -func (m *CreateSmartContract) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateSmartContract.Unmarshal(m, b) -} -func (m *CreateSmartContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateSmartContract.Marshal(b, m, deterministic) -} -func (m *CreateSmartContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateSmartContract.Merge(m, src) -} -func (m *CreateSmartContract) XXX_Size() int { - return xxx_messageInfo_CreateSmartContract.Size(m) -} -func (m *CreateSmartContract) XXX_DiscardUnknown() { - xxx_messageInfo_CreateSmartContract.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateSmartContract proto.InternalMessageInfo - -func (m *CreateSmartContract) GetOwnerAddress() []byte { - if m != nil { - return m.OwnerAddress - } - return nil -} - -func (m *CreateSmartContract) GetNewContract() *SmartContract { - if m != nil { - return m.NewContract - } - return nil -} - -func (m *CreateSmartContract) GetCallTokenValue() int64 { - if m != nil { - return m.CallTokenValue - } - return 0 -} - -func (m *CreateSmartContract) GetTokenId() int64 { - if m != nil { - return m.TokenId - } - return 0 -} - -type TriggerSmartContract struct { - OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" pg:"owner_address"` - ContractAddress []byte `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty" pg:"contract_address"` - CallValue int64 `protobuf:"varint,3,opt,name=call_value,json=callValue,proto3" json:"call_value,omitempty" pg:"call_value"` - Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty" pg:"data"` - CallTokenValue int64 `protobuf:"varint,5,opt,name=call_token_value,json=callTokenValue,proto3" json:"call_token_value,omitempty" pg:"call_token_value"` - TokenId int64 `protobuf:"varint,6,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty" pg:"token_id"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *TriggerSmartContract) Reset() { *m = TriggerSmartContract{} } -func (m *TriggerSmartContract) String() string { return proto.CompactTextString(m) } -func (*TriggerSmartContract) ProtoMessage() {} -func (*TriggerSmartContract) Descriptor() ([]byte, []int) { - return fileDescriptor_7b9dc9f6d5fa3557, []int{22} -} -func (m *TriggerSmartContract) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TriggerSmartContract.Unmarshal(m, b) -} -func (m *TriggerSmartContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TriggerSmartContract.Marshal(b, m, deterministic) -} -func (m *TriggerSmartContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_TriggerSmartContract.Merge(m, src) -} -func (m *TriggerSmartContract) XXX_Size() int { - return xxx_messageInfo_TriggerSmartContract.Size(m) -} -func (m *TriggerSmartContract) XXX_DiscardUnknown() { - xxx_messageInfo_TriggerSmartContract.DiscardUnknown(m) -} - -var xxx_messageInfo_TriggerSmartContract proto.InternalMessageInfo - -func (m *TriggerSmartContract) GetOwnerAddress() []byte { - if m != nil { - return m.OwnerAddress - } - return nil -} - -func (m *TriggerSmartContract) GetContractAddress() []byte { - if m != nil { - return m.ContractAddress - } - return nil -} - -func (m *TriggerSmartContract) GetCallValue() int64 { - if m != nil { - return m.CallValue - } - return 0 -} - -func (m *TriggerSmartContract) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -func (m *TriggerSmartContract) GetCallTokenValue() int64 { - if m != nil { - return m.CallTokenValue - } - return 0 -} - -func (m *TriggerSmartContract) GetTokenId() int64 { - if m != nil { - return m.TokenId - } - return 0 -} - -type BuyStorageContract struct { - OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" pg:"owner_address"` - Quant int64 `protobuf:"varint,2,opt,name=quant,proto3" json:"quant,omitempty" pg:"quant"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *BuyStorageContract) Reset() { *m = BuyStorageContract{} } -func (m *BuyStorageContract) String() string { return proto.CompactTextString(m) } -func (*BuyStorageContract) ProtoMessage() {} -func (*BuyStorageContract) Descriptor() ([]byte, []int) { - return fileDescriptor_7b9dc9f6d5fa3557, []int{23} -} -func (m *BuyStorageContract) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BuyStorageContract.Unmarshal(m, b) -} -func (m *BuyStorageContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BuyStorageContract.Marshal(b, m, deterministic) -} -func (m *BuyStorageContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_BuyStorageContract.Merge(m, src) -} -func (m *BuyStorageContract) XXX_Size() int { - return xxx_messageInfo_BuyStorageContract.Size(m) -} -func (m *BuyStorageContract) XXX_DiscardUnknown() { - xxx_messageInfo_BuyStorageContract.DiscardUnknown(m) -} - -var xxx_messageInfo_BuyStorageContract proto.InternalMessageInfo - -func (m *BuyStorageContract) GetOwnerAddress() []byte { - if m != nil { - return m.OwnerAddress - } - return nil -} - -func (m *BuyStorageContract) GetQuant() int64 { - if m != nil { - return m.Quant - } - return 0 -} - -type BuyStorageBytesContract struct { - OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" pg:"owner_address"` - Bytes int64 `protobuf:"varint,2,opt,name=bytes,proto3" json:"bytes,omitempty" pg:"bytes"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *BuyStorageBytesContract) Reset() { *m = BuyStorageBytesContract{} } -func (m *BuyStorageBytesContract) String() string { return proto.CompactTextString(m) } -func (*BuyStorageBytesContract) ProtoMessage() {} -func (*BuyStorageBytesContract) Descriptor() ([]byte, []int) { - return fileDescriptor_7b9dc9f6d5fa3557, []int{24} -} -func (m *BuyStorageBytesContract) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BuyStorageBytesContract.Unmarshal(m, b) -} -func (m *BuyStorageBytesContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BuyStorageBytesContract.Marshal(b, m, deterministic) -} -func (m *BuyStorageBytesContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_BuyStorageBytesContract.Merge(m, src) -} -func (m *BuyStorageBytesContract) XXX_Size() int { - return xxx_messageInfo_BuyStorageBytesContract.Size(m) -} -func (m *BuyStorageBytesContract) XXX_DiscardUnknown() { - xxx_messageInfo_BuyStorageBytesContract.DiscardUnknown(m) -} - -var xxx_messageInfo_BuyStorageBytesContract proto.InternalMessageInfo - -func (m *BuyStorageBytesContract) GetOwnerAddress() []byte { - if m != nil { - return m.OwnerAddress - } - return nil -} - -func (m *BuyStorageBytesContract) GetBytes() int64 { - if m != nil { - return m.Bytes - } - return 0 -} - -type SellStorageContract struct { - OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" pg:"owner_address"` - StorageBytes int64 `protobuf:"varint,2,opt,name=storage_bytes,json=storageBytes,proto3" json:"storage_bytes,omitempty" pg:"storage_bytes"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SellStorageContract) Reset() { *m = SellStorageContract{} } -func (m *SellStorageContract) String() string { return proto.CompactTextString(m) } -func (*SellStorageContract) ProtoMessage() {} -func (*SellStorageContract) Descriptor() ([]byte, []int) { - return fileDescriptor_7b9dc9f6d5fa3557, []int{25} -} -func (m *SellStorageContract) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SellStorageContract.Unmarshal(m, b) -} -func (m *SellStorageContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SellStorageContract.Marshal(b, m, deterministic) -} -func (m *SellStorageContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_SellStorageContract.Merge(m, src) -} -func (m *SellStorageContract) XXX_Size() int { - return xxx_messageInfo_SellStorageContract.Size(m) -} -func (m *SellStorageContract) XXX_DiscardUnknown() { - xxx_messageInfo_SellStorageContract.DiscardUnknown(m) -} - -var xxx_messageInfo_SellStorageContract proto.InternalMessageInfo - -func (m *SellStorageContract) GetOwnerAddress() []byte { - if m != nil { - return m.OwnerAddress - } - return nil -} - -func (m *SellStorageContract) GetStorageBytes() int64 { - if m != nil { - return m.StorageBytes - } - return 0 -} - -type ExchangeCreateContract struct { - OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" pg:"owner_address"` - FirstTokenId []byte `protobuf:"bytes,2,opt,name=first_token_id,json=firstTokenId,proto3" json:"first_token_id,omitempty" pg:"first_token_id"` - FirstTokenBalance int64 `protobuf:"varint,3,opt,name=first_token_balance,json=firstTokenBalance,proto3" json:"first_token_balance,omitempty" pg:"first_token_balance"` - SecondTokenId []byte `protobuf:"bytes,4,opt,name=second_token_id,json=secondTokenId,proto3" json:"second_token_id,omitempty" pg:"second_token_id"` - SecondTokenBalance int64 `protobuf:"varint,5,opt,name=second_token_balance,json=secondTokenBalance,proto3" json:"second_token_balance,omitempty" pg:"second_token_balance"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ExchangeCreateContract) Reset() { *m = ExchangeCreateContract{} } -func (m *ExchangeCreateContract) String() string { return proto.CompactTextString(m) } -func (*ExchangeCreateContract) ProtoMessage() {} -func (*ExchangeCreateContract) Descriptor() ([]byte, []int) { - return fileDescriptor_7b9dc9f6d5fa3557, []int{26} -} -func (m *ExchangeCreateContract) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ExchangeCreateContract.Unmarshal(m, b) -} -func (m *ExchangeCreateContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ExchangeCreateContract.Marshal(b, m, deterministic) -} -func (m *ExchangeCreateContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExchangeCreateContract.Merge(m, src) -} -func (m *ExchangeCreateContract) XXX_Size() int { - return xxx_messageInfo_ExchangeCreateContract.Size(m) -} -func (m *ExchangeCreateContract) XXX_DiscardUnknown() { - xxx_messageInfo_ExchangeCreateContract.DiscardUnknown(m) -} - -var xxx_messageInfo_ExchangeCreateContract proto.InternalMessageInfo - -func (m *ExchangeCreateContract) GetOwnerAddress() []byte { - if m != nil { - return m.OwnerAddress - } - return nil -} - -func (m *ExchangeCreateContract) GetFirstTokenId() []byte { - if m != nil { - return m.FirstTokenId - } - return nil -} - -func (m *ExchangeCreateContract) GetFirstTokenBalance() int64 { - if m != nil { - return m.FirstTokenBalance - } - return 0 -} - -func (m *ExchangeCreateContract) GetSecondTokenId() []byte { - if m != nil { - return m.SecondTokenId - } - return nil -} - -func (m *ExchangeCreateContract) GetSecondTokenBalance() int64 { - if m != nil { - return m.SecondTokenBalance - } - return 0 -} - -type ExchangeInjectContract struct { - OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" pg:"owner_address"` - ExchangeId int64 `protobuf:"varint,2,opt,name=exchange_id,json=exchangeId,proto3" json:"exchange_id,omitempty" pg:"exchange_id"` - TokenId []byte `protobuf:"bytes,3,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty" pg:"token_id"` - Quant int64 `protobuf:"varint,4,opt,name=quant,proto3" json:"quant,omitempty" pg:"quant"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ExchangeInjectContract) Reset() { *m = ExchangeInjectContract{} } -func (m *ExchangeInjectContract) String() string { return proto.CompactTextString(m) } -func (*ExchangeInjectContract) ProtoMessage() {} -func (*ExchangeInjectContract) Descriptor() ([]byte, []int) { - return fileDescriptor_7b9dc9f6d5fa3557, []int{27} -} -func (m *ExchangeInjectContract) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ExchangeInjectContract.Unmarshal(m, b) -} -func (m *ExchangeInjectContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ExchangeInjectContract.Marshal(b, m, deterministic) -} -func (m *ExchangeInjectContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExchangeInjectContract.Merge(m, src) -} -func (m *ExchangeInjectContract) XXX_Size() int { - return xxx_messageInfo_ExchangeInjectContract.Size(m) -} -func (m *ExchangeInjectContract) XXX_DiscardUnknown() { - xxx_messageInfo_ExchangeInjectContract.DiscardUnknown(m) -} - -var xxx_messageInfo_ExchangeInjectContract proto.InternalMessageInfo - -func (m *ExchangeInjectContract) GetOwnerAddress() []byte { - if m != nil { - return m.OwnerAddress - } - return nil -} - -func (m *ExchangeInjectContract) GetExchangeId() int64 { - if m != nil { - return m.ExchangeId - } - return 0 -} - -func (m *ExchangeInjectContract) GetTokenId() []byte { - if m != nil { - return m.TokenId - } - return nil -} - -func (m *ExchangeInjectContract) GetQuant() int64 { - if m != nil { - return m.Quant - } - return 0 -} - -type ExchangeWithdrawContract struct { - OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" pg:"owner_address"` - ExchangeId int64 `protobuf:"varint,2,opt,name=exchange_id,json=exchangeId,proto3" json:"exchange_id,omitempty" pg:"exchange_id"` - TokenId []byte `protobuf:"bytes,3,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty" pg:"token_id"` - Quant int64 `protobuf:"varint,4,opt,name=quant,proto3" json:"quant,omitempty" pg:"quant"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ExchangeWithdrawContract) Reset() { *m = ExchangeWithdrawContract{} } -func (m *ExchangeWithdrawContract) String() string { return proto.CompactTextString(m) } -func (*ExchangeWithdrawContract) ProtoMessage() {} -func (*ExchangeWithdrawContract) Descriptor() ([]byte, []int) { - return fileDescriptor_7b9dc9f6d5fa3557, []int{28} -} -func (m *ExchangeWithdrawContract) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ExchangeWithdrawContract.Unmarshal(m, b) -} -func (m *ExchangeWithdrawContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ExchangeWithdrawContract.Marshal(b, m, deterministic) -} -func (m *ExchangeWithdrawContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExchangeWithdrawContract.Merge(m, src) -} -func (m *ExchangeWithdrawContract) XXX_Size() int { - return xxx_messageInfo_ExchangeWithdrawContract.Size(m) -} -func (m *ExchangeWithdrawContract) XXX_DiscardUnknown() { - xxx_messageInfo_ExchangeWithdrawContract.DiscardUnknown(m) -} - -var xxx_messageInfo_ExchangeWithdrawContract proto.InternalMessageInfo - -func (m *ExchangeWithdrawContract) GetOwnerAddress() []byte { - if m != nil { - return m.OwnerAddress - } - return nil -} - -func (m *ExchangeWithdrawContract) GetExchangeId() int64 { - if m != nil { - return m.ExchangeId - } - return 0 -} - -func (m *ExchangeWithdrawContract) GetTokenId() []byte { - if m != nil { - return m.TokenId - } - return nil -} - -func (m *ExchangeWithdrawContract) GetQuant() int64 { - if m != nil { - return m.Quant - } - return 0 -} - -type ExchangeTransactionContract struct { - OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" pg:"owner_address"` - ExchangeId int64 `protobuf:"varint,2,opt,name=exchange_id,json=exchangeId,proto3" json:"exchange_id,omitempty" pg:"exchange_id"` - TokenId []byte `protobuf:"bytes,3,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty" pg:"token_id"` - Quant int64 `protobuf:"varint,4,opt,name=quant,proto3" json:"quant,omitempty" pg:"quant"` - Expected int64 `protobuf:"varint,5,opt,name=expected,proto3" json:"expected,omitempty" pg:"expected"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ExchangeTransactionContract) Reset() { *m = ExchangeTransactionContract{} } -func (m *ExchangeTransactionContract) String() string { return proto.CompactTextString(m) } -func (*ExchangeTransactionContract) ProtoMessage() {} -func (*ExchangeTransactionContract) Descriptor() ([]byte, []int) { - return fileDescriptor_7b9dc9f6d5fa3557, []int{29} -} -func (m *ExchangeTransactionContract) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ExchangeTransactionContract.Unmarshal(m, b) -} -func (m *ExchangeTransactionContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ExchangeTransactionContract.Marshal(b, m, deterministic) -} -func (m *ExchangeTransactionContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExchangeTransactionContract.Merge(m, src) -} -func (m *ExchangeTransactionContract) XXX_Size() int { - return xxx_messageInfo_ExchangeTransactionContract.Size(m) -} -func (m *ExchangeTransactionContract) XXX_DiscardUnknown() { - xxx_messageInfo_ExchangeTransactionContract.DiscardUnknown(m) -} - -var xxx_messageInfo_ExchangeTransactionContract proto.InternalMessageInfo - -func (m *ExchangeTransactionContract) GetOwnerAddress() []byte { - if m != nil { - return m.OwnerAddress - } - return nil -} - -func (m *ExchangeTransactionContract) GetExchangeId() int64 { - if m != nil { - return m.ExchangeId - } - return 0 -} - -func (m *ExchangeTransactionContract) GetTokenId() []byte { - if m != nil { - return m.TokenId - } - return nil -} - -func (m *ExchangeTransactionContract) GetQuant() int64 { - if m != nil { - return m.Quant - } - return 0 -} - -func (m *ExchangeTransactionContract) GetExpected() int64 { - if m != nil { - return m.Expected - } - return 0 -} - -func init() { - proto.RegisterEnum("protocol.ResourceCode", ResourceCode_name, ResourceCode_value) - proto.RegisterType((*AccountCreateContract)(nil), "protocol.AccountCreateContract") - proto.RegisterType((*AccountUpdateContract)(nil), "protocol.AccountUpdateContract") - proto.RegisterType((*SetAccountIdContract)(nil), "protocol.SetAccountIdContract") - proto.RegisterType((*TransferContract)(nil), "protocol.TransferContract") - proto.RegisterType((*TransferAssetContract)(nil), "protocol.TransferAssetContract") - proto.RegisterType((*VoteAssetContract)(nil), "protocol.VoteAssetContract") - proto.RegisterType((*VoteWitnessContract)(nil), "protocol.VoteWitnessContract") - proto.RegisterType((*VoteWitnessContract_Vote)(nil), "protocol.VoteWitnessContract.Vote") - proto.RegisterType((*UpdateSettingContract)(nil), "protocol.UpdateSettingContract") - proto.RegisterType((*UpdateEnergyLimitContract)(nil), "protocol.UpdateEnergyLimitContract") - proto.RegisterType((*WitnessCreateContract)(nil), "protocol.WitnessCreateContract") - proto.RegisterType((*WitnessUpdateContract)(nil), "protocol.WitnessUpdateContract") - proto.RegisterType((*AssetIssueContract)(nil), "protocol.AssetIssueContract") - proto.RegisterType((*AssetIssueContract_FrozenSupply)(nil), "protocol.AssetIssueContract.FrozenSupply") - proto.RegisterType((*ParticipateAssetIssueContract)(nil), "protocol.ParticipateAssetIssueContract") - proto.RegisterType((*FreezeBalanceContract)(nil), "protocol.FreezeBalanceContract") - proto.RegisterType((*UnfreezeBalanceContract)(nil), "protocol.UnfreezeBalanceContract") - proto.RegisterType((*UnfreezeAssetContract)(nil), "protocol.UnfreezeAssetContract") - proto.RegisterType((*WithdrawBalanceContract)(nil), "protocol.WithdrawBalanceContract") - proto.RegisterType((*UpdateAssetContract)(nil), "protocol.UpdateAssetContract") - proto.RegisterType((*ProposalCreateContract)(nil), "protocol.ProposalCreateContract") - proto.RegisterMapType((map[int64]int64)(nil), "protocol.ProposalCreateContract.ParametersEntry") - proto.RegisterType((*ProposalApproveContract)(nil), "protocol.ProposalApproveContract") - proto.RegisterType((*ProposalDeleteContract)(nil), "protocol.ProposalDeleteContract") - proto.RegisterType((*CreateSmartContract)(nil), "protocol.CreateSmartContract") - proto.RegisterType((*TriggerSmartContract)(nil), "protocol.TriggerSmartContract") - proto.RegisterType((*BuyStorageContract)(nil), "protocol.BuyStorageContract") - proto.RegisterType((*BuyStorageBytesContract)(nil), "protocol.BuyStorageBytesContract") - proto.RegisterType((*SellStorageContract)(nil), "protocol.SellStorageContract") - proto.RegisterType((*ExchangeCreateContract)(nil), "protocol.ExchangeCreateContract") - proto.RegisterType((*ExchangeInjectContract)(nil), "protocol.ExchangeInjectContract") - proto.RegisterType((*ExchangeWithdrawContract)(nil), "protocol.ExchangeWithdrawContract") - proto.RegisterType((*ExchangeTransactionContract)(nil), "protocol.ExchangeTransactionContract") -} - -func init() { - proto.RegisterFile("protos/protocol/core/Contract.proto", fileDescriptor_7b9dc9f6d5fa3557) -} - -var fileDescriptor_7b9dc9f6d5fa3557 = []byte{ - // 1568 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xcd, 0x6e, 0x1b, 0x47, - 0x12, 0xde, 0x91, 0x44, 0x49, 0x2c, 0x52, 0x12, 0x3d, 0x22, 0x45, 0x5a, 0x5e, 0xc1, 0xf2, 0x78, - 0xd7, 0x2b, 0xed, 0x41, 0x32, 0xb4, 0x17, 0xc3, 0xf0, 0x2e, 0x40, 0xfd, 0x78, 0x2d, 0xc0, 0xe0, - 0x0a, 0x23, 0xca, 0xc6, 0x7a, 0x81, 0x1d, 0xb4, 0x66, 0x4a, 0xf4, 0xc4, 0xc3, 0x99, 0x49, 0x77, - 0x8f, 0x24, 0xfa, 0x05, 0x72, 0xc8, 0x21, 0x71, 0x8e, 0x09, 0xf2, 0x02, 0x39, 0xe5, 0x92, 0x53, - 0xde, 0x21, 0xe7, 0x9c, 0xf2, 0x02, 0x41, 0xde, 0x21, 0xe8, 0x3f, 0x72, 0xa8, 0x1f, 0x44, 0x24, - 0x6c, 0xf8, 0x24, 0xf6, 0xd7, 0x55, 0xd5, 0x5f, 0x55, 0xd7, 0x4f, 0x8f, 0xe0, 0x7e, 0x4a, 0x13, - 0x9e, 0xb0, 0x4d, 0xf9, 0xc7, 0x4f, 0xa2, 0x4d, 0x3f, 0xa1, 0xb8, 0xb9, 0x93, 0xc4, 0x9c, 0x12, - 0x9f, 0x6f, 0x48, 0xd8, 0x9e, 0x35, 0xbb, 0xcb, 0x77, 0xaf, 0x14, 0x6f, 0xd3, 0x24, 0x56, 0xa2, - 0xce, 0x97, 0x16, 0xd4, 0x9a, 0xbe, 0x9f, 0x64, 0x31, 0xdf, 0xa1, 0x48, 0x38, 0x1a, 0x53, 0xf6, - 0x7d, 0x98, 0x4b, 0xce, 0x62, 0xa4, 0x1e, 0x09, 0x02, 0x8a, 0x8c, 0x35, 0xac, 0x55, 0x6b, 0xad, - 0xec, 0x96, 0x25, 0xd8, 0x54, 0x98, 0xfd, 0x37, 0x58, 0x20, 0x4a, 0xbb, 0x2f, 0x36, 0x21, 0xc5, - 0xe6, 0x35, 0x6c, 0x04, 0xd7, 0x61, 0x8a, 0xf7, 0x52, 0x6c, 0x4c, 0xae, 0x5a, 0x6b, 0xf3, 0x5b, - 0xb5, 0x0d, 0x43, 0x68, 0x43, 0x1f, 0xde, 0xee, 0xa5, 0xe8, 0x4a, 0x11, 0xc7, 0xeb, 0x33, 0x3a, - 0x4a, 0x83, 0x3c, 0xa3, 0x7b, 0x50, 0x36, 0x87, 0xc5, 0xa4, 0x8b, 0x9a, 0x50, 0x49, 0x63, 0x2d, - 0xd2, 0xc5, 0xcb, 0xa4, 0x27, 0x2e, 0x93, 0x76, 0x5e, 0x41, 0xf5, 0x10, 0xb9, 0x3e, 0x63, 0x3f, - 0xe8, 0xdb, 0x5f, 0x01, 0x30, 0xf6, 0xc3, 0x40, 0x5b, 0x2f, 0x12, 0x23, 0x76, 0x33, 0xdb, 0x31, - 0x54, 0xda, 0x94, 0xc4, 0xec, 0x04, 0xe9, 0x68, 0x91, 0x5c, 0x01, 0xe0, 0xc9, 0x05, 0xd3, 0x45, - 0x9e, 0x98, 0xed, 0x25, 0x98, 0x26, 0x5d, 0x41, 0x44, 0x46, 0x70, 0xd2, 0xd5, 0x2b, 0xe7, 0x2b, - 0x0b, 0x6a, 0xe6, 0xc0, 0x26, 0x63, 0xc8, 0x87, 0xbc, 0x11, 0x40, 0x3e, 0x56, 0x45, 0x89, 0xdc, - 0x38, 0x52, 0x17, 0x48, 0x4d, 0x5e, 0x4f, 0x6a, 0x6a, 0x88, 0xd4, 0xe7, 0x16, 0xdc, 0x7a, 0x91, - 0x70, 0x1c, 0x26, 0x74, 0xa3, 0x30, 0xdc, 0x83, 0xf2, 0x69, 0xc2, 0x31, 0xc7, 0x6a, 0x52, 0xdc, - 0xb1, 0xc0, 0x8c, 0x48, 0x03, 0x66, 0x58, 0x96, 0xa6, 0x09, 0x55, 0xb1, 0x98, 0x75, 0xcd, 0xd2, - 0xae, 0x42, 0x41, 0x5e, 0x56, 0xa3, 0xb0, 0x6a, 0xad, 0x15, 0x5c, 0xb5, 0x70, 0x7e, 0xb6, 0x60, - 0x51, 0xb0, 0x79, 0x19, 0xf2, 0x18, 0x19, 0x1b, 0x8d, 0xcf, 0x23, 0x28, 0x88, 0xb3, 0x15, 0x91, - 0xd2, 0x96, 0x33, 0x48, 0xdc, 0x2b, 0x4c, 0x4a, 0xcc, 0x55, 0x0a, 0xd7, 0xd3, 0x5c, 0x7e, 0x06, - 0x53, 0x42, 0xf0, 0x92, 0xaf, 0x3a, 0x9f, 0xf3, 0xbe, 0xae, 0x00, 0x48, 0x11, 0xe5, 0xd6, 0x84, - 0x8c, 0x72, 0x51, 0x20, 0x3b, 0xd2, 0xb5, 0xef, 0x2c, 0xa8, 0xa9, 0x22, 0x39, 0x44, 0xce, 0xc3, - 0xb8, 0x33, 0x9a, 0x73, 0xeb, 0x50, 0xf1, 0xb5, 0xc2, 0x85, 0x34, 0x58, 0x30, 0xb8, 0x11, 0x6d, - 0xc2, 0x8a, 0x9f, 0xc4, 0x2c, 0xeb, 0xa2, 0x97, 0x31, 0xa4, 0x1e, 0x45, 0x96, 0x64, 0xd4, 0x47, - 0x2f, 0x45, 0xea, 0x63, 0x3f, 0x2d, 0x97, 0xb5, 0xd0, 0x11, 0x43, 0xea, 0x6a, 0x91, 0x03, 0x25, - 0xe1, 0x7c, 0x63, 0xc1, 0x6d, 0x45, 0x76, 0x2f, 0x46, 0xda, 0xe9, 0x3d, 0x0f, 0xbb, 0x21, 0xff, - 0x60, 0x84, 0x37, 0x60, 0x31, 0xa1, 0x61, 0x27, 0x8c, 0x3d, 0x94, 0xa7, 0x79, 0x91, 0x38, 0x4e, - 0xd3, 0xbc, 0xa5, 0xb6, 0x72, 0x3c, 0x9c, 0x16, 0xd4, 0xcc, 0x6d, 0x8e, 0xd1, 0x07, 0x2b, 0x30, - 0x99, 0xd1, 0x48, 0x73, 0x11, 0x3f, 0x9d, 0xff, 0xf5, 0xed, 0x5d, 0xe8, 0x62, 0x37, 0xed, 0x06, - 0x99, 0x54, 0xf3, 0x84, 0xd9, 0xb2, 0x2a, 0x3c, 0x85, 0x1c, 0xd1, 0xc8, 0x79, 0x37, 0x0d, 0xb6, - 0x2c, 0xae, 0x7d, 0xc6, 0xb2, 0x81, 0xe9, 0x79, 0x98, 0x08, 0x83, 0xc6, 0xfa, 0xaa, 0xb5, 0x56, - 0x74, 0x27, 0xc2, 0xe0, 0x66, 0x47, 0xd9, 0x30, 0x25, 0x3b, 0x84, 0xe2, 0x2e, 0x7f, 0x0b, 0x8c, - 0x1c, 0x1f, 0x53, 0x5d, 0xf1, 0xf2, 0xb7, 0xc8, 0x56, 0x9e, 0x70, 0x12, 0x79, 0x22, 0x8d, 0xa3, - 0x9e, 0x2e, 0xf9, 0x92, 0xc4, 0x0e, 0x25, 0x64, 0xb7, 0x60, 0xee, 0x84, 0x26, 0x6f, 0x31, 0x36, - 0x32, 0x05, 0x59, 0x34, 0xeb, 0xb9, 0x6e, 0x7f, 0x89, 0xf4, 0xc6, 0x53, 0xa9, 0xa1, 0x2c, 0xb8, - 0xe5, 0x93, 0xdc, 0xca, 0xae, 0xc3, 0x0c, 0xa7, 0xe7, 0x5e, 0x9c, 0x75, 0x1b, 0xd3, 0xb2, 0xa2, - 0xa7, 0x39, 0x3d, 0x6f, 0x65, 0x5d, 0xfb, 0xcf, 0x50, 0x4c, 0x29, 0xfa, 0x21, 0x0b, 0x93, 0xb8, - 0x31, 0x23, 0xb7, 0x06, 0x80, 0xb8, 0x0c, 0xa1, 0x32, 0x2b, 0x71, 0xf1, 0x53, 0x84, 0x93, 0x71, - 0x42, 0xb9, 0xc7, 0xc3, 0x2e, 0x36, 0x8a, 0xaa, 0x8c, 0x24, 0xd2, 0x0e, 0xbb, 0x68, 0xdf, 0x86, - 0x59, 0x8c, 0x03, 0xb5, 0x09, 0x72, 0x73, 0x06, 0xe3, 0x40, 0x6e, 0x55, 0xa1, 0x90, 0xd0, 0x00, - 0x69, 0xa3, 0x24, 0x71, 0xb5, 0xe8, 0x97, 0x25, 0x13, 0xe3, 0xb4, 0x51, 0x51, 0x04, 0x04, 0x72, - 0x28, 0x00, 0x7b, 0x15, 0x4a, 0x01, 0x32, 0x9f, 0x86, 0x29, 0x17, 0x04, 0xab, 0xaa, 0xae, 0x73, - 0x90, 0xc9, 0x97, 0x5a, 0x3f, 0x5f, 0xec, 0x4d, 0xa8, 0x9e, 0x50, 0x44, 0x4f, 0xf7, 0x6c, 0xe4, - 0x3a, 0x61, 0x97, 0x54, 0xc2, 0x8a, 0x3d, 0x19, 0xbc, 0x16, 0x72, 0x99, 0xb0, 0xf6, 0x13, 0xb8, - 0x93, 0x66, 0xc7, 0x51, 0xe8, 0x7b, 0x57, 0xea, 0xd5, 0xa5, 0x5e, 0x5d, 0x89, 0x3c, 0xbd, 0xb9, - 0x76, 0xc6, 0x48, 0x07, 0x1b, 0x8d, 0xeb, 0xb4, 0x8f, 0xc4, 0x76, 0x4e, 0x3b, 0x22, 0x1c, 0x19, - 0x57, 0x46, 0x84, 0xba, 0x8c, 0xe1, 0xed, 0xbc, 0xf6, 0x73, 0x29, 0x21, 0x6c, 0xb4, 0x50, 0x86, - 0x7b, 0xb9, 0x0d, 0xe5, 0xfc, 0xa5, 0x8b, 0x34, 0xd5, 0x69, 0xa3, 0xa7, 0x89, 0x25, 0xf5, 0x75, - 0x2e, 0x34, 0x25, 0x66, 0xdf, 0x85, 0x92, 0x16, 0x0a, 0x48, 0x8f, 0xe9, 0x56, 0x08, 0x0a, 0xda, - 0x25, 0x3d, 0xe6, 0x7c, 0x6d, 0xc1, 0xca, 0x01, 0xa1, 0x3c, 0xf4, 0xc3, 0x94, 0xe8, 0xd9, 0x33, - 0x5c, 0x1e, 0xef, 0x63, 0x0e, 0x0f, 0x4f, 0xd5, 0xc9, 0x8b, 0x53, 0xf5, 0xba, 0x89, 0xf8, 0xab, - 0x05, 0x35, 0x11, 0x82, 0xb7, 0xb8, 0x4d, 0x22, 0x12, 0xfb, 0x23, 0x92, 0xfa, 0x2b, 0xcc, 0x6b, - 0xe7, 0x8f, 0x95, 0xba, 0xf6, 0x5f, 0xc7, 0x4d, 0xdb, 0x14, 0xaf, 0x31, 0x13, 0xa3, 0x8c, 0x12, - 0x99, 0x7b, 0xaa, 0xdf, 0x69, 0xed, 0x5d, 0x8d, 0xda, 0x5b, 0x30, 0x6b, 0x1a, 0xb8, 0x4c, 0xf8, - 0xf9, 0xad, 0xa5, 0x41, 0x8d, 0x9a, 0xbe, 0xbd, 0x93, 0x04, 0xe8, 0xf6, 0xe5, 0x44, 0xef, 0xa5, - 0xe8, 0x63, 0x78, 0x9a, 0xe3, 0xba, 0xa0, 0x7a, 0xaf, 0xc1, 0xcd, 0x23, 0xe8, 0x5b, 0x0b, 0xea, - 0x47, 0xf1, 0xc9, 0xf8, 0xfe, 0x7e, 0x60, 0x7e, 0x4f, 0xa0, 0x66, 0xe8, 0x8d, 0xfe, 0x44, 0x71, - 0xfe, 0x05, 0xf5, 0x97, 0x21, 0x7f, 0x1d, 0x50, 0x72, 0x36, 0x8e, 0x73, 0xce, 0x0f, 0x16, 0x2c, - 0xaa, 0x99, 0x30, 0xc6, 0xfb, 0xe8, 0x42, 0x6b, 0x99, 0xb8, 0xb6, 0xb5, 0x4c, 0x0e, 0x5a, 0xcb, - 0x1d, 0x28, 0xc6, 0x78, 0xa6, 0xfb, 0x82, 0xca, 0xcb, 0xd9, 0x18, 0xcf, 0x54, 0x23, 0x58, 0x83, - 0x8a, 0xd8, 0x34, 0xe5, 0x2c, 0x65, 0x0a, 0x2a, 0x69, 0x62, 0x3c, 0x3b, 0x50, 0x25, 0x2c, 0x27, - 0xe4, 0x4f, 0x16, 0x2c, 0x1d, 0xd0, 0x24, 0x4d, 0x18, 0x89, 0xc6, 0x99, 0x91, 0x07, 0x00, 0x29, - 0xa1, 0xa4, 0x8b, 0x1c, 0xa9, 0x79, 0x4f, 0x3d, 0x1c, 0x5c, 0xeb, 0xd5, 0xa6, 0x37, 0x0e, 0xfa, - 0x2a, 0x7b, 0x31, 0xa7, 0x3d, 0x37, 0x67, 0x63, 0xf9, 0x9f, 0xb0, 0x70, 0x61, 0x5b, 0x78, 0xff, - 0x06, 0x7b, 0xba, 0x83, 0x88, 0x9f, 0xa2, 0x83, 0x9f, 0x92, 0x28, 0x33, 0x25, 0xa3, 0x16, 0x8f, - 0x27, 0x1e, 0x59, 0xce, 0x67, 0x16, 0xd4, 0xcd, 0xa9, 0xcd, 0x34, 0xa5, 0xc9, 0xe9, 0x88, 0x1e, - 0xdd, 0x85, 0x52, 0xaa, 0xf5, 0xc5, 0x17, 0x83, 0xee, 0x49, 0x06, 0xda, 0x0f, 0xec, 0x07, 0xb0, - 0x10, 0x32, 0x61, 0xc2, 0x23, 0xd2, 0x3e, 0x89, 0xf4, 0x5b, 0x70, 0x2e, 0x64, 0xcd, 0x20, 0x68, - 0x6a, 0xd0, 0xf9, 0xff, 0x20, 0xb2, 0xbb, 0x18, 0x21, 0x7f, 0xcf, 0x3c, 0x9c, 0x1f, 0x2d, 0x58, - 0x54, 0x71, 0x3d, 0xec, 0x12, 0x3a, 0x62, 0xca, 0x3d, 0x86, 0xb2, 0xc8, 0x10, 0xf3, 0xc0, 0x92, - 0xe6, 0x4b, 0x5b, 0xf5, 0xc1, 0xcd, 0x0d, 0xd9, 0x74, 0x4b, 0x31, 0x9e, 0xf5, 0x0f, 0x58, 0x83, - 0x8a, 0x4f, 0xa2, 0xc8, 0xe3, 0xc9, 0x1b, 0x8c, 0x3d, 0x75, 0x0f, 0xba, 0x25, 0x09, 0xbc, 0x2d, - 0xe0, 0x17, 0x02, 0x15, 0x33, 0x58, 0x09, 0x85, 0x81, 0xce, 0xd1, 0x19, 0xb9, 0xde, 0x0f, 0x9c, - 0x5f, 0x2c, 0xa8, 0xb6, 0x69, 0xd8, 0xe9, 0x20, 0x1d, 0x83, 0xfe, 0x08, 0x6f, 0xc6, 0x15, 0x00, - 0xc9, 0x36, 0xcf, 0xb3, 0x28, 0x10, 0x45, 0xd1, 0x86, 0xa9, 0x80, 0x70, 0x22, 0xe9, 0x95, 0x5d, - 0xf9, 0xfb, 0x4a, 0x07, 0x0b, 0x7f, 0xe8, 0xe0, 0xf4, 0xb0, 0x83, 0xff, 0x01, 0x7b, 0x3b, 0xeb, - 0x1d, 0xf2, 0x84, 0x92, 0xce, 0x88, 0x57, 0x5f, 0x85, 0xc2, 0xa7, 0x19, 0xe9, 0x7f, 0x1b, 0xa8, - 0x85, 0xd3, 0x86, 0xfa, 0xc0, 0xe0, 0x76, 0x8f, 0x23, 0x1b, 0xd9, 0xea, 0x71, 0x4f, 0x7d, 0xf5, - 0x48, 0xab, 0x72, 0xe1, 0x78, 0xb0, 0x78, 0x88, 0x51, 0x34, 0x16, 0xcf, 0xfb, 0x30, 0xc7, 0x94, - 0x9e, 0x97, 0xb7, 0x5c, 0x66, 0x39, 0x8e, 0xce, 0x6f, 0x16, 0x2c, 0xed, 0x9d, 0xfb, 0xaf, 0x49, - 0xdc, 0xc1, 0x71, 0x3a, 0xcc, 0x5f, 0x60, 0xfe, 0x24, 0xa4, 0x8c, 0x7b, 0xfd, 0x40, 0xeb, 0x8f, - 0x5a, 0x89, 0xb6, 0x55, 0xb4, 0xc5, 0x97, 0x41, 0x5e, 0xca, 0x4c, 0x54, 0xfd, 0x65, 0x30, 0x10, - 0x35, 0x53, 0xf5, 0x01, 0x2c, 0x30, 0xf4, 0x13, 0xf1, 0x40, 0xcc, 0x27, 0x68, 0xd9, 0x9d, 0x53, - 0xb0, 0xb1, 0xfb, 0x10, 0xaa, 0x43, 0x72, 0xc6, 0xb0, 0x4a, 0x07, 0x3b, 0x27, 0xac, 0x2d, 0x3b, - 0x5f, 0xe4, 0xfc, 0xdd, 0x8f, 0x3f, 0x41, 0x9f, 0x8f, 0x5c, 0xf7, 0xa8, 0xd5, 0x73, 0x75, 0x6f, - 0xa0, 0xfd, 0x60, 0x28, 0xe7, 0xd4, 0x40, 0x30, 0x39, 0x37, 0x48, 0x9c, 0xa9, 0x7c, 0xe2, 0xbc, - 0xb3, 0xa0, 0x61, 0x18, 0x99, 0x21, 0xf7, 0xb1, 0x39, 0x7d, 0x6f, 0xc1, 0x1d, 0xc3, 0x49, 0xfe, - 0xab, 0x83, 0xf8, 0x62, 0xd0, 0x7d, 0x64, 0x5a, 0xf6, 0x32, 0xcc, 0xe2, 0x79, 0x8a, 0x3e, 0xc7, - 0x40, 0x5f, 0x71, 0x7f, 0xfd, 0xf7, 0x75, 0x28, 0xe7, 0x5f, 0x29, 0xf6, 0x1c, 0x14, 0xb7, 0x9b, - 0xad, 0xdd, 0x97, 0xfb, 0xbb, 0xed, 0x67, 0x95, 0x3f, 0xd9, 0x00, 0xd3, 0x7b, 0xad, 0x3d, 0xf7, - 0xdf, 0xff, 0xad, 0x58, 0xdb, 0x0b, 0xaf, 0xe6, 0xfa, 0x8d, 0x54, 0x7c, 0x3c, 0x1c, 0x4f, 0xcb, - 0xe5, 0x3f, 0x7e, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x6c, 0xc1, 0xad, 0xff, 0xea, 0x13, 0x00, 0x00, -} diff --git a/protos/protocol/core/Contract.proto b/protos/protocol/core/Contract.proto deleted file mode 100644 index e04749e..0000000 --- a/protos/protocol/core/Contract.proto +++ /dev/null @@ -1,237 +0,0 @@ -// -// * java-protocol 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-protocol 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 go_package = "protocol.core"; - -import "protos/protocol/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; // 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; -} - -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 UpdateEnergyLimitContract { - bytes owner_address = 1; - bytes contract_address = 2; - int64 origin_energy_limit = 3; -} - -message WitnessCreateContract { - bytes owner_address = 1; - bytes url = 2; -} - -message WitnessUpdateContract { - bytes owner_address = 1; - bytes update_url = 12; -} - -message AssetIssueContract { - string id = 41; - 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 precision = 7; - int32 num = 8; - int64 start_time = 9; - int64 end_time = 10; - int64 order = 11; // useless - 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; // 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 -} - -enum ResourceCode { - BANDWIDTH = 0; - ENERGY = 1; -} - -message FreezeBalanceContract { - bytes owner_address = 1; - int64 frozen_balance = 2; - 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 { - 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; - int64 call_token_value = 3; - int64 token_id = 4; -} - -message TriggerSmartContract { - bytes owner_address = 1; - bytes contract_address = 2; - int64 call_value = 3; - bytes data = 4; - int64 call_token_value = 5; - int64 token_id = 6; -} - -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; -} diff --git a/protos/protocol/core/Discover.pb.go b/protos/protocol/core/Discover.pb.go deleted file mode 100644 index d2a8198..0000000 --- a/protos/protocol/core/Discover.pb.go +++ /dev/null @@ -1,383 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: protos/protocol/core/Discover.proto - -package protocol_core - -import ( - fmt "fmt" - proto "github.com/tron-us/protobuf/proto" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type Endpoint struct { - Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" pg:"address"` - Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty" pg:"port"` - NodeId []byte `protobuf:"bytes,3,opt,name=nodeId,proto3" json:"nodeId,omitempty" pg:"nodeId"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Endpoint) Reset() { *m = Endpoint{} } -func (m *Endpoint) String() string { return proto.CompactTextString(m) } -func (*Endpoint) ProtoMessage() {} -func (*Endpoint) Descriptor() ([]byte, []int) { - return fileDescriptor_4e655175b68e54eb, []int{0} -} -func (m *Endpoint) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Endpoint.Unmarshal(m, b) -} -func (m *Endpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Endpoint.Marshal(b, m, deterministic) -} -func (m *Endpoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_Endpoint.Merge(m, src) -} -func (m *Endpoint) XXX_Size() int { - return xxx_messageInfo_Endpoint.Size(m) -} -func (m *Endpoint) XXX_DiscardUnknown() { - xxx_messageInfo_Endpoint.DiscardUnknown(m) -} - -var xxx_messageInfo_Endpoint proto.InternalMessageInfo - -func (m *Endpoint) GetAddress() []byte { - if m != nil { - return m.Address - } - return nil -} - -func (m *Endpoint) GetPort() int32 { - if m != nil { - return m.Port - } - return 0 -} - -func (m *Endpoint) GetNodeId() []byte { - if m != nil { - return m.NodeId - } - return nil -} - -type PingMessage struct { - From *Endpoint `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty" pg:"from"` - To *Endpoint `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty" pg:"to"` - Version int32 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty" pg:"version"` - Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty" pg:"timestamp"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *PingMessage) Reset() { *m = PingMessage{} } -func (m *PingMessage) String() string { return proto.CompactTextString(m) } -func (*PingMessage) ProtoMessage() {} -func (*PingMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_4e655175b68e54eb, []int{1} -} -func (m *PingMessage) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PingMessage.Unmarshal(m, b) -} -func (m *PingMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PingMessage.Marshal(b, m, deterministic) -} -func (m *PingMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_PingMessage.Merge(m, src) -} -func (m *PingMessage) XXX_Size() int { - return xxx_messageInfo_PingMessage.Size(m) -} -func (m *PingMessage) XXX_DiscardUnknown() { - xxx_messageInfo_PingMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_PingMessage proto.InternalMessageInfo - -func (m *PingMessage) GetFrom() *Endpoint { - if m != nil { - return m.From - } - return nil -} - -func (m *PingMessage) GetTo() *Endpoint { - if m != nil { - return m.To - } - return nil -} - -func (m *PingMessage) GetVersion() int32 { - if m != nil { - return m.Version - } - return 0 -} - -func (m *PingMessage) GetTimestamp() int64 { - if m != nil { - return m.Timestamp - } - return 0 -} - -type PongMessage struct { - From *Endpoint `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty" pg:"from"` - Echo int32 `protobuf:"varint,2,opt,name=echo,proto3" json:"echo,omitempty" pg:"echo"` - Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty" pg:"timestamp"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *PongMessage) Reset() { *m = PongMessage{} } -func (m *PongMessage) String() string { return proto.CompactTextString(m) } -func (*PongMessage) ProtoMessage() {} -func (*PongMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_4e655175b68e54eb, []int{2} -} -func (m *PongMessage) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PongMessage.Unmarshal(m, b) -} -func (m *PongMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PongMessage.Marshal(b, m, deterministic) -} -func (m *PongMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_PongMessage.Merge(m, src) -} -func (m *PongMessage) XXX_Size() int { - return xxx_messageInfo_PongMessage.Size(m) -} -func (m *PongMessage) XXX_DiscardUnknown() { - xxx_messageInfo_PongMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_PongMessage proto.InternalMessageInfo - -func (m *PongMessage) GetFrom() *Endpoint { - if m != nil { - return m.From - } - return nil -} - -func (m *PongMessage) GetEcho() int32 { - if m != nil { - return m.Echo - } - return 0 -} - -func (m *PongMessage) GetTimestamp() int64 { - if m != nil { - return m.Timestamp - } - return 0 -} - -type FindNeighbours struct { - From *Endpoint `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty" pg:"from"` - TargetId []byte `protobuf:"bytes,2,opt,name=targetId,proto3" json:"targetId,omitempty" pg:"targetId"` - Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty" pg:"timestamp"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *FindNeighbours) Reset() { *m = FindNeighbours{} } -func (m *FindNeighbours) String() string { return proto.CompactTextString(m) } -func (*FindNeighbours) ProtoMessage() {} -func (*FindNeighbours) Descriptor() ([]byte, []int) { - return fileDescriptor_4e655175b68e54eb, []int{3} -} -func (m *FindNeighbours) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FindNeighbours.Unmarshal(m, b) -} -func (m *FindNeighbours) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FindNeighbours.Marshal(b, m, deterministic) -} -func (m *FindNeighbours) XXX_Merge(src proto.Message) { - xxx_messageInfo_FindNeighbours.Merge(m, src) -} -func (m *FindNeighbours) XXX_Size() int { - return xxx_messageInfo_FindNeighbours.Size(m) -} -func (m *FindNeighbours) XXX_DiscardUnknown() { - xxx_messageInfo_FindNeighbours.DiscardUnknown(m) -} - -var xxx_messageInfo_FindNeighbours proto.InternalMessageInfo - -func (m *FindNeighbours) GetFrom() *Endpoint { - if m != nil { - return m.From - } - return nil -} - -func (m *FindNeighbours) GetTargetId() []byte { - if m != nil { - return m.TargetId - } - return nil -} - -func (m *FindNeighbours) GetTimestamp() int64 { - if m != nil { - return m.Timestamp - } - return 0 -} - -type Neighbours struct { - From *Endpoint `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty" pg:"from"` - Neighbours []*Endpoint `protobuf:"bytes,2,rep,name=neighbours,proto3" json:"neighbours,omitempty" pg:"neighbours"` - Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty" pg:"timestamp"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Neighbours) Reset() { *m = Neighbours{} } -func (m *Neighbours) String() string { return proto.CompactTextString(m) } -func (*Neighbours) ProtoMessage() {} -func (*Neighbours) Descriptor() ([]byte, []int) { - return fileDescriptor_4e655175b68e54eb, []int{4} -} -func (m *Neighbours) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Neighbours.Unmarshal(m, b) -} -func (m *Neighbours) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Neighbours.Marshal(b, m, deterministic) -} -func (m *Neighbours) XXX_Merge(src proto.Message) { - xxx_messageInfo_Neighbours.Merge(m, src) -} -func (m *Neighbours) XXX_Size() int { - return xxx_messageInfo_Neighbours.Size(m) -} -func (m *Neighbours) XXX_DiscardUnknown() { - xxx_messageInfo_Neighbours.DiscardUnknown(m) -} - -var xxx_messageInfo_Neighbours proto.InternalMessageInfo - -func (m *Neighbours) GetFrom() *Endpoint { - if m != nil { - return m.From - } - return nil -} - -func (m *Neighbours) GetNeighbours() []*Endpoint { - if m != nil { - return m.Neighbours - } - return nil -} - -func (m *Neighbours) GetTimestamp() int64 { - if m != nil { - return m.Timestamp - } - return 0 -} - -type BackupMessage struct { - Flag bool `protobuf:"varint,1,opt,name=flag,proto3" json:"flag,omitempty" pg:"flag"` - Priority int32 `protobuf:"varint,2,opt,name=priority,proto3" json:"priority,omitempty" pg:"priority"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *BackupMessage) Reset() { *m = BackupMessage{} } -func (m *BackupMessage) String() string { return proto.CompactTextString(m) } -func (*BackupMessage) ProtoMessage() {} -func (*BackupMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_4e655175b68e54eb, []int{5} -} -func (m *BackupMessage) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BackupMessage.Unmarshal(m, b) -} -func (m *BackupMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BackupMessage.Marshal(b, m, deterministic) -} -func (m *BackupMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_BackupMessage.Merge(m, src) -} -func (m *BackupMessage) XXX_Size() int { - return xxx_messageInfo_BackupMessage.Size(m) -} -func (m *BackupMessage) XXX_DiscardUnknown() { - xxx_messageInfo_BackupMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_BackupMessage proto.InternalMessageInfo - -func (m *BackupMessage) GetFlag() bool { - if m != nil { - return m.Flag - } - return false -} - -func (m *BackupMessage) GetPriority() int32 { - if m != nil { - return m.Priority - } - return 0 -} - -func init() { - proto.RegisterType((*Endpoint)(nil), "protocol.Endpoint") - proto.RegisterType((*PingMessage)(nil), "protocol.PingMessage") - proto.RegisterType((*PongMessage)(nil), "protocol.PongMessage") - proto.RegisterType((*FindNeighbours)(nil), "protocol.FindNeighbours") - proto.RegisterType((*Neighbours)(nil), "protocol.Neighbours") - proto.RegisterType((*BackupMessage)(nil), "protocol.BackupMessage") -} - -func init() { - proto.RegisterFile("protos/protocol/core/Discover.proto", fileDescriptor_4e655175b68e54eb) -} - -var fileDescriptor_4e655175b68e54eb = []byte{ - // 330 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0x4d, 0x4b, 0xfb, 0x40, - 0x10, 0xc6, 0xc9, 0x4b, 0xfb, 0xcf, 0x7f, 0xda, 0x2a, 0xec, 0x41, 0x82, 0x78, 0x08, 0x11, 0xa4, - 0xa7, 0x16, 0xea, 0x07, 0x10, 0x8a, 0x0a, 0x3d, 0x28, 0x65, 0x8f, 0xde, 0xd2, 0xec, 0x36, 0x5d, - 0x6c, 0x77, 0xc2, 0xee, 0xb6, 0xe0, 0x17, 0xf0, 0xee, 0x37, 0x96, 0x0c, 0xdd, 0xf8, 0x82, 0x52, - 0xf5, 0x94, 0x79, 0x66, 0x9e, 0xe4, 0xf7, 0xcc, 0x10, 0x38, 0xaf, 0x0d, 0x3a, 0xb4, 0x63, 0x7a, - 0x94, 0xb8, 0x1e, 0x97, 0x68, 0xe4, 0xf8, 0x5a, 0xd9, 0x12, 0x77, 0xd2, 0x8c, 0xa8, 0xcd, 0x12, - 0x3f, 0xcd, 0xe7, 0x90, 0xdc, 0x68, 0x51, 0xa3, 0xd2, 0x8e, 0xa5, 0xf0, 0xaf, 0x10, 0xc2, 0x48, - 0x6b, 0xd3, 0x20, 0x0b, 0x86, 0x7d, 0xee, 0x25, 0x63, 0x10, 0xd7, 0x68, 0x5c, 0x1a, 0x66, 0xc1, - 0xb0, 0xc3, 0xa9, 0x66, 0x27, 0xd0, 0xd5, 0x28, 0xe4, 0x4c, 0xa4, 0x11, 0x99, 0xf7, 0x2a, 0x7f, - 0x09, 0xa0, 0x37, 0x57, 0xba, 0xba, 0x93, 0xd6, 0x16, 0x95, 0x64, 0x17, 0x10, 0x2f, 0x0d, 0x6e, - 0xe8, 0x93, 0xbd, 0x09, 0x1b, 0x79, 0xf4, 0xc8, 0x73, 0x39, 0xcd, 0x59, 0x0e, 0xa1, 0x43, 0x22, - 0x7c, 0xed, 0x0a, 0x1d, 0x36, 0x09, 0x77, 0xd2, 0x58, 0x85, 0x9a, 0xa0, 0x1d, 0xee, 0x25, 0x3b, - 0x83, 0xff, 0x4e, 0x6d, 0xa4, 0x75, 0xc5, 0xa6, 0x4e, 0xe3, 0x2c, 0x18, 0x46, 0xfc, 0xad, 0x91, - 0x57, 0xd0, 0x9b, 0xe3, 0xef, 0x23, 0x31, 0x88, 0x65, 0xb9, 0x42, 0xbf, 0x76, 0x53, 0x7f, 0x04, - 0x45, 0x9f, 0x41, 0x06, 0x8e, 0x6e, 0x95, 0x16, 0xf7, 0x52, 0x55, 0xab, 0x05, 0x6e, 0x8d, 0xfd, - 0x31, 0xeb, 0x14, 0x12, 0x57, 0x98, 0x4a, 0xba, 0x99, 0x20, 0x5e, 0x9f, 0xb7, 0xfa, 0x00, 0xf3, - 0x39, 0x00, 0xf8, 0x03, 0x70, 0x02, 0xa0, 0xdb, 0xb7, 0xd2, 0x30, 0x8b, 0xbe, 0x71, 0xbf, 0x73, - 0x1d, 0x08, 0x72, 0x05, 0x83, 0x69, 0x51, 0x3e, 0x6e, 0x6b, 0x7f, 0x67, 0x06, 0xf1, 0x72, 0x5d, - 0x54, 0x14, 0x25, 0xe1, 0x54, 0x37, 0x7b, 0xd6, 0x46, 0xa1, 0x51, 0xee, 0x69, 0x7f, 0xd7, 0x56, - 0x4f, 0x8f, 0x1f, 0x06, 0x2d, 0xbf, 0xf9, 0x6d, 0x17, 0x5d, 0x92, 0x97, 0xaf, 0x01, 0x00, 0x00, - 0xff, 0xff, 0x0d, 0xe6, 0xa2, 0x04, 0xd5, 0x02, 0x00, 0x00, -} diff --git a/protos/protocol/core/Discover.proto b/protos/protocol/core/Discover.proto deleted file mode 100644 index 99a5b9d..0000000 --- a/protos/protocol/core/Discover.proto +++ /dev/null @@ -1,41 +0,0 @@ -syntax = "proto3"; - -package protocol; - -option go_package = "protocol.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; -} diff --git a/protos/protocol/core/Tron.pb.go b/protos/protocol/core/Tron.pb.go deleted file mode 100644 index 3b6c25a..0000000 --- a/protos/protocol/core/Tron.pb.go +++ /dev/null @@ -1,4078 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: protos/protocol/core/Tron.proto - -package protocol_core - -import ( - fmt "fmt" - types "github.com/gogo/protobuf/types" - proto "github.com/tron-us/protobuf/proto" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type AccountType int32 - -const ( - AccountType_Normal AccountType = 0 - AccountType_AssetIssue AccountType = 1 - AccountType_Contract AccountType = 2 -) - -var AccountType_name = map[int32]string{ - 0: "Normal", - 1: "AssetIssue", - 2: "Contract", -} - -var AccountType_value = map[string]int32{ - "Normal": 0, - "AssetIssue": 1, - "Contract": 2, -} - -func (x AccountType) String() string { - return proto.EnumName(AccountType_name, int32(x)) -} - -func (AccountType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{0} -} - -type ReasonCode int32 - -const ( - ReasonCode_REQUESTED ReasonCode = 0 - ReasonCode_BAD_PROTOCOL ReasonCode = 2 - ReasonCode_TOO_MANY_PEERS ReasonCode = 4 - ReasonCode_DUPLICATE_PEER ReasonCode = 5 - ReasonCode_INCOMPATIBLE_PROTOCOL ReasonCode = 6 - ReasonCode_NULL_IDENTITY ReasonCode = 7 - ReasonCode_PEER_QUITING ReasonCode = 8 - ReasonCode_UNEXPECTED_IDENTITY ReasonCode = 9 - ReasonCode_LOCAL_IDENTITY ReasonCode = 10 - ReasonCode_PING_TIMEOUT ReasonCode = 11 - ReasonCode_USER_REASON ReasonCode = 16 - ReasonCode_RESET ReasonCode = 17 - ReasonCode_SYNC_FAIL ReasonCode = 18 - ReasonCode_FETCH_FAIL ReasonCode = 19 - ReasonCode_BAD_TX ReasonCode = 20 - ReasonCode_BAD_BLOCK ReasonCode = 21 - ReasonCode_FORKED ReasonCode = 22 - ReasonCode_UNLINKABLE ReasonCode = 23 - ReasonCode_INCOMPATIBLE_VERSION ReasonCode = 24 - ReasonCode_INCOMPATIBLE_CHAIN ReasonCode = 25 - ReasonCode_TIME_OUT ReasonCode = 32 - ReasonCode_CONNECT_FAIL ReasonCode = 33 - ReasonCode_TOO_MANY_PEERS_WITH_SAME_IP ReasonCode = 34 - ReasonCode_UNKNOWN ReasonCode = 255 -) - -var ReasonCode_name = map[int32]string{ - 0: "REQUESTED", - 2: "BAD_PROTOCOL", - 4: "TOO_MANY_PEERS", - 5: "DUPLICATE_PEER", - 6: "INCOMPATIBLE_PROTOCOL", - 7: "NULL_IDENTITY", - 8: "PEER_QUITING", - 9: "UNEXPECTED_IDENTITY", - 10: "LOCAL_IDENTITY", - 11: "PING_TIMEOUT", - 16: "USER_REASON", - 17: "RESET", - 18: "SYNC_FAIL", - 19: "FETCH_FAIL", - 20: "BAD_TX", - 21: "BAD_BLOCK", - 22: "FORKED", - 23: "UNLINKABLE", - 24: "INCOMPATIBLE_VERSION", - 25: "INCOMPATIBLE_CHAIN", - 32: "TIME_OUT", - 33: "CONNECT_FAIL", - 34: "TOO_MANY_PEERS_WITH_SAME_IP", - 255: "UNKNOWN", -} - -var ReasonCode_value = map[string]int32{ - "REQUESTED": 0, - "BAD_PROTOCOL": 2, - "TOO_MANY_PEERS": 4, - "DUPLICATE_PEER": 5, - "INCOMPATIBLE_PROTOCOL": 6, - "NULL_IDENTITY": 7, - "PEER_QUITING": 8, - "UNEXPECTED_IDENTITY": 9, - "LOCAL_IDENTITY": 10, - "PING_TIMEOUT": 11, - "USER_REASON": 16, - "RESET": 17, - "SYNC_FAIL": 18, - "FETCH_FAIL": 19, - "BAD_TX": 20, - "BAD_BLOCK": 21, - "FORKED": 22, - "UNLINKABLE": 23, - "INCOMPATIBLE_VERSION": 24, - "INCOMPATIBLE_CHAIN": 25, - "TIME_OUT": 32, - "CONNECT_FAIL": 33, - "TOO_MANY_PEERS_WITH_SAME_IP": 34, - "UNKNOWN": 255, -} - -func (x ReasonCode) String() string { - return proto.EnumName(ReasonCode_name, int32(x)) -} - -func (ReasonCode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{1} -} - -type Proposal_State int32 - -const ( - Proposal_PENDING Proposal_State = 0 - Proposal_DISAPPROVED Proposal_State = 1 - Proposal_APPROVED Proposal_State = 2 - Proposal_CANCELED Proposal_State = 3 -) - -var Proposal_State_name = map[int32]string{ - 0: "PENDING", - 1: "DISAPPROVED", - 2: "APPROVED", - 3: "CANCELED", -} - -var Proposal_State_value = map[string]int32{ - "PENDING": 0, - "DISAPPROVED": 1, - "APPROVED": 2, - "CANCELED": 3, -} - -func (x Proposal_State) String() string { - return proto.EnumName(Proposal_State_name, int32(x)) -} - -func (Proposal_State) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{2, 0} -} - -type Transaction_Contract_ContractType int32 - -const ( - Transaction_Contract_AccountCreateContract Transaction_Contract_ContractType = 0 - Transaction_Contract_TransferContract Transaction_Contract_ContractType = 1 - Transaction_Contract_TransferAssetContract Transaction_Contract_ContractType = 2 - Transaction_Contract_VoteAssetContract Transaction_Contract_ContractType = 3 - Transaction_Contract_VoteWitnessContract Transaction_Contract_ContractType = 4 - Transaction_Contract_WitnessCreateContract Transaction_Contract_ContractType = 5 - Transaction_Contract_AssetIssueContract Transaction_Contract_ContractType = 6 - Transaction_Contract_WitnessUpdateContract Transaction_Contract_ContractType = 8 - Transaction_Contract_ParticipateAssetIssueContract Transaction_Contract_ContractType = 9 - Transaction_Contract_AccountUpdateContract Transaction_Contract_ContractType = 10 - Transaction_Contract_FreezeBalanceContract Transaction_Contract_ContractType = 11 - Transaction_Contract_UnfreezeBalanceContract Transaction_Contract_ContractType = 12 - Transaction_Contract_WithdrawBalanceContract Transaction_Contract_ContractType = 13 - Transaction_Contract_UnfreezeAssetContract Transaction_Contract_ContractType = 14 - Transaction_Contract_UpdateAssetContract Transaction_Contract_ContractType = 15 - Transaction_Contract_ProposalCreateContract Transaction_Contract_ContractType = 16 - Transaction_Contract_ProposalApproveContract Transaction_Contract_ContractType = 17 - Transaction_Contract_ProposalDeleteContract Transaction_Contract_ContractType = 18 - Transaction_Contract_SetAccountIdContract Transaction_Contract_ContractType = 19 - Transaction_Contract_CustomContract Transaction_Contract_ContractType = 20 - // BuyStorageContract = 21; - // BuyStorageBytesContract = 22; - // SellStorageContract = 23; - Transaction_Contract_CreateSmartContract Transaction_Contract_ContractType = 30 - Transaction_Contract_TriggerSmartContract Transaction_Contract_ContractType = 31 - Transaction_Contract_GetContract Transaction_Contract_ContractType = 32 - Transaction_Contract_UpdateSettingContract Transaction_Contract_ContractType = 33 - Transaction_Contract_ExchangeCreateContract Transaction_Contract_ContractType = 41 - Transaction_Contract_ExchangeInjectContract Transaction_Contract_ContractType = 42 - Transaction_Contract_ExchangeWithdrawContract Transaction_Contract_ContractType = 43 - Transaction_Contract_ExchangeTransactionContract Transaction_Contract_ContractType = 44 - Transaction_Contract_UpdateEnergyLimitContract Transaction_Contract_ContractType = 45 -) - -var Transaction_Contract_ContractType_name = map[int32]string{ - 0: "AccountCreateContract", - 1: "TransferContract", - 2: "TransferAssetContract", - 3: "VoteAssetContract", - 4: "VoteWitnessContract", - 5: "WitnessCreateContract", - 6: "AssetIssueContract", - 8: "WitnessUpdateContract", - 9: "ParticipateAssetIssueContract", - 10: "AccountUpdateContract", - 11: "FreezeBalanceContract", - 12: "UnfreezeBalanceContract", - 13: "WithdrawBalanceContract", - 14: "UnfreezeAssetContract", - 15: "UpdateAssetContract", - 16: "ProposalCreateContract", - 17: "ProposalApproveContract", - 18: "ProposalDeleteContract", - 19: "SetAccountIdContract", - 20: "CustomContract", - 30: "CreateSmartContract", - 31: "TriggerSmartContract", - 32: "GetContract", - 33: "UpdateSettingContract", - 41: "ExchangeCreateContract", - 42: "ExchangeInjectContract", - 43: "ExchangeWithdrawContract", - 44: "ExchangeTransactionContract", - 45: "UpdateEnergyLimitContract", -} - -var Transaction_Contract_ContractType_value = map[string]int32{ - "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, - "UpdateEnergyLimitContract": 45, -} - -func (x Transaction_Contract_ContractType) String() string { - return proto.EnumName(Transaction_Contract_ContractType_name, int32(x)) -} - -func (Transaction_Contract_ContractType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{15, 0, 0} -} - -type Transaction_ResultCode int32 - -const ( - Transaction_Result_SUCESS Transaction_ResultCode = 0 - Transaction_Result_FAILED Transaction_ResultCode = 1 -) - -var Transaction_ResultCode_name = map[int32]string{ - 0: "SUCESS", - 1: "FAILED", -} - -var Transaction_ResultCode_value = map[string]int32{ - "SUCESS": 0, - "FAILED": 1, -} - -func (x Transaction_ResultCode) String() string { - return proto.EnumName(Transaction_ResultCode_name, int32(x)) -} - -func (Transaction_ResultCode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{15, 1, 0} -} - -type Transaction_ResultContractResult int32 - -const ( - Transaction_Result_DEFAULT Transaction_ResultContractResult = 0 - Transaction_Result_SUCCESS Transaction_ResultContractResult = 1 - Transaction_Result_REVERT Transaction_ResultContractResult = 2 - Transaction_Result_BAD_JUMP_DESTINATION Transaction_ResultContractResult = 3 - Transaction_Result_OUT_OF_MEMORY Transaction_ResultContractResult = 4 - Transaction_Result_PRECOMPILED_CONTRACT Transaction_ResultContractResult = 5 - Transaction_Result_STACK_TOO_SMALL Transaction_ResultContractResult = 6 - Transaction_Result_STACK_TOO_LARGE Transaction_ResultContractResult = 7 - Transaction_Result_ILLEGAL_OPERATION Transaction_ResultContractResult = 8 - Transaction_Result_STACK_OVERFLOW Transaction_ResultContractResult = 9 - Transaction_Result_OUT_OF_ENERGY Transaction_ResultContractResult = 10 - Transaction_Result_OUT_OF_TIME Transaction_ResultContractResult = 11 - Transaction_Result_JVM_STACK_OVER_FLOW Transaction_ResultContractResult = 12 - Transaction_Result_UNKNOWN Transaction_ResultContractResult = 13 -) - -var Transaction_ResultContractResult_name = map[int32]string{ - 0: "DEFAULT", - 1: "SUCCESS", - 2: "REVERT", - 3: "BAD_JUMP_DESTINATION", - 4: "OUT_OF_MEMORY", - 5: "PRECOMPILED_CONTRACT", - 6: "STACK_TOO_SMALL", - 7: "STACK_TOO_LARGE", - 8: "ILLEGAL_OPERATION", - 9: "STACK_OVERFLOW", - 10: "OUT_OF_ENERGY", - 11: "OUT_OF_TIME", - 12: "JVM_STACK_OVER_FLOW", - 13: "UNKNOWN", -} - -var Transaction_ResultContractResult_value = map[string]int32{ - "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, -} - -func (x Transaction_ResultContractResult) String() string { - return proto.EnumName(Transaction_ResultContractResult_name, int32(x)) -} - -func (Transaction_ResultContractResult) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{15, 1, 1} -} - -type TransactionInfoCode int32 - -const ( - TransactionInfo_SUCESS TransactionInfoCode = 0 - TransactionInfo_FAILED TransactionInfoCode = 1 -) - -var TransactionInfoCode_name = map[int32]string{ - 0: "SUCESS", - 1: "FAILED", -} - -var TransactionInfoCode_value = map[string]int32{ - "SUCESS": 0, - "FAILED": 1, -} - -func (x TransactionInfoCode) String() string { - return proto.EnumName(TransactionInfoCode_name, int32(x)) -} - -func (TransactionInfoCode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{16, 0} -} - -type BlockInventory_Type int32 - -const ( - BlockInventory_SYNC BlockInventory_Type = 0 - BlockInventory_ADVTISE BlockInventory_Type = 1 - BlockInventory_FETCH BlockInventory_Type = 2 -) - -var BlockInventory_Type_name = map[int32]string{ - 0: "SYNC", - 1: "ADVTISE", - 2: "FETCH", -} - -var BlockInventory_Type_value = map[string]int32{ - "SYNC": 0, - "ADVTISE": 1, - "FETCH": 2, -} - -func (x BlockInventory_Type) String() string { - return proto.EnumName(BlockInventory_Type_name, int32(x)) -} - -func (BlockInventory_Type) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{22, 0} -} - -type Inventory_InventoryType int32 - -const ( - Inventory_TRX Inventory_InventoryType = 0 - Inventory_BLOCK Inventory_InventoryType = 1 -) - -var Inventory_InventoryType_name = map[int32]string{ - 0: "TRX", - 1: "BLOCK", -} - -var Inventory_InventoryType_value = map[string]int32{ - "TRX": 0, - "BLOCK": 1, -} - -func (x Inventory_InventoryType) String() string { - return proto.EnumName(Inventory_InventoryType_name, int32(x)) -} - -func (Inventory_InventoryType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{23, 0} -} - -type Items_ItemType int32 - -const ( - Items_ERR Items_ItemType = 0 - Items_TRX Items_ItemType = 1 - Items_BLOCK Items_ItemType = 2 - Items_BLOCKHEADER Items_ItemType = 3 -) - -var Items_ItemType_name = map[int32]string{ - 0: "ERR", - 1: "TRX", - 2: "BLOCK", - 3: "BLOCKHEADER", -} - -var Items_ItemType_value = map[string]int32{ - "ERR": 0, - "TRX": 1, - "BLOCK": 2, - "BLOCKHEADER": 3, -} - -func (x Items_ItemType) String() string { - return proto.EnumName(Items_ItemType_name, int32(x)) -} - -func (Items_ItemType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{24, 0} -} - -type SmartContract_ABI_Entry_EntryType int32 - -const ( - SmartContract_ABI_Entry_UnknownEntryType SmartContract_ABI_Entry_EntryType = 0 - SmartContract_ABI_Entry_Constructor SmartContract_ABI_Entry_EntryType = 1 - SmartContract_ABI_Entry_Function SmartContract_ABI_Entry_EntryType = 2 - SmartContract_ABI_Entry_Event SmartContract_ABI_Entry_EntryType = 3 - SmartContract_ABI_Entry_Fallback SmartContract_ABI_Entry_EntryType = 4 -) - -var SmartContract_ABI_Entry_EntryType_name = map[int32]string{ - 0: "UnknownEntryType", - 1: "Constructor", - 2: "Function", - 3: "Event", - 4: "Fallback", -} - -var SmartContract_ABI_Entry_EntryType_value = map[string]int32{ - "UnknownEntryType": 0, - "Constructor": 1, - "Function": 2, - "Event": 3, - "Fallback": 4, -} - -func (x SmartContract_ABI_Entry_EntryType) String() string { - return proto.EnumName(SmartContract_ABI_Entry_EntryType_name, int32(x)) -} - -func (SmartContract_ABI_Entry_EntryType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{28, 0, 0, 0} -} - -type SmartContract_ABI_Entry_StateMutabilityType int32 - -const ( - SmartContract_ABI_Entry_UnknownMutabilityType SmartContract_ABI_Entry_StateMutabilityType = 0 - SmartContract_ABI_Entry_Pure SmartContract_ABI_Entry_StateMutabilityType = 1 - SmartContract_ABI_Entry_View SmartContract_ABI_Entry_StateMutabilityType = 2 - SmartContract_ABI_Entry_Nonpayable SmartContract_ABI_Entry_StateMutabilityType = 3 - SmartContract_ABI_Entry_Payable SmartContract_ABI_Entry_StateMutabilityType = 4 -) - -var SmartContract_ABI_Entry_StateMutabilityType_name = map[int32]string{ - 0: "UnknownMutabilityType", - 1: "Pure", - 2: "View", - 3: "Nonpayable", - 4: "Payable", -} - -var SmartContract_ABI_Entry_StateMutabilityType_value = map[string]int32{ - "UnknownMutabilityType": 0, - "Pure": 1, - "View": 2, - "Nonpayable": 3, - "Payable": 4, -} - -func (x SmartContract_ABI_Entry_StateMutabilityType) String() string { - return proto.EnumName(SmartContract_ABI_Entry_StateMutabilityType_name, int32(x)) -} - -func (SmartContract_ABI_Entry_StateMutabilityType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{28, 0, 0, 1} -} - -// AccountId, (name, address) use name, (null, address) use address, (name, null) use name, -type AccountId struct { - Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" pg:"name"` - Address []byte `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty" pg:"address"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *AccountId) Reset() { *m = AccountId{} } -func (m *AccountId) String() string { return proto.CompactTextString(m) } -func (*AccountId) ProtoMessage() {} -func (*AccountId) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{0} -} -func (m *AccountId) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AccountId.Unmarshal(m, b) -} -func (m *AccountId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AccountId.Marshal(b, m, deterministic) -} -func (m *AccountId) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountId.Merge(m, src) -} -func (m *AccountId) XXX_Size() int { - return xxx_messageInfo_AccountId.Size(m) -} -func (m *AccountId) XXX_DiscardUnknown() { - xxx_messageInfo_AccountId.DiscardUnknown(m) -} - -var xxx_messageInfo_AccountId proto.InternalMessageInfo - -func (m *AccountId) GetName() []byte { - if m != nil { - return m.Name - } - return nil -} - -func (m *AccountId) GetAddress() []byte { - if m != nil { - return m.Address - } - return nil -} - -// vote message -type Vote struct { - // the super rep address - VoteAddress []byte `protobuf:"bytes,1,opt,name=vote_address,json=voteAddress,proto3" json:"vote_address,omitempty" pg:"vote_address"` - // the vote num to this super rep. - VoteCount int64 `protobuf:"varint,2,opt,name=vote_count,json=voteCount,proto3" json:"vote_count,omitempty" pg:"vote_count"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Vote) Reset() { *m = Vote{} } -func (m *Vote) String() string { return proto.CompactTextString(m) } -func (*Vote) ProtoMessage() {} -func (*Vote) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{1} -} -func (m *Vote) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Vote.Unmarshal(m, b) -} -func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Vote.Marshal(b, m, deterministic) -} -func (m *Vote) XXX_Merge(src proto.Message) { - xxx_messageInfo_Vote.Merge(m, src) -} -func (m *Vote) XXX_Size() int { - return xxx_messageInfo_Vote.Size(m) -} -func (m *Vote) XXX_DiscardUnknown() { - xxx_messageInfo_Vote.DiscardUnknown(m) -} - -var xxx_messageInfo_Vote proto.InternalMessageInfo - -func (m *Vote) GetVoteAddress() []byte { - if m != nil { - return m.VoteAddress - } - return nil -} - -func (m *Vote) GetVoteCount() int64 { - if m != nil { - return m.VoteCount - } - return 0 -} - -// Proposal -type Proposal struct { - ProposalId int64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty" pg:"proposal_id"` - ProposerAddress []byte `protobuf:"bytes,2,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty" pg:"proposer_address"` - Parameters map[int64]int64 `protobuf:"bytes,3,rep,name=parameters,proto3" json:"parameters,omitempty" pg:"parameters" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - ExpirationTime int64 `protobuf:"varint,4,opt,name=expiration_time,json=expirationTime,proto3" json:"expiration_time,omitempty" pg:"expiration_time"` - CreateTime int64 `protobuf:"varint,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty" pg:"create_time"` - Approvals [][]byte `protobuf:"bytes,6,rep,name=approvals,proto3" json:"approvals,omitempty" pg:"approvals"` - State Proposal_State `protobuf:"varint,7,opt,name=state,proto3,enum=protocol.Proposal_State" json:"state,omitempty" pg:"state"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Proposal) Reset() { *m = Proposal{} } -func (m *Proposal) String() string { return proto.CompactTextString(m) } -func (*Proposal) ProtoMessage() {} -func (*Proposal) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{2} -} -func (m *Proposal) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Proposal.Unmarshal(m, b) -} -func (m *Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Proposal.Marshal(b, m, deterministic) -} -func (m *Proposal) XXX_Merge(src proto.Message) { - xxx_messageInfo_Proposal.Merge(m, src) -} -func (m *Proposal) XXX_Size() int { - return xxx_messageInfo_Proposal.Size(m) -} -func (m *Proposal) XXX_DiscardUnknown() { - xxx_messageInfo_Proposal.DiscardUnknown(m) -} - -var xxx_messageInfo_Proposal proto.InternalMessageInfo - -func (m *Proposal) GetProposalId() int64 { - if m != nil { - return m.ProposalId - } - return 0 -} - -func (m *Proposal) GetProposerAddress() []byte { - if m != nil { - return m.ProposerAddress - } - return nil -} - -func (m *Proposal) GetParameters() map[int64]int64 { - if m != nil { - return m.Parameters - } - return nil -} - -func (m *Proposal) GetExpirationTime() int64 { - if m != nil { - return m.ExpirationTime - } - return 0 -} - -func (m *Proposal) GetCreateTime() int64 { - if m != nil { - return m.CreateTime - } - return 0 -} - -func (m *Proposal) GetApprovals() [][]byte { - if m != nil { - return m.Approvals - } - return nil -} - -func (m *Proposal) GetState() Proposal_State { - if m != nil { - return m.State - } - return Proposal_PENDING -} - -// Exchange -type Exchange struct { - ExchangeId int64 `protobuf:"varint,1,opt,name=exchange_id,json=exchangeId,proto3" json:"exchange_id,omitempty" pg:"exchange_id"` - CreatorAddress []byte `protobuf:"bytes,2,opt,name=creator_address,json=creatorAddress,proto3" json:"creator_address,omitempty" pg:"creator_address"` - CreateTime int64 `protobuf:"varint,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty" pg:"create_time"` - FirstTokenId []byte `protobuf:"bytes,6,opt,name=first_token_id,json=firstTokenId,proto3" json:"first_token_id,omitempty" pg:"first_token_id"` - FirstTokenBalance int64 `protobuf:"varint,7,opt,name=first_token_balance,json=firstTokenBalance,proto3" json:"first_token_balance,omitempty" pg:"first_token_balance"` - SecondTokenId []byte `protobuf:"bytes,8,opt,name=second_token_id,json=secondTokenId,proto3" json:"second_token_id,omitempty" pg:"second_token_id"` - SecondTokenBalance int64 `protobuf:"varint,9,opt,name=second_token_balance,json=secondTokenBalance,proto3" json:"second_token_balance,omitempty" pg:"second_token_balance"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Exchange) Reset() { *m = Exchange{} } -func (m *Exchange) String() string { return proto.CompactTextString(m) } -func (*Exchange) ProtoMessage() {} -func (*Exchange) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{3} -} -func (m *Exchange) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Exchange.Unmarshal(m, b) -} -func (m *Exchange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Exchange.Marshal(b, m, deterministic) -} -func (m *Exchange) XXX_Merge(src proto.Message) { - xxx_messageInfo_Exchange.Merge(m, src) -} -func (m *Exchange) XXX_Size() int { - return xxx_messageInfo_Exchange.Size(m) -} -func (m *Exchange) XXX_DiscardUnknown() { - xxx_messageInfo_Exchange.DiscardUnknown(m) -} - -var xxx_messageInfo_Exchange proto.InternalMessageInfo - -func (m *Exchange) GetExchangeId() int64 { - if m != nil { - return m.ExchangeId - } - return 0 -} - -func (m *Exchange) GetCreatorAddress() []byte { - if m != nil { - return m.CreatorAddress - } - return nil -} - -func (m *Exchange) GetCreateTime() int64 { - if m != nil { - return m.CreateTime - } - return 0 -} - -func (m *Exchange) GetFirstTokenId() []byte { - if m != nil { - return m.FirstTokenId - } - return nil -} - -func (m *Exchange) GetFirstTokenBalance() int64 { - if m != nil { - return m.FirstTokenBalance - } - return 0 -} - -func (m *Exchange) GetSecondTokenId() []byte { - if m != nil { - return m.SecondTokenId - } - return nil -} - -func (m *Exchange) GetSecondTokenBalance() int64 { - if m != nil { - return m.SecondTokenBalance - } - return 0 -} - -type ChainParameters struct { - ChainParameter []*ChainParameters_ChainParameter `protobuf:"bytes,1,rep,name=chainParameter,proto3" json:"chainParameter,omitempty" pg:"chainParameter"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ChainParameters) Reset() { *m = ChainParameters{} } -func (m *ChainParameters) String() string { return proto.CompactTextString(m) } -func (*ChainParameters) ProtoMessage() {} -func (*ChainParameters) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{4} -} -func (m *ChainParameters) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ChainParameters.Unmarshal(m, b) -} -func (m *ChainParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ChainParameters.Marshal(b, m, deterministic) -} -func (m *ChainParameters) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChainParameters.Merge(m, src) -} -func (m *ChainParameters) XXX_Size() int { - return xxx_messageInfo_ChainParameters.Size(m) -} -func (m *ChainParameters) XXX_DiscardUnknown() { - xxx_messageInfo_ChainParameters.DiscardUnknown(m) -} - -var xxx_messageInfo_ChainParameters proto.InternalMessageInfo - -func (m *ChainParameters) GetChainParameter() []*ChainParameters_ChainParameter { - if m != nil { - return m.ChainParameter - } - return nil -} - -type ChainParameters_ChainParameter struct { - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty" pg:"key"` - Value int64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty" pg:"value"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ChainParameters_ChainParameter) Reset() { *m = ChainParameters_ChainParameter{} } -func (m *ChainParameters_ChainParameter) String() string { return proto.CompactTextString(m) } -func (*ChainParameters_ChainParameter) ProtoMessage() {} -func (*ChainParameters_ChainParameter) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{4, 0} -} -func (m *ChainParameters_ChainParameter) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ChainParameters_ChainParameter.Unmarshal(m, b) -} -func (m *ChainParameters_ChainParameter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ChainParameters_ChainParameter.Marshal(b, m, deterministic) -} -func (m *ChainParameters_ChainParameter) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChainParameters_ChainParameter.Merge(m, src) -} -func (m *ChainParameters_ChainParameter) XXX_Size() int { - return xxx_messageInfo_ChainParameters_ChainParameter.Size(m) -} -func (m *ChainParameters_ChainParameter) XXX_DiscardUnknown() { - xxx_messageInfo_ChainParameters_ChainParameter.DiscardUnknown(m) -} - -var xxx_messageInfo_ChainParameters_ChainParameter proto.InternalMessageInfo - -func (m *ChainParameters_ChainParameter) GetKey() string { - if m != nil { - return m.Key - } - return "" -} - -func (m *ChainParameters_ChainParameter) GetValue() int64 { - if m != nil { - return m.Value - } - return 0 -} - -// Account -type Account struct { - // account nick name - AccountName []byte `protobuf:"bytes,1,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty" pg:"account_name"` - Type AccountType `protobuf:"varint,2,opt,name=type,proto3,enum=protocol.AccountType" json:"type,omitempty" pg:"type"` - // the create address - Address []byte `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty" pg:"address"` - // the trx balance - Balance int64 `protobuf:"varint,4,opt,name=balance,proto3" json:"balance,omitempty" pg:"balance"` - // the votes - Votes []*Vote `protobuf:"bytes,5,rep,name=votes,proto3" json:"votes,omitempty" pg:"votes"` - // the other asset owned by this account - Asset map[string]int64 `protobuf:"bytes,6,rep,name=asset,proto3" json:"asset,omitempty" pg:"asset" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - // the other asset owned by this account,key is assetId - AssetV2 map[string]int64 `protobuf:"bytes,56,rep,name=assetV2,proto3" json:"assetV2,omitempty" pg:"assetV2" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - // the frozen balance for bandwidth - Frozen []*Account_Frozen `protobuf:"bytes,7,rep,name=frozen,proto3" json:"frozen,omitempty" pg:"frozen"` - // bandwidth, get from frozen - NetUsage int64 `protobuf:"varint,8,opt,name=net_usage,json=netUsage,proto3" json:"net_usage,omitempty" pg:"net_usage"` - //Frozen balance provided by other accounts to this account - AcquiredDelegatedFrozenBalanceForBandwidth int64 `protobuf:"varint,41,opt,name=acquired_delegated_frozen_balance_for_bandwidth,json=acquiredDelegatedFrozenBalanceForBandwidth,proto3" json:"acquired_delegated_frozen_balance_for_bandwidth,omitempty" pg:"acquired_delegated_frozen_balance_for_bandwidth"` - //Freeze and provide balances to other accounts - DelegatedFrozenBalanceForBandwidth int64 `protobuf:"varint,42,opt,name=delegated_frozen_balance_for_bandwidth,json=delegatedFrozenBalanceForBandwidth,proto3" json:"delegated_frozen_balance_for_bandwidth,omitempty" pg:"delegated_frozen_balance_for_bandwidth"` - // this account create time - CreateTime int64 `protobuf:"varint,9,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty" pg:"create_time"` - // this last operation time, including transfer, voting and so on. //FIXME fix grammar - LatestOprationTime int64 `protobuf:"varint,10,opt,name=latest_opration_time,json=latestOprationTime,proto3" json:"latest_opration_time,omitempty" pg:"latest_opration_time"` - // witness block producing allowance - Allowance int64 `protobuf:"varint,11,opt,name=allowance,proto3" json:"allowance,omitempty" pg:"allowance"` - // last withdraw time - LatestWithdrawTime int64 `protobuf:"varint,12,opt,name=latest_withdraw_time,json=latestWithdrawTime,proto3" json:"latest_withdraw_time,omitempty" pg:"latest_withdraw_time"` - // not used so far - Code []byte `protobuf:"bytes,13,opt,name=code,proto3" json:"code,omitempty" pg:"code"` - IsWitness bool `protobuf:"varint,14,opt,name=is_witness,json=isWitness,proto3" json:"is_witness,omitempty" pg:"is_witness"` - IsCommittee bool `protobuf:"varint,15,opt,name=is_committee,json=isCommittee,proto3" json:"is_committee,omitempty" pg:"is_committee"` - // frozen asset(for asset issuer) - FrozenSupply []*Account_Frozen `protobuf:"bytes,16,rep,name=frozen_supply,json=frozenSupply,proto3" json:"frozen_supply,omitempty" pg:"frozen_supply"` - // asset_issued_name - AssetIssuedName []byte `protobuf:"bytes,17,opt,name=asset_issued_name,json=assetIssuedName,proto3" json:"asset_issued_name,omitempty" pg:"asset_issued_name"` - AssetIssued_ID []byte `protobuf:"bytes,57,opt,name=asset_issued_ID,json=assetIssuedID,proto3" json:"asset_issued_ID,omitempty" pg:"asset_issued_ID"` - LatestAssetOperationTime map[string]int64 `protobuf:"bytes,18,rep,name=latest_asset_operation_time,json=latestAssetOperationTime,proto3" json:"latest_asset_operation_time,omitempty" pg:"latest_asset_operation_time" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - LatestAssetOperationTimeV2 map[string]int64 `protobuf:"bytes,58,rep,name=latest_asset_operation_timeV2,json=latestAssetOperationTimeV2,proto3" json:"latest_asset_operation_timeV2,omitempty" pg:"latest_asset_operation_timeV2" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - FreeNetUsage int64 `protobuf:"varint,19,opt,name=free_net_usage,json=freeNetUsage,proto3" json:"free_net_usage,omitempty" pg:"free_net_usage"` - FreeAssetNetUsage map[string]int64 `protobuf:"bytes,20,rep,name=free_asset_net_usage,json=freeAssetNetUsage,proto3" json:"free_asset_net_usage,omitempty" pg:"free_asset_net_usage" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - FreeAssetNetUsageV2 map[string]int64 `protobuf:"bytes,59,rep,name=free_asset_net_usageV2,json=freeAssetNetUsageV2,proto3" json:"free_asset_net_usageV2,omitempty" pg:"free_asset_net_usageV2" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - LatestConsumeTime int64 `protobuf:"varint,21,opt,name=latest_consume_time,json=latestConsumeTime,proto3" json:"latest_consume_time,omitempty" pg:"latest_consume_time"` - LatestConsumeFreeTime int64 `protobuf:"varint,22,opt,name=latest_consume_free_time,json=latestConsumeFreeTime,proto3" json:"latest_consume_free_time,omitempty" pg:"latest_consume_free_time"` - // the identity of this account, case insensitive - AccountId []byte `protobuf:"bytes,23,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty" pg:"account_id"` - AccountResource *Account_AccountResource `protobuf:"bytes,26,opt,name=account_resource,json=accountResource,proto3" json:"account_resource,omitempty" pg:"account_resource"` - CodeHash []byte `protobuf:"bytes,30,opt,name=codeHash,proto3" json:"codeHash,omitempty" pg:"codeHash"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Account) Reset() { *m = Account{} } -func (m *Account) String() string { return proto.CompactTextString(m) } -func (*Account) ProtoMessage() {} -func (*Account) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{5} -} -func (m *Account) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Account.Unmarshal(m, b) -} -func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Account.Marshal(b, m, deterministic) -} -func (m *Account) XXX_Merge(src proto.Message) { - xxx_messageInfo_Account.Merge(m, src) -} -func (m *Account) XXX_Size() int { - return xxx_messageInfo_Account.Size(m) -} -func (m *Account) XXX_DiscardUnknown() { - xxx_messageInfo_Account.DiscardUnknown(m) -} - -var xxx_messageInfo_Account proto.InternalMessageInfo - -func (m *Account) GetAccountName() []byte { - if m != nil { - return m.AccountName - } - return nil -} - -func (m *Account) GetType() AccountType { - if m != nil { - return m.Type - } - return AccountType_Normal -} - -func (m *Account) GetAddress() []byte { - if m != nil { - return m.Address - } - return nil -} - -func (m *Account) GetBalance() int64 { - if m != nil { - return m.Balance - } - return 0 -} - -func (m *Account) GetVotes() []*Vote { - if m != nil { - return m.Votes - } - return nil -} - -func (m *Account) GetAsset() map[string]int64 { - if m != nil { - return m.Asset - } - return nil -} - -func (m *Account) GetAssetV2() map[string]int64 { - if m != nil { - return m.AssetV2 - } - return nil -} - -func (m *Account) GetFrozen() []*Account_Frozen { - if m != nil { - return m.Frozen - } - return nil -} - -func (m *Account) GetNetUsage() int64 { - if m != nil { - return m.NetUsage - } - return 0 -} - -func (m *Account) GetAcquiredDelegatedFrozenBalanceForBandwidth() int64 { - if m != nil { - return m.AcquiredDelegatedFrozenBalanceForBandwidth - } - return 0 -} - -func (m *Account) GetDelegatedFrozenBalanceForBandwidth() int64 { - if m != nil { - return m.DelegatedFrozenBalanceForBandwidth - } - return 0 -} - -func (m *Account) GetCreateTime() int64 { - if m != nil { - return m.CreateTime - } - return 0 -} - -func (m *Account) GetLatestOprationTime() int64 { - if m != nil { - return m.LatestOprationTime - } - return 0 -} - -func (m *Account) GetAllowance() int64 { - if m != nil { - return m.Allowance - } - return 0 -} - -func (m *Account) GetLatestWithdrawTime() int64 { - if m != nil { - return m.LatestWithdrawTime - } - return 0 -} - -func (m *Account) GetCode() []byte { - if m != nil { - return m.Code - } - return nil -} - -func (m *Account) GetIsWitness() bool { - if m != nil { - return m.IsWitness - } - return false -} - -func (m *Account) GetIsCommittee() bool { - if m != nil { - return m.IsCommittee - } - return false -} - -func (m *Account) GetFrozenSupply() []*Account_Frozen { - if m != nil { - return m.FrozenSupply - } - return nil -} - -func (m *Account) GetAssetIssuedName() []byte { - if m != nil { - return m.AssetIssuedName - } - return nil -} - -func (m *Account) GetAssetIssued_ID() []byte { - if m != nil { - return m.AssetIssued_ID - } - return nil -} - -func (m *Account) GetLatestAssetOperationTime() map[string]int64 { - if m != nil { - return m.LatestAssetOperationTime - } - return nil -} - -func (m *Account) GetLatestAssetOperationTimeV2() map[string]int64 { - if m != nil { - return m.LatestAssetOperationTimeV2 - } - return nil -} - -func (m *Account) GetFreeNetUsage() int64 { - if m != nil { - return m.FreeNetUsage - } - return 0 -} - -func (m *Account) GetFreeAssetNetUsage() map[string]int64 { - if m != nil { - return m.FreeAssetNetUsage - } - return nil -} - -func (m *Account) GetFreeAssetNetUsageV2() map[string]int64 { - if m != nil { - return m.FreeAssetNetUsageV2 - } - return nil -} - -func (m *Account) GetLatestConsumeTime() int64 { - if m != nil { - return m.LatestConsumeTime - } - return 0 -} - -func (m *Account) GetLatestConsumeFreeTime() int64 { - if m != nil { - return m.LatestConsumeFreeTime - } - return 0 -} - -func (m *Account) GetAccountId() []byte { - if m != nil { - return m.AccountId - } - return nil -} - -func (m *Account) GetAccountResource() *Account_AccountResource { - if m != nil { - return m.AccountResource - } - return nil -} - -func (m *Account) GetCodeHash() []byte { - if m != nil { - return m.CodeHash - } - return nil -} - -// frozen balance -type Account_Frozen struct { - FrozenBalance int64 `protobuf:"varint,1,opt,name=frozen_balance,json=frozenBalance,proto3" json:"frozen_balance,omitempty" pg:"frozen_balance"` - ExpireTime int64 `protobuf:"varint,2,opt,name=expire_time,json=expireTime,proto3" json:"expire_time,omitempty" pg:"expire_time"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Account_Frozen) Reset() { *m = Account_Frozen{} } -func (m *Account_Frozen) String() string { return proto.CompactTextString(m) } -func (*Account_Frozen) ProtoMessage() {} -func (*Account_Frozen) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{5, 0} -} -func (m *Account_Frozen) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Account_Frozen.Unmarshal(m, b) -} -func (m *Account_Frozen) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Account_Frozen.Marshal(b, m, deterministic) -} -func (m *Account_Frozen) XXX_Merge(src proto.Message) { - xxx_messageInfo_Account_Frozen.Merge(m, src) -} -func (m *Account_Frozen) XXX_Size() int { - return xxx_messageInfo_Account_Frozen.Size(m) -} -func (m *Account_Frozen) XXX_DiscardUnknown() { - xxx_messageInfo_Account_Frozen.DiscardUnknown(m) -} - -var xxx_messageInfo_Account_Frozen proto.InternalMessageInfo - -func (m *Account_Frozen) GetFrozenBalance() int64 { - if m != nil { - return m.FrozenBalance - } - return 0 -} - -func (m *Account_Frozen) GetExpireTime() int64 { - if m != nil { - return m.ExpireTime - } - return 0 -} - -type Account_AccountResource struct { - // energy resource, get from frozen - EnergyUsage int64 `protobuf:"varint,1,opt,name=energy_usage,json=energyUsage,proto3" json:"energy_usage,omitempty" pg:"energy_usage"` - // the frozen balance for energy - FrozenBalanceForEnergy *Account_Frozen `protobuf:"bytes,2,opt,name=frozen_balance_for_energy,json=frozenBalanceForEnergy,proto3" json:"frozen_balance_for_energy,omitempty" pg:"frozen_balance_for_energy"` - LatestConsumeTimeForEnergy int64 `protobuf:"varint,3,opt,name=latest_consume_time_for_energy,json=latestConsumeTimeForEnergy,proto3" json:"latest_consume_time_for_energy,omitempty" pg:"latest_consume_time_for_energy"` - //Frozen balance provided by other accounts to this account - AcquiredDelegatedFrozenBalanceForEnergy int64 `protobuf:"varint,4,opt,name=acquired_delegated_frozen_balance_for_energy,json=acquiredDelegatedFrozenBalanceForEnergy,proto3" json:"acquired_delegated_frozen_balance_for_energy,omitempty" pg:"acquired_delegated_frozen_balance_for_energy"` - //Frozen balances provided to other accounts - DelegatedFrozenBalanceForEnergy int64 `protobuf:"varint,5,opt,name=delegated_frozen_balance_for_energy,json=delegatedFrozenBalanceForEnergy,proto3" json:"delegated_frozen_balance_for_energy,omitempty" pg:"delegated_frozen_balance_for_energy"` - // storage resource, get from market - StorageLimit int64 `protobuf:"varint,6,opt,name=storage_limit,json=storageLimit,proto3" json:"storage_limit,omitempty" pg:"storage_limit"` - StorageUsage int64 `protobuf:"varint,7,opt,name=storage_usage,json=storageUsage,proto3" json:"storage_usage,omitempty" pg:"storage_usage"` - LatestExchangeStorageTime int64 `protobuf:"varint,8,opt,name=latest_exchange_storage_time,json=latestExchangeStorageTime,proto3" json:"latest_exchange_storage_time,omitempty" pg:"latest_exchange_storage_time"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Account_AccountResource) Reset() { *m = Account_AccountResource{} } -func (m *Account_AccountResource) String() string { return proto.CompactTextString(m) } -func (*Account_AccountResource) ProtoMessage() {} -func (*Account_AccountResource) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{5, 7} -} -func (m *Account_AccountResource) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Account_AccountResource.Unmarshal(m, b) -} -func (m *Account_AccountResource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Account_AccountResource.Marshal(b, m, deterministic) -} -func (m *Account_AccountResource) XXX_Merge(src proto.Message) { - xxx_messageInfo_Account_AccountResource.Merge(m, src) -} -func (m *Account_AccountResource) XXX_Size() int { - return xxx_messageInfo_Account_AccountResource.Size(m) -} -func (m *Account_AccountResource) XXX_DiscardUnknown() { - xxx_messageInfo_Account_AccountResource.DiscardUnknown(m) -} - -var xxx_messageInfo_Account_AccountResource proto.InternalMessageInfo - -func (m *Account_AccountResource) GetEnergyUsage() int64 { - if m != nil { - return m.EnergyUsage - } - return 0 -} - -func (m *Account_AccountResource) GetFrozenBalanceForEnergy() *Account_Frozen { - if m != nil { - return m.FrozenBalanceForEnergy - } - return nil -} - -func (m *Account_AccountResource) GetLatestConsumeTimeForEnergy() int64 { - if m != nil { - return m.LatestConsumeTimeForEnergy - } - return 0 -} - -func (m *Account_AccountResource) GetAcquiredDelegatedFrozenBalanceForEnergy() int64 { - if m != nil { - return m.AcquiredDelegatedFrozenBalanceForEnergy - } - return 0 -} - -func (m *Account_AccountResource) GetDelegatedFrozenBalanceForEnergy() int64 { - if m != nil { - return m.DelegatedFrozenBalanceForEnergy - } - return 0 -} - -func (m *Account_AccountResource) GetStorageLimit() int64 { - if m != nil { - return m.StorageLimit - } - return 0 -} - -func (m *Account_AccountResource) GetStorageUsage() int64 { - if m != nil { - return m.StorageUsage - } - return 0 -} - -func (m *Account_AccountResource) GetLatestExchangeStorageTime() int64 { - if m != nil { - return m.LatestExchangeStorageTime - } - return 0 -} - -type DelegatedResource struct { - From []byte `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty" pg:"from"` - To []byte `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty" pg:"to"` - FrozenBalanceForBandwidth int64 `protobuf:"varint,3,opt,name=frozen_balance_for_bandwidth,json=frozenBalanceForBandwidth,proto3" json:"frozen_balance_for_bandwidth,omitempty" pg:"frozen_balance_for_bandwidth"` - FrozenBalanceForEnergy int64 `protobuf:"varint,4,opt,name=frozen_balance_for_energy,json=frozenBalanceForEnergy,proto3" json:"frozen_balance_for_energy,omitempty" pg:"frozen_balance_for_energy"` - ExpireTimeForBandwidth int64 `protobuf:"varint,5,opt,name=expire_time_for_bandwidth,json=expireTimeForBandwidth,proto3" json:"expire_time_for_bandwidth,omitempty" pg:"expire_time_for_bandwidth"` - ExpireTimeForEnergy int64 `protobuf:"varint,6,opt,name=expire_time_for_energy,json=expireTimeForEnergy,proto3" json:"expire_time_for_energy,omitempty" pg:"expire_time_for_energy"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *DelegatedResource) Reset() { *m = DelegatedResource{} } -func (m *DelegatedResource) String() string { return proto.CompactTextString(m) } -func (*DelegatedResource) ProtoMessage() {} -func (*DelegatedResource) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{6} -} -func (m *DelegatedResource) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DelegatedResource.Unmarshal(m, b) -} -func (m *DelegatedResource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DelegatedResource.Marshal(b, m, deterministic) -} -func (m *DelegatedResource) XXX_Merge(src proto.Message) { - xxx_messageInfo_DelegatedResource.Merge(m, src) -} -func (m *DelegatedResource) XXX_Size() int { - return xxx_messageInfo_DelegatedResource.Size(m) -} -func (m *DelegatedResource) XXX_DiscardUnknown() { - xxx_messageInfo_DelegatedResource.DiscardUnknown(m) -} - -var xxx_messageInfo_DelegatedResource proto.InternalMessageInfo - -func (m *DelegatedResource) GetFrom() []byte { - if m != nil { - return m.From - } - return nil -} - -func (m *DelegatedResource) GetTo() []byte { - if m != nil { - return m.To - } - return nil -} - -func (m *DelegatedResource) GetFrozenBalanceForBandwidth() int64 { - if m != nil { - return m.FrozenBalanceForBandwidth - } - return 0 -} - -func (m *DelegatedResource) GetFrozenBalanceForEnergy() int64 { - if m != nil { - return m.FrozenBalanceForEnergy - } - return 0 -} - -func (m *DelegatedResource) GetExpireTimeForBandwidth() int64 { - if m != nil { - return m.ExpireTimeForBandwidth - } - return 0 -} - -func (m *DelegatedResource) GetExpireTimeForEnergy() int64 { - if m != nil { - return m.ExpireTimeForEnergy - } - return 0 -} - -type Authority struct { - Account *AccountId `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty" pg:"account"` - PermissionName []byte `protobuf:"bytes,2,opt,name=permission_name,json=permissionName,proto3" json:"permission_name,omitempty" pg:"permission_name"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Authority) Reset() { *m = Authority{} } -func (m *Authority) String() string { return proto.CompactTextString(m) } -func (*Authority) ProtoMessage() {} -func (*Authority) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{7} -} -func (m *Authority) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Authority.Unmarshal(m, b) -} -func (m *Authority) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Authority.Marshal(b, m, deterministic) -} -func (m *Authority) XXX_Merge(src proto.Message) { - xxx_messageInfo_Authority.Merge(m, src) -} -func (m *Authority) XXX_Size() int { - return xxx_messageInfo_Authority.Size(m) -} -func (m *Authority) XXX_DiscardUnknown() { - xxx_messageInfo_Authority.DiscardUnknown(m) -} - -var xxx_messageInfo_Authority proto.InternalMessageInfo - -func (m *Authority) GetAccount() *AccountId { - if m != nil { - return m.Account - } - return nil -} - -func (m *Authority) GetPermissionName() []byte { - if m != nil { - return m.PermissionName - } - return nil -} - -type Permission struct { - Account *AccountId `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty" pg:"account"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Permission) Reset() { *m = Permission{} } -func (m *Permission) String() string { return proto.CompactTextString(m) } -func (*Permission) ProtoMessage() {} -func (*Permission) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{8} -} -func (m *Permission) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Permission.Unmarshal(m, b) -} -func (m *Permission) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Permission.Marshal(b, m, deterministic) -} -func (m *Permission) XXX_Merge(src proto.Message) { - xxx_messageInfo_Permission.Merge(m, src) -} -func (m *Permission) XXX_Size() int { - return xxx_messageInfo_Permission.Size(m) -} -func (m *Permission) XXX_DiscardUnknown() { - xxx_messageInfo_Permission.DiscardUnknown(m) -} - -var xxx_messageInfo_Permission proto.InternalMessageInfo - -func (m *Permission) GetAccount() *AccountId { - if m != nil { - return m.Account - } - return nil -} - -// Witness -type Witness struct { - Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" pg:"address"` - VoteCount int64 `protobuf:"varint,2,opt,name=voteCount,proto3" json:"voteCount,omitempty" pg:"voteCount"` - PubKey []byte `protobuf:"bytes,3,opt,name=pubKey,proto3" json:"pubKey,omitempty" pg:"pubKey"` - Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty" pg:"url"` - TotalProduced int64 `protobuf:"varint,5,opt,name=totalProduced,proto3" json:"totalProduced,omitempty" pg:"totalProduced"` - TotalMissed int64 `protobuf:"varint,6,opt,name=totalMissed,proto3" json:"totalMissed,omitempty" pg:"totalMissed"` - LatestBlockNum int64 `protobuf:"varint,7,opt,name=latestBlockNum,proto3" json:"latestBlockNum,omitempty" pg:"latestBlockNum"` - LatestSlotNum int64 `protobuf:"varint,8,opt,name=latestSlotNum,proto3" json:"latestSlotNum,omitempty" pg:"latestSlotNum"` - IsJobs bool `protobuf:"varint,9,opt,name=isJobs,proto3" json:"isJobs,omitempty" pg:"isJobs"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Witness) Reset() { *m = Witness{} } -func (m *Witness) String() string { return proto.CompactTextString(m) } -func (*Witness) ProtoMessage() {} -func (*Witness) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{9} -} -func (m *Witness) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Witness.Unmarshal(m, b) -} -func (m *Witness) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Witness.Marshal(b, m, deterministic) -} -func (m *Witness) XXX_Merge(src proto.Message) { - xxx_messageInfo_Witness.Merge(m, src) -} -func (m *Witness) XXX_Size() int { - return xxx_messageInfo_Witness.Size(m) -} -func (m *Witness) XXX_DiscardUnknown() { - xxx_messageInfo_Witness.DiscardUnknown(m) -} - -var xxx_messageInfo_Witness proto.InternalMessageInfo - -func (m *Witness) GetAddress() []byte { - if m != nil { - return m.Address - } - return nil -} - -func (m *Witness) GetVoteCount() int64 { - if m != nil { - return m.VoteCount - } - return 0 -} - -func (m *Witness) GetPubKey() []byte { - if m != nil { - return m.PubKey - } - return nil -} - -func (m *Witness) GetUrl() string { - if m != nil { - return m.Url - } - return "" -} - -func (m *Witness) GetTotalProduced() int64 { - if m != nil { - return m.TotalProduced - } - return 0 -} - -func (m *Witness) GetTotalMissed() int64 { - if m != nil { - return m.TotalMissed - } - return 0 -} - -func (m *Witness) GetLatestBlockNum() int64 { - if m != nil { - return m.LatestBlockNum - } - return 0 -} - -func (m *Witness) GetLatestSlotNum() int64 { - if m != nil { - return m.LatestSlotNum - } - return 0 -} - -func (m *Witness) GetIsJobs() bool { - if m != nil { - return m.IsJobs - } - return false -} - -// Vote Change -type Votes struct { - Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" pg:"address"` - OldVotes []*Vote `protobuf:"bytes,2,rep,name=old_votes,json=oldVotes,proto3" json:"old_votes,omitempty" pg:"old_votes"` - NewVotes []*Vote `protobuf:"bytes,3,rep,name=new_votes,json=newVotes,proto3" json:"new_votes,omitempty" pg:"new_votes"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Votes) Reset() { *m = Votes{} } -func (m *Votes) String() string { return proto.CompactTextString(m) } -func (*Votes) ProtoMessage() {} -func (*Votes) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{10} -} -func (m *Votes) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Votes.Unmarshal(m, b) -} -func (m *Votes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Votes.Marshal(b, m, deterministic) -} -func (m *Votes) XXX_Merge(src proto.Message) { - xxx_messageInfo_Votes.Merge(m, src) -} -func (m *Votes) XXX_Size() int { - return xxx_messageInfo_Votes.Size(m) -} -func (m *Votes) XXX_DiscardUnknown() { - xxx_messageInfo_Votes.DiscardUnknown(m) -} - -var xxx_messageInfo_Votes proto.InternalMessageInfo - -func (m *Votes) GetAddress() []byte { - if m != nil { - return m.Address - } - return nil -} - -func (m *Votes) GetOldVotes() []*Vote { - if m != nil { - return m.OldVotes - } - return nil -} - -func (m *Votes) GetNewVotes() []*Vote { - if m != nil { - return m.NewVotes - } - return nil -} - -type TXOutput struct { - Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty" pg:"value"` - PubKeyHash []byte `protobuf:"bytes,2,opt,name=pubKeyHash,proto3" json:"pubKeyHash,omitempty" pg:"pubKeyHash"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *TXOutput) Reset() { *m = TXOutput{} } -func (m *TXOutput) String() string { return proto.CompactTextString(m) } -func (*TXOutput) ProtoMessage() {} -func (*TXOutput) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{11} -} -func (m *TXOutput) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TXOutput.Unmarshal(m, b) -} -func (m *TXOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TXOutput.Marshal(b, m, deterministic) -} -func (m *TXOutput) XXX_Merge(src proto.Message) { - xxx_messageInfo_TXOutput.Merge(m, src) -} -func (m *TXOutput) XXX_Size() int { - return xxx_messageInfo_TXOutput.Size(m) -} -func (m *TXOutput) XXX_DiscardUnknown() { - xxx_messageInfo_TXOutput.DiscardUnknown(m) -} - -var xxx_messageInfo_TXOutput proto.InternalMessageInfo - -func (m *TXOutput) GetValue() int64 { - if m != nil { - return m.Value - } - return 0 -} - -func (m *TXOutput) GetPubKeyHash() []byte { - if m != nil { - return m.PubKeyHash - } - return nil -} - -type TXInput struct { - RawData *TXInputRaw `protobuf:"bytes,1,opt,name=raw_data,json=rawData,proto3" json:"raw_data,omitempty" pg:"raw_data"` - Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *TXInput) Reset() { *m = TXInput{} } -func (m *TXInput) String() string { return proto.CompactTextString(m) } -func (*TXInput) ProtoMessage() {} -func (*TXInput) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{12} -} -func (m *TXInput) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TXInput.Unmarshal(m, b) -} -func (m *TXInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TXInput.Marshal(b, m, deterministic) -} -func (m *TXInput) XXX_Merge(src proto.Message) { - xxx_messageInfo_TXInput.Merge(m, src) -} -func (m *TXInput) XXX_Size() int { - return xxx_messageInfo_TXInput.Size(m) -} -func (m *TXInput) XXX_DiscardUnknown() { - xxx_messageInfo_TXInput.DiscardUnknown(m) -} - -var xxx_messageInfo_TXInput proto.InternalMessageInfo - -func (m *TXInput) GetRawData() *TXInputRaw { - if m != nil { - return m.RawData - } - return nil -} - -func (m *TXInput) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -type TXInputRaw struct { - TxID []byte `protobuf:"bytes,1,opt,name=txID,proto3" json:"txID,omitempty" pg:"txID"` - Vout int64 `protobuf:"varint,2,opt,name=vout,proto3" json:"vout,omitempty" pg:"vout"` - PubKey []byte `protobuf:"bytes,3,opt,name=pubKey,proto3" json:"pubKey,omitempty" pg:"pubKey"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *TXInputRaw) Reset() { *m = TXInputRaw{} } -func (m *TXInputRaw) String() string { return proto.CompactTextString(m) } -func (*TXInputRaw) ProtoMessage() {} -func (*TXInputRaw) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{12, 0} -} -func (m *TXInputRaw) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TXInputRaw.Unmarshal(m, b) -} -func (m *TXInputRaw) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TXInputRaw.Marshal(b, m, deterministic) -} -func (m *TXInputRaw) XXX_Merge(src proto.Message) { - xxx_messageInfo_TXInputRaw.Merge(m, src) -} -func (m *TXInputRaw) XXX_Size() int { - return xxx_messageInfo_TXInputRaw.Size(m) -} -func (m *TXInputRaw) XXX_DiscardUnknown() { - xxx_messageInfo_TXInputRaw.DiscardUnknown(m) -} - -var xxx_messageInfo_TXInputRaw proto.InternalMessageInfo - -func (m *TXInputRaw) GetTxID() []byte { - if m != nil { - return m.TxID - } - return nil -} - -func (m *TXInputRaw) GetVout() int64 { - if m != nil { - return m.Vout - } - return 0 -} - -func (m *TXInputRaw) GetPubKey() []byte { - if m != nil { - return m.PubKey - } - return nil -} - -type TXOutputs struct { - Outputs []*TXOutput `protobuf:"bytes,1,rep,name=outputs,proto3" json:"outputs,omitempty" pg:"outputs"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *TXOutputs) Reset() { *m = TXOutputs{} } -func (m *TXOutputs) String() string { return proto.CompactTextString(m) } -func (*TXOutputs) ProtoMessage() {} -func (*TXOutputs) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{13} -} -func (m *TXOutputs) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TXOutputs.Unmarshal(m, b) -} -func (m *TXOutputs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TXOutputs.Marshal(b, m, deterministic) -} -func (m *TXOutputs) XXX_Merge(src proto.Message) { - xxx_messageInfo_TXOutputs.Merge(m, src) -} -func (m *TXOutputs) XXX_Size() int { - return xxx_messageInfo_TXOutputs.Size(m) -} -func (m *TXOutputs) XXX_DiscardUnknown() { - xxx_messageInfo_TXOutputs.DiscardUnknown(m) -} - -var xxx_messageInfo_TXOutputs proto.InternalMessageInfo - -func (m *TXOutputs) GetOutputs() []*TXOutput { - if m != nil { - return m.Outputs - } - return nil -} - -type ResourceReceipt struct { - EnergyUsage int64 `protobuf:"varint,1,opt,name=energy_usage,json=energyUsage,proto3" json:"energy_usage,omitempty" pg:"energy_usage"` - EnergyFee int64 `protobuf:"varint,2,opt,name=energy_fee,json=energyFee,proto3" json:"energy_fee,omitempty" pg:"energy_fee"` - OriginEnergyUsage int64 `protobuf:"varint,3,opt,name=origin_energy_usage,json=originEnergyUsage,proto3" json:"origin_energy_usage,omitempty" pg:"origin_energy_usage"` - EnergyUsageTotal int64 `protobuf:"varint,4,opt,name=energy_usage_total,json=energyUsageTotal,proto3" json:"energy_usage_total,omitempty" pg:"energy_usage_total"` - NetUsage int64 `protobuf:"varint,5,opt,name=net_usage,json=netUsage,proto3" json:"net_usage,omitempty" pg:"net_usage"` - NetFee int64 `protobuf:"varint,6,opt,name=net_fee,json=netFee,proto3" json:"net_fee,omitempty" pg:"net_fee"` - Result Transaction_ResultContractResult `protobuf:"varint,7,opt,name=result,proto3,enum=protocol.Transaction_ResultContractResult" json:"result,omitempty" pg:"result"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ResourceReceipt) Reset() { *m = ResourceReceipt{} } -func (m *ResourceReceipt) String() string { return proto.CompactTextString(m) } -func (*ResourceReceipt) ProtoMessage() {} -func (*ResourceReceipt) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{14} -} -func (m *ResourceReceipt) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ResourceReceipt.Unmarshal(m, b) -} -func (m *ResourceReceipt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ResourceReceipt.Marshal(b, m, deterministic) -} -func (m *ResourceReceipt) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceReceipt.Merge(m, src) -} -func (m *ResourceReceipt) XXX_Size() int { - return xxx_messageInfo_ResourceReceipt.Size(m) -} -func (m *ResourceReceipt) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceReceipt.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceReceipt proto.InternalMessageInfo - -func (m *ResourceReceipt) GetEnergyUsage() int64 { - if m != nil { - return m.EnergyUsage - } - return 0 -} - -func (m *ResourceReceipt) GetEnergyFee() int64 { - if m != nil { - return m.EnergyFee - } - return 0 -} - -func (m *ResourceReceipt) GetOriginEnergyUsage() int64 { - if m != nil { - return m.OriginEnergyUsage - } - return 0 -} - -func (m *ResourceReceipt) GetEnergyUsageTotal() int64 { - if m != nil { - return m.EnergyUsageTotal - } - return 0 -} - -func (m *ResourceReceipt) GetNetUsage() int64 { - if m != nil { - return m.NetUsage - } - return 0 -} - -func (m *ResourceReceipt) GetNetFee() int64 { - if m != nil { - return m.NetFee - } - return 0 -} - -func (m *ResourceReceipt) GetResult() Transaction_ResultContractResult { - if m != nil { - return m.Result - } - return Transaction_Result_DEFAULT -} - -type Transaction struct { - RawData *TransactionRaw `protobuf:"bytes,1,opt,name=raw_data,json=rawData,proto3" json:"raw_data,omitempty" pg:"raw_data"` - // only support size = 1, repeated list here for muti-sig extension - Signature [][]byte `protobuf:"bytes,2,rep,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - Ret []*Transaction_Result `protobuf:"bytes,5,rep,name=ret,proto3" json:"ret,omitempty" pg:"ret"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Transaction) Reset() { *m = Transaction{} } -func (m *Transaction) String() string { return proto.CompactTextString(m) } -func (*Transaction) ProtoMessage() {} -func (*Transaction) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{15} -} -func (m *Transaction) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Transaction.Unmarshal(m, b) -} -func (m *Transaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Transaction.Marshal(b, m, deterministic) -} -func (m *Transaction) XXX_Merge(src proto.Message) { - xxx_messageInfo_Transaction.Merge(m, src) -} -func (m *Transaction) XXX_Size() int { - return xxx_messageInfo_Transaction.Size(m) -} -func (m *Transaction) XXX_DiscardUnknown() { - xxx_messageInfo_Transaction.DiscardUnknown(m) -} - -var xxx_messageInfo_Transaction proto.InternalMessageInfo - -func (m *Transaction) GetRawData() *TransactionRaw { - if m != nil { - return m.RawData - } - return nil -} - -func (m *Transaction) GetSignature() [][]byte { - if m != nil { - return m.Signature - } - return nil -} - -func (m *Transaction) GetRet() []*Transaction_Result { - if m != nil { - return m.Ret - } - return nil -} - -type Transaction_Contract struct { - Type Transaction_Contract_ContractType `protobuf:"varint,1,opt,name=type,proto3,enum=protocol.Transaction_Contract_ContractType" json:"type,omitempty" pg:"type"` - Parameter *types.Any `protobuf:"bytes,2,opt,name=parameter,proto3" json:"parameter,omitempty" pg:"parameter"` - Provider []byte `protobuf:"bytes,3,opt,name=provider,proto3" json:"provider,omitempty" pg:"provider"` - ContractName []byte `protobuf:"bytes,4,opt,name=ContractName,proto3" json:"ContractName,omitempty" pg:"ContractName"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Transaction_Contract) Reset() { *m = Transaction_Contract{} } -func (m *Transaction_Contract) String() string { return proto.CompactTextString(m) } -func (*Transaction_Contract) ProtoMessage() {} -func (*Transaction_Contract) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{15, 0} -} -func (m *Transaction_Contract) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Transaction_Contract.Unmarshal(m, b) -} -func (m *Transaction_Contract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Transaction_Contract.Marshal(b, m, deterministic) -} -func (m *Transaction_Contract) XXX_Merge(src proto.Message) { - xxx_messageInfo_Transaction_Contract.Merge(m, src) -} -func (m *Transaction_Contract) XXX_Size() int { - return xxx_messageInfo_Transaction_Contract.Size(m) -} -func (m *Transaction_Contract) XXX_DiscardUnknown() { - xxx_messageInfo_Transaction_Contract.DiscardUnknown(m) -} - -var xxx_messageInfo_Transaction_Contract proto.InternalMessageInfo - -func (m *Transaction_Contract) GetType() Transaction_Contract_ContractType { - if m != nil { - return m.Type - } - return Transaction_Contract_AccountCreateContract -} - -func (m *Transaction_Contract) GetParameter() *types.Any { - if m != nil { - return m.Parameter - } - return nil -} - -func (m *Transaction_Contract) GetProvider() []byte { - if m != nil { - return m.Provider - } - return nil -} - -func (m *Transaction_Contract) GetContractName() []byte { - if m != nil { - return m.ContractName - } - return nil -} - -type Transaction_Result struct { - Fee int64 `protobuf:"varint,1,opt,name=fee,proto3" json:"fee,omitempty" pg:"fee"` - Ret Transaction_ResultCode `protobuf:"varint,2,opt,name=ret,proto3,enum=protocol.Transaction_ResultCode" json:"ret,omitempty" pg:"ret"` - ContractRet Transaction_ResultContractResult `protobuf:"varint,3,opt,name=contractRet,proto3,enum=protocol.Transaction_ResultContractResult" json:"contractRet,omitempty" pg:"contractRet"` - AssetIssueID string `protobuf:"bytes,14,opt,name=assetIssueID,proto3" json:"assetIssueID,omitempty" pg:"assetIssueID"` - WithdrawAmount int64 `protobuf:"varint,15,opt,name=withdraw_amount,json=withdrawAmount,proto3" json:"withdraw_amount,omitempty" pg:"withdraw_amount"` - UnfreezeAmount int64 `protobuf:"varint,16,opt,name=unfreeze_amount,json=unfreezeAmount,proto3" json:"unfreeze_amount,omitempty" pg:"unfreeze_amount"` - ExchangeReceivedAmount int64 `protobuf:"varint,18,opt,name=exchange_received_amount,json=exchangeReceivedAmount,proto3" json:"exchange_received_amount,omitempty" pg:"exchange_received_amount"` - ExchangeInjectAnotherAmount int64 `protobuf:"varint,19,opt,name=exchange_inject_another_amount,json=exchangeInjectAnotherAmount,proto3" json:"exchange_inject_another_amount,omitempty" pg:"exchange_inject_another_amount"` - ExchangeWithdrawAnotherAmount int64 `protobuf:"varint,20,opt,name=exchange_withdraw_another_amount,json=exchangeWithdrawAnotherAmount,proto3" json:"exchange_withdraw_another_amount,omitempty" pg:"exchange_withdraw_another_amount"` - ExchangeId int64 `protobuf:"varint,21,opt,name=exchange_id,json=exchangeId,proto3" json:"exchange_id,omitempty" pg:"exchange_id"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Transaction_Result) Reset() { *m = Transaction_Result{} } -func (m *Transaction_Result) String() string { return proto.CompactTextString(m) } -func (*Transaction_Result) ProtoMessage() {} -func (*Transaction_Result) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{15, 1} -} -func (m *Transaction_Result) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Transaction_Result.Unmarshal(m, b) -} -func (m *Transaction_Result) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Transaction_Result.Marshal(b, m, deterministic) -} -func (m *Transaction_Result) XXX_Merge(src proto.Message) { - xxx_messageInfo_Transaction_Result.Merge(m, src) -} -func (m *Transaction_Result) XXX_Size() int { - return xxx_messageInfo_Transaction_Result.Size(m) -} -func (m *Transaction_Result) XXX_DiscardUnknown() { - xxx_messageInfo_Transaction_Result.DiscardUnknown(m) -} - -var xxx_messageInfo_Transaction_Result proto.InternalMessageInfo - -func (m *Transaction_Result) GetFee() int64 { - if m != nil { - return m.Fee - } - return 0 -} - -func (m *Transaction_Result) GetRet() Transaction_ResultCode { - if m != nil { - return m.Ret - } - return Transaction_Result_SUCESS -} - -func (m *Transaction_Result) GetContractRet() Transaction_ResultContractResult { - if m != nil { - return m.ContractRet - } - return Transaction_Result_DEFAULT -} - -func (m *Transaction_Result) GetAssetIssueID() string { - if m != nil { - return m.AssetIssueID - } - return "" -} - -func (m *Transaction_Result) GetWithdrawAmount() int64 { - if m != nil { - return m.WithdrawAmount - } - return 0 -} - -func (m *Transaction_Result) GetUnfreezeAmount() int64 { - if m != nil { - return m.UnfreezeAmount - } - return 0 -} - -func (m *Transaction_Result) GetExchangeReceivedAmount() int64 { - if m != nil { - return m.ExchangeReceivedAmount - } - return 0 -} - -func (m *Transaction_Result) GetExchangeInjectAnotherAmount() int64 { - if m != nil { - return m.ExchangeInjectAnotherAmount - } - return 0 -} - -func (m *Transaction_Result) GetExchangeWithdrawAnotherAmount() int64 { - if m != nil { - return m.ExchangeWithdrawAnotherAmount - } - return 0 -} - -func (m *Transaction_Result) GetExchangeId() int64 { - if m != nil { - return m.ExchangeId - } - return 0 -} - -type TransactionRaw struct { - RefBlockBytes []byte `protobuf:"bytes,1,opt,name=ref_block_bytes,json=refBlockBytes,proto3" json:"ref_block_bytes,omitempty" pg:"ref_block_bytes"` - RefBlockNum int64 `protobuf:"varint,3,opt,name=ref_block_num,json=refBlockNum,proto3" json:"ref_block_num,omitempty" pg:"ref_block_num"` - RefBlockHash []byte `protobuf:"bytes,4,opt,name=ref_block_hash,json=refBlockHash,proto3" json:"ref_block_hash,omitempty" pg:"ref_block_hash"` - Expiration int64 `protobuf:"varint,8,opt,name=expiration,proto3" json:"expiration,omitempty" pg:"expiration"` - Auths []*Authority `protobuf:"bytes,9,rep,name=auths,proto3" json:"auths,omitempty" pg:"auths"` - // data not used - Data []byte `protobuf:"bytes,10,opt,name=data,proto3" json:"data,omitempty" pg:"data"` - //only support size = 1, repeated list here for extension - Contract []*Transaction_Contract `protobuf:"bytes,11,rep,name=contract,proto3" json:"contract,omitempty" pg:"contract"` - // scripts not used - Scripts []byte `protobuf:"bytes,12,opt,name=scripts,proto3" json:"scripts,omitempty" pg:"scripts"` - Timestamp int64 `protobuf:"varint,14,opt,name=timestamp,proto3" json:"timestamp,omitempty" pg:"timestamp"` - FeeLimit int64 `protobuf:"varint,18,opt,name=fee_limit,json=feeLimit,proto3" json:"fee_limit,omitempty" pg:"fee_limit"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *TransactionRaw) Reset() { *m = TransactionRaw{} } -func (m *TransactionRaw) String() string { return proto.CompactTextString(m) } -func (*TransactionRaw) ProtoMessage() {} -func (*TransactionRaw) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{15, 2} -} -func (m *TransactionRaw) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TransactionRaw.Unmarshal(m, b) -} -func (m *TransactionRaw) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TransactionRaw.Marshal(b, m, deterministic) -} -func (m *TransactionRaw) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionRaw.Merge(m, src) -} -func (m *TransactionRaw) XXX_Size() int { - return xxx_messageInfo_TransactionRaw.Size(m) -} -func (m *TransactionRaw) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionRaw.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionRaw proto.InternalMessageInfo - -func (m *TransactionRaw) GetRefBlockBytes() []byte { - if m != nil { - return m.RefBlockBytes - } - return nil -} - -func (m *TransactionRaw) GetRefBlockNum() int64 { - if m != nil { - return m.RefBlockNum - } - return 0 -} - -func (m *TransactionRaw) GetRefBlockHash() []byte { - if m != nil { - return m.RefBlockHash - } - return nil -} - -func (m *TransactionRaw) GetExpiration() int64 { - if m != nil { - return m.Expiration - } - return 0 -} - -func (m *TransactionRaw) GetAuths() []*Authority { - if m != nil { - return m.Auths - } - return nil -} - -func (m *TransactionRaw) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -func (m *TransactionRaw) GetContract() []*Transaction_Contract { - if m != nil { - return m.Contract - } - return nil -} - -func (m *TransactionRaw) GetScripts() []byte { - if m != nil { - return m.Scripts - } - return nil -} - -func (m *TransactionRaw) GetTimestamp() int64 { - if m != nil { - return m.Timestamp - } - return 0 -} - -func (m *TransactionRaw) GetFeeLimit() int64 { - if m != nil { - return m.FeeLimit - } - return 0 -} - -type TransactionInfo struct { - Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" pg:"id"` - Fee int64 `protobuf:"varint,2,opt,name=fee,proto3" json:"fee,omitempty" pg:"fee"` - BlockNumber int64 `protobuf:"varint,3,opt,name=blockNumber,proto3" json:"blockNumber,omitempty" pg:"blockNumber"` - BlockTimeStamp int64 `protobuf:"varint,4,opt,name=blockTimeStamp,proto3" json:"blockTimeStamp,omitempty" pg:"blockTimeStamp"` - ContractResult [][]byte `protobuf:"bytes,5,rep,name=contractResult,proto3" json:"contractResult,omitempty" pg:"contractResult"` - ContractAddress []byte `protobuf:"bytes,6,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty" pg:"contract_address"` - Receipt *ResourceReceipt `protobuf:"bytes,7,opt,name=receipt,proto3" json:"receipt,omitempty" pg:"receipt"` - Log []*TransactionInfo_Log `protobuf:"bytes,8,rep,name=log,proto3" json:"log,omitempty" pg:"log"` - Result TransactionInfoCode `protobuf:"varint,9,opt,name=result,proto3,enum=protocol.TransactionInfoCode" json:"result,omitempty" pg:"result"` - ResMessage []byte `protobuf:"bytes,10,opt,name=resMessage,proto3" json:"resMessage,omitempty" pg:"resMessage"` - AssetIssueID string `protobuf:"bytes,14,opt,name=assetIssueID,proto3" json:"assetIssueID,omitempty" pg:"assetIssueID"` - WithdrawAmount int64 `protobuf:"varint,15,opt,name=withdraw_amount,json=withdrawAmount,proto3" json:"withdraw_amount,omitempty" pg:"withdraw_amount"` - UnfreezeAmount int64 `protobuf:"varint,16,opt,name=unfreeze_amount,json=unfreezeAmount,proto3" json:"unfreeze_amount,omitempty" pg:"unfreeze_amount"` - InternalTransactions []*InternalTransaction `protobuf:"bytes,17,rep,name=internal_transactions,json=internalTransactions,proto3" json:"internal_transactions,omitempty" pg:"internal_transactions"` - ExchangeReceivedAmount int64 `protobuf:"varint,18,opt,name=exchange_received_amount,json=exchangeReceivedAmount,proto3" json:"exchange_received_amount,omitempty" pg:"exchange_received_amount"` - ExchangeInjectAnotherAmount int64 `protobuf:"varint,19,opt,name=exchange_inject_another_amount,json=exchangeInjectAnotherAmount,proto3" json:"exchange_inject_another_amount,omitempty" pg:"exchange_inject_another_amount"` - ExchangeWithdrawAnotherAmount int64 `protobuf:"varint,20,opt,name=exchange_withdraw_another_amount,json=exchangeWithdrawAnotherAmount,proto3" json:"exchange_withdraw_another_amount,omitempty" pg:"exchange_withdraw_another_amount"` - ExchangeId int64 `protobuf:"varint,21,opt,name=exchange_id,json=exchangeId,proto3" json:"exchange_id,omitempty" pg:"exchange_id"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *TransactionInfo) Reset() { *m = TransactionInfo{} } -func (m *TransactionInfo) String() string { return proto.CompactTextString(m) } -func (*TransactionInfo) ProtoMessage() {} -func (*TransactionInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{16} -} -func (m *TransactionInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TransactionInfo.Unmarshal(m, b) -} -func (m *TransactionInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TransactionInfo.Marshal(b, m, deterministic) -} -func (m *TransactionInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionInfo.Merge(m, src) -} -func (m *TransactionInfo) XXX_Size() int { - return xxx_messageInfo_TransactionInfo.Size(m) -} -func (m *TransactionInfo) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionInfo proto.InternalMessageInfo - -func (m *TransactionInfo) GetId() []byte { - if m != nil { - return m.Id - } - return nil -} - -func (m *TransactionInfo) GetFee() int64 { - if m != nil { - return m.Fee - } - return 0 -} - -func (m *TransactionInfo) GetBlockNumber() int64 { - if m != nil { - return m.BlockNumber - } - return 0 -} - -func (m *TransactionInfo) GetBlockTimeStamp() int64 { - if m != nil { - return m.BlockTimeStamp - } - return 0 -} - -func (m *TransactionInfo) GetContractResult() [][]byte { - if m != nil { - return m.ContractResult - } - return nil -} - -func (m *TransactionInfo) GetContractAddress() []byte { - if m != nil { - return m.ContractAddress - } - return nil -} - -func (m *TransactionInfo) GetReceipt() *ResourceReceipt { - if m != nil { - return m.Receipt - } - return nil -} - -func (m *TransactionInfo) GetLog() []*TransactionInfo_Log { - if m != nil { - return m.Log - } - return nil -} - -func (m *TransactionInfo) GetResult() TransactionInfoCode { - if m != nil { - return m.Result - } - return TransactionInfo_SUCESS -} - -func (m *TransactionInfo) GetResMessage() []byte { - if m != nil { - return m.ResMessage - } - return nil -} - -func (m *TransactionInfo) GetAssetIssueID() string { - if m != nil { - return m.AssetIssueID - } - return "" -} - -func (m *TransactionInfo) GetWithdrawAmount() int64 { - if m != nil { - return m.WithdrawAmount - } - return 0 -} - -func (m *TransactionInfo) GetUnfreezeAmount() int64 { - if m != nil { - return m.UnfreezeAmount - } - return 0 -} - -func (m *TransactionInfo) GetInternalTransactions() []*InternalTransaction { - if m != nil { - return m.InternalTransactions - } - return nil -} - -func (m *TransactionInfo) GetExchangeReceivedAmount() int64 { - if m != nil { - return m.ExchangeReceivedAmount - } - return 0 -} - -func (m *TransactionInfo) GetExchangeInjectAnotherAmount() int64 { - if m != nil { - return m.ExchangeInjectAnotherAmount - } - return 0 -} - -func (m *TransactionInfo) GetExchangeWithdrawAnotherAmount() int64 { - if m != nil { - return m.ExchangeWithdrawAnotherAmount - } - return 0 -} - -func (m *TransactionInfo) GetExchangeId() int64 { - if m != nil { - return m.ExchangeId - } - return 0 -} - -type TransactionInfo_Log struct { - Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" pg:"address"` - Topics [][]byte `protobuf:"bytes,2,rep,name=topics,proto3" json:"topics,omitempty" pg:"topics"` - Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty" pg:"data"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *TransactionInfo_Log) Reset() { *m = TransactionInfo_Log{} } -func (m *TransactionInfo_Log) String() string { return proto.CompactTextString(m) } -func (*TransactionInfo_Log) ProtoMessage() {} -func (*TransactionInfo_Log) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{16, 0} -} -func (m *TransactionInfo_Log) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TransactionInfo_Log.Unmarshal(m, b) -} -func (m *TransactionInfo_Log) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TransactionInfo_Log.Marshal(b, m, deterministic) -} -func (m *TransactionInfo_Log) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionInfo_Log.Merge(m, src) -} -func (m *TransactionInfo_Log) XXX_Size() int { - return xxx_messageInfo_TransactionInfo_Log.Size(m) -} -func (m *TransactionInfo_Log) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionInfo_Log.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionInfo_Log proto.InternalMessageInfo - -func (m *TransactionInfo_Log) GetAddress() []byte { - if m != nil { - return m.Address - } - return nil -} - -func (m *TransactionInfo_Log) GetTopics() [][]byte { - if m != nil { - return m.Topics - } - return nil -} - -func (m *TransactionInfo_Log) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -type Transactions struct { - Transactions []*Transaction `protobuf:"bytes,1,rep,name=transactions,proto3" json:"transactions,omitempty" pg:"transactions"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Transactions) Reset() { *m = Transactions{} } -func (m *Transactions) String() string { return proto.CompactTextString(m) } -func (*Transactions) ProtoMessage() {} -func (*Transactions) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{17} -} -func (m *Transactions) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Transactions.Unmarshal(m, b) -} -func (m *Transactions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Transactions.Marshal(b, m, deterministic) -} -func (m *Transactions) XXX_Merge(src proto.Message) { - xxx_messageInfo_Transactions.Merge(m, src) -} -func (m *Transactions) XXX_Size() int { - return xxx_messageInfo_Transactions.Size(m) -} -func (m *Transactions) XXX_DiscardUnknown() { - xxx_messageInfo_Transactions.DiscardUnknown(m) -} - -var xxx_messageInfo_Transactions proto.InternalMessageInfo - -func (m *Transactions) GetTransactions() []*Transaction { - if m != nil { - return m.Transactions - } - return nil -} - -type TransactionSign struct { - Transaction *Transaction `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty" pg:"transaction"` - PrivateKey []byte `protobuf:"bytes,2,opt,name=privateKey,proto3" json:"privateKey,omitempty" pg:"privateKey"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *TransactionSign) Reset() { *m = TransactionSign{} } -func (m *TransactionSign) String() string { return proto.CompactTextString(m) } -func (*TransactionSign) ProtoMessage() {} -func (*TransactionSign) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{18} -} -func (m *TransactionSign) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TransactionSign.Unmarshal(m, b) -} -func (m *TransactionSign) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TransactionSign.Marshal(b, m, deterministic) -} -func (m *TransactionSign) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionSign.Merge(m, src) -} -func (m *TransactionSign) XXX_Size() int { - return xxx_messageInfo_TransactionSign.Size(m) -} -func (m *TransactionSign) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionSign.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionSign proto.InternalMessageInfo - -func (m *TransactionSign) GetTransaction() *Transaction { - if m != nil { - return m.Transaction - } - return nil -} - -func (m *TransactionSign) GetPrivateKey() []byte { - if m != nil { - return m.PrivateKey - } - return nil -} - -type BlockHeader struct { - RawData *BlockHeaderRaw `protobuf:"bytes,1,opt,name=raw_data,json=rawData,proto3" json:"raw_data,omitempty" pg:"raw_data"` - WitnessSignature []byte `protobuf:"bytes,2,opt,name=witness_signature,json=witnessSignature,proto3" json:"witness_signature,omitempty" pg:"witness_signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *BlockHeader) Reset() { *m = BlockHeader{} } -func (m *BlockHeader) String() string { return proto.CompactTextString(m) } -func (*BlockHeader) ProtoMessage() {} -func (*BlockHeader) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{19} -} -func (m *BlockHeader) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BlockHeader.Unmarshal(m, b) -} -func (m *BlockHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BlockHeader.Marshal(b, m, deterministic) -} -func (m *BlockHeader) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockHeader.Merge(m, src) -} -func (m *BlockHeader) XXX_Size() int { - return xxx_messageInfo_BlockHeader.Size(m) -} -func (m *BlockHeader) XXX_DiscardUnknown() { - xxx_messageInfo_BlockHeader.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockHeader proto.InternalMessageInfo - -func (m *BlockHeader) GetRawData() *BlockHeaderRaw { - if m != nil { - return m.RawData - } - return nil -} - -func (m *BlockHeader) GetWitnessSignature() []byte { - if m != nil { - return m.WitnessSignature - } - return nil -} - -type BlockHeaderRaw struct { - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty" pg:"timestamp"` - TxTrieRoot []byte `protobuf:"bytes,2,opt,name=txTrieRoot,proto3" json:"txTrieRoot,omitempty" pg:"txTrieRoot"` - ParentHash []byte `protobuf:"bytes,3,opt,name=parentHash,proto3" json:"parentHash,omitempty" pg:"parentHash"` - //bytes nonce = 5; - //bytes difficulty = 6; - Number int64 `protobuf:"varint,7,opt,name=number,proto3" json:"number,omitempty" pg:"number"` - WitnessId int64 `protobuf:"varint,8,opt,name=witness_id,json=witnessId,proto3" json:"witness_id,omitempty" pg:"witness_id"` - WitnessAddress []byte `protobuf:"bytes,9,opt,name=witness_address,json=witnessAddress,proto3" json:"witness_address,omitempty" pg:"witness_address"` - Version int32 `protobuf:"varint,10,opt,name=version,proto3" json:"version,omitempty" pg:"version"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *BlockHeaderRaw) Reset() { *m = BlockHeaderRaw{} } -func (m *BlockHeaderRaw) String() string { return proto.CompactTextString(m) } -func (*BlockHeaderRaw) ProtoMessage() {} -func (*BlockHeaderRaw) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{19, 0} -} -func (m *BlockHeaderRaw) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BlockHeaderRaw.Unmarshal(m, b) -} -func (m *BlockHeaderRaw) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BlockHeaderRaw.Marshal(b, m, deterministic) -} -func (m *BlockHeaderRaw) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockHeaderRaw.Merge(m, src) -} -func (m *BlockHeaderRaw) XXX_Size() int { - return xxx_messageInfo_BlockHeaderRaw.Size(m) -} -func (m *BlockHeaderRaw) XXX_DiscardUnknown() { - xxx_messageInfo_BlockHeaderRaw.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockHeaderRaw proto.InternalMessageInfo - -func (m *BlockHeaderRaw) GetTimestamp() int64 { - if m != nil { - return m.Timestamp - } - return 0 -} - -func (m *BlockHeaderRaw) GetTxTrieRoot() []byte { - if m != nil { - return m.TxTrieRoot - } - return nil -} - -func (m *BlockHeaderRaw) GetParentHash() []byte { - if m != nil { - return m.ParentHash - } - return nil -} - -func (m *BlockHeaderRaw) GetNumber() int64 { - if m != nil { - return m.Number - } - return 0 -} - -func (m *BlockHeaderRaw) GetWitnessId() int64 { - if m != nil { - return m.WitnessId - } - return 0 -} - -func (m *BlockHeaderRaw) GetWitnessAddress() []byte { - if m != nil { - return m.WitnessAddress - } - return nil -} - -func (m *BlockHeaderRaw) GetVersion() int32 { - if m != nil { - return m.Version - } - return 0 -} - -// block -type Block struct { - Transactions []*Transaction `protobuf:"bytes,1,rep,name=transactions,proto3" json:"transactions,omitempty" pg:"transactions"` - BlockHeader *BlockHeader `protobuf:"bytes,2,opt,name=block_header,json=blockHeader,proto3" json:"block_header,omitempty" pg:"block_header"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Block) Reset() { *m = Block{} } -func (m *Block) String() string { return proto.CompactTextString(m) } -func (*Block) ProtoMessage() {} -func (*Block) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{20} -} -func (m *Block) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Block.Unmarshal(m, b) -} -func (m *Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Block.Marshal(b, m, deterministic) -} -func (m *Block) XXX_Merge(src proto.Message) { - xxx_messageInfo_Block.Merge(m, src) -} -func (m *Block) XXX_Size() int { - return xxx_messageInfo_Block.Size(m) -} -func (m *Block) XXX_DiscardUnknown() { - xxx_messageInfo_Block.DiscardUnknown(m) -} - -var xxx_messageInfo_Block proto.InternalMessageInfo - -func (m *Block) GetTransactions() []*Transaction { - if m != nil { - return m.Transactions - } - return nil -} - -func (m *Block) GetBlockHeader() *BlockHeader { - if m != nil { - return m.BlockHeader - } - return nil -} - -type ChainInventory struct { - Ids []*ChainInventory_BlockId `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty" pg:"ids"` - RemainNum int64 `protobuf:"varint,2,opt,name=remain_num,json=remainNum,proto3" json:"remain_num,omitempty" pg:"remain_num"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ChainInventory) Reset() { *m = ChainInventory{} } -func (m *ChainInventory) String() string { return proto.CompactTextString(m) } -func (*ChainInventory) ProtoMessage() {} -func (*ChainInventory) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{21} -} -func (m *ChainInventory) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ChainInventory.Unmarshal(m, b) -} -func (m *ChainInventory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ChainInventory.Marshal(b, m, deterministic) -} -func (m *ChainInventory) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChainInventory.Merge(m, src) -} -func (m *ChainInventory) XXX_Size() int { - return xxx_messageInfo_ChainInventory.Size(m) -} -func (m *ChainInventory) XXX_DiscardUnknown() { - xxx_messageInfo_ChainInventory.DiscardUnknown(m) -} - -var xxx_messageInfo_ChainInventory proto.InternalMessageInfo - -func (m *ChainInventory) GetIds() []*ChainInventory_BlockId { - if m != nil { - return m.Ids - } - return nil -} - -func (m *ChainInventory) GetRemainNum() int64 { - if m != nil { - return m.RemainNum - } - return 0 -} - -type ChainInventory_BlockId struct { - Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty" pg:"hash"` - Number int64 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty" pg:"number"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ChainInventory_BlockId) Reset() { *m = ChainInventory_BlockId{} } -func (m *ChainInventory_BlockId) String() string { return proto.CompactTextString(m) } -func (*ChainInventory_BlockId) ProtoMessage() {} -func (*ChainInventory_BlockId) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{21, 0} -} -func (m *ChainInventory_BlockId) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ChainInventory_BlockId.Unmarshal(m, b) -} -func (m *ChainInventory_BlockId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ChainInventory_BlockId.Marshal(b, m, deterministic) -} -func (m *ChainInventory_BlockId) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChainInventory_BlockId.Merge(m, src) -} -func (m *ChainInventory_BlockId) XXX_Size() int { - return xxx_messageInfo_ChainInventory_BlockId.Size(m) -} -func (m *ChainInventory_BlockId) XXX_DiscardUnknown() { - xxx_messageInfo_ChainInventory_BlockId.DiscardUnknown(m) -} - -var xxx_messageInfo_ChainInventory_BlockId proto.InternalMessageInfo - -func (m *ChainInventory_BlockId) GetHash() []byte { - if m != nil { - return m.Hash - } - return nil -} - -func (m *ChainInventory_BlockId) GetNumber() int64 { - if m != nil { - return m.Number - } - return 0 -} - -// Inventory -type BlockInventory struct { - Ids []*BlockInventory_BlockId `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty" pg:"ids"` - Type BlockInventory_Type `protobuf:"varint,2,opt,name=type,proto3,enum=protocol.BlockInventory_Type" json:"type,omitempty" pg:"type"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *BlockInventory) Reset() { *m = BlockInventory{} } -func (m *BlockInventory) String() string { return proto.CompactTextString(m) } -func (*BlockInventory) ProtoMessage() {} -func (*BlockInventory) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{22} -} -func (m *BlockInventory) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BlockInventory.Unmarshal(m, b) -} -func (m *BlockInventory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BlockInventory.Marshal(b, m, deterministic) -} -func (m *BlockInventory) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockInventory.Merge(m, src) -} -func (m *BlockInventory) XXX_Size() int { - return xxx_messageInfo_BlockInventory.Size(m) -} -func (m *BlockInventory) XXX_DiscardUnknown() { - xxx_messageInfo_BlockInventory.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockInventory proto.InternalMessageInfo - -func (m *BlockInventory) GetIds() []*BlockInventory_BlockId { - if m != nil { - return m.Ids - } - return nil -} - -func (m *BlockInventory) GetType() BlockInventory_Type { - if m != nil { - return m.Type - } - return BlockInventory_SYNC -} - -type BlockInventory_BlockId struct { - Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty" pg:"hash"` - Number int64 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty" pg:"number"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *BlockInventory_BlockId) Reset() { *m = BlockInventory_BlockId{} } -func (m *BlockInventory_BlockId) String() string { return proto.CompactTextString(m) } -func (*BlockInventory_BlockId) ProtoMessage() {} -func (*BlockInventory_BlockId) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{22, 0} -} -func (m *BlockInventory_BlockId) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BlockInventory_BlockId.Unmarshal(m, b) -} -func (m *BlockInventory_BlockId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BlockInventory_BlockId.Marshal(b, m, deterministic) -} -func (m *BlockInventory_BlockId) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockInventory_BlockId.Merge(m, src) -} -func (m *BlockInventory_BlockId) XXX_Size() int { - return xxx_messageInfo_BlockInventory_BlockId.Size(m) -} -func (m *BlockInventory_BlockId) XXX_DiscardUnknown() { - xxx_messageInfo_BlockInventory_BlockId.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockInventory_BlockId proto.InternalMessageInfo - -func (m *BlockInventory_BlockId) GetHash() []byte { - if m != nil { - return m.Hash - } - return nil -} - -func (m *BlockInventory_BlockId) GetNumber() int64 { - if m != nil { - return m.Number - } - return 0 -} - -type Inventory struct { - Type Inventory_InventoryType `protobuf:"varint,1,opt,name=type,proto3,enum=protocol.Inventory_InventoryType" json:"type,omitempty" pg:"type"` - Ids [][]byte `protobuf:"bytes,2,rep,name=ids,proto3" json:"ids,omitempty" pg:"ids"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Inventory) Reset() { *m = Inventory{} } -func (m *Inventory) String() string { return proto.CompactTextString(m) } -func (*Inventory) ProtoMessage() {} -func (*Inventory) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{23} -} -func (m *Inventory) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Inventory.Unmarshal(m, b) -} -func (m *Inventory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Inventory.Marshal(b, m, deterministic) -} -func (m *Inventory) XXX_Merge(src proto.Message) { - xxx_messageInfo_Inventory.Merge(m, src) -} -func (m *Inventory) XXX_Size() int { - return xxx_messageInfo_Inventory.Size(m) -} -func (m *Inventory) XXX_DiscardUnknown() { - xxx_messageInfo_Inventory.DiscardUnknown(m) -} - -var xxx_messageInfo_Inventory proto.InternalMessageInfo - -func (m *Inventory) GetType() Inventory_InventoryType { - if m != nil { - return m.Type - } - return Inventory_TRX -} - -func (m *Inventory) GetIds() [][]byte { - if m != nil { - return m.Ids - } - return nil -} - -type Items struct { - Type Items_ItemType `protobuf:"varint,1,opt,name=type,proto3,enum=protocol.Items_ItemType" json:"type,omitempty" pg:"type"` - Blocks []*Block `protobuf:"bytes,2,rep,name=blocks,proto3" json:"blocks,omitempty" pg:"blocks"` - BlockHeaders []*BlockHeader `protobuf:"bytes,3,rep,name=block_headers,json=blockHeaders,proto3" json:"block_headers,omitempty" pg:"block_headers"` - Transactions []*Transaction `protobuf:"bytes,4,rep,name=transactions,proto3" json:"transactions,omitempty" pg:"transactions"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Items) Reset() { *m = Items{} } -func (m *Items) String() string { return proto.CompactTextString(m) } -func (*Items) ProtoMessage() {} -func (*Items) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{24} -} -func (m *Items) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Items.Unmarshal(m, b) -} -func (m *Items) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Items.Marshal(b, m, deterministic) -} -func (m *Items) XXX_Merge(src proto.Message) { - xxx_messageInfo_Items.Merge(m, src) -} -func (m *Items) XXX_Size() int { - return xxx_messageInfo_Items.Size(m) -} -func (m *Items) XXX_DiscardUnknown() { - xxx_messageInfo_Items.DiscardUnknown(m) -} - -var xxx_messageInfo_Items proto.InternalMessageInfo - -func (m *Items) GetType() Items_ItemType { - if m != nil { - return m.Type - } - return Items_ERR -} - -func (m *Items) GetBlocks() []*Block { - if m != nil { - return m.Blocks - } - return nil -} - -func (m *Items) GetBlockHeaders() []*BlockHeader { - if m != nil { - return m.BlockHeaders - } - return nil -} - -func (m *Items) GetTransactions() []*Transaction { - if m != nil { - return m.Transactions - } - return nil -} - -// DynamicProperties -type DynamicProperties struct { - LastSolidityBlockNum int64 `protobuf:"varint,1,opt,name=last_solidity_block_num,json=lastSolidityBlockNum,proto3" json:"last_solidity_block_num,omitempty" pg:"last_solidity_block_num"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *DynamicProperties) Reset() { *m = DynamicProperties{} } -func (m *DynamicProperties) String() string { return proto.CompactTextString(m) } -func (*DynamicProperties) ProtoMessage() {} -func (*DynamicProperties) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{25} -} -func (m *DynamicProperties) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DynamicProperties.Unmarshal(m, b) -} -func (m *DynamicProperties) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DynamicProperties.Marshal(b, m, deterministic) -} -func (m *DynamicProperties) XXX_Merge(src proto.Message) { - xxx_messageInfo_DynamicProperties.Merge(m, src) -} -func (m *DynamicProperties) XXX_Size() int { - return xxx_messageInfo_DynamicProperties.Size(m) -} -func (m *DynamicProperties) XXX_DiscardUnknown() { - xxx_messageInfo_DynamicProperties.DiscardUnknown(m) -} - -var xxx_messageInfo_DynamicProperties proto.InternalMessageInfo - -func (m *DynamicProperties) GetLastSolidityBlockNum() int64 { - if m != nil { - return m.LastSolidityBlockNum - } - return 0 -} - -type DisconnectMessage struct { - Reason ReasonCode `protobuf:"varint,1,opt,name=reason,proto3,enum=protocol.ReasonCode" json:"reason,omitempty" pg:"reason"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *DisconnectMessage) Reset() { *m = DisconnectMessage{} } -func (m *DisconnectMessage) String() string { return proto.CompactTextString(m) } -func (*DisconnectMessage) ProtoMessage() {} -func (*DisconnectMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{26} -} -func (m *DisconnectMessage) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DisconnectMessage.Unmarshal(m, b) -} -func (m *DisconnectMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DisconnectMessage.Marshal(b, m, deterministic) -} -func (m *DisconnectMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_DisconnectMessage.Merge(m, src) -} -func (m *DisconnectMessage) XXX_Size() int { - return xxx_messageInfo_DisconnectMessage.Size(m) -} -func (m *DisconnectMessage) XXX_DiscardUnknown() { - xxx_messageInfo_DisconnectMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_DisconnectMessage proto.InternalMessageInfo - -func (m *DisconnectMessage) GetReason() ReasonCode { - if m != nil { - return m.Reason - } - return ReasonCode_REQUESTED -} - -type HelloMessage struct { - From *Endpoint `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty" pg:"from"` - Version int32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty" pg:"version"` - Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty" pg:"timestamp"` - GenesisBlockId *HelloMessage_BlockId `protobuf:"bytes,4,opt,name=genesisBlockId,proto3" json:"genesisBlockId,omitempty" pg:"genesisBlockId"` - SolidBlockId *HelloMessage_BlockId `protobuf:"bytes,5,opt,name=solidBlockId,proto3" json:"solidBlockId,omitempty" pg:"solidBlockId"` - HeadBlockId *HelloMessage_BlockId `protobuf:"bytes,6,opt,name=headBlockId,proto3" json:"headBlockId,omitempty" pg:"headBlockId"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *HelloMessage) Reset() { *m = HelloMessage{} } -func (m *HelloMessage) String() string { return proto.CompactTextString(m) } -func (*HelloMessage) ProtoMessage() {} -func (*HelloMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{27} -} -func (m *HelloMessage) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HelloMessage.Unmarshal(m, b) -} -func (m *HelloMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_HelloMessage.Marshal(b, m, deterministic) -} -func (m *HelloMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_HelloMessage.Merge(m, src) -} -func (m *HelloMessage) XXX_Size() int { - return xxx_messageInfo_HelloMessage.Size(m) -} -func (m *HelloMessage) XXX_DiscardUnknown() { - xxx_messageInfo_HelloMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_HelloMessage proto.InternalMessageInfo - -func (m *HelloMessage) GetFrom() *Endpoint { - if m != nil { - return m.From - } - return nil -} - -func (m *HelloMessage) GetVersion() int32 { - if m != nil { - return m.Version - } - return 0 -} - -func (m *HelloMessage) GetTimestamp() int64 { - if m != nil { - return m.Timestamp - } - return 0 -} - -func (m *HelloMessage) GetGenesisBlockId() *HelloMessage_BlockId { - if m != nil { - return m.GenesisBlockId - } - return nil -} - -func (m *HelloMessage) GetSolidBlockId() *HelloMessage_BlockId { - if m != nil { - return m.SolidBlockId - } - return nil -} - -func (m *HelloMessage) GetHeadBlockId() *HelloMessage_BlockId { - if m != nil { - return m.HeadBlockId - } - return nil -} - -type HelloMessage_BlockId struct { - Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty" pg:"hash"` - Number int64 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty" pg:"number"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *HelloMessage_BlockId) Reset() { *m = HelloMessage_BlockId{} } -func (m *HelloMessage_BlockId) String() string { return proto.CompactTextString(m) } -func (*HelloMessage_BlockId) ProtoMessage() {} -func (*HelloMessage_BlockId) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{27, 0} -} -func (m *HelloMessage_BlockId) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HelloMessage_BlockId.Unmarshal(m, b) -} -func (m *HelloMessage_BlockId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_HelloMessage_BlockId.Marshal(b, m, deterministic) -} -func (m *HelloMessage_BlockId) XXX_Merge(src proto.Message) { - xxx_messageInfo_HelloMessage_BlockId.Merge(m, src) -} -func (m *HelloMessage_BlockId) XXX_Size() int { - return xxx_messageInfo_HelloMessage_BlockId.Size(m) -} -func (m *HelloMessage_BlockId) XXX_DiscardUnknown() { - xxx_messageInfo_HelloMessage_BlockId.DiscardUnknown(m) -} - -var xxx_messageInfo_HelloMessage_BlockId proto.InternalMessageInfo - -func (m *HelloMessage_BlockId) GetHash() []byte { - if m != nil { - return m.Hash - } - return nil -} - -func (m *HelloMessage_BlockId) GetNumber() int64 { - if m != nil { - return m.Number - } - return 0 -} - -type SmartContract struct { - OriginAddress []byte `protobuf:"bytes,1,opt,name=origin_address,json=originAddress,proto3" json:"origin_address,omitempty" pg:"origin_address"` - ContractAddress []byte `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty" pg:"contract_address"` - Abi *SmartContract_ABI `protobuf:"bytes,3,opt,name=abi,proto3" json:"abi,omitempty" pg:"abi"` - Bytecode []byte `protobuf:"bytes,4,opt,name=bytecode,proto3" json:"bytecode,omitempty" pg:"bytecode"` - CallValue int64 `protobuf:"varint,5,opt,name=call_value,json=callValue,proto3" json:"call_value,omitempty" pg:"call_value"` - ConsumeUserResourcePercent int64 `protobuf:"varint,6,opt,name=consume_user_resource_percent,json=consumeUserResourcePercent,proto3" json:"consume_user_resource_percent,omitempty" pg:"consume_user_resource_percent"` - Name string `protobuf:"bytes,7,opt,name=name,proto3" json:"name,omitempty" pg:"name"` - OriginEnergyLimit int64 `protobuf:"varint,8,opt,name=origin_energy_limit,json=originEnergyLimit,proto3" json:"origin_energy_limit,omitempty" pg:"origin_energy_limit"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SmartContract) Reset() { *m = SmartContract{} } -func (m *SmartContract) String() string { return proto.CompactTextString(m) } -func (*SmartContract) ProtoMessage() {} -func (*SmartContract) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{28} -} -func (m *SmartContract) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SmartContract.Unmarshal(m, b) -} -func (m *SmartContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SmartContract.Marshal(b, m, deterministic) -} -func (m *SmartContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_SmartContract.Merge(m, src) -} -func (m *SmartContract) XXX_Size() int { - return xxx_messageInfo_SmartContract.Size(m) -} -func (m *SmartContract) XXX_DiscardUnknown() { - xxx_messageInfo_SmartContract.DiscardUnknown(m) -} - -var xxx_messageInfo_SmartContract proto.InternalMessageInfo - -func (m *SmartContract) GetOriginAddress() []byte { - if m != nil { - return m.OriginAddress - } - return nil -} - -func (m *SmartContract) GetContractAddress() []byte { - if m != nil { - return m.ContractAddress - } - return nil -} - -func (m *SmartContract) GetAbi() *SmartContract_ABI { - if m != nil { - return m.Abi - } - return nil -} - -func (m *SmartContract) GetBytecode() []byte { - if m != nil { - return m.Bytecode - } - return nil -} - -func (m *SmartContract) GetCallValue() int64 { - if m != nil { - return m.CallValue - } - return 0 -} - -func (m *SmartContract) GetConsumeUserResourcePercent() int64 { - if m != nil { - return m.ConsumeUserResourcePercent - } - return 0 -} - -func (m *SmartContract) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *SmartContract) GetOriginEnergyLimit() int64 { - if m != nil { - return m.OriginEnergyLimit - } - return 0 -} - -type SmartContract_ABI struct { - Entrys []*SmartContract_ABI_Entry `protobuf:"bytes,1,rep,name=entrys,proto3" json:"entrys,omitempty" pg:"entrys"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SmartContract_ABI) Reset() { *m = SmartContract_ABI{} } -func (m *SmartContract_ABI) String() string { return proto.CompactTextString(m) } -func (*SmartContract_ABI) ProtoMessage() {} -func (*SmartContract_ABI) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{28, 0} -} -func (m *SmartContract_ABI) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SmartContract_ABI.Unmarshal(m, b) -} -func (m *SmartContract_ABI) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SmartContract_ABI.Marshal(b, m, deterministic) -} -func (m *SmartContract_ABI) XXX_Merge(src proto.Message) { - xxx_messageInfo_SmartContract_ABI.Merge(m, src) -} -func (m *SmartContract_ABI) XXX_Size() int { - return xxx_messageInfo_SmartContract_ABI.Size(m) -} -func (m *SmartContract_ABI) XXX_DiscardUnknown() { - xxx_messageInfo_SmartContract_ABI.DiscardUnknown(m) -} - -var xxx_messageInfo_SmartContract_ABI proto.InternalMessageInfo - -func (m *SmartContract_ABI) GetEntrys() []*SmartContract_ABI_Entry { - if m != nil { - return m.Entrys - } - return nil -} - -type SmartContract_ABI_Entry struct { - Anonymous bool `protobuf:"varint,1,opt,name=anonymous,proto3" json:"anonymous,omitempty" pg:"anonymous"` - Constant bool `protobuf:"varint,2,opt,name=constant,proto3" json:"constant,omitempty" pg:"constant"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty" pg:"name"` - Inputs []*SmartContract_ABI_Entry_Param `protobuf:"bytes,4,rep,name=inputs,proto3" json:"inputs,omitempty" pg:"inputs"` - Outputs []*SmartContract_ABI_Entry_Param `protobuf:"bytes,5,rep,name=outputs,proto3" json:"outputs,omitempty" pg:"outputs"` - Type SmartContract_ABI_Entry_EntryType `protobuf:"varint,6,opt,name=type,proto3,enum=protocol.SmartContract_ABI_Entry_EntryType" json:"type,omitempty" pg:"type"` - Payable bool `protobuf:"varint,7,opt,name=payable,proto3" json:"payable,omitempty" pg:"payable"` - StateMutability SmartContract_ABI_Entry_StateMutabilityType `protobuf:"varint,8,opt,name=stateMutability,proto3,enum=protocol.SmartContract_ABI_Entry_StateMutabilityType" json:"stateMutability,omitempty" pg:"stateMutability"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SmartContract_ABI_Entry) Reset() { *m = SmartContract_ABI_Entry{} } -func (m *SmartContract_ABI_Entry) String() string { return proto.CompactTextString(m) } -func (*SmartContract_ABI_Entry) ProtoMessage() {} -func (*SmartContract_ABI_Entry) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{28, 0, 0} -} -func (m *SmartContract_ABI_Entry) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SmartContract_ABI_Entry.Unmarshal(m, b) -} -func (m *SmartContract_ABI_Entry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SmartContract_ABI_Entry.Marshal(b, m, deterministic) -} -func (m *SmartContract_ABI_Entry) XXX_Merge(src proto.Message) { - xxx_messageInfo_SmartContract_ABI_Entry.Merge(m, src) -} -func (m *SmartContract_ABI_Entry) XXX_Size() int { - return xxx_messageInfo_SmartContract_ABI_Entry.Size(m) -} -func (m *SmartContract_ABI_Entry) XXX_DiscardUnknown() { - xxx_messageInfo_SmartContract_ABI_Entry.DiscardUnknown(m) -} - -var xxx_messageInfo_SmartContract_ABI_Entry proto.InternalMessageInfo - -func (m *SmartContract_ABI_Entry) GetAnonymous() bool { - if m != nil { - return m.Anonymous - } - return false -} - -func (m *SmartContract_ABI_Entry) GetConstant() bool { - if m != nil { - return m.Constant - } - return false -} - -func (m *SmartContract_ABI_Entry) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *SmartContract_ABI_Entry) GetInputs() []*SmartContract_ABI_Entry_Param { - if m != nil { - return m.Inputs - } - return nil -} - -func (m *SmartContract_ABI_Entry) GetOutputs() []*SmartContract_ABI_Entry_Param { - if m != nil { - return m.Outputs - } - return nil -} - -func (m *SmartContract_ABI_Entry) GetType() SmartContract_ABI_Entry_EntryType { - if m != nil { - return m.Type - } - return SmartContract_ABI_Entry_UnknownEntryType -} - -func (m *SmartContract_ABI_Entry) GetPayable() bool { - if m != nil { - return m.Payable - } - return false -} - -func (m *SmartContract_ABI_Entry) GetStateMutability() SmartContract_ABI_Entry_StateMutabilityType { - if m != nil { - return m.StateMutability - } - return SmartContract_ABI_Entry_UnknownMutabilityType -} - -type SmartContract_ABI_Entry_Param struct { - Indexed bool `protobuf:"varint,1,opt,name=indexed,proto3" json:"indexed,omitempty" pg:"indexed"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" pg:"name"` - Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty" pg:"type"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SmartContract_ABI_Entry_Param) Reset() { *m = SmartContract_ABI_Entry_Param{} } -func (m *SmartContract_ABI_Entry_Param) String() string { return proto.CompactTextString(m) } -func (*SmartContract_ABI_Entry_Param) ProtoMessage() {} -func (*SmartContract_ABI_Entry_Param) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{28, 0, 0, 0} -} -func (m *SmartContract_ABI_Entry_Param) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SmartContract_ABI_Entry_Param.Unmarshal(m, b) -} -func (m *SmartContract_ABI_Entry_Param) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SmartContract_ABI_Entry_Param.Marshal(b, m, deterministic) -} -func (m *SmartContract_ABI_Entry_Param) XXX_Merge(src proto.Message) { - xxx_messageInfo_SmartContract_ABI_Entry_Param.Merge(m, src) -} -func (m *SmartContract_ABI_Entry_Param) XXX_Size() int { - return xxx_messageInfo_SmartContract_ABI_Entry_Param.Size(m) -} -func (m *SmartContract_ABI_Entry_Param) XXX_DiscardUnknown() { - xxx_messageInfo_SmartContract_ABI_Entry_Param.DiscardUnknown(m) -} - -var xxx_messageInfo_SmartContract_ABI_Entry_Param proto.InternalMessageInfo - -func (m *SmartContract_ABI_Entry_Param) GetIndexed() bool { - if m != nil { - return m.Indexed - } - return false -} - -func (m *SmartContract_ABI_Entry_Param) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *SmartContract_ABI_Entry_Param) GetType() string { - if m != nil { - return m.Type - } - return "" -} - -type InternalTransaction struct { - // internalTransaction identity, the root InternalTransaction hash - // should equals to root transaction id. - Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty" pg:"hash"` - // the one send trx (TBD: or token) via function - CallerAddress []byte `protobuf:"bytes,2,opt,name=caller_address,json=callerAddress,proto3" json:"caller_address,omitempty" pg:"caller_address"` - // the one recieve trx (TBD: or token) via function - TransferToAddress []byte `protobuf:"bytes,3,opt,name=transferTo_address,json=transferToAddress,proto3" json:"transferTo_address,omitempty" pg:"transferTo_address"` - CallValueInfo []*InternalTransaction_CallValueInfo `protobuf:"bytes,4,rep,name=callValueInfo,proto3" json:"callValueInfo,omitempty" pg:"callValueInfo"` - Note []byte `protobuf:"bytes,5,opt,name=note,proto3" json:"note,omitempty" pg:"note"` - Rejected bool `protobuf:"varint,6,opt,name=rejected,proto3" json:"rejected,omitempty" pg:"rejected"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *InternalTransaction) Reset() { *m = InternalTransaction{} } -func (m *InternalTransaction) String() string { return proto.CompactTextString(m) } -func (*InternalTransaction) ProtoMessage() {} -func (*InternalTransaction) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{29} -} -func (m *InternalTransaction) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_InternalTransaction.Unmarshal(m, b) -} -func (m *InternalTransaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_InternalTransaction.Marshal(b, m, deterministic) -} -func (m *InternalTransaction) XXX_Merge(src proto.Message) { - xxx_messageInfo_InternalTransaction.Merge(m, src) -} -func (m *InternalTransaction) XXX_Size() int { - return xxx_messageInfo_InternalTransaction.Size(m) -} -func (m *InternalTransaction) XXX_DiscardUnknown() { - xxx_messageInfo_InternalTransaction.DiscardUnknown(m) -} - -var xxx_messageInfo_InternalTransaction proto.InternalMessageInfo - -func (m *InternalTransaction) GetHash() []byte { - if m != nil { - return m.Hash - } - return nil -} - -func (m *InternalTransaction) GetCallerAddress() []byte { - if m != nil { - return m.CallerAddress - } - return nil -} - -func (m *InternalTransaction) GetTransferToAddress() []byte { - if m != nil { - return m.TransferToAddress - } - return nil -} - -func (m *InternalTransaction) GetCallValueInfo() []*InternalTransaction_CallValueInfo { - if m != nil { - return m.CallValueInfo - } - return nil -} - -func (m *InternalTransaction) GetNote() []byte { - if m != nil { - return m.Note - } - return nil -} - -func (m *InternalTransaction) GetRejected() bool { - if m != nil { - return m.Rejected - } - return false -} - -type InternalTransaction_CallValueInfo struct { - // trx (TBD: or token) value - CallValue int64 `protobuf:"varint,1,opt,name=callValue,proto3" json:"callValue,omitempty" pg:"callValue"` - // TBD: tokenName, trx should be empty - TokenId string `protobuf:"bytes,2,opt,name=tokenId,proto3" json:"tokenId,omitempty" pg:"tokenId"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *InternalTransaction_CallValueInfo) Reset() { *m = InternalTransaction_CallValueInfo{} } -func (m *InternalTransaction_CallValueInfo) String() string { return proto.CompactTextString(m) } -func (*InternalTransaction_CallValueInfo) ProtoMessage() {} -func (*InternalTransaction_CallValueInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{29, 0} -} -func (m *InternalTransaction_CallValueInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_InternalTransaction_CallValueInfo.Unmarshal(m, b) -} -func (m *InternalTransaction_CallValueInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_InternalTransaction_CallValueInfo.Marshal(b, m, deterministic) -} -func (m *InternalTransaction_CallValueInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_InternalTransaction_CallValueInfo.Merge(m, src) -} -func (m *InternalTransaction_CallValueInfo) XXX_Size() int { - return xxx_messageInfo_InternalTransaction_CallValueInfo.Size(m) -} -func (m *InternalTransaction_CallValueInfo) XXX_DiscardUnknown() { - xxx_messageInfo_InternalTransaction_CallValueInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_InternalTransaction_CallValueInfo proto.InternalMessageInfo - -func (m *InternalTransaction_CallValueInfo) GetCallValue() int64 { - if m != nil { - return m.CallValue - } - return 0 -} - -func (m *InternalTransaction_CallValueInfo) GetTokenId() string { - if m != nil { - return m.TokenId - } - return "" -} - -type DelegatedResourceAccountIndex struct { - Account []byte `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty" pg:"account"` - FromAccounts [][]byte `protobuf:"bytes,2,rep,name=fromAccounts,proto3" json:"fromAccounts,omitempty" pg:"fromAccounts"` - ToAccounts [][]byte `protobuf:"bytes,3,rep,name=toAccounts,proto3" json:"toAccounts,omitempty" pg:"toAccounts"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *DelegatedResourceAccountIndex) Reset() { *m = DelegatedResourceAccountIndex{} } -func (m *DelegatedResourceAccountIndex) String() string { return proto.CompactTextString(m) } -func (*DelegatedResourceAccountIndex) ProtoMessage() {} -func (*DelegatedResourceAccountIndex) Descriptor() ([]byte, []int) { - return fileDescriptor_0f389bc70beaf712, []int{30} -} -func (m *DelegatedResourceAccountIndex) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DelegatedResourceAccountIndex.Unmarshal(m, b) -} -func (m *DelegatedResourceAccountIndex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DelegatedResourceAccountIndex.Marshal(b, m, deterministic) -} -func (m *DelegatedResourceAccountIndex) XXX_Merge(src proto.Message) { - xxx_messageInfo_DelegatedResourceAccountIndex.Merge(m, src) -} -func (m *DelegatedResourceAccountIndex) XXX_Size() int { - return xxx_messageInfo_DelegatedResourceAccountIndex.Size(m) -} -func (m *DelegatedResourceAccountIndex) XXX_DiscardUnknown() { - xxx_messageInfo_DelegatedResourceAccountIndex.DiscardUnknown(m) -} - -var xxx_messageInfo_DelegatedResourceAccountIndex proto.InternalMessageInfo - -func (m *DelegatedResourceAccountIndex) GetAccount() []byte { - if m != nil { - return m.Account - } - return nil -} - -func (m *DelegatedResourceAccountIndex) GetFromAccounts() [][]byte { - if m != nil { - return m.FromAccounts - } - return nil -} - -func (m *DelegatedResourceAccountIndex) GetToAccounts() [][]byte { - if m != nil { - return m.ToAccounts - } - return nil -} - -func init() { - proto.RegisterEnum("protocol.AccountType", AccountType_name, AccountType_value) - proto.RegisterEnum("protocol.ReasonCode", ReasonCode_name, ReasonCode_value) - proto.RegisterEnum("protocol.Proposal_State", Proposal_State_name, Proposal_State_value) - proto.RegisterEnum("protocol.Transaction_Contract_ContractType", Transaction_Contract_ContractType_name, Transaction_Contract_ContractType_value) - proto.RegisterEnum("protocol.Transaction_ResultCode", Transaction_ResultCode_name, Transaction_ResultCode_value) - proto.RegisterEnum("protocol.Transaction_ResultContractResult", Transaction_ResultContractResult_name, Transaction_ResultContractResult_value) - proto.RegisterEnum("protocol.TransactionInfoCode", TransactionInfoCode_name, TransactionInfoCode_value) - proto.RegisterEnum("protocol.BlockInventory_Type", BlockInventory_Type_name, BlockInventory_Type_value) - proto.RegisterEnum("protocol.Inventory_InventoryType", Inventory_InventoryType_name, Inventory_InventoryType_value) - proto.RegisterEnum("protocol.Items_ItemType", Items_ItemType_name, Items_ItemType_value) - proto.RegisterEnum("protocol.SmartContract_ABI_Entry_EntryType", SmartContract_ABI_Entry_EntryType_name, SmartContract_ABI_Entry_EntryType_value) - proto.RegisterEnum("protocol.SmartContract_ABI_Entry_StateMutabilityType", SmartContract_ABI_Entry_StateMutabilityType_name, SmartContract_ABI_Entry_StateMutabilityType_value) - proto.RegisterType((*AccountId)(nil), "protocol.AccountId") - proto.RegisterType((*Vote)(nil), "protocol.Vote") - proto.RegisterType((*Proposal)(nil), "protocol.Proposal") - proto.RegisterMapType((map[int64]int64)(nil), "protocol.Proposal.ParametersEntry") - proto.RegisterType((*Exchange)(nil), "protocol.Exchange") - proto.RegisterType((*ChainParameters)(nil), "protocol.ChainParameters") - proto.RegisterType((*ChainParameters_ChainParameter)(nil), "protocol.ChainParameters.ChainParameter") - proto.RegisterType((*Account)(nil), "protocol.Account") - proto.RegisterMapType((map[string]int64)(nil), "protocol.Account.AssetEntry") - proto.RegisterMapType((map[string]int64)(nil), "protocol.Account.AssetV2Entry") - proto.RegisterMapType((map[string]int64)(nil), "protocol.Account.FreeAssetNetUsageEntry") - proto.RegisterMapType((map[string]int64)(nil), "protocol.Account.FreeAssetNetUsageV2Entry") - proto.RegisterMapType((map[string]int64)(nil), "protocol.Account.LatestAssetOperationTimeEntry") - proto.RegisterMapType((map[string]int64)(nil), "protocol.Account.LatestAssetOperationTimeV2Entry") - proto.RegisterType((*Account_Frozen)(nil), "protocol.Account.Frozen") - proto.RegisterType((*Account_AccountResource)(nil), "protocol.Account.AccountResource") - proto.RegisterType((*DelegatedResource)(nil), "protocol.DelegatedResource") - proto.RegisterType((*Authority)(nil), "protocol.authority") - proto.RegisterType((*Permission)(nil), "protocol.permission") - proto.RegisterType((*Witness)(nil), "protocol.Witness") - proto.RegisterType((*Votes)(nil), "protocol.Votes") - proto.RegisterType((*TXOutput)(nil), "protocol.TXOutput") - proto.RegisterType((*TXInput)(nil), "protocol.TXInput") - proto.RegisterType((*TXInputRaw)(nil), "protocol.TXInput.raw") - proto.RegisterType((*TXOutputs)(nil), "protocol.TXOutputs") - proto.RegisterType((*ResourceReceipt)(nil), "protocol.ResourceReceipt") - proto.RegisterType((*Transaction)(nil), "protocol.Transaction") - proto.RegisterType((*Transaction_Contract)(nil), "protocol.Transaction.Contract") - proto.RegisterType((*Transaction_Result)(nil), "protocol.Transaction.Result") - proto.RegisterType((*TransactionRaw)(nil), "protocol.Transaction.raw") - proto.RegisterType((*TransactionInfo)(nil), "protocol.TransactionInfo") - proto.RegisterType((*TransactionInfo_Log)(nil), "protocol.TransactionInfo.Log") - proto.RegisterType((*Transactions)(nil), "protocol.Transactions") - proto.RegisterType((*TransactionSign)(nil), "protocol.TransactionSign") - proto.RegisterType((*BlockHeader)(nil), "protocol.BlockHeader") - proto.RegisterType((*BlockHeaderRaw)(nil), "protocol.BlockHeader.raw") - proto.RegisterType((*Block)(nil), "protocol.Block") - proto.RegisterType((*ChainInventory)(nil), "protocol.ChainInventory") - proto.RegisterType((*ChainInventory_BlockId)(nil), "protocol.ChainInventory.BlockId") - proto.RegisterType((*BlockInventory)(nil), "protocol.BlockInventory") - proto.RegisterType((*BlockInventory_BlockId)(nil), "protocol.BlockInventory.BlockId") - proto.RegisterType((*Inventory)(nil), "protocol.Inventory") - proto.RegisterType((*Items)(nil), "protocol.Items") - proto.RegisterType((*DynamicProperties)(nil), "protocol.DynamicProperties") - proto.RegisterType((*DisconnectMessage)(nil), "protocol.DisconnectMessage") - proto.RegisterType((*HelloMessage)(nil), "protocol.HelloMessage") - proto.RegisterType((*HelloMessage_BlockId)(nil), "protocol.HelloMessage.BlockId") - proto.RegisterType((*SmartContract)(nil), "protocol.SmartContract") - proto.RegisterType((*SmartContract_ABI)(nil), "protocol.SmartContract.ABI") - proto.RegisterType((*SmartContract_ABI_Entry)(nil), "protocol.SmartContract.ABI.Entry") - proto.RegisterType((*SmartContract_ABI_Entry_Param)(nil), "protocol.SmartContract.ABI.Entry.Param") - proto.RegisterType((*InternalTransaction)(nil), "protocol.InternalTransaction") - proto.RegisterType((*InternalTransaction_CallValueInfo)(nil), "protocol.InternalTransaction.CallValueInfo") - proto.RegisterType((*DelegatedResourceAccountIndex)(nil), "protocol.DelegatedResourceAccountIndex") -} - -func init() { proto.RegisterFile("protos/protocol/core/Tron.proto", fileDescriptor_0f389bc70beaf712) } - -var fileDescriptor_0f389bc70beaf712 = []byte{ - // 4486 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x3a, 0x4d, 0x73, 0x1b, 0xd9, - 0x56, 0x91, 0x64, 0x7d, 0x1d, 0x7d, 0xb5, 0xaf, 0x1d, 0x47, 0x51, 0xe2, 0xc4, 0xe9, 0x79, 0x93, - 0xc9, 0xd7, 0x38, 0xf3, 0x3c, 0x0c, 0x93, 0xcc, 0xab, 0x57, 0xf3, 0x64, 0xa9, 0x9d, 0xf4, 0x44, - 0x96, 0x34, 0x2d, 0xd9, 0x33, 0xa1, 0x8a, 0xea, 0x6a, 0x4b, 0xd7, 0x4e, 0xbf, 0x91, 0xba, 0x45, - 0x77, 0x2b, 0x1e, 0x3f, 0x60, 0xc9, 0x9a, 0x1d, 0x14, 0x14, 0x50, 0x54, 0x51, 0xec, 0x28, 0x56, - 0x14, 0x2b, 0xf6, 0x2c, 0xd8, 0xb0, 0x84, 0x05, 0x0b, 0x56, 0xef, 0x07, 0xf0, 0x03, 0xa0, 0xce, - 0xfd, 0xe8, 0x0f, 0x59, 0xfe, 0xc8, 0x63, 0xc1, 0x82, 0x8d, 0xdd, 0xf7, 0x7c, 0xdd, 0x7b, 0xcf, - 0x3d, 0xe7, 0xdc, 0x73, 0xce, 0x15, 0xdc, 0x9f, 0x79, 0x6e, 0xe0, 0xfa, 0xcf, 0xd9, 0xbf, 0x91, - 0x3b, 0x79, 0x3e, 0x72, 0x3d, 0xfa, 0x7c, 0xe8, 0xb9, 0xce, 0x36, 0x03, 0x91, 0x82, 0xc4, 0x34, - 0x6e, 0x9f, 0xb8, 0xee, 0xc9, 0x84, 0x72, 0xd2, 0xa3, 0xf9, 0xf1, 0x73, 0xcb, 0x39, 0xe3, 0x44, - 0x8d, 0x8f, 0x96, 0x4a, 0x69, 0xdb, 0xfe, 0xc8, 0x7d, 0x4f, 0x3d, 0x4e, 0xa4, 0xbe, 0x84, 0x62, - 0x73, 0x34, 0x72, 0xe7, 0x4e, 0xa0, 0x8f, 0x09, 0x81, 0x15, 0xc7, 0x9a, 0xd2, 0x7a, 0x6a, 0x2b, - 0xf5, 0xa8, 0x6c, 0xb0, 0x6f, 0x52, 0x87, 0xbc, 0x35, 0x1e, 0x7b, 0xd4, 0xf7, 0xeb, 0x69, 0x06, - 0x96, 0x43, 0xf5, 0x35, 0xac, 0x1c, 0xba, 0x01, 0x25, 0x0f, 0xa0, 0xfc, 0xde, 0x0d, 0xa8, 0x29, - 0xc9, 0x38, 0x77, 0x09, 0x61, 0x4d, 0x0e, 0x22, 0x9b, 0x00, 0x8c, 0x84, 0x4d, 0xc4, 0xe4, 0x64, - 0x8c, 0x22, 0x42, 0x5a, 0x08, 0x50, 0xff, 0x21, 0x03, 0x85, 0xbe, 0xe7, 0xce, 0x5c, 0xdf, 0x9a, - 0x90, 0xfb, 0x50, 0x9a, 0x89, 0x6f, 0xd3, 0x1e, 0x33, 0x69, 0x19, 0x03, 0x24, 0x48, 0x1f, 0x93, - 0xc7, 0xa0, 0xf0, 0x11, 0xf5, 0xcc, 0xe4, 0xd2, 0x6a, 0x12, 0x2e, 0xe7, 0xdd, 0x05, 0x98, 0x59, - 0x9e, 0x35, 0xa5, 0x01, 0xf5, 0xfc, 0x7a, 0x66, 0x2b, 0xf3, 0xa8, 0xb4, 0xa3, 0x6e, 0x4b, 0x85, - 0x6c, 0xcb, 0x39, 0xb7, 0xfb, 0x21, 0x91, 0xe6, 0x04, 0xde, 0x99, 0x11, 0xe3, 0x22, 0x9f, 0x40, - 0x8d, 0xfe, 0x38, 0xb3, 0x3d, 0x2b, 0xb0, 0x5d, 0xc7, 0x0c, 0xec, 0x29, 0xad, 0xaf, 0xb0, 0x35, - 0x55, 0x23, 0xf0, 0xd0, 0x9e, 0x52, 0x5c, 0xf8, 0xc8, 0xa3, 0x56, 0x40, 0x39, 0x51, 0x96, 0x2f, - 0x9c, 0x83, 0x18, 0xc1, 0x5d, 0x28, 0x5a, 0xb3, 0x99, 0xe7, 0xbe, 0xb7, 0x26, 0x7e, 0x3d, 0xb7, - 0x95, 0x79, 0x54, 0x36, 0x22, 0x00, 0xd9, 0x86, 0xac, 0x1f, 0x58, 0x01, 0xad, 0xe7, 0xb7, 0x52, - 0x8f, 0xaa, 0x3b, 0xf5, 0x25, 0xcb, 0x1c, 0x20, 0xde, 0xe0, 0x64, 0x8d, 0x9f, 0x43, 0x6d, 0x61, - 0xd9, 0x44, 0x81, 0xcc, 0x0f, 0xf4, 0x4c, 0xa8, 0x0c, 0x3f, 0xc9, 0x3a, 0x64, 0xdf, 0x5b, 0x93, - 0x39, 0x15, 0x3a, 0xe7, 0x83, 0xaf, 0xd2, 0x2f, 0x52, 0x6a, 0x13, 0xb2, 0x4c, 0x1c, 0x29, 0x41, - 0xbe, 0xaf, 0x75, 0xdb, 0x7a, 0xf7, 0x95, 0x72, 0x83, 0xd4, 0xa0, 0xd4, 0xd6, 0x07, 0xcd, 0x7e, - 0xdf, 0xe8, 0x1d, 0x6a, 0x6d, 0x25, 0x45, 0xca, 0x50, 0x08, 0x47, 0x69, 0x1c, 0xb5, 0x9a, 0xdd, - 0x96, 0xd6, 0xd1, 0xda, 0x4a, 0x46, 0xfd, 0xdb, 0x34, 0x14, 0xb4, 0x1f, 0x47, 0xef, 0x2c, 0xe7, - 0x84, 0xed, 0x9e, 0x8a, 0xef, 0xd8, 0xb1, 0x49, 0x90, 0x3e, 0x46, 0x3d, 0x32, 0x5d, 0xb8, 0x8b, - 0xa7, 0x56, 0x15, 0x60, 0x79, 0x68, 0x0b, 0x7a, 0xcc, 0x9c, 0xd3, 0xe3, 0x4f, 0xa0, 0x7a, 0x6c, - 0x7b, 0x7e, 0x60, 0x06, 0xee, 0x0f, 0xd4, 0xc1, 0xd9, 0x72, 0x4c, 0x50, 0x99, 0x41, 0x87, 0x08, - 0xd4, 0xc7, 0x64, 0x1b, 0xd6, 0xe2, 0x54, 0x47, 0xd6, 0xc4, 0x72, 0x46, 0x5c, 0xbb, 0x19, 0x63, - 0x35, 0x22, 0xdd, 0xe5, 0x08, 0xf2, 0x10, 0x6a, 0x3e, 0x1d, 0xb9, 0xce, 0x38, 0x12, 0x5b, 0x60, - 0x62, 0x2b, 0x1c, 0x2c, 0xe5, 0x7e, 0x06, 0xeb, 0x09, 0x3a, 0x29, 0xb8, 0xc8, 0x04, 0x93, 0x18, - 0xb1, 0x90, 0xac, 0xfe, 0x65, 0x0a, 0x6a, 0xad, 0x77, 0x96, 0xed, 0x44, 0xe7, 0x45, 0xfa, 0x50, - 0x1d, 0x25, 0x40, 0xf5, 0x14, 0xb3, 0xce, 0x47, 0xd1, 0xb1, 0x2f, 0xb0, 0x2c, 0x8c, 0x8d, 0x05, - 0xfe, 0xc6, 0x0b, 0xa8, 0x26, 0x29, 0xe2, 0xe6, 0x50, 0xbc, 0xc4, 0x1c, 0xd4, 0x5f, 0xaf, 0x43, - 0x5e, 0x04, 0x01, 0x74, 0x66, 0x8b, 0x7f, 0x9a, 0xb1, 0x50, 0x50, 0x12, 0xb0, 0x2e, 0x46, 0x84, - 0xc7, 0xb0, 0x12, 0x9c, 0xcd, 0xb8, 0x8c, 0xea, 0xce, 0xcd, 0x68, 0xc1, 0x42, 0xc6, 0xf0, 0x6c, - 0x46, 0x0d, 0x46, 0x12, 0x0f, 0x1e, 0x99, 0x44, 0xf0, 0x40, 0x8c, 0x54, 0x1c, 0xf7, 0x26, 0x39, - 0x24, 0x3f, 0x81, 0x2c, 0x46, 0x06, 0xbf, 0x9e, 0x65, 0x0a, 0xa9, 0x46, 0xf2, 0x31, 0xda, 0x18, - 0x1c, 0x49, 0x76, 0x20, 0x6b, 0xf9, 0x3e, 0x0d, 0x98, 0x1f, 0x95, 0x76, 0xee, 0x9e, 0x5b, 0xc5, - 0x76, 0x13, 0xd1, 0xdc, 0x9d, 0x39, 0x29, 0x79, 0x01, 0x79, 0xf6, 0x71, 0xb8, 0x53, 0x7f, 0xc1, - 0xb8, 0xee, 0x5d, 0xc0, 0x75, 0xb8, 0xc3, 0xf9, 0x24, 0x39, 0xf9, 0x0c, 0x72, 0xc7, 0x9e, 0xfb, - 0x2b, 0xea, 0xd4, 0xf3, 0x8c, 0xb1, 0x7e, 0x9e, 0x71, 0x8f, 0xe1, 0x0d, 0x41, 0x47, 0xee, 0x40, - 0xd1, 0xa1, 0x81, 0x39, 0xf7, 0xad, 0x13, 0xca, 0xec, 0x28, 0x63, 0x14, 0x1c, 0x1a, 0x1c, 0xe0, - 0x98, 0x8c, 0xe0, 0xb9, 0x35, 0xfa, 0xbd, 0xb9, 0xed, 0xd1, 0xb1, 0x39, 0xa6, 0x13, 0x7a, 0x62, - 0x05, 0x74, 0x6c, 0x72, 0x4e, 0x69, 0x4f, 0xe6, 0xb1, 0xeb, 0x99, 0x47, 0x96, 0x33, 0x3e, 0xb5, - 0xc7, 0xc1, 0xbb, 0xfa, 0x63, 0x26, 0xe2, 0x89, 0x64, 0x6b, 0x4b, 0x2e, 0x3e, 0xad, 0xb0, 0xb4, - 0x3d, 0xd7, 0xdb, 0x95, 0x1c, 0xc4, 0x80, 0x87, 0xd7, 0x94, 0xfd, 0x84, 0xc9, 0x56, 0xc7, 0x57, - 0xcb, 0x5c, 0x70, 0xcd, 0xe2, 0x39, 0xd7, 0xfc, 0x0c, 0xd6, 0x27, 0x56, 0x40, 0xfd, 0xc0, 0x74, - 0x67, 0xf1, 0x88, 0x09, 0xdc, 0x39, 0x38, 0xae, 0x37, 0x8b, 0x45, 0x4d, 0x0c, 0x8a, 0x93, 0x89, - 0x7b, 0xca, 0x4c, 0xa1, 0xc4, 0x6f, 0x86, 0x10, 0x10, 0x93, 0x77, 0x6a, 0x07, 0xef, 0xc6, 0x9e, - 0x75, 0xca, 0xe5, 0x95, 0xe3, 0xf2, 0xbe, 0x13, 0x28, 0x26, 0x8f, 0xc0, 0xca, 0xc8, 0x1d, 0xd3, - 0x7a, 0x85, 0xdf, 0x61, 0xf8, 0x8d, 0xd7, 0x8f, 0xed, 0xa3, 0x04, 0x07, 0x2d, 0xb1, 0xba, 0x95, - 0x7a, 0x54, 0x30, 0x8a, 0xb6, 0xff, 0x1d, 0x07, 0xa0, 0xcd, 0xdb, 0xbe, 0x39, 0x72, 0xa7, 0x53, - 0x3b, 0x08, 0x28, 0xad, 0xd7, 0x18, 0x41, 0xc9, 0xf6, 0x5b, 0x12, 0x44, 0x7e, 0x0e, 0x15, 0xa1, - 0x42, 0x7f, 0x3e, 0x9b, 0x4d, 0xce, 0xea, 0xca, 0x15, 0x76, 0x50, 0xe6, 0xe4, 0x03, 0x46, 0x4d, - 0x9e, 0xc0, 0x2a, 0x33, 0x25, 0xd3, 0xf6, 0xfd, 0x39, 0x1d, 0x73, 0xd7, 0x5a, 0xe5, 0x77, 0x16, - 0x43, 0xe8, 0x0c, 0xce, 0xdc, 0xeb, 0x21, 0xd4, 0x12, 0xb4, 0x7a, 0xbb, 0xfe, 0x92, 0xc7, 0xa1, - 0x18, 0xa5, 0xde, 0x26, 0x0e, 0xdc, 0x11, 0xaa, 0xe1, 0xe4, 0xee, 0x8c, 0xc6, 0x35, 0x4e, 0xd8, - 0x02, 0x9f, 0x9f, 0x5f, 0x60, 0x87, 0x31, 0x31, 0x3b, 0xef, 0x49, 0x16, 0xd4, 0x1c, 0x37, 0xf9, - 0xfa, 0xe4, 0x02, 0x34, 0x09, 0x60, 0xf3, 0x92, 0xf9, 0x0e, 0x77, 0xea, 0x5f, 0xb1, 0x19, 0x7f, - 0x7a, 0xfd, 0x19, 0xa5, 0x9b, 0x35, 0x26, 0x17, 0x12, 0xb0, 0x58, 0xef, 0x51, 0x6a, 0x46, 0xce, - 0xb4, 0xc6, 0x8e, 0xbe, 0x8c, 0xd0, 0xae, 0x74, 0xa8, 0xb7, 0xb0, 0xce, 0xa8, 0xf8, 0xca, 0x22, - 0xda, 0xf5, 0xc5, 0x98, 0x1a, 0x9d, 0x12, 0xa5, 0x6c, 0x3e, 0x29, 0x82, 0xaf, 0x64, 0xf5, 0x78, - 0x11, 0x4e, 0x4c, 0xd8, 0x58, 0x26, 0xfa, 0x70, 0xa7, 0xfe, 0x33, 0x26, 0xfc, 0xc9, 0x35, 0x84, - 0xcb, 0x8d, 0xae, 0x1d, 0x9f, 0xc7, 0xe0, 0x3d, 0x25, 0xf4, 0x3a, 0x72, 0x1d, 0x7f, 0x3e, 0x15, - 0xbe, 0x75, 0x93, 0xdf, 0x53, 0x1c, 0xd5, 0xe2, 0x18, 0x76, 0x0e, 0x5f, 0x42, 0x7d, 0x81, 0x9e, - 0xad, 0x8f, 0x31, 0x6d, 0x30, 0xa6, 0x9b, 0x09, 0x26, 0x5c, 0x0d, 0x63, 0xdc, 0x04, 0x90, 0xa1, - 0xdd, 0x1e, 0xd7, 0x6f, 0x31, 0x9b, 0x2a, 0x5a, 0x61, 0xf2, 0xd7, 0x01, 0x45, 0xa2, 0x3d, 0xea, - 0xbb, 0x73, 0x6f, 0x44, 0xeb, 0x8d, 0xad, 0xd4, 0xa3, 0xd2, 0xce, 0x83, 0x25, 0x61, 0x92, 0xff, - 0x37, 0x04, 0xa1, 0x51, 0xb3, 0x92, 0x00, 0xd2, 0x80, 0x02, 0xba, 0xde, 0x6b, 0xcb, 0x7f, 0x57, - 0xbf, 0xc7, 0xa6, 0x0a, 0xc7, 0x8d, 0x3e, 0xe4, 0xb8, 0x97, 0x90, 0x8f, 0xf1, 0x74, 0xe3, 0x91, - 0x49, 0xe4, 0x0d, 0xc2, 0xd9, 0xe4, 0xd5, 0xcc, 0x72, 0x8b, 0x99, 0xed, 0x89, 0x5d, 0xa6, 0x65, - 0x6e, 0x81, 0x20, 0xdc, 0x5a, 0xe3, 0x05, 0x40, 0x14, 0xee, 0xaf, 0x7b, 0xef, 0x61, 0x1a, 0xd4, - 0xf8, 0x0a, 0xca, 0xf1, 0x90, 0xff, 0x41, 0xbc, 0x6f, 0x60, 0xf3, 0x52, 0x67, 0xfa, 0x20, 0x61, - 0xfb, 0x70, 0xff, 0x0a, 0x3f, 0xf9, 0x20, 0x71, 0x6d, 0xd8, 0x58, 0x6e, 0xe3, 0x1f, 0x24, 0x65, - 0x0f, 0xea, 0x17, 0x19, 0xf3, 0x07, 0xc9, 0xf9, 0xa3, 0x15, 0xa8, 0x2d, 0x98, 0x0c, 0x46, 0x5d, - 0xea, 0x50, 0xef, 0xe4, 0x4c, 0xf8, 0x2a, 0x3f, 0xf9, 0x12, 0x87, 0x71, 0xdf, 0x1b, 0xc0, 0xed, - 0x25, 0x17, 0x17, 0xa7, 0x60, 0x93, 0x5c, 0x16, 0x81, 0x37, 0x8e, 0x17, 0xae, 0x31, 0x8d, 0xf1, - 0x91, 0x5d, 0xb8, 0xb7, 0xc4, 0xdf, 0xe2, 0x92, 0x79, 0xc6, 0xd9, 0x38, 0xe7, 0x7a, 0x91, 0x8c, - 0xdf, 0x85, 0x67, 0xd7, 0xbb, 0xc0, 0x85, 0x44, 0x9e, 0xe2, 0x7c, 0x72, 0xe5, 0xed, 0x2d, 0xc4, - 0x77, 0xe0, 0xa3, 0xeb, 0x48, 0xe5, 0x15, 0xc6, 0xfd, 0xf1, 0x15, 0xd2, 0x3e, 0x82, 0x8a, 0x1f, - 0xb8, 0x9e, 0x75, 0x42, 0xcd, 0x89, 0x3d, 0xb5, 0x03, 0x96, 0x2d, 0x67, 0x8c, 0xb2, 0x00, 0x76, - 0x10, 0x16, 0x27, 0xe2, 0xc7, 0x91, 0x4f, 0x10, 0xf1, 0xf3, 0xf8, 0x1a, 0xee, 0x0a, 0xd5, 0x85, - 0xa9, 0xbe, 0x64, 0x62, 0x8e, 0xc9, 0xf3, 0x9c, 0xdb, 0x9c, 0x46, 0x56, 0x06, 0x03, 0x4e, 0x81, - 0x0a, 0x54, 0xff, 0x26, 0x0d, 0xab, 0xe1, 0xe6, 0x43, 0x4b, 0x20, 0xb0, 0x72, 0xec, 0xb9, 0x53, - 0x59, 0x76, 0xe2, 0x37, 0xa9, 0x42, 0x3a, 0x70, 0x45, 0x81, 0x90, 0x0e, 0x5c, 0x9c, 0xfa, 0xd2, - 0x1c, 0x86, 0x9f, 0xd9, 0xed, 0xe3, 0x0b, 0x53, 0x97, 0x97, 0x97, 0xd9, 0x12, 0x3f, 0x9f, 0x8b, - 0x2c, 0xe6, 0x25, 0xdc, 0x8e, 0x85, 0x9f, 0x85, 0x89, 0xf9, 0x21, 0x6c, 0x44, 0xc1, 0x28, 0x31, - 0xeb, 0xe7, 0xb0, 0xb1, 0xc8, 0x2a, 0xa6, 0xe4, 0x87, 0xb0, 0x96, 0xe0, 0xe3, 0xf3, 0xa9, 0x23, - 0x28, 0x5a, 0xf3, 0xe0, 0x9d, 0xeb, 0xd9, 0xc1, 0x19, 0xf9, 0x14, 0xf2, 0x22, 0xb6, 0x32, 0xfd, - 0x94, 0x76, 0xd6, 0xce, 0x59, 0xbc, 0x3e, 0x36, 0x24, 0x0d, 0x56, 0x59, 0x33, 0xea, 0x4d, 0x6d, - 0xdf, 0xc7, 0x9b, 0x99, 0xe5, 0x19, 0xa2, 0xca, 0x8a, 0xc0, 0x98, 0x66, 0xa8, 0x3f, 0x03, 0x88, - 0x20, 0x1f, 0x38, 0x8b, 0xfa, 0x67, 0x69, 0xc8, 0xcb, 0xec, 0x29, 0x96, 0xe3, 0xa7, 0x92, 0x39, - 0xfe, 0x5d, 0x88, 0x6a, 0xfc, 0x73, 0x45, 0x3f, 0xd9, 0x80, 0xdc, 0x6c, 0x7e, 0xf4, 0x86, 0x9e, - 0x89, 0xd2, 0x40, 0x8c, 0x30, 0xae, 0xcc, 0xbd, 0x09, 0x3b, 0x92, 0xa2, 0x81, 0x9f, 0xe4, 0x27, - 0x50, 0x09, 0xdc, 0xc0, 0x9a, 0xf4, 0x3d, 0x77, 0x3c, 0x1f, 0xd1, 0xb1, 0xd0, 0x79, 0x12, 0x48, - 0xb6, 0xa0, 0xc4, 0x00, 0xfb, 0xb6, 0xef, 0xd3, 0xb1, 0xd0, 0x6f, 0x1c, 0x44, 0x1e, 0x42, 0x95, - 0x9b, 0xe6, 0xee, 0xc4, 0x1d, 0xfd, 0xd0, 0x9d, 0x4f, 0x85, 0x91, 0x2f, 0x40, 0x71, 0x3e, 0x0e, - 0x19, 0x4c, 0xdc, 0x00, 0xc9, 0xb8, 0x5d, 0x27, 0x81, 0xb8, 0x7e, 0xdb, 0xff, 0xc6, 0x3d, 0xf2, - 0x59, 0x1a, 0x5c, 0x30, 0xc4, 0x48, 0xfd, 0x7d, 0xc8, 0x1e, 0xb2, 0x12, 0xe5, 0x62, 0xc5, 0x3c, - 0x85, 0xa2, 0x3b, 0x19, 0x9b, 0xbc, 0xcc, 0x49, 0x2f, 0x2d, 0x73, 0x0a, 0xee, 0x64, 0xcc, 0xc5, - 0x3c, 0xc5, 0x4a, 0xe2, 0x54, 0x10, 0x67, 0x96, 0x13, 0x3b, 0xf4, 0x94, 0x11, 0xab, 0xbf, 0x80, - 0xc2, 0xf0, 0xfb, 0xde, 0x3c, 0x98, 0xcd, 0x83, 0x28, 0x1c, 0xa7, 0x62, 0xe1, 0x98, 0xdc, 0x03, - 0xe0, 0x8a, 0x66, 0x57, 0x33, 0xb7, 0x8d, 0x18, 0x44, 0xfd, 0xeb, 0x14, 0xe4, 0x87, 0xdf, 0xeb, - 0x0e, 0x4a, 0xf8, 0x0c, 0x0a, 0x98, 0x71, 0x8f, 0xad, 0xc0, 0x12, 0x66, 0x11, 0xab, 0xf6, 0x04, - 0xd1, 0xb6, 0x67, 0x9d, 0x1a, 0x79, 0xcf, 0x3a, 0x6d, 0x5b, 0x81, 0x85, 0x47, 0xee, 0xdb, 0x27, - 0x8e, 0x15, 0xcc, 0x3d, 0x5e, 0xd8, 0x95, 0x8d, 0x08, 0xd0, 0xd0, 0x20, 0xe3, 0x59, 0xa7, 0xe8, - 0xef, 0xc1, 0x8f, 0x7a, 0x5b, 0xfa, 0x3b, 0x7e, 0x23, 0xec, 0xbd, 0x3b, 0x97, 0x66, 0xc2, 0xbe, - 0x2f, 0xb2, 0x10, 0xf5, 0x25, 0x14, 0xe5, 0x26, 0x7d, 0xf2, 0x0c, 0xf2, 0x2e, 0xff, 0x14, 0x15, - 0x34, 0x89, 0x2f, 0x91, 0x53, 0x19, 0x92, 0x44, 0xfd, 0xbb, 0x34, 0xd4, 0xc2, 0xa4, 0x85, 0x8e, - 0xa8, 0x3d, 0x0b, 0xae, 0x73, 0x11, 0x6d, 0x02, 0x08, 0x92, 0x63, 0x2a, 0xaf, 0xb7, 0x22, 0x87, - 0xec, 0x51, 0x8a, 0x29, 0x9c, 0xeb, 0xd9, 0x27, 0xb6, 0x63, 0x26, 0x04, 0xf1, 0x98, 0xb4, 0xca, - 0x51, 0x5a, 0x4c, 0xdc, 0x33, 0x20, 0x71, 0x42, 0x93, 0x19, 0xa9, 0x08, 0x42, 0x4a, 0x6c, 0xde, - 0x21, 0xc2, 0x93, 0xa5, 0x64, 0x76, 0xa1, 0x94, 0xbc, 0x05, 0x79, 0x44, 0xe2, 0xb2, 0xb8, 0xc5, - 0xe7, 0x1c, 0x1a, 0xe0, 0x9a, 0x5a, 0x90, 0xf3, 0xa8, 0x3f, 0x9f, 0x04, 0xa2, 0x9f, 0xf4, 0x34, - 0xa6, 0x16, 0xcf, 0x72, 0x7c, 0x6b, 0x84, 0xe9, 0xc5, 0xb6, 0xc1, 0x68, 0xb6, 0x47, 0xae, 0x13, - 0x78, 0xd6, 0x28, 0xe0, 0x43, 0x43, 0xb0, 0xaa, 0x7f, 0x42, 0xa0, 0x14, 0xa3, 0x26, 0xbf, 0x75, - 0xce, 0x20, 0x6e, 0x2f, 0x17, 0x7b, 0xb1, 0x51, 0xa4, 0x79, 0xdf, 0x2b, 0x04, 0x90, 0x6d, 0xc8, - 0x78, 0x34, 0x10, 0xd5, 0xfe, 0xdd, 0xcb, 0x56, 0x69, 0x20, 0x61, 0xe3, 0xdf, 0xf3, 0x50, 0x68, - 0x89, 0xe5, 0x92, 0xaf, 0x45, 0x2f, 0x22, 0x75, 0xd9, 0x1e, 0x25, 0x75, 0xf8, 0x11, 0xeb, 0x50, - 0xec, 0x40, 0x31, 0xec, 0xf5, 0x89, 0x94, 0x62, 0x7d, 0x9b, 0xf7, 0x54, 0xb7, 0x65, 0x4f, 0x75, - 0xbb, 0xe9, 0x9c, 0x19, 0x11, 0x19, 0xe6, 0xb6, 0x33, 0xcf, 0x7d, 0x6f, 0x8f, 0xa9, 0x27, 0x2c, - 0x33, 0x1c, 0x13, 0x15, 0xca, 0x72, 0x16, 0x0c, 0xb3, 0xc2, 0x07, 0x12, 0x30, 0xf5, 0x4f, 0x73, - 0x11, 0x11, 0x2e, 0x85, 0xdc, 0x86, 0x9b, 0x22, 0xc8, 0xb6, 0x58, 0x29, 0x2d, 0x91, 0xca, 0x0d, - 0xb2, 0x0e, 0x0a, 0xdb, 0xca, 0x31, 0xf5, 0x42, 0x68, 0x0a, 0x19, 0x24, 0x94, 0xe5, 0x66, 0x21, - 0x2a, 0x4d, 0x6e, 0xc2, 0x2a, 0x86, 0x82, 0x24, 0x38, 0x43, 0x6e, 0xc1, 0x1a, 0x82, 0x45, 0xd0, - 0x0e, 0x11, 0x2b, 0x28, 0x4a, 0x02, 0x93, 0x73, 0x67, 0xc9, 0x06, 0x90, 0x66, 0x58, 0x72, 0x86, - 0xf0, 0x5c, 0x8c, 0xe5, 0x60, 0x36, 0x8e, 0xb3, 0x14, 0xc8, 0x03, 0xd8, 0xec, 0x5b, 0x5e, 0x60, - 0x8f, 0xec, 0x99, 0x25, 0x16, 0x91, 0xe4, 0x2e, 0xc6, 0x36, 0xbb, 0xc0, 0x0d, 0x88, 0xc2, 0x74, - 0xf3, 0x57, 0x54, 0x5c, 0xc1, 0x21, 0xaa, 0x44, 0xee, 0xc0, 0xad, 0x03, 0xe7, 0x78, 0x29, 0xb2, - 0x8c, 0x48, 0xd9, 0x03, 0x58, 0x44, 0x56, 0x50, 0xa8, 0xe4, 0x4c, 0x2a, 0xa5, 0x8a, 0x4a, 0xe1, - 0x6b, 0x48, 0x22, 0x6a, 0xa4, 0x01, 0x1b, 0xb2, 0xe9, 0xba, 0xa0, 0x15, 0x05, 0x27, 0x93, 0xb8, - 0x26, 0x6b, 0xde, 0x46, 0xc8, 0xd5, 0x38, 0x23, 0xe6, 0x39, 0x31, 0x46, 0x42, 0xea, 0xb0, 0x3e, - 0xa0, 0x41, 0x78, 0x9b, 0x86, 0x98, 0x35, 0x42, 0xa0, 0xda, 0x9a, 0xfb, 0x81, 0x3b, 0x0d, 0x61, - 0xeb, 0xb8, 0x36, 0x3e, 0xf5, 0x60, 0x6a, 0x79, 0xd1, 0xda, 0xee, 0xa1, 0x98, 0xa1, 0x67, 0x9f, - 0x9c, 0x50, 0x2f, 0x89, 0xb9, 0x4f, 0x6a, 0x50, 0x7a, 0x15, 0xdb, 0xc6, 0x16, 0xdb, 0x3a, 0xdb, - 0xdf, 0x80, 0x06, 0x81, 0xed, 0x9c, 0x84, 0xa8, 0x07, 0xb8, 0x50, 0x99, 0xa0, 0x2d, 0xec, 0xf0, - 0x71, 0x1c, 0xa7, 0x3b, 0xbf, 0xa4, 0xa3, 0x48, 0xe4, 0x13, 0x72, 0x17, 0xea, 0x12, 0x27, 0x55, - 0x1e, 0x62, 0x9f, 0x92, 0xfb, 0x70, 0x47, 0x62, 0x63, 0x0e, 0x18, 0x12, 0x3c, 0x23, 0x9b, 0x70, - 0x9b, 0xaf, 0x88, 0x87, 0x43, 0x96, 0x7b, 0x86, 0xe8, 0x4f, 0x1b, 0xff, 0x94, 0x83, 0x1c, 0xf7, - 0x75, 0x4c, 0x03, 0x30, 0xa8, 0x89, 0x5e, 0xf6, 0x31, 0xa5, 0xe4, 0x73, 0x1e, 0x28, 0x78, 0xdb, - 0xf1, 0xc1, 0x15, 0xe1, 0x6c, 0x4c, 0x59, 0xb4, 0x20, 0xfb, 0x50, 0x8a, 0x62, 0x5b, 0xc0, 0xdc, - 0xf5, 0x03, 0x63, 0x61, 0x9c, 0x1f, 0xdd, 0x3b, 0xea, 0xc2, 0xe8, 0x6d, 0xd6, 0x4b, 0x2a, 0x1a, - 0x09, 0x18, 0xa6, 0x60, 0x61, 0xb3, 0xca, 0x9a, 0xb2, 0xe4, 0xa7, 0xc6, 0xf3, 0x0c, 0x09, 0x6e, - 0x4e, 0x65, 0xae, 0x36, 0x17, 0x96, 0x29, 0x09, 0x15, 0x4e, 0x28, 0xc1, 0x82, 0xf0, 0x05, 0xd4, - 0xc3, 0x84, 0xdb, 0xc3, 0x5b, 0xeb, 0x3d, 0x1d, 0x4b, 0x0e, 0x22, 0xf3, 0x4f, 0x8e, 0x37, 0x04, - 0x5a, 0x70, 0xb6, 0xe0, 0x5e, 0xd4, 0x95, 0x67, 0x67, 0x69, 0x5a, 0x8e, 0x1b, 0xbc, 0xa3, 0x9e, - 0xe4, 0xe7, 0xed, 0x94, 0x3b, 0x34, 0x71, 0xe0, 0x4d, 0x4e, 0x23, 0x84, 0xbc, 0x82, 0xad, 0x50, - 0x48, 0xb4, 0xb3, 0xa4, 0x98, 0x75, 0x26, 0x66, 0x93, 0x2e, 0xd8, 0x46, 0x52, 0xd0, 0xc2, 0x1b, - 0xc1, 0xcd, 0xc5, 0x37, 0x02, 0xf5, 0x1e, 0x6f, 0xde, 0x11, 0x80, 0xdc, 0xe0, 0xa0, 0xa5, 0x0d, - 0x06, 0xca, 0x0d, 0xfc, 0xde, 0x6b, 0xea, 0x1d, 0xad, 0xad, 0xa4, 0xd4, 0xbf, 0x48, 0x43, 0x35, - 0x79, 0x3c, 0xa4, 0x04, 0xf9, 0xb6, 0xb6, 0xd7, 0x3c, 0xe8, 0x0c, 0x95, 0x1b, 0x38, 0x18, 0x1c, - 0xb4, 0x18, 0x63, 0x0a, 0x19, 0x0d, 0xed, 0x50, 0x33, 0x86, 0x4a, 0x1a, 0x9d, 0x66, 0xb7, 0xd9, - 0x36, 0xbf, 0x39, 0xd8, 0xef, 0x9b, 0x6d, 0x6d, 0x30, 0xd4, 0xbb, 0xcd, 0xa1, 0xde, 0xeb, 0x2a, - 0x19, 0xb2, 0x0a, 0x95, 0xde, 0xc1, 0xd0, 0xec, 0xed, 0x99, 0xfb, 0xda, 0x7e, 0xcf, 0x78, 0xab, - 0xac, 0x20, 0x71, 0xdf, 0xd0, 0x5a, 0xbd, 0xfd, 0x3e, 0x4e, 0x6b, 0xb6, 0x7a, 0xdd, 0xa1, 0xd1, - 0x6c, 0x0d, 0x95, 0x2c, 0x59, 0x83, 0xda, 0x60, 0xd8, 0x6c, 0xbd, 0x31, 0x87, 0xbd, 0x9e, 0x39, - 0xd8, 0x6f, 0x76, 0x3a, 0x4a, 0x2e, 0x09, 0xec, 0x34, 0x8d, 0x57, 0x9a, 0x92, 0xc7, 0x30, 0xac, - 0x77, 0x3a, 0xda, 0xab, 0x66, 0xc7, 0xec, 0xf5, 0x35, 0x83, 0xcf, 0x56, 0x40, 0x4f, 0xe7, 0xb4, - 0xbd, 0x43, 0xcd, 0xd8, 0xeb, 0xf4, 0xbe, 0x53, 0x8a, 0xb1, 0x15, 0x68, 0x5d, 0xcd, 0x78, 0xf5, - 0x56, 0x01, 0xf4, 0x64, 0x01, 0x1a, 0xea, 0xfb, 0x9a, 0x52, 0xc2, 0x68, 0xf0, 0xcd, 0xe1, 0xbe, - 0x19, 0xf1, 0x9a, 0x8c, 0xb9, 0x8c, 0x3b, 0x3e, 0xe8, 0xbe, 0xe9, 0xf6, 0xbe, 0xeb, 0x2a, 0x95, - 0xc6, 0xaf, 0xd3, 0x3c, 0xc1, 0x7a, 0x08, 0x35, 0x8f, 0x1e, 0x9b, 0x47, 0x98, 0xd0, 0x9a, 0x47, - 0x67, 0x98, 0x38, 0xf2, 0x5c, 0xab, 0xe2, 0xd1, 0x63, 0x96, 0xe6, 0xee, 0x22, 0x90, 0xa8, 0x50, - 0x89, 0xe8, 0x9c, 0xf9, 0x54, 0x64, 0x2c, 0x25, 0x49, 0xc5, 0x93, 0xe1, 0x6a, 0x44, 0xf3, 0x0e, - 0x73, 0x46, 0x71, 0xa5, 0x49, 0x22, 0xcc, 0x1a, 0x31, 0xab, 0x8c, 0x5e, 0xc3, 0x44, 0xbe, 0x1c, - 0x83, 0x90, 0xc7, 0x90, 0xc5, 0x92, 0x06, 0x73, 0xe5, 0x4c, 0xb2, 0xba, 0x08, 0x2b, 0x1d, 0x83, - 0x53, 0x60, 0x26, 0xc8, 0xf2, 0x0b, 0xe0, 0xd9, 0x21, 0x7e, 0x93, 0xaf, 0xa0, 0x20, 0x8f, 0xbd, - 0x5e, 0x5a, 0x6c, 0xdd, 0x2f, 0xbb, 0xea, 0x8d, 0x90, 0x1e, 0xd3, 0x70, 0x7f, 0xe4, 0xd9, 0xb3, - 0xc0, 0x67, 0x5d, 0xe3, 0xb2, 0x21, 0x87, 0x98, 0x97, 0x60, 0x55, 0xe6, 0x07, 0xd6, 0x74, 0xc6, - 0x3c, 0x39, 0x63, 0x44, 0x00, 0x4c, 0xbb, 0x8e, 0xa9, 0x2c, 0x99, 0xb9, 0x97, 0x15, 0x8e, 0x29, - 0x2f, 0x97, 0xd5, 0xbf, 0xcf, 0x43, 0x2d, 0x36, 0xaf, 0xee, 0x1c, 0xbb, 0x58, 0xb2, 0x8a, 0x87, - 0xaf, 0xb2, 0x91, 0xb6, 0xc7, 0x32, 0x82, 0xa5, 0xa3, 0x08, 0xb6, 0x05, 0xa5, 0x23, 0xa1, 0xd7, - 0x23, 0x91, 0x3b, 0x64, 0x8c, 0x38, 0x08, 0x4b, 0x14, 0x36, 0xc4, 0x82, 0x70, 0xc0, 0xd6, 0x25, - 0xde, 0x1a, 0x93, 0x50, 0xa4, 0x4b, 0xfa, 0x01, 0xcb, 0x9f, 0xca, 0xc6, 0xa2, 0x77, 0x3c, 0x06, - 0x45, 0x42, 0xc2, 0x57, 0x37, 0xfe, 0x58, 0x56, 0x93, 0x70, 0xf9, 0xec, 0xf6, 0x39, 0xe4, 0x3d, - 0x9e, 0x11, 0xb3, 0x8c, 0x31, 0x91, 0xda, 0x2d, 0xa4, 0xcc, 0x86, 0xa4, 0x24, 0xcf, 0x21, 0x33, - 0x71, 0x4f, 0xea, 0x05, 0x76, 0x26, 0x9b, 0x4b, 0xcf, 0x04, 0x75, 0xb3, 0xdd, 0x71, 0x4f, 0x0c, - 0xa4, 0x24, 0xbf, 0x1d, 0xa6, 0xa5, 0x45, 0x16, 0x8a, 0xef, 0x5d, 0xcc, 0xc3, 0x82, 0xb8, 0xa0, - 0x46, 0x03, 0xf3, 0xa8, 0xbf, 0x4f, 0x7d, 0x96, 0x05, 0x73, 0xdb, 0x88, 0x41, 0xfe, 0x8f, 0x02, - 0xb3, 0x01, 0x37, 0x6d, 0x27, 0xa0, 0x9e, 0x63, 0x4d, 0xcc, 0x20, 0x5a, 0xbe, 0x5f, 0x5f, 0x5d, - 0x54, 0x88, 0x2e, 0xc8, 0x62, 0x9b, 0x34, 0xd6, 0xed, 0xf3, 0x40, 0xff, 0xff, 0x4d, 0xb0, 0x6f, - 0xbc, 0x81, 0x4c, 0xc7, 0x3d, 0xb9, 0xa4, 0x4c, 0xde, 0x80, 0x5c, 0xe0, 0xce, 0xec, 0x91, 0x2f, - 0x8a, 0x06, 0x31, 0x0a, 0x23, 0x44, 0x26, 0x8a, 0x10, 0x57, 0xde, 0x1c, 0x3a, 0x94, 0x13, 0x5a, - 0x7e, 0x09, 0xe5, 0xc4, 0x81, 0xf1, 0xda, 0xf1, 0xe6, 0x52, 0x6b, 0x34, 0x12, 0xa4, 0xea, 0x2f, - 0x13, 0xae, 0x3f, 0xb0, 0x4f, 0x1c, 0xf2, 0x25, 0x94, 0x62, 0x24, 0x4b, 0x6a, 0xe5, 0x98, 0xb0, - 0x38, 0x25, 0xab, 0xc6, 0x3d, 0xfb, 0xbd, 0x15, 0x50, 0x2c, 0x73, 0x65, 0x35, 0x1e, 0x42, 0xd4, - 0x7f, 0x4d, 0x43, 0x89, 0x47, 0x59, 0x6a, 0x61, 0x79, 0x71, 0x69, 0x01, 0x16, 0x23, 0x4c, 0x16, - 0x60, 0x4f, 0x61, 0x55, 0x3c, 0x7e, 0x99, 0xf1, 0x42, 0x0c, 0x27, 0x53, 0x04, 0x62, 0x10, 0x16, - 0xe9, 0xff, 0x91, 0xe2, 0x97, 0x48, 0x22, 0x3a, 0xa6, 0x16, 0xa3, 0xe3, 0x3d, 0x80, 0xe0, 0xc7, - 0xa1, 0x67, 0x53, 0xc3, 0x75, 0x03, 0xb9, 0xf0, 0x08, 0xc2, 0x36, 0x66, 0x79, 0xd4, 0x09, 0x58, - 0x9b, 0x21, 0x23, 0x36, 0x16, 0x42, 0xf0, 0x6c, 0x1d, 0x1e, 0x05, 0xf3, 0xa2, 0x6c, 0xe5, 0x01, - 0x70, 0x13, 0x40, 0x2e, 0x55, 0x3c, 0xc0, 0x67, 0x8c, 0xa2, 0x80, 0xf0, 0x1f, 0x11, 0x48, 0xb4, - 0x34, 0x9a, 0x22, 0x6f, 0x6f, 0x09, 0x70, 0x33, 0x7a, 0x5f, 0x7e, 0x4f, 0x3d, 0x1f, 0x4f, 0x03, - 0x83, 0x45, 0xd6, 0x90, 0x43, 0xf5, 0x0f, 0x20, 0xcb, 0x14, 0xf5, 0xbf, 0x30, 0x01, 0xf2, 0x02, - 0xca, 0xe2, 0x42, 0x64, 0xda, 0x16, 0x85, 0xe3, 0xcd, 0xa5, 0x47, 0x21, 0x02, 0x3c, 0x1f, 0xa8, - 0x7f, 0x9e, 0x12, 0xcf, 0xf4, 0xba, 0xf3, 0x9e, 0x3a, 0x81, 0xeb, 0x9d, 0x91, 0x1d, 0xc8, 0xd8, - 0x63, 0x39, 0xfd, 0xd6, 0xc2, 0xfb, 0x7f, 0x48, 0xc6, 0x45, 0xea, 0x63, 0x03, 0x89, 0x51, 0x4d, - 0x1e, 0x9d, 0x5a, 0xb6, 0xc3, 0xae, 0x6d, 0xd1, 0x90, 0xe0, 0x90, 0xee, 0x7c, 0xda, 0xf8, 0x02, - 0xf2, 0x82, 0x1c, 0x9d, 0x85, 0xdd, 0xda, 0xa2, 0xd9, 0xf2, 0x2e, 0xa9, 0xfc, 0x74, 0x5c, 0xf9, - 0xea, 0xbf, 0xa5, 0xa0, 0xca, 0xf9, 0xae, 0x5c, 0x5c, 0x92, 0x2c, 0xb9, 0xb8, 0x9f, 0x26, 0x7e, - 0x20, 0xb0, 0x79, 0x21, 0x53, 0x54, 0x86, 0xff, 0xa6, 0x0b, 0x7e, 0x04, 0x2b, 0xac, 0x80, 0x2e, - 0xc0, 0xca, 0xe0, 0x6d, 0xb7, 0xc5, 0x33, 0xc0, 0x66, 0xfb, 0x70, 0xa8, 0x0f, 0x34, 0x25, 0x45, - 0x8a, 0x90, 0xdd, 0xd3, 0x86, 0xad, 0xd7, 0x4a, 0x5a, 0x3d, 0x83, 0x62, 0xb4, 0xa9, 0x2f, 0x12, - 0x5d, 0x83, 0x07, 0xf1, 0x28, 0x2d, 0xd7, 0x16, 0x7e, 0xc5, 0x7a, 0x05, 0x0a, 0xd7, 0x05, 0x0f, - 0x46, 0xf8, 0xa9, 0x7e, 0x04, 0x95, 0x04, 0x21, 0xc9, 0x43, 0x66, 0x68, 0x7c, 0xaf, 0xdc, 0xc0, - 0xa9, 0x77, 0x3b, 0xbd, 0xd6, 0x1b, 0x25, 0xa5, 0xfe, 0x71, 0x1a, 0xb2, 0x7a, 0x40, 0xa7, 0x3e, - 0x79, 0x96, 0x98, 0x37, 0xf6, 0x74, 0xc1, 0xd0, 0xec, 0x6f, 0x6c, 0xba, 0x4f, 0x20, 0xc7, 0x2c, - 0x47, 0xb6, 0x08, 0x6b, 0x0b, 0x8a, 0x34, 0x04, 0x9a, 0x7c, 0x05, 0x95, 0xb8, 0x35, 0xca, 0x2e, - 0xe1, 0x05, 0xe6, 0x58, 0x8e, 0x99, 0xe3, 0xf9, 0x38, 0xb8, 0x72, 0xfd, 0x38, 0xf8, 0x02, 0x0a, - 0x72, 0xc5, 0xb8, 0x6f, 0xcd, 0x30, 0x94, 0x1b, 0x52, 0x01, 0xa9, 0x48, 0x01, 0x69, 0xcc, 0x66, - 0xd9, 0xe7, 0x6b, 0xad, 0xd9, 0xd6, 0x0c, 0x25, 0xa3, 0x7e, 0x03, 0xab, 0xed, 0x33, 0xc7, 0x9a, - 0xda, 0x23, 0x2c, 0x96, 0xa9, 0x17, 0xd8, 0xd4, 0x27, 0x5f, 0xc0, 0xad, 0x89, 0xe5, 0x07, 0xa6, - 0xef, 0x4e, 0xec, 0xb1, 0x1d, 0x9c, 0xc5, 0xd2, 0x52, 0x1e, 0x7d, 0xd6, 0x11, 0x3d, 0x10, 0x58, - 0x99, 0x9f, 0xaa, 0x4d, 0x58, 0x65, 0x3f, 0x69, 0x73, 0x1c, 0x3a, 0x0a, 0x64, 0x36, 0xf0, 0x0c, - 0xb3, 0x0c, 0xcb, 0x17, 0xa1, 0xb8, 0xba, 0xb3, 0x1e, 0x4f, 0x65, 0x10, 0xde, 0x12, 0xb9, 0x05, - 0x7e, 0xab, 0xff, 0x95, 0x86, 0xf2, 0x6b, 0x3a, 0x99, 0xb8, 0x92, 0xfd, 0x61, 0xec, 0x41, 0x22, - 0xd1, 0x50, 0xd4, 0x9c, 0xf1, 0xcc, 0xb5, 0x9d, 0x40, 0x3c, 0x52, 0xc4, 0x82, 0x4c, 0x3a, 0x11, - 0x64, 0x92, 0xc1, 0x33, 0xb3, 0x18, 0x3c, 0xf7, 0xa0, 0x7a, 0x42, 0x1d, 0xea, 0xdb, 0xbe, 0x30, - 0x7a, 0x96, 0xe5, 0x25, 0x92, 0xda, 0xf8, 0x7a, 0x42, 0xef, 0x5a, 0xe0, 0x22, 0xbb, 0x50, 0x66, - 0xda, 0x92, 0x52, 0xb2, 0xd7, 0x92, 0x92, 0xe0, 0x21, 0xbf, 0x80, 0x12, 0x9a, 0x8d, 0x14, 0x91, - 0xbb, 0x96, 0x88, 0x38, 0xcb, 0x6f, 0xea, 0xbb, 0xff, 0x58, 0x80, 0x4a, 0xa2, 0x83, 0x41, 0x3e, - 0x86, 0xaa, 0x68, 0xa3, 0x26, 0x13, 0x82, 0x0a, 0x87, 0xca, 0xd0, 0xbe, 0x2c, 0xa7, 0x4d, 0x2f, - 0xcf, 0x69, 0x3f, 0x85, 0x8c, 0x75, 0x64, 0xb3, 0x03, 0x28, 0xed, 0xdc, 0x89, 0x36, 0x95, 0x98, - 0x77, 0xbb, 0xb9, 0xab, 0x1b, 0x48, 0x47, 0x1a, 0x50, 0xc0, 0x6a, 0x89, 0xfd, 0x7e, 0x84, 0x57, - 0x39, 0xe1, 0x18, 0x23, 0xee, 0xc8, 0x9a, 0x4c, 0x4c, 0xde, 0x52, 0xe7, 0x6d, 0xd8, 0x22, 0x42, - 0x0e, 0x59, 0x5b, 0xbd, 0x09, 0x9b, 0xf2, 0x39, 0x71, 0xee, 0x53, 0x2f, 0x7c, 0x42, 0x37, 0x67, - 0xd4, 0x1b, 0x51, 0x47, 0x3e, 0xba, 0x35, 0x04, 0xd1, 0x81, 0x4f, 0x3d, 0x99, 0x54, 0xf7, 0x39, - 0x45, 0xf8, 0xeb, 0xcb, 0x3c, 0x4b, 0x5d, 0xf9, 0xaf, 0x2f, 0xcf, 0x75, 0x96, 0x79, 0x39, 0x52, - 0x38, 0xdf, 0x59, 0x66, 0x75, 0x49, 0xe3, 0x3f, 0xb3, 0x90, 0x69, 0xee, 0xea, 0xe4, 0x25, 0xe4, - 0xa8, 0x13, 0x78, 0x67, 0x32, 0x72, 0x3f, 0xb8, 0x64, 0xef, 0xdb, 0xfc, 0xc7, 0x09, 0x82, 0xa1, - 0xf1, 0x57, 0x59, 0xc8, 0xf2, 0x17, 0xde, 0xbb, 0x50, 0xb4, 0x1c, 0xd7, 0x39, 0x9b, 0xba, 0x73, - 0x7e, 0x14, 0x05, 0x23, 0x02, 0xf0, 0x17, 0x7e, 0xc7, 0x0f, 0x2c, 0xf1, 0xb8, 0x53, 0x30, 0xc2, - 0x71, 0xb8, 0x95, 0x4c, 0x6c, 0x2b, 0x5f, 0x43, 0xce, 0x76, 0x58, 0x9f, 0x9e, 0xc7, 0x98, 0x4f, - 0xae, 0x5c, 0x12, 0xff, 0x59, 0xa6, 0x21, 0xd8, 0x48, 0x33, 0xea, 0xf4, 0x67, 0x3f, 0x4c, 0x82, - 0xe4, 0x0b, 0xdb, 0xc5, 0xb9, 0xc5, 0x36, 0xd0, 0x45, 0xfc, 0xec, 0x6f, 0xf2, 0x07, 0x6d, 0x33, - 0xeb, 0xcc, 0x3a, 0x9a, 0xf0, 0x63, 0x2a, 0x18, 0x72, 0x48, 0x4c, 0xa8, 0xb1, 0xdf, 0x65, 0xee, - 0xcf, 0x03, 0xeb, 0xc8, 0x9e, 0xd8, 0xc1, 0x19, 0x3b, 0xa5, 0xea, 0xce, 0x17, 0x57, 0xcf, 0x32, - 0x48, 0x32, 0xb2, 0xf9, 0x16, 0xa5, 0x35, 0x74, 0xc8, 0xb2, 0xdd, 0xe0, 0x1a, 0x6c, 0x67, 0x4c, - 0x7f, 0xa4, 0x63, 0x71, 0x28, 0x72, 0x18, 0xaa, 0x3d, 0x1d, 0x53, 0x3b, 0x11, 0x5b, 0x16, 0x47, - 0x81, 0xdf, 0xea, 0x5b, 0x28, 0x86, 0x1b, 0x23, 0xeb, 0xa0, 0x1c, 0x38, 0x3f, 0x38, 0xee, 0xa9, - 0x13, 0xc2, 0xf8, 0x0f, 0x41, 0x5b, 0x78, 0x9a, 0xde, 0x7c, 0x14, 0xb8, 0x1e, 0xff, 0x21, 0xe8, - 0xde, 0xdc, 0x61, 0xa1, 0x5f, 0x49, 0x63, 0x74, 0xd7, 0xf0, 0xde, 0x53, 0x32, 0x0c, 0x61, 0x4d, - 0x26, 0x47, 0xd6, 0xe8, 0x07, 0x65, 0x45, 0xb5, 0x60, 0x6d, 0xc9, 0x6e, 0x78, 0x13, 0x96, 0x4d, - 0x92, 0x44, 0x28, 0x37, 0xf0, 0xee, 0xee, 0xcf, 0x3d, 0xaa, 0xa4, 0xf0, 0xeb, 0xd0, 0xa6, 0xa7, - 0x4a, 0x9a, 0x54, 0x01, 0xba, 0xae, 0x23, 0x54, 0xab, 0x64, 0xd8, 0x6f, 0x54, 0xc5, 0x60, 0x45, - 0xfd, 0x97, 0x34, 0xac, 0x2d, 0x29, 0xa7, 0x96, 0x06, 0x9f, 0x8f, 0xa1, 0x8a, 0x3e, 0x7a, 0xee, - 0x97, 0xc2, 0x15, 0x0e, 0x8d, 0xe2, 0x04, 0x09, 0x44, 0x3f, 0x7d, 0xe8, 0x9a, 0xc9, 0x9f, 0x2c, - 0xae, 0x46, 0x18, 0x49, 0xfe, 0x2d, 0x54, 0x42, 0xcf, 0xc7, 0x52, 0x55, 0x58, 0xf4, 0xd3, 0x4b, - 0xcb, 0xbd, 0xed, 0x56, 0x9c, 0xc5, 0x48, 0x4a, 0x60, 0x47, 0xe7, 0x06, 0x3c, 0xb0, 0x94, 0x0d, - 0xf6, 0x8d, 0x1e, 0xe6, 0x51, 0xac, 0xd0, 0xc4, 0x73, 0x66, 0xc1, 0x08, 0xc7, 0x8d, 0x57, 0x50, - 0x49, 0xc8, 0x43, 0x67, 0x0d, 0x25, 0xca, 0x74, 0x3d, 0x0a, 0x4f, 0x75, 0xc8, 0x07, 0xfc, 0xf7, - 0xab, 0xc2, 0x38, 0xe4, 0x50, 0xfd, 0x43, 0xd8, 0x3c, 0xf7, 0x22, 0x2f, 0x7b, 0xd4, 0x68, 0x56, - 0xac, 0x3e, 0x8b, 0x3d, 0x0d, 0x97, 0xa3, 0xb7, 0x66, 0x15, 0xca, 0x78, 0x0d, 0x0a, 0x6a, 0x99, - 0x18, 0x25, 0x60, 0xac, 0x4e, 0x70, 0x43, 0x8a, 0x0c, 0xa3, 0x88, 0x41, 0x9e, 0x7c, 0x09, 0xa5, - 0xd8, 0xcf, 0x46, 0xb1, 0x64, 0xeb, 0xba, 0xde, 0xd4, 0x9a, 0x28, 0x37, 0xd0, 0x08, 0xa2, 0x07, - 0x04, 0x6e, 0x81, 0xd1, 0x3b, 0xc7, 0x93, 0x7f, 0xce, 0x00, 0x44, 0x77, 0x39, 0xa9, 0x40, 0xd1, - 0xd0, 0xbe, 0x3d, 0xd0, 0x06, 0x43, 0xad, 0xad, 0xdc, 0x20, 0x0a, 0x94, 0x77, 0x9b, 0x6d, 0xb3, - 0x6f, 0xf4, 0x86, 0xbd, 0x56, 0xaf, 0xa3, 0xa4, 0x09, 0x81, 0xea, 0xb0, 0xd7, 0x33, 0xf7, 0x9b, - 0xdd, 0xb7, 0x66, 0x5f, 0xd3, 0x8c, 0x81, 0xb2, 0x82, 0xb0, 0xf6, 0x41, 0xbf, 0xa3, 0xb7, 0x9a, - 0x43, 0x8d, 0x01, 0x95, 0x2c, 0x5a, 0xaa, 0xde, 0x6d, 0xf5, 0xf6, 0xfb, 0xcd, 0xa1, 0xbe, 0xdb, - 0xd1, 0x22, 0x11, 0x39, 0xb2, 0x0a, 0x95, 0xee, 0x41, 0xa7, 0x63, 0xea, 0x6d, 0xad, 0x3b, 0xd4, - 0x87, 0x6f, 0x95, 0x3c, 0xce, 0x83, 0x7c, 0xe6, 0xb7, 0x07, 0xfa, 0x50, 0xef, 0xbe, 0x52, 0x0a, - 0xec, 0x4d, 0xa1, 0xab, 0x7d, 0xdf, 0xd7, 0x5a, 0x43, 0xad, 0x1d, 0x91, 0x16, 0x71, 0xb2, 0x4e, - 0xaf, 0xd5, 0x8c, 0xb1, 0x03, 0x63, 0xd7, 0xbb, 0xaf, 0x58, 0x97, 0xaf, 0x77, 0x30, 0x54, 0x4a, - 0xe8, 0x77, 0x07, 0x03, 0xcd, 0x30, 0x0d, 0xad, 0x39, 0xe8, 0x75, 0x15, 0x05, 0x3d, 0xcd, 0xd0, - 0x06, 0xda, 0x50, 0x59, 0xc5, 0x3d, 0x62, 0x96, 0x6b, 0x62, 0x51, 0xab, 0x10, 0xd4, 0x0f, 0xcb, - 0x6e, 0xf9, 0x78, 0x0d, 0x75, 0x87, 0x7b, 0x1e, 0x7e, 0xaf, 0xac, 0x23, 0x29, 0x7e, 0xf3, 0x0c, - 0xec, 0x26, 0xab, 0x84, 0x7b, 0xc6, 0x1b, 0xad, 0xad, 0x6c, 0x20, 0xdb, 0x41, 0xb7, 0xa3, 0x77, - 0xdf, 0x34, 0x77, 0x3b, 0x9a, 0x72, 0x8b, 0xd4, 0x61, 0x3d, 0xb1, 0xe1, 0x43, 0xcd, 0x18, 0xe8, - 0xbd, 0xae, 0x52, 0x27, 0x1b, 0x40, 0x12, 0x98, 0xd6, 0xeb, 0xa6, 0xde, 0x55, 0x6e, 0xe3, 0x41, - 0xe0, 0x82, 0x4d, 0x5c, 0xf1, 0x16, 0xee, 0xa1, 0xd5, 0xeb, 0x76, 0xb5, 0xd6, 0x90, 0x2f, 0xe4, - 0x01, 0xb9, 0x0f, 0x77, 0x92, 0xaa, 0x36, 0xbf, 0xd3, 0x87, 0xaf, 0xcd, 0x41, 0x73, 0x5f, 0x33, - 0xf5, 0xbe, 0xa2, 0x92, 0x72, 0xd4, 0xb4, 0xfc, 0xef, 0xd4, 0x6e, 0xed, 0x77, 0x2a, 0xa1, 0xdf, - 0x8c, 0x5c, 0x8f, 0x1e, 0xe5, 0xd8, 0xf0, 0xf3, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x02, 0xa4, - 0x89, 0x6c, 0x07, 0x31, 0x00, 0x00, -} diff --git a/protos/protocol/core/Tron.proto b/protos/protocol/core/Tron.proto deleted file mode 100644 index 806e5a3..0000000 --- a/protos/protocol/core/Tron.proto +++ /dev/null @@ -1,526 +0,0 @@ -syntax = "proto3"; - -package protocol; - -option go_package = "protocol.core"; - -import "google/protobuf/any.proto"; -import "protos/protocol/core/Discover.proto"; - -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 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 = 9; - // this last operation time, including transfer, voting and so on. //FIXME fix grammar - int64 latest_opration_time = 10; - // witness block producing allowance - int64 allowance = 11; - // last withdraw time - int64 latest_withdraw_time = 12; - // 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; - 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; - // 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; - //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; -} - -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; -} - -// 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; - UpdateEnergyLimitContract = 45; - } - 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; - 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 { - 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; - 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 { - 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 = 0; - BAD_PROTOCOL = 2; - TOO_MANY_PEERS = 4; - DUPLICATE_PEER = 5; - INCOMPATIBLE_PROTOCOL = 6; - NULL_IDENTITY = 7; - PEER_QUITING = 8; - UNEXPECTED_IDENTITY = 9; - LOCAL_IDENTITY = 10; - PING_TIMEOUT = 11; - USER_REASON = 16; - RESET = 17; - SYNC_FAIL = 18; - FETCH_FAIL = 19; - BAD_TX = 20; - BAD_BLOCK = 21; - FORKED = 22; - UNLINKABLE = 23; - INCOMPATIBLE_VERSION = 24; - INCOMPATIBLE_CHAIN = 25; - TIME_OUT = 32; - CONNECT_FAIL = 33; - TOO_MANY_PEERS_WITH_SAME_IP = 34; - UNKNOWN = 255; -} - -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; - int64 origin_energy_limit = 8; -} - -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 - 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; -} diff --git a/protos/protocol/core/TronInventoryItems.pb.go b/protos/protocol/core/TronInventoryItems.pb.go deleted file mode 100644 index 1587814..0000000 --- a/protos/protocol/core/TronInventoryItems.pb.go +++ /dev/null @@ -1,87 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: protos/protocol/core/TronInventoryItems.proto - -package protocol_core - -import ( - fmt "fmt" - proto "github.com/tron-us/protobuf/proto" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type InventoryItems struct { - Type int32 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty" pg:"type"` - Items [][]byte `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty" pg:"items"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *InventoryItems) Reset() { *m = InventoryItems{} } -func (m *InventoryItems) String() string { return proto.CompactTextString(m) } -func (*InventoryItems) ProtoMessage() {} -func (*InventoryItems) Descriptor() ([]byte, []int) { - return fileDescriptor_25d52db6a1f7f6e0, []int{0} -} -func (m *InventoryItems) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_InventoryItems.Unmarshal(m, b) -} -func (m *InventoryItems) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_InventoryItems.Marshal(b, m, deterministic) -} -func (m *InventoryItems) XXX_Merge(src proto.Message) { - xxx_messageInfo_InventoryItems.Merge(m, src) -} -func (m *InventoryItems) XXX_Size() int { - return xxx_messageInfo_InventoryItems.Size(m) -} -func (m *InventoryItems) XXX_DiscardUnknown() { - xxx_messageInfo_InventoryItems.DiscardUnknown(m) -} - -var xxx_messageInfo_InventoryItems proto.InternalMessageInfo - -func (m *InventoryItems) GetType() int32 { - if m != nil { - return m.Type - } - return 0 -} - -func (m *InventoryItems) GetItems() [][]byte { - if m != nil { - return m.Items - } - return nil -} - -func init() { - proto.RegisterType((*InventoryItems)(nil), "protocol.InventoryItems") -} - -func init() { - proto.RegisterFile("protos/protocol/core/TronInventoryItems.proto", fileDescriptor_25d52db6a1f7f6e0) -} - -var fileDescriptor_25d52db6a1f7f6e0 = []byte{ - // 121 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x2d, 0x28, 0xca, 0x2f, - 0xc9, 0x2f, 0xd6, 0x07, 0x53, 0xc9, 0xf9, 0x39, 0xfa, 0xc9, 0xf9, 0x45, 0xa9, 0xfa, 0x21, 0x45, - 0xf9, 0x79, 0x9e, 0x79, 0x65, 0xa9, 0x79, 0x25, 0xf9, 0x45, 0x95, 0x9e, 0x25, 0xa9, 0xb9, 0xc5, - 0x7a, 0x60, 0x05, 0x42, 0x1c, 0x30, 0x75, 0x4a, 0x56, 0x5c, 0x7c, 0xa8, 0x2a, 0x84, 0x84, 0xb8, - 0x58, 0x4a, 0x2a, 0x0b, 0x52, 0x25, 0x18, 0x15, 0x18, 0x35, 0x58, 0x83, 0xc0, 0x6c, 0x21, 0x11, - 0x2e, 0xd6, 0x4c, 0x90, 0xa4, 0x04, 0x93, 0x02, 0xb3, 0x06, 0x4f, 0x10, 0x84, 0xe3, 0xc4, 0x1f, - 0xc5, 0x0b, 0x33, 0x47, 0x0f, 0x64, 0x5f, 0x12, 0x1b, 0x98, 0x6b, 0x0c, 0x08, 0x00, 0x00, 0xff, - 0xff, 0x94, 0x46, 0xeb, 0xd3, 0x8e, 0x00, 0x00, 0x00, -} diff --git a/protos/protocol/core/TronInventoryItems.proto b/protos/protocol/core/TronInventoryItems.proto deleted file mode 100644 index fc068df..0000000 --- a/protos/protocol/core/TronInventoryItems.proto +++ /dev/null @@ -1,10 +0,0 @@ -syntax = "proto3"; - -package protocol; - -option go_package = "protocol.core"; - -message InventoryItems { - int32 type = 1; - repeated bytes items = 2; -} diff --git a/protos/score/score.pb.go b/protos/score/score.pb.go index 3d96b20..3c2745d 100644 --- a/protos/score/score.pb.go +++ b/protos/score/score.pb.go @@ -7,7 +7,6 @@ import ( context "context" encoding_binary "encoding/binary" fmt "fmt" - node "github.com/bittorrent/go-btfs-common/protos/node" _ "github.com/gogo/protobuf/types" golang_proto "github.com/golang/protobuf/proto" _ "github.com/tron-us/protobuf/gogoproto" @@ -69,6 +68,49 @@ func (ResponseCode) EnumDescriptor() ([]byte, []int) { return fileDescriptor_649f1c1133130df2, []int{0} } +type NodeRole int32 + +const ( + NodeRole_RENTER NodeRole = 0 + NodeRole_HOST NodeRole = 1 + NodeRole_REPAIRER NodeRole = 2 + NodeRole_CHALLENGER NodeRole = 3 + NodeRole_NETWORK_CHECKER NodeRole = 4 + NodeRole_REPUTATION_CHECKER NodeRole = 5 + NodeRole_CDN_PROVIDER NodeRole = 6 + NodeRole_OTHER NodeRole = 20 +) + +var NodeRole_name = map[int32]string{ + 0: "RENTER", + 1: "HOST", + 2: "REPAIRER", + 3: "CHALLENGER", + 4: "NETWORK_CHECKER", + 5: "REPUTATION_CHECKER", + 6: "CDN_PROVIDER", + 20: "OTHER", +} + +var NodeRole_value = map[string]int32{ + "RENTER": 0, + "HOST": 1, + "REPAIRER": 2, + "CHALLENGER": 3, + "NETWORK_CHECKER": 4, + "REPUTATION_CHECKER": 5, + "CDN_PROVIDER": 6, + "OTHER": 20, +} + +func (x NodeRole) String() string { + return proto.EnumName(NodeRole_name, int32(x)) +} + +func (NodeRole) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_649f1c1133130df2, []int{1} +} + type HostsReq_Mode int32 const ( @@ -466,12 +508,12 @@ func (*HostsReq) XXX_MessageName() string { } type RolesHostsReq struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" pg:"id"` - RespSize int32 `protobuf:"varint,2,opt,name=resp_size,json=respSize,proto3" json:"resp_size,omitempty" pg:"resp_size"` - Role node.NodeRole `protobuf:"varint,3,opt,name=role,proto3,enum=node.NodeRole" json:"role,omitempty" pg:"role"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" pg:"id"` + RespSize int32 `protobuf:"varint,2,opt,name=resp_size,json=respSize,proto3" json:"resp_size,omitempty" pg:"resp_size"` + Role NodeRole `protobuf:"varint,3,opt,name=role,proto3,enum=score.NodeRole" json:"role,omitempty" pg:"role"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` } func (m *RolesHostsReq) Reset() { *m = RolesHostsReq{} } @@ -521,11 +563,11 @@ func (m *RolesHostsReq) GetRespSize() int32 { return 0 } -func (m *RolesHostsReq) GetRole() node.NodeRole { +func (m *RolesHostsReq) GetRole() NodeRole { if m != nil { return m.Role } - return node.NodeRole_RENTER + return NodeRole_RENTER } func (*RolesHostsReq) XXX_MessageName() string { @@ -675,13 +717,13 @@ func (*StatsReq) XXX_MessageName() string { } type StatsResp struct { - Code ResponseCode `protobuf:"varint,1,opt,name=code,proto3,enum=score.ResponseCode" json:"code,omitempty" pg:"code"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty" pg:"message"` - ResponseTime time.Time `protobuf:"bytes,3,opt,name=response_time,json=responseTime,proto3,stdtime" json:"response_time" pg:"response_time"` - node.StorageStat_HostStats `protobuf:"bytes,4,opt,name=stats,proto3,embedded=stats" json:"stats" pg:"stats"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` + Code ResponseCode `protobuf:"varint,1,opt,name=code,proto3,enum=score.ResponseCode" json:"code,omitempty" pg:"code"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty" pg:"message"` + ResponseTime time.Time `protobuf:"bytes,3,opt,name=response_time,json=responseTime,proto3,stdtime" json:"response_time" pg:"response_time"` + StorageStat_HostStats `protobuf:"bytes,4,opt,name=stats,proto3,embedded=stats" json:"stats" pg:"stats"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` } func (m *StatsResp) Reset() { *m = StatsResp{} } @@ -743,44 +785,44 @@ func (*StatsResp) XXX_MessageName() string { } type Host struct { - NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id" pg:"node_id"` - CreateTimestamp time.Time `protobuf:"bytes,2,opt,name=create_timestamp,json=createTimestamp,proto3,stdtime" json:"create_timestamp" pg:"create_timestamp"` - UpdateTimestamp time.Time `protobuf:"bytes,3,opt,name=update_timestamp,json=updateTimestamp,proto3,stdtime" json:"update_timestamp" pg:"update_timestamp"` - Region string `protobuf:"bytes,4,opt,name=region,proto3" json:"region" pg:"region"` - BtfsVersion string `protobuf:"bytes,5,opt,name=btfs_version,json=btfsVersion,proto3" json:"btfs_version" pg:"btfs_version"` - Score float32 `protobuf:"fixed32,6,opt,name=score,proto3" json:"score" pg:"score"` - HeartBeats uint64 `protobuf:"varint,7,opt,name=heart_beats,json=heartBeats,proto3" json:"heart_beats" pg:"heart_beats"` - Uptime float32 `protobuf:"fixed32,8,opt,name=uptime,proto3" json:"uptime" pg:"uptime"` - Age uint64 `protobuf:"varint,9,opt,name=age,proto3" json:"age" pg:"age"` - Reputation float32 `protobuf:"fixed32,10,opt,name=reputation,proto3" json:"reputation" pg:"reputation"` - UploadAverage float32 `protobuf:"fixed32,11,opt,name=upload_average,json=uploadAverage,proto3" json:"upload_average" pg:"upload_average"` - UploadVariance float32 `protobuf:"fixed32,12,opt,name=upload_variance,json=uploadVariance,proto3" json:"upload_variance" pg:"upload_variance"` - DownloadAverage float32 `protobuf:"fixed32,13,opt,name=download_average,json=downloadAverage,proto3" json:"download_average" pg:"download_average"` - DownloadVariance float32 `protobuf:"fixed32,14,opt,name=download_variance,json=downloadVariance,proto3" json:"download_variance" pg:"download_variance"` - Location Location `protobuf:"bytes,15,opt,name=location,proto3" json:"location" pg:"location"` - StorageVolumeCap float32 `protobuf:"fixed32,16,opt,name=storage_volume_cap,json=storageVolumeCap,proto3" json:"storage_volume_cap" pg:"storage_volume_cap"` - StorageVolumeLeft float32 `protobuf:"fixed32,17,opt,name=storage_volume_left,json=storageVolumeLeft,proto3" json:"storage_volume_left" pg:"storage_volume_left"` - StorageTimeMin uint64 `protobuf:"varint,18,opt,name=storage_time_min,json=storageTimeMin,proto3" json:"storage_time_min" pg:"storage_time_min"` - StoragePriceAsk uint64 `protobuf:"varint,19,opt,name=storage_price_ask,json=storagePriceAsk,proto3" json:"storage_price_ask" pg:"storage_price_ask"` - StoragePriceEst uint64 `protobuf:"varint,20,opt,name=storage_price_est,json=storagePriceEst,proto3" json:"storage_price_est" pg:"storage_price_est"` - BandwidthLimit float64 `protobuf:"fixed64,21,opt,name=bandwidth_limit,json=bandwidthLimit,proto3" json:"bandwidth_limit" pg:"bandwidth_limit"` - BandwidthPriceAsk uint64 `protobuf:"varint,22,opt,name=bandwidth_price_ask,json=bandwidthPriceAsk,proto3" json:"bandwidth_price_ask" pg:"bandwidth_price_ask"` - BandwidthPriceEst uint64 `protobuf:"varint,23,opt,name=bandwidth_price_est,json=bandwidthPriceEst,proto3" json:"bandwidth_price_est" pg:"bandwidth_price_est"` - CollateralStake uint64 `protobuf:"varint,24,opt,name=collateral_stake,json=collateralStake,proto3" json:"collateral_stake" pg:"collateral_stake"` - CollateralLost uint64 `protobuf:"varint,25,opt,name=collateral_lost,json=collateralLost,proto3" json:"collateral_lost" pg:"collateral_lost"` - CollateralBurn uint64 `protobuf:"varint,26,opt,name=collateral_burn,json=collateralBurn,proto3" json:"collateral_burn" pg:"collateral_burn"` - CountryShort string `protobuf:"bytes,27,opt,name=country_short,json=countryShort,proto3" json:"country_short" pg:"country_short"` - node.Node_ExperimentalFlags `protobuf:"bytes,28,opt,name=flg,proto3,embedded=flg" json:"flg" pg:"flg"` - Discovery float32 `protobuf:"fixed32,29,opt,name=discovery,proto3" json:"discovery" pg:"discovery"` - UptimeScore float32 `protobuf:"fixed32,30,opt,name=uptime_score,json=uptimeScore,proto3" json:"uptime_score" pg:"uptime_score"` - AgeScore float32 `protobuf:"fixed32,31,opt,name=age_score,json=ageScore,proto3" json:"age_score" pg:"age_score"` - VersionScore float32 `protobuf:"fixed32,32,opt,name=version_score,json=versionScore,proto3" json:"version_score" pg:"version_score"` - UploadSpeedScore float32 `protobuf:"fixed32,33,opt,name=upload_speed_score,json=uploadSpeedScore,proto3" json:"upload_speed_score" pg:"upload_speed_score"` - DownloadSpeedScore float32 `protobuf:"fixed32,34,opt,name=download_speed_score,json=downloadSpeedScore,proto3" json:"download_speed_score" pg:"download_speed_score"` - Roles []node.NodeRole `protobuf:"varint,35,rep,packed,name=roles,proto3,enum=node.NodeRole" json:"roles" pg:"roles,array"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` + NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id" pg:"node_id"` + CreateTimestamp time.Time `protobuf:"bytes,2,opt,name=create_timestamp,json=createTimestamp,proto3,stdtime" json:"create_timestamp" pg:"create_timestamp"` + UpdateTimestamp time.Time `protobuf:"bytes,3,opt,name=update_timestamp,json=updateTimestamp,proto3,stdtime" json:"update_timestamp" pg:"update_timestamp"` + Region string `protobuf:"bytes,4,opt,name=region,proto3" json:"region" pg:"region"` + BtfsVersion string `protobuf:"bytes,5,opt,name=btfs_version,json=btfsVersion,proto3" json:"btfs_version" pg:"btfs_version"` + Score float32 `protobuf:"fixed32,6,opt,name=score,proto3" json:"score" pg:"score"` + HeartBeats uint64 `protobuf:"varint,7,opt,name=heart_beats,json=heartBeats,proto3" json:"heart_beats" pg:"heart_beats"` + Uptime float32 `protobuf:"fixed32,8,opt,name=uptime,proto3" json:"uptime" pg:"uptime"` + Age uint64 `protobuf:"varint,9,opt,name=age,proto3" json:"age" pg:"age"` + Reputation float32 `protobuf:"fixed32,10,opt,name=reputation,proto3" json:"reputation" pg:"reputation"` + UploadAverage float32 `protobuf:"fixed32,11,opt,name=upload_average,json=uploadAverage,proto3" json:"upload_average" pg:"upload_average"` + UploadVariance float32 `protobuf:"fixed32,12,opt,name=upload_variance,json=uploadVariance,proto3" json:"upload_variance" pg:"upload_variance"` + DownloadAverage float32 `protobuf:"fixed32,13,opt,name=download_average,json=downloadAverage,proto3" json:"download_average" pg:"download_average"` + DownloadVariance float32 `protobuf:"fixed32,14,opt,name=download_variance,json=downloadVariance,proto3" json:"download_variance" pg:"download_variance"` + Location Location `protobuf:"bytes,15,opt,name=location,proto3" json:"location" pg:"location"` + StorageVolumeCap float32 `protobuf:"fixed32,16,opt,name=storage_volume_cap,json=storageVolumeCap,proto3" json:"storage_volume_cap" pg:"storage_volume_cap"` + StorageVolumeLeft float32 `protobuf:"fixed32,17,opt,name=storage_volume_left,json=storageVolumeLeft,proto3" json:"storage_volume_left" pg:"storage_volume_left"` + StorageTimeMin uint64 `protobuf:"varint,18,opt,name=storage_time_min,json=storageTimeMin,proto3" json:"storage_time_min" pg:"storage_time_min"` + StoragePriceAsk uint64 `protobuf:"varint,19,opt,name=storage_price_ask,json=storagePriceAsk,proto3" json:"storage_price_ask" pg:"storage_price_ask"` + StoragePriceEst uint64 `protobuf:"varint,20,opt,name=storage_price_est,json=storagePriceEst,proto3" json:"storage_price_est" pg:"storage_price_est"` + BandwidthLimit float64 `protobuf:"fixed64,21,opt,name=bandwidth_limit,json=bandwidthLimit,proto3" json:"bandwidth_limit" pg:"bandwidth_limit"` + BandwidthPriceAsk uint64 `protobuf:"varint,22,opt,name=bandwidth_price_ask,json=bandwidthPriceAsk,proto3" json:"bandwidth_price_ask" pg:"bandwidth_price_ask"` + BandwidthPriceEst uint64 `protobuf:"varint,23,opt,name=bandwidth_price_est,json=bandwidthPriceEst,proto3" json:"bandwidth_price_est" pg:"bandwidth_price_est"` + CollateralStake uint64 `protobuf:"varint,24,opt,name=collateral_stake,json=collateralStake,proto3" json:"collateral_stake" pg:"collateral_stake"` + CollateralLost uint64 `protobuf:"varint,25,opt,name=collateral_lost,json=collateralLost,proto3" json:"collateral_lost" pg:"collateral_lost"` + CollateralBurn uint64 `protobuf:"varint,26,opt,name=collateral_burn,json=collateralBurn,proto3" json:"collateral_burn" pg:"collateral_burn"` + CountryShort string `protobuf:"bytes,27,opt,name=country_short,json=countryShort,proto3" json:"country_short" pg:"country_short"` + Node_ExperimentalFlags `protobuf:"bytes,28,opt,name=flg,proto3,embedded=flg" json:"flg" pg:"flg"` + Discovery float32 `protobuf:"fixed32,29,opt,name=discovery,proto3" json:"discovery" pg:"discovery"` + UptimeScore float32 `protobuf:"fixed32,30,opt,name=uptime_score,json=uptimeScore,proto3" json:"uptime_score" pg:"uptime_score"` + AgeScore float32 `protobuf:"fixed32,31,opt,name=age_score,json=ageScore,proto3" json:"age_score" pg:"age_score"` + VersionScore float32 `protobuf:"fixed32,32,opt,name=version_score,json=versionScore,proto3" json:"version_score" pg:"version_score"` + UploadSpeedScore float32 `protobuf:"fixed32,33,opt,name=upload_speed_score,json=uploadSpeedScore,proto3" json:"upload_speed_score" pg:"upload_speed_score"` + DownloadSpeedScore float32 `protobuf:"fixed32,34,opt,name=download_speed_score,json=downloadSpeedScore,proto3" json:"download_speed_score" pg:"download_speed_score"` + Roles []NodeRole `protobuf:"varint,35,rep,packed,name=roles,proto3,enum=score.NodeRole" json:"roles" pg:"roles,array"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` } func (m *Host) Reset() { *m = Host{} } @@ -1047,7 +1089,7 @@ func (m *Host) GetDownloadSpeedScore() float32 { return 0 } -func (m *Host) GetRoles() []node.NodeRole { +func (m *Host) GetRoles() []NodeRole { if m != nil { return m.Roles } @@ -1167,1121 +1209,1470 @@ func (m *Location) GetLon() float64 { func (*Location) XXX_MessageName() string { return "score.Location" } -func init() { - proto.RegisterEnum("score.ResponseCode", ResponseCode_name, ResponseCode_value) - golang_proto.RegisterEnum("score.ResponseCode", ResponseCode_name, ResponseCode_value) - proto.RegisterEnum("score.HostsReq_Mode", HostsReq_Mode_name, HostsReq_Mode_value) - golang_proto.RegisterEnum("score.HostsReq_Mode", HostsReq_Mode_name, HostsReq_Mode_value) - proto.RegisterType((*NodesReq)(nil), "score.NodesReq") - golang_proto.RegisterType((*NodesReq)(nil), "score.NodesReq") - proto.RegisterType((*SettingsReq)(nil), "score.SettingsReq") - golang_proto.RegisterType((*SettingsReq)(nil), "score.SettingsReq") - proto.RegisterType((*SettingsResp)(nil), "score.SettingsResp") - golang_proto.RegisterType((*SettingsResp)(nil), "score.SettingsResp") - proto.RegisterType((*SettingsData)(nil), "score.SettingsData") - golang_proto.RegisterType((*SettingsData)(nil), "score.SettingsData") - proto.RegisterType((*HostsReq)(nil), "score.HostsReq") - golang_proto.RegisterType((*HostsReq)(nil), "score.HostsReq") - proto.RegisterType((*RolesHostsReq)(nil), "score.RolesHostsReq") - golang_proto.RegisterType((*RolesHostsReq)(nil), "score.RolesHostsReq") - proto.RegisterType((*HostsResp)(nil), "score.HostsResp") - golang_proto.RegisterType((*HostsResp)(nil), "score.HostsResp") - proto.RegisterType((*StatsReq)(nil), "score.StatsReq") - golang_proto.RegisterType((*StatsReq)(nil), "score.StatsReq") - proto.RegisterType((*StatsResp)(nil), "score.StatsResp") - golang_proto.RegisterType((*StatsResp)(nil), "score.StatsResp") - proto.RegisterType((*Host)(nil), "score.Host") - golang_proto.RegisterType((*Host)(nil), "score.Host") - proto.RegisterType((*HostsData)(nil), "score.HostsData") - golang_proto.RegisterType((*HostsData)(nil), "score.HostsData") - proto.RegisterType((*Location)(nil), "score.Location") - golang_proto.RegisterType((*Location)(nil), "score.Location") + +type StorageStat struct { + HostStats StorageStat_Host `protobuf:"bytes,1,opt,name=host_stats,json=hostStats,proto3" json:"host_stats" pg:"host_stats"` + RenterStats StorageStat_Renter `protobuf:"bytes,2,opt,name=renter_stats,json=renterStats,proto3" json:"renter_stats" pg:"renter_stats"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` } -func init() { proto.RegisterFile("protos/score/score.proto", fileDescriptor_649f1c1133130df2) } -func init() { golang_proto.RegisterFile("protos/score/score.proto", fileDescriptor_649f1c1133130df2) } +func (m *StorageStat) Reset() { *m = StorageStat{} } +func (m *StorageStat) String() string { return proto.CompactTextString(m) } +func (*StorageStat) ProtoMessage() {} +func (*StorageStat) Descriptor() ([]byte, []int) { + return fileDescriptor_649f1c1133130df2, []int{12} +} +func (m *StorageStat) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StorageStat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StorageStat.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *StorageStat) XXX_Merge(src proto.Message) { + xxx_messageInfo_StorageStat.Merge(m, src) +} +func (m *StorageStat) XXX_Size() int { + return m.Size() +} +func (m *StorageStat) XXX_DiscardUnknown() { + xxx_messageInfo_StorageStat.DiscardUnknown(m) +} -var fileDescriptor_649f1c1133130df2 = []byte{ - // 1512 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcd, 0x6e, 0x1b, 0x47, - 0x12, 0xf6, 0xf0, 0x47, 0x22, 0x8b, 0xa4, 0x48, 0xb5, 0x64, 0x7b, 0x4c, 0x79, 0x49, 0x99, 0xc6, - 0xae, 0xb5, 0x5e, 0x8b, 0xf2, 0x6a, 0xb1, 0x0b, 0xaf, 0xbd, 0x17, 0x51, 0x1a, 0xcb, 0x02, 0x24, - 0x53, 0x3b, 0x43, 0xf9, 0xb0, 0x97, 0xd9, 0x21, 0xa7, 0x45, 0x0d, 0x3c, 0x9c, 0xa6, 0xa7, 0x9b, - 0x72, 0xe4, 0xa7, 0xf0, 0x31, 0xc7, 0x20, 0xc7, 0xbc, 0x43, 0x80, 0x00, 0xb9, 0xf8, 0xe8, 0x53, - 0x8e, 0x76, 0x60, 0x5f, 0x72, 0xce, 0x13, 0x04, 0x5d, 0xdd, 0x43, 0x52, 0x12, 0x03, 0xc4, 0x46, - 0x0e, 0xb9, 0x08, 0xec, 0xaf, 0xbe, 0xaa, 0xa9, 0xae, 0xee, 0xea, 0xaf, 0x04, 0xe6, 0x30, 0x66, - 0x82, 0xf1, 0x0d, 0xde, 0x63, 0x31, 0x55, 0x7f, 0x9b, 0x08, 0x91, 0x2c, 0x2e, 0xaa, 0x8f, 0xfa, - 0x81, 0x38, 0x19, 0x75, 0x9b, 0x3d, 0x36, 0xd8, 0xe8, 0x06, 0x42, 0xb0, 0x38, 0xa6, 0x91, 0xd8, - 0xe8, 0xb3, 0xf5, 0xae, 0x38, 0xe6, 0xeb, 0x3d, 0x36, 0x18, 0xb0, 0x68, 0x43, 0x47, 0x89, 0x98, - 0x4f, 0xf1, 0x8f, 0x8a, 0x51, 0xbd, 0x3f, 0xe5, 0x2c, 0x62, 0x16, 0xad, 0x8f, 0xb8, 0xa2, 0x76, - 0x47, 0xc7, 0x1b, 0x7d, 0xd6, 0x67, 0xb8, 0xc0, 0x5f, 0xda, 0xa3, 0xde, 0x67, 0xac, 0x1f, 0xd2, - 0x09, 0x4b, 0x04, 0x03, 0xca, 0x85, 0x37, 0x18, 0x2a, 0x42, 0xc3, 0x87, 0xdc, 0x53, 0xe6, 0x53, - 0x6e, 0xd3, 0x17, 0xe4, 0x3a, 0xcc, 0xcb, 0x8f, 0xb9, 0x81, 0x6f, 0x1a, 0xab, 0xe9, 0xb5, 0xbc, - 0x3d, 0x27, 0x97, 0x7b, 0x3e, 0xb9, 0x05, 0xc5, 0x98, 0xbe, 0x18, 0x51, 0x2e, 0x68, 0x2c, 0xad, - 0xa9, 0x55, 0x63, 0x2d, 0x6f, 0x17, 0xc6, 0xd8, 0x9e, 0x4f, 0x6e, 0x42, 0x9e, 0x07, 0xfd, 0xc8, - 0x13, 0xa3, 0x98, 0x9a, 0xe9, 0x55, 0x63, 0xad, 0x68, 0x4f, 0x80, 0xc6, 0x43, 0x28, 0x38, 0x54, - 0x88, 0x20, 0xea, 0xe3, 0x87, 0x16, 0x20, 0x85, 0xdf, 0x90, 0x51, 0x52, 0x81, 0x4f, 0x56, 0x20, - 0x1f, 0x53, 0x3e, 0x74, 0x79, 0xf0, 0x8a, 0x62, 0xf0, 0xac, 0x9d, 0x93, 0x80, 0x13, 0xbc, 0xa2, - 0x8d, 0x1f, 0x0c, 0x28, 0x4e, 0x9c, 0xf9, 0x90, 0xdc, 0x81, 0x4c, 0x8f, 0xf9, 0x14, 0xfd, 0x17, - 0x36, 0x97, 0x9a, 0xaa, 0xca, 0xd2, 0xc4, 0x22, 0x4e, 0xb7, 0x99, 0x4f, 0x6d, 0x24, 0x10, 0x13, - 0xe6, 0x07, 0x94, 0x73, 0xaf, 0x4f, 0x75, 0xc6, 0xc9, 0x92, 0xec, 0x41, 0x29, 0xd6, 0x7c, 0x57, - 0x56, 0x04, 0x33, 0x2e, 0x6c, 0x56, 0x9b, 0xaa, 0x5c, 0xcd, 0xa4, 0x5c, 0xcd, 0x4e, 0x52, 0xae, - 0x56, 0xee, 0xcd, 0xbb, 0xfa, 0x95, 0xd7, 0xef, 0xeb, 0x86, 0x5d, 0x4c, 0x5c, 0xa5, 0x91, 0x3c, - 0x80, 0x12, 0xd7, 0xd9, 0xb9, 0xbe, 0x27, 0x3c, 0x33, 0x83, 0xa1, 0x92, 0xb4, 0x92, 0xcc, 0x77, - 0x3c, 0xe1, 0xd9, 0x45, 0x3e, 0xb5, 0x6a, 0xfc, 0x34, 0xb5, 0x31, 0x09, 0x90, 0xbb, 0xb0, 0xc8, - 0x05, 0x8b, 0xbd, 0x3e, 0x75, 0x87, 0x71, 0xd0, 0xa3, 0xae, 0xc7, 0x9f, 0xe3, 0x2e, 0x0d, 0xbb, - 0xac, 0x0d, 0x87, 0x12, 0xdf, 0xe2, 0xcf, 0x49, 0x13, 0x96, 0xba, 0x5e, 0xe4, 0xbf, 0x0c, 0x7c, - 0x71, 0x32, 0xc5, 0x4e, 0x21, 0x7b, 0x71, 0x6c, 0x1a, 0xf3, 0xd7, 0xa0, 0x92, 0xc4, 0x96, 0x1b, - 0x76, 0x07, 0x41, 0x84, 0x9b, 0x36, 0xec, 0x05, 0x8d, 0xcb, 0xdd, 0x1c, 0x04, 0x11, 0xb9, 0x03, - 0xe5, 0x49, 0xe4, 0x30, 0x18, 0x04, 0x02, 0xb7, 0x64, 0xd8, 0x0b, 0x63, 0x78, 0x5f, 0xa2, 0xe4, - 0xaf, 0x50, 0xe9, 0xb1, 0x30, 0xf4, 0x04, 0x8d, 0xbd, 0xd0, 0xe5, 0xc2, 0x7b, 0x4e, 0xcd, 0xac, - 0xca, 0x76, 0x82, 0x3b, 0x12, 0x6e, 0x7c, 0x6f, 0x40, 0xee, 0x09, 0xe3, 0xe2, 0x93, 0x4f, 0x9f, - 0xac, 0x41, 0x66, 0x20, 0x0f, 0x3b, 0x8d, 0x87, 0xbd, 0xac, 0xab, 0x9a, 0xc4, 0x6a, 0x1e, 0xe0, - 0x69, 0x0f, 0xf4, 0x69, 0x9f, 0xd2, 0x98, 0x07, 0x2c, 0xc2, 0x7c, 0xf3, 0x76, 0xb2, 0x6c, 0x3c, - 0x86, 0x8c, 0xe4, 0x91, 0x3c, 0x64, 0x9d, 0xed, 0xb6, 0x6d, 0x55, 0xae, 0x90, 0x79, 0x48, 0xef, - 0x5a, 0xed, 0x8a, 0x21, 0x7f, 0xd8, 0xd6, 0x61, 0x25, 0x25, 0x8d, 0x87, 0xf6, 0xde, 0xb6, 0x55, - 0x49, 0x23, 0xef, 0xd0, 0xb2, 0x76, 0x2a, 0x19, 0x52, 0x80, 0xf9, 0x8e, 0xe5, 0x74, 0x9e, 0x5a, - 0x9d, 0x4a, 0xb6, 0xf1, 0x7f, 0x28, 0xd9, 0x2c, 0xa4, 0xfc, 0xf3, 0x76, 0xd2, 0x80, 0x4c, 0xcc, - 0xc2, 0x64, 0x27, 0x0b, 0x4d, 0xec, 0x6b, 0xd9, 0x7b, 0x32, 0xa6, 0x8d, 0xb6, 0xc6, 0xcf, 0x06, - 0xe4, 0x75, 0xf4, 0xdf, 0xe7, 0xa2, 0xff, 0x05, 0xb2, 0x27, 0x32, 0x9e, 0xbe, 0xe0, 0x95, 0xe9, - 0xfa, 0xe1, 0x95, 0x54, 0xe6, 0xf3, 0x99, 0x67, 0x2e, 0x64, 0x4e, 0xf4, 0x19, 0x64, 0x31, 0xb6, - 0xaa, 0xf6, 0xa5, 0x0e, 0x9a, 0xfb, 0xdc, 0x0e, 0x6a, 0x54, 0x21, 0xe7, 0x08, 0x6f, 0x66, 0x45, - 0x65, 0xf3, 0xe7, 0xb5, 0xf1, 0x0f, 0xd7, 0xf9, 0x8f, 0x20, 0xcb, 0x65, 0x6a, 0xba, 0xe3, 0x57, - 0xd4, 0x89, 0x3a, 0xaa, 0x9b, 0x64, 0xd2, 0x58, 0x66, 0xcc, 0x5e, 0xc5, 0x78, 0xfb, 0xae, 0x6e, - 0xd8, 0xca, 0xa7, 0xf1, 0x6d, 0x01, 0x32, 0xd2, 0x7c, 0xfe, 0xd1, 0x35, 0xa6, 0x1e, 0xdd, 0x36, - 0x54, 0x7a, 0x31, 0xf5, 0x84, 0xca, 0x13, 0x53, 0xc1, 0xcd, 0xfc, 0xd6, 0x64, 0xcb, 0xca, 0x7b, - 0x6c, 0x92, 0x01, 0x47, 0x43, 0xff, 0x7c, 0xc0, 0x4f, 0xd9, 0x7d, 0x59, 0x79, 0x4f, 0x02, 0x5e, - 0x83, 0xb9, 0x98, 0xf6, 0x27, 0x0d, 0xa7, 0x57, 0x52, 0x2e, 0xa4, 0x98, 0xb9, 0x49, 0x3b, 0xaa, - 0x7b, 0x53, 0x90, 0xd8, 0x33, 0x05, 0x91, 0x65, 0x50, 0x7a, 0x88, 0xd7, 0x26, 0x65, 0xab, 0x05, - 0xa9, 0x43, 0xe1, 0x84, 0x7a, 0xb1, 0x70, 0xbb, 0x54, 0xd6, 0x75, 0x7e, 0xd5, 0x58, 0xcb, 0xd8, - 0x80, 0x50, 0x4b, 0x22, 0xf2, 0x8b, 0xa3, 0x21, 0x1e, 0x5b, 0x0e, 0xfd, 0xf4, 0x8a, 0x54, 0x20, - 0x2d, 0xcf, 0x3a, 0x8f, 0x0e, 0xf2, 0x27, 0xa9, 0x01, 0xc4, 0x74, 0x38, 0x12, 0x9e, 0x90, 0x19, - 0x00, 0xb2, 0xa7, 0x10, 0xf2, 0x67, 0x58, 0x18, 0x0d, 0x43, 0xe6, 0xf9, 0xae, 0x77, 0x4a, 0xe5, - 0x81, 0x99, 0x05, 0xe4, 0x94, 0x14, 0xba, 0xa5, 0x40, 0xf9, 0x18, 0x6a, 0xda, 0xa9, 0x17, 0x07, - 0x5e, 0xd4, 0xa3, 0x66, 0x11, 0x79, 0xda, 0xfb, 0x99, 0x46, 0xe5, 0x63, 0xe8, 0xb3, 0x97, 0xd1, - 0xb9, 0x88, 0x25, 0x64, 0x96, 0x13, 0x3c, 0x89, 0xf9, 0x37, 0x58, 0x1c, 0x53, 0xc7, 0x51, 0x17, - 0x90, 0x3b, 0x8e, 0x31, 0x8e, 0xfb, 0x77, 0xc8, 0x85, 0xac, 0xa7, 0x76, 0x51, 0xc6, 0xc3, 0x2a, - 0xeb, 0x6b, 0xbf, 0xaf, 0xe1, 0x56, 0x46, 0x9e, 0x90, 0x3d, 0xa6, 0x91, 0x7b, 0x40, 0x92, 0xa7, - 0xfe, 0x94, 0x85, 0xa3, 0x01, 0x75, 0x7b, 0xde, 0xd0, 0xac, 0xa8, 0x0f, 0x68, 0xcb, 0x33, 0x34, - 0x6c, 0x7b, 0x43, 0x29, 0x24, 0x17, 0xd8, 0x21, 0x3d, 0x16, 0xe6, 0x22, 0xd2, 0x17, 0xcf, 0xd1, - 0xf7, 0xe9, 0xb1, 0x98, 0x29, 0x24, 0x04, 0xeb, 0x7e, 0x51, 0x48, 0x66, 0xca, 0xd9, 0x12, 0x52, - 0x2f, 0xc9, 0xd9, 0x25, 0x2e, 0xe5, 0xc2, 0x5c, 0xbe, 0xcc, 0xb5, 0xb8, 0x98, 0x25, 0x50, 0x57, - 0x67, 0x0a, 0xd4, 0xaf, 0x68, 0xe4, 0x35, 0x0c, 0x3b, 0x43, 0x23, 0x67, 0xf0, 0x65, 0x1a, 0xd7, - 0x67, 0xf1, 0x65, 0x22, 0xb3, 0x04, 0xd0, 0x54, 0x39, 0x5f, 0x10, 0x40, 0x99, 0xf3, 0x14, 0x35, - 0x64, 0x5c, 0x98, 0x37, 0x54, 0xd1, 0x26, 0xf0, 0x3e, 0x53, 0x9b, 0x9b, 0x22, 0x76, 0x47, 0x71, - 0x64, 0x56, 0x2f, 0x12, 0x5b, 0xa3, 0x38, 0x22, 0xb7, 0xa1, 0xd4, 0x63, 0xa3, 0x48, 0xc4, 0x67, - 0x2e, 0x3f, 0x61, 0xb1, 0x30, 0x57, 0xb0, 0xcb, 0x8a, 0x1a, 0x74, 0x24, 0x46, 0x1e, 0x40, 0xfa, - 0x38, 0xec, 0x9b, 0x37, 0xf1, 0xe2, 0xdc, 0x9c, 0x48, 0x4e, 0xd3, 0xfa, 0x62, 0x48, 0xe3, 0x60, - 0x40, 0x23, 0xe1, 0x85, 0x8f, 0x43, 0xaf, 0x3f, 0xfd, 0x42, 0x49, 0x17, 0x39, 0xcf, 0xf9, 0x01, - 0xef, 0xb1, 0x53, 0x1a, 0x9f, 0x99, 0x7f, 0xc2, 0xcb, 0x30, 0x01, 0x64, 0x87, 0xab, 0xce, 0x73, - 0x55, 0x17, 0xd7, 0x90, 0x50, 0x50, 0x98, 0x83, 0xbd, 0xbc, 0x02, 0x79, 0x79, 0x9a, 0xca, 0x5e, - 0x47, 0x7b, 0x4e, 0xbe, 0x8b, 0x68, 0xbc, 0x0d, 0x25, 0xfd, 0x38, 0x68, 0xc2, 0x2a, 0x12, 0x8a, - 0x1a, 0x54, 0xa4, 0x7b, 0x40, 0x74, 0xef, 0xf1, 0x21, 0xa5, 0xbe, 0x66, 0xde, 0x52, 0xf7, 0x58, - 0x59, 0x1c, 0x69, 0x50, 0xec, 0xfb, 0xb0, 0x3c, 0xee, 0xaa, 0x69, 0x7e, 0x03, 0xf9, 0x24, 0xb1, - 0x4d, 0x79, 0xfc, 0x13, 0xb2, 0x52, 0x74, 0xb9, 0x79, 0x7b, 0x35, 0x7d, 0x59, 0x91, 0x5b, 0xe5, - 0x6f, 0xde, 0xd7, 0x0b, 0x48, 0xb8, 0xe7, 0xc5, 0xb1, 0x77, 0x66, 0x2b, 0xf6, 0xc3, 0xcc, 0x57, - 0x5f, 0xd7, 0x8d, 0x46, 0x53, 0x0b, 0x35, 0x0e, 0x6e, 0xb7, 0x12, 0x95, 0x95, 0x63, 0x73, 0x61, - 0xb3, 0x30, 0xa5, 0xb2, 0x5a, 0x60, 0x1b, 0x4d, 0xc8, 0x25, 0x0d, 0x2b, 0x5f, 0xab, 0xd0, 0x13, - 0x7a, 0xb2, 0x93, 0x3f, 0x11, 0x61, 0x91, 0x9e, 0xde, 0xe4, 0xcf, 0xbb, 0xa7, 0x50, 0x9c, 0xd6, - 0x35, 0x39, 0x88, 0x38, 0x47, 0xdb, 0xdb, 0x96, 0xe3, 0x54, 0xae, 0x90, 0x2a, 0x5c, 0x73, 0xf6, - 0x76, 0x9f, 0x6e, 0x75, 0x8e, 0x6c, 0xcb, 0x7d, 0xdc, 0xb6, 0x0f, 0xb6, 0x3a, 0xae, 0x65, 0xdb, - 0x6d, 0xbb, 0x62, 0x90, 0x1b, 0x70, 0x75, 0xbb, 0x7d, 0x70, 0x78, 0xd4, 0xb1, 0xdc, 0xad, 0x9d, - 0x1d, 0xdb, 0x72, 0x1c, 0x6d, 0x4a, 0x91, 0x45, 0x28, 0x75, 0xf6, 0x0e, 0xac, 0xf6, 0x51, 0xc2, - 0x4e, 0x93, 0x32, 0x14, 0xda, 0x9d, 0x27, 0x96, 0xad, 0x81, 0xe5, 0xcd, 0xd7, 0x29, 0x28, 0x62, - 0x79, 0x1c, 0x1a, 0x9f, 0x06, 0x3d, 0x4a, 0xfe, 0x05, 0x85, 0x5d, 0x2a, 0x92, 0x39, 0x95, 0x90, - 0x0b, 0x73, 0xad, 0x4d, 0x5f, 0x54, 0x97, 0x2e, 0x61, 0x7c, 0x48, 0xd6, 0x21, 0xb7, 0x4b, 0x05, - 0xd6, 0x88, 0x94, 0x2f, 0x8c, 0x6d, 0xd5, 0xca, 0x79, 0x60, 0x4c, 0x47, 0xb1, 0x1c, 0xd3, 0x93, - 0xa9, 0x60, 0x4c, 0x9f, 0x4c, 0x02, 0x1b, 0x00, 0xff, 0x1d, 0xd1, 0xf8, 0x0c, 0xff, 0x77, 0x19, - 0x3b, 0x24, 0xff, 0xc9, 0xcc, 0x88, 0xff, 0x6f, 0x28, 0x27, 0xe9, 0xb4, 0xce, 0x70, 0x8a, 0x23, - 0xc9, 0x30, 0x79, 0x6e, 0xa6, 0xbb, 0xec, 0xda, 0xfa, 0xcf, 0x9b, 0x0f, 0x35, 0xe3, 0xed, 0x87, - 0x9a, 0xf1, 0xe3, 0x87, 0x9a, 0xf1, 0xe5, 0xc7, 0x9a, 0xf1, 0xdd, 0xc7, 0x9a, 0xf1, 0xe6, 0x63, - 0xcd, 0x80, 0x52, 0xc0, 0x9a, 0x52, 0xd5, 0x94, 0x4b, 0x0b, 0xb0, 0x70, 0x87, 0x52, 0x43, 0x0f, - 0x8d, 0xff, 0x29, 0x4d, 0xeb, 0xce, 0xa1, 0xa6, 0xfe, 0xe3, 0x97, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x7b, 0x09, 0x59, 0x6c, 0x1a, 0x0e, 0x00, 0x00, +var xxx_messageInfo_StorageStat proto.InternalMessageInfo + +func (m *StorageStat) GetHostStats() StorageStat_Host { + if m != nil { + return m.HostStats + } + return StorageStat_Host{} } -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn +func (m *StorageStat) GetRenterStats() StorageStat_Renter { + if m != nil { + return m.RenterStats + } + return StorageStat_Renter{} +} + +func (*StorageStat) XXX_MessageName() string { + return "score.StorageStat" +} + +type StorageStat_HostStats struct { + Uptime float32 `protobuf:"fixed32,1,opt,name=uptime,proto3" json:"uptime" pg:"uptime"` + Score float32 `protobuf:"fixed32,2,opt,name=score,proto3" json:"score" pg:"score"` + UptimeScore float32 `protobuf:"fixed32,3,opt,name=uptime_score,json=uptimeScore,proto3" json:"uptime_score" pg:"uptime_score"` + AgeScore float32 `protobuf:"fixed32,4,opt,name=age_score,json=ageScore,proto3" json:"age_score" pg:"age_score"` + VersionScore float32 `protobuf:"fixed32,5,opt,name=version_score,json=versionScore,proto3" json:"version_score" pg:"version_score"` + SpeedScore float32 `protobuf:"fixed32,6,opt,name=speed_score,json=speedScore,proto3" json:"speed_score" pg:"speed_score"` + UploadSpeedScore float32 `protobuf:"fixed32,7,opt,name=upload_speed_score,json=uploadSpeedScore,proto3" json:"upload_speed_score" pg:"upload_speed_score"` + DownloadSpeedScore float32 `protobuf:"fixed32,8,opt,name=download_speed_score,json=downloadSpeedScore,proto3" json:"download_speed_score" pg:"download_speed_score"` + UptimeWeight float32 `protobuf:"fixed32,9,opt,name=uptime_weight,json=uptimeWeight,proto3" json:"uptime_weight" pg:"uptime_weight"` + AgeWeight float32 `protobuf:"fixed32,10,opt,name=age_weight,json=ageWeight,proto3" json:"age_weight" pg:"age_weight"` + VersionWeight float32 `protobuf:"fixed32,11,opt,name=version_weight,json=versionWeight,proto3" json:"version_weight" pg:"version_weight"` + SpeedWeight float32 `protobuf:"fixed32,12,opt,name=speed_weight,json=speedWeight,proto3" json:"speed_weight" pg:"speed_weight"` + UploadSpeedWeight float32 `protobuf:"fixed32,13,opt,name=upload_speed_weight,json=uploadSpeedWeight,proto3" json:"upload_speed_weight" pg:"upload_speed_weight"` + DownloadSpeedWeight float32 `protobuf:"fixed32,14,opt,name=download_speed_weight,json=downloadSpeedWeight,proto3" json:"download_speed_weight" pg:"download_speed_weight"` + LastUpdated time.Time `protobuf:"bytes,15,opt,name=last_updated,json=lastUpdated,proto3,stdtime" json:"last_updated" pg:"last_updated"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *StorageStat_HostStats) Reset() { *m = StorageStat_HostStats{} } +func (m *StorageStat_HostStats) String() string { return proto.CompactTextString(m) } +func (*StorageStat_HostStats) ProtoMessage() {} +func (*StorageStat_HostStats) Descriptor() ([]byte, []int) { + return fileDescriptor_649f1c1133130df2, []int{12, 0} +} +func (m *StorageStat_HostStats) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StorageStat_HostStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StorageStat_HostStats.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *StorageStat_HostStats) XXX_Merge(src proto.Message) { + xxx_messageInfo_StorageStat_HostStats.Merge(m, src) +} +func (m *StorageStat_HostStats) XXX_Size() int { + return m.Size() +} +func (m *StorageStat_HostStats) XXX_DiscardUnknown() { + xxx_messageInfo_StorageStat_HostStats.DiscardUnknown(m) +} -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 +var xxx_messageInfo_StorageStat_HostStats proto.InternalMessageInfo -// ScoreServiceClient is the client API for ScoreService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ScoreServiceClient interface { - GetSettings(ctx context.Context, in *SettingsReq, opts ...grpc.CallOption) (*SettingsResp, error) - GetHosts(ctx context.Context, in *HostsReq, opts ...grpc.CallOption) (*HostsResp, error) - GetStats(ctx context.Context, in *StatsReq, opts ...grpc.CallOption) (*StatsResp, error) - QueryNodes(ctx context.Context, in *NodesReq, opts ...grpc.CallOption) (*HostsResp, error) - GetHostsByRoles(ctx context.Context, in *RolesHostsReq, opts ...grpc.CallOption) (*HostsResp, error) +func (m *StorageStat_HostStats) GetUptime() float32 { + if m != nil { + return m.Uptime + } + return 0 } -type scoreServiceClient struct { - cc *grpc.ClientConn +func (m *StorageStat_HostStats) GetScore() float32 { + if m != nil { + return m.Score + } + return 0 } -func NewScoreServiceClient(cc *grpc.ClientConn) ScoreServiceClient { - return &scoreServiceClient{cc} +func (m *StorageStat_HostStats) GetUptimeScore() float32 { + if m != nil { + return m.UptimeScore + } + return 0 } -func (c *scoreServiceClient) GetSettings(ctx context.Context, in *SettingsReq, opts ...grpc.CallOption) (*SettingsResp, error) { - out := new(SettingsResp) - err := c.cc.Invoke(ctx, "/score.ScoreService/GetSettings", in, out, opts...) - if err != nil { - return nil, err +func (m *StorageStat_HostStats) GetAgeScore() float32 { + if m != nil { + return m.AgeScore } - return out, nil + return 0 } -func (c *scoreServiceClient) GetHosts(ctx context.Context, in *HostsReq, opts ...grpc.CallOption) (*HostsResp, error) { - out := new(HostsResp) - err := c.cc.Invoke(ctx, "/score.ScoreService/GetHosts", in, out, opts...) - if err != nil { - return nil, err +func (m *StorageStat_HostStats) GetVersionScore() float32 { + if m != nil { + return m.VersionScore } - return out, nil + return 0 } -func (c *scoreServiceClient) GetStats(ctx context.Context, in *StatsReq, opts ...grpc.CallOption) (*StatsResp, error) { - out := new(StatsResp) - err := c.cc.Invoke(ctx, "/score.ScoreService/GetStats", in, out, opts...) - if err != nil { - return nil, err +func (m *StorageStat_HostStats) GetSpeedScore() float32 { + if m != nil { + return m.SpeedScore } - return out, nil + return 0 } -func (c *scoreServiceClient) QueryNodes(ctx context.Context, in *NodesReq, opts ...grpc.CallOption) (*HostsResp, error) { - out := new(HostsResp) - err := c.cc.Invoke(ctx, "/score.ScoreService/QueryNodes", in, out, opts...) - if err != nil { - return nil, err +func (m *StorageStat_HostStats) GetUploadSpeedScore() float32 { + if m != nil { + return m.UploadSpeedScore } - return out, nil + return 0 } -func (c *scoreServiceClient) GetHostsByRoles(ctx context.Context, in *RolesHostsReq, opts ...grpc.CallOption) (*HostsResp, error) { - out := new(HostsResp) - err := c.cc.Invoke(ctx, "/score.ScoreService/GetHostsByRoles", in, out, opts...) - if err != nil { - return nil, err +func (m *StorageStat_HostStats) GetDownloadSpeedScore() float32 { + if m != nil { + return m.DownloadSpeedScore } - return out, nil + return 0 } -// ScoreServiceServer is the server API for ScoreService service. -type ScoreServiceServer interface { - GetSettings(context.Context, *SettingsReq) (*SettingsResp, error) - GetHosts(context.Context, *HostsReq) (*HostsResp, error) - GetStats(context.Context, *StatsReq) (*StatsResp, error) - QueryNodes(context.Context, *NodesReq) (*HostsResp, error) - GetHostsByRoles(context.Context, *RolesHostsReq) (*HostsResp, error) +func (m *StorageStat_HostStats) GetUptimeWeight() float32 { + if m != nil { + return m.UptimeWeight + } + return 0 } -// UnimplementedScoreServiceServer can be embedded to have forward compatible implementations. -type UnimplementedScoreServiceServer struct { +func (m *StorageStat_HostStats) GetAgeWeight() float32 { + if m != nil { + return m.AgeWeight + } + return 0 } -func (*UnimplementedScoreServiceServer) GetSettings(ctx context.Context, req *SettingsReq) (*SettingsResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSettings not implemented") +func (m *StorageStat_HostStats) GetVersionWeight() float32 { + if m != nil { + return m.VersionWeight + } + return 0 } -func (*UnimplementedScoreServiceServer) GetHosts(ctx context.Context, req *HostsReq) (*HostsResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetHosts not implemented") + +func (m *StorageStat_HostStats) GetSpeedWeight() float32 { + if m != nil { + return m.SpeedWeight + } + return 0 } -func (*UnimplementedScoreServiceServer) GetStats(ctx context.Context, req *StatsReq) (*StatsResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetStats not implemented") + +func (m *StorageStat_HostStats) GetUploadSpeedWeight() float32 { + if m != nil { + return m.UploadSpeedWeight + } + return 0 } -func (*UnimplementedScoreServiceServer) QueryNodes(ctx context.Context, req *NodesReq) (*HostsResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method QueryNodes not implemented") + +func (m *StorageStat_HostStats) GetDownloadSpeedWeight() float32 { + if m != nil { + return m.DownloadSpeedWeight + } + return 0 } -func (*UnimplementedScoreServiceServer) GetHostsByRoles(ctx context.Context, req *RolesHostsReq) (*HostsResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetHostsByRoles not implemented") + +func (m *StorageStat_HostStats) GetLastUpdated() time.Time { + if m != nil { + return m.LastUpdated + } + return time.Time{} } -func RegisterScoreServiceServer(s *grpc.Server, srv ScoreServiceServer) { - s.RegisterService(&_ScoreService_serviceDesc, srv) +func (*StorageStat_HostStats) XXX_MessageName() string { + return "score.StorageStat.HostStats" } -func _ScoreService_GetSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SettingsReq) - if err := dec(in); err != nil { - return nil, err +type StorageStat_Host struct { + Online bool `protobuf:"varint,1,opt,name=online,proto3" json:"online" pg:"online"` + StorageUsed int64 `protobuf:"varint,2,opt,name=storage_used,json=storageUsed,proto3" json:"storage_used" pg:"storage_used"` + StorageCap int64 `protobuf:"varint,3,opt,name=storage_cap,json=storageCap,proto3" json:"storage_cap" pg:"storage_cap"` + StorageDiskTotal int64 `protobuf:"varint,4,opt,name=storage_disk_total,json=storageDiskTotal,proto3" json:"storage_disk_total" pg:"storage_disk_total"` + StorageDiskAvailable int64 `protobuf:"varint,5,opt,name=storage_disk_available,json=storageDiskAvailable,proto3" json:"storage_disk_available" pg:"storage_disk_available"` + StorageStat_HostStats `protobuf:"bytes,6,opt,name=stats,proto3,embedded=stats" json:"" pg:""` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *StorageStat_Host) Reset() { *m = StorageStat_Host{} } +func (m *StorageStat_Host) String() string { return proto.CompactTextString(m) } +func (*StorageStat_Host) ProtoMessage() {} +func (*StorageStat_Host) Descriptor() ([]byte, []int) { + return fileDescriptor_649f1c1133130df2, []int{12, 1} +} +func (m *StorageStat_Host) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StorageStat_Host) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StorageStat_Host.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - if interceptor == nil { - return srv.(ScoreServiceServer).GetSettings(ctx, in) +} +func (m *StorageStat_Host) XXX_Merge(src proto.Message) { + xxx_messageInfo_StorageStat_Host.Merge(m, src) +} +func (m *StorageStat_Host) XXX_Size() int { + return m.Size() +} +func (m *StorageStat_Host) XXX_DiscardUnknown() { + xxx_messageInfo_StorageStat_Host.DiscardUnknown(m) +} + +var xxx_messageInfo_StorageStat_Host proto.InternalMessageInfo + +func (m *StorageStat_Host) GetOnline() bool { + if m != nil { + return m.Online } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/score.ScoreService/GetSettings", + return false +} + +func (m *StorageStat_Host) GetStorageUsed() int64 { + if m != nil { + return m.StorageUsed } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ScoreServiceServer).GetSettings(ctx, req.(*SettingsReq)) + return 0 +} + +func (m *StorageStat_Host) GetStorageCap() int64 { + if m != nil { + return m.StorageCap } - return interceptor(ctx, in, info, handler) + return 0 } -func _ScoreService_GetHosts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(HostsReq) - if err := dec(in); err != nil { - return nil, err +func (m *StorageStat_Host) GetStorageDiskTotal() int64 { + if m != nil { + return m.StorageDiskTotal } - if interceptor == nil { - return srv.(ScoreServiceServer).GetHosts(ctx, in) + return 0 +} + +func (m *StorageStat_Host) GetStorageDiskAvailable() int64 { + if m != nil { + return m.StorageDiskAvailable } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/score.ScoreService/GetHosts", + return 0 +} + +func (*StorageStat_Host) XXX_MessageName() string { + return "score.StorageStat.Host" +} + +type StorageStat_Renter struct { + Reserved string `protobuf:"bytes,1,opt,name=reserved,proto3" json:"reserved" pg:"reserved"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *StorageStat_Renter) Reset() { *m = StorageStat_Renter{} } +func (m *StorageStat_Renter) String() string { return proto.CompactTextString(m) } +func (*StorageStat_Renter) ProtoMessage() {} +func (*StorageStat_Renter) Descriptor() ([]byte, []int) { + return fileDescriptor_649f1c1133130df2, []int{12, 2} +} +func (m *StorageStat_Renter) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StorageStat_Renter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StorageStat_Renter.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ScoreServiceServer).GetHosts(ctx, req.(*HostsReq)) +} +func (m *StorageStat_Renter) XXX_Merge(src proto.Message) { + xxx_messageInfo_StorageStat_Renter.Merge(m, src) +} +func (m *StorageStat_Renter) XXX_Size() int { + return m.Size() +} +func (m *StorageStat_Renter) XXX_DiscardUnknown() { + xxx_messageInfo_StorageStat_Renter.DiscardUnknown(m) +} + +var xxx_messageInfo_StorageStat_Renter proto.InternalMessageInfo + +func (m *StorageStat_Renter) GetReserved() string { + if m != nil { + return m.Reserved } - return interceptor(ctx, in, info, handler) + return "" } -func _ScoreService_GetStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(StatsReq) - if err := dec(in); err != nil { - return nil, err +func (*StorageStat_Renter) XXX_MessageName() string { + return "score.StorageStat.Renter" +} + +type Node struct { + tableName string `pg:"node_metrics,alias:t,discard_unknown_columns"` + NodeId string `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty" pg:"node_id"` + BtfsVersion string `protobuf:"bytes,3,opt,name=btfs_version,json=btfsVersion,proto3" json:"btfs_version,omitempty" pg:"btfs_version"` + UpTime uint64 `protobuf:"varint,4,opt,name=up_time,json=upTime,proto3" json:"up_time,omitempty" pg:"up_time"` + StorageUsed uint64 `protobuf:"varint,5,opt,name=storage_used,json=storageUsed,proto3" json:"storage_used,omitempty" pg:"storage_used"` + StorageVolumeCap uint64 `protobuf:"varint,6,opt,name=storage_volume_cap,json=storageVolumeCap,proto3" json:"storage_volume_cap,omitempty" pg:"storage_volume_cap"` + MemoryUsed uint64 `protobuf:"varint,7,opt,name=memory_used,json=memoryUsed,proto3" json:"memory_used,omitempty" pg:"memory_used"` + CpuUsed float64 `protobuf:"fixed64,8,opt,name=cpu_used,json=cpuUsed,proto3" json:"cpu_used,omitempty" pg:"cpu_used"` + Upload uint64 `protobuf:"varint,9,opt,name=upload,proto3" json:"upload,omitempty" pg:"upload"` + Download uint64 `protobuf:"varint,10,opt,name=download,proto3" json:"download,omitempty" pg:"download"` + TotalUpload uint64 `protobuf:"varint,11,opt,name=total_upload,json=totalUpload,proto3" json:"total_upload,omitempty" pg:"total_upload"` + TotalDownload uint64 `protobuf:"varint,12,opt,name=total_download,json=totalDownload,proto3" json:"total_download,omitempty" pg:"total_download"` + StoragePriceDeal uint64 `protobuf:"varint,13,opt,name=storage_price_deal,json=storagePriceDeal,proto3" json:"storage_price_deal,omitempty" pg:"storage_price_deal"` + BandwidthPriceDeal uint64 `protobuf:"varint,14,opt,name=bandwidth_price_deal,json=bandwidthPriceDeal,proto3" json:"bandwidth_price_deal,omitempty" pg:"bandwidth_price_deal"` + Node_Settings `protobuf:"bytes,15,opt,name=settings,proto3,embedded=settings" json:"settings" pg:"settings"` + Reputation float64 `protobuf:"fixed64,16,opt,name=reputation,proto3" json:"reputation,omitempty" pg:"reputation"` + BlocksUp uint64 `protobuf:"varint,17,opt,name=blocks_up,json=blocksUp,proto3" json:"blocks_up,omitempty" pg:"blocks_up"` + BlocksDown uint64 `protobuf:"varint,18,opt,name=blocks_down,json=blocksDown,proto3" json:"blocks_down,omitempty" pg:"blocks_down"` + OsType string `protobuf:"bytes,19,opt,name=os_type,json=osType,proto3" json:"os_type,omitempty" pg:"os_type"` + ArchType string `protobuf:"bytes,20,opt,name=arch_type,json=archType,proto3" json:"arch_type,omitempty" pg:"arch_type"` + CpuInfo string `protobuf:"bytes,21,opt,name=cpu_info,json=cpuInfo,proto3" json:"cpu_info,omitempty" pg:"cpu_info"` + PeersConnected uint64 `protobuf:"varint,23,opt,name=peers_connected,json=peersConnected,proto3" json:"peers_connected,omitempty" pg:"peers_connected"` + TimeCreated time.Time `protobuf:"bytes,24,opt,name=time_created,json=timeCreated,proto3,stdtime" json:"time_created" pg:"time_created"` + HVal string `protobuf:"bytes,25,opt,name=h_val,json=hVal,proto3" json:"h_val,omitempty" pg:"h_val"` + Node_Geo `protobuf:"bytes,26,opt,name=geo,proto3,embedded=geo" json:"geo" pg:"geo"` + Node_ExperimentalFlags `protobuf:"bytes,27,opt,name=flg,proto3,embedded=flg" json:"flg" pg:"flg"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *Node) Reset() { *m = Node{} } +func (m *Node) String() string { return proto.CompactTextString(m) } +func (*Node) ProtoMessage() {} +func (*Node) Descriptor() ([]byte, []int) { + return fileDescriptor_649f1c1133130df2, []int{13} +} +func (m *Node) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Node.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - if interceptor == nil { - return srv.(ScoreServiceServer).GetStats(ctx, in) +} +func (m *Node) XXX_Merge(src proto.Message) { + xxx_messageInfo_Node.Merge(m, src) +} +func (m *Node) XXX_Size() int { + return m.Size() +} +func (m *Node) XXX_DiscardUnknown() { + xxx_messageInfo_Node.DiscardUnknown(m) +} + +var xxx_messageInfo_Node proto.InternalMessageInfo + +func (m *Node) GettableName() string { + if m != nil { + return m.tableName } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/score.ScoreService/GetStats", + return "" +} + +func (m *Node) GetNodeId() string { + if m != nil { + return m.NodeId } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ScoreServiceServer).GetStats(ctx, req.(*StatsReq)) + return "" +} + +func (m *Node) GetBtfsVersion() string { + if m != nil { + return m.BtfsVersion } - return interceptor(ctx, in, info, handler) + return "" } -func _ScoreService_QueryNodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(NodesReq) - if err := dec(in); err != nil { - return nil, err +func (m *Node) GetUpTime() uint64 { + if m != nil { + return m.UpTime } - if interceptor == nil { - return srv.(ScoreServiceServer).QueryNodes(ctx, in) + return 0 +} + +func (m *Node) GetStorageUsed() uint64 { + if m != nil { + return m.StorageUsed } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/score.ScoreService/QueryNodes", + return 0 +} + +func (m *Node) GetStorageVolumeCap() uint64 { + if m != nil { + return m.StorageVolumeCap } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ScoreServiceServer).QueryNodes(ctx, req.(*NodesReq)) + return 0 +} + +func (m *Node) GetMemoryUsed() uint64 { + if m != nil { + return m.MemoryUsed } - return interceptor(ctx, in, info, handler) + return 0 } -func _ScoreService_GetHostsByRoles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RolesHostsReq) - if err := dec(in); err != nil { - return nil, err +func (m *Node) GetCpuUsed() float64 { + if m != nil { + return m.CpuUsed } - if interceptor == nil { - return srv.(ScoreServiceServer).GetHostsByRoles(ctx, in) + return 0 +} + +func (m *Node) GetUpload() uint64 { + if m != nil { + return m.Upload } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/score.ScoreService/GetHostsByRoles", + return 0 +} + +func (m *Node) GetDownload() uint64 { + if m != nil { + return m.Download } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ScoreServiceServer).GetHostsByRoles(ctx, req.(*RolesHostsReq)) + return 0 +} + +func (m *Node) GetTotalUpload() uint64 { + if m != nil { + return m.TotalUpload } - return interceptor(ctx, in, info, handler) + return 0 } -var _ScoreService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "score.ScoreService", - HandlerType: (*ScoreServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetSettings", - Handler: _ScoreService_GetSettings_Handler, - }, - { - MethodName: "GetHosts", - Handler: _ScoreService_GetHosts_Handler, - }, - { - MethodName: "GetStats", - Handler: _ScoreService_GetStats_Handler, - }, - { - MethodName: "QueryNodes", - Handler: _ScoreService_QueryNodes_Handler, - }, - { - MethodName: "GetHostsByRoles", - Handler: _ScoreService_GetHostsByRoles_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "protos/score/score.proto", +func (m *Node) GetTotalDownload() uint64 { + if m != nil { + return m.TotalDownload + } + return 0 } -func (m *NodesReq) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *Node) GetStoragePriceDeal() uint64 { + if m != nil { + return m.StoragePriceDeal } - return dAtA[:n], nil + return 0 } -func (m *NodesReq) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *Node) GetBandwidthPriceDeal() uint64 { + if m != nil { + return m.BandwidthPriceDeal + } + return 0 } -func (m *NodesReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) +func (m *Node) GetReputation() float64 { + if m != nil { + return m.Reputation } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintScore(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x1a + return 0 +} + +func (m *Node) GetBlocksUp() uint64 { + if m != nil { + return m.BlocksUp } - if len(m.RequesterId) > 0 { - i -= len(m.RequesterId) - copy(dAtA[i:], m.RequesterId) - i = encodeVarintScore(dAtA, i, uint64(len(m.RequesterId))) - i-- - dAtA[i] = 0x12 + return 0 +} + +func (m *Node) GetBlocksDown() uint64 { + if m != nil { + return m.BlocksDown } - if len(m.NodeId) > 0 { - for iNdEx := len(m.NodeId) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.NodeId[iNdEx]) - copy(dAtA[i:], m.NodeId[iNdEx]) - i = encodeVarintScore(dAtA, i, uint64(len(m.NodeId[iNdEx]))) - i-- - dAtA[i] = 0xa - } + return 0 +} + +func (m *Node) GetOsType() string { + if m != nil { + return m.OsType } - return len(dAtA) - i, nil + return "" } -func (m *SettingsReq) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *Node) GetArchType() string { + if m != nil { + return m.ArchType } - return dAtA[:n], nil + return "" } -func (m *SettingsReq) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *Node) GetCpuInfo() string { + if m != nil { + return m.CpuInfo + } + return "" } -func (m *SettingsReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) +func (m *Node) GetPeersConnected() uint64 { + if m != nil { + return m.PeersConnected } - if m.RespSize != 0 { - i = encodeVarintScore(dAtA, i, uint64(m.RespSize)) - i-- - dAtA[i] = 0x10 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintScore(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + return 0 } -func (m *SettingsResp) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *Node) GetTimeCreated() time.Time { + if m != nil { + return m.TimeCreated } - return dAtA[:n], nil + return time.Time{} } -func (m *SettingsResp) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *Node) GetHVal() string { + if m != nil { + return m.HVal + } + return "" } -func (m *SettingsResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.SettingsData != nil { - { - size, err := m.SettingsData.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintScore(dAtA, i, uint64(size)) +func (*Node) XXX_MessageName() string { + return "score.Node" +} + +type Node_Settings struct { + StoragePriceAsk uint64 `protobuf:"varint,1,opt,name=storage_price_ask,json=storagePriceAsk,proto3" json:"storage_price_ask,omitempty" pg:"storage_price_ask"` + BandwidthPriceAsk uint64 `protobuf:"varint,2,opt,name=bandwidth_price_ask,json=bandwidthPriceAsk,proto3" json:"bandwidth_price_ask,omitempty" pg:"bandwidth_price_ask"` + StorageTimeMin uint64 `protobuf:"varint,3,opt,name=storage_time_min,json=storageTimeMin,proto3" json:"storage_time_min,omitempty" pg:"storage_time_min"` + BandwidthLimit float64 `protobuf:"fixed64,4,opt,name=bandwidth_limit,json=bandwidthLimit,proto3" json:"bandwidth_limit,omitempty" pg:"bandwidth_limit"` + CollateralStake uint64 `protobuf:"varint,5,opt,name=collateral_stake,json=collateralStake,proto3" json:"collateral_stake,omitempty" pg:"collateral_stake"` + StoragePriceDefault uint64 `protobuf:"varint,6,opt,name=storage_price_default,json=storagePriceDefault,proto3" json:"storage_price_default,omitempty" pg:"storage_price_default"` + CustomizedPricing bool `protobuf:"varint,7,opt,name=customized_pricing,json=customizedPricing,proto3" json:"customized_pricing,omitempty" pg:"customized_pricing"` + Roles []NodeRole `protobuf:"varint,8,rep,packed,name=roles,proto3,enum=score.NodeRole" json:"roles,omitempty" pg:"roles,array"` + RepairPriceDefault uint64 `protobuf:"varint,9,opt,name=repair_price_default,json=repairPriceDefault,proto3" json:"repair_price_default,omitempty" pg:"repair_price_default"` + RepairPriceCustomized uint64 `protobuf:"varint,10,opt,name=repair_price_customized,json=repairPriceCustomized,proto3" json:"repair_price_customized,omitempty" pg:"repair_price_customized"` + RepairCustomizedPricing bool `protobuf:"varint,11,opt,name=repair_customized_pricing,json=repairCustomizedPricing,proto3" json:"repair_customized_pricing,omitempty" pg:"repair_customized_pricing"` + ChallengePriceDefault uint64 `protobuf:"varint,12,opt,name=challenge_price_default,json=challengePriceDefault,proto3" json:"challenge_price_default,omitempty" pg:"challenge_price_default"` + ChallengePriceCustomized uint64 `protobuf:"varint,13,opt,name=challenge_price_customized,json=challengePriceCustomized,proto3" json:"challenge_price_customized,omitempty" pg:"challenge_price_customized"` + ChallengeCustomizedPricing bool `protobuf:"varint,14,opt,name=challenge_customized_pricing,json=challengeCustomizedPricing,proto3" json:"challenge_customized_pricing,omitempty" pg:"challenge_customized_pricing"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *Node_Settings) Reset() { *m = Node_Settings{} } +func (m *Node_Settings) String() string { return proto.CompactTextString(m) } +func (*Node_Settings) ProtoMessage() {} +func (*Node_Settings) Descriptor() ([]byte, []int) { + return fileDescriptor_649f1c1133130df2, []int{13, 0} +} +func (m *Node_Settings) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Node_Settings) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Node_Settings.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } - i-- - dAtA[i] = 0x22 - } - n2, err2 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.ResponseTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime):]) - if err2 != nil { - return 0, err2 - } - i -= n2 - i = encodeVarintScore(dAtA, i, uint64(n2)) - i-- - dAtA[i] = 0x1a - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintScore(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = encodeVarintScore(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 + return b[:n], nil } - return len(dAtA) - i, nil +} +func (m *Node_Settings) XXX_Merge(src proto.Message) { + xxx_messageInfo_Node_Settings.Merge(m, src) +} +func (m *Node_Settings) XXX_Size() int { + return m.Size() +} +func (m *Node_Settings) XXX_DiscardUnknown() { + xxx_messageInfo_Node_Settings.DiscardUnknown(m) } -func (m *SettingsData) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +var xxx_messageInfo_Node_Settings proto.InternalMessageInfo + +func (m *Node_Settings) GetStoragePriceAsk() uint64 { + if m != nil { + return m.StoragePriceAsk } - return dAtA[:n], nil + return 0 } -func (m *SettingsData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *Node_Settings) GetBandwidthPriceAsk() uint64 { + if m != nil { + return m.BandwidthPriceAsk + } + return 0 } -func (m *SettingsData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.CollateralStake != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.CollateralStake)))) - i-- - dAtA[i] = 0x29 - } - if m.BandwidthLimit != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.BandwidthLimit)))) - i-- - dAtA[i] = 0x21 - } - if m.StorageTimeMin != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.StorageTimeMin)))) - i-- - dAtA[i] = 0x19 - } - if m.BandwidthPriceAsk != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.BandwidthPriceAsk)))) - i-- - dAtA[i] = 0x11 - } - if m.StoragePriceAsk != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.StoragePriceAsk)))) - i-- - dAtA[i] = 0x9 +func (m *Node_Settings) GetStorageTimeMin() uint64 { + if m != nil { + return m.StorageTimeMin } - return len(dAtA) - i, nil + return 0 } -func (m *HostsReq) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *Node_Settings) GetBandwidthLimit() float64 { + if m != nil { + return m.BandwidthLimit } - return dAtA[:n], nil + return 0 } -func (m *HostsReq) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *Node_Settings) GetCollateralStake() uint64 { + if m != nil { + return m.CollateralStake + } + return 0 } -func (m *HostsReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintScore(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x22 - } - if m.Mode != 0 { - i = encodeVarintScore(dAtA, i, uint64(m.Mode)) - i-- - dAtA[i] = 0x18 - } - if m.RespSize != 0 { - i = encodeVarintScore(dAtA, i, uint64(m.RespSize)) - i-- - dAtA[i] = 0x10 +func (m *Node_Settings) GetStoragePriceDefault() uint64 { + if m != nil { + return m.StoragePriceDefault } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintScore(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa + return 0 +} + +func (m *Node_Settings) GetCustomizedPricing() bool { + if m != nil { + return m.CustomizedPricing } - return len(dAtA) - i, nil + return false } -func (m *RolesHostsReq) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *Node_Settings) GetRoles() []NodeRole { + if m != nil { + return m.Roles } - return dAtA[:n], nil + return nil } -func (m *RolesHostsReq) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *Node_Settings) GetRepairPriceDefault() uint64 { + if m != nil { + return m.RepairPriceDefault + } + return 0 } -func (m *RolesHostsReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) +func (m *Node_Settings) GetRepairPriceCustomized() uint64 { + if m != nil { + return m.RepairPriceCustomized } - if m.Role != 0 { - i = encodeVarintScore(dAtA, i, uint64(m.Role)) - i-- - dAtA[i] = 0x18 + return 0 +} + +func (m *Node_Settings) GetRepairCustomizedPricing() bool { + if m != nil { + return m.RepairCustomizedPricing } - if m.RespSize != 0 { - i = encodeVarintScore(dAtA, i, uint64(m.RespSize)) - i-- - dAtA[i] = 0x10 + return false +} + +func (m *Node_Settings) GetChallengePriceDefault() uint64 { + if m != nil { + return m.ChallengePriceDefault } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintScore(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa + return 0 +} + +func (m *Node_Settings) GetChallengePriceCustomized() uint64 { + if m != nil { + return m.ChallengePriceCustomized } - return len(dAtA) - i, nil + return 0 } -func (m *HostsResp) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *Node_Settings) GetChallengeCustomizedPricing() bool { + if m != nil { + return m.ChallengeCustomizedPricing } - return dAtA[:n], nil + return false } -func (m *HostsResp) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (*Node_Settings) XXX_MessageName() string { + return "score.Node.Settings" } -func (m *HostsResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) +type Node_Geo struct { + CountryShort string `protobuf:"bytes,1,opt,name=country_short,json=countryShort,proto3" json:"country_short,omitempty" pg:"country_short"` + Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty" pg:"region"` + Latitude float32 `protobuf:"fixed32,3,opt,name=latitude,proto3" json:"latitude,omitempty" pg:"latitude"` + Longitude float32 `protobuf:"fixed32,4,opt,name=longitude,proto3" json:"longitude,omitempty" pg:"longitude"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *Node_Geo) Reset() { *m = Node_Geo{} } +func (m *Node_Geo) String() string { return proto.CompactTextString(m) } +func (*Node_Geo) ProtoMessage() {} +func (*Node_Geo) Descriptor() ([]byte, []int) { + return fileDescriptor_649f1c1133130df2, []int{13, 1} +} +func (m *Node_Geo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Node_Geo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Node_Geo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - n3, err3 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.ResponseTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime):]) - if err3 != nil { - return 0, err3 +} +func (m *Node_Geo) XXX_Merge(src proto.Message) { + xxx_messageInfo_Node_Geo.Merge(m, src) +} +func (m *Node_Geo) XXX_Size() int { + return m.Size() +} +func (m *Node_Geo) XXX_DiscardUnknown() { + xxx_messageInfo_Node_Geo.DiscardUnknown(m) +} + +var xxx_messageInfo_Node_Geo proto.InternalMessageInfo + +func (m *Node_Geo) GetCountryShort() string { + if m != nil { + return m.CountryShort } - i -= n3 - i = encodeVarintScore(dAtA, i, uint64(n3)) - i-- - dAtA[i] = 0x32 - if len(m.Mode) > 0 { - i -= len(m.Mode) - copy(dAtA[i:], m.Mode) - i = encodeVarintScore(dAtA, i, uint64(len(m.Mode))) - i-- - dAtA[i] = 0x2a + return "" +} + +func (m *Node_Geo) GetRegion() string { + if m != nil { + return m.Region } - if m.RespSize != 0 { - i = encodeVarintScore(dAtA, i, uint64(m.RespSize)) - i-- - dAtA[i] = 0x20 + return "" +} + +func (m *Node_Geo) GetLatitude() float32 { + if m != nil { + return m.Latitude } - if m.Hosts != nil { - { - size, err := m.Hosts.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintScore(dAtA, i, uint64(size)) + return 0 +} + +func (m *Node_Geo) GetLongitude() float32 { + if m != nil { + return m.Longitude + } + return 0 +} + +func (*Node_Geo) XXX_MessageName() string { + return "score.Node.Geo" +} + +type Node_ExperimentalFlags struct { + Analytics bool `protobuf:"varint,1,opt,name=analytics,proto3" json:"analytics,omitempty" pg:"analytics"` + FilestoreEnabled bool `protobuf:"varint,2,opt,name=filestore_enabled,json=filestoreEnabled,proto3" json:"filestore_enabled,omitempty" pg:"filestore_enabled"` + HostsSyncEnabled bool `protobuf:"varint,3,opt,name=hosts_sync_enabled,json=hostsSyncEnabled,proto3" json:"hosts_sync_enabled,omitempty" pg:"hosts_sync_enabled"` + HostsSyncMode string `protobuf:"bytes,4,opt,name=hosts_sync_mode,json=hostsSyncMode,proto3" json:"hosts_sync_mode,omitempty" pg:"hosts_sync_mode"` + Libp2PStreamMounting bool `protobuf:"varint,5,opt,name=libp2p_stream_mounting,json=libp2pStreamMounting,proto3" json:"libp2p_stream_mounting,omitempty" pg:"libp2p_stream_mounting"` + P2PHttpProxy bool `protobuf:"varint,6,opt,name=p2p_http_proxy,json=p2pHttpProxy,proto3" json:"p2p_http_proxy,omitempty" pg:"p2p_http_proxy"` + PreferTls bool `protobuf:"varint,7,opt,name=prefer_tls,json=preferTls,proto3" json:"prefer_tls,omitempty" pg:"prefer_tls"` + Quic bool `protobuf:"varint,8,opt,name=quic,proto3" json:"quic,omitempty" pg:"quic"` + RemoveOnUnpin bool `protobuf:"varint,9,opt,name=remove_on_unpin,json=removeOnUnpin,proto3" json:"remove_on_unpin,omitempty" pg:"remove_on_unpin"` + ShardingEnabled bool `protobuf:"varint,10,opt,name=sharding_enabled,json=shardingEnabled,proto3" json:"sharding_enabled,omitempty" pg:"sharding_enabled"` + StorageClientEnabled bool `protobuf:"varint,11,opt,name=storage_client_enabled,json=storageClientEnabled,proto3" json:"storage_client_enabled,omitempty" pg:"storage_client_enabled"` + StorageHostEnabled bool `protobuf:"varint,12,opt,name=storage_host_enabled,json=storageHostEnabled,proto3" json:"storage_host_enabled,omitempty" pg:"storage_host_enabled"` + StrategicProviding bool `protobuf:"varint,13,opt,name=strategic_providing,json=strategicProviding,proto3" json:"strategic_providing,omitempty" pg:"strategic_providing"` + UrlStoreEnabled bool `protobuf:"varint,14,opt,name=url_store_enabled,json=urlStoreEnabled,proto3" json:"url_store_enabled,omitempty" pg:"url_store_enabled"` + DisableAutoUpdate bool `protobuf:"varint,15,opt,name=disable_auto_update,json=disableAutoUpdate,proto3" json:"disable_auto_update,omitempty" pg:"disable_auto_update"` + GraphsyncEnabled bool `protobuf:"varint,16,opt,name=graphsync_enabled,json=graphsyncEnabled,proto3" json:"graphsync_enabled,omitempty" pg:"graphsync_enabled"` + RepairHostEnabled bool `protobuf:"varint,17,opt,name=repair_host_enabled,json=repairHostEnabled,proto3" json:"repair_host_enabled,omitempty" pg:"repair_host_enabled"` + ChallengeHostEnabled bool `protobuf:"varint,18,opt,name=challenge_host_enabled,json=challengeHostEnabled,proto3" json:"challenge_host_enabled,omitempty" pg:"challenge_host_enabled"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *Node_ExperimentalFlags) Reset() { *m = Node_ExperimentalFlags{} } +func (m *Node_ExperimentalFlags) String() string { return proto.CompactTextString(m) } +func (*Node_ExperimentalFlags) ProtoMessage() {} +func (*Node_ExperimentalFlags) Descriptor() ([]byte, []int) { + return fileDescriptor_649f1c1133130df2, []int{13, 2} +} +func (m *Node_ExperimentalFlags) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Node_ExperimentalFlags) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Node_ExperimentalFlags.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } - i-- - dAtA[i] = 0x1a + return b[:n], nil } - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintScore(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x12 +} +func (m *Node_ExperimentalFlags) XXX_Merge(src proto.Message) { + xxx_messageInfo_Node_ExperimentalFlags.Merge(m, src) +} +func (m *Node_ExperimentalFlags) XXX_Size() int { + return m.Size() +} +func (m *Node_ExperimentalFlags) XXX_DiscardUnknown() { + xxx_messageInfo_Node_ExperimentalFlags.DiscardUnknown(m) +} + +var xxx_messageInfo_Node_ExperimentalFlags proto.InternalMessageInfo + +func (m *Node_ExperimentalFlags) GetAnalytics() bool { + if m != nil { + return m.Analytics } - if m.Code != 0 { - i = encodeVarintScore(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 + return false +} + +func (m *Node_ExperimentalFlags) GetFilestoreEnabled() bool { + if m != nil { + return m.FilestoreEnabled } - return len(dAtA) - i, nil + return false } -func (m *StatsReq) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *Node_ExperimentalFlags) GetHostsSyncEnabled() bool { + if m != nil { + return m.HostsSyncEnabled } - return dAtA[:n], nil + return false } -func (m *StatsReq) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *Node_ExperimentalFlags) GetHostsSyncMode() string { + if m != nil { + return m.HostsSyncMode + } + return "" } -func (m *StatsReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) +func (m *Node_ExperimentalFlags) GetLibp2PStreamMounting() bool { + if m != nil { + return m.Libp2PStreamMounting } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintScore(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa + return false +} + +func (m *Node_ExperimentalFlags) GetP2PHttpProxy() bool { + if m != nil { + return m.P2PHttpProxy } - return len(dAtA) - i, nil + return false } -func (m *StatsResp) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *Node_ExperimentalFlags) GetPreferTls() bool { + if m != nil { + return m.PreferTls } - return dAtA[:n], nil + return false } -func (m *StatsResp) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *Node_ExperimentalFlags) GetQuic() bool { + if m != nil { + return m.Quic + } + return false } -func (m *StatsResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) +func (m *Node_ExperimentalFlags) GetRemoveOnUnpin() bool { + if m != nil { + return m.RemoveOnUnpin } - { - size, err := m.StorageStat_HostStats.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintScore(dAtA, i, uint64(size)) + return false +} + +func (m *Node_ExperimentalFlags) GetShardingEnabled() bool { + if m != nil { + return m.ShardingEnabled } - i-- - dAtA[i] = 0x22 - n6, err6 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.ResponseTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime):]) - if err6 != nil { - return 0, err6 + return false +} + +func (m *Node_ExperimentalFlags) GetStorageClientEnabled() bool { + if m != nil { + return m.StorageClientEnabled } - i -= n6 - i = encodeVarintScore(dAtA, i, uint64(n6)) - i-- - dAtA[i] = 0x1a - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintScore(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x12 + return false +} + +func (m *Node_ExperimentalFlags) GetStorageHostEnabled() bool { + if m != nil { + return m.StorageHostEnabled } - if m.Code != 0 { - i = encodeVarintScore(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 + return false +} + +func (m *Node_ExperimentalFlags) GetStrategicProviding() bool { + if m != nil { + return m.StrategicProviding } - return len(dAtA) - i, nil + return false } -func (m *Host) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *Node_ExperimentalFlags) GetUrlStoreEnabled() bool { + if m != nil { + return m.UrlStoreEnabled } - return dAtA[:n], nil + return false } -func (m *Host) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *Node_ExperimentalFlags) GetDisableAutoUpdate() bool { + if m != nil { + return m.DisableAutoUpdate + } + return false } -func (m *Host) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) +func (m *Node_ExperimentalFlags) GetGraphsyncEnabled() bool { + if m != nil { + return m.GraphsyncEnabled } - if len(m.Roles) > 0 { - dAtA8 := make([]byte, len(m.Roles)*10) - var j7 int - for _, num := range m.Roles { - for num >= 1<<7 { - dAtA8[j7] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j7++ - } - dAtA8[j7] = uint8(num) - j7++ - } - i -= j7 - copy(dAtA[i:], dAtA8[:j7]) - i = encodeVarintScore(dAtA, i, uint64(j7)) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x9a + return false +} + +func (m *Node_ExperimentalFlags) GetRepairHostEnabled() bool { + if m != nil { + return m.RepairHostEnabled } - if m.DownloadSpeedScore != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.DownloadSpeedScore)))) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x95 + return false +} + +func (m *Node_ExperimentalFlags) GetChallengeHostEnabled() bool { + if m != nil { + return m.ChallengeHostEnabled } - if m.UploadSpeedScore != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.UploadSpeedScore)))) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x8d + return false +} + +func (*Node_ExperimentalFlags) XXX_MessageName() string { + return "score.Node.ExperimentalFlags" +} +func init() { + proto.RegisterEnum("score.ResponseCode", ResponseCode_name, ResponseCode_value) + golang_proto.RegisterEnum("score.ResponseCode", ResponseCode_name, ResponseCode_value) + proto.RegisterEnum("score.NodeRole", NodeRole_name, NodeRole_value) + golang_proto.RegisterEnum("score.NodeRole", NodeRole_name, NodeRole_value) + proto.RegisterEnum("score.HostsReq_Mode", HostsReq_Mode_name, HostsReq_Mode_value) + golang_proto.RegisterEnum("score.HostsReq_Mode", HostsReq_Mode_name, HostsReq_Mode_value) + proto.RegisterType((*NodesReq)(nil), "score.NodesReq") + golang_proto.RegisterType((*NodesReq)(nil), "score.NodesReq") + proto.RegisterType((*SettingsReq)(nil), "score.SettingsReq") + golang_proto.RegisterType((*SettingsReq)(nil), "score.SettingsReq") + proto.RegisterType((*SettingsResp)(nil), "score.SettingsResp") + golang_proto.RegisterType((*SettingsResp)(nil), "score.SettingsResp") + proto.RegisterType((*SettingsData)(nil), "score.SettingsData") + golang_proto.RegisterType((*SettingsData)(nil), "score.SettingsData") + proto.RegisterType((*HostsReq)(nil), "score.HostsReq") + golang_proto.RegisterType((*HostsReq)(nil), "score.HostsReq") + proto.RegisterType((*RolesHostsReq)(nil), "score.RolesHostsReq") + golang_proto.RegisterType((*RolesHostsReq)(nil), "score.RolesHostsReq") + proto.RegisterType((*HostsResp)(nil), "score.HostsResp") + golang_proto.RegisterType((*HostsResp)(nil), "score.HostsResp") + proto.RegisterType((*StatsReq)(nil), "score.StatsReq") + golang_proto.RegisterType((*StatsReq)(nil), "score.StatsReq") + proto.RegisterType((*StatsResp)(nil), "score.StatsResp") + golang_proto.RegisterType((*StatsResp)(nil), "score.StatsResp") + proto.RegisterType((*Host)(nil), "score.Host") + golang_proto.RegisterType((*Host)(nil), "score.Host") + proto.RegisterType((*HostsData)(nil), "score.HostsData") + golang_proto.RegisterType((*HostsData)(nil), "score.HostsData") + proto.RegisterType((*Location)(nil), "score.Location") + golang_proto.RegisterType((*Location)(nil), "score.Location") + proto.RegisterType((*StorageStat)(nil), "score.StorageStat") + golang_proto.RegisterType((*StorageStat)(nil), "score.StorageStat") + proto.RegisterType((*StorageStat_HostStats)(nil), "score.StorageStat.HostStats") + golang_proto.RegisterType((*StorageStat_HostStats)(nil), "score.StorageStat.HostStats") + proto.RegisterType((*StorageStat_Host)(nil), "score.StorageStat.Host") + golang_proto.RegisterType((*StorageStat_Host)(nil), "score.StorageStat.Host") + proto.RegisterType((*StorageStat_Renter)(nil), "score.StorageStat.Renter") + golang_proto.RegisterType((*StorageStat_Renter)(nil), "score.StorageStat.Renter") + proto.RegisterType((*Node)(nil), "score.Node") + golang_proto.RegisterType((*Node)(nil), "score.Node") + proto.RegisterType((*Node_Settings)(nil), "score.Node.Settings") + golang_proto.RegisterType((*Node_Settings)(nil), "score.Node.Settings") + proto.RegisterType((*Node_Geo)(nil), "score.Node.Geo") + golang_proto.RegisterType((*Node_Geo)(nil), "score.Node.Geo") + proto.RegisterType((*Node_ExperimentalFlags)(nil), "score.Node.ExperimentalFlags") + golang_proto.RegisterType((*Node_ExperimentalFlags)(nil), "score.Node.ExperimentalFlags") +} + +func init() { proto.RegisterFile("protos/score/score.proto", fileDescriptor_649f1c1133130df2) } +func init() { golang_proto.RegisterFile("protos/score/score.proto", fileDescriptor_649f1c1133130df2) } + +var fileDescriptor_649f1c1133130df2 = []byte{ + // 2862 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0xc1, 0x6f, 0x1b, 0xc7, + 0xd5, 0xf7, 0x8a, 0xa4, 0xb4, 0x7c, 0xa4, 0x44, 0x6a, 0x24, 0xcb, 0x34, 0xed, 0x48, 0x36, 0xfd, + 0x25, 0xf1, 0xe7, 0x38, 0x74, 0xa2, 0xa6, 0x41, 0x63, 0xf8, 0x10, 0x89, 0xda, 0xc8, 0x42, 0x6c, + 0x49, 0x1d, 0x52, 0x0e, 0xd0, 0xcb, 0x62, 0xb4, 0x1c, 0x91, 0x0b, 0x2d, 0x77, 0xd7, 0xbb, 0xb3, + 0x72, 0x14, 0xf4, 0x0f, 0xe8, 0xa9, 0xc8, 0xb1, 0xa7, 0xa2, 0xe8, 0xb1, 0xf7, 0x9e, 0x5b, 0xa0, + 0x97, 0x1c, 0x73, 0x6a, 0x4f, 0x4d, 0x82, 0xe4, 0x52, 0xf4, 0x18, 0xa0, 0xf7, 0x62, 0xde, 0xcc, + 0x2e, 0x97, 0x14, 0x8d, 0x58, 0x41, 0x0e, 0xbd, 0x08, 0xdc, 0xf7, 0x7e, 0xef, 0xe9, 0xbd, 0x99, + 0x79, 0xef, 0xfd, 0x76, 0x16, 0x1a, 0x61, 0x14, 0x88, 0x20, 0x7e, 0x10, 0x3b, 0x41, 0xc4, 0xd5, + 0xdf, 0x36, 0x8a, 0x48, 0x09, 0x1f, 0x9a, 0xef, 0x0c, 0x5c, 0x31, 0x4c, 0x8e, 0xdb, 0x4e, 0x30, + 0x7a, 0x20, 0xa2, 0xc0, 0x7f, 0x3b, 0x89, 0x1f, 0x20, 0xe0, 0x38, 0x39, 0x79, 0x30, 0x08, 0x06, + 0x01, 0x3e, 0xe0, 0x2f, 0x65, 0xd8, 0xdc, 0x18, 0x04, 0xc1, 0xc0, 0xe3, 0x63, 0x94, 0x70, 0x47, + 0x3c, 0x16, 0x6c, 0x14, 0x2a, 0x40, 0xab, 0x0f, 0xe6, 0x7e, 0xd0, 0xe7, 0x31, 0xe5, 0xcf, 0xc9, + 0x35, 0x58, 0xf0, 0x83, 0x3e, 0xb7, 0xdd, 0x7e, 0xc3, 0xb8, 0x55, 0xb8, 0x5b, 0xa6, 0xf3, 0xf2, + 0x71, 0xaf, 0x4f, 0x6e, 0x43, 0x35, 0xe2, 0xcf, 0x13, 0x1e, 0x0b, 0x1e, 0x49, 0xed, 0xdc, 0x2d, + 0xe3, 0x6e, 0x99, 0x56, 0x32, 0xd9, 0x5e, 0x9f, 0xdc, 0x84, 0x72, 0xec, 0x0e, 0x7c, 0x26, 0x92, + 0x88, 0x37, 0x0a, 0xb7, 0x8c, 0xbb, 0x55, 0x3a, 0x16, 0xb4, 0x1e, 0x42, 0xa5, 0xcb, 0x85, 0x70, + 0xfd, 0x01, 0xfe, 0xa3, 0x25, 0x98, 0xc3, 0xff, 0x21, 0xbd, 0xcc, 0xb9, 0x7d, 0x72, 0x03, 0xca, + 0x11, 0x8f, 0x43, 0x3b, 0x76, 0x3f, 0xe3, 0xe8, 0xbc, 0x44, 0x4d, 0x29, 0xe8, 0xba, 0x9f, 0xf1, + 0xd6, 0xdf, 0x0d, 0xa8, 0x8e, 0x8d, 0xe3, 0x90, 0xbc, 0x09, 0x45, 0x27, 0xe8, 0x73, 0xb4, 0x5f, + 0xda, 0x5c, 0x69, 0xab, 0x85, 0x92, 0xaa, 0xc0, 0x8f, 0x79, 0x27, 0xe8, 0x73, 0x8a, 0x00, 0xd2, + 0x80, 0x85, 0x11, 0x8f, 0x63, 0x36, 0xe0, 0x3a, 0xe2, 0xf4, 0x91, 0xec, 0xc1, 0x62, 0xa4, 0xf1, + 0xb6, 0x5c, 0x11, 0x8c, 0xb8, 0xb2, 0xd9, 0x6c, 0xab, 0xe5, 0x6a, 0xa7, 0xcb, 0xd5, 0xee, 0xa5, + 0xcb, 0xb5, 0x6d, 0x7e, 0xf1, 0xd5, 0xc6, 0x95, 0xcf, 0xbf, 0xde, 0x30, 0x68, 0x35, 0x35, 0x95, + 0x4a, 0xf2, 0x0b, 0x58, 0x8c, 0x75, 0x74, 0x76, 0x9f, 0x09, 0xd6, 0x28, 0xa2, 0xab, 0x34, 0xac, + 0x34, 0xf2, 0x1d, 0x26, 0x18, 0xad, 0xc6, 0xb9, 0xa7, 0xd6, 0xbf, 0x72, 0x89, 0x49, 0x01, 0xb9, + 0x07, 0xcb, 0xb1, 0x08, 0x22, 0x36, 0xe0, 0x76, 0x18, 0xb9, 0x0e, 0xb7, 0x59, 0x7c, 0x8a, 0x59, + 0x1a, 0xb4, 0xa6, 0x15, 0x87, 0x52, 0xbe, 0x15, 0x9f, 0x92, 0x36, 0xac, 0x1c, 0x33, 0xbf, 0xff, + 0xc2, 0xed, 0x8b, 0x61, 0x0e, 0x3d, 0x87, 0xe8, 0xe5, 0x4c, 0x95, 0xe1, 0xef, 0x42, 0x3d, 0xf5, + 0x2d, 0x13, 0xb6, 0x47, 0xae, 0x8f, 0x49, 0x1b, 0x74, 0x49, 0xcb, 0x65, 0x36, 0x4f, 0x5d, 0x9f, + 0xbc, 0x09, 0xb5, 0xb1, 0x67, 0xcf, 0x1d, 0xb9, 0x02, 0x53, 0x32, 0xe8, 0x52, 0x26, 0x7e, 0x22, + 0xa5, 0xe4, 0xff, 0xa1, 0xee, 0x04, 0x9e, 0xc7, 0x04, 0x8f, 0x98, 0x67, 0xc7, 0x82, 0x9d, 0xf2, + 0x46, 0x49, 0x45, 0x3b, 0x96, 0x77, 0xa5, 0xb8, 0xf5, 0x37, 0x03, 0xcc, 0xc7, 0x41, 0x2c, 0x2e, + 0xbd, 0xfb, 0xe4, 0x2e, 0x14, 0x47, 0x72, 0xb3, 0x0b, 0xb8, 0xd9, 0xab, 0x7a, 0x55, 0x53, 0x5f, + 0xed, 0xa7, 0xb8, 0xdb, 0x23, 0xbd, 0xdb, 0x67, 0x3c, 0x8a, 0xdd, 0xc0, 0xc7, 0x78, 0xcb, 0x34, + 0x7d, 0x6c, 0x7d, 0x04, 0x45, 0x89, 0x23, 0x65, 0x28, 0x75, 0x3b, 0x07, 0xd4, 0xaa, 0x5f, 0x21, + 0x0b, 0x50, 0xd8, 0xb5, 0x0e, 0xea, 0x86, 0xfc, 0x41, 0xad, 0xc3, 0xfa, 0x9c, 0x54, 0x1e, 0xd2, + 0xbd, 0x8e, 0x55, 0x2f, 0x20, 0xee, 0xd0, 0xb2, 0x76, 0xea, 0x45, 0x52, 0x81, 0x85, 0x9e, 0xd5, + 0xed, 0xed, 0x5b, 0xbd, 0x7a, 0xa9, 0xc5, 0x60, 0x91, 0x06, 0x1e, 0x8f, 0x7f, 0x5c, 0x26, 0x77, + 0xa0, 0x18, 0x05, 0x5e, 0x9a, 0x49, 0x4d, 0x67, 0x22, 0x8b, 0x4f, 0x3a, 0xa5, 0xa8, 0x6c, 0x7d, + 0x6f, 0x40, 0x59, 0xbb, 0xff, 0x69, 0x4e, 0xfa, 0x1b, 0x50, 0x1a, 0x4a, 0x7f, 0xfa, 0x84, 0xd7, + 0xf3, 0x0b, 0x88, 0x67, 0x52, 0xa9, 0x27, 0x43, 0x2f, 0x4e, 0x85, 0x4e, 0xf4, 0x26, 0x94, 0xd0, + 0xb7, 0x5a, 0xee, 0x0b, 0x25, 0x34, 0xff, 0x63, 0x4b, 0xa8, 0xd5, 0x04, 0xb3, 0x2b, 0xd8, 0xcc, + 0x25, 0x6d, 0xfd, 0xc3, 0x80, 0xb2, 0x56, 0xfe, 0xcf, 0x95, 0xfe, 0x23, 0x28, 0xc5, 0x32, 0x34, + 0x5d, 0xf2, 0x37, 0xd3, 0x92, 0x57, 0xf5, 0x24, 0xa3, 0xc6, 0x75, 0xc6, 0xf0, 0x95, 0x93, 0x2f, + 0xbf, 0xda, 0x30, 0xa8, 0x32, 0x6a, 0xfd, 0xa5, 0x02, 0x45, 0xa9, 0x9e, 0x6c, 0xbb, 0x46, 0xae, + 0xed, 0x1e, 0x40, 0xdd, 0x89, 0x38, 0x13, 0x2a, 0x50, 0x8c, 0x05, 0xb3, 0x79, 0xd5, 0x68, 0x6b, + 0xca, 0x3a, 0x53, 0x49, 0x87, 0x49, 0xd8, 0x9f, 0x74, 0x78, 0x99, 0xf4, 0x6b, 0xca, 0x7a, 0xec, + 0x70, 0x0d, 0xe6, 0x23, 0x3e, 0x18, 0x97, 0x9c, 0x7e, 0x92, 0x03, 0xe3, 0x58, 0x9c, 0xc4, 0x76, + 0x5a, 0x90, 0xea, 0xe0, 0x54, 0xa4, 0xec, 0x99, 0x12, 0x91, 0x55, 0x50, 0x43, 0x0d, 0xcf, 0xcd, + 0x1c, 0x55, 0x0f, 0x64, 0x03, 0x2a, 0x43, 0xce, 0x22, 0x61, 0x1f, 0x73, 0xb9, 0xb0, 0x0b, 0xb7, + 0x8c, 0xbb, 0x45, 0x0a, 0x28, 0xda, 0x96, 0x12, 0xf9, 0x1f, 0x93, 0x10, 0xf7, 0xcd, 0x44, 0x3b, + 0xfd, 0x44, 0xea, 0x50, 0x90, 0x9b, 0x5d, 0x46, 0x03, 0xf9, 0x93, 0xac, 0x03, 0x44, 0x3c, 0x4c, + 0x04, 0x13, 0x32, 0x02, 0x40, 0x74, 0x4e, 0x42, 0x5e, 0x87, 0xa5, 0x24, 0xf4, 0x02, 0xd6, 0xb7, + 0xd9, 0x19, 0x97, 0x1b, 0xd6, 0xa8, 0x20, 0x66, 0x51, 0x49, 0xb7, 0x94, 0x50, 0xb6, 0x43, 0x0d, + 0x3b, 0x63, 0x91, 0xcb, 0x7c, 0x87, 0x37, 0xaa, 0x88, 0xd3, 0xd6, 0xcf, 0xb4, 0x54, 0xb6, 0xc3, + 0x7e, 0xf0, 0xc2, 0x9f, 0xf0, 0xb8, 0x88, 0xc8, 0x5a, 0x2a, 0x4f, 0x7d, 0xbe, 0x05, 0xcb, 0x19, + 0x34, 0xf3, 0xba, 0x84, 0xd8, 0xcc, 0x47, 0xe6, 0xf7, 0x5d, 0x30, 0xbd, 0xc0, 0x51, 0x59, 0xd4, + 0x70, 0xb3, 0xd2, 0xde, 0xf1, 0x44, 0x8b, 0xb7, 0x8b, 0x72, 0x87, 0x68, 0x06, 0x23, 0xf7, 0x81, + 0xa4, 0xcd, 0xfe, 0x2c, 0xf0, 0x92, 0x11, 0xb7, 0x1d, 0x16, 0x36, 0xea, 0xea, 0x1f, 0x68, 0xcd, + 0x33, 0x54, 0x74, 0x58, 0x28, 0x47, 0xc9, 0x14, 0xda, 0xe3, 0x27, 0xa2, 0xb1, 0x8c, 0xf0, 0xe5, + 0x09, 0xf8, 0x13, 0x7e, 0x22, 0x66, 0x8e, 0x12, 0x82, 0xeb, 0x3e, 0x3d, 0x4a, 0x66, 0x0e, 0xb4, + 0x15, 0x84, 0x5e, 0x18, 0x68, 0x17, 0xb0, 0x3c, 0x16, 0x8d, 0xd5, 0x8b, 0x58, 0x2b, 0x16, 0xb3, + 0x46, 0xd4, 0xd5, 0x99, 0x23, 0xea, 0x25, 0x53, 0x72, 0x0d, 0xdd, 0xce, 0x98, 0x92, 0x33, 0xf0, + 0x32, 0x8c, 0x6b, 0xb3, 0xf0, 0x32, 0x90, 0x59, 0x23, 0xb0, 0xa1, 0x62, 0x9e, 0x1a, 0x81, 0x32, + 0xe6, 0x1c, 0xd4, 0x0b, 0x62, 0xd1, 0xb8, 0xae, 0x16, 0x6d, 0x2c, 0x7e, 0x12, 0xa8, 0xe4, 0x72, + 0xc0, 0xe3, 0x24, 0xf2, 0x1b, 0xcd, 0x69, 0xe0, 0x76, 0x12, 0xf9, 0xe4, 0x0e, 0x2c, 0x3a, 0x41, + 0xe2, 0x8b, 0xe8, 0xdc, 0x8e, 0x87, 0x41, 0x24, 0x1a, 0x37, 0xb0, 0xca, 0xaa, 0x5a, 0xd8, 0x95, + 0x32, 0xf2, 0x01, 0x14, 0x4e, 0xbc, 0x41, 0xe3, 0x26, 0x1e, 0x9c, 0xd7, 0x72, 0x43, 0xa7, 0x6d, + 0x7d, 0x1a, 0xf2, 0xc8, 0x1d, 0x71, 0x5f, 0x30, 0xef, 0x23, 0x8f, 0x0d, 0xf2, 0x2d, 0x4a, 0xda, + 0x48, 0x4a, 0xd7, 0x77, 0x63, 0x27, 0x38, 0xe3, 0xd1, 0x79, 0xe3, 0x35, 0x3c, 0x0d, 0x63, 0x81, + 0x2c, 0x71, 0x55, 0x7a, 0xb6, 0x2a, 0xe3, 0x75, 0x04, 0x54, 0x94, 0xac, 0x8b, 0xc5, 0x7c, 0x03, + 0xca, 0x72, 0x3b, 0x95, 0x7e, 0x03, 0xf5, 0xa6, 0x6c, 0x8c, 0xa8, 0xbc, 0x03, 0x8b, 0xba, 0x3b, + 0x68, 0xc0, 0x2d, 0x04, 0x54, 0xb5, 0x50, 0x81, 0xee, 0x03, 0xd1, 0xc5, 0x17, 0x87, 0x9c, 0xf7, + 0x35, 0xf2, 0xb6, 0x3a, 0xc8, 0x4a, 0xd3, 0x95, 0x0a, 0x85, 0x7e, 0x07, 0x56, 0xb3, 0xb2, 0xca, + 0xe3, 0x5b, 0x88, 0x27, 0xa9, 0x2e, 0x67, 0xf1, 0x3e, 0x94, 0xe4, 0xd8, 0x8d, 0x1b, 0x77, 0x6e, + 0x15, 0x66, 0x0c, 0xe5, 0xed, 0xda, 0x9f, 0xbe, 0xde, 0xa8, 0x20, 0xe2, 0x3e, 0x8b, 0x22, 0x76, + 0x4e, 0x15, 0xfc, 0x61, 0xf1, 0x0f, 0x7f, 0xdc, 0x30, 0x5a, 0x6d, 0x3d, 0xab, 0x91, 0xbc, 0xdd, + 0x4e, 0x07, 0xad, 0xa4, 0xce, 0x95, 0xcd, 0x4a, 0x6e, 0xd0, 0xea, 0x19, 0xdb, 0x6a, 0x83, 0x99, + 0x96, 0xac, 0xec, 0x57, 0x1e, 0x13, 0x9a, 0xdd, 0xc9, 0x9f, 0x28, 0x09, 0x7c, 0xcd, 0xe0, 0xe4, + 0xcf, 0xd6, 0x9f, 0x4d, 0xa8, 0xe4, 0x86, 0x09, 0x79, 0x04, 0x20, 0x1d, 0xd9, 0x6a, 0xe8, 0x18, + 0xb8, 0xa5, 0xd7, 0x5e, 0x32, 0x74, 0x74, 0x4f, 0x28, 0x0f, 0xd3, 0x01, 0x44, 0xb6, 0x25, 0x89, + 0xf7, 0x25, 0x83, 0x57, 0xf6, 0x6a, 0x92, 0x5c, 0x9f, 0x61, 0x4f, 0x11, 0xa6, 0x3d, 0x54, 0x94, + 0x11, 0xfa, 0x68, 0x7e, 0x53, 0x54, 0x29, 0x2b, 0x8f, 0xe3, 0x5e, 0x6c, 0x4c, 0xf4, 0xe2, 0xac, + 0xb5, 0xcf, 0xe5, 0x5b, 0xfb, 0xf4, 0x81, 0x29, 0xfc, 0xc0, 0x81, 0x29, 0xfe, 0xd0, 0x81, 0x29, + 0xcd, 0x38, 0x30, 0x1b, 0x50, 0xc9, 0xef, 0xbc, 0x9a, 0x2d, 0x10, 0x8f, 0x77, 0x7c, 0xf6, 0x89, + 0x5a, 0xb8, 0xe4, 0x89, 0x32, 0x5f, 0x7a, 0xa2, 0xee, 0xc0, 0xa2, 0xce, 0xf2, 0x05, 0x77, 0x07, + 0x43, 0x81, 0x13, 0x69, 0x8e, 0xea, 0xd4, 0x3f, 0x41, 0x19, 0x79, 0x0d, 0x40, 0xe6, 0xa9, 0x11, + 0x6a, 0x34, 0xc9, 0xcc, 0xb5, 0xfa, 0x75, 0x58, 0x4a, 0x33, 0xd5, 0x10, 0x3d, 0x99, 0xb4, 0x54, + 0xc3, 0x6e, 0x43, 0x55, 0xc5, 0xa4, 0x41, 0x6a, 0x2c, 0xa9, 0xfc, 0x35, 0xa4, 0x0d, 0x2b, 0x13, + 0xd9, 0x6a, 0xa4, 0x1a, 0x4b, 0xcb, 0xb9, 0x74, 0x35, 0x7e, 0x13, 0xae, 0x4e, 0xe5, 0xab, 0x2d, + 0xd4, 0x70, 0x5a, 0x99, 0x48, 0x58, 0xdb, 0xec, 0x42, 0xd5, 0x63, 0xb1, 0xb0, 0x15, 0x37, 0xe8, + 0xeb, 0x19, 0xf5, 0x6a, 0x84, 0xa2, 0x22, 0x2d, 0x8f, 0x94, 0xa1, 0x2a, 0xaa, 0xe6, 0x6f, 0xe7, + 0x34, 0x2d, 0x5a, 0x83, 0xf9, 0xc0, 0xf7, 0x5c, 0x5f, 0x9d, 0x2e, 0x93, 0xea, 0x27, 0x4c, 0x5b, + 0x0f, 0x8a, 0x24, 0xe6, 0xea, 0x65, 0xb4, 0x40, 0x2b, 0x5a, 0x76, 0x14, 0xf3, 0x3e, 0x9e, 0x02, + 0x0d, 0x91, 0x83, 0xaf, 0x80, 0x08, 0xd0, 0x22, 0x39, 0xf2, 0x72, 0x03, 0xb2, 0xef, 0xc6, 0xa7, + 0xb6, 0x08, 0x04, 0xf3, 0xf0, 0xc4, 0x15, 0xb2, 0x01, 0xb9, 0xe3, 0xc6, 0xa7, 0x3d, 0x29, 0x27, + 0xef, 0xc1, 0xda, 0x04, 0x9a, 0x9d, 0x31, 0xd7, 0x63, 0xc7, 0x9e, 0x3a, 0x82, 0x05, 0xba, 0x9a, + 0xb3, 0xd8, 0x4a, 0x75, 0xe4, 0xc3, 0x94, 0x1d, 0xce, 0xbf, 0x02, 0x3b, 0xac, 0xa6, 0xad, 0xf7, + 0xdf, 0xb2, 0xe6, 0x94, 0xa1, 0x5e, 0x90, 0x7b, 0x30, 0xaf, 0x0a, 0x92, 0x34, 0x41, 0x52, 0x72, + 0x1e, 0x9d, 0xf1, 0x94, 0x29, 0x66, 0xcf, 0x0a, 0xab, 0xfb, 0xd2, 0x7f, 0x56, 0xa1, 0x28, 0x5b, + 0x18, 0xe9, 0x01, 0x08, 0x19, 0x8b, 0xed, 0x33, 0x5d, 0xa4, 0xe5, 0xed, 0x9f, 0x7f, 0xff, 0xd5, + 0xc6, 0xbb, 0xe1, 0xe0, 0x61, 0x0b, 0x39, 0xe7, 0x88, 0x8b, 0xc8, 0x75, 0xe2, 0xfb, 0xcc, 0x73, + 0x59, 0xfc, 0x50, 0xdc, 0x97, 0xfd, 0x9d, 0x45, 0x7d, 0x3b, 0xf1, 0x4f, 0xfd, 0xe0, 0x85, 0x6f, + 0x3b, 0x72, 0xec, 0xfb, 0x71, 0x8b, 0x96, 0xd1, 0xd1, 0x3e, 0x1b, 0xf1, 0x3c, 0x5f, 0x9d, 0x9b, + 0xe0, 0xab, 0xd3, 0xac, 0xaf, 0x70, 0x91, 0xf5, 0x5d, 0x83, 0x85, 0x24, 0x54, 0xbc, 0xbb, 0x88, + 0x43, 0x6d, 0x3e, 0x09, 0x91, 0x4b, 0x4f, 0xef, 0x6a, 0x09, 0xb5, 0x13, 0xbb, 0x3a, 0x9b, 0xd5, + 0xcc, 0x23, 0xf0, 0x22, 0xab, 0xd9, 0x80, 0xca, 0x88, 0x8f, 0x82, 0xe8, 0x5c, 0xf9, 0xd3, 0x4c, + 0x52, 0x89, 0xd0, 0xdd, 0x75, 0x30, 0x9d, 0x30, 0x51, 0x5a, 0x13, 0x9b, 0xee, 0x82, 0x13, 0x26, + 0xa8, 0xc2, 0xc6, 0x26, 0xcf, 0xb9, 0xe6, 0x93, 0xfa, 0x49, 0x6e, 0x40, 0x5a, 0x01, 0x58, 0xb5, + 0x45, 0x9a, 0x3d, 0xcb, 0x04, 0xf0, 0x14, 0xd9, 0xda, 0xb2, 0xa2, 0x12, 0x40, 0xd9, 0x91, 0x32, + 0x7f, 0x1d, 0x96, 0x14, 0x24, 0x73, 0x52, 0x45, 0xd0, 0x22, 0x4a, 0x77, 0x52, 0x4f, 0xb9, 0x3c, + 0x15, 0x05, 0xe9, 0x73, 0xe6, 0x61, 0xcd, 0x8e, 0xf3, 0x44, 0x06, 0xb2, 0xc3, 0x99, 0x27, 0x5b, + 0xd4, 0x34, 0x65, 0x41, 0xfc, 0x12, 0xe2, 0xc9, 0x24, 0x67, 0x41, 0x8b, 0x87, 0x60, 0xa6, 0xf7, + 0x10, 0xba, 0x58, 0x57, 0xf3, 0xbc, 0x20, 0xbd, 0x92, 0xc8, 0xd1, 0x81, 0x0c, 0x3f, 0x45, 0xaa, + 0xeb, 0xb8, 0x6c, 0x79, 0x52, 0x7d, 0x03, 0xca, 0xc7, 0x5e, 0xe0, 0x9c, 0xc6, 0x76, 0x12, 0x22, + 0x83, 0x2c, 0x52, 0x53, 0x09, 0x8e, 0x70, 0x4b, 0xb4, 0x52, 0x2e, 0x80, 0xe6, 0x8c, 0xa0, 0x44, + 0x32, 0x7b, 0x79, 0x3a, 0x82, 0xd8, 0x16, 0xe7, 0x21, 0x47, 0x96, 0x58, 0xa6, 0xf3, 0x41, 0xdc, + 0x3b, 0x0f, 0xd5, 0x60, 0x88, 0x9c, 0xa1, 0x52, 0xad, 0xaa, 0xa3, 0x2f, 0x05, 0xa8, 0xd4, 0x1b, + 0xe9, 0xfa, 0x27, 0x01, 0xd2, 0xc0, 0x32, 0x6e, 0xe4, 0x9e, 0x7f, 0x12, 0x48, 0x2e, 0x15, 0x72, + 0x1e, 0xc5, 0xb6, 0x13, 0xf8, 0x3e, 0x77, 0x64, 0x7b, 0x52, 0x5c, 0x6e, 0x09, 0xc5, 0x9d, 0x54, + 0x2a, 0x9b, 0x18, 0x36, 0x6d, 0xf5, 0xc6, 0xd4, 0x47, 0x12, 0xf7, 0xca, 0x4d, 0x4c, 0x5a, 0x76, + 0x94, 0x21, 0x59, 0x81, 0xd2, 0xd0, 0x3e, 0x63, 0x1e, 0x92, 0xbb, 0x32, 0x2d, 0x0e, 0x9f, 0x31, + 0x8f, 0xbc, 0x05, 0x85, 0x01, 0x0f, 0x90, 0xc6, 0x55, 0x26, 0x48, 0x46, 0x7b, 0x97, 0x07, 0x79, + 0xda, 0x35, 0xe0, 0x41, 0xca, 0xd8, 0x6e, 0x5c, 0x9e, 0xb1, 0x35, 0xff, 0x59, 0x02, 0x33, 0xdd, + 0xbe, 0x97, 0xdf, 0x26, 0x15, 0x2f, 0x75, 0x9b, 0x54, 0xbc, 0xcc, 0x6d, 0x52, 0xf1, 0xa7, 0xbf, + 0x4d, 0x9a, 0x41, 0xa5, 0x37, 0xe1, 0xea, 0x74, 0x81, 0x9c, 0xb0, 0xc4, 0x13, 0xba, 0x17, 0xac, + 0x4c, 0xd6, 0x08, 0xaa, 0xc8, 0xdb, 0x40, 0x9c, 0x24, 0x16, 0xc1, 0xc8, 0xfd, 0x8c, 0xf7, 0xd1, + 0xcc, 0xf5, 0x07, 0xd8, 0x15, 0x4c, 0xba, 0x3c, 0xd6, 0x1c, 0x2a, 0xc5, 0x98, 0x18, 0x9a, 0x97, + 0x22, 0x86, 0xb2, 0x1a, 0x23, 0x1e, 0x32, 0x37, 0x9a, 0x8a, 0x4c, 0xf5, 0x11, 0xa2, 0x74, 0x13, + 0x81, 0xbd, 0x0f, 0xd7, 0x26, 0x2c, 0xc6, 0xb1, 0xe8, 0x16, 0x73, 0x35, 0x67, 0xd4, 0xc9, 0x94, + 0xe4, 0x21, 0x5c, 0xd7, 0x76, 0x33, 0xf2, 0xaa, 0x60, 0x5e, 0xda, 0x71, 0x67, 0x46, 0x76, 0xd7, + 0x9c, 0x21, 0xf3, 0x3c, 0xee, 0x5f, 0x58, 0x42, 0xd5, 0x91, 0xae, 0x66, 0xea, 0x89, 0x58, 0x1f, + 0x41, 0x73, 0xda, 0x2e, 0x17, 0xae, 0xea, 0x50, 0x8d, 0x49, 0xd3, 0x5c, 0xc4, 0x1f, 0xc2, 0xcd, + 0xb1, 0xf5, 0x8c, 0xa0, 0x97, 0x30, 0xe8, 0xf1, 0x7f, 0xb8, 0x10, 0x77, 0xf3, 0xd7, 0x50, 0xd8, + 0xe5, 0xc1, 0xc5, 0x17, 0x1f, 0x63, 0xc6, 0x8b, 0xcf, 0xf8, 0x6a, 0x62, 0x6e, 0xe2, 0x6a, 0xa2, + 0x09, 0xa6, 0xc7, 0x84, 0x2b, 0x92, 0x7e, 0x4a, 0x41, 0xb3, 0x67, 0xf9, 0xc6, 0xe3, 0x05, 0xfe, + 0x40, 0x29, 0x15, 0xff, 0x1c, 0x0b, 0x9a, 0xbf, 0x9f, 0x87, 0xe5, 0x0b, 0x25, 0x28, 0x6d, 0x98, + 0xcf, 0xbc, 0x73, 0xe1, 0x3a, 0xb1, 0x66, 0x2a, 0x63, 0x81, 0x7c, 0xd3, 0x3f, 0x71, 0x3d, 0x2e, + 0x4f, 0x24, 0xb7, 0xb9, 0x2f, 0x67, 0xa8, 0x9a, 0x9a, 0x26, 0xad, 0x67, 0x0a, 0x4b, 0xc9, 0x65, + 0xe3, 0xc7, 0x17, 0x05, 0x3b, 0x3e, 0xf7, 0x9d, 0x0c, 0x5d, 0x50, 0x68, 0xd4, 0x74, 0xcf, 0x7d, + 0x27, 0x45, 0xbf, 0x01, 0xb5, 0x1c, 0x1a, 0xef, 0xe7, 0xd4, 0x25, 0xcc, 0x62, 0x06, 0xc5, 0x5b, + 0xcf, 0xf7, 0x60, 0xcd, 0x73, 0x8f, 0xc3, 0xcd, 0xd0, 0x8e, 0x45, 0xc4, 0xd9, 0xc8, 0x1e, 0xc9, + 0x65, 0x92, 0x0b, 0x5e, 0x42, 0xcf, 0xab, 0x4a, 0xdb, 0x45, 0xe5, 0x53, 0xad, 0x23, 0xff, 0x07, + 0x4b, 0xd2, 0x64, 0x28, 0x44, 0x68, 0x87, 0x51, 0xf0, 0xe9, 0x39, 0x16, 0x97, 0x49, 0xab, 0xe1, + 0x66, 0xf8, 0x58, 0x88, 0xf0, 0x50, 0xca, 0x24, 0x91, 0x0d, 0x23, 0x7e, 0xc2, 0x23, 0x5b, 0x78, + 0xb1, 0xae, 0xa6, 0xb2, 0x92, 0xf4, 0xbc, 0x98, 0x10, 0x28, 0x3e, 0x4f, 0x5c, 0x07, 0xc7, 0xab, + 0x49, 0xf1, 0xb7, 0x0c, 0x3b, 0xe2, 0xa3, 0xe0, 0x8c, 0xdb, 0x81, 0x6f, 0x27, 0x7e, 0xe8, 0xfa, + 0x58, 0x1c, 0x26, 0x5d, 0x54, 0xe2, 0x03, 0xff, 0x48, 0x0a, 0x65, 0x3f, 0x88, 0x87, 0x2c, 0xea, + 0xbb, 0xfe, 0x20, 0x5b, 0x0a, 0x40, 0x60, 0x2d, 0x95, 0xa7, 0x2b, 0x91, 0xe3, 0x67, 0x8e, 0xe7, + 0x72, 0x5f, 0x64, 0x06, 0xaa, 0x0e, 0x52, 0x7e, 0xd6, 0x41, 0x65, 0x6a, 0xf5, 0x0e, 0xa4, 0x72, + 0x1b, 0xdf, 0xaa, 0x52, 0x9b, 0x2a, 0xda, 0xa4, 0x23, 0x58, 0x52, 0xb4, 0xd4, 0xe2, 0x01, 0xac, + 0xc4, 0x22, 0x62, 0x82, 0x0f, 0x5c, 0x47, 0x2e, 0xca, 0x99, 0x2b, 0xa3, 0xc0, 0x73, 0x8f, 0x06, + 0x5a, 0x75, 0x98, 0x6a, 0x64, 0x0b, 0x4e, 0x22, 0xd9, 0xcc, 0xf2, 0xbb, 0xaf, 0x8e, 0x79, 0x2d, + 0x89, 0xbc, 0x6e, 0x7e, 0xf3, 0xdb, 0xb0, 0xd2, 0x77, 0x63, 0x64, 0x6b, 0x2c, 0x11, 0x81, 0xa6, + 0xd3, 0x38, 0xa0, 0x4d, 0xba, 0xac, 0x55, 0x5b, 0x89, 0x08, 0x14, 0x5d, 0x96, 0x27, 0x6b, 0x10, + 0xb1, 0x70, 0x38, 0x71, 0x56, 0xea, 0xea, 0xac, 0x64, 0x8a, 0x9c, 0x73, 0xdd, 0x2c, 0x26, 0x52, + 0x5d, 0x56, 0xce, 0x95, 0x2a, 0x9f, 0xe9, 0x7b, 0xb0, 0x36, 0x2e, 0xd5, 0x09, 0x13, 0xa2, 0x56, + 0x34, 0xd3, 0xe6, 0xac, 0xee, 0x9d, 0x41, 0x35, 0x7f, 0x15, 0x4b, 0x2a, 0xb0, 0xd0, 0x3d, 0xea, + 0x74, 0xac, 0x6e, 0xb7, 0x7e, 0x85, 0x34, 0x61, 0xad, 0xbb, 0xb7, 0xbb, 0xbf, 0xd5, 0x3b, 0xa2, + 0x96, 0xfd, 0xd1, 0x01, 0x7d, 0xba, 0xd5, 0xb3, 0x2d, 0x4a, 0x0f, 0x68, 0xdd, 0x20, 0xd7, 0xe1, + 0x6a, 0xe7, 0xe0, 0xe9, 0xe1, 0x51, 0xcf, 0xb2, 0xb7, 0x76, 0x76, 0xa8, 0xd5, 0xed, 0x6a, 0xd5, + 0x1c, 0x59, 0x86, 0xc5, 0xde, 0xde, 0x53, 0xeb, 0xe0, 0x28, 0x45, 0x17, 0x48, 0x0d, 0x2a, 0x07, + 0xbd, 0xc7, 0x16, 0xd5, 0x82, 0xd5, 0x7b, 0xbf, 0x31, 0xd4, 0x47, 0x2c, 0xd9, 0x99, 0x09, 0xc0, + 0x3c, 0xb5, 0xf6, 0x7b, 0x16, 0xad, 0x5f, 0x21, 0x26, 0x14, 0x1f, 0x1f, 0x74, 0x7b, 0x75, 0x83, + 0x54, 0xc1, 0xa4, 0xd6, 0xe1, 0xd6, 0x1e, 0xb5, 0xa4, 0xd3, 0x25, 0x80, 0xce, 0xe3, 0xad, 0x27, + 0x4f, 0xac, 0xfd, 0x5d, 0x4b, 0x7a, 0x5c, 0x81, 0xda, 0xbe, 0xd5, 0xfb, 0xe4, 0x80, 0x7e, 0x6c, + 0x77, 0x1e, 0x5b, 0x9d, 0x8f, 0x2d, 0x5a, 0x2f, 0x92, 0x35, 0x20, 0xd4, 0x3a, 0x3c, 0xea, 0x6d, + 0xf5, 0xf6, 0x0e, 0xf6, 0x33, 0x79, 0x89, 0xd4, 0xa1, 0xda, 0xd9, 0xd9, 0xb7, 0x0f, 0xe9, 0xc1, + 0xb3, 0xbd, 0x1d, 0x8b, 0xd6, 0xe7, 0x49, 0x19, 0x4a, 0x18, 0x50, 0x7d, 0x75, 0xf3, 0xf3, 0x39, + 0xa8, 0xe2, 0x8b, 0x60, 0x97, 0x47, 0x67, 0xae, 0xc3, 0xc9, 0xfb, 0x50, 0xd9, 0xe5, 0x22, 0x1b, + 0xca, 0x64, 0xea, 0xb3, 0x10, 0xe5, 0xcf, 0x9b, 0x2b, 0x17, 0x64, 0x71, 0x48, 0xde, 0x06, 0x73, + 0x97, 0x0b, 0xbc, 0x5e, 0x20, 0xb5, 0xa9, 0xaf, 0x1e, 0xcd, 0xfa, 0xa4, 0x20, 0x83, 0xab, 0xd7, + 0xf2, 0x5a, 0xf6, 0xa6, 0xc1, 0x26, 0xe1, 0xe3, 0x7b, 0xf4, 0x07, 0x00, 0xbf, 0x4c, 0x78, 0x74, + 0x8e, 0x9f, 0xfe, 0x48, 0x7e, 0xba, 0xbd, 0xc4, 0xff, 0x07, 0x50, 0x4b, 0xc3, 0xd9, 0x3e, 0xc7, + 0x8f, 0x20, 0x24, 0x25, 0x8d, 0x13, 0x9f, 0x44, 0x2e, 0x9a, 0x6e, 0x3f, 0xfa, 0xe2, 0xdb, 0x75, + 0xe3, 0xcb, 0x6f, 0xd7, 0x8d, 0x6f, 0xbe, 0x5d, 0x37, 0x7e, 0xf7, 0xdd, 0xba, 0xf1, 0xd7, 0xef, + 0xd6, 0x8d, 0x2f, 0xbe, 0x5b, 0x37, 0x60, 0xd1, 0x0d, 0xda, 0xf2, 0xe5, 0x40, 0x99, 0x6c, 0x03, + 0x2e, 0xdc, 0xa1, 0xa4, 0x5a, 0x87, 0xc6, 0xaf, 0xd4, 0xad, 0xc1, 0xf1, 0x3c, 0x52, 0xaf, 0x9f, + 0xfd, 0x37, 0x00, 0x00, 0xff, 0xff, 0x8b, 0xf7, 0xc5, 0xa2, 0x1c, 0x1d, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// ScoreServiceClient is the client API for ScoreService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ScoreServiceClient interface { + GetSettings(ctx context.Context, in *SettingsReq, opts ...grpc.CallOption) (*SettingsResp, error) + GetHosts(ctx context.Context, in *HostsReq, opts ...grpc.CallOption) (*HostsResp, error) + GetStats(ctx context.Context, in *StatsReq, opts ...grpc.CallOption) (*StatsResp, error) + QueryNodes(ctx context.Context, in *NodesReq, opts ...grpc.CallOption) (*HostsResp, error) + GetHostsByRoles(ctx context.Context, in *RolesHostsReq, opts ...grpc.CallOption) (*HostsResp, error) +} + +type scoreServiceClient struct { + cc *grpc.ClientConn +} + +func NewScoreServiceClient(cc *grpc.ClientConn) ScoreServiceClient { + return &scoreServiceClient{cc} +} + +func (c *scoreServiceClient) GetSettings(ctx context.Context, in *SettingsReq, opts ...grpc.CallOption) (*SettingsResp, error) { + out := new(SettingsResp) + err := c.cc.Invoke(ctx, "/score.ScoreService/GetSettings", in, out, opts...) + if err != nil { + return nil, err } - if m.VersionScore != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.VersionScore)))) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x85 + return out, nil +} + +func (c *scoreServiceClient) GetHosts(ctx context.Context, in *HostsReq, opts ...grpc.CallOption) (*HostsResp, error) { + out := new(HostsResp) + err := c.cc.Invoke(ctx, "/score.ScoreService/GetHosts", in, out, opts...) + if err != nil { + return nil, err } - if m.AgeScore != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.AgeScore)))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xfd + return out, nil +} + +func (c *scoreServiceClient) GetStats(ctx context.Context, in *StatsReq, opts ...grpc.CallOption) (*StatsResp, error) { + out := new(StatsResp) + err := c.cc.Invoke(ctx, "/score.ScoreService/GetStats", in, out, opts...) + if err != nil { + return nil, err } - if m.UptimeScore != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.UptimeScore)))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xf5 + return out, nil +} + +func (c *scoreServiceClient) QueryNodes(ctx context.Context, in *NodesReq, opts ...grpc.CallOption) (*HostsResp, error) { + out := new(HostsResp) + err := c.cc.Invoke(ctx, "/score.ScoreService/QueryNodes", in, out, opts...) + if err != nil { + return nil, err } - if m.Discovery != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Discovery)))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xed + return out, nil +} + +func (c *scoreServiceClient) GetHostsByRoles(ctx context.Context, in *RolesHostsReq, opts ...grpc.CallOption) (*HostsResp, error) { + out := new(HostsResp) + err := c.cc.Invoke(ctx, "/score.ScoreService/GetHostsByRoles", in, out, opts...) + if err != nil { + return nil, err } - { - size, err := m.Node_ExperimentalFlags.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintScore(dAtA, i, uint64(size)) + return out, nil +} + +// ScoreServiceServer is the server API for ScoreService service. +type ScoreServiceServer interface { + GetSettings(context.Context, *SettingsReq) (*SettingsResp, error) + GetHosts(context.Context, *HostsReq) (*HostsResp, error) + GetStats(context.Context, *StatsReq) (*StatsResp, error) + QueryNodes(context.Context, *NodesReq) (*HostsResp, error) + GetHostsByRoles(context.Context, *RolesHostsReq) (*HostsResp, error) +} + +// UnimplementedScoreServiceServer can be embedded to have forward compatible implementations. +type UnimplementedScoreServiceServer struct { +} + +func (*UnimplementedScoreServiceServer) GetSettings(ctx context.Context, req *SettingsReq) (*SettingsResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSettings not implemented") +} +func (*UnimplementedScoreServiceServer) GetHosts(ctx context.Context, req *HostsReq) (*HostsResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetHosts not implemented") +} +func (*UnimplementedScoreServiceServer) GetStats(ctx context.Context, req *StatsReq) (*StatsResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStats not implemented") +} +func (*UnimplementedScoreServiceServer) QueryNodes(ctx context.Context, req *NodesReq) (*HostsResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryNodes not implemented") +} +func (*UnimplementedScoreServiceServer) GetHostsByRoles(ctx context.Context, req *RolesHostsReq) (*HostsResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetHostsByRoles not implemented") +} + +func RegisterScoreServiceServer(s *grpc.Server, srv ScoreServiceServer) { + s.RegisterService(&_ScoreService_serviceDesc, srv) +} + +func _ScoreService_GetSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SettingsReq) + if err := dec(in); err != nil { + return nil, err } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xe2 - if len(m.CountryShort) > 0 { - i -= len(m.CountryShort) - copy(dAtA[i:], m.CountryShort) - i = encodeVarintScore(dAtA, i, uint64(len(m.CountryShort))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xda + if interceptor == nil { + return srv.(ScoreServiceServer).GetSettings(ctx, in) } - if m.CollateralBurn != 0 { - i = encodeVarintScore(dAtA, i, uint64(m.CollateralBurn)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xd0 + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/score.ScoreService/GetSettings", } - if m.CollateralLost != 0 { - i = encodeVarintScore(dAtA, i, uint64(m.CollateralLost)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xc8 + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ScoreServiceServer).GetSettings(ctx, req.(*SettingsReq)) } - if m.CollateralStake != 0 { - i = encodeVarintScore(dAtA, i, uint64(m.CollateralStake)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xc0 + return interceptor(ctx, in, info, handler) +} + +func _ScoreService_GetHosts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HostsReq) + if err := dec(in); err != nil { + return nil, err } - if m.BandwidthPriceEst != 0 { - i = encodeVarintScore(dAtA, i, uint64(m.BandwidthPriceEst)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb8 + if interceptor == nil { + return srv.(ScoreServiceServer).GetHosts(ctx, in) } - if m.BandwidthPriceAsk != 0 { - i = encodeVarintScore(dAtA, i, uint64(m.BandwidthPriceAsk)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb0 + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/score.ScoreService/GetHosts", } - if m.BandwidthLimit != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.BandwidthLimit)))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa9 - } - if m.StoragePriceEst != 0 { - i = encodeVarintScore(dAtA, i, uint64(m.StoragePriceEst)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa0 - } - if m.StoragePriceAsk != 0 { - i = encodeVarintScore(dAtA, i, uint64(m.StoragePriceAsk)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x98 - } - if m.StorageTimeMin != 0 { - i = encodeVarintScore(dAtA, i, uint64(m.StorageTimeMin)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x90 - } - if m.StorageVolumeLeft != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.StorageVolumeLeft)))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x8d - } - if m.StorageVolumeCap != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.StorageVolumeCap)))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x85 - } - { - size, err := m.Location.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintScore(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x7a - if m.DownloadVariance != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.DownloadVariance)))) - i-- - dAtA[i] = 0x75 - } - if m.DownloadAverage != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.DownloadAverage)))) - i-- - dAtA[i] = 0x6d + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ScoreServiceServer).GetHosts(ctx, req.(*HostsReq)) } - if m.UploadVariance != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.UploadVariance)))) - i-- - dAtA[i] = 0x65 + return interceptor(ctx, in, info, handler) +} + +func _ScoreService_GetStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StatsReq) + if err := dec(in); err != nil { + return nil, err } - if m.UploadAverage != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.UploadAverage)))) - i-- - dAtA[i] = 0x5d + if interceptor == nil { + return srv.(ScoreServiceServer).GetStats(ctx, in) } - if m.Reputation != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Reputation)))) - i-- - dAtA[i] = 0x55 + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/score.ScoreService/GetStats", } - if m.Age != 0 { - i = encodeVarintScore(dAtA, i, uint64(m.Age)) - i-- - dAtA[i] = 0x48 + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ScoreServiceServer).GetStats(ctx, req.(*StatsReq)) } - if m.Uptime != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Uptime)))) - i-- - dAtA[i] = 0x45 + return interceptor(ctx, in, info, handler) +} + +func _ScoreService_QueryNodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(NodesReq) + if err := dec(in); err != nil { + return nil, err } - if m.HeartBeats != 0 { - i = encodeVarintScore(dAtA, i, uint64(m.HeartBeats)) - i-- - dAtA[i] = 0x38 + if interceptor == nil { + return srv.(ScoreServiceServer).QueryNodes(ctx, in) } - if m.Score != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Score)))) - i-- - dAtA[i] = 0x35 + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/score.ScoreService/QueryNodes", } - if len(m.BtfsVersion) > 0 { - i -= len(m.BtfsVersion) - copy(dAtA[i:], m.BtfsVersion) - i = encodeVarintScore(dAtA, i, uint64(len(m.BtfsVersion))) - i-- - dAtA[i] = 0x2a + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ScoreServiceServer).QueryNodes(ctx, req.(*NodesReq)) } - if len(m.Region) > 0 { - i -= len(m.Region) - copy(dAtA[i:], m.Region) - i = encodeVarintScore(dAtA, i, uint64(len(m.Region))) - i-- - dAtA[i] = 0x22 + return interceptor(ctx, in, info, handler) +} + +func _ScoreService_GetHostsByRoles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RolesHostsReq) + if err := dec(in); err != nil { + return nil, err } - n11, err11 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.UpdateTimestamp, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.UpdateTimestamp):]) - if err11 != nil { - return 0, err11 + if interceptor == nil { + return srv.(ScoreServiceServer).GetHostsByRoles(ctx, in) } - i -= n11 - i = encodeVarintScore(dAtA, i, uint64(n11)) - i-- - dAtA[i] = 0x1a - n12, err12 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.CreateTimestamp, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.CreateTimestamp):]) - if err12 != nil { - return 0, err12 + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/score.ScoreService/GetHostsByRoles", } - i -= n12 - i = encodeVarintScore(dAtA, i, uint64(n12)) - i-- - dAtA[i] = 0x12 - if len(m.NodeId) > 0 { - i -= len(m.NodeId) - copy(dAtA[i:], m.NodeId) - i = encodeVarintScore(dAtA, i, uint64(len(m.NodeId))) - i-- - dAtA[i] = 0xa + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ScoreServiceServer).GetHostsByRoles(ctx, req.(*RolesHostsReq)) } - return len(dAtA) - i, nil + return interceptor(ctx, in, info, handler) } -func (m *HostsData) Marshal() (dAtA []byte, err error) { +var _ScoreService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "score.ScoreService", + HandlerType: (*ScoreServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetSettings", + Handler: _ScoreService_GetSettings_Handler, + }, + { + MethodName: "GetHosts", + Handler: _ScoreService_GetHosts_Handler, + }, + { + MethodName: "GetStats", + Handler: _ScoreService_GetStats_Handler, + }, + { + MethodName: "QueryNodes", + Handler: _ScoreService_QueryNodes_Handler, + }, + { + MethodName: "GetHostsByRoles", + Handler: _ScoreService_GetHostsByRoles_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "protos/score/score.proto", +} + +func (m *NodesReq) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2291,12 +2682,12 @@ func (m *HostsData) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *HostsData) MarshalTo(dAtA []byte) (int, error) { +func (m *NodesReq) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *HostsData) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *NodesReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2305,16 +2696,25 @@ func (m *HostsData) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.Hosts) > 0 { - for iNdEx := len(m.Hosts) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Hosts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintScore(dAtA, i, uint64(size)) - } + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = encodeVarintScore(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x1a + } + if len(m.RequesterId) > 0 { + i -= len(m.RequesterId) + copy(dAtA[i:], m.RequesterId) + i = encodeVarintScore(dAtA, i, uint64(len(m.RequesterId))) + i-- + dAtA[i] = 0x12 + } + if len(m.NodeId) > 0 { + for iNdEx := len(m.NodeId) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.NodeId[iNdEx]) + copy(dAtA[i:], m.NodeId[iNdEx]) + i = encodeVarintScore(dAtA, i, uint64(len(m.NodeId[iNdEx]))) i-- dAtA[i] = 0xa } @@ -2322,7 +2722,7 @@ func (m *HostsData) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Location) Marshal() (dAtA []byte, err error) { +func (m *SettingsReq) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2332,12 +2732,12 @@ func (m *Location) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Location) MarshalTo(dAtA []byte) (int, error) { +func (m *SettingsReq) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Location) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SettingsReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2346,412 +2746,4605 @@ func (m *Location) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } - if m.Lon != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Lon)))) + if m.RespSize != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.RespSize)) i-- - dAtA[i] = 0x11 + dAtA[i] = 0x10 } - if m.Lat != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Lat)))) - i-- - dAtA[i] = 0x9 + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintScore(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func encodeVarintScore(dAtA []byte, offset int, v uint64) int { - offset -= sovScore(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *SettingsResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *NodesReq) Size() (n int) { - if m == nil { - return 0 - } + +func (m *SettingsResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SettingsResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.NodeId) > 0 { - for _, s := range m.NodeId { - l = len(s) - n += 1 + l + sovScore(uint64(l)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.SettingsData != nil { + { + size, err := m.SettingsData.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintScore(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x22 } - l = len(m.RequesterId) - if l > 0 { - n += 1 + l + sovScore(uint64(l)) + n2, err2 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.ResponseTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime):]) + if err2 != nil { + return 0, err2 } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovScore(uint64(l)) + i -= n2 + i = encodeVarintScore(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0x1a + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintScore(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if m.Code != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 } - return n + return len(dAtA) - i, nil } -func (m *SettingsReq) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovScore(uint64(l)) - } - if m.RespSize != 0 { - n += 1 + sovScore(uint64(m.RespSize)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) +func (m *SettingsData) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - return n + return dAtA[:n], nil } -func (m *SettingsResp) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovScore(uint64(m.Code)) - } - l = len(m.Message) - if l > 0 { - n += 1 + l + sovScore(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime) - n += 1 + l + sovScore(uint64(l)) - if m.SettingsData != nil { - l = m.SettingsData.Size() - n += 1 + l + sovScore(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n +func (m *SettingsData) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SettingsData) Size() (n int) { - if m == nil { - return 0 - } +func (m *SettingsData) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.StoragePriceAsk != 0 { - n += 9 - } - if m.BandwidthPriceAsk != 0 { - n += 9 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.StorageTimeMin != 0 { - n += 9 + if m.CollateralStake != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.CollateralStake)))) + i-- + dAtA[i] = 0x29 } if m.BandwidthLimit != 0 { - n += 9 + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.BandwidthLimit)))) + i-- + dAtA[i] = 0x21 } - if m.CollateralStake != 0 { - n += 9 + if m.StorageTimeMin != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.StorageTimeMin)))) + i-- + dAtA[i] = 0x19 } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if m.BandwidthPriceAsk != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.BandwidthPriceAsk)))) + i-- + dAtA[i] = 0x11 } - return n + if m.StoragePriceAsk != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.StoragePriceAsk)))) + i-- + dAtA[i] = 0x9 + } + return len(dAtA) - i, nil } -func (m *HostsReq) Size() (n int) { - if m == nil { - return 0 +func (m *HostsReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *HostsReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HostsReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovScore(uint64(l)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.RespSize != 0 { - n += 1 + sovScore(uint64(m.RespSize)) + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintScore(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x22 } if m.Mode != 0 { - n += 1 + sovScore(uint64(m.Mode)) + i = encodeVarintScore(dAtA, i, uint64(m.Mode)) + i-- + dAtA[i] = 0x18 } - l = len(m.Version) - if l > 0 { - n += 1 + l + sovScore(uint64(l)) + if m.RespSize != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.RespSize)) + i-- + dAtA[i] = 0x10 } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintScore(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *RolesHostsReq) Size() (n int) { - if m == nil { - return 0 +func (m *RolesHostsReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *RolesHostsReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RolesHostsReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovScore(uint64(l)) - } - if m.RespSize != 0 { - n += 1 + sovScore(uint64(m.RespSize)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Role != 0 { - n += 1 + sovScore(uint64(m.Role)) + i = encodeVarintScore(dAtA, i, uint64(m.Role)) + i-- + dAtA[i] = 0x18 } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if m.RespSize != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.RespSize)) + i-- + dAtA[i] = 0x10 } - return n + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintScore(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *HostsResp) Size() (n int) { - if m == nil { - return 0 +func (m *HostsResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *HostsResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HostsResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.Code != 0 { - n += 1 + sovScore(uint64(m.Code)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - l = len(m.Message) - if l > 0 { - n += 1 + l + sovScore(uint64(l)) + n3, err3 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.ResponseTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime):]) + if err3 != nil { + return 0, err3 } - if m.Hosts != nil { - l = m.Hosts.Size() - n += 1 + l + sovScore(uint64(l)) + i -= n3 + i = encodeVarintScore(dAtA, i, uint64(n3)) + i-- + dAtA[i] = 0x32 + if len(m.Mode) > 0 { + i -= len(m.Mode) + copy(dAtA[i:], m.Mode) + i = encodeVarintScore(dAtA, i, uint64(len(m.Mode))) + i-- + dAtA[i] = 0x2a } if m.RespSize != 0 { - n += 1 + sovScore(uint64(m.RespSize)) + i = encodeVarintScore(dAtA, i, uint64(m.RespSize)) + i-- + dAtA[i] = 0x20 } - l = len(m.Mode) - if l > 0 { - n += 1 + l + sovScore(uint64(l)) + if m.Hosts != nil { + { + size, err := m.Hosts.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintScore(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime) - n += 1 + l + sovScore(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintScore(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0x12 } - return n + if m.Code != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } -func (m *StatsReq) Size() (n int) { - if m == nil { - return 0 +func (m *StatsReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *StatsReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StatsReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovScore(uint64(l)) - } if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return n + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintScore(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *StatsResp) Size() (n int) { - if m == nil { - return 0 +func (m *StatsResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *StatsResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StatsResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.Code != 0 { - n += 1 + sovScore(uint64(m.Code)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - l = len(m.Message) - if l > 0 { - n += 1 + l + sovScore(uint64(l)) + { + size, err := m.StorageStat_HostStats.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintScore(dAtA, i, uint64(size)) } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime) - n += 1 + l + sovScore(uint64(l)) - l = m.StorageStat_HostStats.Size() - n += 1 + l + sovScore(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + i-- + dAtA[i] = 0x22 + n6, err6 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.ResponseTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime):]) + if err6 != nil { + return 0, err6 } - return n + i -= n6 + i = encodeVarintScore(dAtA, i, uint64(n6)) + i-- + dAtA[i] = 0x1a + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintScore(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0x12 + } + if m.Code != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } -func (m *Host) Size() (n int) { - if m == nil { - return 0 +func (m *Host) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *Host) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Host) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.NodeId) - if l > 0 { - n += 1 + l + sovScore(uint64(l)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.CreateTimestamp) - n += 1 + l + sovScore(uint64(l)) - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.UpdateTimestamp) - n += 1 + l + sovScore(uint64(l)) - l = len(m.Region) - if l > 0 { - n += 1 + l + sovScore(uint64(l)) + if len(m.Roles) > 0 { + dAtA8 := make([]byte, len(m.Roles)*10) + var j7 int + for _, num := range m.Roles { + for num >= 1<<7 { + dAtA8[j7] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j7++ + } + dAtA8[j7] = uint8(num) + j7++ + } + i -= j7 + copy(dAtA[i:], dAtA8[:j7]) + i = encodeVarintScore(dAtA, i, uint64(j7)) + i-- + dAtA[i] = 0x2 + i-- + dAtA[i] = 0x9a } - l = len(m.BtfsVersion) - if l > 0 { - n += 1 + l + sovScore(uint64(l)) + if m.DownloadSpeedScore != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.DownloadSpeedScore)))) + i-- + dAtA[i] = 0x2 + i-- + dAtA[i] = 0x95 } - if m.Score != 0 { - n += 5 + if m.UploadSpeedScore != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.UploadSpeedScore)))) + i-- + dAtA[i] = 0x2 + i-- + dAtA[i] = 0x8d } - if m.HeartBeats != 0 { - n += 1 + sovScore(uint64(m.HeartBeats)) + if m.VersionScore != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.VersionScore)))) + i-- + dAtA[i] = 0x2 + i-- + dAtA[i] = 0x85 } - if m.Uptime != 0 { - n += 5 + if m.AgeScore != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.AgeScore)))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xfd } - if m.Age != 0 { - n += 1 + sovScore(uint64(m.Age)) + if m.UptimeScore != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.UptimeScore)))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xf5 } - if m.Reputation != 0 { - n += 5 + if m.Discovery != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Discovery)))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xed } - if m.UploadAverage != 0 { - n += 5 + { + size, err := m.Node_ExperimentalFlags.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintScore(dAtA, i, uint64(size)) } - if m.UploadVariance != 0 { - n += 5 + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xe2 + if len(m.CountryShort) > 0 { + i -= len(m.CountryShort) + copy(dAtA[i:], m.CountryShort) + i = encodeVarintScore(dAtA, i, uint64(len(m.CountryShort))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xda } - if m.DownloadAverage != 0 { - n += 5 + if m.CollateralBurn != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.CollateralBurn)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xd0 } - if m.DownloadVariance != 0 { - n += 5 + if m.CollateralLost != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.CollateralLost)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xc8 } - l = m.Location.Size() - n += 1 + l + sovScore(uint64(l)) - if m.StorageVolumeCap != 0 { - n += 6 + if m.CollateralStake != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.CollateralStake)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xc0 } - if m.StorageVolumeLeft != 0 { - n += 6 + if m.BandwidthPriceEst != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.BandwidthPriceEst)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb8 } - if m.StorageTimeMin != 0 { - n += 2 + sovScore(uint64(m.StorageTimeMin)) + if m.BandwidthPriceAsk != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.BandwidthPriceAsk)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb0 } - if m.StoragePriceAsk != 0 { - n += 2 + sovScore(uint64(m.StoragePriceAsk)) + if m.BandwidthLimit != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.BandwidthLimit)))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa9 } if m.StoragePriceEst != 0 { - n += 2 + sovScore(uint64(m.StoragePriceEst)) + i = encodeVarintScore(dAtA, i, uint64(m.StoragePriceEst)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa0 } - if m.BandwidthLimit != 0 { - n += 10 + if m.StoragePriceAsk != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.StoragePriceAsk)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x98 } - if m.BandwidthPriceAsk != 0 { - n += 2 + sovScore(uint64(m.BandwidthPriceAsk)) + if m.StorageTimeMin != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.StorageTimeMin)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x90 } - if m.BandwidthPriceEst != 0 { - n += 2 + sovScore(uint64(m.BandwidthPriceEst)) + if m.StorageVolumeLeft != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.StorageVolumeLeft)))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x8d } - if m.CollateralStake != 0 { - n += 2 + sovScore(uint64(m.CollateralStake)) + if m.StorageVolumeCap != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.StorageVolumeCap)))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x85 } - if m.CollateralLost != 0 { - n += 2 + sovScore(uint64(m.CollateralLost)) + { + size, err := m.Location.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintScore(dAtA, i, uint64(size)) } - if m.CollateralBurn != 0 { - n += 2 + sovScore(uint64(m.CollateralBurn)) + i-- + dAtA[i] = 0x7a + if m.DownloadVariance != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.DownloadVariance)))) + i-- + dAtA[i] = 0x75 } - l = len(m.CountryShort) - if l > 0 { - n += 2 + l + sovScore(uint64(l)) + if m.DownloadAverage != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.DownloadAverage)))) + i-- + dAtA[i] = 0x6d } - l = m.Node_ExperimentalFlags.Size() - n += 2 + l + sovScore(uint64(l)) - if m.Discovery != 0 { - n += 6 + if m.UploadVariance != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.UploadVariance)))) + i-- + dAtA[i] = 0x65 } - if m.UptimeScore != 0 { - n += 6 + if m.UploadAverage != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.UploadAverage)))) + i-- + dAtA[i] = 0x5d } - if m.AgeScore != 0 { - n += 6 + if m.Reputation != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Reputation)))) + i-- + dAtA[i] = 0x55 } - if m.VersionScore != 0 { - n += 6 + if m.Age != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.Age)) + i-- + dAtA[i] = 0x48 } - if m.UploadSpeedScore != 0 { - n += 6 + if m.Uptime != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Uptime)))) + i-- + dAtA[i] = 0x45 } - if m.DownloadSpeedScore != 0 { - n += 6 + if m.HeartBeats != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.HeartBeats)) + i-- + dAtA[i] = 0x38 } - if len(m.Roles) > 0 { - l = 0 - for _, e := range m.Roles { - l += sovScore(uint64(e)) - } - n += 2 + sovScore(uint64(l)) + l + if m.Score != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Score)))) + i-- + dAtA[i] = 0x35 } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if len(m.BtfsVersion) > 0 { + i -= len(m.BtfsVersion) + copy(dAtA[i:], m.BtfsVersion) + i = encodeVarintScore(dAtA, i, uint64(len(m.BtfsVersion))) + i-- + dAtA[i] = 0x2a } - return n + if len(m.Region) > 0 { + i -= len(m.Region) + copy(dAtA[i:], m.Region) + i = encodeVarintScore(dAtA, i, uint64(len(m.Region))) + i-- + dAtA[i] = 0x22 + } + n11, err11 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.UpdateTimestamp, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.UpdateTimestamp):]) + if err11 != nil { + return 0, err11 + } + i -= n11 + i = encodeVarintScore(dAtA, i, uint64(n11)) + i-- + dAtA[i] = 0x1a + n12, err12 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.CreateTimestamp, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.CreateTimestamp):]) + if err12 != nil { + return 0, err12 + } + i -= n12 + i = encodeVarintScore(dAtA, i, uint64(n12)) + i-- + dAtA[i] = 0x12 + if len(m.NodeId) > 0 { + i -= len(m.NodeId) + copy(dAtA[i:], m.NodeId) + i = encodeVarintScore(dAtA, i, uint64(len(m.NodeId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *HostsData) Size() (n int) { - if m == nil { - return 0 +func (m *HostsData) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *HostsData) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HostsData) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Hosts) > 0 { - for _, e := range m.Hosts { - l = e.Size() - n += 1 + l + sovScore(uint64(l)) + for iNdEx := len(m.Hosts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Hosts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintScore(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *Location) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Location) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Location) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Lon != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Lon)))) + i-- + dAtA[i] = 0x11 + } + if m.Lat != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Lat)))) + i-- + dAtA[i] = 0x9 + } + return len(dAtA) - i, nil +} + +func (m *StorageStat) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StorageStat) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StorageStat) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + { + size, err := m.RenterStats.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintScore(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.HostStats.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintScore(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *StorageStat_HostStats) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StorageStat_HostStats) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StorageStat_HostStats) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + n15, err15 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.LastUpdated, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.LastUpdated):]) + if err15 != nil { + return 0, err15 + } + i -= n15 + i = encodeVarintScore(dAtA, i, uint64(n15)) + i-- + dAtA[i] = 0x7a + if m.DownloadSpeedWeight != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.DownloadSpeedWeight)))) + i-- + dAtA[i] = 0x75 + } + if m.UploadSpeedWeight != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.UploadSpeedWeight)))) + i-- + dAtA[i] = 0x6d + } + if m.SpeedWeight != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.SpeedWeight)))) + i-- + dAtA[i] = 0x65 + } + if m.VersionWeight != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.VersionWeight)))) + i-- + dAtA[i] = 0x5d + } + if m.AgeWeight != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.AgeWeight)))) + i-- + dAtA[i] = 0x55 + } + if m.UptimeWeight != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.UptimeWeight)))) + i-- + dAtA[i] = 0x4d + } + if m.DownloadSpeedScore != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.DownloadSpeedScore)))) + i-- + dAtA[i] = 0x45 + } + if m.UploadSpeedScore != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.UploadSpeedScore)))) + i-- + dAtA[i] = 0x3d + } + if m.SpeedScore != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.SpeedScore)))) + i-- + dAtA[i] = 0x35 + } + if m.VersionScore != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.VersionScore)))) + i-- + dAtA[i] = 0x2d + } + if m.AgeScore != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.AgeScore)))) + i-- + dAtA[i] = 0x25 + } + if m.UptimeScore != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.UptimeScore)))) + i-- + dAtA[i] = 0x1d + } + if m.Score != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Score)))) + i-- + dAtA[i] = 0x15 + } + if m.Uptime != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Uptime)))) + i-- + dAtA[i] = 0xd + } + return len(dAtA) - i, nil +} + +func (m *StorageStat_Host) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StorageStat_Host) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StorageStat_Host) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + { + size, err := m.StorageStat_HostStats.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintScore(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + if m.StorageDiskAvailable != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.StorageDiskAvailable)) + i-- + dAtA[i] = 0x28 + } + if m.StorageDiskTotal != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.StorageDiskTotal)) + i-- + dAtA[i] = 0x20 + } + if m.StorageCap != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.StorageCap)) + i-- + dAtA[i] = 0x18 + } + if m.StorageUsed != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.StorageUsed)) + i-- + dAtA[i] = 0x10 + } + if m.Online { + i-- + if m.Online { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *StorageStat_Renter) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StorageStat_Renter) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StorageStat_Renter) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Reserved) > 0 { + i -= len(m.Reserved) + copy(dAtA[i:], m.Reserved) + i = encodeVarintScore(dAtA, i, uint64(len(m.Reserved))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Node) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Node) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Node) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + { + size, err := m.Node_ExperimentalFlags.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintScore(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xda + { + size, err := m.Node_Geo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintScore(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xd2 + if len(m.HVal) > 0 { + i -= len(m.HVal) + copy(dAtA[i:], m.HVal) + i = encodeVarintScore(dAtA, i, uint64(len(m.HVal))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xca + } + n19, err19 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.TimeCreated, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.TimeCreated):]) + if err19 != nil { + return 0, err19 + } + i -= n19 + i = encodeVarintScore(dAtA, i, uint64(n19)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xc2 + if m.PeersConnected != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.PeersConnected)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb8 + } + if len(m.CpuInfo) > 0 { + i -= len(m.CpuInfo) + copy(dAtA[i:], m.CpuInfo) + i = encodeVarintScore(dAtA, i, uint64(len(m.CpuInfo))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xaa + } + if len(m.ArchType) > 0 { + i -= len(m.ArchType) + copy(dAtA[i:], m.ArchType) + i = encodeVarintScore(dAtA, i, uint64(len(m.ArchType))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa2 + } + if len(m.OsType) > 0 { + i -= len(m.OsType) + copy(dAtA[i:], m.OsType) + i = encodeVarintScore(dAtA, i, uint64(len(m.OsType))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x9a + } + if m.BlocksDown != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.BlocksDown)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x90 + } + if m.BlocksUp != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.BlocksUp)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x88 + } + if m.Reputation != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Reputation)))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x81 + } + { + size, err := m.Node_Settings.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintScore(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x7a + if m.BandwidthPriceDeal != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.BandwidthPriceDeal)) + i-- + dAtA[i] = 0x70 + } + if m.StoragePriceDeal != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.StoragePriceDeal)) + i-- + dAtA[i] = 0x68 + } + if m.TotalDownload != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.TotalDownload)) + i-- + dAtA[i] = 0x60 + } + if m.TotalUpload != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.TotalUpload)) + i-- + dAtA[i] = 0x58 + } + if m.Download != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.Download)) + i-- + dAtA[i] = 0x50 + } + if m.Upload != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.Upload)) + i-- + dAtA[i] = 0x48 + } + if m.CpuUsed != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.CpuUsed)))) + i-- + dAtA[i] = 0x41 + } + if m.MemoryUsed != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.MemoryUsed)) + i-- + dAtA[i] = 0x38 + } + if m.StorageVolumeCap != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.StorageVolumeCap)) + i-- + dAtA[i] = 0x30 + } + if m.StorageUsed != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.StorageUsed)) + i-- + dAtA[i] = 0x28 + } + if m.UpTime != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.UpTime)) + i-- + dAtA[i] = 0x20 + } + if len(m.BtfsVersion) > 0 { + i -= len(m.BtfsVersion) + copy(dAtA[i:], m.BtfsVersion) + i = encodeVarintScore(dAtA, i, uint64(len(m.BtfsVersion))) + i-- + dAtA[i] = 0x1a + } + if len(m.NodeId) > 0 { + i -= len(m.NodeId) + copy(dAtA[i:], m.NodeId) + i = encodeVarintScore(dAtA, i, uint64(len(m.NodeId))) + i-- + dAtA[i] = 0x12 + } + if len(m.tableName) > 0 { + i -= len(m.tableName) + copy(dAtA[i:], m.tableName) + i = encodeVarintScore(dAtA, i, uint64(len(m.tableName))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Node_Settings) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Node_Settings) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Node_Settings) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.ChallengeCustomizedPricing { + i-- + if m.ChallengeCustomizedPricing { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x70 + } + if m.ChallengePriceCustomized != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.ChallengePriceCustomized)) + i-- + dAtA[i] = 0x68 + } + if m.ChallengePriceDefault != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.ChallengePriceDefault)) + i-- + dAtA[i] = 0x60 + } + if m.RepairCustomizedPricing { + i-- + if m.RepairCustomizedPricing { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x58 + } + if m.RepairPriceCustomized != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.RepairPriceCustomized)) + i-- + dAtA[i] = 0x50 + } + if m.RepairPriceDefault != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.RepairPriceDefault)) + i-- + dAtA[i] = 0x48 + } + if len(m.Roles) > 0 { + dAtA22 := make([]byte, len(m.Roles)*10) + var j21 int + for _, num := range m.Roles { + for num >= 1<<7 { + dAtA22[j21] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j21++ + } + dAtA22[j21] = uint8(num) + j21++ + } + i -= j21 + copy(dAtA[i:], dAtA22[:j21]) + i = encodeVarintScore(dAtA, i, uint64(j21)) + i-- + dAtA[i] = 0x42 + } + if m.CustomizedPricing { + i-- + if m.CustomizedPricing { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x38 + } + if m.StoragePriceDefault != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.StoragePriceDefault)) + i-- + dAtA[i] = 0x30 + } + if m.CollateralStake != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.CollateralStake)) + i-- + dAtA[i] = 0x28 + } + if m.BandwidthLimit != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.BandwidthLimit)))) + i-- + dAtA[i] = 0x21 + } + if m.StorageTimeMin != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.StorageTimeMin)) + i-- + dAtA[i] = 0x18 + } + if m.BandwidthPriceAsk != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.BandwidthPriceAsk)) + i-- + dAtA[i] = 0x10 + } + if m.StoragePriceAsk != 0 { + i = encodeVarintScore(dAtA, i, uint64(m.StoragePriceAsk)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Node_Geo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Node_Geo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Node_Geo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Longitude != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Longitude)))) + i-- + dAtA[i] = 0x25 + } + if m.Latitude != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Latitude)))) + i-- + dAtA[i] = 0x1d + } + if len(m.Region) > 0 { + i -= len(m.Region) + copy(dAtA[i:], m.Region) + i = encodeVarintScore(dAtA, i, uint64(len(m.Region))) + i-- + dAtA[i] = 0x12 + } + if len(m.CountryShort) > 0 { + i -= len(m.CountryShort) + copy(dAtA[i:], m.CountryShort) + i = encodeVarintScore(dAtA, i, uint64(len(m.CountryShort))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Node_ExperimentalFlags) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Node_ExperimentalFlags) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Node_ExperimentalFlags) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.ChallengeHostEnabled { + i-- + if m.ChallengeHostEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x90 + } + if m.RepairHostEnabled { + i-- + if m.RepairHostEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x88 + } + if m.GraphsyncEnabled { + i-- + if m.GraphsyncEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x80 + } + if m.DisableAutoUpdate { + i-- + if m.DisableAutoUpdate { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x78 + } + if m.UrlStoreEnabled { + i-- + if m.UrlStoreEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x70 + } + if m.StrategicProviding { + i-- + if m.StrategicProviding { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x68 + } + if m.StorageHostEnabled { + i-- + if m.StorageHostEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x60 + } + if m.StorageClientEnabled { + i-- + if m.StorageClientEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x58 + } + if m.ShardingEnabled { + i-- + if m.ShardingEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x50 + } + if m.RemoveOnUnpin { + i-- + if m.RemoveOnUnpin { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x48 + } + if m.Quic { + i-- + if m.Quic { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x40 + } + if m.PreferTls { + i-- + if m.PreferTls { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x38 + } + if m.P2PHttpProxy { + i-- + if m.P2PHttpProxy { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if m.Libp2PStreamMounting { + i-- + if m.Libp2PStreamMounting { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if len(m.HostsSyncMode) > 0 { + i -= len(m.HostsSyncMode) + copy(dAtA[i:], m.HostsSyncMode) + i = encodeVarintScore(dAtA, i, uint64(len(m.HostsSyncMode))) + i-- + dAtA[i] = 0x22 + } + if m.HostsSyncEnabled { + i-- + if m.HostsSyncEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if m.FilestoreEnabled { + i-- + if m.FilestoreEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if m.Analytics { + i-- + if m.Analytics { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintScore(dAtA []byte, offset int, v uint64) int { + offset -= sovScore(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *NodesReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.NodeId) > 0 { + for _, s := range m.NodeId { + l = len(s) + n += 1 + l + sovScore(uint64(l)) + } + } + l = len(m.RequesterId) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SettingsReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + if m.RespSize != 0 { + n += 1 + sovScore(uint64(m.RespSize)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SettingsResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Code != 0 { + n += 1 + sovScore(uint64(m.Code)) + } + l = len(m.Message) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime) + n += 1 + l + sovScore(uint64(l)) + if m.SettingsData != nil { + l = m.SettingsData.Size() + n += 1 + l + sovScore(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SettingsData) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.StoragePriceAsk != 0 { + n += 9 + } + if m.BandwidthPriceAsk != 0 { + n += 9 + } + if m.StorageTimeMin != 0 { + n += 9 + } + if m.BandwidthLimit != 0 { + n += 9 + } + if m.CollateralStake != 0 { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *HostsReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + if m.RespSize != 0 { + n += 1 + sovScore(uint64(m.RespSize)) + } + if m.Mode != 0 { + n += 1 + sovScore(uint64(m.Mode)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *RolesHostsReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + if m.RespSize != 0 { + n += 1 + sovScore(uint64(m.RespSize)) + } + if m.Role != 0 { + n += 1 + sovScore(uint64(m.Role)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *HostsResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Code != 0 { + n += 1 + sovScore(uint64(m.Code)) + } + l = len(m.Message) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + if m.Hosts != nil { + l = m.Hosts.Size() + n += 1 + l + sovScore(uint64(l)) + } + if m.RespSize != 0 { + n += 1 + sovScore(uint64(m.RespSize)) + } + l = len(m.Mode) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime) + n += 1 + l + sovScore(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *StatsReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *StatsResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Code != 0 { + n += 1 + sovScore(uint64(m.Code)) + } + l = len(m.Message) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime) + n += 1 + l + sovScore(uint64(l)) + l = m.StorageStat_HostStats.Size() + n += 1 + l + sovScore(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Host) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.NodeId) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.CreateTimestamp) + n += 1 + l + sovScore(uint64(l)) + l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.UpdateTimestamp) + n += 1 + l + sovScore(uint64(l)) + l = len(m.Region) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + l = len(m.BtfsVersion) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + if m.Score != 0 { + n += 5 + } + if m.HeartBeats != 0 { + n += 1 + sovScore(uint64(m.HeartBeats)) + } + if m.Uptime != 0 { + n += 5 + } + if m.Age != 0 { + n += 1 + sovScore(uint64(m.Age)) + } + if m.Reputation != 0 { + n += 5 + } + if m.UploadAverage != 0 { + n += 5 + } + if m.UploadVariance != 0 { + n += 5 + } + if m.DownloadAverage != 0 { + n += 5 + } + if m.DownloadVariance != 0 { + n += 5 + } + l = m.Location.Size() + n += 1 + l + sovScore(uint64(l)) + if m.StorageVolumeCap != 0 { + n += 6 + } + if m.StorageVolumeLeft != 0 { + n += 6 + } + if m.StorageTimeMin != 0 { + n += 2 + sovScore(uint64(m.StorageTimeMin)) + } + if m.StoragePriceAsk != 0 { + n += 2 + sovScore(uint64(m.StoragePriceAsk)) + } + if m.StoragePriceEst != 0 { + n += 2 + sovScore(uint64(m.StoragePriceEst)) + } + if m.BandwidthLimit != 0 { + n += 10 + } + if m.BandwidthPriceAsk != 0 { + n += 2 + sovScore(uint64(m.BandwidthPriceAsk)) + } + if m.BandwidthPriceEst != 0 { + n += 2 + sovScore(uint64(m.BandwidthPriceEst)) + } + if m.CollateralStake != 0 { + n += 2 + sovScore(uint64(m.CollateralStake)) + } + if m.CollateralLost != 0 { + n += 2 + sovScore(uint64(m.CollateralLost)) + } + if m.CollateralBurn != 0 { + n += 2 + sovScore(uint64(m.CollateralBurn)) + } + l = len(m.CountryShort) + if l > 0 { + n += 2 + l + sovScore(uint64(l)) + } + l = m.Node_ExperimentalFlags.Size() + n += 2 + l + sovScore(uint64(l)) + if m.Discovery != 0 { + n += 6 + } + if m.UptimeScore != 0 { + n += 6 + } + if m.AgeScore != 0 { + n += 6 + } + if m.VersionScore != 0 { + n += 6 + } + if m.UploadSpeedScore != 0 { + n += 6 + } + if m.DownloadSpeedScore != 0 { + n += 6 + } + if len(m.Roles) > 0 { + l = 0 + for _, e := range m.Roles { + l += sovScore(uint64(e)) + } + n += 2 + sovScore(uint64(l)) + l + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *HostsData) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Hosts) > 0 { + for _, e := range m.Hosts { + l = e.Size() + n += 1 + l + sovScore(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Location) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Lat != 0 { + n += 9 + } + if m.Lon != 0 { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *StorageStat) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.HostStats.Size() + n += 1 + l + sovScore(uint64(l)) + l = m.RenterStats.Size() + n += 1 + l + sovScore(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *StorageStat_HostStats) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Uptime != 0 { + n += 5 + } + if m.Score != 0 { + n += 5 + } + if m.UptimeScore != 0 { + n += 5 + } + if m.AgeScore != 0 { + n += 5 + } + if m.VersionScore != 0 { + n += 5 + } + if m.SpeedScore != 0 { + n += 5 + } + if m.UploadSpeedScore != 0 { + n += 5 + } + if m.DownloadSpeedScore != 0 { + n += 5 + } + if m.UptimeWeight != 0 { + n += 5 + } + if m.AgeWeight != 0 { + n += 5 + } + if m.VersionWeight != 0 { + n += 5 + } + if m.SpeedWeight != 0 { + n += 5 + } + if m.UploadSpeedWeight != 0 { + n += 5 + } + if m.DownloadSpeedWeight != 0 { + n += 5 + } + l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.LastUpdated) + n += 1 + l + sovScore(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *StorageStat_Host) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Online { + n += 2 + } + if m.StorageUsed != 0 { + n += 1 + sovScore(uint64(m.StorageUsed)) + } + if m.StorageCap != 0 { + n += 1 + sovScore(uint64(m.StorageCap)) + } + if m.StorageDiskTotal != 0 { + n += 1 + sovScore(uint64(m.StorageDiskTotal)) + } + if m.StorageDiskAvailable != 0 { + n += 1 + sovScore(uint64(m.StorageDiskAvailable)) + } + l = m.StorageStat_HostStats.Size() + n += 1 + l + sovScore(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *StorageStat_Renter) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Reserved) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Node) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.tableName) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + l = len(m.NodeId) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + l = len(m.BtfsVersion) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + if m.UpTime != 0 { + n += 1 + sovScore(uint64(m.UpTime)) + } + if m.StorageUsed != 0 { + n += 1 + sovScore(uint64(m.StorageUsed)) + } + if m.StorageVolumeCap != 0 { + n += 1 + sovScore(uint64(m.StorageVolumeCap)) + } + if m.MemoryUsed != 0 { + n += 1 + sovScore(uint64(m.MemoryUsed)) + } + if m.CpuUsed != 0 { + n += 9 + } + if m.Upload != 0 { + n += 1 + sovScore(uint64(m.Upload)) + } + if m.Download != 0 { + n += 1 + sovScore(uint64(m.Download)) + } + if m.TotalUpload != 0 { + n += 1 + sovScore(uint64(m.TotalUpload)) + } + if m.TotalDownload != 0 { + n += 1 + sovScore(uint64(m.TotalDownload)) + } + if m.StoragePriceDeal != 0 { + n += 1 + sovScore(uint64(m.StoragePriceDeal)) + } + if m.BandwidthPriceDeal != 0 { + n += 1 + sovScore(uint64(m.BandwidthPriceDeal)) + } + l = m.Node_Settings.Size() + n += 1 + l + sovScore(uint64(l)) + if m.Reputation != 0 { + n += 10 + } + if m.BlocksUp != 0 { + n += 2 + sovScore(uint64(m.BlocksUp)) + } + if m.BlocksDown != 0 { + n += 2 + sovScore(uint64(m.BlocksDown)) + } + l = len(m.OsType) + if l > 0 { + n += 2 + l + sovScore(uint64(l)) + } + l = len(m.ArchType) + if l > 0 { + n += 2 + l + sovScore(uint64(l)) + } + l = len(m.CpuInfo) + if l > 0 { + n += 2 + l + sovScore(uint64(l)) + } + if m.PeersConnected != 0 { + n += 2 + sovScore(uint64(m.PeersConnected)) + } + l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.TimeCreated) + n += 2 + l + sovScore(uint64(l)) + l = len(m.HVal) + if l > 0 { + n += 2 + l + sovScore(uint64(l)) + } + l = m.Node_Geo.Size() + n += 2 + l + sovScore(uint64(l)) + l = m.Node_ExperimentalFlags.Size() + n += 2 + l + sovScore(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Node_Settings) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.StoragePriceAsk != 0 { + n += 1 + sovScore(uint64(m.StoragePriceAsk)) + } + if m.BandwidthPriceAsk != 0 { + n += 1 + sovScore(uint64(m.BandwidthPriceAsk)) + } + if m.StorageTimeMin != 0 { + n += 1 + sovScore(uint64(m.StorageTimeMin)) + } + if m.BandwidthLimit != 0 { + n += 9 + } + if m.CollateralStake != 0 { + n += 1 + sovScore(uint64(m.CollateralStake)) + } + if m.StoragePriceDefault != 0 { + n += 1 + sovScore(uint64(m.StoragePriceDefault)) + } + if m.CustomizedPricing { + n += 2 + } + if len(m.Roles) > 0 { + l = 0 + for _, e := range m.Roles { + l += sovScore(uint64(e)) + } + n += 1 + sovScore(uint64(l)) + l + } + if m.RepairPriceDefault != 0 { + n += 1 + sovScore(uint64(m.RepairPriceDefault)) + } + if m.RepairPriceCustomized != 0 { + n += 1 + sovScore(uint64(m.RepairPriceCustomized)) + } + if m.RepairCustomizedPricing { + n += 2 + } + if m.ChallengePriceDefault != 0 { + n += 1 + sovScore(uint64(m.ChallengePriceDefault)) + } + if m.ChallengePriceCustomized != 0 { + n += 1 + sovScore(uint64(m.ChallengePriceCustomized)) + } + if m.ChallengeCustomizedPricing { + n += 2 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Node_Geo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.CountryShort) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + l = len(m.Region) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + if m.Latitude != 0 { + n += 5 + } + if m.Longitude != 0 { + n += 5 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Node_ExperimentalFlags) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Analytics { + n += 2 + } + if m.FilestoreEnabled { + n += 2 + } + if m.HostsSyncEnabled { + n += 2 + } + l = len(m.HostsSyncMode) + if l > 0 { + n += 1 + l + sovScore(uint64(l)) + } + if m.Libp2PStreamMounting { + n += 2 + } + if m.P2PHttpProxy { + n += 2 + } + if m.PreferTls { + n += 2 + } + if m.Quic { + n += 2 + } + if m.RemoveOnUnpin { + n += 2 + } + if m.ShardingEnabled { + n += 2 + } + if m.StorageClientEnabled { + n += 2 + } + if m.StorageHostEnabled { + n += 2 + } + if m.StrategicProviding { + n += 2 + } + if m.UrlStoreEnabled { + n += 2 + } + if m.DisableAutoUpdate { + n += 2 + } + if m.GraphsyncEnabled { + n += 3 + } + if m.RepairHostEnabled { + n += 3 + } + if m.ChallengeHostEnabled { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovScore(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozScore(x uint64) (n int) { + return sovScore(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *NodesReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NodesReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NodesReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NodeId = append(m.NodeId, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequesterId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequesterId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SettingsReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SettingsReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SettingsReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RespSize", wireType) + } + m.RespSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RespSize |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SettingsResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SettingsResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SettingsResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= ResponseCode(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.ResponseTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SettingsData", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SettingsData == nil { + m.SettingsData = &SettingsData{} + } + if err := m.SettingsData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SettingsData) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SettingsData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SettingsData: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field StoragePriceAsk", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.StoragePriceAsk = float64(math.Float64frombits(v)) + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field BandwidthPriceAsk", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.BandwidthPriceAsk = float64(math.Float64frombits(v)) + case 3: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageTimeMin", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.StorageTimeMin = float64(math.Float64frombits(v)) + case 4: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field BandwidthLimit", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.BandwidthLimit = float64(math.Float64frombits(v)) + case 5: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field CollateralStake", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.CollateralStake = float64(math.Float64frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HostsReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HostsReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HostsReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RespSize", wireType) + } + m.RespSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RespSize |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) + } + m.Mode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Mode |= HostsReq_Mode(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RolesHostsReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RolesHostsReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RolesHostsReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RespSize", wireType) + } + m.RespSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RespSize |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) + } + m.Role = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Role |= NodeRole(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HostsResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HostsResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HostsResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= ResponseCode(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hosts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Hosts == nil { + m.Hosts = &HostsData{} + } + if err := m.Hosts.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RespSize", wireType) + } + m.RespSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RespSize |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Mode = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.ResponseTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StatsReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StatsReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StatsReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StatsResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StatsResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StatsResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= ResponseCode(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.ResponseTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageStat_HostStats", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.StorageStat_HostStats.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Host) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Host: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Host: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NodeId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreateTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.CreateTimestamp, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdateTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.UpdateTimestamp, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Region", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Region = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BtfsVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BtfsVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Score", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Score = float32(math.Float32frombits(v)) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HeartBeats", wireType) + } + m.HeartBeats = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HeartBeats |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Uptime", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Uptime = float32(math.Float32frombits(v)) + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Age", wireType) + } + m.Age = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Age |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Reputation", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Reputation = float32(math.Float32frombits(v)) + case 11: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field UploadAverage", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.UploadAverage = float32(math.Float32frombits(v)) + case 12: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field UploadVariance", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.UploadVariance = float32(math.Float32frombits(v)) + case 13: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field DownloadAverage", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.DownloadAverage = float32(math.Float32frombits(v)) + case 14: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field DownloadVariance", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.DownloadVariance = float32(math.Float32frombits(v)) + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Location", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Location.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 16: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageVolumeCap", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.StorageVolumeCap = float32(math.Float32frombits(v)) + case 17: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageVolumeLeft", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.StorageVolumeLeft = float32(math.Float32frombits(v)) + case 18: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageTimeMin", wireType) + } + m.StorageTimeMin = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StorageTimeMin |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 19: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StoragePriceAsk", wireType) + } + m.StoragePriceAsk = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StoragePriceAsk |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 20: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StoragePriceEst", wireType) + } + m.StoragePriceEst = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StoragePriceEst |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 21: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field BandwidthLimit", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.BandwidthLimit = float64(math.Float64frombits(v)) + case 22: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BandwidthPriceAsk", wireType) + } + m.BandwidthPriceAsk = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BandwidthPriceAsk |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 23: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BandwidthPriceEst", wireType) + } + m.BandwidthPriceEst = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BandwidthPriceEst |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 24: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CollateralStake", wireType) + } + m.CollateralStake = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CollateralStake |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 25: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CollateralLost", wireType) + } + m.CollateralLost = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CollateralLost |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 26: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CollateralBurn", wireType) + } + m.CollateralBurn = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CollateralBurn |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 27: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CountryShort", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CountryShort = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 28: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Node_ExperimentalFlags", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Node_ExperimentalFlags.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 29: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Discovery", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Discovery = float32(math.Float32frombits(v)) + case 30: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field UptimeScore", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.UptimeScore = float32(math.Float32frombits(v)) + case 31: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field AgeScore", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.AgeScore = float32(math.Float32frombits(v)) + case 32: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field VersionScore", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.VersionScore = float32(math.Float32frombits(v)) + case 33: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field UploadSpeedScore", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.UploadSpeedScore = float32(math.Float32frombits(v)) + case 34: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field DownloadSpeedScore", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.DownloadSpeedScore = float32(math.Float32frombits(v)) + case 35: + if wireType == 0 { + var v NodeRole + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= NodeRole(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Roles = append(m.Roles, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.Roles) == 0 { + m.Roles = make([]NodeRole, 0, elementCount) + } + for iNdEx < postIndex { + var v NodeRole + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= NodeRole(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Roles = append(m.Roles, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Roles", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HostsData) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HostsData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HostsData: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hosts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hosts = append(m.Hosts, &Host{}) + if err := m.Hosts[len(m.Hosts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Location) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Location: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Location: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Lat", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Lat = float64(math.Float64frombits(v)) + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Lon", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Lon = float64(math.Float64frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} -func (m *Location) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Lat != 0 { - n += 9 - } - if m.Lon != 0 { - n += 9 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if iNdEx > l { + return io.ErrUnexpectedEOF } - return n -} - -func sovScore(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozScore(x uint64) (n int) { - return sovScore(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + return nil } -func (m *NodesReq) Unmarshal(dAtA []byte) error { +func (m *StorageStat) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2774,17 +7367,17 @@ func (m *NodesReq) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NodesReq: wiretype end group for non-group") + return fmt.Errorf("proto: StorageStat: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NodesReq: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: StorageStat: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field HostStats", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowScore @@ -2794,29 +7387,30 @@ func (m *NodesReq) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthScore } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthScore } if postIndex > l { return io.ErrUnexpectedEOF } - m.NodeId = append(m.NodeId, string(dAtA[iNdEx:postIndex])) + if err := m.HostStats.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequesterId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RenterStats", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowScore @@ -2826,29 +7420,238 @@ func (m *NodesReq) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthScore } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthScore } if postIndex > l { return io.ErrUnexpectedEOF } - m.RequesterId = string(dAtA[iNdEx:postIndex]) + if err := m.RenterStats.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StorageStat_HostStats) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HostStats: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HostStats: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Uptime", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Uptime = float32(math.Float32frombits(v)) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Score", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Score = float32(math.Float32frombits(v)) case 3: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field UptimeScore", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.UptimeScore = float32(math.Float32frombits(v)) + case 4: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field AgeScore", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.AgeScore = float32(math.Float32frombits(v)) + case 5: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field VersionScore", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.VersionScore = float32(math.Float32frombits(v)) + case 6: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field SpeedScore", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.SpeedScore = float32(math.Float32frombits(v)) + case 7: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field UploadSpeedScore", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.UploadSpeedScore = float32(math.Float32frombits(v)) + case 8: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field DownloadSpeedScore", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.DownloadSpeedScore = float32(math.Float32frombits(v)) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field UptimeWeight", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.UptimeWeight = float32(math.Float32frombits(v)) + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field AgeWeight", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.AgeWeight = float32(math.Float32frombits(v)) + case 11: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field VersionWeight", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.VersionWeight = float32(math.Float32frombits(v)) + case 12: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field SpeedWeight", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.SpeedWeight = float32(math.Float32frombits(v)) + case 13: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field UploadSpeedWeight", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.UploadSpeedWeight = float32(math.Float32frombits(v)) + case 14: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field DownloadSpeedWeight", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.DownloadSpeedWeight = float32(math.Float32frombits(v)) + case 15: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LastUpdated", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowScore @@ -2858,24 +7661,23 @@ func (m *NodesReq) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return ErrInvalidLengthScore } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthScore } if postIndex > l { return io.ErrUnexpectedEOF } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} + if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.LastUpdated, dAtA[iNdEx:postIndex]); err != nil { + return err } iNdEx = postIndex default: @@ -2903,7 +7705,7 @@ func (m *NodesReq) Unmarshal(dAtA []byte) error { } return nil } -func (m *SettingsReq) Unmarshal(dAtA []byte) error { +func (m *StorageStat_Host) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2926,17 +7728,17 @@ func (m *SettingsReq) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SettingsReq: wiretype end group for non-group") + return fmt.Errorf("proto: Host: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SettingsReq: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Host: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Online", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowScore @@ -2946,29 +7748,17 @@ func (m *SettingsReq) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthScore - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthScore - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex + m.Online = bool(v != 0) case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RespSize", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StorageUsed", wireType) } - m.RespSize = 0 + m.StorageUsed = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowScore @@ -2978,70 +7768,16 @@ func (m *SettingsReq) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.RespSize |= int32(b&0x7F) << shift + m.StorageUsed |= int64(b&0x7F) << shift if b < 0x80 { break } } - default: - iNdEx = preIndex - skippy, err := skipScore(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthScore - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthScore - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SettingsResp) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowScore - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SettingsResp: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SettingsResp: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StorageCap", wireType) } - m.Code = 0 + m.StorageCap = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowScore @@ -3051,16 +7787,16 @@ func (m *SettingsResp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Code |= ResponseCode(b&0x7F) << shift + m.StorageCap |= int64(b&0x7F) << shift if b < 0x80 { break } } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageDiskTotal", wireType) } - var stringLen uint64 + m.StorageDiskTotal = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowScore @@ -3070,29 +7806,16 @@ func (m *SettingsResp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.StorageDiskTotal |= int64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthScore - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthScore - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseTime", wireType) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageDiskAvailable", wireType) } - var msglen int + m.StorageDiskAvailable = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowScore @@ -3102,28 +7825,14 @@ func (m *SettingsResp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.StorageDiskAvailable |= int64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthScore - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthScore - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.ResponseTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SettingsData", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StorageStat_HostStats", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3150,122 +7859,10 @@ func (m *SettingsResp) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.SettingsData == nil { - m.SettingsData = &SettingsData{} - } - if err := m.SettingsData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipScore(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthScore - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthScore - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SettingsData) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowScore - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SettingsData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SettingsData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field StoragePriceAsk", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.StoragePriceAsk = float64(math.Float64frombits(v)) - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field BandwidthPriceAsk", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.BandwidthPriceAsk = float64(math.Float64frombits(v)) - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageTimeMin", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.StorageTimeMin = float64(math.Float64frombits(v)) - case 4: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field BandwidthLimit", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.BandwidthLimit = float64(math.Float64frombits(v)) - case 5: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field CollateralStake", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.CollateralStake = float64(math.Float64frombits(v)) + if err := m.StorageStat_HostStats.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipScore(dAtA[iNdEx:]) @@ -3291,7 +7888,7 @@ func (m *SettingsData) Unmarshal(dAtA []byte) error { } return nil } -func (m *HostsReq) Unmarshal(dAtA []byte) error { +func (m *StorageStat_Renter) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3314,85 +7911,15 @@ func (m *HostsReq) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: HostsReq: wiretype end group for non-group") + return fmt.Errorf("proto: Renter: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: HostsReq: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Renter: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowScore - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthScore - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthScore - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RespSize", wireType) - } - m.RespSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowScore - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RespSize |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) - } - m.Mode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowScore - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Mode |= HostsReq_Mode(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Reserved", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3420,7 +7947,7 @@ func (m *HostsReq) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Version = string(dAtA[iNdEx:postIndex]) + m.Reserved = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3447,7 +7974,7 @@ func (m *HostsReq) Unmarshal(dAtA []byte) error { } return nil } -func (m *RolesHostsReq) Unmarshal(dAtA []byte) error { +func (m *Node) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3470,15 +7997,15 @@ func (m *RolesHostsReq) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RolesHostsReq: wiretype end group for non-group") + return fmt.Errorf("proto: Node: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RolesHostsReq: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Node: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field tableName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3506,13 +8033,13 @@ func (m *RolesHostsReq) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Id = string(dAtA[iNdEx:postIndex]) + m.tableName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RespSize", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeId", wireType) } - m.RespSize = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowScore @@ -3522,16 +8049,29 @@ func (m *RolesHostsReq) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.RespSize |= int32(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NodeId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BtfsVersion", wireType) } - m.Role = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowScore @@ -3541,70 +8081,154 @@ func (m *RolesHostsReq) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Role |= node.NodeRole(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - default: - iNdEx = preIndex - skippy, err := skipScore(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthScore } - if (iNdEx + skippy) < 0 { + postIndex := iNdEx + intStringLen + if postIndex < 0 { return ErrInvalidLengthScore } - if (iNdEx + skippy) > l { + if postIndex > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HostsResp) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowScore + m.BtfsVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UpTime", wireType) } - if iNdEx >= l { + m.UpTime = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.UpTime |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageUsed", wireType) + } + m.StorageUsed = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StorageUsed |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageVolumeCap", wireType) + } + m.StorageVolumeCap = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StorageVolumeCap |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemoryUsed", wireType) + } + m.MemoryUsed = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MemoryUsed |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field CpuUsed", wireType) + } + var v uint64 + if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.CpuUsed = float64(math.Float64frombits(v)) + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Upload", wireType) + } + m.Upload = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Upload |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Download", wireType) + } + m.Download = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Download |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HostsResp: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HostsResp: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 11: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TotalUpload", wireType) } - m.Code = 0 + m.TotalUpload = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowScore @@ -3614,16 +8238,16 @@ func (m *HostsResp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Code |= ResponseCode(b&0x7F) << shift + m.TotalUpload |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalDownload", wireType) } - var stringLen uint64 + m.TotalDownload = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowScore @@ -3633,27 +8257,52 @@ func (m *HostsResp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.TotalDownload |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthScore + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StoragePriceDeal", wireType) } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthScore + m.StoragePriceDeal = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StoragePriceDeal |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - if postIndex > l { - return io.ErrUnexpectedEOF + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BandwidthPriceDeal", wireType) } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: + m.BandwidthPriceDeal = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BandwidthPriceDeal |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 15: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hosts", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Node_Settings", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3680,18 +8329,26 @@ func (m *HostsResp) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Hosts == nil { - m.Hosts = &HostsData{} - } - if err := m.Hosts.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Node_Settings.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 4: + case 16: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Reputation", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Reputation = float64(math.Float64frombits(v)) + case 17: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RespSize", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BlocksUp", wireType) } - m.RespSize = 0 + m.BlocksUp = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowScore @@ -3701,14 +8358,33 @@ func (m *HostsResp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.RespSize |= int32(b&0x7F) << shift + m.BlocksUp |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 5: + case 18: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlocksDown", wireType) + } + m.BlocksDown = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlocksDown |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 19: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OsType", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3736,13 +8412,13 @@ func (m *HostsResp) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Mode = string(dAtA[iNdEx:postIndex]) + m.OsType = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 20: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseTime", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ArchType", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowScore @@ -3752,82 +8428,27 @@ func (m *HostsResp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthScore } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthScore } if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.ResponseTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.ArchType = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipScore(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthScore - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthScore - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StatsReq) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowScore - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StatsReq: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StatsReq: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 21: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CpuInfo", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3855,67 +8476,32 @@ func (m *StatsReq) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Id = string(dAtA[iNdEx:postIndex]) + m.CpuInfo = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipScore(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthScore - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthScore - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StatsResp) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowScore - } - if iNdEx >= l { - return io.ErrUnexpectedEOF + case 23: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PeersConnected", wireType) } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + m.PeersConnected = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PeersConnected |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StatsResp: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StatsResp: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + case 24: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeCreated", wireType) } - m.Code = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowScore @@ -3925,14 +8511,28 @@ func (m *StatsResp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Code |= ResponseCode(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 2: + if msglen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.TimeCreated, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 25: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field HVal", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3960,11 +8560,11 @@ func (m *StatsResp) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Message = string(dAtA[iNdEx:postIndex]) + m.HVal = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 26: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseTime", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Node_Geo", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3991,13 +8591,13 @@ func (m *StatsResp) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.ResponseTime, dAtA[iNdEx:postIndex]); err != nil { + if err := m.Node_Geo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 4: + case 27: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageStat_HostStats", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Node_ExperimentalFlags", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4024,7 +8624,7 @@ func (m *StatsResp) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.StorageStat_HostStats.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Node_ExperimentalFlags.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4053,7 +8653,7 @@ func (m *StatsResp) Unmarshal(dAtA []byte) error { } return nil } -func (m *Host) Unmarshal(dAtA []byte) error { +func (m *Node_Settings) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4076,17 +8676,17 @@ func (m *Host) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Host: wiretype end group for non-group") + return fmt.Errorf("proto: Settings: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Host: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Settings: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeId", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StoragePriceAsk", wireType) } - var stringLen uint64 + m.StoragePriceAsk = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowScore @@ -4096,29 +8696,16 @@ func (m *Host) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.StoragePriceAsk |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthScore - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthScore - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NodeId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreateTimestamp", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BandwidthPriceAsk", wireType) } - var msglen int + m.BandwidthPriceAsk = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowScore @@ -4128,30 +8715,46 @@ func (m *Host) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.BandwidthPriceAsk |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthScore + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageTimeMin", wireType) } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthScore + m.StorageTimeMin = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StorageTimeMin |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - if postIndex > l { - return io.ErrUnexpectedEOF + case 4: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field BandwidthLimit", wireType) } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.CreateTimestamp, dAtA[iNdEx:postIndex]); err != nil { - return err + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UpdateTimestamp", wireType) + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.BandwidthLimit = float64(math.Float64frombits(v)) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CollateralStake", wireType) } - var msglen int + m.CollateralStake = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowScore @@ -4161,30 +8764,124 @@ func (m *Host) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.CollateralStake |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthScore + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StoragePriceDefault", wireType) } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthScore + m.StoragePriceDefault = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StoragePriceDefault |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - if postIndex > l { - return io.ErrUnexpectedEOF + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CustomizedPricing", wireType) } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.UpdateTimestamp, dAtA[iNdEx:postIndex]); err != nil { - return err + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Region", wireType) + m.CustomizedPricing = bool(v != 0) + case 8: + if wireType == 0 { + var v NodeRole + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= NodeRole(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Roles = append(m.Roles, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.Roles) == 0 { + m.Roles = make([]NodeRole, 0, elementCount) + } + for iNdEx < postIndex { + var v NodeRole + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= NodeRole(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Roles = append(m.Roles, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Roles", wireType) } - var stringLen uint64 + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RepairPriceDefault", wireType) + } + m.RepairPriceDefault = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowScore @@ -4194,29 +8891,55 @@ func (m *Host) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.RepairPriceDefault |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthScore + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RepairPriceCustomized", wireType) } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthScore + m.RepairPriceCustomized = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RepairPriceCustomized |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - if postIndex > l { - return io.ErrUnexpectedEOF + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RepairCustomizedPricing", wireType) } - m.Region = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BtfsVersion", wireType) + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - var stringLen uint64 + m.RepairCustomizedPricing = bool(v != 0) + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ChallengePriceDefault", wireType) + } + m.ChallengePriceDefault = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowScore @@ -4226,40 +8949,16 @@ func (m *Host) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.ChallengePriceDefault |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthScore - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthScore - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BtfsVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Score", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Score = float32(math.Float32frombits(v)) - case 7: + case 13: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HeartBeats", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ChallengePriceCustomized", wireType) } - m.HeartBeats = 0 + m.ChallengePriceCustomized = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowScore @@ -4269,27 +8968,16 @@ func (m *Host) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.HeartBeats |= uint64(b&0x7F) << shift + m.ChallengePriceCustomized |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 8: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Uptime", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Uptime = float32(math.Float32frombits(v)) - case 9: + case 14: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Age", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ChallengeCustomizedPricing", wireType) } - m.Age = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowScore @@ -4299,71 +8987,103 @@ func (m *Host) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Age |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - case 10: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Reputation", wireType) + m.ChallengeCustomizedPricing = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF + if skippy < 0 { + return ErrInvalidLengthScore } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Reputation = float32(math.Float32frombits(v)) - case 11: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field UploadAverage", wireType) + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore } - var v uint32 - if (iNdEx + 4) > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.UploadAverage = float32(math.Float32frombits(v)) - case 12: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field UploadVariance", wireType) + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Node_Geo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore } - var v uint32 - if (iNdEx + 4) > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.UploadVariance = float32(math.Float32frombits(v)) - case 13: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field DownloadAverage", wireType) + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Geo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Geo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CountryShort", wireType) } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.DownloadAverage = float32(math.Float32frombits(v)) - case 14: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field DownloadVariance", wireType) + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - var v uint32 - if (iNdEx + 4) > l { + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { return io.ErrUnexpectedEOF } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.DownloadVariance = float32(math.Float32frombits(v)) - case 15: + m.CountryShort = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Location", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Region", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowScore @@ -4373,28 +9093,27 @@ func (m *Host) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthScore } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthScore } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Location.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Region = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 16: + case 3: if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageVolumeCap", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Latitude", wireType) } var v uint32 if (iNdEx + 4) > l { @@ -4402,10 +9121,10 @@ func (m *Host) Unmarshal(dAtA []byte) error { } v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 - m.StorageVolumeCap = float32(math.Float32frombits(v)) - case 17: + m.Latitude = float32(math.Float32frombits(v)) + case 4: if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageVolumeLeft", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Longitude", wireType) } var v uint32 if (iNdEx + 4) > l { @@ -4413,50 +9132,66 @@ func (m *Host) Unmarshal(dAtA []byte) error { } v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 - m.StorageVolumeLeft = float32(math.Float32frombits(v)) - case 18: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageTimeMin", wireType) + m.Longitude = float32(math.Float32frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipScore(dAtA[iNdEx:]) + if err != nil { + return err } - m.StorageTimeMin = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowScore - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StorageTimeMin |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + if skippy < 0 { + return ErrInvalidLengthScore } - case 19: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StoragePriceAsk", wireType) + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthScore } - m.StoragePriceAsk = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowScore - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StoragePriceAsk |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Node_ExperimentalFlags) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - case 20: + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExperimentalFlags: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExperimentalFlags: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StoragePriceEst", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Analytics", wireType) } - m.StoragePriceEst = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowScore @@ -4466,27 +9201,17 @@ func (m *Host) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.StoragePriceEst |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - case 21: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field BandwidthLimit", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.BandwidthLimit = float64(math.Float64frombits(v)) - case 22: + m.Analytics = bool(v != 0) + case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BandwidthPriceAsk", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FilestoreEnabled", wireType) } - m.BandwidthPriceAsk = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowScore @@ -4496,16 +9221,17 @@ func (m *Host) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.BandwidthPriceAsk |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - case 23: + m.FilestoreEnabled = bool(v != 0) + case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BandwidthPriceEst", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field HostsSyncEnabled", wireType) } - m.BandwidthPriceEst = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowScore @@ -4515,16 +9241,17 @@ func (m *Host) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.BandwidthPriceEst |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - case 24: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CollateralStake", wireType) + m.HostsSyncEnabled = bool(v != 0) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HostsSyncMode", wireType) } - m.CollateralStake = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowScore @@ -4534,16 +9261,29 @@ func (m *Host) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CollateralStake |= uint64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 25: + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthScore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthScore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HostsSyncMode = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CollateralLost", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Libp2PStreamMounting", wireType) } - m.CollateralLost = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowScore @@ -4553,16 +9293,17 @@ func (m *Host) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CollateralLost |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - case 26: + m.Libp2PStreamMounting = bool(v != 0) + case 6: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CollateralBurn", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field P2PHttpProxy", wireType) } - m.CollateralBurn = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowScore @@ -4572,16 +9313,17 @@ func (m *Host) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CollateralBurn |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - case 27: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CountryShort", wireType) + m.P2PHttpProxy = bool(v != 0) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PreferTls", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowScore @@ -4591,251 +9333,77 @@ func (m *Host) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthScore - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthScore - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CountryShort = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 28: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Node_ExperimentalFlags", wireType) + m.PreferTls = bool(v != 0) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Quic", wireType) } - var msglen int + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowScore } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthScore - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthScore - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Node_ExperimentalFlags.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 29: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Discovery", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Discovery = float32(math.Float32frombits(v)) - case 30: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field UptimeScore", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.UptimeScore = float32(math.Float32frombits(v)) - case 31: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field AgeScore", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.AgeScore = float32(math.Float32frombits(v)) - case 32: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field VersionScore", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.VersionScore = float32(math.Float32frombits(v)) - case 33: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field UploadSpeedScore", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.UploadSpeedScore = float32(math.Float32frombits(v)) - case 34: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field DownloadSpeedScore", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.DownloadSpeedScore = float32(math.Float32frombits(v)) - case 35: - if wireType == 0 { - var v node.NodeRole - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowScore - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= node.NodeRole(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Roles = append(m.Roles, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowScore - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthScore - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthScore - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - if elementCount != 0 && len(m.Roles) == 0 { - m.Roles = make([]node.NodeRole, 0, elementCount) - } - for iNdEx < postIndex { - var v node.NodeRole - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowScore - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= node.NodeRole(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Roles = append(m.Roles, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Roles", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipScore(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthScore - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthScore + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + m.Quic = bool(v != 0) + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RemoveOnUnpin", wireType) } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HostsData) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowScore + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - if iNdEx >= l { - return io.ErrUnexpectedEOF + m.RemoveOnUnpin = bool(v != 0) + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ShardingEnabled", wireType) } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HostsData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HostsData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hosts", wireType) + m.ShardingEnabled = bool(v != 0) + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageClientEnabled", wireType) } - var msglen int + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowScore @@ -4845,102 +9413,152 @@ func (m *HostsData) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthScore - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthScore + m.StorageClientEnabled = bool(v != 0) + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageHostEnabled", wireType) } - if postIndex > l { - return io.ErrUnexpectedEOF + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - m.Hosts = append(m.Hosts, &Host{}) - if err := m.Hosts[len(m.Hosts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.StorageHostEnabled = bool(v != 0) + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StrategicProviding", wireType) } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipScore(dAtA[iNdEx:]) - if err != nil { - return err + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - if skippy < 0 { - return ErrInvalidLengthScore + m.StrategicProviding = bool(v != 0) + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UrlStoreEnabled", wireType) } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthScore + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + m.UrlStoreEnabled = bool(v != 0) + case 15: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DisableAutoUpdate", wireType) } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Location) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowScore + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - if iNdEx >= l { - return io.ErrUnexpectedEOF + m.DisableAutoUpdate = bool(v != 0) + case 16: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GraphsyncEnabled", wireType) } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Location: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Location: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Lat", wireType) + m.GraphsyncEnabled = bool(v != 0) + case 17: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RepairHostEnabled", wireType) } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Lat = float64(math.Float64frombits(v)) - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Lon", wireType) + m.RepairHostEnabled = bool(v != 0) + case 18: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ChallengeHostEnabled", wireType) } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Lon = float64(math.Float64frombits(v)) + m.ChallengeHostEnabled = bool(v != 0) default: iNdEx = preIndex skippy, err := skipScore(dAtA[iNdEx:]) diff --git a/protos/score/score.proto b/protos/score/score.proto index 4120193..1bbc68d 100644 --- a/protos/score/score.proto +++ b/protos/score/score.proto @@ -16,7 +16,6 @@ option java_multiple_files = true; option java_outer_classname = "ScoreProto"; option java_package = "io.btfs.score"; -import "github.com/bittorrent/go-btfs-common/protos/node/node.proto"; import "github.com/tron-us/protobuf/gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; @@ -84,7 +83,7 @@ message HostsReq { message RolesHostsReq { string id = 1; int32 resp_size = 2; - node.NodeRole role = 3; + NodeRole role = 3; } message HostsResp { @@ -110,7 +109,7 @@ message StatsResp { (gogoproto.nullable) = false, (gogoproto.stdtime) = true ]; - node.StorageStat.HostStats stats = 4 [ + StorageStat.HostStats stats = 4 [ (gogoproto.embed) = true, (gogoproto.nullable) = false ]; @@ -151,7 +150,7 @@ message Host { uint64 collateral_lost = 25; uint64 collateral_burn = 26; string country_short = 27; //if it is "", means no data related node_id find - node.Node.ExperimentalFlags flg = 28 [ + Node.ExperimentalFlags flg = 28 [ (gogoproto.embed) = true, (gogoproto.nullable) = false ]; @@ -161,7 +160,7 @@ message Host { float version_score = 32; float upload_speed_score = 33; float download_speed_score = 34; - repeated node.NodeRole roles = 35 [(gogoproto.pgtag) = "roles,array"]; + repeated NodeRole roles = 35 [(gogoproto.pgtag) = "roles,array"]; } message HostsData { @@ -172,3 +171,143 @@ message Location { double lat = 1; double lon = 2; } + +//------------node + +enum NodeRole { + RENTER = 0; + HOST = 1; + REPAIRER = 2; + CHALLENGER = 3; + NETWORK_CHECKER = 4; + REPUTATION_CHECKER = 5; + CDN_PROVIDER = 6; + OTHER = 20; +} + +message StorageStat { + option (gogoproto.json_no_omit_empty) = true; + message HostStats { + option (gogoproto.json_no_omit_empty) = true; + float uptime = 1; + float score = 2; + float uptime_score = 3; + float age_score = 4; + float version_score = 5; + float speed_score = 6; + float upload_speed_score = 7; + float download_speed_score = 8; + float uptime_weight = 9; + float age_weight = 10; + float version_weight = 11; + float speed_weight = 12; + float upload_speed_weight = 13; + float download_speed_weight = 14; + google.protobuf.Timestamp last_updated = 15 [ + (gogoproto.nullable) = false, + (gogoproto.stdtime) = true + ]; + } + message Host { + option (gogoproto.json_no_omit_empty) = true; + bool online = 1; + int64 storage_used = 2; + int64 storage_cap = 3; + int64 storage_disk_total = 4; + int64 storage_disk_available = 5; + HostStats stats = 6 [ + (gogoproto.embed) = true, + (gogoproto.jsontag) = "", + (gogoproto.nullable) = false + ]; + } + message Renter { + option (gogoproto.json_no_omit_empty) = true; + string reserved = 1; + } + Host host_stats = 1 [(gogoproto.nullable) = false]; + Renter renter_stats = 2 [(gogoproto.nullable) = false]; +} + +message Node { + message Settings { + uint64 storage_price_ask = 1; + uint64 bandwidth_price_ask = 2; + uint64 storage_time_min = 3; + double bandwidth_limit = 4; + uint64 collateral_stake = 5; + uint64 storage_price_default = 6; // network default + bool customized_pricing = 7; // whether to use storage_price_ask + repeated NodeRole roles = 8 [(gogoproto.pgtag) = "roles,array"]; + uint64 repair_price_default = 9; + uint64 repair_price_customized = 10; + bool repair_customized_pricing = 11; + uint64 challenge_price_default = 12; + uint64 challenge_price_customized = 13; + bool challenge_customized_pricing = 14; + } + message Geo { + string country_short = 1; + string region = 2; + float latitude = 3; + float longitude = 4; + } + message ExperimentalFlags { + bool analytics = 1; + bool filestore_enabled = 2; + bool hosts_sync_enabled = 3; + string hosts_sync_mode = 4; + bool libp2p_stream_mounting = 5; + bool p2p_http_proxy = 6; + bool prefer_tls = 7; // deprecated + bool quic = 8; + bool remove_on_unpin = 9; + bool sharding_enabled = 10; + bool storage_client_enabled = 11; + bool storage_host_enabled = 12; + bool strategic_providing = 13; + bool url_store_enabled = 14; + bool disable_auto_update = 15; + bool graphsync_enabled = 16; + bool repair_host_enabled = 17; + bool challenge_host_enabled = 18; + } + string table_name = 1 [(gogoproto.moretags) = "pg:\"node_metrics,alias:t,discard_unknown_columns\""]; + string node_id = 2; + string btfs_version = 3; + uint64 up_time = 4; + uint64 storage_used = 5; + uint64 storage_volume_cap = 6; + uint64 memory_used = 7; + double cpu_used = 8; + uint64 upload = 9; + uint64 download = 10; + uint64 total_upload = 11; + uint64 total_download = 12; + uint64 storage_price_deal = 13; + uint64 bandwidth_price_deal = 14; + Settings settings = 15 [ + (gogoproto.embed) = true, + (gogoproto.nullable) = false + ]; + double reputation = 16; + uint64 blocks_up = 17; + uint64 blocks_down = 18; + string os_type = 19; + string arch_type = 20; + string cpu_info = 21; + uint64 peers_connected = 23; + google.protobuf.Timestamp time_created = 24 [ + (gogoproto.nullable) = false, + (gogoproto.stdtime) = true + ]; + string h_val = 25; + Geo geo = 26 [ + (gogoproto.embed) = true, + (gogoproto.nullable) = false + ]; + ExperimentalFlags flg = 27 [ + (gogoproto.embed) = true, + (gogoproto.nullable) = false + ]; +} diff --git a/protos/status/status.pb.go b/protos/status/status.pb.go deleted file mode 100644 index 6f98dda..0000000 --- a/protos/status/status.pb.go +++ /dev/null @@ -1,4107 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: protos/status/status.proto - -package status - -import ( - context "context" - encoding_binary "encoding/binary" - fmt "fmt" - node "github.com/bittorrent/go-btfs-common/protos/node" - types "github.com/gogo/protobuf/types" - golang_proto "github.com/golang/protobuf/proto" - _ "github.com/tron-us/protobuf/gogoproto" - proto "github.com/tron-us/protobuf/proto" - github_com_tron_us_protobuf_types "github.com/tron-us/protobuf/types" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = golang_proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type RewardType int32 - -const ( - RewardType_FILESIZE RewardType = 0 - RewardType_REPAIR RewardType = 1 -) - -var RewardType_name = map[int32]string{ - 0: "FILESIZE", - 1: "REPAIR", -} - -var RewardType_value = map[string]int32{ - "FILESIZE": 0, - "REPAIR": 1, -} - -func (x RewardType) String() string { - return proto.EnumName(RewardType_name, int32(x)) -} - -func (RewardType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_e9255cc60c5ca429, []int{0} -} - -type SignedMetrics struct { - PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty" pg:"public_key"` - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty" pg:"payload"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *SignedMetrics) Reset() { *m = SignedMetrics{} } -func (m *SignedMetrics) String() string { return proto.CompactTextString(m) } -func (*SignedMetrics) ProtoMessage() {} -func (*SignedMetrics) Descriptor() ([]byte, []int) { - return fileDescriptor_e9255cc60c5ca429, []int{0} -} -func (m *SignedMetrics) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignedMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignedMetrics.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SignedMetrics) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedMetrics.Merge(m, src) -} -func (m *SignedMetrics) XXX_Size() int { - return m.Size() -} -func (m *SignedMetrics) XXX_DiscardUnknown() { - xxx_messageInfo_SignedMetrics.DiscardUnknown(m) -} - -var xxx_messageInfo_SignedMetrics proto.InternalMessageInfo - -func (m *SignedMetrics) GetPublicKey() []byte { - if m != nil { - return m.PublicKey - } - return nil -} - -func (m *SignedMetrics) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (m *SignedMetrics) GetPayload() []byte { - if m != nil { - return m.Payload - } - return nil -} - -func (*SignedMetrics) XXX_MessageName() string { - return "status.SignedMetrics" -} - -type NodeMetricsAggrReq struct { - Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty" pg:"source"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *NodeMetricsAggrReq) Reset() { *m = NodeMetricsAggrReq{} } -func (m *NodeMetricsAggrReq) String() string { return proto.CompactTextString(m) } -func (*NodeMetricsAggrReq) ProtoMessage() {} -func (*NodeMetricsAggrReq) Descriptor() ([]byte, []int) { - return fileDescriptor_e9255cc60c5ca429, []int{1} -} -func (m *NodeMetricsAggrReq) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeMetricsAggrReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NodeMetricsAggrReq.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *NodeMetricsAggrReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeMetricsAggrReq.Merge(m, src) -} -func (m *NodeMetricsAggrReq) XXX_Size() int { - return m.Size() -} -func (m *NodeMetricsAggrReq) XXX_DiscardUnknown() { - xxx_messageInfo_NodeMetricsAggrReq.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeMetricsAggrReq proto.InternalMessageInfo - -func (m *NodeMetricsAggrReq) GetSource() string { - if m != nil { - return m.Source - } - return "" -} - -func (*NodeMetricsAggrReq) XXX_MessageName() string { - return "status.NodeMetricsAggrReq" -} - -type NodeDiscoveryAggrReq struct { - Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty" pg:"source"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *NodeDiscoveryAggrReq) Reset() { *m = NodeDiscoveryAggrReq{} } -func (m *NodeDiscoveryAggrReq) String() string { return proto.CompactTextString(m) } -func (*NodeDiscoveryAggrReq) ProtoMessage() {} -func (*NodeDiscoveryAggrReq) Descriptor() ([]byte, []int) { - return fileDescriptor_e9255cc60c5ca429, []int{2} -} -func (m *NodeDiscoveryAggrReq) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeDiscoveryAggrReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NodeDiscoveryAggrReq.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *NodeDiscoveryAggrReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeDiscoveryAggrReq.Merge(m, src) -} -func (m *NodeDiscoveryAggrReq) XXX_Size() int { - return m.Size() -} -func (m *NodeDiscoveryAggrReq) XXX_DiscardUnknown() { - xxx_messageInfo_NodeDiscoveryAggrReq.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeDiscoveryAggrReq proto.InternalMessageInfo - -func (m *NodeDiscoveryAggrReq) GetSource() string { - if m != nil { - return m.Source - } - return "" -} - -func (*NodeDiscoveryAggrReq) XXX_MessageName() string { - return "status.NodeDiscoveryAggrReq" -} - -type BtfsScanAggrReq struct { - tableName string `protobuf:"bytes,1,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty" pg:"table_name"` - StorageVolumeLeft float64 `protobuf:"fixed64,2,opt,name=storage_volume_left,json=storageVolumeLeft,proto3" json:"storage_volume_left,omitempty" pg:"storage_volume_left"` - OnlineMinersNumber uint32 `protobuf:"varint,3,opt,name=online_miners_number,json=onlineMinersNumber,proto3" json:"online_miners_number,omitempty" pg:"online_miners_number"` - CountryDistribute map[string]int32 `protobuf:"bytes,4,rep,name=country_distribute,json=countryDistribute,proto3" json:"country_distribute,omitempty" pg:"country_distribute" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - ScoreDistribute map[string]int32 `protobuf:"bytes,5,rep,name=score_distribute,json=scoreDistribute,proto3" json:"score_distribute,omitempty" pg:"score_distribute" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - TimeCreated time.Time `protobuf:"bytes,6,opt,name=time_created,json=timeCreated,proto3,stdtime" json:"time_created" pg:"time_created"` - StorageAlreadyUsed float64 `protobuf:"fixed64,7,opt,name=storage_already_used,json=storageAlreadyUsed,proto3" json:"storage_already_used,omitempty" pg:"storage_already_used"` - Price float64 `protobuf:"fixed64,8,opt,name=price,proto3" json:"price,omitempty" pg:"price"` - DateCreated time.Time `protobuf:"bytes,9,opt,name=date_created,json=dateCreated,proto3,stdtime" json:"date_created" pg:"date_created"` - NewRank string `protobuf:"bytes,10,opt,name=new_rank,json=newRank,proto3" json:"new_rank,omitempty" pg:"new_rank"` - TotalRank string `protobuf:"bytes,11,opt,name=total_rank,json=totalRank,proto3" json:"total_rank,omitempty" pg:"total_rank"` - ContractAllCount uint32 `protobuf:"varint,12,opt,name=contract_all_count,json=contractAllCount,proto3" json:"contract_all_count,omitempty" pg:"contract_all_count"` - ContractFailCount uint32 `protobuf:"varint,13,opt,name=contract_fail_count,json=contractFailCount,proto3" json:"contract_fail_count,omitempty" pg:"contract_fail_count"` - ContractAllStorage float64 `protobuf:"fixed64,14,opt,name=contract_all_storage,json=contractAllStorage,proto3" json:"contract_all_storage,omitempty" pg:"contract_all_storage"` - ContractFailStorage float64 `protobuf:"fixed64,15,opt,name=contract_fail_storage,json=contractFailStorage,proto3" json:"contract_fail_storage,omitempty" pg:"contract_fail_storage"` - StorageLeftWhenContract float64 `protobuf:"fixed64,16,opt,name=storage_left_when_contract,json=storageLeftWhenContract,proto3" json:"storage_left_when_contract,omitempty" pg:"storage_left_when_contract"` - SuperOnlineMinersCount uint32 `protobuf:"varint,17,opt,name=super_online_miners_count,json=superOnlineMinersCount,proto3" json:"super_online_miners_count,omitempty" pg:"super_online_miners_count"` - NewOnlineMinersCount uint32 `protobuf:"varint,18,opt,name=new_online_miners_count,json=newOnlineMinersCount,proto3" json:"new_online_miners_count,omitempty" pg:"new_online_miners_count"` - MinersAllAmount int64 `protobuf:"varint,19,opt,name=miners_all_amount,json=minersAllAmount,proto3" json:"miners_all_amount,omitempty" pg:"miners_all_amount"` - TotalMiners int64 `protobuf:"varint,20,opt,name=total_miners,json=totalMiners,proto3" json:"total_miners,omitempty" pg:"total_miners"` - BigMiners int64 `protobuf:"varint,21,opt,name=big_miners,json=bigMiners,proto3" json:"big_miners,omitempty" pg:"big_miners"` - VersionDistribute map[string]int32 `protobuf:"bytes,22,rep,name=version_distribute,json=versionDistribute,proto3" json:"version_distribute,omitempty" pg:"version_distribute" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *BtfsScanAggrReq) Reset() { *m = BtfsScanAggrReq{} } -func (m *BtfsScanAggrReq) String() string { return proto.CompactTextString(m) } -func (*BtfsScanAggrReq) ProtoMessage() {} -func (*BtfsScanAggrReq) Descriptor() ([]byte, []int) { - return fileDescriptor_e9255cc60c5ca429, []int{3} -} -func (m *BtfsScanAggrReq) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BtfsScanAggrReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BtfsScanAggrReq.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BtfsScanAggrReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_BtfsScanAggrReq.Merge(m, src) -} -func (m *BtfsScanAggrReq) XXX_Size() int { - return m.Size() -} -func (m *BtfsScanAggrReq) XXX_DiscardUnknown() { - xxx_messageInfo_BtfsScanAggrReq.DiscardUnknown(m) -} - -var xxx_messageInfo_BtfsScanAggrReq proto.InternalMessageInfo - -func (m *BtfsScanAggrReq) GettableName() string { - if m != nil { - return m.tableName - } - return "" -} - -func (m *BtfsScanAggrReq) GetStorageVolumeLeft() float64 { - if m != nil { - return m.StorageVolumeLeft - } - return 0 -} - -func (m *BtfsScanAggrReq) GetOnlineMinersNumber() uint32 { - if m != nil { - return m.OnlineMinersNumber - } - return 0 -} - -func (m *BtfsScanAggrReq) GetCountryDistribute() map[string]int32 { - if m != nil { - return m.CountryDistribute - } - return nil -} - -func (m *BtfsScanAggrReq) GetScoreDistribute() map[string]int32 { - if m != nil { - return m.ScoreDistribute - } - return nil -} - -func (m *BtfsScanAggrReq) GetTimeCreated() time.Time { - if m != nil { - return m.TimeCreated - } - return time.Time{} -} - -func (m *BtfsScanAggrReq) GetStorageAlreadyUsed() float64 { - if m != nil { - return m.StorageAlreadyUsed - } - return 0 -} - -func (m *BtfsScanAggrReq) GetPrice() float64 { - if m != nil { - return m.Price - } - return 0 -} - -func (m *BtfsScanAggrReq) GetDateCreated() time.Time { - if m != nil { - return m.DateCreated - } - return time.Time{} -} - -func (m *BtfsScanAggrReq) GetNewRank() string { - if m != nil { - return m.NewRank - } - return "" -} - -func (m *BtfsScanAggrReq) GetTotalRank() string { - if m != nil { - return m.TotalRank - } - return "" -} - -func (m *BtfsScanAggrReq) GetContractAllCount() uint32 { - if m != nil { - return m.ContractAllCount - } - return 0 -} - -func (m *BtfsScanAggrReq) GetContractFailCount() uint32 { - if m != nil { - return m.ContractFailCount - } - return 0 -} - -func (m *BtfsScanAggrReq) GetContractAllStorage() float64 { - if m != nil { - return m.ContractAllStorage - } - return 0 -} - -func (m *BtfsScanAggrReq) GetContractFailStorage() float64 { - if m != nil { - return m.ContractFailStorage - } - return 0 -} - -func (m *BtfsScanAggrReq) GetStorageLeftWhenContract() float64 { - if m != nil { - return m.StorageLeftWhenContract - } - return 0 -} - -func (m *BtfsScanAggrReq) GetSuperOnlineMinersCount() uint32 { - if m != nil { - return m.SuperOnlineMinersCount - } - return 0 -} - -func (m *BtfsScanAggrReq) GetNewOnlineMinersCount() uint32 { - if m != nil { - return m.NewOnlineMinersCount - } - return 0 -} - -func (m *BtfsScanAggrReq) GetMinersAllAmount() int64 { - if m != nil { - return m.MinersAllAmount - } - return 0 -} - -func (m *BtfsScanAggrReq) GetTotalMiners() int64 { - if m != nil { - return m.TotalMiners - } - return 0 -} - -func (m *BtfsScanAggrReq) GetBigMiners() int64 { - if m != nil { - return m.BigMiners - } - return 0 -} - -func (m *BtfsScanAggrReq) GetVersionDistribute() map[string]int32 { - if m != nil { - return m.VersionDistribute - } - return nil -} - -func (*BtfsScanAggrReq) XXX_MessageName() string { - return "status.BtfsScanAggrReq" -} - -type ScoreHistoryReq struct { - Scores []*node.ScoreHistoryTab `protobuf:"bytes,1,rep,name=scores,proto3" json:"scores,omitempty" pg:"scores"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ScoreHistoryReq) Reset() { *m = ScoreHistoryReq{} } -func (m *ScoreHistoryReq) String() string { return proto.CompactTextString(m) } -func (*ScoreHistoryReq) ProtoMessage() {} -func (*ScoreHistoryReq) Descriptor() ([]byte, []int) { - return fileDescriptor_e9255cc60c5ca429, []int{4} -} -func (m *ScoreHistoryReq) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ScoreHistoryReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ScoreHistoryReq.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ScoreHistoryReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_ScoreHistoryReq.Merge(m, src) -} -func (m *ScoreHistoryReq) XXX_Size() int { - return m.Size() -} -func (m *ScoreHistoryReq) XXX_DiscardUnknown() { - xxx_messageInfo_ScoreHistoryReq.DiscardUnknown(m) -} - -var xxx_messageInfo_ScoreHistoryReq proto.InternalMessageInfo - -func (m *ScoreHistoryReq) GetScores() []*node.ScoreHistoryTab { - if m != nil { - return m.Scores - } - return nil -} - -func (*ScoreHistoryReq) XXX_MessageName() string { - return "status.ScoreHistoryReq" -} - -type RewardInfo struct { - Type RewardType `protobuf:"varint,1,opt,name=type,proto3,enum=status.RewardType" json:"type,omitempty" pg:"type"` - NodeId string `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty" pg:"node_id"` - IsSuspect bool `protobuf:"varint,4,opt,name=is_suspect,json=isSuspect,proto3" json:"is_suspect,omitempty" pg:"is_suspect"` - Weight uint32 `protobuf:"varint,5,opt,name=weight,proto3" json:"weight,omitempty" pg:"weight"` - Stake uint32 `protobuf:"varint,6,opt,name=stake,proto3" json:"stake,omitempty" pg:"stake"` - FileCount uint32 `protobuf:"varint,7,opt,name=file_count,json=fileCount,proto3" json:"file_count,omitempty" pg:"file_count"` - FileSize uint64 `protobuf:"varint,8,opt,name=file_size,json=fileSize,proto3" json:"file_size,omitempty" pg:"file_size"` - ShouldReward uint64 `protobuf:"varint,9,opt,name=should_reward,json=shouldReward,proto3" json:"should_reward,omitempty" pg:"should_reward"` - ActualReward uint64 `protobuf:"varint,10,opt,name=actual_reward,json=actualReward,proto3" json:"actual_reward,omitempty" pg:"actual_reward"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *RewardInfo) Reset() { *m = RewardInfo{} } -func (m *RewardInfo) String() string { return proto.CompactTextString(m) } -func (*RewardInfo) ProtoMessage() {} -func (*RewardInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_e9255cc60c5ca429, []int{5} -} -func (m *RewardInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RewardInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RewardInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RewardInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_RewardInfo.Merge(m, src) -} -func (m *RewardInfo) XXX_Size() int { - return m.Size() -} -func (m *RewardInfo) XXX_DiscardUnknown() { - xxx_messageInfo_RewardInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_RewardInfo proto.InternalMessageInfo - -func (m *RewardInfo) GetType() RewardType { - if m != nil { - return m.Type - } - return RewardType_FILESIZE -} - -func (m *RewardInfo) GetNodeId() string { - if m != nil { - return m.NodeId - } - return "" -} - -func (m *RewardInfo) GetIsSuspect() bool { - if m != nil { - return m.IsSuspect - } - return false -} - -func (m *RewardInfo) GetWeight() uint32 { - if m != nil { - return m.Weight - } - return 0 -} - -func (m *RewardInfo) GetStake() uint32 { - if m != nil { - return m.Stake - } - return 0 -} - -func (m *RewardInfo) GetFileCount() uint32 { - if m != nil { - return m.FileCount - } - return 0 -} - -func (m *RewardInfo) GetFileSize() uint64 { - if m != nil { - return m.FileSize - } - return 0 -} - -func (m *RewardInfo) GetShouldReward() uint64 { - if m != nil { - return m.ShouldReward - } - return 0 -} - -func (m *RewardInfo) GetActualReward() uint64 { - if m != nil { - return m.ActualReward - } - return 0 -} - -func (*RewardInfo) XXX_MessageName() string { - return "status.RewardInfo" -} - -type AirdropRewardHistoryReq struct { - RequesterPid string `protobuf:"bytes,1,opt,name=requester_pid,json=requesterPid,proto3" json:"requester_pid,omitempty" pg:"requester_pid"` - Rewards []*RewardInfo `protobuf:"bytes,2,rep,name=rewards,proto3" json:"rewards,omitempty" pg:"rewards"` - PageIndex uint32 `protobuf:"varint,3,opt,name=page_index,json=pageIndex,proto3" json:"page_index,omitempty" pg:"page_index"` - PageTotal uint32 `protobuf:"varint,4,opt,name=page_total,json=pageTotal,proto3" json:"page_total,omitempty" pg:"page_total"` - DateAirdroped time.Time `protobuf:"bytes,5,opt,name=date_airdroped,json=dateAirdroped,proto3,stdtime" json:"date_airdroped" pg:"date_airdroped"` - Signature []byte `protobuf:"bytes,6,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *AirdropRewardHistoryReq) Reset() { *m = AirdropRewardHistoryReq{} } -func (m *AirdropRewardHistoryReq) String() string { return proto.CompactTextString(m) } -func (*AirdropRewardHistoryReq) ProtoMessage() {} -func (*AirdropRewardHistoryReq) Descriptor() ([]byte, []int) { - return fileDescriptor_e9255cc60c5ca429, []int{6} -} -func (m *AirdropRewardHistoryReq) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AirdropRewardHistoryReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AirdropRewardHistoryReq.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AirdropRewardHistoryReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_AirdropRewardHistoryReq.Merge(m, src) -} -func (m *AirdropRewardHistoryReq) XXX_Size() int { - return m.Size() -} -func (m *AirdropRewardHistoryReq) XXX_DiscardUnknown() { - xxx_messageInfo_AirdropRewardHistoryReq.DiscardUnknown(m) -} - -var xxx_messageInfo_AirdropRewardHistoryReq proto.InternalMessageInfo - -func (m *AirdropRewardHistoryReq) GetRequesterPid() string { - if m != nil { - return m.RequesterPid - } - return "" -} - -func (m *AirdropRewardHistoryReq) GetRewards() []*RewardInfo { - if m != nil { - return m.Rewards - } - return nil -} - -func (m *AirdropRewardHistoryReq) GetPageIndex() uint32 { - if m != nil { - return m.PageIndex - } - return 0 -} - -func (m *AirdropRewardHistoryReq) GetPageTotal() uint32 { - if m != nil { - return m.PageTotal - } - return 0 -} - -func (m *AirdropRewardHistoryReq) GetDateAirdroped() time.Time { - if m != nil { - return m.DateAirdroped - } - return time.Time{} -} - -func (m *AirdropRewardHistoryReq) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (*AirdropRewardHistoryReq) XXX_MessageName() string { - return "status.AirdropRewardHistoryReq" -} - -type Candidate struct { - NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty" pg:"node_id"` - DateAirdroped time.Time `protobuf:"bytes,2,opt,name=date_airdroped,json=dateAirdroped,proto3,stdtime" json:"date_airdroped" pg:"date_airdroped"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Candidate) Reset() { *m = Candidate{} } -func (m *Candidate) String() string { return proto.CompactTextString(m) } -func (*Candidate) ProtoMessage() {} -func (*Candidate) Descriptor() ([]byte, []int) { - return fileDescriptor_e9255cc60c5ca429, []int{7} -} -func (m *Candidate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Candidate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Candidate.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Candidate) XXX_Merge(src proto.Message) { - xxx_messageInfo_Candidate.Merge(m, src) -} -func (m *Candidate) XXX_Size() int { - return m.Size() -} -func (m *Candidate) XXX_DiscardUnknown() { - xxx_messageInfo_Candidate.DiscardUnknown(m) -} - -var xxx_messageInfo_Candidate proto.InternalMessageInfo - -func (m *Candidate) GetNodeId() string { - if m != nil { - return m.NodeId - } - return "" -} - -func (m *Candidate) GetDateAirdroped() time.Time { - if m != nil { - return m.DateAirdroped - } - return time.Time{} -} - -func (*Candidate) XXX_MessageName() string { - return "status.Candidate" -} - -type NodeContractStatReq struct { - NodeContractStats []*node.NodeContractStat `protobuf:"bytes,1,rep,name=node_contract_stats,json=nodeContractStats,proto3" json:"node_contract_stats,omitempty" pg:"node_contract_stats"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *NodeContractStatReq) Reset() { *m = NodeContractStatReq{} } -func (m *NodeContractStatReq) String() string { return proto.CompactTextString(m) } -func (*NodeContractStatReq) ProtoMessage() {} -func (*NodeContractStatReq) Descriptor() ([]byte, []int) { - return fileDescriptor_e9255cc60c5ca429, []int{8} -} -func (m *NodeContractStatReq) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeContractStatReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NodeContractStatReq.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *NodeContractStatReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeContractStatReq.Merge(m, src) -} -func (m *NodeContractStatReq) XXX_Size() int { - return m.Size() -} -func (m *NodeContractStatReq) XXX_DiscardUnknown() { - xxx_messageInfo_NodeContractStatReq.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeContractStatReq proto.InternalMessageInfo - -func (m *NodeContractStatReq) GetNodeContractStats() []*node.NodeContractStat { - if m != nil { - return m.NodeContractStats - } - return nil -} - -func (*NodeContractStatReq) XXX_MessageName() string { - return "status.NodeContractStatReq" -} -func init() { - proto.RegisterEnum("status.RewardType", RewardType_name, RewardType_value) - golang_proto.RegisterEnum("status.RewardType", RewardType_name, RewardType_value) - proto.RegisterType((*SignedMetrics)(nil), "status.SignedMetrics") - golang_proto.RegisterType((*SignedMetrics)(nil), "status.SignedMetrics") - proto.RegisterType((*NodeMetricsAggrReq)(nil), "status.NodeMetricsAggrReq") - golang_proto.RegisterType((*NodeMetricsAggrReq)(nil), "status.NodeMetricsAggrReq") - proto.RegisterType((*NodeDiscoveryAggrReq)(nil), "status.NodeDiscoveryAggrReq") - golang_proto.RegisterType((*NodeDiscoveryAggrReq)(nil), "status.NodeDiscoveryAggrReq") - proto.RegisterType((*BtfsScanAggrReq)(nil), "status.BtfsScanAggrReq") - golang_proto.RegisterType((*BtfsScanAggrReq)(nil), "status.BtfsScanAggrReq") - proto.RegisterMapType((map[string]int32)(nil), "status.BtfsScanAggrReq.CountryDistributeEntry") - golang_proto.RegisterMapType((map[string]int32)(nil), "status.BtfsScanAggrReq.CountryDistributeEntry") - proto.RegisterMapType((map[string]int32)(nil), "status.BtfsScanAggrReq.ScoreDistributeEntry") - golang_proto.RegisterMapType((map[string]int32)(nil), "status.BtfsScanAggrReq.ScoreDistributeEntry") - proto.RegisterMapType((map[string]int32)(nil), "status.BtfsScanAggrReq.VersionDistributeEntry") - golang_proto.RegisterMapType((map[string]int32)(nil), "status.BtfsScanAggrReq.VersionDistributeEntry") - proto.RegisterType((*ScoreHistoryReq)(nil), "status.ScoreHistoryReq") - golang_proto.RegisterType((*ScoreHistoryReq)(nil), "status.ScoreHistoryReq") - proto.RegisterType((*RewardInfo)(nil), "status.RewardInfo") - golang_proto.RegisterType((*RewardInfo)(nil), "status.RewardInfo") - proto.RegisterType((*AirdropRewardHistoryReq)(nil), "status.AirdropRewardHistoryReq") - golang_proto.RegisterType((*AirdropRewardHistoryReq)(nil), "status.AirdropRewardHistoryReq") - proto.RegisterType((*Candidate)(nil), "status.Candidate") - golang_proto.RegisterType((*Candidate)(nil), "status.Candidate") - proto.RegisterType((*NodeContractStatReq)(nil), "status.NodeContractStatReq") - golang_proto.RegisterType((*NodeContractStatReq)(nil), "status.NodeContractStatReq") -} - -func init() { proto.RegisterFile("protos/status/status.proto", fileDescriptor_e9255cc60c5ca429) } -func init() { golang_proto.RegisterFile("protos/status/status.proto", fileDescriptor_e9255cc60c5ca429) } - -var fileDescriptor_e9255cc60c5ca429 = []byte{ - // 1390 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xdd, 0x4e, 0x1b, 0x47, - 0x1b, 0xce, 0xf2, 0x63, 0xf0, 0x0b, 0xe6, 0x67, 0x00, 0xb3, 0x71, 0x12, 0xe0, 0x73, 0xa4, 0x08, - 0x45, 0x60, 0x22, 0x3e, 0x55, 0x6a, 0x1b, 0xa9, 0xad, 0xf9, 0x49, 0x4b, 0x93, 0x50, 0xb4, 0x26, - 0x89, 0x14, 0x29, 0x5a, 0x8d, 0x77, 0xc7, 0xcb, 0x88, 0xf5, 0x8c, 0x33, 0x33, 0x0b, 0x75, 0xae, - 0xa2, 0x27, 0x95, 0x7a, 0xd8, 0x4b, 0xe9, 0x61, 0x0e, 0x7b, 0x05, 0x6d, 0x95, 0x9c, 0xf7, 0xa4, - 0x37, 0x50, 0xcd, 0xcc, 0x0e, 0xb1, 0x0d, 0x6e, 0x4a, 0x4f, 0xc0, 0xf3, 0x3e, 0xcf, 0xfb, 0xec, - 0xcc, 0xfb, 0xb7, 0xb3, 0x50, 0xe9, 0x08, 0xae, 0xb8, 0xdc, 0x92, 0x0a, 0xab, 0xcc, 0xfd, 0xab, - 0x19, 0x23, 0x2a, 0xd8, 0x55, 0xe5, 0x61, 0x42, 0xd5, 0x49, 0xd6, 0xac, 0x45, 0xbc, 0xbd, 0xd5, - 0xa4, 0x4a, 0x71, 0x21, 0x08, 0x53, 0x5b, 0x09, 0xdf, 0x6c, 0xaa, 0x96, 0xdc, 0x8c, 0x78, 0xbb, - 0xcd, 0xd9, 0x56, 0x2e, 0xc4, 0x78, 0x4c, 0xcc, 0x1f, 0x2b, 0x52, 0x79, 0xd0, 0xe3, 0xac, 0x04, - 0x67, 0x9b, 0x99, 0xb4, 0xd4, 0x66, 0xd6, 0xda, 0x4a, 0x78, 0xc2, 0xcd, 0xc2, 0xfc, 0xca, 0x3d, - 0x6e, 0x25, 0x9c, 0x27, 0x29, 0xf9, 0xc0, 0x22, 0xed, 0x8e, 0xea, 0xe6, 0xe0, 0xea, 0x20, 0xa8, - 0x68, 0x9b, 0x48, 0x85, 0xdb, 0x1d, 0x4b, 0xa8, 0xb6, 0xa0, 0xd4, 0xa0, 0x09, 0x23, 0xf1, 0x53, - 0xa2, 0x04, 0x8d, 0x24, 0xba, 0x03, 0xd0, 0xc9, 0x9a, 0x29, 0x8d, 0xc2, 0x53, 0xd2, 0xf5, 0xbd, - 0x35, 0x6f, 0x7d, 0x3a, 0x28, 0x5a, 0xcb, 0x63, 0xd2, 0x45, 0xb7, 0xa1, 0x28, 0x69, 0xc2, 0xb0, - 0xca, 0x04, 0xf1, 0x47, 0x2c, 0x7a, 0x61, 0x40, 0x3e, 0x4c, 0x74, 0x70, 0x37, 0xe5, 0x38, 0xf6, - 0x47, 0x0d, 0xe6, 0x96, 0xd5, 0x0d, 0x40, 0x87, 0x3c, 0x26, 0xf9, 0x53, 0xea, 0x49, 0x22, 0x02, - 0xf2, 0x1a, 0x95, 0xa1, 0x20, 0x79, 0x26, 0x22, 0x62, 0x1e, 0x54, 0x0c, 0xf2, 0x55, 0xb5, 0x06, - 0x8b, 0x9a, 0xbd, 0x47, 0x65, 0xc4, 0xcf, 0x88, 0xe8, 0x7e, 0x8c, 0xff, 0x27, 0xc0, 0xec, 0x8e, - 0x6a, 0xc9, 0x46, 0x84, 0x99, 0xe3, 0xde, 0x01, 0x50, 0xb8, 0x99, 0x92, 0x90, 0xe1, 0xb6, 0xe3, - 0x17, 0x8d, 0xe5, 0x10, 0xb7, 0x09, 0xaa, 0xc1, 0x82, 0x54, 0x5c, 0xe0, 0x84, 0x84, 0x67, 0x3c, - 0xcd, 0xda, 0x24, 0x4c, 0x49, 0x4b, 0x99, 0x23, 0x79, 0xc1, 0x7c, 0x0e, 0x3d, 0x37, 0xc8, 0x13, - 0xd2, 0x52, 0xe8, 0x01, 0x2c, 0x72, 0x96, 0x52, 0x46, 0xc2, 0x36, 0x65, 0x44, 0xc8, 0x90, 0x65, - 0xed, 0x26, 0x11, 0xe6, 0x9c, 0xa5, 0x00, 0x59, 0xec, 0xa9, 0x81, 0x0e, 0x0d, 0x82, 0x5e, 0x01, - 0x8a, 0x78, 0xc6, 0x94, 0xe8, 0x86, 0x31, 0x95, 0x4a, 0xd0, 0x66, 0xa6, 0x88, 0x3f, 0xb6, 0x36, - 0xba, 0x3e, 0xb5, 0x5d, 0xab, 0xe5, 0xa5, 0x33, 0xb0, 0xeb, 0xda, 0xae, 0xf5, 0xd8, 0xbb, 0x70, - 0xd8, 0xd7, 0xcb, 0x60, 0x3e, 0x1a, 0xb4, 0xa3, 0x17, 0x30, 0x27, 0x23, 0x2e, 0x48, 0xaf, 0xf8, - 0xb8, 0x11, 0xdf, 0x18, 0x26, 0xde, 0xd0, 0xfc, 0x41, 0xe9, 0x59, 0xd9, 0x6f, 0x45, 0x5f, 0xc3, - 0xb4, 0xae, 0x92, 0x30, 0x12, 0x04, 0x2b, 0x12, 0xfb, 0x85, 0x35, 0x6f, 0x7d, 0x6a, 0xbb, 0x52, - 0xb3, 0xa5, 0x54, 0x73, 0xa5, 0x54, 0x3b, 0x76, 0xa5, 0xb4, 0x33, 0xf9, 0xf6, 0xb7, 0xd5, 0x1b, - 0x3f, 0xfc, 0xbe, 0xea, 0x05, 0x53, 0xda, 0x73, 0xd7, 0x3a, 0xea, 0x90, 0xb9, 0x10, 0xe3, 0x54, - 0x10, 0x1c, 0x77, 0xc3, 0x4c, 0x92, 0xd8, 0x9f, 0x30, 0x31, 0x46, 0x39, 0x56, 0xb7, 0xd0, 0x33, - 0x49, 0x62, 0xb4, 0x08, 0xe3, 0x1d, 0x41, 0x23, 0xe2, 0x4f, 0x1a, 0x8a, 0x5d, 0xe8, 0x0d, 0xc5, - 0x58, 0x7d, 0xd8, 0x50, 0xf1, 0x3a, 0x1b, 0xd2, 0x9e, 0x6e, 0x43, 0x37, 0x61, 0x92, 0x91, 0xf3, - 0x50, 0x60, 0x76, 0xea, 0x83, 0x29, 0x88, 0x09, 0x46, 0xce, 0x03, 0xcc, 0x4e, 0x4d, 0xb5, 0x70, - 0x85, 0x53, 0x0b, 0x4e, 0xe5, 0xd5, 0xa2, 0x2d, 0x06, 0xde, 0xd0, 0xb9, 0x64, 0x4a, 0xe0, 0x48, - 0x85, 0x38, 0x4d, 0x43, 0x93, 0x0e, 0x7f, 0xda, 0xe4, 0x7e, 0xce, 0x21, 0xf5, 0x34, 0x35, 0xe9, - 0xd3, 0xb5, 0x75, 0xc1, 0x6e, 0x61, 0xea, 0xe8, 0x25, 0x43, 0x9f, 0x77, 0xd0, 0x23, 0x4c, 0x73, - 0xfe, 0x03, 0x58, 0xec, 0x53, 0xcf, 0x23, 0xe3, 0xcf, 0xd8, 0x40, 0xf5, 0xe8, 0x37, 0x2c, 0x82, - 0xb6, 0x61, 0xa9, 0xff, 0x09, 0xce, 0x65, 0xd6, 0xb8, 0x2c, 0xf4, 0x3e, 0xc3, 0xf9, 0x3c, 0x84, - 0x8a, 0x4b, 0x87, 0x2e, 0xf5, 0xf0, 0xfc, 0x84, 0xb0, 0xd0, 0x11, 0xfd, 0x39, 0xe3, 0xb8, 0x9c, - 0x33, 0x74, 0xc9, 0xbf, 0x38, 0x21, 0x6c, 0x37, 0x87, 0xd1, 0x67, 0x70, 0x53, 0x66, 0x1d, 0x22, - 0xc2, 0xfe, 0x26, 0xb0, 0x07, 0x9b, 0x37, 0x07, 0x2b, 0x1b, 0xc2, 0x77, 0x3d, 0x8d, 0x60, 0x4f, - 0xf7, 0x09, 0x2c, 0xeb, 0xa8, 0x5f, 0xe5, 0x88, 0x8c, 0xe3, 0x22, 0x23, 0xe7, 0x97, 0xdd, 0xee, - 0xc3, 0x7c, 0xce, 0xd5, 0x21, 0xc1, 0x6d, 0xe3, 0xb0, 0xb0, 0xe6, 0xad, 0x8f, 0x06, 0xb3, 0x16, - 0xa8, 0xa7, 0x69, 0xdd, 0x98, 0xd1, 0xff, 0x60, 0xda, 0x66, 0xcf, 0x02, 0xfe, 0xa2, 0xa1, 0x4d, - 0x19, 0x9b, 0xd5, 0xd4, 0x09, 0x6e, 0xd2, 0xc4, 0x11, 0x96, 0x0c, 0xa1, 0xd8, 0xa4, 0x49, 0x0e, - 0xbf, 0x02, 0x74, 0x46, 0x84, 0xa4, 0x9c, 0xf5, 0xf6, 0x53, 0xf9, 0x9f, 0x9b, 0xf5, 0xb9, 0xf5, - 0xb8, 0xd4, 0xac, 0x67, 0x83, 0xf6, 0xca, 0x1e, 0x94, 0xaf, 0xee, 0x6c, 0x34, 0x07, 0xa3, 0x6e, - 0xd0, 0x16, 0x03, 0xfd, 0x53, 0x37, 0xc1, 0x19, 0x4e, 0x33, 0x3b, 0x5e, 0xc7, 0x03, 0xbb, 0xf8, - 0x7c, 0xe4, 0x53, 0xaf, 0xb2, 0x03, 0x8b, 0x57, 0xb5, 0xf0, 0xb5, 0x34, 0xf6, 0xa0, 0x7c, 0xf5, - 0xb6, 0xaf, 0xa3, 0x52, 0xfd, 0x0a, 0x66, 0xcd, 0x4e, 0xbe, 0xa1, 0xba, 0x60, 0xba, 0x7a, 0xde, - 0x6e, 0x42, 0xc1, 0x4c, 0x12, 0xe9, 0x7b, 0x26, 0x6a, 0x4b, 0x35, 0xf3, 0x5a, 0xeb, 0xa5, 0x1d, - 0xe3, 0x66, 0x90, 0x93, 0xaa, 0x3f, 0x8f, 0x00, 0x04, 0xe4, 0x1c, 0x8b, 0xf8, 0x80, 0xb5, 0x38, - 0xba, 0x07, 0x63, 0xaa, 0xdb, 0xb1, 0x73, 0x7a, 0x66, 0x1b, 0xb9, 0x88, 0x5b, 0xc6, 0x71, 0xb7, - 0x43, 0x02, 0x83, 0xa3, 0x65, 0x98, 0xd0, 0xb2, 0x21, 0x8d, 0xcd, 0xa6, 0x8a, 0x41, 0x41, 0x2f, - 0x0f, 0x62, 0x9d, 0x5f, 0x2a, 0x43, 0x99, 0xc9, 0x0e, 0x89, 0x94, 0x3f, 0xb6, 0xe6, 0xad, 0x4f, - 0x06, 0x45, 0x2a, 0x1b, 0xd6, 0xa0, 0xdf, 0x1c, 0xe7, 0x84, 0x26, 0x27, 0xca, 0x1f, 0x37, 0x35, - 0x97, 0xaf, 0xf4, 0x11, 0xa5, 0xc2, 0xa7, 0xc4, 0x4c, 0xb9, 0x52, 0x60, 0x17, 0x5a, 0xac, 0x45, - 0x53, 0x92, 0x57, 0xe9, 0x84, 0x81, 0x8a, 0xda, 0x62, 0x4b, 0xf3, 0x16, 0x98, 0x45, 0x28, 0xe9, - 0x1b, 0x3b, 0xaa, 0xc6, 0x82, 0x49, 0x6d, 0x68, 0xd0, 0x37, 0x04, 0xdd, 0x85, 0x92, 0x3c, 0xe1, - 0x59, 0x1a, 0x87, 0xc2, 0x6c, 0xde, 0x8c, 0xab, 0xb1, 0x60, 0xda, 0x1a, 0xed, 0x81, 0x34, 0x09, - 0x47, 0x2a, 0xd3, 0xf3, 0xc6, 0x92, 0xc0, 0x92, 0xac, 0xd1, 0x92, 0xaa, 0x3f, 0x8e, 0xc0, 0x72, - 0x9d, 0x8a, 0x58, 0xf0, 0x8e, 0xb5, 0xf4, 0x44, 0xfb, 0x2e, 0x94, 0x04, 0x79, 0x9d, 0x11, 0xa9, - 0x88, 0x08, 0x3b, 0x34, 0xce, 0xd3, 0x36, 0x7d, 0x61, 0x3c, 0xa2, 0x31, 0xda, 0x80, 0x09, 0x2b, - 0x2f, 0xfd, 0x11, 0x93, 0x93, 0x81, 0xb8, 0xea, 0xc8, 0x07, 0x8e, 0x62, 0xde, 0xfc, 0x7a, 0x38, - 0x50, 0x16, 0x93, 0xef, 0xf3, 0xf7, 0x5a, 0x51, 0x5b, 0x0e, 0xb4, 0xe1, 0x02, 0x36, 0x4d, 0x65, - 0x02, 0x9c, 0xc3, 0xc7, 0xda, 0x80, 0x1e, 0xc3, 0x8c, 0x19, 0xd2, 0xd8, 0x6e, 0x98, 0xc4, 0x26, - 0xd0, 0xff, 0x76, 0x4c, 0x97, 0xb4, 0x6f, 0xdd, 0xb9, 0xf6, 0xdf, 0x32, 0x0a, 0x03, 0xb7, 0x8c, - 0xea, 0x6b, 0x28, 0xee, 0x62, 0x16, 0x53, 0xed, 0xd3, 0x5b, 0x10, 0x5e, 0x5f, 0x41, 0x5c, 0xde, - 0xd0, 0xc8, 0x7f, 0xde, 0x50, 0xf5, 0x15, 0x2c, 0xe8, 0x0b, 0x89, 0x1b, 0x87, 0x0d, 0x85, 0x95, - 0xce, 0xc2, 0x23, 0x58, 0x30, 0x0f, 0xbf, 0x98, 0xc5, 0x3a, 0xbc, 0xae, 0x01, 0xca, 0xb6, 0x01, - 0x2e, 0xf9, 0xcd, 0xb3, 0x01, 0x8b, 0xbc, 0x7f, 0xcf, 0xf5, 0x82, 0xae, 0x74, 0x34, 0x0d, 0x93, - 0x8f, 0x0e, 0x9e, 0xec, 0x37, 0x0e, 0x5e, 0xee, 0xcf, 0xdd, 0x40, 0x00, 0x85, 0x60, 0xff, 0xa8, - 0x7e, 0x10, 0xcc, 0x79, 0xdb, 0x7f, 0x8d, 0x41, 0xa9, 0x61, 0x32, 0xd8, 0x20, 0xe2, 0x4c, 0xbf, - 0x1b, 0xbf, 0x80, 0xd2, 0xb3, 0x8e, 0xde, 0xab, 0xbb, 0xbf, 0x2d, 0xb9, 0x14, 0xf7, 0x5d, 0xeb, - 0x2a, 0xe5, 0x4b, 0xa7, 0xde, 0xd7, 0xd7, 0x44, 0xf4, 0x2d, 0xdc, 0xec, 0xf3, 0xaf, 0xb3, 0xf8, - 0xe2, 0xd6, 0x75, 0x5d, 0xad, 0x43, 0xf0, 0xfb, 0xb5, 0x92, 0x44, 0x90, 0x04, 0x2b, 0xca, 0x19, - 0xaa, 0x38, 0xa9, 0xcb, 0xb7, 0xc0, 0xa1, 0x7a, 0x01, 0x54, 0xac, 0x5e, 0xdf, 0x3d, 0xd0, 0x29, - 0xde, 0xee, 0x55, 0x1c, 0xbc, 0x29, 0x0e, 0xd5, 0xdc, 0x07, 0x64, 0x35, 0x7b, 0x67, 0x39, 0x5a, - 0x1e, 0x32, 0xe1, 0x3f, 0x2e, 0xd3, 0x3b, 0xde, 0x3e, 0xc8, 0x0c, 0xcc, 0xc6, 0xa1, 0x32, 0xcf, - 0xdc, 0x09, 0xaf, 0x6a, 0x73, 0xb4, 0xea, 0xe4, 0x86, 0x0c, 0x81, 0xa1, 0xb2, 0x4f, 0xa1, 0x6c, - 0x65, 0x07, 0x6b, 0x0f, 0xdd, 0xea, 0x0d, 0xda, 0x40, 0x35, 0x0f, 0x93, 0xdb, 0xf9, 0xf2, 0xed, - 0xbb, 0x15, 0xef, 0xd7, 0x77, 0x2b, 0xde, 0x1f, 0xef, 0x56, 0xbc, 0x9f, 0xde, 0xaf, 0x78, 0xbf, - 0xbc, 0x5f, 0xf1, 0xde, 0xbe, 0x5f, 0xf1, 0x60, 0x86, 0xf2, 0x9a, 0xfe, 0xa8, 0xc9, 0x55, 0x77, - 0xa6, 0x6c, 0x71, 0x1e, 0x69, 0xff, 0x23, 0xef, 0x65, 0xfe, 0x45, 0xd4, 0x2c, 0x18, 0xc1, 0xff, - 0xff, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x1f, 0x86, 0x52, 0x87, 0x3e, 0x0d, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// StatusServiceClient is the client API for StatusService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type StatusServiceClient interface { - UpdateMetrics(ctx context.Context, in *SignedMetrics, opts ...grpc.CallOption) (*types.Empty, error) - UpdateMetricsAndDiscovery(ctx context.Context, in *SignedMetrics, opts ...grpc.CallOption) (*types.Empty, error) - UpdateMetricsAggregation(ctx context.Context, in *NodeMetricsAggrReq, opts ...grpc.CallOption) (*types.Empty, error) - UpdateDiscoveryAggregation(ctx context.Context, in *NodeDiscoveryAggrReq, opts ...grpc.CallOption) (*types.Empty, error) - UpdateBtfsScanAggr(ctx context.Context, in *BtfsScanAggrReq, opts ...grpc.CallOption) (*types.Empty, error) - UpdateScoreHistory(ctx context.Context, in *ScoreHistoryReq, opts ...grpc.CallOption) (*types.Empty, error) - UpdateAirdropRewardHistory(ctx context.Context, in *AirdropRewardHistoryReq, opts ...grpc.CallOption) (*types.Empty, error) - UpdateNodeContractStat(ctx context.Context, in *NodeContractStatReq, opts ...grpc.CallOption) (*types.Empty, error) -} - -type statusServiceClient struct { - cc *grpc.ClientConn -} - -func NewStatusServiceClient(cc *grpc.ClientConn) StatusServiceClient { - return &statusServiceClient{cc} -} - -func (c *statusServiceClient) UpdateMetrics(ctx context.Context, in *SignedMetrics, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/status.StatusService/UpdateMetrics", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *statusServiceClient) UpdateMetricsAndDiscovery(ctx context.Context, in *SignedMetrics, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/status.StatusService/UpdateMetricsAndDiscovery", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *statusServiceClient) UpdateMetricsAggregation(ctx context.Context, in *NodeMetricsAggrReq, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/status.StatusService/UpdateMetricsAggregation", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *statusServiceClient) UpdateDiscoveryAggregation(ctx context.Context, in *NodeDiscoveryAggrReq, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/status.StatusService/UpdateDiscoveryAggregation", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *statusServiceClient) UpdateBtfsScanAggr(ctx context.Context, in *BtfsScanAggrReq, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/status.StatusService/UpdateBtfsScanAggr", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *statusServiceClient) UpdateScoreHistory(ctx context.Context, in *ScoreHistoryReq, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/status.StatusService/UpdateScoreHistory", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *statusServiceClient) UpdateAirdropRewardHistory(ctx context.Context, in *AirdropRewardHistoryReq, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/status.StatusService/UpdateAirdropRewardHistory", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *statusServiceClient) UpdateNodeContractStat(ctx context.Context, in *NodeContractStatReq, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/status.StatusService/UpdateNodeContractStat", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// StatusServiceServer is the server API for StatusService service. -type StatusServiceServer interface { - UpdateMetrics(context.Context, *SignedMetrics) (*types.Empty, error) - UpdateMetricsAndDiscovery(context.Context, *SignedMetrics) (*types.Empty, error) - UpdateMetricsAggregation(context.Context, *NodeMetricsAggrReq) (*types.Empty, error) - UpdateDiscoveryAggregation(context.Context, *NodeDiscoveryAggrReq) (*types.Empty, error) - UpdateBtfsScanAggr(context.Context, *BtfsScanAggrReq) (*types.Empty, error) - UpdateScoreHistory(context.Context, *ScoreHistoryReq) (*types.Empty, error) - UpdateAirdropRewardHistory(context.Context, *AirdropRewardHistoryReq) (*types.Empty, error) - UpdateNodeContractStat(context.Context, *NodeContractStatReq) (*types.Empty, error) -} - -// UnimplementedStatusServiceServer can be embedded to have forward compatible implementations. -type UnimplementedStatusServiceServer struct { -} - -func (*UnimplementedStatusServiceServer) UpdateMetrics(ctx context.Context, req *SignedMetrics) (*types.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateMetrics not implemented") -} -func (*UnimplementedStatusServiceServer) UpdateMetricsAndDiscovery(ctx context.Context, req *SignedMetrics) (*types.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateMetricsAndDiscovery not implemented") -} -func (*UnimplementedStatusServiceServer) UpdateMetricsAggregation(ctx context.Context, req *NodeMetricsAggrReq) (*types.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateMetricsAggregation not implemented") -} -func (*UnimplementedStatusServiceServer) UpdateDiscoveryAggregation(ctx context.Context, req *NodeDiscoveryAggrReq) (*types.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateDiscoveryAggregation not implemented") -} -func (*UnimplementedStatusServiceServer) UpdateBtfsScanAggr(ctx context.Context, req *BtfsScanAggrReq) (*types.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateBtfsScanAggr not implemented") -} -func (*UnimplementedStatusServiceServer) UpdateScoreHistory(ctx context.Context, req *ScoreHistoryReq) (*types.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateScoreHistory not implemented") -} -func (*UnimplementedStatusServiceServer) UpdateAirdropRewardHistory(ctx context.Context, req *AirdropRewardHistoryReq) (*types.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateAirdropRewardHistory not implemented") -} -func (*UnimplementedStatusServiceServer) UpdateNodeContractStat(ctx context.Context, req *NodeContractStatReq) (*types.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateNodeContractStat not implemented") -} - -func RegisterStatusServiceServer(s *grpc.Server, srv StatusServiceServer) { - s.RegisterService(&_StatusService_serviceDesc, srv) -} - -func _StatusService_UpdateMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SignedMetrics) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StatusServiceServer).UpdateMetrics(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/status.StatusService/UpdateMetrics", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StatusServiceServer).UpdateMetrics(ctx, req.(*SignedMetrics)) - } - return interceptor(ctx, in, info, handler) -} - -func _StatusService_UpdateMetricsAndDiscovery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SignedMetrics) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StatusServiceServer).UpdateMetricsAndDiscovery(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/status.StatusService/UpdateMetricsAndDiscovery", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StatusServiceServer).UpdateMetricsAndDiscovery(ctx, req.(*SignedMetrics)) - } - return interceptor(ctx, in, info, handler) -} - -func _StatusService_UpdateMetricsAggregation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(NodeMetricsAggrReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StatusServiceServer).UpdateMetricsAggregation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/status.StatusService/UpdateMetricsAggregation", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StatusServiceServer).UpdateMetricsAggregation(ctx, req.(*NodeMetricsAggrReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _StatusService_UpdateDiscoveryAggregation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(NodeDiscoveryAggrReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StatusServiceServer).UpdateDiscoveryAggregation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/status.StatusService/UpdateDiscoveryAggregation", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StatusServiceServer).UpdateDiscoveryAggregation(ctx, req.(*NodeDiscoveryAggrReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _StatusService_UpdateBtfsScanAggr_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BtfsScanAggrReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StatusServiceServer).UpdateBtfsScanAggr(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/status.StatusService/UpdateBtfsScanAggr", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StatusServiceServer).UpdateBtfsScanAggr(ctx, req.(*BtfsScanAggrReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _StatusService_UpdateScoreHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ScoreHistoryReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StatusServiceServer).UpdateScoreHistory(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/status.StatusService/UpdateScoreHistory", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StatusServiceServer).UpdateScoreHistory(ctx, req.(*ScoreHistoryReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _StatusService_UpdateAirdropRewardHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AirdropRewardHistoryReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StatusServiceServer).UpdateAirdropRewardHistory(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/status.StatusService/UpdateAirdropRewardHistory", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StatusServiceServer).UpdateAirdropRewardHistory(ctx, req.(*AirdropRewardHistoryReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _StatusService_UpdateNodeContractStat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(NodeContractStatReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StatusServiceServer).UpdateNodeContractStat(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/status.StatusService/UpdateNodeContractStat", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StatusServiceServer).UpdateNodeContractStat(ctx, req.(*NodeContractStatReq)) - } - return interceptor(ctx, in, info, handler) -} - -var _StatusService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "status.StatusService", - HandlerType: (*StatusServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "UpdateMetrics", - Handler: _StatusService_UpdateMetrics_Handler, - }, - { - MethodName: "UpdateMetricsAndDiscovery", - Handler: _StatusService_UpdateMetricsAndDiscovery_Handler, - }, - { - MethodName: "UpdateMetricsAggregation", - Handler: _StatusService_UpdateMetricsAggregation_Handler, - }, - { - MethodName: "UpdateDiscoveryAggregation", - Handler: _StatusService_UpdateDiscoveryAggregation_Handler, - }, - { - MethodName: "UpdateBtfsScanAggr", - Handler: _StatusService_UpdateBtfsScanAggr_Handler, - }, - { - MethodName: "UpdateScoreHistory", - Handler: _StatusService_UpdateScoreHistory_Handler, - }, - { - MethodName: "UpdateAirdropRewardHistory", - Handler: _StatusService_UpdateAirdropRewardHistory_Handler, - }, - { - MethodName: "UpdateNodeContractStat", - Handler: _StatusService_UpdateNodeContractStat_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "protos/status/status.proto", -} - -func (m *SignedMetrics) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignedMetrics) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignedMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Payload) > 0 { - i -= len(m.Payload) - copy(dAtA[i:], m.Payload) - i = encodeVarintStatus(dAtA, i, uint64(len(m.Payload))) - i-- - dAtA[i] = 0x1a - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintStatus(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if len(m.PublicKey) > 0 { - i -= len(m.PublicKey) - copy(dAtA[i:], m.PublicKey) - i = encodeVarintStatus(dAtA, i, uint64(len(m.PublicKey))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *NodeMetricsAggrReq) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NodeMetricsAggrReq) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NodeMetricsAggrReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Source) > 0 { - i -= len(m.Source) - copy(dAtA[i:], m.Source) - i = encodeVarintStatus(dAtA, i, uint64(len(m.Source))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *NodeDiscoveryAggrReq) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NodeDiscoveryAggrReq) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NodeDiscoveryAggrReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Source) > 0 { - i -= len(m.Source) - copy(dAtA[i:], m.Source) - i = encodeVarintStatus(dAtA, i, uint64(len(m.Source))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BtfsScanAggrReq) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BtfsScanAggrReq) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BtfsScanAggrReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.VersionDistribute) > 0 { - for k := range m.VersionDistribute { - v := m.VersionDistribute[k] - baseI := i - i = encodeVarintStatus(dAtA, i, uint64(v)) - i-- - dAtA[i] = 0x10 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintStatus(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintStatus(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb2 - } - } - if m.BigMiners != 0 { - i = encodeVarintStatus(dAtA, i, uint64(m.BigMiners)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa8 - } - if m.TotalMiners != 0 { - i = encodeVarintStatus(dAtA, i, uint64(m.TotalMiners)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa0 - } - if m.MinersAllAmount != 0 { - i = encodeVarintStatus(dAtA, i, uint64(m.MinersAllAmount)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x98 - } - if m.NewOnlineMinersCount != 0 { - i = encodeVarintStatus(dAtA, i, uint64(m.NewOnlineMinersCount)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x90 - } - if m.SuperOnlineMinersCount != 0 { - i = encodeVarintStatus(dAtA, i, uint64(m.SuperOnlineMinersCount)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x88 - } - if m.StorageLeftWhenContract != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.StorageLeftWhenContract)))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x81 - } - if m.ContractFailStorage != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.ContractFailStorage)))) - i-- - dAtA[i] = 0x79 - } - if m.ContractAllStorage != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.ContractAllStorage)))) - i-- - dAtA[i] = 0x71 - } - if m.ContractFailCount != 0 { - i = encodeVarintStatus(dAtA, i, uint64(m.ContractFailCount)) - i-- - dAtA[i] = 0x68 - } - if m.ContractAllCount != 0 { - i = encodeVarintStatus(dAtA, i, uint64(m.ContractAllCount)) - i-- - dAtA[i] = 0x60 - } - if len(m.TotalRank) > 0 { - i -= len(m.TotalRank) - copy(dAtA[i:], m.TotalRank) - i = encodeVarintStatus(dAtA, i, uint64(len(m.TotalRank))) - i-- - dAtA[i] = 0x5a - } - if len(m.NewRank) > 0 { - i -= len(m.NewRank) - copy(dAtA[i:], m.NewRank) - i = encodeVarintStatus(dAtA, i, uint64(len(m.NewRank))) - i-- - dAtA[i] = 0x52 - } - n1, err1 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.DateCreated, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.DateCreated):]) - if err1 != nil { - return 0, err1 - } - i -= n1 - i = encodeVarintStatus(dAtA, i, uint64(n1)) - i-- - dAtA[i] = 0x4a - if m.Price != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Price)))) - i-- - dAtA[i] = 0x41 - } - if m.StorageAlreadyUsed != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.StorageAlreadyUsed)))) - i-- - dAtA[i] = 0x39 - } - n2, err2 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.TimeCreated, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.TimeCreated):]) - if err2 != nil { - return 0, err2 - } - i -= n2 - i = encodeVarintStatus(dAtA, i, uint64(n2)) - i-- - dAtA[i] = 0x32 - if len(m.ScoreDistribute) > 0 { - for k := range m.ScoreDistribute { - v := m.ScoreDistribute[k] - baseI := i - i = encodeVarintStatus(dAtA, i, uint64(v)) - i-- - dAtA[i] = 0x10 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintStatus(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintStatus(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x2a - } - } - if len(m.CountryDistribute) > 0 { - for k := range m.CountryDistribute { - v := m.CountryDistribute[k] - baseI := i - i = encodeVarintStatus(dAtA, i, uint64(v)) - i-- - dAtA[i] = 0x10 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintStatus(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintStatus(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x22 - } - } - if m.OnlineMinersNumber != 0 { - i = encodeVarintStatus(dAtA, i, uint64(m.OnlineMinersNumber)) - i-- - dAtA[i] = 0x18 - } - if m.StorageVolumeLeft != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.StorageVolumeLeft)))) - i-- - dAtA[i] = 0x11 - } - if len(m.tableName) > 0 { - i -= len(m.tableName) - copy(dAtA[i:], m.tableName) - i = encodeVarintStatus(dAtA, i, uint64(len(m.tableName))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ScoreHistoryReq) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ScoreHistoryReq) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ScoreHistoryReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Scores) > 0 { - for iNdEx := len(m.Scores) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Scores[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStatus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *RewardInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RewardInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RewardInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.ActualReward != 0 { - i = encodeVarintStatus(dAtA, i, uint64(m.ActualReward)) - i-- - dAtA[i] = 0x50 - } - if m.ShouldReward != 0 { - i = encodeVarintStatus(dAtA, i, uint64(m.ShouldReward)) - i-- - dAtA[i] = 0x48 - } - if m.FileSize != 0 { - i = encodeVarintStatus(dAtA, i, uint64(m.FileSize)) - i-- - dAtA[i] = 0x40 - } - if m.FileCount != 0 { - i = encodeVarintStatus(dAtA, i, uint64(m.FileCount)) - i-- - dAtA[i] = 0x38 - } - if m.Stake != 0 { - i = encodeVarintStatus(dAtA, i, uint64(m.Stake)) - i-- - dAtA[i] = 0x30 - } - if m.Weight != 0 { - i = encodeVarintStatus(dAtA, i, uint64(m.Weight)) - i-- - dAtA[i] = 0x28 - } - if m.IsSuspect { - i-- - if m.IsSuspect { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if len(m.NodeId) > 0 { - i -= len(m.NodeId) - copy(dAtA[i:], m.NodeId) - i = encodeVarintStatus(dAtA, i, uint64(len(m.NodeId))) - i-- - dAtA[i] = 0x12 - } - if m.Type != 0 { - i = encodeVarintStatus(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *AirdropRewardHistoryReq) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AirdropRewardHistoryReq) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AirdropRewardHistoryReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintStatus(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x32 - } - n3, err3 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.DateAirdroped, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.DateAirdroped):]) - if err3 != nil { - return 0, err3 - } - i -= n3 - i = encodeVarintStatus(dAtA, i, uint64(n3)) - i-- - dAtA[i] = 0x2a - if m.PageTotal != 0 { - i = encodeVarintStatus(dAtA, i, uint64(m.PageTotal)) - i-- - dAtA[i] = 0x20 - } - if m.PageIndex != 0 { - i = encodeVarintStatus(dAtA, i, uint64(m.PageIndex)) - i-- - dAtA[i] = 0x18 - } - if len(m.Rewards) > 0 { - for iNdEx := len(m.Rewards) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Rewards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStatus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.RequesterPid) > 0 { - i -= len(m.RequesterPid) - copy(dAtA[i:], m.RequesterPid) - i = encodeVarintStatus(dAtA, i, uint64(len(m.RequesterPid))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Candidate) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Candidate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Candidate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - n4, err4 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.DateAirdroped, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.DateAirdroped):]) - if err4 != nil { - return 0, err4 - } - i -= n4 - i = encodeVarintStatus(dAtA, i, uint64(n4)) - i-- - dAtA[i] = 0x12 - if len(m.NodeId) > 0 { - i -= len(m.NodeId) - copy(dAtA[i:], m.NodeId) - i = encodeVarintStatus(dAtA, i, uint64(len(m.NodeId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *NodeContractStatReq) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NodeContractStatReq) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NodeContractStatReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.NodeContractStats) > 0 { - for iNdEx := len(m.NodeContractStats) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.NodeContractStats[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStatus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintStatus(dAtA []byte, offset int, v uint64) int { - offset -= sovStatus(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *SignedMetrics) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PublicKey) - if l > 0 { - n += 1 + l + sovStatus(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovStatus(uint64(l)) - } - l = len(m.Payload) - if l > 0 { - n += 1 + l + sovStatus(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NodeMetricsAggrReq) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Source) - if l > 0 { - n += 1 + l + sovStatus(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NodeDiscoveryAggrReq) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Source) - if l > 0 { - n += 1 + l + sovStatus(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *BtfsScanAggrReq) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.tableName) - if l > 0 { - n += 1 + l + sovStatus(uint64(l)) - } - if m.StorageVolumeLeft != 0 { - n += 9 - } - if m.OnlineMinersNumber != 0 { - n += 1 + sovStatus(uint64(m.OnlineMinersNumber)) - } - if len(m.CountryDistribute) > 0 { - for k, v := range m.CountryDistribute { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovStatus(uint64(len(k))) + 1 + sovStatus(uint64(v)) - n += mapEntrySize + 1 + sovStatus(uint64(mapEntrySize)) - } - } - if len(m.ScoreDistribute) > 0 { - for k, v := range m.ScoreDistribute { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovStatus(uint64(len(k))) + 1 + sovStatus(uint64(v)) - n += mapEntrySize + 1 + sovStatus(uint64(mapEntrySize)) - } - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.TimeCreated) - n += 1 + l + sovStatus(uint64(l)) - if m.StorageAlreadyUsed != 0 { - n += 9 - } - if m.Price != 0 { - n += 9 - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.DateCreated) - n += 1 + l + sovStatus(uint64(l)) - l = len(m.NewRank) - if l > 0 { - n += 1 + l + sovStatus(uint64(l)) - } - l = len(m.TotalRank) - if l > 0 { - n += 1 + l + sovStatus(uint64(l)) - } - if m.ContractAllCount != 0 { - n += 1 + sovStatus(uint64(m.ContractAllCount)) - } - if m.ContractFailCount != 0 { - n += 1 + sovStatus(uint64(m.ContractFailCount)) - } - if m.ContractAllStorage != 0 { - n += 9 - } - if m.ContractFailStorage != 0 { - n += 9 - } - if m.StorageLeftWhenContract != 0 { - n += 10 - } - if m.SuperOnlineMinersCount != 0 { - n += 2 + sovStatus(uint64(m.SuperOnlineMinersCount)) - } - if m.NewOnlineMinersCount != 0 { - n += 2 + sovStatus(uint64(m.NewOnlineMinersCount)) - } - if m.MinersAllAmount != 0 { - n += 2 + sovStatus(uint64(m.MinersAllAmount)) - } - if m.TotalMiners != 0 { - n += 2 + sovStatus(uint64(m.TotalMiners)) - } - if m.BigMiners != 0 { - n += 2 + sovStatus(uint64(m.BigMiners)) - } - if len(m.VersionDistribute) > 0 { - for k, v := range m.VersionDistribute { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovStatus(uint64(len(k))) + 1 + sovStatus(uint64(v)) - n += mapEntrySize + 2 + sovStatus(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ScoreHistoryReq) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Scores) > 0 { - for _, e := range m.Scores { - l = e.Size() - n += 1 + l + sovStatus(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RewardInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Type != 0 { - n += 1 + sovStatus(uint64(m.Type)) - } - l = len(m.NodeId) - if l > 0 { - n += 1 + l + sovStatus(uint64(l)) - } - if m.IsSuspect { - n += 2 - } - if m.Weight != 0 { - n += 1 + sovStatus(uint64(m.Weight)) - } - if m.Stake != 0 { - n += 1 + sovStatus(uint64(m.Stake)) - } - if m.FileCount != 0 { - n += 1 + sovStatus(uint64(m.FileCount)) - } - if m.FileSize != 0 { - n += 1 + sovStatus(uint64(m.FileSize)) - } - if m.ShouldReward != 0 { - n += 1 + sovStatus(uint64(m.ShouldReward)) - } - if m.ActualReward != 0 { - n += 1 + sovStatus(uint64(m.ActualReward)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AirdropRewardHistoryReq) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.RequesterPid) - if l > 0 { - n += 1 + l + sovStatus(uint64(l)) - } - if len(m.Rewards) > 0 { - for _, e := range m.Rewards { - l = e.Size() - n += 1 + l + sovStatus(uint64(l)) - } - } - if m.PageIndex != 0 { - n += 1 + sovStatus(uint64(m.PageIndex)) - } - if m.PageTotal != 0 { - n += 1 + sovStatus(uint64(m.PageTotal)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.DateAirdroped) - n += 1 + l + sovStatus(uint64(l)) - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovStatus(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Candidate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.NodeId) - if l > 0 { - n += 1 + l + sovStatus(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.DateAirdroped) - n += 1 + l + sovStatus(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NodeContractStatReq) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.NodeContractStats) > 0 { - for _, e := range m.NodeContractStats { - l = e.Size() - n += 1 + l + sovStatus(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovStatus(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozStatus(x uint64) (n int) { - return sovStatus(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *SignedMetrics) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignedMetrics: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignedMetrics: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthStatus - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthStatus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PublicKey = append(m.PublicKey[:0], dAtA[iNdEx:postIndex]...) - if m.PublicKey == nil { - m.PublicKey = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthStatus - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthStatus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthStatus - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthStatus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) - if m.Payload == nil { - m.Payload = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStatus(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthStatus - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthStatus - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NodeMetricsAggrReq) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NodeMetricsAggrReq: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NodeMetricsAggrReq: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStatus - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStatus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Source = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStatus(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthStatus - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthStatus - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NodeDiscoveryAggrReq) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NodeDiscoveryAggrReq: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NodeDiscoveryAggrReq: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStatus - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStatus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Source = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStatus(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthStatus - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthStatus - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BtfsScanAggrReq) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BtfsScanAggrReq: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BtfsScanAggrReq: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field tableName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStatus - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStatus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.tableName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageVolumeLeft", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.StorageVolumeLeft = float64(math.Float64frombits(v)) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field OnlineMinersNumber", wireType) - } - m.OnlineMinersNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.OnlineMinersNumber |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CountryDistribute", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStatus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStatus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CountryDistribute == nil { - m.CountryDistribute = make(map[string]int32) - } - var mapkey string - var mapvalue int32 - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthStatus - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthStatus - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapvalue |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipStatus(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthStatus - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.CountryDistribute[mapkey] = mapvalue - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ScoreDistribute", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStatus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStatus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ScoreDistribute == nil { - m.ScoreDistribute = make(map[string]int32) - } - var mapkey string - var mapvalue int32 - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthStatus - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthStatus - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapvalue |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipStatus(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthStatus - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.ScoreDistribute[mapkey] = mapvalue - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeCreated", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStatus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStatus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.TimeCreated, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageAlreadyUsed", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.StorageAlreadyUsed = float64(math.Float64frombits(v)) - case 8: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Price = float64(math.Float64frombits(v)) - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DateCreated", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStatus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStatus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.DateCreated, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NewRank", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStatus - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStatus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NewRank = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalRank", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStatus - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStatus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TotalRank = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractAllCount", wireType) - } - m.ContractAllCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ContractAllCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractFailCount", wireType) - } - m.ContractFailCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ContractFailCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 14: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractAllStorage", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.ContractAllStorage = float64(math.Float64frombits(v)) - case 15: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractFailStorage", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.ContractFailStorage = float64(math.Float64frombits(v)) - case 16: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageLeftWhenContract", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.StorageLeftWhenContract = float64(math.Float64frombits(v)) - case 17: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SuperOnlineMinersCount", wireType) - } - m.SuperOnlineMinersCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SuperOnlineMinersCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 18: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NewOnlineMinersCount", wireType) - } - m.NewOnlineMinersCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NewOnlineMinersCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 19: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MinersAllAmount", wireType) - } - m.MinersAllAmount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MinersAllAmount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 20: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalMiners", wireType) - } - m.TotalMiners = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalMiners |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 21: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BigMiners", wireType) - } - m.BigMiners = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BigMiners |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 22: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VersionDistribute", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStatus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStatus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.VersionDistribute == nil { - m.VersionDistribute = make(map[string]int32) - } - var mapkey string - var mapvalue int32 - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthStatus - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthStatus - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapvalue |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipStatus(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthStatus - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.VersionDistribute[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStatus(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthStatus - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthStatus - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ScoreHistoryReq) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ScoreHistoryReq: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ScoreHistoryReq: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scores", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStatus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStatus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Scores = append(m.Scores, &node.ScoreHistoryTab{}) - if err := m.Scores[len(m.Scores)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStatus(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthStatus - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthStatus - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RewardInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RewardInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RewardInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= RewardType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStatus - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStatus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NodeId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsSuspect", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsSuspect = bool(v != 0) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType) - } - m.Weight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Weight |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Stake", wireType) - } - m.Stake = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Stake |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FileCount", wireType) - } - m.FileCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FileCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FileSize", wireType) - } - m.FileSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FileSize |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ShouldReward", wireType) - } - m.ShouldReward = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ShouldReward |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ActualReward", wireType) - } - m.ActualReward = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ActualReward |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipStatus(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthStatus - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthStatus - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AirdropRewardHistoryReq) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AirdropRewardHistoryReq: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AirdropRewardHistoryReq: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequesterPid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStatus - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStatus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequesterPid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rewards", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStatus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStatus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Rewards = append(m.Rewards, &RewardInfo{}) - if err := m.Rewards[len(m.Rewards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PageIndex", wireType) - } - m.PageIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PageIndex |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PageTotal", wireType) - } - m.PageTotal = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PageTotal |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DateAirdroped", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStatus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStatus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.DateAirdroped, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthStatus - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthStatus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStatus(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthStatus - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthStatus - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Candidate) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Candidate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Candidate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStatus - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStatus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NodeId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DateAirdroped", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStatus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStatus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.DateAirdroped, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStatus(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthStatus - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthStatus - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NodeContractStatReq) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NodeContractStatReq: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NodeContractStatReq: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeContractStats", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStatus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStatus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NodeContractStats = append(m.NodeContractStats, &node.NodeContractStat{}) - if err := m.NodeContractStats[len(m.NodeContractStats)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStatus(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthStatus - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthStatus - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipStatus(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowStatus - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowStatus - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowStatus - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthStatus - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupStatus - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthStatus - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthStatus = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowStatus = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupStatus = fmt.Errorf("proto: unexpected end of group") -) diff --git a/protos/status/status.proto b/protos/status/status.proto deleted file mode 100644 index f577bc4..0000000 --- a/protos/status/status.proto +++ /dev/null @@ -1,123 +0,0 @@ -syntax = "proto3"; - -package status; - -// gogo plugin toggles -option (gogoproto.gogoproto_import) = true; -option (gogoproto.goproto_registration) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.messagename_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.unmarshaler_all) = true; -// golang option -option go_package = "status"; -// java options -option java_multiple_files = true; -option java_outer_classname = "StatusProto"; -option java_package = "io.btfs.status"; - -import "github.com/bittorrent/go-btfs-common/protos/node/node.proto"; -import "github.com/tron-us/protobuf/gogoproto/gogo.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/timestamp.proto"; - -service StatusService { - rpc UpdateMetrics(SignedMetrics) returns (google.protobuf.Empty); - rpc UpdateMetricsAndDiscovery(SignedMetrics) returns (google.protobuf.Empty); - rpc UpdateMetricsAggregation(NodeMetricsAggrReq) returns (google.protobuf.Empty); - rpc UpdateDiscoveryAggregation(NodeDiscoveryAggrReq) returns (google.protobuf.Empty); - rpc UpdateBtfsScanAggr(BtfsScanAggrReq) returns (google.protobuf.Empty); - rpc UpdateScoreHistory(ScoreHistoryReq) returns (google.protobuf.Empty); - rpc UpdateAirdropRewardHistory(AirdropRewardHistoryReq) returns (google.protobuf.Empty); - rpc UpdateNodeContractStat(NodeContractStatReq) returns (google.protobuf.Empty); -} - -message SignedMetrics { - bytes public_key = 1; - bytes signature = 2; - bytes payload = 3; -} - -message NodeMetricsAggrReq { - string source = 1; -} - -message NodeDiscoveryAggrReq { - string source = 1; -} - -message BtfsScanAggrReq { - string table_name = 1; - double storage_volume_left = 2; - uint32 online_miners_number = 3; - map country_distribute = 4; - map score_distribute = 5; - google.protobuf.Timestamp time_created = 6 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - double storage_already_used = 7; - double price = 8; - google.protobuf.Timestamp date_created = 9 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - string new_rank = 10; - string total_rank = 11; - uint32 contract_all_count = 12; - uint32 contract_fail_count = 13; - double contract_all_storage = 14; - double contract_fail_storage = 15; - double storage_left_when_contract = 16; - uint32 super_online_miners_count = 17; - uint32 new_online_miners_count = 18; - int64 miners_all_amount = 19; - int64 total_miners = 20; - int64 big_miners = 21; - map version_distribute = 22; -} - -message ScoreHistoryReq { - repeated node.ScoreHistoryTab scores = 1; -} - -enum RewardType { - FILESIZE = 0; - REPAIR = 1; -} - -message RewardInfo { - RewardType type = 1; - string node_id = 2; - bool is_suspect = 4; - uint32 weight = 5; - uint32 stake = 6; - uint32 file_count = 7; - uint64 file_size = 8; - uint64 should_reward = 9; - uint64 actual_reward = 10; -} - -message AirdropRewardHistoryReq { - string requester_pid = 1; - repeated RewardInfo rewards = 2; - uint32 page_index = 3; - uint32 page_total = 4; - google.protobuf.Timestamp date_airdroped = 5 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - bytes signature = 6; -} - -message Candidate { - string node_id = 1; - google.protobuf.Timestamp date_airdroped = 2 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; -} - -message NodeContractStatReq { - repeated node.NodeContractStat node_contract_stats = 1; -} diff --git a/utils/convert_test.go b/utils/convert_test.go deleted file mode 100644 index 7786a2e..0000000 --- a/utils/convert_test.go +++ /dev/null @@ -1,63 +0,0 @@ -package utils - -import ( - "bytes" - "crypto/rand" - "testing" - - "github.com/bittorrent/go-btfs-common/protos/escrow" - "github.com/libp2p/go-libp2p-core/crypto" - "github.com/tron-us/protobuf/proto" -) - -func TestBytesToStringAndStringToBytesInText(t *testing.T) { - data := []byte("Hello, welcome to this BytesToString/StringToBytes unit test") - - str, err := BytesToString(data, Text) - if err != nil { - t.Fatal(err) - } - - databack, err := StringToBytes(str, Text) - if err != nil { - t.Fatal(err) - } - - if res := bytes.Compare(data, databack); res != 0 { - t.Fatal("original bytes and converted back bytes don't match") - } -} - -func TestBytesToStringAndStringToBytesInBase64(t *testing.T) { - escrowContract := new(escrow.EscrowContract) - escrowContract.Amount = 101.00 - contract := &escrow.SignedEscrowContract{Contract: escrowContract} - contractBytes, err := proto.Marshal(contract) - if err != nil { - t.Fatal(err) - } - - priv, _, err := crypto.GenerateSecp256k1Key(rand.Reader) - if err != nil { - t.Fatal(err) - } - - sig, err := priv.Sign(contractBytes) - if err != nil { - t.Fatal(err) - } - - str, err := BytesToString(sig, Base64) - if err != nil { - t.Fatal(err) - } - - sigback, err := StringToBytes(str, Base64) - if err != nil { - t.Fatal(err) - } - - if res := bytes.Compare(sig, sigback); res != 0 { - t.Fatal("original bytes and converted back bytes don't match") - } -} diff --git a/utils/grpc/client.go b/utils/grpc/client.go index 5e074e2..0a6d7d1 100644 --- a/utils/grpc/client.go +++ b/utils/grpc/client.go @@ -10,21 +10,10 @@ import ( "strings" "time" - escrowpb "github.com/bittorrent/go-btfs-common/protos/escrow" - exchangepb "github.com/bittorrent/go-btfs-common/protos/exchange" - guardpb "github.com/bittorrent/go-btfs-common/protos/guard" - hubpb "github.com/bittorrent/go-btfs-common/protos/hub" - ledgerpb "github.com/bittorrent/go-btfs-common/protos/ledger" - "github.com/bittorrent/go-btfs-common/protos/online" - tronpb "github.com/bittorrent/go-btfs-common/protos/protocol/api" "github.com/bittorrent/go-btfs-common/protos/score" - sharedpb "github.com/bittorrent/go-btfs-common/protos/shared" - statuspb "github.com/bittorrent/go-btfs-common/protos/status" - "google.golang.org/grpc" "google.golang.org/grpc/connectivity" "google.golang.org/grpc/credentials" - "google.golang.org/grpc/health/grpc_health_v1" ) const ( @@ -54,30 +43,6 @@ func (g *ClientBuilder) doWithContext(ctx context.Context, f interface{}) error switch v := f.(type) { case func(context.Context, score.ScoreServiceClient) error: return wrapError("ScoreClient", v(ctx, score.NewScoreServiceClient(conn))) - case func(context.Context, online.OnlineServiceClient) error: - return wrapError("OnlineClient", v(ctx, online.NewOnlineServiceClient(conn))) - case func(context.Context, statuspb.StatusServiceClient) error: - return wrapError("StatusClient", v(ctx, statuspb.NewStatusServiceClient(conn))) - case func(context.Context, hubpb.HubQueryServiceClient) error: - return wrapError("HubQueryClient", v(ctx, hubpb.NewHubQueryServiceClient(conn))) - case func(context.Context, hubpb.HubParseServiceClient) error: - return wrapError("HubParseClient", v(ctx, hubpb.NewHubParseServiceClient(conn))) - case func(context.Context, guardpb.GuardServiceClient) error: - return wrapError("GuardClient", v(ctx, guardpb.NewGuardServiceClient(conn))) - case func(context.Context, escrowpb.EscrowServiceClient) error: - return wrapError("EscrowClient", v(ctx, escrowpb.NewEscrowServiceClient(conn))) - case func(ctx context.Context, client sharedpb.RuntimeServiceClient) error: - return wrapError("RuntimeClient", v(ctx, sharedpb.NewRuntimeServiceClient(conn))) - case func(ctx context.Context, client grpc_health_v1.HealthClient) error: - return wrapError("HealthClient", v(ctx, grpc_health_v1.NewHealthClient(conn))) - case func(ctx context.Context, client ledgerpb.ChannelsClient) error: - return wrapError("LedgerClient", v(ctx, ledgerpb.NewChannelsClient(conn))) - case func(ctx context.Context, client exchangepb.ExchangeClient) error: - return wrapError("ExchangeClient", v(ctx, exchangepb.NewExchangeClient(conn))) - case func(ctx context.Context, client tronpb.WalletSolidityClient) error: - return wrapError("WalletSolidityClient", v(ctx, tronpb.NewWalletSolidityClient(conn))) - case func(ctx context.Context, client tronpb.WalletClient) error: - return wrapError("WalletClient", v(ctx, tronpb.NewWalletClient(conn))) default: return fmt.Errorf("illegal function: %T", f) } diff --git a/utils/grpc/escrow.go b/utils/grpc/escrow.go deleted file mode 100644 index db27930..0000000 --- a/utils/grpc/escrow.go +++ /dev/null @@ -1,19 +0,0 @@ -package grpc - -import ( - "context" - escrowpb "github.com/bittorrent/go-btfs-common/protos/escrow" -) - -func EscrowClient(addr string) *EscrowClientBuilder { - return &EscrowClientBuilder{builder(addr)} -} - -type EscrowClientBuilder struct { - ClientBuilder -} - -func (g *EscrowClientBuilder) WithContext(ctx context.Context, f func(ctx context.Context, - client escrowpb.EscrowServiceClient) error) error { - return g.doWithContext(ctx, f) -} diff --git a/utils/grpc/exchange.go b/utils/grpc/exchange.go deleted file mode 100644 index 0f74ad0..0000000 --- a/utils/grpc/exchange.go +++ /dev/null @@ -1,19 +0,0 @@ -package grpc - -import ( - "context" - exchangepb "github.com/bittorrent/go-btfs-common/protos/exchange" -) - -func ExchangeClient(addr string) *ExchangeClientBuilder { - return &ExchangeClientBuilder{builder(addr)} -} - -type ExchangeClientBuilder struct { - ClientBuilder -} - -func (g *ExchangeClientBuilder) WithContext(ctx context.Context, f func(ctx context.Context, - client exchangepb.ExchangeClient) error) error { - return g.doWithContext(ctx, f) -} diff --git a/utils/grpc/guard.go b/utils/grpc/guard.go deleted file mode 100644 index c93aedb..0000000 --- a/utils/grpc/guard.go +++ /dev/null @@ -1,19 +0,0 @@ -package grpc - -import ( - "context" - guardpb "github.com/bittorrent/go-btfs-common/protos/guard" -) - -func GuardClient(addr string) *GuardClientBuilder { - return &GuardClientBuilder{builder(addr)} -} - -type GuardClientBuilder struct { - ClientBuilder -} - -func (g *GuardClientBuilder) WithContext(ctx context.Context, f func(ctx context.Context, - client guardpb.GuardServiceClient) error) error { - return g.doWithContext(ctx, f) -} diff --git a/utils/grpc/hub.go b/utils/grpc/hub.go deleted file mode 100644 index 75a3d35..0000000 --- a/utils/grpc/hub.go +++ /dev/null @@ -1,34 +0,0 @@ -package grpc - -import ( - "context" - hubpb "github.com/bittorrent/go-btfs-common/protos/hub" -) - -// hub-query -func HubQueryClient(addr string) *HubQueryClientBuilder { - return &HubQueryClientBuilder{builder(addr)} -} - -type HubQueryClientBuilder struct { - ClientBuilder -} - -func (g *HubQueryClientBuilder) WithContext(ctx context.Context, f func(ctx context.Context, - client hubpb.HubQueryServiceClient) error) error { - return g.doWithContext(ctx, f) -} - -// hub-parser -func HubParserClient(addr string) *HubParserClientBuilder { - return &HubParserClientBuilder{builder(addr)} -} - -type HubParserClientBuilder struct { - ClientBuilder -} - -func (g *HubParserClientBuilder) WithContext(ctx context.Context, f func(ctx context.Context, - client hubpb.HubParseServiceClient) error) error { - return g.doWithContext(ctx, f) -} diff --git a/utils/grpc/ledger.go b/utils/grpc/ledger.go deleted file mode 100644 index 6ed722e..0000000 --- a/utils/grpc/ledger.go +++ /dev/null @@ -1,19 +0,0 @@ -package grpc - -import ( - "context" - ledgerpb "github.com/bittorrent/go-btfs-common/protos/ledger" -) - -func LedgerClient(addr string) *LedgerClientBuilder { - return &LedgerClientBuilder{builder(addr)} -} - -type LedgerClientBuilder struct { - ClientBuilder -} - -func (g *LedgerClientBuilder) WithContext(ctx context.Context, f func(ctx context.Context, - client ledgerpb.ChannelsClient) error) error { - return g.doWithContext(ctx, f) -} diff --git a/utils/grpc/online.go b/utils/grpc/online.go deleted file mode 100644 index 1abcb77..0000000 --- a/utils/grpc/online.go +++ /dev/null @@ -1,19 +0,0 @@ -package grpc - -import ( - "context" - "github.com/bittorrent/go-btfs-common/protos/online" -) - -func OnlineClient(addr string) *OnlineClientBuilder { - return &OnlineClientBuilder{builder(addr)} -} - -type OnlineClientBuilder struct { - ClientBuilder -} - -func (g *OnlineClientBuilder) WithContext(ctx context.Context, f func(ctx context.Context, - client online.OnlineServiceClient) error) error { - return g.doWithContext(ctx, f) -} diff --git a/utils/grpc/setup_server.go b/utils/grpc/setup_server.go index 45c2abd..02b8c1c 100644 --- a/utils/grpc/setup_server.go +++ b/utils/grpc/setup_server.go @@ -3,7 +3,6 @@ package grpc import ( "context" "fmt" - "github.com/bittorrent/go-btfs-common/protos/online" "github.com/bittorrent/go-btfs-common/protos/score" "net" "net/http" @@ -11,11 +10,7 @@ import ( "time" "github.com/bittorrent/go-btfs-common/controller" - "github.com/bittorrent/go-btfs-common/protos/escrow" - "github.com/bittorrent/go-btfs-common/protos/guard" - "github.com/bittorrent/go-btfs-common/protos/hub" "github.com/bittorrent/go-btfs-common/protos/shared" - "github.com/bittorrent/go-btfs-common/protos/status" "github.com/bittorrent/go-btfs-common/utils" "github.com/tron-us/go-common/v2/constant" @@ -59,18 +54,6 @@ func (s *GrpcServer) serverTypeToServerName(server interface{}) { switch t := server.(type) { case score.ScoreServiceServer: s.serverName = "score-server" - case online.OnlineServiceServer: - s.serverName = "online-server" - case status.StatusServiceServer: - s.serverName = "status-server" - case escrow.EscrowServiceServer: - s.serverName = "escrow" - case guard.GuardServiceServer: - s.serverName = "guard-interceptor" - case hub.HubQueryServiceServer: - s.serverName = "hub-query" - case hub.HubParseServiceServer: - s.serverName = "hub-parser" case *controller.DefaultController: s.serverName = fmt.Sprintf("%v", t.ServerName) default: @@ -181,18 +164,6 @@ func (s *GrpcServer) RegisterServer(server interface{}) *GrpcServer { switch server.(type) { case score.ScoreServiceServer: score.RegisterScoreServiceServer(s.server, server.(score.ScoreServiceServer)) - case online.OnlineServiceServer: - online.RegisterOnlineServiceServer(s.server, server.(online.OnlineServiceServer)) - case status.StatusServiceServer: - status.RegisterStatusServiceServer(s.server, server.(status.StatusServiceServer)) - case escrow.EscrowServiceServer: - escrow.RegisterEscrowServiceServer(s.server, server.(escrow.EscrowServiceServer)) - case guard.GuardServiceServer: - guard.RegisterGuardServiceServer(s.server, server.(guard.GuardServiceServer)) - case hub.HubQueryServiceServer: - hub.RegisterHubQueryServiceServer(s.server, server.(hub.HubQueryServiceServer)) - case hub.HubParseServiceServer: - hub.RegisterHubParseServiceServer(s.server, server.(hub.HubParseServiceServer)) } shared.RegisterRuntimeServiceServer(s.server, &RuntimeServer{DB_URL: s.dBURLs, RD_URL: s.rDURL, serviceName: s.serverName}) diff --git a/utils/grpc/setup_server_test.go b/utils/grpc/setup_server_test.go index 3a758d3..6a2de29 100644 --- a/utils/grpc/setup_server_test.go +++ b/utils/grpc/setup_server_test.go @@ -3,16 +3,11 @@ package grpc import ( "context" "github.com/tron-us/go-common/v2/log" - "strings" "testing" "time" "github.com/bittorrent/go-btfs-common/config" - hubpb "github.com/bittorrent/go-btfs-common/protos/hub" - "github.com/bittorrent/go-btfs-common/protos/shared" - sharedpb "github.com/bittorrent/go-btfs-common/protos/shared" - - "github.com/tron-us/go-common/v2/constant" + scorepb "github.com/bittorrent/go-btfs-common/protos/score" "github.com/stretchr/testify/assert" "go.uber.org/zap" @@ -20,8 +15,7 @@ import ( ) type serverStruct struct { - hubpb.UnimplementedHubQueryServiceServer - sharedpb.UnimplementedRuntimeServiceServer + scorepb.UnimplementedScoreServiceServer } func init() { @@ -62,12 +56,12 @@ func TestSetupServer(t *testing.T) { //test server with client, check runtime for _, tt := range tests { err := RuntimeClient(tt.in).WithContext(context.Background(), func(ctx context.Context, - client shared.RuntimeServiceClient) error { - res := requestRuntimeInfo(t, ctx, client) - //check runtime information - assert.True(t, strings.Contains(res.DbStatusExtra["DB_URL_STATUS"], constant.DBConnectionHealthy), "database assigned unsuccessfully") - assert.True(t, strings.Contains(res.DbStatusExtra["DB_URL_GUARD"], constant.DBConnectionHealthy), "database assigned unsuccessfully") - assert.True(t, strings.Contains(res.RdStatusExtra, constant.RDConnectionHealthy), "redis assigned unsuccessfully") + client scorepb.ScoreServiceClient) error { + requestRuntimeInfo(t, ctx, client) + ////check runtime information + //assert.True(t, strings.Contains(res.DbStatusExtra["DB_URL_STATUS"], constant.DBConnectionHealthy), "database assigned unsuccessfully") + //assert.True(t, strings.Contains(res.DbStatusExtra["DB_URL_GUARD"], constant.DBConnectionHealthy), "database assigned unsuccessfully") + //assert.True(t, strings.Contains(res.RdStatusExtra, constant.RDConnectionHealthy), "redis assigned unsuccessfully") return nil }) if err != nil { @@ -76,9 +70,9 @@ func TestSetupServer(t *testing.T) { } } -func requestRuntimeInfo(t *testing.T, ctx context.Context, c shared.RuntimeServiceClient) *sharedpb.RuntimeInfoReport { - req := new(shared.SignedRuntimeInfoRequest) - res, err := c.CheckRuntime(ctx, req) +func requestRuntimeInfo(t *testing.T, ctx context.Context, c scorepb.ScoreServiceClient) *scorepb.SettingsResp { + req := new(scorepb.SettingsReq) + res, err := c.GetSettings(ctx, req) if err != nil { assert.Error(t, err, zap.Error(err)) } diff --git a/utils/grpc/solidity.go b/utils/grpc/solidity.go deleted file mode 100644 index 87d3bfc..0000000 --- a/utils/grpc/solidity.go +++ /dev/null @@ -1,19 +0,0 @@ -package grpc - -import ( - "context" - tronpb "github.com/bittorrent/go-btfs-common/protos/protocol/api" -) - -func SolidityClient(addr string) *SolidityClientBuilder { - return &SolidityClientBuilder{builder(addr)} -} - -type SolidityClientBuilder struct { - ClientBuilder -} - -func (g *SolidityClientBuilder) WithContext(ctx context.Context, f func(ctx context.Context, - client tronpb.WalletSolidityClient) error) error { - return g.doWithContext(ctx, f) -} diff --git a/utils/grpc/status.go b/utils/grpc/status.go deleted file mode 100644 index 47306a3..0000000 --- a/utils/grpc/status.go +++ /dev/null @@ -1,19 +0,0 @@ -package grpc - -import ( - "context" - statuspb "github.com/bittorrent/go-btfs-common/protos/status" -) - -func StatusClient(addr string) *StatusClientBuilder { - return &StatusClientBuilder{builder(addr)} -} - -type StatusClientBuilder struct { - ClientBuilder -} - -func (g *StatusClientBuilder) WithContext(ctx context.Context, f func(ctx context.Context, - client statuspb.StatusServiceClient) error) error { - return g.doWithContext(ctx, f) -} diff --git a/utils/grpc/wallet.go b/utils/grpc/wallet.go deleted file mode 100644 index 20d46ec..0000000 --- a/utils/grpc/wallet.go +++ /dev/null @@ -1,19 +0,0 @@ -package grpc - -import ( - "context" - tronpb "github.com/bittorrent/go-btfs-common/protos/protocol/api" -) - -func WalletClient(addr string) *WalletClientBuilder { - return &WalletClientBuilder{builder(addr)} -} - -type WalletClientBuilder struct { - ClientBuilder -} - -func (g *WalletClientBuilder) WithContext(ctx context.Context, f func(ctx context.Context, - client tronpb.WalletClient) error) error { - return g.doWithContext(ctx, f) -}