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,675 @@
1
+ // source: core/contract/proposal_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.ProposalApproveContract', null, global);
25
+ goog.exportSymbol('TronWebProto.ProposalCreateContract', null, global);
26
+ goog.exportSymbol('TronWebProto.ProposalDeleteContract', null, global);
27
+ /**
28
+ * Generated by JsPbCodeGenerator.
29
+ * @param {Array=} opt_data Optional initial data array, typically from a
30
+ * server response, or constructed directly in Javascript. The array is used
31
+ * in place and becomes part of the constructed object. It is not cloned.
32
+ * If no data is provided, the constructed object will be empty, but still
33
+ * valid.
34
+ * @extends {jspb.Message}
35
+ * @constructor
36
+ */
37
+ TronWebProto.ProposalApproveContract = function(opt_data) {
38
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
39
+ };
40
+ goog.inherits(TronWebProto.ProposalApproveContract, jspb.Message);
41
+ if (goog.DEBUG && !COMPILED) {
42
+ /**
43
+ * @public
44
+ * @override
45
+ */
46
+ TronWebProto.ProposalApproveContract.displayName = 'TronWebProto.ProposalApproveContract';
47
+ }
48
+ /**
49
+ * Generated by JsPbCodeGenerator.
50
+ * @param {Array=} opt_data Optional initial data array, typically from a
51
+ * server response, or constructed directly in Javascript. The array is used
52
+ * in place and becomes part of the constructed object. It is not cloned.
53
+ * If no data is provided, the constructed object will be empty, but still
54
+ * valid.
55
+ * @extends {jspb.Message}
56
+ * @constructor
57
+ */
58
+ TronWebProto.ProposalCreateContract = function(opt_data) {
59
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
60
+ };
61
+ goog.inherits(TronWebProto.ProposalCreateContract, jspb.Message);
62
+ if (goog.DEBUG && !COMPILED) {
63
+ /**
64
+ * @public
65
+ * @override
66
+ */
67
+ TronWebProto.ProposalCreateContract.displayName = 'TronWebProto.ProposalCreateContract';
68
+ }
69
+ /**
70
+ * Generated by JsPbCodeGenerator.
71
+ * @param {Array=} opt_data Optional initial data array, typically from a
72
+ * server response, or constructed directly in Javascript. The array is used
73
+ * in place and becomes part of the constructed object. It is not cloned.
74
+ * If no data is provided, the constructed object will be empty, but still
75
+ * valid.
76
+ * @extends {jspb.Message}
77
+ * @constructor
78
+ */
79
+ TronWebProto.ProposalDeleteContract = function(opt_data) {
80
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
81
+ };
82
+ goog.inherits(TronWebProto.ProposalDeleteContract, jspb.Message);
83
+ if (goog.DEBUG && !COMPILED) {
84
+ /**
85
+ * @public
86
+ * @override
87
+ */
88
+ TronWebProto.ProposalDeleteContract.displayName = 'TronWebProto.ProposalDeleteContract';
89
+ }
90
+
91
+
92
+
93
+ if (jspb.Message.GENERATE_TO_OBJECT) {
94
+ /**
95
+ * Creates an object representation of this proto.
96
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
97
+ * Optional fields that are not set will be set to undefined.
98
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
99
+ * For the list of reserved names please see:
100
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
101
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
102
+ * JSPB instance for transitional soy proto support:
103
+ * http://goto/soy-param-migration
104
+ * @return {!Object}
105
+ */
106
+ TronWebProto.ProposalApproveContract.prototype.toObject = function(opt_includeInstance) {
107
+ return TronWebProto.ProposalApproveContract.toObject(opt_includeInstance, this);
108
+ };
109
+
110
+
111
+ /**
112
+ * Static version of the {@see toObject} method.
113
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
114
+ * the JSPB instance for transitional soy proto support:
115
+ * http://goto/soy-param-migration
116
+ * @param {!TronWebProto.ProposalApproveContract} msg The msg instance to transform.
117
+ * @return {!Object}
118
+ * @suppress {unusedLocalVariables} f is only used for nested messages
119
+ */
120
+ TronWebProto.ProposalApproveContract.toObject = function(includeInstance, msg) {
121
+ var f, obj = {
122
+ ownerAddress: msg.getOwnerAddress_asB64(),
123
+ proposalId: jspb.Message.getFieldWithDefault(msg, 2, 0),
124
+ isAddApproval: jspb.Message.getBooleanFieldWithDefault(msg, 3, false)
125
+ };
126
+
127
+ if (includeInstance) {
128
+ obj.$jspbMessageInstance = msg;
129
+ }
130
+ return obj;
131
+ };
132
+ }
133
+
134
+
135
+ /**
136
+ * Deserializes binary data (in protobuf wire format).
137
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
138
+ * @return {!TronWebProto.ProposalApproveContract}
139
+ */
140
+ TronWebProto.ProposalApproveContract.deserializeBinary = function(bytes) {
141
+ var reader = new jspb.BinaryReader(bytes);
142
+ var msg = new TronWebProto.ProposalApproveContract;
143
+ return TronWebProto.ProposalApproveContract.deserializeBinaryFromReader(msg, reader);
144
+ };
145
+
146
+
147
+ /**
148
+ * Deserializes binary data (in protobuf wire format) from the
149
+ * given reader into the given message object.
150
+ * @param {!TronWebProto.ProposalApproveContract} msg The message object to deserialize into.
151
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
152
+ * @return {!TronWebProto.ProposalApproveContract}
153
+ */
154
+ TronWebProto.ProposalApproveContract.deserializeBinaryFromReader = function(msg, reader) {
155
+ while (reader.nextField()) {
156
+ if (reader.isEndGroup()) {
157
+ break;
158
+ }
159
+ var field = reader.getFieldNumber();
160
+ switch (field) {
161
+ case 1:
162
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
163
+ msg.setOwnerAddress(value);
164
+ break;
165
+ case 2:
166
+ var value = /** @type {number} */ (reader.readInt64());
167
+ msg.setProposalId(value);
168
+ break;
169
+ case 3:
170
+ var value = /** @type {boolean} */ (reader.readBool());
171
+ msg.setIsAddApproval(value);
172
+ break;
173
+ default:
174
+ reader.skipField();
175
+ break;
176
+ }
177
+ }
178
+ return msg;
179
+ };
180
+
181
+
182
+ /**
183
+ * Serializes the message to binary data (in protobuf wire format).
184
+ * @return {!Uint8Array}
185
+ */
186
+ TronWebProto.ProposalApproveContract.prototype.serializeBinary = function() {
187
+ var writer = new jspb.BinaryWriter();
188
+ TronWebProto.ProposalApproveContract.serializeBinaryToWriter(this, writer);
189
+ return writer.getResultBuffer();
190
+ };
191
+
192
+
193
+ /**
194
+ * Serializes the given message to binary data (in protobuf wire
195
+ * format), writing to the given BinaryWriter.
196
+ * @param {!TronWebProto.ProposalApproveContract} message
197
+ * @param {!jspb.BinaryWriter} writer
198
+ * @suppress {unusedLocalVariables} f is only used for nested messages
199
+ */
200
+ TronWebProto.ProposalApproveContract.serializeBinaryToWriter = function(message, writer) {
201
+ var f = undefined;
202
+ f = message.getOwnerAddress_asU8();
203
+ if (f.length > 0) {
204
+ writer.writeBytes(
205
+ 1,
206
+ f
207
+ );
208
+ }
209
+ f = message.getProposalId();
210
+ if (f !== 0) {
211
+ writer.writeInt64(
212
+ 2,
213
+ f
214
+ );
215
+ }
216
+ f = message.getIsAddApproval();
217
+ if (f) {
218
+ writer.writeBool(
219
+ 3,
220
+ f
221
+ );
222
+ }
223
+ };
224
+
225
+
226
+ /**
227
+ * optional bytes owner_address = 1;
228
+ * @return {!(string|Uint8Array)}
229
+ */
230
+ TronWebProto.ProposalApproveContract.prototype.getOwnerAddress = function() {
231
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
232
+ };
233
+
234
+
235
+ /**
236
+ * optional bytes owner_address = 1;
237
+ * This is a type-conversion wrapper around `getOwnerAddress()`
238
+ * @return {string}
239
+ */
240
+ TronWebProto.ProposalApproveContract.prototype.getOwnerAddress_asB64 = function() {
241
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
242
+ this.getOwnerAddress()));
243
+ };
244
+
245
+
246
+ /**
247
+ * optional bytes owner_address = 1;
248
+ * Note that Uint8Array is not supported on all browsers.
249
+ * @see http://caniuse.com/Uint8Array
250
+ * This is a type-conversion wrapper around `getOwnerAddress()`
251
+ * @return {!Uint8Array}
252
+ */
253
+ TronWebProto.ProposalApproveContract.prototype.getOwnerAddress_asU8 = function() {
254
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
255
+ this.getOwnerAddress()));
256
+ };
257
+
258
+
259
+ /**
260
+ * @param {!(string|Uint8Array)} value
261
+ * @return {!TronWebProto.ProposalApproveContract} returns this
262
+ */
263
+ TronWebProto.ProposalApproveContract.prototype.setOwnerAddress = function(value) {
264
+ return jspb.Message.setProto3BytesField(this, 1, value);
265
+ };
266
+
267
+
268
+ /**
269
+ * optional int64 proposal_id = 2;
270
+ * @return {number}
271
+ */
272
+ TronWebProto.ProposalApproveContract.prototype.getProposalId = function() {
273
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
274
+ };
275
+
276
+
277
+ /**
278
+ * @param {number} value
279
+ * @return {!TronWebProto.ProposalApproveContract} returns this
280
+ */
281
+ TronWebProto.ProposalApproveContract.prototype.setProposalId = function(value) {
282
+ return jspb.Message.setProto3IntField(this, 2, value);
283
+ };
284
+
285
+
286
+ /**
287
+ * optional bool is_add_approval = 3;
288
+ * @return {boolean}
289
+ */
290
+ TronWebProto.ProposalApproveContract.prototype.getIsAddApproval = function() {
291
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
292
+ };
293
+
294
+
295
+ /**
296
+ * @param {boolean} value
297
+ * @return {!TronWebProto.ProposalApproveContract} returns this
298
+ */
299
+ TronWebProto.ProposalApproveContract.prototype.setIsAddApproval = function(value) {
300
+ return jspb.Message.setProto3BooleanField(this, 3, value);
301
+ };
302
+
303
+
304
+
305
+
306
+
307
+ if (jspb.Message.GENERATE_TO_OBJECT) {
308
+ /**
309
+ * Creates an object representation of this proto.
310
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
311
+ * Optional fields that are not set will be set to undefined.
312
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
313
+ * For the list of reserved names please see:
314
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
315
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
316
+ * JSPB instance for transitional soy proto support:
317
+ * http://goto/soy-param-migration
318
+ * @return {!Object}
319
+ */
320
+ TronWebProto.ProposalCreateContract.prototype.toObject = function(opt_includeInstance) {
321
+ return TronWebProto.ProposalCreateContract.toObject(opt_includeInstance, this);
322
+ };
323
+
324
+
325
+ /**
326
+ * Static version of the {@see toObject} method.
327
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
328
+ * the JSPB instance for transitional soy proto support:
329
+ * http://goto/soy-param-migration
330
+ * @param {!TronWebProto.ProposalCreateContract} msg The msg instance to transform.
331
+ * @return {!Object}
332
+ * @suppress {unusedLocalVariables} f is only used for nested messages
333
+ */
334
+ TronWebProto.ProposalCreateContract.toObject = function(includeInstance, msg) {
335
+ var f, obj = {
336
+ ownerAddress: msg.getOwnerAddress_asB64(),
337
+ parametersMap: (f = msg.getParametersMap()) ? f.toObject(includeInstance, undefined) : []
338
+ };
339
+
340
+ if (includeInstance) {
341
+ obj.$jspbMessageInstance = msg;
342
+ }
343
+ return obj;
344
+ };
345
+ }
346
+
347
+
348
+ /**
349
+ * Deserializes binary data (in protobuf wire format).
350
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
351
+ * @return {!TronWebProto.ProposalCreateContract}
352
+ */
353
+ TronWebProto.ProposalCreateContract.deserializeBinary = function(bytes) {
354
+ var reader = new jspb.BinaryReader(bytes);
355
+ var msg = new TronWebProto.ProposalCreateContract;
356
+ return TronWebProto.ProposalCreateContract.deserializeBinaryFromReader(msg, reader);
357
+ };
358
+
359
+
360
+ /**
361
+ * Deserializes binary data (in protobuf wire format) from the
362
+ * given reader into the given message object.
363
+ * @param {!TronWebProto.ProposalCreateContract} msg The message object to deserialize into.
364
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
365
+ * @return {!TronWebProto.ProposalCreateContract}
366
+ */
367
+ TronWebProto.ProposalCreateContract.deserializeBinaryFromReader = function(msg, reader) {
368
+ while (reader.nextField()) {
369
+ if (reader.isEndGroup()) {
370
+ break;
371
+ }
372
+ var field = reader.getFieldNumber();
373
+ switch (field) {
374
+ case 1:
375
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
376
+ msg.setOwnerAddress(value);
377
+ break;
378
+ case 2:
379
+ var value = msg.getParametersMap();
380
+ reader.readMessage(value, function(message, reader) {
381
+ jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readInt64, jspb.BinaryReader.prototype.readInt64, null, 0, 0);
382
+ });
383
+ break;
384
+ default:
385
+ reader.skipField();
386
+ break;
387
+ }
388
+ }
389
+ return msg;
390
+ };
391
+
392
+
393
+ /**
394
+ * Serializes the message to binary data (in protobuf wire format).
395
+ * @return {!Uint8Array}
396
+ */
397
+ TronWebProto.ProposalCreateContract.prototype.serializeBinary = function() {
398
+ var writer = new jspb.BinaryWriter();
399
+ TronWebProto.ProposalCreateContract.serializeBinaryToWriter(this, writer);
400
+ return writer.getResultBuffer();
401
+ };
402
+
403
+
404
+ /**
405
+ * Serializes the given message to binary data (in protobuf wire
406
+ * format), writing to the given BinaryWriter.
407
+ * @param {!TronWebProto.ProposalCreateContract} message
408
+ * @param {!jspb.BinaryWriter} writer
409
+ * @suppress {unusedLocalVariables} f is only used for nested messages
410
+ */
411
+ TronWebProto.ProposalCreateContract.serializeBinaryToWriter = function(message, writer) {
412
+ var f = undefined;
413
+ f = message.getOwnerAddress_asU8();
414
+ if (f.length > 0) {
415
+ writer.writeBytes(
416
+ 1,
417
+ f
418
+ );
419
+ }
420
+ f = message.getParametersMap(true);
421
+ if (f && f.getLength() > 0) {
422
+ f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeInt64, jspb.BinaryWriter.prototype.writeInt64);
423
+ }
424
+ };
425
+
426
+
427
+ /**
428
+ * optional bytes owner_address = 1;
429
+ * @return {!(string|Uint8Array)}
430
+ */
431
+ TronWebProto.ProposalCreateContract.prototype.getOwnerAddress = function() {
432
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
433
+ };
434
+
435
+
436
+ /**
437
+ * optional bytes owner_address = 1;
438
+ * This is a type-conversion wrapper around `getOwnerAddress()`
439
+ * @return {string}
440
+ */
441
+ TronWebProto.ProposalCreateContract.prototype.getOwnerAddress_asB64 = function() {
442
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
443
+ this.getOwnerAddress()));
444
+ };
445
+
446
+
447
+ /**
448
+ * optional bytes owner_address = 1;
449
+ * Note that Uint8Array is not supported on all browsers.
450
+ * @see http://caniuse.com/Uint8Array
451
+ * This is a type-conversion wrapper around `getOwnerAddress()`
452
+ * @return {!Uint8Array}
453
+ */
454
+ TronWebProto.ProposalCreateContract.prototype.getOwnerAddress_asU8 = function() {
455
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
456
+ this.getOwnerAddress()));
457
+ };
458
+
459
+
460
+ /**
461
+ * @param {!(string|Uint8Array)} value
462
+ * @return {!TronWebProto.ProposalCreateContract} returns this
463
+ */
464
+ TronWebProto.ProposalCreateContract.prototype.setOwnerAddress = function(value) {
465
+ return jspb.Message.setProto3BytesField(this, 1, value);
466
+ };
467
+
468
+
469
+ /**
470
+ * map<int64, int64> parameters = 2;
471
+ * @param {boolean=} opt_noLazyCreate Do not create the map if
472
+ * empty, instead returning `undefined`
473
+ * @return {!jspb.Map<number,number>}
474
+ */
475
+ TronWebProto.ProposalCreateContract.prototype.getParametersMap = function(opt_noLazyCreate) {
476
+ return /** @type {!jspb.Map<number,number>} */ (
477
+ jspb.Message.getMapField(this, 2, opt_noLazyCreate,
478
+ null));
479
+ };
480
+
481
+
482
+ /**
483
+ * Clears values from the map. The map will be non-null.
484
+ * @return {!TronWebProto.ProposalCreateContract} returns this
485
+ */
486
+ TronWebProto.ProposalCreateContract.prototype.clearParametersMap = function() {
487
+ this.getParametersMap().clear();
488
+ return this;};
489
+
490
+
491
+
492
+
493
+
494
+ if (jspb.Message.GENERATE_TO_OBJECT) {
495
+ /**
496
+ * Creates an object representation of this proto.
497
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
498
+ * Optional fields that are not set will be set to undefined.
499
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
500
+ * For the list of reserved names please see:
501
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
502
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
503
+ * JSPB instance for transitional soy proto support:
504
+ * http://goto/soy-param-migration
505
+ * @return {!Object}
506
+ */
507
+ TronWebProto.ProposalDeleteContract.prototype.toObject = function(opt_includeInstance) {
508
+ return TronWebProto.ProposalDeleteContract.toObject(opt_includeInstance, this);
509
+ };
510
+
511
+
512
+ /**
513
+ * Static version of the {@see toObject} method.
514
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
515
+ * the JSPB instance for transitional soy proto support:
516
+ * http://goto/soy-param-migration
517
+ * @param {!TronWebProto.ProposalDeleteContract} msg The msg instance to transform.
518
+ * @return {!Object}
519
+ * @suppress {unusedLocalVariables} f is only used for nested messages
520
+ */
521
+ TronWebProto.ProposalDeleteContract.toObject = function(includeInstance, msg) {
522
+ var f, obj = {
523
+ ownerAddress: msg.getOwnerAddress_asB64(),
524
+ proposalId: jspb.Message.getFieldWithDefault(msg, 2, 0)
525
+ };
526
+
527
+ if (includeInstance) {
528
+ obj.$jspbMessageInstance = msg;
529
+ }
530
+ return obj;
531
+ };
532
+ }
533
+
534
+
535
+ /**
536
+ * Deserializes binary data (in protobuf wire format).
537
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
538
+ * @return {!TronWebProto.ProposalDeleteContract}
539
+ */
540
+ TronWebProto.ProposalDeleteContract.deserializeBinary = function(bytes) {
541
+ var reader = new jspb.BinaryReader(bytes);
542
+ var msg = new TronWebProto.ProposalDeleteContract;
543
+ return TronWebProto.ProposalDeleteContract.deserializeBinaryFromReader(msg, reader);
544
+ };
545
+
546
+
547
+ /**
548
+ * Deserializes binary data (in protobuf wire format) from the
549
+ * given reader into the given message object.
550
+ * @param {!TronWebProto.ProposalDeleteContract} msg The message object to deserialize into.
551
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
552
+ * @return {!TronWebProto.ProposalDeleteContract}
553
+ */
554
+ TronWebProto.ProposalDeleteContract.deserializeBinaryFromReader = function(msg, reader) {
555
+ while (reader.nextField()) {
556
+ if (reader.isEndGroup()) {
557
+ break;
558
+ }
559
+ var field = reader.getFieldNumber();
560
+ switch (field) {
561
+ case 1:
562
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
563
+ msg.setOwnerAddress(value);
564
+ break;
565
+ case 2:
566
+ var value = /** @type {number} */ (reader.readInt64());
567
+ msg.setProposalId(value);
568
+ break;
569
+ default:
570
+ reader.skipField();
571
+ break;
572
+ }
573
+ }
574
+ return msg;
575
+ };
576
+
577
+
578
+ /**
579
+ * Serializes the message to binary data (in protobuf wire format).
580
+ * @return {!Uint8Array}
581
+ */
582
+ TronWebProto.ProposalDeleteContract.prototype.serializeBinary = function() {
583
+ var writer = new jspb.BinaryWriter();
584
+ TronWebProto.ProposalDeleteContract.serializeBinaryToWriter(this, writer);
585
+ return writer.getResultBuffer();
586
+ };
587
+
588
+
589
+ /**
590
+ * Serializes the given message to binary data (in protobuf wire
591
+ * format), writing to the given BinaryWriter.
592
+ * @param {!TronWebProto.ProposalDeleteContract} message
593
+ * @param {!jspb.BinaryWriter} writer
594
+ * @suppress {unusedLocalVariables} f is only used for nested messages
595
+ */
596
+ TronWebProto.ProposalDeleteContract.serializeBinaryToWriter = function(message, writer) {
597
+ var f = undefined;
598
+ f = message.getOwnerAddress_asU8();
599
+ if (f.length > 0) {
600
+ writer.writeBytes(
601
+ 1,
602
+ f
603
+ );
604
+ }
605
+ f = message.getProposalId();
606
+ if (f !== 0) {
607
+ writer.writeInt64(
608
+ 2,
609
+ f
610
+ );
611
+ }
612
+ };
613
+
614
+
615
+ /**
616
+ * optional bytes owner_address = 1;
617
+ * @return {!(string|Uint8Array)}
618
+ */
619
+ TronWebProto.ProposalDeleteContract.prototype.getOwnerAddress = function() {
620
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
621
+ };
622
+
623
+
624
+ /**
625
+ * optional bytes owner_address = 1;
626
+ * This is a type-conversion wrapper around `getOwnerAddress()`
627
+ * @return {string}
628
+ */
629
+ TronWebProto.ProposalDeleteContract.prototype.getOwnerAddress_asB64 = function() {
630
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
631
+ this.getOwnerAddress()));
632
+ };
633
+
634
+
635
+ /**
636
+ * optional bytes owner_address = 1;
637
+ * Note that Uint8Array is not supported on all browsers.
638
+ * @see http://caniuse.com/Uint8Array
639
+ * This is a type-conversion wrapper around `getOwnerAddress()`
640
+ * @return {!Uint8Array}
641
+ */
642
+ TronWebProto.ProposalDeleteContract.prototype.getOwnerAddress_asU8 = function() {
643
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
644
+ this.getOwnerAddress()));
645
+ };
646
+
647
+
648
+ /**
649
+ * @param {!(string|Uint8Array)} value
650
+ * @return {!TronWebProto.ProposalDeleteContract} returns this
651
+ */
652
+ TronWebProto.ProposalDeleteContract.prototype.setOwnerAddress = function(value) {
653
+ return jspb.Message.setProto3BytesField(this, 1, value);
654
+ };
655
+
656
+
657
+ /**
658
+ * optional int64 proposal_id = 2;
659
+ * @return {number}
660
+ */
661
+ TronWebProto.ProposalDeleteContract.prototype.getProposalId = function() {
662
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
663
+ };
664
+
665
+
666
+ /**
667
+ * @param {number} value
668
+ * @return {!TronWebProto.ProposalDeleteContract} returns this
669
+ */
670
+ TronWebProto.ProposalDeleteContract.prototype.setProposalId = function(value) {
671
+ return jspb.Message.setProto3IntField(this, 2, value);
672
+ };
673
+
674
+
675
+ goog.object.extend(exports, TronWebProto);