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.
Files changed (318) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +201 -0
  3. package/dist/TronWeb.js +3 -0
  4. package/dist/TronWeb.js.LICENSE.txt +12 -0
  5. package/dist/TronWeb.js.map +1 -0
  6. package/dist/TronWeb.node.js +2 -0
  7. package/dist/TronWeb.node.js.map +1 -0
  8. package/kj9btptx.cjs +1 -0
  9. package/lib/commonjs/index.d.ts +64 -0
  10. package/lib/commonjs/index.js +37 -0
  11. package/lib/commonjs/index.js.map +1 -0
  12. package/lib/commonjs/lib/TransactionBuilder/TransactionBuilder.d.ts +127 -0
  13. package/lib/commonjs/lib/TransactionBuilder/TransactionBuilder.js +1771 -0
  14. package/lib/commonjs/lib/TransactionBuilder/TransactionBuilder.js.map +1 -0
  15. package/lib/commonjs/lib/TransactionBuilder/helper.d.ts +28 -0
  16. package/lib/commonjs/lib/TransactionBuilder/helper.js +122 -0
  17. package/lib/commonjs/lib/TransactionBuilder/helper.js.map +1 -0
  18. package/lib/commonjs/lib/contract/index.d.ts +29 -0
  19. package/lib/commonjs/lib/contract/index.js +124 -0
  20. package/lib/commonjs/lib/contract/index.js.map +1 -0
  21. package/lib/commonjs/lib/contract/method.d.ts +50 -0
  22. package/lib/commonjs/lib/contract/method.js +238 -0
  23. package/lib/commonjs/lib/contract/method.js.map +1 -0
  24. package/lib/commonjs/lib/event.d.ts +85 -0
  25. package/lib/commonjs/lib/event.js +137 -0
  26. package/lib/commonjs/lib/event.js.map +1 -0
  27. package/lib/commonjs/lib/plugin.d.ts +28 -0
  28. package/lib/commonjs/lib/plugin.js +84 -0
  29. package/lib/commonjs/lib/plugin.js.map +1 -0
  30. package/lib/commonjs/lib/providers/HttpProvider.d.ts +15 -0
  31. package/lib/commonjs/lib/providers/HttpProvider.js +63 -0
  32. package/lib/commonjs/lib/providers/HttpProvider.js.map +1 -0
  33. package/lib/commonjs/lib/providers/index.d.ts +6 -0
  34. package/lib/commonjs/lib/providers/index.js +8 -0
  35. package/lib/commonjs/lib/providers/index.js.map +1 -0
  36. package/lib/commonjs/lib/trx.d.ts +315 -0
  37. package/lib/commonjs/lib/trx.js +965 -0
  38. package/lib/commonjs/lib/trx.js.map +1 -0
  39. package/lib/commonjs/package.json +1 -0
  40. package/lib/commonjs/paramValidator/index.d.ts +19 -0
  41. package/lib/commonjs/paramValidator/index.js +110 -0
  42. package/lib/commonjs/paramValidator/index.js.map +1 -0
  43. package/lib/commonjs/protocol/core/Tron_pb.cjs +7524 -0
  44. package/lib/commonjs/protocol/core/contract/account_contract_pb.cjs +961 -0
  45. package/lib/commonjs/protocol/core/contract/asset_issue_contract_pb.cjs +2196 -0
  46. package/lib/commonjs/protocol/core/contract/balance_contract_pb.cjs +3826 -0
  47. package/lib/commonjs/protocol/core/contract/common_pb.cjs +34 -0
  48. package/lib/commonjs/protocol/core/contract/exchange_contract_pb.cjs +1268 -0
  49. package/lib/commonjs/protocol/core/contract/proposal_contract_pb.cjs +675 -0
  50. package/lib/commonjs/protocol/core/contract/smart_contract_pb.cjs +2960 -0
  51. package/lib/commonjs/protocol/core/contract/storage_contract_pb.cjs +848 -0
  52. package/lib/commonjs/protocol/core/contract/vote_asset_contract_pb.cjs +340 -0
  53. package/lib/commonjs/protocol/core/contract/witness_contract_pb.cjs +956 -0
  54. package/lib/commonjs/tronweb.d.ts +111 -0
  55. package/lib/commonjs/tronweb.js +365 -0
  56. package/lib/commonjs/tronweb.js.map +1 -0
  57. package/lib/commonjs/types/ABI.d.ts +59 -0
  58. package/lib/commonjs/types/ABI.js +3 -0
  59. package/lib/commonjs/types/ABI.js.map +1 -0
  60. package/lib/commonjs/types/APIResponse.d.ts +31 -0
  61. package/lib/commonjs/types/APIResponse.js +3 -0
  62. package/lib/commonjs/types/APIResponse.js.map +1 -0
  63. package/lib/commonjs/types/Contract.d.ts +287 -0
  64. package/lib/commonjs/types/Contract.js +63 -0
  65. package/lib/commonjs/types/Contract.js.map +1 -0
  66. package/lib/commonjs/types/Providers.d.ts +8 -0
  67. package/lib/commonjs/types/Providers.js +3 -0
  68. package/lib/commonjs/types/Providers.js.map +1 -0
  69. package/lib/commonjs/types/Transaction.d.ts +65 -0
  70. package/lib/commonjs/types/Transaction.js +3 -0
  71. package/lib/commonjs/types/Transaction.js.map +1 -0
  72. package/lib/commonjs/types/TransactionBuilder.d.ts +270 -0
  73. package/lib/commonjs/types/TransactionBuilder.js +3 -0
  74. package/lib/commonjs/types/TransactionBuilder.js.map +1 -0
  75. package/lib/commonjs/types/TronWeb.d.ts +20 -0
  76. package/lib/commonjs/types/TronWeb.js +3 -0
  77. package/lib/commonjs/types/TronWeb.js.map +1 -0
  78. package/lib/commonjs/types/Trx.d.ts +263 -0
  79. package/lib/commonjs/types/Trx.js +42 -0
  80. package/lib/commonjs/types/Trx.js.map +1 -0
  81. package/lib/commonjs/types/UtilsTypes.d.ts +23 -0
  82. package/lib/commonjs/types/UtilsTypes.js +3 -0
  83. package/lib/commonjs/types/UtilsTypes.js.map +1 -0
  84. package/lib/commonjs/types/index.d.ts +9 -0
  85. package/lib/commonjs/types/index.js +13 -0
  86. package/lib/commonjs/types/index.js.map +1 -0
  87. package/lib/commonjs/utils/abi.d.ts +5 -0
  88. package/lib/commonjs/utils/abi.js +251 -0
  89. package/lib/commonjs/utils/abi.js.map +1 -0
  90. package/lib/commonjs/utils/accounts.d.ts +22 -0
  91. package/lib/commonjs/utils/accounts.js +51 -0
  92. package/lib/commonjs/utils/accounts.js.map +1 -0
  93. package/lib/commonjs/utils/address.d.ts +12 -0
  94. package/lib/commonjs/utils/address.js +91 -0
  95. package/lib/commonjs/utils/address.js.map +1 -0
  96. package/lib/commonjs/utils/base58.d.ts +3 -0
  97. package/lib/commonjs/utils/base58.js +68 -0
  98. package/lib/commonjs/utils/base58.js.map +1 -0
  99. package/lib/commonjs/utils/base64.d.ts +10 -0
  100. package/lib/commonjs/utils/base64.js +173 -0
  101. package/lib/commonjs/utils/base64.js.map +1 -0
  102. package/lib/commonjs/utils/bytes.d.ts +7 -0
  103. package/lib/commonjs/utils/bytes.js +61 -0
  104. package/lib/commonjs/utils/bytes.js.map +1 -0
  105. package/lib/commonjs/utils/code.d.ts +12 -0
  106. package/lib/commonjs/utils/code.js +166 -0
  107. package/lib/commonjs/utils/code.js.map +1 -0
  108. package/lib/commonjs/utils/crypto.d.ts +25 -0
  109. package/lib/commonjs/utils/crypto.js +222 -0
  110. package/lib/commonjs/utils/crypto.js.map +1 -0
  111. package/lib/commonjs/utils/ethersUtils.d.ts +14 -0
  112. package/lib/commonjs/utils/ethersUtils.js +39 -0
  113. package/lib/commonjs/utils/ethersUtils.js.map +1 -0
  114. package/lib/commonjs/utils/fragments.d.ts +465 -0
  115. package/lib/commonjs/utils/fragments.js +1342 -0
  116. package/lib/commonjs/utils/fragments.js.map +1 -0
  117. package/lib/commonjs/utils/help.d.ts +8 -0
  118. package/lib/commonjs/utils/help.js +61 -0
  119. package/lib/commonjs/utils/help.js.map +1 -0
  120. package/lib/commonjs/utils/index.d.ts +56 -0
  121. package/lib/commonjs/utils/index.js +43 -0
  122. package/lib/commonjs/utils/index.js.map +1 -0
  123. package/lib/commonjs/utils/interface.d.ts +381 -0
  124. package/lib/commonjs/utils/interface.js +1121 -0
  125. package/lib/commonjs/utils/interface.js.map +1 -0
  126. package/lib/commonjs/utils/message.d.ts +4 -0
  127. package/lib/commonjs/utils/message.js +38 -0
  128. package/lib/commonjs/utils/message.js.map +1 -0
  129. package/lib/commonjs/utils/transaction.d.ts +17 -0
  130. package/lib/commonjs/utils/transaction.js +678 -0
  131. package/lib/commonjs/utils/transaction.js.map +1 -0
  132. package/lib/commonjs/utils/typedData.d.ts +148 -0
  133. package/lib/commonjs/utils/typedData.js +498 -0
  134. package/lib/commonjs/utils/typedData.js.map +1 -0
  135. package/lib/commonjs/utils/validations.d.ts +22 -0
  136. package/lib/commonjs/utils/validations.js +128 -0
  137. package/lib/commonjs/utils/validations.js.map +1 -0
  138. package/lib/esm/index.d.ts +64 -0
  139. package/lib/esm/index.js +33 -0
  140. package/lib/esm/index.js.map +1 -0
  141. package/lib/esm/lib/TransactionBuilder/TransactionBuilder.d.ts +127 -0
  142. package/lib/esm/lib/TransactionBuilder/TransactionBuilder.js +1767 -0
  143. package/lib/esm/lib/TransactionBuilder/TransactionBuilder.js.map +1 -0
  144. package/lib/esm/lib/TransactionBuilder/helper.d.ts +28 -0
  145. package/lib/esm/lib/TransactionBuilder/helper.js +112 -0
  146. package/lib/esm/lib/TransactionBuilder/helper.js.map +1 -0
  147. package/lib/esm/lib/contract/index.d.ts +29 -0
  148. package/lib/esm/lib/contract/index.js +118 -0
  149. package/lib/esm/lib/contract/index.js.map +1 -0
  150. package/lib/esm/lib/contract/method.d.ts +50 -0
  151. package/lib/esm/lib/contract/method.js +233 -0
  152. package/lib/esm/lib/contract/method.js.map +1 -0
  153. package/lib/esm/lib/event.d.ts +85 -0
  154. package/lib/esm/lib/event.js +132 -0
  155. package/lib/esm/lib/event.js.map +1 -0
  156. package/lib/esm/lib/plugin.d.ts +28 -0
  157. package/lib/esm/lib/plugin.js +79 -0
  158. package/lib/esm/lib/plugin.js.map +1 -0
  159. package/lib/esm/lib/providers/HttpProvider.d.ts +15 -0
  160. package/lib/esm/lib/providers/HttpProvider.js +59 -0
  161. package/lib/esm/lib/providers/HttpProvider.js.map +1 -0
  162. package/lib/esm/lib/providers/index.d.ts +6 -0
  163. package/lib/esm/lib/providers/index.js +4 -0
  164. package/lib/esm/lib/providers/index.js.map +1 -0
  165. package/lib/esm/lib/trx.d.ts +315 -0
  166. package/lib/esm/lib/trx.js +960 -0
  167. package/lib/esm/lib/trx.js.map +1 -0
  168. package/lib/esm/package.json +1 -0
  169. package/lib/esm/paramValidator/index.d.ts +19 -0
  170. package/lib/esm/paramValidator/index.js +106 -0
  171. package/lib/esm/paramValidator/index.js.map +1 -0
  172. package/lib/esm/protocol/core/Tron_pb.cjs +7524 -0
  173. package/lib/esm/protocol/core/contract/account_contract_pb.cjs +961 -0
  174. package/lib/esm/protocol/core/contract/asset_issue_contract_pb.cjs +2196 -0
  175. package/lib/esm/protocol/core/contract/balance_contract_pb.cjs +3826 -0
  176. package/lib/esm/protocol/core/contract/common_pb.cjs +34 -0
  177. package/lib/esm/protocol/core/contract/exchange_contract_pb.cjs +1268 -0
  178. package/lib/esm/protocol/core/contract/proposal_contract_pb.cjs +675 -0
  179. package/lib/esm/protocol/core/contract/smart_contract_pb.cjs +2960 -0
  180. package/lib/esm/protocol/core/contract/storage_contract_pb.cjs +848 -0
  181. package/lib/esm/protocol/core/contract/vote_asset_contract_pb.cjs +340 -0
  182. package/lib/esm/protocol/core/contract/witness_contract_pb.cjs +956 -0
  183. package/lib/esm/tronweb.d.ts +111 -0
  184. package/lib/esm/tronweb.js +360 -0
  185. package/lib/esm/tronweb.js.map +1 -0
  186. package/lib/esm/types/ABI.d.ts +59 -0
  187. package/lib/esm/types/ABI.js +2 -0
  188. package/lib/esm/types/ABI.js.map +1 -0
  189. package/lib/esm/types/APIResponse.d.ts +31 -0
  190. package/lib/esm/types/APIResponse.js +2 -0
  191. package/lib/esm/types/APIResponse.js.map +1 -0
  192. package/lib/esm/types/Contract.d.ts +287 -0
  193. package/lib/esm/types/Contract.js +60 -0
  194. package/lib/esm/types/Contract.js.map +1 -0
  195. package/lib/esm/types/Providers.d.ts +8 -0
  196. package/lib/esm/types/Providers.js +2 -0
  197. package/lib/esm/types/Providers.js.map +1 -0
  198. package/lib/esm/types/Transaction.d.ts +65 -0
  199. package/lib/esm/types/Transaction.js +2 -0
  200. package/lib/esm/types/Transaction.js.map +1 -0
  201. package/lib/esm/types/TransactionBuilder.d.ts +270 -0
  202. package/lib/esm/types/TransactionBuilder.js +2 -0
  203. package/lib/esm/types/TransactionBuilder.js.map +1 -0
  204. package/lib/esm/types/TronWeb.d.ts +20 -0
  205. package/lib/esm/types/TronWeb.js +2 -0
  206. package/lib/esm/types/TronWeb.js.map +1 -0
  207. package/lib/esm/types/Trx.d.ts +263 -0
  208. package/lib/esm/types/Trx.js +39 -0
  209. package/lib/esm/types/Trx.js.map +1 -0
  210. package/lib/esm/types/UtilsTypes.d.ts +23 -0
  211. package/lib/esm/types/UtilsTypes.js +2 -0
  212. package/lib/esm/types/UtilsTypes.js.map +1 -0
  213. package/lib/esm/types/index.d.ts +9 -0
  214. package/lib/esm/types/index.js +10 -0
  215. package/lib/esm/types/index.js.map +1 -0
  216. package/lib/esm/utils/abi.d.ts +5 -0
  217. package/lib/esm/utils/abi.js +245 -0
  218. package/lib/esm/utils/abi.js.map +1 -0
  219. package/lib/esm/utils/accounts.d.ts +22 -0
  220. package/lib/esm/utils/accounts.js +46 -0
  221. package/lib/esm/utils/accounts.js.map +1 -0
  222. package/lib/esm/utils/address.d.ts +12 -0
  223. package/lib/esm/utils/address.js +82 -0
  224. package/lib/esm/utils/address.js.map +1 -0
  225. package/lib/esm/utils/base58.d.ts +3 -0
  226. package/lib/esm/utils/base58.js +64 -0
  227. package/lib/esm/utils/base58.js.map +1 -0
  228. package/lib/esm/utils/base64.d.ts +10 -0
  229. package/lib/esm/utils/base64.js +169 -0
  230. package/lib/esm/utils/base64.js.map +1 -0
  231. package/lib/esm/utils/bytes.d.ts +7 -0
  232. package/lib/esm/utils/bytes.js +53 -0
  233. package/lib/esm/utils/bytes.js.map +1 -0
  234. package/lib/esm/utils/code.d.ts +12 -0
  235. package/lib/esm/utils/code.js +149 -0
  236. package/lib/esm/utils/code.js.map +1 -0
  237. package/lib/esm/utils/crypto.d.ts +25 -0
  238. package/lib/esm/utils/crypto.js +198 -0
  239. package/lib/esm/utils/crypto.js.map +1 -0
  240. package/lib/esm/utils/ethersUtils.d.ts +14 -0
  241. package/lib/esm/utils/ethersUtils.js +17 -0
  242. package/lib/esm/utils/ethersUtils.js.map +1 -0
  243. package/lib/esm/utils/fragments.d.ts +465 -0
  244. package/lib/esm/utils/fragments.js +1330 -0
  245. package/lib/esm/utils/fragments.js.map +1 -0
  246. package/lib/esm/utils/help.d.ts +8 -0
  247. package/lib/esm/utils/help.js +51 -0
  248. package/lib/esm/utils/help.js.map +1 -0
  249. package/lib/esm/utils/index.d.ts +56 -0
  250. package/lib/esm/utils/index.js +40 -0
  251. package/lib/esm/utils/index.js.map +1 -0
  252. package/lib/esm/utils/interface.d.ts +381 -0
  253. package/lib/esm/utils/interface.js +1112 -0
  254. package/lib/esm/utils/interface.js.map +1 -0
  255. package/lib/esm/utils/message.d.ts +4 -0
  256. package/lib/esm/utils/message.js +32 -0
  257. package/lib/esm/utils/message.js.map +1 -0
  258. package/lib/esm/utils/transaction.d.ts +17 -0
  259. package/lib/esm/utils/transaction.js +669 -0
  260. package/lib/esm/utils/transaction.js.map +1 -0
  261. package/lib/esm/utils/typedData.d.ts +148 -0
  262. package/lib/esm/utils/typedData.js +493 -0
  263. package/lib/esm/utils/typedData.js.map +1 -0
  264. package/lib/esm/utils/validations.d.ts +22 -0
  265. package/lib/esm/utils/validations.js +108 -0
  266. package/lib/esm/utils/validations.js.map +1 -0
  267. package/package.json +110 -0
  268. package/src/index.ts +42 -0
  269. package/src/lib/TransactionBuilder/TransactionBuilder.ts +2272 -0
  270. package/src/lib/TransactionBuilder/helper.ts +139 -0
  271. package/src/lib/contract/index.ts +151 -0
  272. package/src/lib/contract/method.ts +336 -0
  273. package/src/lib/event.ts +248 -0
  274. package/src/lib/plugin.ts +102 -0
  275. package/src/lib/providers/HttpProvider.ts +66 -0
  276. package/src/lib/providers/index.ts +6 -0
  277. package/src/lib/trx.ts +1463 -0
  278. package/src/paramValidator/index.ts +136 -0
  279. package/src/protocol/core/Tron_pb.cjs +7524 -0
  280. package/src/protocol/core/contract/account_contract_pb.cjs +961 -0
  281. package/src/protocol/core/contract/asset_issue_contract_pb.cjs +2196 -0
  282. package/src/protocol/core/contract/balance_contract_pb.cjs +3826 -0
  283. package/src/protocol/core/contract/common_pb.cjs +34 -0
  284. package/src/protocol/core/contract/exchange_contract_pb.cjs +1268 -0
  285. package/src/protocol/core/contract/proposal_contract_pb.cjs +675 -0
  286. package/src/protocol/core/contract/smart_contract_pb.cjs +2960 -0
  287. package/src/protocol/core/contract/storage_contract_pb.cjs +848 -0
  288. package/src/protocol/core/contract/vote_asset_contract_pb.cjs +340 -0
  289. package/src/protocol/core/contract/witness_contract_pb.cjs +956 -0
  290. package/src/tronweb.ts +437 -0
  291. package/src/types/ABI.ts +82 -0
  292. package/src/types/APIResponse.ts +34 -0
  293. package/src/types/Contract.ts +352 -0
  294. package/src/types/Providers.ts +7 -0
  295. package/src/types/Transaction.ts +70 -0
  296. package/src/types/TransactionBuilder.ts +281 -0
  297. package/src/types/TronWeb.ts +23 -0
  298. package/src/types/Trx.ts +285 -0
  299. package/src/types/UtilsTypes.ts +25 -0
  300. package/src/types/index.ts +9 -0
  301. package/src/types/interface.d.ts +1 -0
  302. package/src/utils/abi.ts +257 -0
  303. package/src/utils/accounts.ts +60 -0
  304. package/src/utils/address.ts +89 -0
  305. package/src/utils/base58.ts +78 -0
  306. package/src/utils/base64.ts +200 -0
  307. package/src/utils/bytes.ts +68 -0
  308. package/src/utils/code.ts +172 -0
  309. package/src/utils/crypto.ts +264 -0
  310. package/src/utils/ethersUtils.ts +60 -0
  311. package/src/utils/fragments.ts +1738 -0
  312. package/src/utils/help.ts +59 -0
  313. package/src/utils/index.ts +42 -0
  314. package/src/utils/interface.ts +1362 -0
  315. package/src/utils/message.ts +38 -0
  316. package/src/utils/transaction.ts +991 -0
  317. package/src/utils/typedData.ts +688 -0
  318. package/src/utils/validations.ts +130 -0
@@ -0,0 +1,848 @@
1
+ // source: core/contract/storage_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.BuyStorageBytesContract', null, global);
25
+ goog.exportSymbol('TronWebProto.BuyStorageContract', null, global);
26
+ goog.exportSymbol('TronWebProto.SellStorageContract', null, global);
27
+ goog.exportSymbol('TronWebProto.UpdateBrokerageContract', null, global);
28
+ /**
29
+ * Generated by JsPbCodeGenerator.
30
+ * @param {Array=} opt_data Optional initial data array, typically from a
31
+ * server response, or constructed directly in Javascript. The array is used
32
+ * in place and becomes part of the constructed object. It is not cloned.
33
+ * If no data is provided, the constructed object will be empty, but still
34
+ * valid.
35
+ * @extends {jspb.Message}
36
+ * @constructor
37
+ */
38
+ TronWebProto.BuyStorageBytesContract = function(opt_data) {
39
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
40
+ };
41
+ goog.inherits(TronWebProto.BuyStorageBytesContract, jspb.Message);
42
+ if (goog.DEBUG && !COMPILED) {
43
+ /**
44
+ * @public
45
+ * @override
46
+ */
47
+ TronWebProto.BuyStorageBytesContract.displayName = 'TronWebProto.BuyStorageBytesContract';
48
+ }
49
+ /**
50
+ * Generated by JsPbCodeGenerator.
51
+ * @param {Array=} opt_data Optional initial data array, typically from a
52
+ * server response, or constructed directly in Javascript. The array is used
53
+ * in place and becomes part of the constructed object. It is not cloned.
54
+ * If no data is provided, the constructed object will be empty, but still
55
+ * valid.
56
+ * @extends {jspb.Message}
57
+ * @constructor
58
+ */
59
+ TronWebProto.BuyStorageContract = function(opt_data) {
60
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
61
+ };
62
+ goog.inherits(TronWebProto.BuyStorageContract, jspb.Message);
63
+ if (goog.DEBUG && !COMPILED) {
64
+ /**
65
+ * @public
66
+ * @override
67
+ */
68
+ TronWebProto.BuyStorageContract.displayName = 'TronWebProto.BuyStorageContract';
69
+ }
70
+ /**
71
+ * Generated by JsPbCodeGenerator.
72
+ * @param {Array=} opt_data Optional initial data array, typically from a
73
+ * server response, or constructed directly in Javascript. The array is used
74
+ * in place and becomes part of the constructed object. It is not cloned.
75
+ * If no data is provided, the constructed object will be empty, but still
76
+ * valid.
77
+ * @extends {jspb.Message}
78
+ * @constructor
79
+ */
80
+ TronWebProto.SellStorageContract = function(opt_data) {
81
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
82
+ };
83
+ goog.inherits(TronWebProto.SellStorageContract, jspb.Message);
84
+ if (goog.DEBUG && !COMPILED) {
85
+ /**
86
+ * @public
87
+ * @override
88
+ */
89
+ TronWebProto.SellStorageContract.displayName = 'TronWebProto.SellStorageContract';
90
+ }
91
+ /**
92
+ * Generated by JsPbCodeGenerator.
93
+ * @param {Array=} opt_data Optional initial data array, typically from a
94
+ * server response, or constructed directly in Javascript. The array is used
95
+ * in place and becomes part of the constructed object. It is not cloned.
96
+ * If no data is provided, the constructed object will be empty, but still
97
+ * valid.
98
+ * @extends {jspb.Message}
99
+ * @constructor
100
+ */
101
+ TronWebProto.UpdateBrokerageContract = function(opt_data) {
102
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
103
+ };
104
+ goog.inherits(TronWebProto.UpdateBrokerageContract, jspb.Message);
105
+ if (goog.DEBUG && !COMPILED) {
106
+ /**
107
+ * @public
108
+ * @override
109
+ */
110
+ TronWebProto.UpdateBrokerageContract.displayName = 'TronWebProto.UpdateBrokerageContract';
111
+ }
112
+
113
+
114
+
115
+ if (jspb.Message.GENERATE_TO_OBJECT) {
116
+ /**
117
+ * Creates an object representation of this proto.
118
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
119
+ * Optional fields that are not set will be set to undefined.
120
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
121
+ * For the list of reserved names please see:
122
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
123
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
124
+ * JSPB instance for transitional soy proto support:
125
+ * http://goto/soy-param-migration
126
+ * @return {!Object}
127
+ */
128
+ TronWebProto.BuyStorageBytesContract.prototype.toObject = function(opt_includeInstance) {
129
+ return TronWebProto.BuyStorageBytesContract.toObject(opt_includeInstance, this);
130
+ };
131
+
132
+
133
+ /**
134
+ * Static version of the {@see toObject} method.
135
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
136
+ * the JSPB instance for transitional soy proto support:
137
+ * http://goto/soy-param-migration
138
+ * @param {!TronWebProto.BuyStorageBytesContract} msg The msg instance to transform.
139
+ * @return {!Object}
140
+ * @suppress {unusedLocalVariables} f is only used for nested messages
141
+ */
142
+ TronWebProto.BuyStorageBytesContract.toObject = function(includeInstance, msg) {
143
+ var f, obj = {
144
+ ownerAddress: msg.getOwnerAddress_asB64(),
145
+ bytes: jspb.Message.getFieldWithDefault(msg, 2, 0)
146
+ };
147
+
148
+ if (includeInstance) {
149
+ obj.$jspbMessageInstance = msg;
150
+ }
151
+ return obj;
152
+ };
153
+ }
154
+
155
+
156
+ /**
157
+ * Deserializes binary data (in protobuf wire format).
158
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
159
+ * @return {!TronWebProto.BuyStorageBytesContract}
160
+ */
161
+ TronWebProto.BuyStorageBytesContract.deserializeBinary = function(bytes) {
162
+ var reader = new jspb.BinaryReader(bytes);
163
+ var msg = new TronWebProto.BuyStorageBytesContract;
164
+ return TronWebProto.BuyStorageBytesContract.deserializeBinaryFromReader(msg, reader);
165
+ };
166
+
167
+
168
+ /**
169
+ * Deserializes binary data (in protobuf wire format) from the
170
+ * given reader into the given message object.
171
+ * @param {!TronWebProto.BuyStorageBytesContract} msg The message object to deserialize into.
172
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
173
+ * @return {!TronWebProto.BuyStorageBytesContract}
174
+ */
175
+ TronWebProto.BuyStorageBytesContract.deserializeBinaryFromReader = function(msg, reader) {
176
+ while (reader.nextField()) {
177
+ if (reader.isEndGroup()) {
178
+ break;
179
+ }
180
+ var field = reader.getFieldNumber();
181
+ switch (field) {
182
+ case 1:
183
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
184
+ msg.setOwnerAddress(value);
185
+ break;
186
+ case 2:
187
+ var value = /** @type {number} */ (reader.readInt64());
188
+ msg.setBytes(value);
189
+ break;
190
+ default:
191
+ reader.skipField();
192
+ break;
193
+ }
194
+ }
195
+ return msg;
196
+ };
197
+
198
+
199
+ /**
200
+ * Serializes the message to binary data (in protobuf wire format).
201
+ * @return {!Uint8Array}
202
+ */
203
+ TronWebProto.BuyStorageBytesContract.prototype.serializeBinary = function() {
204
+ var writer = new jspb.BinaryWriter();
205
+ TronWebProto.BuyStorageBytesContract.serializeBinaryToWriter(this, writer);
206
+ return writer.getResultBuffer();
207
+ };
208
+
209
+
210
+ /**
211
+ * Serializes the given message to binary data (in protobuf wire
212
+ * format), writing to the given BinaryWriter.
213
+ * @param {!TronWebProto.BuyStorageBytesContract} message
214
+ * @param {!jspb.BinaryWriter} writer
215
+ * @suppress {unusedLocalVariables} f is only used for nested messages
216
+ */
217
+ TronWebProto.BuyStorageBytesContract.serializeBinaryToWriter = function(message, writer) {
218
+ var f = undefined;
219
+ f = message.getOwnerAddress_asU8();
220
+ if (f.length > 0) {
221
+ writer.writeBytes(
222
+ 1,
223
+ f
224
+ );
225
+ }
226
+ f = message.getBytes();
227
+ if (f !== 0) {
228
+ writer.writeInt64(
229
+ 2,
230
+ f
231
+ );
232
+ }
233
+ };
234
+
235
+
236
+ /**
237
+ * optional bytes owner_address = 1;
238
+ * @return {!(string|Uint8Array)}
239
+ */
240
+ TronWebProto.BuyStorageBytesContract.prototype.getOwnerAddress = function() {
241
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
242
+ };
243
+
244
+
245
+ /**
246
+ * optional bytes owner_address = 1;
247
+ * This is a type-conversion wrapper around `getOwnerAddress()`
248
+ * @return {string}
249
+ */
250
+ TronWebProto.BuyStorageBytesContract.prototype.getOwnerAddress_asB64 = function() {
251
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
252
+ this.getOwnerAddress()));
253
+ };
254
+
255
+
256
+ /**
257
+ * optional bytes owner_address = 1;
258
+ * Note that Uint8Array is not supported on all browsers.
259
+ * @see http://caniuse.com/Uint8Array
260
+ * This is a type-conversion wrapper around `getOwnerAddress()`
261
+ * @return {!Uint8Array}
262
+ */
263
+ TronWebProto.BuyStorageBytesContract.prototype.getOwnerAddress_asU8 = function() {
264
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
265
+ this.getOwnerAddress()));
266
+ };
267
+
268
+
269
+ /**
270
+ * @param {!(string|Uint8Array)} value
271
+ * @return {!TronWebProto.BuyStorageBytesContract} returns this
272
+ */
273
+ TronWebProto.BuyStorageBytesContract.prototype.setOwnerAddress = function(value) {
274
+ return jspb.Message.setProto3BytesField(this, 1, value);
275
+ };
276
+
277
+
278
+ /**
279
+ * optional int64 bytes = 2;
280
+ * @return {number}
281
+ */
282
+ TronWebProto.BuyStorageBytesContract.prototype.getBytes = function() {
283
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
284
+ };
285
+
286
+
287
+ /**
288
+ * @param {number} value
289
+ * @return {!TronWebProto.BuyStorageBytesContract} returns this
290
+ */
291
+ TronWebProto.BuyStorageBytesContract.prototype.setBytes = function(value) {
292
+ return jspb.Message.setProto3IntField(this, 2, value);
293
+ };
294
+
295
+
296
+
297
+
298
+
299
+ if (jspb.Message.GENERATE_TO_OBJECT) {
300
+ /**
301
+ * Creates an object representation of this proto.
302
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
303
+ * Optional fields that are not set will be set to undefined.
304
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
305
+ * For the list of reserved names please see:
306
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
307
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
308
+ * JSPB instance for transitional soy proto support:
309
+ * http://goto/soy-param-migration
310
+ * @return {!Object}
311
+ */
312
+ TronWebProto.BuyStorageContract.prototype.toObject = function(opt_includeInstance) {
313
+ return TronWebProto.BuyStorageContract.toObject(opt_includeInstance, this);
314
+ };
315
+
316
+
317
+ /**
318
+ * Static version of the {@see toObject} method.
319
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
320
+ * the JSPB instance for transitional soy proto support:
321
+ * http://goto/soy-param-migration
322
+ * @param {!TronWebProto.BuyStorageContract} msg The msg instance to transform.
323
+ * @return {!Object}
324
+ * @suppress {unusedLocalVariables} f is only used for nested messages
325
+ */
326
+ TronWebProto.BuyStorageContract.toObject = function(includeInstance, msg) {
327
+ var f, obj = {
328
+ ownerAddress: msg.getOwnerAddress_asB64(),
329
+ quant: jspb.Message.getFieldWithDefault(msg, 2, 0)
330
+ };
331
+
332
+ if (includeInstance) {
333
+ obj.$jspbMessageInstance = msg;
334
+ }
335
+ return obj;
336
+ };
337
+ }
338
+
339
+
340
+ /**
341
+ * Deserializes binary data (in protobuf wire format).
342
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
343
+ * @return {!TronWebProto.BuyStorageContract}
344
+ */
345
+ TronWebProto.BuyStorageContract.deserializeBinary = function(bytes) {
346
+ var reader = new jspb.BinaryReader(bytes);
347
+ var msg = new TronWebProto.BuyStorageContract;
348
+ return TronWebProto.BuyStorageContract.deserializeBinaryFromReader(msg, reader);
349
+ };
350
+
351
+
352
+ /**
353
+ * Deserializes binary data (in protobuf wire format) from the
354
+ * given reader into the given message object.
355
+ * @param {!TronWebProto.BuyStorageContract} msg The message object to deserialize into.
356
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
357
+ * @return {!TronWebProto.BuyStorageContract}
358
+ */
359
+ TronWebProto.BuyStorageContract.deserializeBinaryFromReader = function(msg, reader) {
360
+ while (reader.nextField()) {
361
+ if (reader.isEndGroup()) {
362
+ break;
363
+ }
364
+ var field = reader.getFieldNumber();
365
+ switch (field) {
366
+ case 1:
367
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
368
+ msg.setOwnerAddress(value);
369
+ break;
370
+ case 2:
371
+ var value = /** @type {number} */ (reader.readInt64());
372
+ msg.setQuant(value);
373
+ break;
374
+ default:
375
+ reader.skipField();
376
+ break;
377
+ }
378
+ }
379
+ return msg;
380
+ };
381
+
382
+
383
+ /**
384
+ * Serializes the message to binary data (in protobuf wire format).
385
+ * @return {!Uint8Array}
386
+ */
387
+ TronWebProto.BuyStorageContract.prototype.serializeBinary = function() {
388
+ var writer = new jspb.BinaryWriter();
389
+ TronWebProto.BuyStorageContract.serializeBinaryToWriter(this, writer);
390
+ return writer.getResultBuffer();
391
+ };
392
+
393
+
394
+ /**
395
+ * Serializes the given message to binary data (in protobuf wire
396
+ * format), writing to the given BinaryWriter.
397
+ * @param {!TronWebProto.BuyStorageContract} message
398
+ * @param {!jspb.BinaryWriter} writer
399
+ * @suppress {unusedLocalVariables} f is only used for nested messages
400
+ */
401
+ TronWebProto.BuyStorageContract.serializeBinaryToWriter = function(message, writer) {
402
+ var f = undefined;
403
+ f = message.getOwnerAddress_asU8();
404
+ if (f.length > 0) {
405
+ writer.writeBytes(
406
+ 1,
407
+ f
408
+ );
409
+ }
410
+ f = message.getQuant();
411
+ if (f !== 0) {
412
+ writer.writeInt64(
413
+ 2,
414
+ f
415
+ );
416
+ }
417
+ };
418
+
419
+
420
+ /**
421
+ * optional bytes owner_address = 1;
422
+ * @return {!(string|Uint8Array)}
423
+ */
424
+ TronWebProto.BuyStorageContract.prototype.getOwnerAddress = function() {
425
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
426
+ };
427
+
428
+
429
+ /**
430
+ * optional bytes owner_address = 1;
431
+ * This is a type-conversion wrapper around `getOwnerAddress()`
432
+ * @return {string}
433
+ */
434
+ TronWebProto.BuyStorageContract.prototype.getOwnerAddress_asB64 = function() {
435
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
436
+ this.getOwnerAddress()));
437
+ };
438
+
439
+
440
+ /**
441
+ * optional bytes owner_address = 1;
442
+ * Note that Uint8Array is not supported on all browsers.
443
+ * @see http://caniuse.com/Uint8Array
444
+ * This is a type-conversion wrapper around `getOwnerAddress()`
445
+ * @return {!Uint8Array}
446
+ */
447
+ TronWebProto.BuyStorageContract.prototype.getOwnerAddress_asU8 = function() {
448
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
449
+ this.getOwnerAddress()));
450
+ };
451
+
452
+
453
+ /**
454
+ * @param {!(string|Uint8Array)} value
455
+ * @return {!TronWebProto.BuyStorageContract} returns this
456
+ */
457
+ TronWebProto.BuyStorageContract.prototype.setOwnerAddress = function(value) {
458
+ return jspb.Message.setProto3BytesField(this, 1, value);
459
+ };
460
+
461
+
462
+ /**
463
+ * optional int64 quant = 2;
464
+ * @return {number}
465
+ */
466
+ TronWebProto.BuyStorageContract.prototype.getQuant = function() {
467
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
468
+ };
469
+
470
+
471
+ /**
472
+ * @param {number} value
473
+ * @return {!TronWebProto.BuyStorageContract} returns this
474
+ */
475
+ TronWebProto.BuyStorageContract.prototype.setQuant = function(value) {
476
+ return jspb.Message.setProto3IntField(this, 2, value);
477
+ };
478
+
479
+
480
+
481
+
482
+
483
+ if (jspb.Message.GENERATE_TO_OBJECT) {
484
+ /**
485
+ * Creates an object representation of this proto.
486
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
487
+ * Optional fields that are not set will be set to undefined.
488
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
489
+ * For the list of reserved names please see:
490
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
491
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
492
+ * JSPB instance for transitional soy proto support:
493
+ * http://goto/soy-param-migration
494
+ * @return {!Object}
495
+ */
496
+ TronWebProto.SellStorageContract.prototype.toObject = function(opt_includeInstance) {
497
+ return TronWebProto.SellStorageContract.toObject(opt_includeInstance, this);
498
+ };
499
+
500
+
501
+ /**
502
+ * Static version of the {@see toObject} method.
503
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
504
+ * the JSPB instance for transitional soy proto support:
505
+ * http://goto/soy-param-migration
506
+ * @param {!TronWebProto.SellStorageContract} msg The msg instance to transform.
507
+ * @return {!Object}
508
+ * @suppress {unusedLocalVariables} f is only used for nested messages
509
+ */
510
+ TronWebProto.SellStorageContract.toObject = function(includeInstance, msg) {
511
+ var f, obj = {
512
+ ownerAddress: msg.getOwnerAddress_asB64(),
513
+ storageBytes: jspb.Message.getFieldWithDefault(msg, 2, 0)
514
+ };
515
+
516
+ if (includeInstance) {
517
+ obj.$jspbMessageInstance = msg;
518
+ }
519
+ return obj;
520
+ };
521
+ }
522
+
523
+
524
+ /**
525
+ * Deserializes binary data (in protobuf wire format).
526
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
527
+ * @return {!TronWebProto.SellStorageContract}
528
+ */
529
+ TronWebProto.SellStorageContract.deserializeBinary = function(bytes) {
530
+ var reader = new jspb.BinaryReader(bytes);
531
+ var msg = new TronWebProto.SellStorageContract;
532
+ return TronWebProto.SellStorageContract.deserializeBinaryFromReader(msg, reader);
533
+ };
534
+
535
+
536
+ /**
537
+ * Deserializes binary data (in protobuf wire format) from the
538
+ * given reader into the given message object.
539
+ * @param {!TronWebProto.SellStorageContract} msg The message object to deserialize into.
540
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
541
+ * @return {!TronWebProto.SellStorageContract}
542
+ */
543
+ TronWebProto.SellStorageContract.deserializeBinaryFromReader = function(msg, reader) {
544
+ while (reader.nextField()) {
545
+ if (reader.isEndGroup()) {
546
+ break;
547
+ }
548
+ var field = reader.getFieldNumber();
549
+ switch (field) {
550
+ case 1:
551
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
552
+ msg.setOwnerAddress(value);
553
+ break;
554
+ case 2:
555
+ var value = /** @type {number} */ (reader.readInt64());
556
+ msg.setStorageBytes(value);
557
+ break;
558
+ default:
559
+ reader.skipField();
560
+ break;
561
+ }
562
+ }
563
+ return msg;
564
+ };
565
+
566
+
567
+ /**
568
+ * Serializes the message to binary data (in protobuf wire format).
569
+ * @return {!Uint8Array}
570
+ */
571
+ TronWebProto.SellStorageContract.prototype.serializeBinary = function() {
572
+ var writer = new jspb.BinaryWriter();
573
+ TronWebProto.SellStorageContract.serializeBinaryToWriter(this, writer);
574
+ return writer.getResultBuffer();
575
+ };
576
+
577
+
578
+ /**
579
+ * Serializes the given message to binary data (in protobuf wire
580
+ * format), writing to the given BinaryWriter.
581
+ * @param {!TronWebProto.SellStorageContract} message
582
+ * @param {!jspb.BinaryWriter} writer
583
+ * @suppress {unusedLocalVariables} f is only used for nested messages
584
+ */
585
+ TronWebProto.SellStorageContract.serializeBinaryToWriter = function(message, writer) {
586
+ var f = undefined;
587
+ f = message.getOwnerAddress_asU8();
588
+ if (f.length > 0) {
589
+ writer.writeBytes(
590
+ 1,
591
+ f
592
+ );
593
+ }
594
+ f = message.getStorageBytes();
595
+ if (f !== 0) {
596
+ writer.writeInt64(
597
+ 2,
598
+ f
599
+ );
600
+ }
601
+ };
602
+
603
+
604
+ /**
605
+ * optional bytes owner_address = 1;
606
+ * @return {!(string|Uint8Array)}
607
+ */
608
+ TronWebProto.SellStorageContract.prototype.getOwnerAddress = function() {
609
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
610
+ };
611
+
612
+
613
+ /**
614
+ * optional bytes owner_address = 1;
615
+ * This is a type-conversion wrapper around `getOwnerAddress()`
616
+ * @return {string}
617
+ */
618
+ TronWebProto.SellStorageContract.prototype.getOwnerAddress_asB64 = function() {
619
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
620
+ this.getOwnerAddress()));
621
+ };
622
+
623
+
624
+ /**
625
+ * optional bytes owner_address = 1;
626
+ * Note that Uint8Array is not supported on all browsers.
627
+ * @see http://caniuse.com/Uint8Array
628
+ * This is a type-conversion wrapper around `getOwnerAddress()`
629
+ * @return {!Uint8Array}
630
+ */
631
+ TronWebProto.SellStorageContract.prototype.getOwnerAddress_asU8 = function() {
632
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
633
+ this.getOwnerAddress()));
634
+ };
635
+
636
+
637
+ /**
638
+ * @param {!(string|Uint8Array)} value
639
+ * @return {!TronWebProto.SellStorageContract} returns this
640
+ */
641
+ TronWebProto.SellStorageContract.prototype.setOwnerAddress = function(value) {
642
+ return jspb.Message.setProto3BytesField(this, 1, value);
643
+ };
644
+
645
+
646
+ /**
647
+ * optional int64 storage_bytes = 2;
648
+ * @return {number}
649
+ */
650
+ TronWebProto.SellStorageContract.prototype.getStorageBytes = function() {
651
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
652
+ };
653
+
654
+
655
+ /**
656
+ * @param {number} value
657
+ * @return {!TronWebProto.SellStorageContract} returns this
658
+ */
659
+ TronWebProto.SellStorageContract.prototype.setStorageBytes = function(value) {
660
+ return jspb.Message.setProto3IntField(this, 2, value);
661
+ };
662
+
663
+
664
+
665
+
666
+
667
+ if (jspb.Message.GENERATE_TO_OBJECT) {
668
+ /**
669
+ * Creates an object representation of this proto.
670
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
671
+ * Optional fields that are not set will be set to undefined.
672
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
673
+ * For the list of reserved names please see:
674
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
675
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
676
+ * JSPB instance for transitional soy proto support:
677
+ * http://goto/soy-param-migration
678
+ * @return {!Object}
679
+ */
680
+ TronWebProto.UpdateBrokerageContract.prototype.toObject = function(opt_includeInstance) {
681
+ return TronWebProto.UpdateBrokerageContract.toObject(opt_includeInstance, this);
682
+ };
683
+
684
+
685
+ /**
686
+ * Static version of the {@see toObject} method.
687
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
688
+ * the JSPB instance for transitional soy proto support:
689
+ * http://goto/soy-param-migration
690
+ * @param {!TronWebProto.UpdateBrokerageContract} msg The msg instance to transform.
691
+ * @return {!Object}
692
+ * @suppress {unusedLocalVariables} f is only used for nested messages
693
+ */
694
+ TronWebProto.UpdateBrokerageContract.toObject = function(includeInstance, msg) {
695
+ var f, obj = {
696
+ ownerAddress: msg.getOwnerAddress_asB64(),
697
+ brokerage: jspb.Message.getFieldWithDefault(msg, 2, 0)
698
+ };
699
+
700
+ if (includeInstance) {
701
+ obj.$jspbMessageInstance = msg;
702
+ }
703
+ return obj;
704
+ };
705
+ }
706
+
707
+
708
+ /**
709
+ * Deserializes binary data (in protobuf wire format).
710
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
711
+ * @return {!TronWebProto.UpdateBrokerageContract}
712
+ */
713
+ TronWebProto.UpdateBrokerageContract.deserializeBinary = function(bytes) {
714
+ var reader = new jspb.BinaryReader(bytes);
715
+ var msg = new TronWebProto.UpdateBrokerageContract;
716
+ return TronWebProto.UpdateBrokerageContract.deserializeBinaryFromReader(msg, reader);
717
+ };
718
+
719
+
720
+ /**
721
+ * Deserializes binary data (in protobuf wire format) from the
722
+ * given reader into the given message object.
723
+ * @param {!TronWebProto.UpdateBrokerageContract} msg The message object to deserialize into.
724
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
725
+ * @return {!TronWebProto.UpdateBrokerageContract}
726
+ */
727
+ TronWebProto.UpdateBrokerageContract.deserializeBinaryFromReader = function(msg, reader) {
728
+ while (reader.nextField()) {
729
+ if (reader.isEndGroup()) {
730
+ break;
731
+ }
732
+ var field = reader.getFieldNumber();
733
+ switch (field) {
734
+ case 1:
735
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
736
+ msg.setOwnerAddress(value);
737
+ break;
738
+ case 2:
739
+ var value = /** @type {number} */ (reader.readInt32());
740
+ msg.setBrokerage(value);
741
+ break;
742
+ default:
743
+ reader.skipField();
744
+ break;
745
+ }
746
+ }
747
+ return msg;
748
+ };
749
+
750
+
751
+ /**
752
+ * Serializes the message to binary data (in protobuf wire format).
753
+ * @return {!Uint8Array}
754
+ */
755
+ TronWebProto.UpdateBrokerageContract.prototype.serializeBinary = function() {
756
+ var writer = new jspb.BinaryWriter();
757
+ TronWebProto.UpdateBrokerageContract.serializeBinaryToWriter(this, writer);
758
+ return writer.getResultBuffer();
759
+ };
760
+
761
+
762
+ /**
763
+ * Serializes the given message to binary data (in protobuf wire
764
+ * format), writing to the given BinaryWriter.
765
+ * @param {!TronWebProto.UpdateBrokerageContract} message
766
+ * @param {!jspb.BinaryWriter} writer
767
+ * @suppress {unusedLocalVariables} f is only used for nested messages
768
+ */
769
+ TronWebProto.UpdateBrokerageContract.serializeBinaryToWriter = function(message, writer) {
770
+ var f = undefined;
771
+ f = message.getOwnerAddress_asU8();
772
+ if (f.length > 0) {
773
+ writer.writeBytes(
774
+ 1,
775
+ f
776
+ );
777
+ }
778
+ f = message.getBrokerage();
779
+ if (f !== 0) {
780
+ writer.writeInt32(
781
+ 2,
782
+ f
783
+ );
784
+ }
785
+ };
786
+
787
+
788
+ /**
789
+ * optional bytes owner_address = 1;
790
+ * @return {!(string|Uint8Array)}
791
+ */
792
+ TronWebProto.UpdateBrokerageContract.prototype.getOwnerAddress = function() {
793
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
794
+ };
795
+
796
+
797
+ /**
798
+ * optional bytes owner_address = 1;
799
+ * This is a type-conversion wrapper around `getOwnerAddress()`
800
+ * @return {string}
801
+ */
802
+ TronWebProto.UpdateBrokerageContract.prototype.getOwnerAddress_asB64 = function() {
803
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
804
+ this.getOwnerAddress()));
805
+ };
806
+
807
+
808
+ /**
809
+ * optional bytes owner_address = 1;
810
+ * Note that Uint8Array is not supported on all browsers.
811
+ * @see http://caniuse.com/Uint8Array
812
+ * This is a type-conversion wrapper around `getOwnerAddress()`
813
+ * @return {!Uint8Array}
814
+ */
815
+ TronWebProto.UpdateBrokerageContract.prototype.getOwnerAddress_asU8 = function() {
816
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
817
+ this.getOwnerAddress()));
818
+ };
819
+
820
+
821
+ /**
822
+ * @param {!(string|Uint8Array)} value
823
+ * @return {!TronWebProto.UpdateBrokerageContract} returns this
824
+ */
825
+ TronWebProto.UpdateBrokerageContract.prototype.setOwnerAddress = function(value) {
826
+ return jspb.Message.setProto3BytesField(this, 1, value);
827
+ };
828
+
829
+
830
+ /**
831
+ * optional int32 brokerage = 2;
832
+ * @return {number}
833
+ */
834
+ TronWebProto.UpdateBrokerageContract.prototype.getBrokerage = function() {
835
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
836
+ };
837
+
838
+
839
+ /**
840
+ * @param {number} value
841
+ * @return {!TronWebProto.UpdateBrokerageContract} returns this
842
+ */
843
+ TronWebProto.UpdateBrokerageContract.prototype.setBrokerage = function(value) {
844
+ return jspb.Message.setProto3IntField(this, 2, value);
845
+ };
846
+
847
+
848
+ goog.object.extend(exports, TronWebProto);