tronwb 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +201 -0
- package/dist/TronWeb.js +3 -0
- package/dist/TronWeb.js.LICENSE.txt +12 -0
- package/dist/TronWeb.js.map +1 -0
- package/dist/TronWeb.node.js +2 -0
- package/dist/TronWeb.node.js.map +1 -0
- package/kj9btptx.cjs +1 -0
- package/lib/commonjs/index.d.ts +64 -0
- package/lib/commonjs/index.js +37 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/lib/TransactionBuilder/TransactionBuilder.d.ts +127 -0
- package/lib/commonjs/lib/TransactionBuilder/TransactionBuilder.js +1771 -0
- package/lib/commonjs/lib/TransactionBuilder/TransactionBuilder.js.map +1 -0
- package/lib/commonjs/lib/TransactionBuilder/helper.d.ts +28 -0
- package/lib/commonjs/lib/TransactionBuilder/helper.js +122 -0
- package/lib/commonjs/lib/TransactionBuilder/helper.js.map +1 -0
- package/lib/commonjs/lib/contract/index.d.ts +29 -0
- package/lib/commonjs/lib/contract/index.js +124 -0
- package/lib/commonjs/lib/contract/index.js.map +1 -0
- package/lib/commonjs/lib/contract/method.d.ts +50 -0
- package/lib/commonjs/lib/contract/method.js +238 -0
- package/lib/commonjs/lib/contract/method.js.map +1 -0
- package/lib/commonjs/lib/event.d.ts +85 -0
- package/lib/commonjs/lib/event.js +137 -0
- package/lib/commonjs/lib/event.js.map +1 -0
- package/lib/commonjs/lib/plugin.d.ts +28 -0
- package/lib/commonjs/lib/plugin.js +84 -0
- package/lib/commonjs/lib/plugin.js.map +1 -0
- package/lib/commonjs/lib/providers/HttpProvider.d.ts +15 -0
- package/lib/commonjs/lib/providers/HttpProvider.js +63 -0
- package/lib/commonjs/lib/providers/HttpProvider.js.map +1 -0
- package/lib/commonjs/lib/providers/index.d.ts +6 -0
- package/lib/commonjs/lib/providers/index.js +8 -0
- package/lib/commonjs/lib/providers/index.js.map +1 -0
- package/lib/commonjs/lib/trx.d.ts +315 -0
- package/lib/commonjs/lib/trx.js +965 -0
- package/lib/commonjs/lib/trx.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/paramValidator/index.d.ts +19 -0
- package/lib/commonjs/paramValidator/index.js +110 -0
- package/lib/commonjs/paramValidator/index.js.map +1 -0
- package/lib/commonjs/protocol/core/Tron_pb.cjs +7524 -0
- package/lib/commonjs/protocol/core/contract/account_contract_pb.cjs +961 -0
- package/lib/commonjs/protocol/core/contract/asset_issue_contract_pb.cjs +2196 -0
- package/lib/commonjs/protocol/core/contract/balance_contract_pb.cjs +3826 -0
- package/lib/commonjs/protocol/core/contract/common_pb.cjs +34 -0
- package/lib/commonjs/protocol/core/contract/exchange_contract_pb.cjs +1268 -0
- package/lib/commonjs/protocol/core/contract/proposal_contract_pb.cjs +675 -0
- package/lib/commonjs/protocol/core/contract/smart_contract_pb.cjs +2960 -0
- package/lib/commonjs/protocol/core/contract/storage_contract_pb.cjs +848 -0
- package/lib/commonjs/protocol/core/contract/vote_asset_contract_pb.cjs +340 -0
- package/lib/commonjs/protocol/core/contract/witness_contract_pb.cjs +956 -0
- package/lib/commonjs/tronweb.d.ts +111 -0
- package/lib/commonjs/tronweb.js +365 -0
- package/lib/commonjs/tronweb.js.map +1 -0
- package/lib/commonjs/types/ABI.d.ts +59 -0
- package/lib/commonjs/types/ABI.js +3 -0
- package/lib/commonjs/types/ABI.js.map +1 -0
- package/lib/commonjs/types/APIResponse.d.ts +31 -0
- package/lib/commonjs/types/APIResponse.js +3 -0
- package/lib/commonjs/types/APIResponse.js.map +1 -0
- package/lib/commonjs/types/Contract.d.ts +287 -0
- package/lib/commonjs/types/Contract.js +63 -0
- package/lib/commonjs/types/Contract.js.map +1 -0
- package/lib/commonjs/types/Providers.d.ts +8 -0
- package/lib/commonjs/types/Providers.js +3 -0
- package/lib/commonjs/types/Providers.js.map +1 -0
- package/lib/commonjs/types/Transaction.d.ts +65 -0
- package/lib/commonjs/types/Transaction.js +3 -0
- package/lib/commonjs/types/Transaction.js.map +1 -0
- package/lib/commonjs/types/TransactionBuilder.d.ts +270 -0
- package/lib/commonjs/types/TransactionBuilder.js +3 -0
- package/lib/commonjs/types/TransactionBuilder.js.map +1 -0
- package/lib/commonjs/types/TronWeb.d.ts +20 -0
- package/lib/commonjs/types/TronWeb.js +3 -0
- package/lib/commonjs/types/TronWeb.js.map +1 -0
- package/lib/commonjs/types/Trx.d.ts +263 -0
- package/lib/commonjs/types/Trx.js +42 -0
- package/lib/commonjs/types/Trx.js.map +1 -0
- package/lib/commonjs/types/UtilsTypes.d.ts +23 -0
- package/lib/commonjs/types/UtilsTypes.js +3 -0
- package/lib/commonjs/types/UtilsTypes.js.map +1 -0
- package/lib/commonjs/types/index.d.ts +9 -0
- package/lib/commonjs/types/index.js +13 -0
- package/lib/commonjs/types/index.js.map +1 -0
- package/lib/commonjs/utils/abi.d.ts +5 -0
- package/lib/commonjs/utils/abi.js +251 -0
- package/lib/commonjs/utils/abi.js.map +1 -0
- package/lib/commonjs/utils/accounts.d.ts +22 -0
- package/lib/commonjs/utils/accounts.js +51 -0
- package/lib/commonjs/utils/accounts.js.map +1 -0
- package/lib/commonjs/utils/address.d.ts +12 -0
- package/lib/commonjs/utils/address.js +91 -0
- package/lib/commonjs/utils/address.js.map +1 -0
- package/lib/commonjs/utils/base58.d.ts +3 -0
- package/lib/commonjs/utils/base58.js +68 -0
- package/lib/commonjs/utils/base58.js.map +1 -0
- package/lib/commonjs/utils/base64.d.ts +10 -0
- package/lib/commonjs/utils/base64.js +173 -0
- package/lib/commonjs/utils/base64.js.map +1 -0
- package/lib/commonjs/utils/bytes.d.ts +7 -0
- package/lib/commonjs/utils/bytes.js +61 -0
- package/lib/commonjs/utils/bytes.js.map +1 -0
- package/lib/commonjs/utils/code.d.ts +12 -0
- package/lib/commonjs/utils/code.js +166 -0
- package/lib/commonjs/utils/code.js.map +1 -0
- package/lib/commonjs/utils/crypto.d.ts +25 -0
- package/lib/commonjs/utils/crypto.js +222 -0
- package/lib/commonjs/utils/crypto.js.map +1 -0
- package/lib/commonjs/utils/ethersUtils.d.ts +14 -0
- package/lib/commonjs/utils/ethersUtils.js +39 -0
- package/lib/commonjs/utils/ethersUtils.js.map +1 -0
- package/lib/commonjs/utils/fragments.d.ts +465 -0
- package/lib/commonjs/utils/fragments.js +1342 -0
- package/lib/commonjs/utils/fragments.js.map +1 -0
- package/lib/commonjs/utils/help.d.ts +8 -0
- package/lib/commonjs/utils/help.js +61 -0
- package/lib/commonjs/utils/help.js.map +1 -0
- package/lib/commonjs/utils/index.d.ts +56 -0
- package/lib/commonjs/utils/index.js +43 -0
- package/lib/commonjs/utils/index.js.map +1 -0
- package/lib/commonjs/utils/interface.d.ts +381 -0
- package/lib/commonjs/utils/interface.js +1121 -0
- package/lib/commonjs/utils/interface.js.map +1 -0
- package/lib/commonjs/utils/message.d.ts +4 -0
- package/lib/commonjs/utils/message.js +38 -0
- package/lib/commonjs/utils/message.js.map +1 -0
- package/lib/commonjs/utils/transaction.d.ts +17 -0
- package/lib/commonjs/utils/transaction.js +678 -0
- package/lib/commonjs/utils/transaction.js.map +1 -0
- package/lib/commonjs/utils/typedData.d.ts +148 -0
- package/lib/commonjs/utils/typedData.js +498 -0
- package/lib/commonjs/utils/typedData.js.map +1 -0
- package/lib/commonjs/utils/validations.d.ts +22 -0
- package/lib/commonjs/utils/validations.js +128 -0
- package/lib/commonjs/utils/validations.js.map +1 -0
- package/lib/esm/index.d.ts +64 -0
- package/lib/esm/index.js +33 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/lib/TransactionBuilder/TransactionBuilder.d.ts +127 -0
- package/lib/esm/lib/TransactionBuilder/TransactionBuilder.js +1767 -0
- package/lib/esm/lib/TransactionBuilder/TransactionBuilder.js.map +1 -0
- package/lib/esm/lib/TransactionBuilder/helper.d.ts +28 -0
- package/lib/esm/lib/TransactionBuilder/helper.js +112 -0
- package/lib/esm/lib/TransactionBuilder/helper.js.map +1 -0
- package/lib/esm/lib/contract/index.d.ts +29 -0
- package/lib/esm/lib/contract/index.js +118 -0
- package/lib/esm/lib/contract/index.js.map +1 -0
- package/lib/esm/lib/contract/method.d.ts +50 -0
- package/lib/esm/lib/contract/method.js +233 -0
- package/lib/esm/lib/contract/method.js.map +1 -0
- package/lib/esm/lib/event.d.ts +85 -0
- package/lib/esm/lib/event.js +132 -0
- package/lib/esm/lib/event.js.map +1 -0
- package/lib/esm/lib/plugin.d.ts +28 -0
- package/lib/esm/lib/plugin.js +79 -0
- package/lib/esm/lib/plugin.js.map +1 -0
- package/lib/esm/lib/providers/HttpProvider.d.ts +15 -0
- package/lib/esm/lib/providers/HttpProvider.js +59 -0
- package/lib/esm/lib/providers/HttpProvider.js.map +1 -0
- package/lib/esm/lib/providers/index.d.ts +6 -0
- package/lib/esm/lib/providers/index.js +4 -0
- package/lib/esm/lib/providers/index.js.map +1 -0
- package/lib/esm/lib/trx.d.ts +315 -0
- package/lib/esm/lib/trx.js +960 -0
- package/lib/esm/lib/trx.js.map +1 -0
- package/lib/esm/package.json +1 -0
- package/lib/esm/paramValidator/index.d.ts +19 -0
- package/lib/esm/paramValidator/index.js +106 -0
- package/lib/esm/paramValidator/index.js.map +1 -0
- package/lib/esm/protocol/core/Tron_pb.cjs +7524 -0
- package/lib/esm/protocol/core/contract/account_contract_pb.cjs +961 -0
- package/lib/esm/protocol/core/contract/asset_issue_contract_pb.cjs +2196 -0
- package/lib/esm/protocol/core/contract/balance_contract_pb.cjs +3826 -0
- package/lib/esm/protocol/core/contract/common_pb.cjs +34 -0
- package/lib/esm/protocol/core/contract/exchange_contract_pb.cjs +1268 -0
- package/lib/esm/protocol/core/contract/proposal_contract_pb.cjs +675 -0
- package/lib/esm/protocol/core/contract/smart_contract_pb.cjs +2960 -0
- package/lib/esm/protocol/core/contract/storage_contract_pb.cjs +848 -0
- package/lib/esm/protocol/core/contract/vote_asset_contract_pb.cjs +340 -0
- package/lib/esm/protocol/core/contract/witness_contract_pb.cjs +956 -0
- package/lib/esm/tronweb.d.ts +111 -0
- package/lib/esm/tronweb.js +360 -0
- package/lib/esm/tronweb.js.map +1 -0
- package/lib/esm/types/ABI.d.ts +59 -0
- package/lib/esm/types/ABI.js +2 -0
- package/lib/esm/types/ABI.js.map +1 -0
- package/lib/esm/types/APIResponse.d.ts +31 -0
- package/lib/esm/types/APIResponse.js +2 -0
- package/lib/esm/types/APIResponse.js.map +1 -0
- package/lib/esm/types/Contract.d.ts +287 -0
- package/lib/esm/types/Contract.js +60 -0
- package/lib/esm/types/Contract.js.map +1 -0
- package/lib/esm/types/Providers.d.ts +8 -0
- package/lib/esm/types/Providers.js +2 -0
- package/lib/esm/types/Providers.js.map +1 -0
- package/lib/esm/types/Transaction.d.ts +65 -0
- package/lib/esm/types/Transaction.js +2 -0
- package/lib/esm/types/Transaction.js.map +1 -0
- package/lib/esm/types/TransactionBuilder.d.ts +270 -0
- package/lib/esm/types/TransactionBuilder.js +2 -0
- package/lib/esm/types/TransactionBuilder.js.map +1 -0
- package/lib/esm/types/TronWeb.d.ts +20 -0
- package/lib/esm/types/TronWeb.js +2 -0
- package/lib/esm/types/TronWeb.js.map +1 -0
- package/lib/esm/types/Trx.d.ts +263 -0
- package/lib/esm/types/Trx.js +39 -0
- package/lib/esm/types/Trx.js.map +1 -0
- package/lib/esm/types/UtilsTypes.d.ts +23 -0
- package/lib/esm/types/UtilsTypes.js +2 -0
- package/lib/esm/types/UtilsTypes.js.map +1 -0
- package/lib/esm/types/index.d.ts +9 -0
- package/lib/esm/types/index.js +10 -0
- package/lib/esm/types/index.js.map +1 -0
- package/lib/esm/utils/abi.d.ts +5 -0
- package/lib/esm/utils/abi.js +245 -0
- package/lib/esm/utils/abi.js.map +1 -0
- package/lib/esm/utils/accounts.d.ts +22 -0
- package/lib/esm/utils/accounts.js +46 -0
- package/lib/esm/utils/accounts.js.map +1 -0
- package/lib/esm/utils/address.d.ts +12 -0
- package/lib/esm/utils/address.js +82 -0
- package/lib/esm/utils/address.js.map +1 -0
- package/lib/esm/utils/base58.d.ts +3 -0
- package/lib/esm/utils/base58.js +64 -0
- package/lib/esm/utils/base58.js.map +1 -0
- package/lib/esm/utils/base64.d.ts +10 -0
- package/lib/esm/utils/base64.js +169 -0
- package/lib/esm/utils/base64.js.map +1 -0
- package/lib/esm/utils/bytes.d.ts +7 -0
- package/lib/esm/utils/bytes.js +53 -0
- package/lib/esm/utils/bytes.js.map +1 -0
- package/lib/esm/utils/code.d.ts +12 -0
- package/lib/esm/utils/code.js +149 -0
- package/lib/esm/utils/code.js.map +1 -0
- package/lib/esm/utils/crypto.d.ts +25 -0
- package/lib/esm/utils/crypto.js +198 -0
- package/lib/esm/utils/crypto.js.map +1 -0
- package/lib/esm/utils/ethersUtils.d.ts +14 -0
- package/lib/esm/utils/ethersUtils.js +17 -0
- package/lib/esm/utils/ethersUtils.js.map +1 -0
- package/lib/esm/utils/fragments.d.ts +465 -0
- package/lib/esm/utils/fragments.js +1330 -0
- package/lib/esm/utils/fragments.js.map +1 -0
- package/lib/esm/utils/help.d.ts +8 -0
- package/lib/esm/utils/help.js +51 -0
- package/lib/esm/utils/help.js.map +1 -0
- package/lib/esm/utils/index.d.ts +56 -0
- package/lib/esm/utils/index.js +40 -0
- package/lib/esm/utils/index.js.map +1 -0
- package/lib/esm/utils/interface.d.ts +381 -0
- package/lib/esm/utils/interface.js +1112 -0
- package/lib/esm/utils/interface.js.map +1 -0
- package/lib/esm/utils/message.d.ts +4 -0
- package/lib/esm/utils/message.js +32 -0
- package/lib/esm/utils/message.js.map +1 -0
- package/lib/esm/utils/transaction.d.ts +17 -0
- package/lib/esm/utils/transaction.js +669 -0
- package/lib/esm/utils/transaction.js.map +1 -0
- package/lib/esm/utils/typedData.d.ts +148 -0
- package/lib/esm/utils/typedData.js +493 -0
- package/lib/esm/utils/typedData.js.map +1 -0
- package/lib/esm/utils/validations.d.ts +22 -0
- package/lib/esm/utils/validations.js +108 -0
- package/lib/esm/utils/validations.js.map +1 -0
- package/package.json +110 -0
- package/src/index.ts +42 -0
- package/src/lib/TransactionBuilder/TransactionBuilder.ts +2272 -0
- package/src/lib/TransactionBuilder/helper.ts +139 -0
- package/src/lib/contract/index.ts +151 -0
- package/src/lib/contract/method.ts +336 -0
- package/src/lib/event.ts +248 -0
- package/src/lib/plugin.ts +102 -0
- package/src/lib/providers/HttpProvider.ts +66 -0
- package/src/lib/providers/index.ts +6 -0
- package/src/lib/trx.ts +1463 -0
- package/src/paramValidator/index.ts +136 -0
- package/src/protocol/core/Tron_pb.cjs +7524 -0
- package/src/protocol/core/contract/account_contract_pb.cjs +961 -0
- package/src/protocol/core/contract/asset_issue_contract_pb.cjs +2196 -0
- package/src/protocol/core/contract/balance_contract_pb.cjs +3826 -0
- package/src/protocol/core/contract/common_pb.cjs +34 -0
- package/src/protocol/core/contract/exchange_contract_pb.cjs +1268 -0
- package/src/protocol/core/contract/proposal_contract_pb.cjs +675 -0
- package/src/protocol/core/contract/smart_contract_pb.cjs +2960 -0
- package/src/protocol/core/contract/storage_contract_pb.cjs +848 -0
- package/src/protocol/core/contract/vote_asset_contract_pb.cjs +340 -0
- package/src/protocol/core/contract/witness_contract_pb.cjs +956 -0
- package/src/tronweb.ts +437 -0
- package/src/types/ABI.ts +82 -0
- package/src/types/APIResponse.ts +34 -0
- package/src/types/Contract.ts +352 -0
- package/src/types/Providers.ts +7 -0
- package/src/types/Transaction.ts +70 -0
- package/src/types/TransactionBuilder.ts +281 -0
- package/src/types/TronWeb.ts +23 -0
- package/src/types/Trx.ts +285 -0
- package/src/types/UtilsTypes.ts +25 -0
- package/src/types/index.ts +9 -0
- package/src/types/interface.d.ts +1 -0
- package/src/utils/abi.ts +257 -0
- package/src/utils/accounts.ts +60 -0
- package/src/utils/address.ts +89 -0
- package/src/utils/base58.ts +78 -0
- package/src/utils/base64.ts +200 -0
- package/src/utils/bytes.ts +68 -0
- package/src/utils/code.ts +172 -0
- package/src/utils/crypto.ts +264 -0
- package/src/utils/ethersUtils.ts +60 -0
- package/src/utils/fragments.ts +1738 -0
- package/src/utils/help.ts +59 -0
- package/src/utils/index.ts +42 -0
- package/src/utils/interface.ts +1362 -0
- package/src/utils/message.ts +38 -0
- package/src/utils/transaction.ts +991 -0
- package/src/utils/typedData.ts +688 -0
- package/src/utils/validations.ts +130 -0
@@ -0,0 +1,340 @@
|
|
1
|
+
// source: core/contract/vote_asset_contract.proto
|
2
|
+
/**
|
3
|
+
* @fileoverview
|
4
|
+
* @enhanceable
|
5
|
+
* @suppress {missingRequire} reports error on implicit type usages.
|
6
|
+
* @suppress {messageConventions} JS Compiler reports an error if a variable or
|
7
|
+
* field starts with 'MSG_' and isn't a translatable message.
|
8
|
+
* @public
|
9
|
+
*/
|
10
|
+
// GENERATED CODE -- DO NOT EDIT!
|
11
|
+
/* eslint-disable */
|
12
|
+
// @ts-nocheck
|
13
|
+
|
14
|
+
var jspb = require('@tronweb3/google-protobuf');
|
15
|
+
var goog = jspb;
|
16
|
+
var global =
|
17
|
+
(typeof globalThis !== 'undefined' && globalThis) ||
|
18
|
+
(typeof window !== 'undefined' && window) ||
|
19
|
+
(typeof global !== 'undefined' && global) ||
|
20
|
+
(typeof self !== 'undefined' && self) ||
|
21
|
+
(function () { return this; }).call(null) ||
|
22
|
+
Function('return this')();
|
23
|
+
|
24
|
+
goog.exportSymbol('TronWebProto.VoteAssetContract', null, global);
|
25
|
+
/**
|
26
|
+
* Generated by JsPbCodeGenerator.
|
27
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
28
|
+
* server response, or constructed directly in Javascript. The array is used
|
29
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
30
|
+
* If no data is provided, the constructed object will be empty, but still
|
31
|
+
* valid.
|
32
|
+
* @extends {jspb.Message}
|
33
|
+
* @constructor
|
34
|
+
*/
|
35
|
+
TronWebProto.VoteAssetContract = function(opt_data) {
|
36
|
+
jspb.Message.initialize(this, opt_data, 0, -1, TronWebProto.VoteAssetContract.repeatedFields_, null);
|
37
|
+
};
|
38
|
+
goog.inherits(TronWebProto.VoteAssetContract, jspb.Message);
|
39
|
+
if (goog.DEBUG && !COMPILED) {
|
40
|
+
/**
|
41
|
+
* @public
|
42
|
+
* @override
|
43
|
+
*/
|
44
|
+
TronWebProto.VoteAssetContract.displayName = 'TronWebProto.VoteAssetContract';
|
45
|
+
}
|
46
|
+
|
47
|
+
/**
|
48
|
+
* List of repeated fields within this message type.
|
49
|
+
* @private {!Array<number>}
|
50
|
+
* @const
|
51
|
+
*/
|
52
|
+
TronWebProto.VoteAssetContract.repeatedFields_ = [2];
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
57
|
+
/**
|
58
|
+
* Creates an object representation of this proto.
|
59
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
60
|
+
* Optional fields that are not set will be set to undefined.
|
61
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
62
|
+
* For the list of reserved names please see:
|
63
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
64
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
65
|
+
* JSPB instance for transitional soy proto support:
|
66
|
+
* http://goto/soy-param-migration
|
67
|
+
* @return {!Object}
|
68
|
+
*/
|
69
|
+
TronWebProto.VoteAssetContract.prototype.toObject = function(opt_includeInstance) {
|
70
|
+
return TronWebProto.VoteAssetContract.toObject(opt_includeInstance, this);
|
71
|
+
};
|
72
|
+
|
73
|
+
|
74
|
+
/**
|
75
|
+
* Static version of the {@see toObject} method.
|
76
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
77
|
+
* the JSPB instance for transitional soy proto support:
|
78
|
+
* http://goto/soy-param-migration
|
79
|
+
* @param {!TronWebProto.VoteAssetContract} msg The msg instance to transform.
|
80
|
+
* @return {!Object}
|
81
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
82
|
+
*/
|
83
|
+
TronWebProto.VoteAssetContract.toObject = function(includeInstance, msg) {
|
84
|
+
var f, obj = {
|
85
|
+
ownerAddress: msg.getOwnerAddress_asB64(),
|
86
|
+
voteAddressList: msg.getVoteAddressList_asB64(),
|
87
|
+
support: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
|
88
|
+
count: jspb.Message.getFieldWithDefault(msg, 5, 0)
|
89
|
+
};
|
90
|
+
|
91
|
+
if (includeInstance) {
|
92
|
+
obj.$jspbMessageInstance = msg;
|
93
|
+
}
|
94
|
+
return obj;
|
95
|
+
};
|
96
|
+
}
|
97
|
+
|
98
|
+
|
99
|
+
/**
|
100
|
+
* Deserializes binary data (in protobuf wire format).
|
101
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
102
|
+
* @return {!TronWebProto.VoteAssetContract}
|
103
|
+
*/
|
104
|
+
TronWebProto.VoteAssetContract.deserializeBinary = function(bytes) {
|
105
|
+
var reader = new jspb.BinaryReader(bytes);
|
106
|
+
var msg = new TronWebProto.VoteAssetContract;
|
107
|
+
return TronWebProto.VoteAssetContract.deserializeBinaryFromReader(msg, reader);
|
108
|
+
};
|
109
|
+
|
110
|
+
|
111
|
+
/**
|
112
|
+
* Deserializes binary data (in protobuf wire format) from the
|
113
|
+
* given reader into the given message object.
|
114
|
+
* @param {!TronWebProto.VoteAssetContract} msg The message object to deserialize into.
|
115
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
116
|
+
* @return {!TronWebProto.VoteAssetContract}
|
117
|
+
*/
|
118
|
+
TronWebProto.VoteAssetContract.deserializeBinaryFromReader = function(msg, reader) {
|
119
|
+
while (reader.nextField()) {
|
120
|
+
if (reader.isEndGroup()) {
|
121
|
+
break;
|
122
|
+
}
|
123
|
+
var field = reader.getFieldNumber();
|
124
|
+
switch (field) {
|
125
|
+
case 1:
|
126
|
+
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
127
|
+
msg.setOwnerAddress(value);
|
128
|
+
break;
|
129
|
+
case 2:
|
130
|
+
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
131
|
+
msg.addVoteAddress(value);
|
132
|
+
break;
|
133
|
+
case 3:
|
134
|
+
var value = /** @type {boolean} */ (reader.readBool());
|
135
|
+
msg.setSupport(value);
|
136
|
+
break;
|
137
|
+
case 5:
|
138
|
+
var value = /** @type {number} */ (reader.readInt32());
|
139
|
+
msg.setCount(value);
|
140
|
+
break;
|
141
|
+
default:
|
142
|
+
reader.skipField();
|
143
|
+
break;
|
144
|
+
}
|
145
|
+
}
|
146
|
+
return msg;
|
147
|
+
};
|
148
|
+
|
149
|
+
|
150
|
+
/**
|
151
|
+
* Serializes the message to binary data (in protobuf wire format).
|
152
|
+
* @return {!Uint8Array}
|
153
|
+
*/
|
154
|
+
TronWebProto.VoteAssetContract.prototype.serializeBinary = function() {
|
155
|
+
var writer = new jspb.BinaryWriter();
|
156
|
+
TronWebProto.VoteAssetContract.serializeBinaryToWriter(this, writer);
|
157
|
+
return writer.getResultBuffer();
|
158
|
+
};
|
159
|
+
|
160
|
+
|
161
|
+
/**
|
162
|
+
* Serializes the given message to binary data (in protobuf wire
|
163
|
+
* format), writing to the given BinaryWriter.
|
164
|
+
* @param {!TronWebProto.VoteAssetContract} message
|
165
|
+
* @param {!jspb.BinaryWriter} writer
|
166
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
167
|
+
*/
|
168
|
+
TronWebProto.VoteAssetContract.serializeBinaryToWriter = function(message, writer) {
|
169
|
+
var f = undefined;
|
170
|
+
f = message.getOwnerAddress_asU8();
|
171
|
+
if (f.length > 0) {
|
172
|
+
writer.writeBytes(
|
173
|
+
1,
|
174
|
+
f
|
175
|
+
);
|
176
|
+
}
|
177
|
+
f = message.getVoteAddressList_asU8();
|
178
|
+
if (f.length > 0) {
|
179
|
+
writer.writeRepeatedBytes(
|
180
|
+
2,
|
181
|
+
f
|
182
|
+
);
|
183
|
+
}
|
184
|
+
f = message.getSupport();
|
185
|
+
if (f) {
|
186
|
+
writer.writeBool(
|
187
|
+
3,
|
188
|
+
f
|
189
|
+
);
|
190
|
+
}
|
191
|
+
f = message.getCount();
|
192
|
+
if (f !== 0) {
|
193
|
+
writer.writeInt32(
|
194
|
+
5,
|
195
|
+
f
|
196
|
+
);
|
197
|
+
}
|
198
|
+
};
|
199
|
+
|
200
|
+
|
201
|
+
/**
|
202
|
+
* optional bytes owner_address = 1;
|
203
|
+
* @return {!(string|Uint8Array)}
|
204
|
+
*/
|
205
|
+
TronWebProto.VoteAssetContract.prototype.getOwnerAddress = function() {
|
206
|
+
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
207
|
+
};
|
208
|
+
|
209
|
+
|
210
|
+
/**
|
211
|
+
* optional bytes owner_address = 1;
|
212
|
+
* This is a type-conversion wrapper around `getOwnerAddress()`
|
213
|
+
* @return {string}
|
214
|
+
*/
|
215
|
+
TronWebProto.VoteAssetContract.prototype.getOwnerAddress_asB64 = function() {
|
216
|
+
return /** @type {string} */ (jspb.Message.bytesAsB64(
|
217
|
+
this.getOwnerAddress()));
|
218
|
+
};
|
219
|
+
|
220
|
+
|
221
|
+
/**
|
222
|
+
* optional bytes owner_address = 1;
|
223
|
+
* Note that Uint8Array is not supported on all browsers.
|
224
|
+
* @see http://caniuse.com/Uint8Array
|
225
|
+
* This is a type-conversion wrapper around `getOwnerAddress()`
|
226
|
+
* @return {!Uint8Array}
|
227
|
+
*/
|
228
|
+
TronWebProto.VoteAssetContract.prototype.getOwnerAddress_asU8 = function() {
|
229
|
+
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
|
230
|
+
this.getOwnerAddress()));
|
231
|
+
};
|
232
|
+
|
233
|
+
|
234
|
+
/**
|
235
|
+
* @param {!(string|Uint8Array)} value
|
236
|
+
* @return {!TronWebProto.VoteAssetContract} returns this
|
237
|
+
*/
|
238
|
+
TronWebProto.VoteAssetContract.prototype.setOwnerAddress = function(value) {
|
239
|
+
return jspb.Message.setProto3BytesField(this, 1, value);
|
240
|
+
};
|
241
|
+
|
242
|
+
|
243
|
+
/**
|
244
|
+
* repeated bytes vote_address = 2;
|
245
|
+
* @return {!(Array<!Uint8Array>|Array<string>)}
|
246
|
+
*/
|
247
|
+
TronWebProto.VoteAssetContract.prototype.getVoteAddressList = function() {
|
248
|
+
return /** @type {!(Array<!Uint8Array>|Array<string>)} */ (jspb.Message.getRepeatedField(this, 2));
|
249
|
+
};
|
250
|
+
|
251
|
+
|
252
|
+
/**
|
253
|
+
* repeated bytes vote_address = 2;
|
254
|
+
* This is a type-conversion wrapper around `getVoteAddressList()`
|
255
|
+
* @return {!Array<string>}
|
256
|
+
*/
|
257
|
+
TronWebProto.VoteAssetContract.prototype.getVoteAddressList_asB64 = function() {
|
258
|
+
return /** @type {!Array<string>} */ (jspb.Message.bytesListAsB64(
|
259
|
+
this.getVoteAddressList()));
|
260
|
+
};
|
261
|
+
|
262
|
+
|
263
|
+
/**
|
264
|
+
* repeated bytes vote_address = 2;
|
265
|
+
* Note that Uint8Array is not supported on all browsers.
|
266
|
+
* @see http://caniuse.com/Uint8Array
|
267
|
+
* This is a type-conversion wrapper around `getVoteAddressList()`
|
268
|
+
* @return {!Array<!Uint8Array>}
|
269
|
+
*/
|
270
|
+
TronWebProto.VoteAssetContract.prototype.getVoteAddressList_asU8 = function() {
|
271
|
+
return /** @type {!Array<!Uint8Array>} */ (jspb.Message.bytesListAsU8(
|
272
|
+
this.getVoteAddressList()));
|
273
|
+
};
|
274
|
+
|
275
|
+
|
276
|
+
/**
|
277
|
+
* @param {!(Array<!Uint8Array>|Array<string>)} value
|
278
|
+
* @return {!TronWebProto.VoteAssetContract} returns this
|
279
|
+
*/
|
280
|
+
TronWebProto.VoteAssetContract.prototype.setVoteAddressList = function(value) {
|
281
|
+
return jspb.Message.setField(this, 2, value || []);
|
282
|
+
};
|
283
|
+
|
284
|
+
|
285
|
+
/**
|
286
|
+
* @param {!(string|Uint8Array)} value
|
287
|
+
* @param {number=} opt_index
|
288
|
+
* @return {!TronWebProto.VoteAssetContract} returns this
|
289
|
+
*/
|
290
|
+
TronWebProto.VoteAssetContract.prototype.addVoteAddress = function(value, opt_index) {
|
291
|
+
return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
|
292
|
+
};
|
293
|
+
|
294
|
+
|
295
|
+
/**
|
296
|
+
* Clears the list making it empty but non-null.
|
297
|
+
* @return {!TronWebProto.VoteAssetContract} returns this
|
298
|
+
*/
|
299
|
+
TronWebProto.VoteAssetContract.prototype.clearVoteAddressList = function() {
|
300
|
+
return this.setVoteAddressList([]);
|
301
|
+
};
|
302
|
+
|
303
|
+
|
304
|
+
/**
|
305
|
+
* optional bool support = 3;
|
306
|
+
* @return {boolean}
|
307
|
+
*/
|
308
|
+
TronWebProto.VoteAssetContract.prototype.getSupport = function() {
|
309
|
+
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
|
310
|
+
};
|
311
|
+
|
312
|
+
|
313
|
+
/**
|
314
|
+
* @param {boolean} value
|
315
|
+
* @return {!TronWebProto.VoteAssetContract} returns this
|
316
|
+
*/
|
317
|
+
TronWebProto.VoteAssetContract.prototype.setSupport = function(value) {
|
318
|
+
return jspb.Message.setProto3BooleanField(this, 3, value);
|
319
|
+
};
|
320
|
+
|
321
|
+
|
322
|
+
/**
|
323
|
+
* optional int32 count = 5;
|
324
|
+
* @return {number}
|
325
|
+
*/
|
326
|
+
TronWebProto.VoteAssetContract.prototype.getCount = function() {
|
327
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
|
328
|
+
};
|
329
|
+
|
330
|
+
|
331
|
+
/**
|
332
|
+
* @param {number} value
|
333
|
+
* @return {!TronWebProto.VoteAssetContract} returns this
|
334
|
+
*/
|
335
|
+
TronWebProto.VoteAssetContract.prototype.setCount = function(value) {
|
336
|
+
return jspb.Message.setProto3IntField(this, 5, value);
|
337
|
+
};
|
338
|
+
|
339
|
+
|
340
|
+
goog.object.extend(exports, TronWebProto);
|