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,1268 @@
1
+ // source: core/contract/exchange_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.ExchangeCreateContract', null, global);
25
+ goog.exportSymbol('TronWebProto.ExchangeInjectContract', null, global);
26
+ goog.exportSymbol('TronWebProto.ExchangeTransactionContract', null, global);
27
+ goog.exportSymbol('TronWebProto.ExchangeWithdrawContract', 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.ExchangeCreateContract = function(opt_data) {
39
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
40
+ };
41
+ goog.inherits(TronWebProto.ExchangeCreateContract, jspb.Message);
42
+ if (goog.DEBUG && !COMPILED) {
43
+ /**
44
+ * @public
45
+ * @override
46
+ */
47
+ TronWebProto.ExchangeCreateContract.displayName = 'TronWebProto.ExchangeCreateContract';
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.ExchangeInjectContract = function(opt_data) {
60
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
61
+ };
62
+ goog.inherits(TronWebProto.ExchangeInjectContract, jspb.Message);
63
+ if (goog.DEBUG && !COMPILED) {
64
+ /**
65
+ * @public
66
+ * @override
67
+ */
68
+ TronWebProto.ExchangeInjectContract.displayName = 'TronWebProto.ExchangeInjectContract';
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.ExchangeWithdrawContract = function(opt_data) {
81
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
82
+ };
83
+ goog.inherits(TronWebProto.ExchangeWithdrawContract, jspb.Message);
84
+ if (goog.DEBUG && !COMPILED) {
85
+ /**
86
+ * @public
87
+ * @override
88
+ */
89
+ TronWebProto.ExchangeWithdrawContract.displayName = 'TronWebProto.ExchangeWithdrawContract';
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.ExchangeTransactionContract = function(opt_data) {
102
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
103
+ };
104
+ goog.inherits(TronWebProto.ExchangeTransactionContract, jspb.Message);
105
+ if (goog.DEBUG && !COMPILED) {
106
+ /**
107
+ * @public
108
+ * @override
109
+ */
110
+ TronWebProto.ExchangeTransactionContract.displayName = 'TronWebProto.ExchangeTransactionContract';
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.ExchangeCreateContract.prototype.toObject = function(opt_includeInstance) {
129
+ return TronWebProto.ExchangeCreateContract.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.ExchangeCreateContract} msg The msg instance to transform.
139
+ * @return {!Object}
140
+ * @suppress {unusedLocalVariables} f is only used for nested messages
141
+ */
142
+ TronWebProto.ExchangeCreateContract.toObject = function(includeInstance, msg) {
143
+ var f, obj = {
144
+ ownerAddress: msg.getOwnerAddress_asB64(),
145
+ firstTokenId: msg.getFirstTokenId_asB64(),
146
+ firstTokenBalance: jspb.Message.getFieldWithDefault(msg, 3, 0),
147
+ secondTokenId: msg.getSecondTokenId_asB64(),
148
+ secondTokenBalance: jspb.Message.getFieldWithDefault(msg, 5, 0)
149
+ };
150
+
151
+ if (includeInstance) {
152
+ obj.$jspbMessageInstance = msg;
153
+ }
154
+ return obj;
155
+ };
156
+ }
157
+
158
+
159
+ /**
160
+ * Deserializes binary data (in protobuf wire format).
161
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
162
+ * @return {!TronWebProto.ExchangeCreateContract}
163
+ */
164
+ TronWebProto.ExchangeCreateContract.deserializeBinary = function(bytes) {
165
+ var reader = new jspb.BinaryReader(bytes);
166
+ var msg = new TronWebProto.ExchangeCreateContract;
167
+ return TronWebProto.ExchangeCreateContract.deserializeBinaryFromReader(msg, reader);
168
+ };
169
+
170
+
171
+ /**
172
+ * Deserializes binary data (in protobuf wire format) from the
173
+ * given reader into the given message object.
174
+ * @param {!TronWebProto.ExchangeCreateContract} msg The message object to deserialize into.
175
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
176
+ * @return {!TronWebProto.ExchangeCreateContract}
177
+ */
178
+ TronWebProto.ExchangeCreateContract.deserializeBinaryFromReader = function(msg, reader) {
179
+ while (reader.nextField()) {
180
+ if (reader.isEndGroup()) {
181
+ break;
182
+ }
183
+ var field = reader.getFieldNumber();
184
+ switch (field) {
185
+ case 1:
186
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
187
+ msg.setOwnerAddress(value);
188
+ break;
189
+ case 2:
190
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
191
+ msg.setFirstTokenId(value);
192
+ break;
193
+ case 3:
194
+ var value = /** @type {number} */ (reader.readInt64());
195
+ msg.setFirstTokenBalance(value);
196
+ break;
197
+ case 4:
198
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
199
+ msg.setSecondTokenId(value);
200
+ break;
201
+ case 5:
202
+ var value = /** @type {number} */ (reader.readInt64());
203
+ msg.setSecondTokenBalance(value);
204
+ break;
205
+ default:
206
+ reader.skipField();
207
+ break;
208
+ }
209
+ }
210
+ return msg;
211
+ };
212
+
213
+
214
+ /**
215
+ * Serializes the message to binary data (in protobuf wire format).
216
+ * @return {!Uint8Array}
217
+ */
218
+ TronWebProto.ExchangeCreateContract.prototype.serializeBinary = function() {
219
+ var writer = new jspb.BinaryWriter();
220
+ TronWebProto.ExchangeCreateContract.serializeBinaryToWriter(this, writer);
221
+ return writer.getResultBuffer();
222
+ };
223
+
224
+
225
+ /**
226
+ * Serializes the given message to binary data (in protobuf wire
227
+ * format), writing to the given BinaryWriter.
228
+ * @param {!TronWebProto.ExchangeCreateContract} message
229
+ * @param {!jspb.BinaryWriter} writer
230
+ * @suppress {unusedLocalVariables} f is only used for nested messages
231
+ */
232
+ TronWebProto.ExchangeCreateContract.serializeBinaryToWriter = function(message, writer) {
233
+ var f = undefined;
234
+ f = message.getOwnerAddress_asU8();
235
+ if (f.length > 0) {
236
+ writer.writeBytes(
237
+ 1,
238
+ f
239
+ );
240
+ }
241
+ f = message.getFirstTokenId_asU8();
242
+ if (f.length > 0) {
243
+ writer.writeBytes(
244
+ 2,
245
+ f
246
+ );
247
+ }
248
+ f = message.getFirstTokenBalance();
249
+ if (f !== 0) {
250
+ writer.writeInt64(
251
+ 3,
252
+ f
253
+ );
254
+ }
255
+ f = message.getSecondTokenId_asU8();
256
+ if (f.length > 0) {
257
+ writer.writeBytes(
258
+ 4,
259
+ f
260
+ );
261
+ }
262
+ f = message.getSecondTokenBalance();
263
+ if (f !== 0) {
264
+ writer.writeInt64(
265
+ 5,
266
+ f
267
+ );
268
+ }
269
+ };
270
+
271
+
272
+ /**
273
+ * optional bytes owner_address = 1;
274
+ * @return {!(string|Uint8Array)}
275
+ */
276
+ TronWebProto.ExchangeCreateContract.prototype.getOwnerAddress = function() {
277
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
278
+ };
279
+
280
+
281
+ /**
282
+ * optional bytes owner_address = 1;
283
+ * This is a type-conversion wrapper around `getOwnerAddress()`
284
+ * @return {string}
285
+ */
286
+ TronWebProto.ExchangeCreateContract.prototype.getOwnerAddress_asB64 = function() {
287
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
288
+ this.getOwnerAddress()));
289
+ };
290
+
291
+
292
+ /**
293
+ * optional bytes owner_address = 1;
294
+ * Note that Uint8Array is not supported on all browsers.
295
+ * @see http://caniuse.com/Uint8Array
296
+ * This is a type-conversion wrapper around `getOwnerAddress()`
297
+ * @return {!Uint8Array}
298
+ */
299
+ TronWebProto.ExchangeCreateContract.prototype.getOwnerAddress_asU8 = function() {
300
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
301
+ this.getOwnerAddress()));
302
+ };
303
+
304
+
305
+ /**
306
+ * @param {!(string|Uint8Array)} value
307
+ * @return {!TronWebProto.ExchangeCreateContract} returns this
308
+ */
309
+ TronWebProto.ExchangeCreateContract.prototype.setOwnerAddress = function(value) {
310
+ return jspb.Message.setProto3BytesField(this, 1, value);
311
+ };
312
+
313
+
314
+ /**
315
+ * optional bytes first_token_id = 2;
316
+ * @return {!(string|Uint8Array)}
317
+ */
318
+ TronWebProto.ExchangeCreateContract.prototype.getFirstTokenId = function() {
319
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
320
+ };
321
+
322
+
323
+ /**
324
+ * optional bytes first_token_id = 2;
325
+ * This is a type-conversion wrapper around `getFirstTokenId()`
326
+ * @return {string}
327
+ */
328
+ TronWebProto.ExchangeCreateContract.prototype.getFirstTokenId_asB64 = function() {
329
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
330
+ this.getFirstTokenId()));
331
+ };
332
+
333
+
334
+ /**
335
+ * optional bytes first_token_id = 2;
336
+ * Note that Uint8Array is not supported on all browsers.
337
+ * @see http://caniuse.com/Uint8Array
338
+ * This is a type-conversion wrapper around `getFirstTokenId()`
339
+ * @return {!Uint8Array}
340
+ */
341
+ TronWebProto.ExchangeCreateContract.prototype.getFirstTokenId_asU8 = function() {
342
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
343
+ this.getFirstTokenId()));
344
+ };
345
+
346
+
347
+ /**
348
+ * @param {!(string|Uint8Array)} value
349
+ * @return {!TronWebProto.ExchangeCreateContract} returns this
350
+ */
351
+ TronWebProto.ExchangeCreateContract.prototype.setFirstTokenId = function(value) {
352
+ return jspb.Message.setProto3BytesField(this, 2, value);
353
+ };
354
+
355
+
356
+ /**
357
+ * optional int64 first_token_balance = 3;
358
+ * @return {number}
359
+ */
360
+ TronWebProto.ExchangeCreateContract.prototype.getFirstTokenBalance = function() {
361
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
362
+ };
363
+
364
+
365
+ /**
366
+ * @param {number} value
367
+ * @return {!TronWebProto.ExchangeCreateContract} returns this
368
+ */
369
+ TronWebProto.ExchangeCreateContract.prototype.setFirstTokenBalance = function(value) {
370
+ return jspb.Message.setProto3IntField(this, 3, value);
371
+ };
372
+
373
+
374
+ /**
375
+ * optional bytes second_token_id = 4;
376
+ * @return {!(string|Uint8Array)}
377
+ */
378
+ TronWebProto.ExchangeCreateContract.prototype.getSecondTokenId = function() {
379
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
380
+ };
381
+
382
+
383
+ /**
384
+ * optional bytes second_token_id = 4;
385
+ * This is a type-conversion wrapper around `getSecondTokenId()`
386
+ * @return {string}
387
+ */
388
+ TronWebProto.ExchangeCreateContract.prototype.getSecondTokenId_asB64 = function() {
389
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
390
+ this.getSecondTokenId()));
391
+ };
392
+
393
+
394
+ /**
395
+ * optional bytes second_token_id = 4;
396
+ * Note that Uint8Array is not supported on all browsers.
397
+ * @see http://caniuse.com/Uint8Array
398
+ * This is a type-conversion wrapper around `getSecondTokenId()`
399
+ * @return {!Uint8Array}
400
+ */
401
+ TronWebProto.ExchangeCreateContract.prototype.getSecondTokenId_asU8 = function() {
402
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
403
+ this.getSecondTokenId()));
404
+ };
405
+
406
+
407
+ /**
408
+ * @param {!(string|Uint8Array)} value
409
+ * @return {!TronWebProto.ExchangeCreateContract} returns this
410
+ */
411
+ TronWebProto.ExchangeCreateContract.prototype.setSecondTokenId = function(value) {
412
+ return jspb.Message.setProto3BytesField(this, 4, value);
413
+ };
414
+
415
+
416
+ /**
417
+ * optional int64 second_token_balance = 5;
418
+ * @return {number}
419
+ */
420
+ TronWebProto.ExchangeCreateContract.prototype.getSecondTokenBalance = function() {
421
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
422
+ };
423
+
424
+
425
+ /**
426
+ * @param {number} value
427
+ * @return {!TronWebProto.ExchangeCreateContract} returns this
428
+ */
429
+ TronWebProto.ExchangeCreateContract.prototype.setSecondTokenBalance = function(value) {
430
+ return jspb.Message.setProto3IntField(this, 5, value);
431
+ };
432
+
433
+
434
+
435
+
436
+
437
+ if (jspb.Message.GENERATE_TO_OBJECT) {
438
+ /**
439
+ * Creates an object representation of this proto.
440
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
441
+ * Optional fields that are not set will be set to undefined.
442
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
443
+ * For the list of reserved names please see:
444
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
445
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
446
+ * JSPB instance for transitional soy proto support:
447
+ * http://goto/soy-param-migration
448
+ * @return {!Object}
449
+ */
450
+ TronWebProto.ExchangeInjectContract.prototype.toObject = function(opt_includeInstance) {
451
+ return TronWebProto.ExchangeInjectContract.toObject(opt_includeInstance, this);
452
+ };
453
+
454
+
455
+ /**
456
+ * Static version of the {@see toObject} method.
457
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
458
+ * the JSPB instance for transitional soy proto support:
459
+ * http://goto/soy-param-migration
460
+ * @param {!TronWebProto.ExchangeInjectContract} msg The msg instance to transform.
461
+ * @return {!Object}
462
+ * @suppress {unusedLocalVariables} f is only used for nested messages
463
+ */
464
+ TronWebProto.ExchangeInjectContract.toObject = function(includeInstance, msg) {
465
+ var f, obj = {
466
+ ownerAddress: msg.getOwnerAddress_asB64(),
467
+ exchangeId: jspb.Message.getFieldWithDefault(msg, 2, 0),
468
+ tokenId: msg.getTokenId_asB64(),
469
+ quant: jspb.Message.getFieldWithDefault(msg, 4, 0)
470
+ };
471
+
472
+ if (includeInstance) {
473
+ obj.$jspbMessageInstance = msg;
474
+ }
475
+ return obj;
476
+ };
477
+ }
478
+
479
+
480
+ /**
481
+ * Deserializes binary data (in protobuf wire format).
482
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
483
+ * @return {!TronWebProto.ExchangeInjectContract}
484
+ */
485
+ TronWebProto.ExchangeInjectContract.deserializeBinary = function(bytes) {
486
+ var reader = new jspb.BinaryReader(bytes);
487
+ var msg = new TronWebProto.ExchangeInjectContract;
488
+ return TronWebProto.ExchangeInjectContract.deserializeBinaryFromReader(msg, reader);
489
+ };
490
+
491
+
492
+ /**
493
+ * Deserializes binary data (in protobuf wire format) from the
494
+ * given reader into the given message object.
495
+ * @param {!TronWebProto.ExchangeInjectContract} msg The message object to deserialize into.
496
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
497
+ * @return {!TronWebProto.ExchangeInjectContract}
498
+ */
499
+ TronWebProto.ExchangeInjectContract.deserializeBinaryFromReader = function(msg, reader) {
500
+ while (reader.nextField()) {
501
+ if (reader.isEndGroup()) {
502
+ break;
503
+ }
504
+ var field = reader.getFieldNumber();
505
+ switch (field) {
506
+ case 1:
507
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
508
+ msg.setOwnerAddress(value);
509
+ break;
510
+ case 2:
511
+ var value = /** @type {number} */ (reader.readInt64());
512
+ msg.setExchangeId(value);
513
+ break;
514
+ case 3:
515
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
516
+ msg.setTokenId(value);
517
+ break;
518
+ case 4:
519
+ var value = /** @type {number} */ (reader.readInt64());
520
+ msg.setQuant(value);
521
+ break;
522
+ default:
523
+ reader.skipField();
524
+ break;
525
+ }
526
+ }
527
+ return msg;
528
+ };
529
+
530
+
531
+ /**
532
+ * Serializes the message to binary data (in protobuf wire format).
533
+ * @return {!Uint8Array}
534
+ */
535
+ TronWebProto.ExchangeInjectContract.prototype.serializeBinary = function() {
536
+ var writer = new jspb.BinaryWriter();
537
+ TronWebProto.ExchangeInjectContract.serializeBinaryToWriter(this, writer);
538
+ return writer.getResultBuffer();
539
+ };
540
+
541
+
542
+ /**
543
+ * Serializes the given message to binary data (in protobuf wire
544
+ * format), writing to the given BinaryWriter.
545
+ * @param {!TronWebProto.ExchangeInjectContract} message
546
+ * @param {!jspb.BinaryWriter} writer
547
+ * @suppress {unusedLocalVariables} f is only used for nested messages
548
+ */
549
+ TronWebProto.ExchangeInjectContract.serializeBinaryToWriter = function(message, writer) {
550
+ var f = undefined;
551
+ f = message.getOwnerAddress_asU8();
552
+ if (f.length > 0) {
553
+ writer.writeBytes(
554
+ 1,
555
+ f
556
+ );
557
+ }
558
+ f = message.getExchangeId();
559
+ if (f !== 0) {
560
+ writer.writeInt64(
561
+ 2,
562
+ f
563
+ );
564
+ }
565
+ f = message.getTokenId_asU8();
566
+ if (f.length > 0) {
567
+ writer.writeBytes(
568
+ 3,
569
+ f
570
+ );
571
+ }
572
+ f = message.getQuant();
573
+ if (f !== 0) {
574
+ writer.writeInt64(
575
+ 4,
576
+ f
577
+ );
578
+ }
579
+ };
580
+
581
+
582
+ /**
583
+ * optional bytes owner_address = 1;
584
+ * @return {!(string|Uint8Array)}
585
+ */
586
+ TronWebProto.ExchangeInjectContract.prototype.getOwnerAddress = function() {
587
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
588
+ };
589
+
590
+
591
+ /**
592
+ * optional bytes owner_address = 1;
593
+ * This is a type-conversion wrapper around `getOwnerAddress()`
594
+ * @return {string}
595
+ */
596
+ TronWebProto.ExchangeInjectContract.prototype.getOwnerAddress_asB64 = function() {
597
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
598
+ this.getOwnerAddress()));
599
+ };
600
+
601
+
602
+ /**
603
+ * optional bytes owner_address = 1;
604
+ * Note that Uint8Array is not supported on all browsers.
605
+ * @see http://caniuse.com/Uint8Array
606
+ * This is a type-conversion wrapper around `getOwnerAddress()`
607
+ * @return {!Uint8Array}
608
+ */
609
+ TronWebProto.ExchangeInjectContract.prototype.getOwnerAddress_asU8 = function() {
610
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
611
+ this.getOwnerAddress()));
612
+ };
613
+
614
+
615
+ /**
616
+ * @param {!(string|Uint8Array)} value
617
+ * @return {!TronWebProto.ExchangeInjectContract} returns this
618
+ */
619
+ TronWebProto.ExchangeInjectContract.prototype.setOwnerAddress = function(value) {
620
+ return jspb.Message.setProto3BytesField(this, 1, value);
621
+ };
622
+
623
+
624
+ /**
625
+ * optional int64 exchange_id = 2;
626
+ * @return {number}
627
+ */
628
+ TronWebProto.ExchangeInjectContract.prototype.getExchangeId = function() {
629
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
630
+ };
631
+
632
+
633
+ /**
634
+ * @param {number} value
635
+ * @return {!TronWebProto.ExchangeInjectContract} returns this
636
+ */
637
+ TronWebProto.ExchangeInjectContract.prototype.setExchangeId = function(value) {
638
+ return jspb.Message.setProto3IntField(this, 2, value);
639
+ };
640
+
641
+
642
+ /**
643
+ * optional bytes token_id = 3;
644
+ * @return {!(string|Uint8Array)}
645
+ */
646
+ TronWebProto.ExchangeInjectContract.prototype.getTokenId = function() {
647
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
648
+ };
649
+
650
+
651
+ /**
652
+ * optional bytes token_id = 3;
653
+ * This is a type-conversion wrapper around `getTokenId()`
654
+ * @return {string}
655
+ */
656
+ TronWebProto.ExchangeInjectContract.prototype.getTokenId_asB64 = function() {
657
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
658
+ this.getTokenId()));
659
+ };
660
+
661
+
662
+ /**
663
+ * optional bytes token_id = 3;
664
+ * Note that Uint8Array is not supported on all browsers.
665
+ * @see http://caniuse.com/Uint8Array
666
+ * This is a type-conversion wrapper around `getTokenId()`
667
+ * @return {!Uint8Array}
668
+ */
669
+ TronWebProto.ExchangeInjectContract.prototype.getTokenId_asU8 = function() {
670
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
671
+ this.getTokenId()));
672
+ };
673
+
674
+
675
+ /**
676
+ * @param {!(string|Uint8Array)} value
677
+ * @return {!TronWebProto.ExchangeInjectContract} returns this
678
+ */
679
+ TronWebProto.ExchangeInjectContract.prototype.setTokenId = function(value) {
680
+ return jspb.Message.setProto3BytesField(this, 3, value);
681
+ };
682
+
683
+
684
+ /**
685
+ * optional int64 quant = 4;
686
+ * @return {number}
687
+ */
688
+ TronWebProto.ExchangeInjectContract.prototype.getQuant = function() {
689
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
690
+ };
691
+
692
+
693
+ /**
694
+ * @param {number} value
695
+ * @return {!TronWebProto.ExchangeInjectContract} returns this
696
+ */
697
+ TronWebProto.ExchangeInjectContract.prototype.setQuant = function(value) {
698
+ return jspb.Message.setProto3IntField(this, 4, value);
699
+ };
700
+
701
+
702
+
703
+
704
+
705
+ if (jspb.Message.GENERATE_TO_OBJECT) {
706
+ /**
707
+ * Creates an object representation of this proto.
708
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
709
+ * Optional fields that are not set will be set to undefined.
710
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
711
+ * For the list of reserved names please see:
712
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
713
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
714
+ * JSPB instance for transitional soy proto support:
715
+ * http://goto/soy-param-migration
716
+ * @return {!Object}
717
+ */
718
+ TronWebProto.ExchangeWithdrawContract.prototype.toObject = function(opt_includeInstance) {
719
+ return TronWebProto.ExchangeWithdrawContract.toObject(opt_includeInstance, this);
720
+ };
721
+
722
+
723
+ /**
724
+ * Static version of the {@see toObject} method.
725
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
726
+ * the JSPB instance for transitional soy proto support:
727
+ * http://goto/soy-param-migration
728
+ * @param {!TronWebProto.ExchangeWithdrawContract} msg The msg instance to transform.
729
+ * @return {!Object}
730
+ * @suppress {unusedLocalVariables} f is only used for nested messages
731
+ */
732
+ TronWebProto.ExchangeWithdrawContract.toObject = function(includeInstance, msg) {
733
+ var f, obj = {
734
+ ownerAddress: msg.getOwnerAddress_asB64(),
735
+ exchangeId: jspb.Message.getFieldWithDefault(msg, 2, 0),
736
+ tokenId: msg.getTokenId_asB64(),
737
+ quant: jspb.Message.getFieldWithDefault(msg, 4, 0)
738
+ };
739
+
740
+ if (includeInstance) {
741
+ obj.$jspbMessageInstance = msg;
742
+ }
743
+ return obj;
744
+ };
745
+ }
746
+
747
+
748
+ /**
749
+ * Deserializes binary data (in protobuf wire format).
750
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
751
+ * @return {!TronWebProto.ExchangeWithdrawContract}
752
+ */
753
+ TronWebProto.ExchangeWithdrawContract.deserializeBinary = function(bytes) {
754
+ var reader = new jspb.BinaryReader(bytes);
755
+ var msg = new TronWebProto.ExchangeWithdrawContract;
756
+ return TronWebProto.ExchangeWithdrawContract.deserializeBinaryFromReader(msg, reader);
757
+ };
758
+
759
+
760
+ /**
761
+ * Deserializes binary data (in protobuf wire format) from the
762
+ * given reader into the given message object.
763
+ * @param {!TronWebProto.ExchangeWithdrawContract} msg The message object to deserialize into.
764
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
765
+ * @return {!TronWebProto.ExchangeWithdrawContract}
766
+ */
767
+ TronWebProto.ExchangeWithdrawContract.deserializeBinaryFromReader = function(msg, reader) {
768
+ while (reader.nextField()) {
769
+ if (reader.isEndGroup()) {
770
+ break;
771
+ }
772
+ var field = reader.getFieldNumber();
773
+ switch (field) {
774
+ case 1:
775
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
776
+ msg.setOwnerAddress(value);
777
+ break;
778
+ case 2:
779
+ var value = /** @type {number} */ (reader.readInt64());
780
+ msg.setExchangeId(value);
781
+ break;
782
+ case 3:
783
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
784
+ msg.setTokenId(value);
785
+ break;
786
+ case 4:
787
+ var value = /** @type {number} */ (reader.readInt64());
788
+ msg.setQuant(value);
789
+ break;
790
+ default:
791
+ reader.skipField();
792
+ break;
793
+ }
794
+ }
795
+ return msg;
796
+ };
797
+
798
+
799
+ /**
800
+ * Serializes the message to binary data (in protobuf wire format).
801
+ * @return {!Uint8Array}
802
+ */
803
+ TronWebProto.ExchangeWithdrawContract.prototype.serializeBinary = function() {
804
+ var writer = new jspb.BinaryWriter();
805
+ TronWebProto.ExchangeWithdrawContract.serializeBinaryToWriter(this, writer);
806
+ return writer.getResultBuffer();
807
+ };
808
+
809
+
810
+ /**
811
+ * Serializes the given message to binary data (in protobuf wire
812
+ * format), writing to the given BinaryWriter.
813
+ * @param {!TronWebProto.ExchangeWithdrawContract} message
814
+ * @param {!jspb.BinaryWriter} writer
815
+ * @suppress {unusedLocalVariables} f is only used for nested messages
816
+ */
817
+ TronWebProto.ExchangeWithdrawContract.serializeBinaryToWriter = function(message, writer) {
818
+ var f = undefined;
819
+ f = message.getOwnerAddress_asU8();
820
+ if (f.length > 0) {
821
+ writer.writeBytes(
822
+ 1,
823
+ f
824
+ );
825
+ }
826
+ f = message.getExchangeId();
827
+ if (f !== 0) {
828
+ writer.writeInt64(
829
+ 2,
830
+ f
831
+ );
832
+ }
833
+ f = message.getTokenId_asU8();
834
+ if (f.length > 0) {
835
+ writer.writeBytes(
836
+ 3,
837
+ f
838
+ );
839
+ }
840
+ f = message.getQuant();
841
+ if (f !== 0) {
842
+ writer.writeInt64(
843
+ 4,
844
+ f
845
+ );
846
+ }
847
+ };
848
+
849
+
850
+ /**
851
+ * optional bytes owner_address = 1;
852
+ * @return {!(string|Uint8Array)}
853
+ */
854
+ TronWebProto.ExchangeWithdrawContract.prototype.getOwnerAddress = function() {
855
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
856
+ };
857
+
858
+
859
+ /**
860
+ * optional bytes owner_address = 1;
861
+ * This is a type-conversion wrapper around `getOwnerAddress()`
862
+ * @return {string}
863
+ */
864
+ TronWebProto.ExchangeWithdrawContract.prototype.getOwnerAddress_asB64 = function() {
865
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
866
+ this.getOwnerAddress()));
867
+ };
868
+
869
+
870
+ /**
871
+ * optional bytes owner_address = 1;
872
+ * Note that Uint8Array is not supported on all browsers.
873
+ * @see http://caniuse.com/Uint8Array
874
+ * This is a type-conversion wrapper around `getOwnerAddress()`
875
+ * @return {!Uint8Array}
876
+ */
877
+ TronWebProto.ExchangeWithdrawContract.prototype.getOwnerAddress_asU8 = function() {
878
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
879
+ this.getOwnerAddress()));
880
+ };
881
+
882
+
883
+ /**
884
+ * @param {!(string|Uint8Array)} value
885
+ * @return {!TronWebProto.ExchangeWithdrawContract} returns this
886
+ */
887
+ TronWebProto.ExchangeWithdrawContract.prototype.setOwnerAddress = function(value) {
888
+ return jspb.Message.setProto3BytesField(this, 1, value);
889
+ };
890
+
891
+
892
+ /**
893
+ * optional int64 exchange_id = 2;
894
+ * @return {number}
895
+ */
896
+ TronWebProto.ExchangeWithdrawContract.prototype.getExchangeId = function() {
897
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
898
+ };
899
+
900
+
901
+ /**
902
+ * @param {number} value
903
+ * @return {!TronWebProto.ExchangeWithdrawContract} returns this
904
+ */
905
+ TronWebProto.ExchangeWithdrawContract.prototype.setExchangeId = function(value) {
906
+ return jspb.Message.setProto3IntField(this, 2, value);
907
+ };
908
+
909
+
910
+ /**
911
+ * optional bytes token_id = 3;
912
+ * @return {!(string|Uint8Array)}
913
+ */
914
+ TronWebProto.ExchangeWithdrawContract.prototype.getTokenId = function() {
915
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
916
+ };
917
+
918
+
919
+ /**
920
+ * optional bytes token_id = 3;
921
+ * This is a type-conversion wrapper around `getTokenId()`
922
+ * @return {string}
923
+ */
924
+ TronWebProto.ExchangeWithdrawContract.prototype.getTokenId_asB64 = function() {
925
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
926
+ this.getTokenId()));
927
+ };
928
+
929
+
930
+ /**
931
+ * optional bytes token_id = 3;
932
+ * Note that Uint8Array is not supported on all browsers.
933
+ * @see http://caniuse.com/Uint8Array
934
+ * This is a type-conversion wrapper around `getTokenId()`
935
+ * @return {!Uint8Array}
936
+ */
937
+ TronWebProto.ExchangeWithdrawContract.prototype.getTokenId_asU8 = function() {
938
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
939
+ this.getTokenId()));
940
+ };
941
+
942
+
943
+ /**
944
+ * @param {!(string|Uint8Array)} value
945
+ * @return {!TronWebProto.ExchangeWithdrawContract} returns this
946
+ */
947
+ TronWebProto.ExchangeWithdrawContract.prototype.setTokenId = function(value) {
948
+ return jspb.Message.setProto3BytesField(this, 3, value);
949
+ };
950
+
951
+
952
+ /**
953
+ * optional int64 quant = 4;
954
+ * @return {number}
955
+ */
956
+ TronWebProto.ExchangeWithdrawContract.prototype.getQuant = function() {
957
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
958
+ };
959
+
960
+
961
+ /**
962
+ * @param {number} value
963
+ * @return {!TronWebProto.ExchangeWithdrawContract} returns this
964
+ */
965
+ TronWebProto.ExchangeWithdrawContract.prototype.setQuant = function(value) {
966
+ return jspb.Message.setProto3IntField(this, 4, value);
967
+ };
968
+
969
+
970
+
971
+
972
+
973
+ if (jspb.Message.GENERATE_TO_OBJECT) {
974
+ /**
975
+ * Creates an object representation of this proto.
976
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
977
+ * Optional fields that are not set will be set to undefined.
978
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
979
+ * For the list of reserved names please see:
980
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
981
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
982
+ * JSPB instance for transitional soy proto support:
983
+ * http://goto/soy-param-migration
984
+ * @return {!Object}
985
+ */
986
+ TronWebProto.ExchangeTransactionContract.prototype.toObject = function(opt_includeInstance) {
987
+ return TronWebProto.ExchangeTransactionContract.toObject(opt_includeInstance, this);
988
+ };
989
+
990
+
991
+ /**
992
+ * Static version of the {@see toObject} method.
993
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
994
+ * the JSPB instance for transitional soy proto support:
995
+ * http://goto/soy-param-migration
996
+ * @param {!TronWebProto.ExchangeTransactionContract} msg The msg instance to transform.
997
+ * @return {!Object}
998
+ * @suppress {unusedLocalVariables} f is only used for nested messages
999
+ */
1000
+ TronWebProto.ExchangeTransactionContract.toObject = function(includeInstance, msg) {
1001
+ var f, obj = {
1002
+ ownerAddress: msg.getOwnerAddress_asB64(),
1003
+ exchangeId: jspb.Message.getFieldWithDefault(msg, 2, 0),
1004
+ tokenId: msg.getTokenId_asB64(),
1005
+ quant: jspb.Message.getFieldWithDefault(msg, 4, 0),
1006
+ expected: jspb.Message.getFieldWithDefault(msg, 5, 0)
1007
+ };
1008
+
1009
+ if (includeInstance) {
1010
+ obj.$jspbMessageInstance = msg;
1011
+ }
1012
+ return obj;
1013
+ };
1014
+ }
1015
+
1016
+
1017
+ /**
1018
+ * Deserializes binary data (in protobuf wire format).
1019
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1020
+ * @return {!TronWebProto.ExchangeTransactionContract}
1021
+ */
1022
+ TronWebProto.ExchangeTransactionContract.deserializeBinary = function(bytes) {
1023
+ var reader = new jspb.BinaryReader(bytes);
1024
+ var msg = new TronWebProto.ExchangeTransactionContract;
1025
+ return TronWebProto.ExchangeTransactionContract.deserializeBinaryFromReader(msg, reader);
1026
+ };
1027
+
1028
+
1029
+ /**
1030
+ * Deserializes binary data (in protobuf wire format) from the
1031
+ * given reader into the given message object.
1032
+ * @param {!TronWebProto.ExchangeTransactionContract} msg The message object to deserialize into.
1033
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1034
+ * @return {!TronWebProto.ExchangeTransactionContract}
1035
+ */
1036
+ TronWebProto.ExchangeTransactionContract.deserializeBinaryFromReader = function(msg, reader) {
1037
+ while (reader.nextField()) {
1038
+ if (reader.isEndGroup()) {
1039
+ break;
1040
+ }
1041
+ var field = reader.getFieldNumber();
1042
+ switch (field) {
1043
+ case 1:
1044
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
1045
+ msg.setOwnerAddress(value);
1046
+ break;
1047
+ case 2:
1048
+ var value = /** @type {number} */ (reader.readInt64());
1049
+ msg.setExchangeId(value);
1050
+ break;
1051
+ case 3:
1052
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
1053
+ msg.setTokenId(value);
1054
+ break;
1055
+ case 4:
1056
+ var value = /** @type {number} */ (reader.readInt64());
1057
+ msg.setQuant(value);
1058
+ break;
1059
+ case 5:
1060
+ var value = /** @type {number} */ (reader.readInt64());
1061
+ msg.setExpected(value);
1062
+ break;
1063
+ default:
1064
+ reader.skipField();
1065
+ break;
1066
+ }
1067
+ }
1068
+ return msg;
1069
+ };
1070
+
1071
+
1072
+ /**
1073
+ * Serializes the message to binary data (in protobuf wire format).
1074
+ * @return {!Uint8Array}
1075
+ */
1076
+ TronWebProto.ExchangeTransactionContract.prototype.serializeBinary = function() {
1077
+ var writer = new jspb.BinaryWriter();
1078
+ TronWebProto.ExchangeTransactionContract.serializeBinaryToWriter(this, writer);
1079
+ return writer.getResultBuffer();
1080
+ };
1081
+
1082
+
1083
+ /**
1084
+ * Serializes the given message to binary data (in protobuf wire
1085
+ * format), writing to the given BinaryWriter.
1086
+ * @param {!TronWebProto.ExchangeTransactionContract} message
1087
+ * @param {!jspb.BinaryWriter} writer
1088
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1089
+ */
1090
+ TronWebProto.ExchangeTransactionContract.serializeBinaryToWriter = function(message, writer) {
1091
+ var f = undefined;
1092
+ f = message.getOwnerAddress_asU8();
1093
+ if (f.length > 0) {
1094
+ writer.writeBytes(
1095
+ 1,
1096
+ f
1097
+ );
1098
+ }
1099
+ f = message.getExchangeId();
1100
+ if (f !== 0) {
1101
+ writer.writeInt64(
1102
+ 2,
1103
+ f
1104
+ );
1105
+ }
1106
+ f = message.getTokenId_asU8();
1107
+ if (f.length > 0) {
1108
+ writer.writeBytes(
1109
+ 3,
1110
+ f
1111
+ );
1112
+ }
1113
+ f = message.getQuant();
1114
+ if (f !== 0) {
1115
+ writer.writeInt64(
1116
+ 4,
1117
+ f
1118
+ );
1119
+ }
1120
+ f = message.getExpected();
1121
+ if (f !== 0) {
1122
+ writer.writeInt64(
1123
+ 5,
1124
+ f
1125
+ );
1126
+ }
1127
+ };
1128
+
1129
+
1130
+ /**
1131
+ * optional bytes owner_address = 1;
1132
+ * @return {!(string|Uint8Array)}
1133
+ */
1134
+ TronWebProto.ExchangeTransactionContract.prototype.getOwnerAddress = function() {
1135
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1136
+ };
1137
+
1138
+
1139
+ /**
1140
+ * optional bytes owner_address = 1;
1141
+ * This is a type-conversion wrapper around `getOwnerAddress()`
1142
+ * @return {string}
1143
+ */
1144
+ TronWebProto.ExchangeTransactionContract.prototype.getOwnerAddress_asB64 = function() {
1145
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
1146
+ this.getOwnerAddress()));
1147
+ };
1148
+
1149
+
1150
+ /**
1151
+ * optional bytes owner_address = 1;
1152
+ * Note that Uint8Array is not supported on all browsers.
1153
+ * @see http://caniuse.com/Uint8Array
1154
+ * This is a type-conversion wrapper around `getOwnerAddress()`
1155
+ * @return {!Uint8Array}
1156
+ */
1157
+ TronWebProto.ExchangeTransactionContract.prototype.getOwnerAddress_asU8 = function() {
1158
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
1159
+ this.getOwnerAddress()));
1160
+ };
1161
+
1162
+
1163
+ /**
1164
+ * @param {!(string|Uint8Array)} value
1165
+ * @return {!TronWebProto.ExchangeTransactionContract} returns this
1166
+ */
1167
+ TronWebProto.ExchangeTransactionContract.prototype.setOwnerAddress = function(value) {
1168
+ return jspb.Message.setProto3BytesField(this, 1, value);
1169
+ };
1170
+
1171
+
1172
+ /**
1173
+ * optional int64 exchange_id = 2;
1174
+ * @return {number}
1175
+ */
1176
+ TronWebProto.ExchangeTransactionContract.prototype.getExchangeId = function() {
1177
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
1178
+ };
1179
+
1180
+
1181
+ /**
1182
+ * @param {number} value
1183
+ * @return {!TronWebProto.ExchangeTransactionContract} returns this
1184
+ */
1185
+ TronWebProto.ExchangeTransactionContract.prototype.setExchangeId = function(value) {
1186
+ return jspb.Message.setProto3IntField(this, 2, value);
1187
+ };
1188
+
1189
+
1190
+ /**
1191
+ * optional bytes token_id = 3;
1192
+ * @return {!(string|Uint8Array)}
1193
+ */
1194
+ TronWebProto.ExchangeTransactionContract.prototype.getTokenId = function() {
1195
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1196
+ };
1197
+
1198
+
1199
+ /**
1200
+ * optional bytes token_id = 3;
1201
+ * This is a type-conversion wrapper around `getTokenId()`
1202
+ * @return {string}
1203
+ */
1204
+ TronWebProto.ExchangeTransactionContract.prototype.getTokenId_asB64 = function() {
1205
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
1206
+ this.getTokenId()));
1207
+ };
1208
+
1209
+
1210
+ /**
1211
+ * optional bytes token_id = 3;
1212
+ * Note that Uint8Array is not supported on all browsers.
1213
+ * @see http://caniuse.com/Uint8Array
1214
+ * This is a type-conversion wrapper around `getTokenId()`
1215
+ * @return {!Uint8Array}
1216
+ */
1217
+ TronWebProto.ExchangeTransactionContract.prototype.getTokenId_asU8 = function() {
1218
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
1219
+ this.getTokenId()));
1220
+ };
1221
+
1222
+
1223
+ /**
1224
+ * @param {!(string|Uint8Array)} value
1225
+ * @return {!TronWebProto.ExchangeTransactionContract} returns this
1226
+ */
1227
+ TronWebProto.ExchangeTransactionContract.prototype.setTokenId = function(value) {
1228
+ return jspb.Message.setProto3BytesField(this, 3, value);
1229
+ };
1230
+
1231
+
1232
+ /**
1233
+ * optional int64 quant = 4;
1234
+ * @return {number}
1235
+ */
1236
+ TronWebProto.ExchangeTransactionContract.prototype.getQuant = function() {
1237
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
1238
+ };
1239
+
1240
+
1241
+ /**
1242
+ * @param {number} value
1243
+ * @return {!TronWebProto.ExchangeTransactionContract} returns this
1244
+ */
1245
+ TronWebProto.ExchangeTransactionContract.prototype.setQuant = function(value) {
1246
+ return jspb.Message.setProto3IntField(this, 4, value);
1247
+ };
1248
+
1249
+
1250
+ /**
1251
+ * optional int64 expected = 5;
1252
+ * @return {number}
1253
+ */
1254
+ TronWebProto.ExchangeTransactionContract.prototype.getExpected = function() {
1255
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
1256
+ };
1257
+
1258
+
1259
+ /**
1260
+ * @param {number} value
1261
+ * @return {!TronWebProto.ExchangeTransactionContract} returns this
1262
+ */
1263
+ TronWebProto.ExchangeTransactionContract.prototype.setExpected = function(value) {
1264
+ return jspb.Message.setProto3IntField(this, 5, value);
1265
+ };
1266
+
1267
+
1268
+ goog.object.extend(exports, TronWebProto);