package.json 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. {
  2. "name": "tronweb",
  3. "version": "6.2.0",
  4. "description": "JavaScript SDK that encapsulates the TRON HTTP API",
  5. "main": "./lib/commonjs/index.js",
  6. "module": "./lib/esm/index.js",
  7. "types": "./lib/esm/index.d.ts",
  8. "files": [
  9. "lib",
  10. "dist",
  11. "src"
  12. ],
  13. "exports": {
  14. ".": {
  15. "import": "./lib/esm/index.js",
  16. "require": "./lib/commonjs/index.js"
  17. },
  18. "./utils": {
  19. "import": "./lib/esm/utils/index.js",
  20. "require": "./lib/commonjs/utils/index.js"
  21. }
  22. },
  23. "typesVersions": {
  24. "*": {
  25. "utils": [
  26. "lib/esm/utils/index.d.ts"
  27. ]
  28. }
  29. },
  30. "keywords": [
  31. "TRON",
  32. "tronweb"
  33. ],
  34. "scripts": {
  35. "build:esm": "tsc --project tsconfig.esm.json && echo '{\"type\": \"module\"}' > ./lib/esm/package.json && npm run copy-protocol:esm",
  36. "build:cjs": "tsc --project tsconfig.cjs.json && echo '{\"type\": \"commonjs\"}' > ./lib/commonjs/package.json && npm run copy-protocol:cjs",
  37. "build:types": "tsc --project tsconfig.types.json",
  38. "build:test": "tsc --project tsconfig.test.json && echo '{\"type\": \"commonjs\"}' > ./lib/commonjs/package.json && cp -R ./src/protocol ./lib/commonjs/src/",
  39. "build:dist": "webpack --config webpack.config.js --progress --color",
  40. "build:all": "npm run clean:all && npm run build:esm && npm run build:cjs && npm run build:dist",
  41. "copy-protocol:cjs": "cp -R ./src/protocol ./lib/commonjs/",
  42. "copy-protocol:esm": "cp -R ./src/protocol ./lib/esm/",
  43. "prepare": "husky install && npm run build",
  44. "build": "npm run clean && webpack --config webpack.config.js --progress --color",
  45. "build:dev": "NODE_ENV=development npm run build",
  46. "clean:all": "rimraf dist lib",
  47. "clean": "rimraf dist",
  48. "newaccount": "node scripts/test-node.js && node lib/commonjs/test/helpers/newAccounts 100",
  49. "test": "npm run build:test && npm run-script newaccount && npx mocha 'lib/commonjs/test/**/*.test.js' --timeout 120000",
  50. "test:esm": "npm run-script newaccount && npx mocha 'lib/esm/test/**/*.test.js' --timeout 120000",
  51. "testAbi": "node scripts/test-node.js && node test/helpers/newAccounts 1 && npx mocha 'test/**/abi.test.js' --timeout 120000",
  52. "testTx": "node scripts/test-node.js && node test/helpers/newAccounts 100 && npx mocha 'test/**/transaction.test.js' --timeout 120000",
  53. "test-no-accounts": "node scripts/test-node.js && npx mocha 'test/**/*.test.js'",
  54. "test:browser": "npm run-script newaccount && node scripts/test-browser.js && npx karma start --single-run --browsers ChromeHeadless",
  55. "coverage": "npm run build:test && npm run-script newaccount && nyc mocha 'lib/commonjs/test/**/*.test.js' --timeout 120000",
  56. "btest": "npm run build:dev && npm run test",
  57. "format-all": "prettier --write ./src",
  58. "lint": "eslint src",
  59. "lint:fix": "eslint src --fix"
  60. },
  61. "husky": {
  62. "hooks": {
  63. "pre-commit": "node ./scripts/pre-commit.js"
  64. }
  65. },
  66. "dependencies": {
  67. "@babel/runtime": "7.26.10",
  68. "axios": "1.12.2",
  69. "bignumber.js": "9.1.2",
  70. "ethereum-cryptography": "2.2.1",
  71. "ethers": "6.13.5",
  72. "eventemitter3": "5.0.1",
  73. "google-protobuf": "3.21.4",
  74. "semver": "7.7.1",
  75. "validator": "13.15.23"
  76. },
  77. "devDependencies": {
  78. "@babel/core": "7.26.10",
  79. "@babel/plugin-transform-class-properties": "7.25.9",
  80. "@babel/plugin-transform-numeric-separator": "7.25.9",
  81. "@babel/plugin-transform-object-rest-spread": "7.25.9",
  82. "@babel/plugin-transform-private-methods": "7.25.9",
  83. "@babel/plugin-transform-private-property-in-object": "7.25.9",
  84. "@babel/plugin-transform-runtime": "7.26.10",
  85. "@babel/preset-env": "7.26.9",
  86. "@babel/preset-typescript": "7.26.0",
  87. "@eslint/eslintrc": "3.3.0",
  88. "@eslint/js": "9.22.0",
  89. "@types/chai": "5.2.0",
  90. "@types/estree": "1.0.6",
  91. "@types/json-schema": "7.0.15",
  92. "@types/lodash": "4.17.16",
  93. "@types/mocha": "10.0.10",
  94. "@types/node": "22.13.10",
  95. "@types/semver": "7.5.8",
  96. "@types/validator": "13.12.2",
  97. "@typescript-eslint/eslint-plugin": "8.26.1",
  98. "@typescript-eslint/parser": "8.26.1",
  99. "babel-loader": "10.0.0",
  100. "babel-plugin-istanbul": "7.0.0",
  101. "babel-plugin-source-map-support": "2.2.0",
  102. "buffer": "6.0.3",
  103. "chai": "4.5.0",
  104. "chalk": "2.4.2",
  105. "eslint": "9.31.0",
  106. "eslint-config-prettier": "10.1.1",
  107. "eslint-import-resolver-typescript": "4.2.0",
  108. "events": "3.3.0",
  109. "globals": "16.0.0",
  110. "globby": "14.1.0",
  111. "husky": "9.1.7",
  112. "json-schema": "0.4.0",
  113. "karma": "6.4.4",
  114. "karma-chrome-launcher": "3.2.0",
  115. "karma-coverage": "2.2.1",
  116. "karma-coverage-istanbul-reporter": "3.0.3",
  117. "karma-edge-launcher": "0.4.2",
  118. "karma-firefox-launcher": "2.1.3",
  119. "karma-mocha": "2.0.1",
  120. "karma-sourcemap-loader": "0.4.0",
  121. "karma-spec-reporter": "0.0.36",
  122. "karma-webpack": "5.0.1",
  123. "mocha": "11.1.0",
  124. "nyc": "17.1.0",
  125. "prettier": "3.5.3",
  126. "puppeteer": "24.23.0",
  127. "querystring-es3": "0.2.1",
  128. "rimraf": "5.0.10",
  129. "source-map-support": "0.5.21",
  130. "ts-loader": "9.5.2",
  131. "typescript": "5.8.2",
  132. "webpack": "5.98.0",
  133. "webpack-cli": "6.0.1",
  134. "webpack-node-externals": "3.0.0"
  135. },
  136. "author": {
  137. "name": "Tron Protocol",
  138. "url": "https://github.com/tronprotocol"
  139. },
  140. "homepage": "https://tronweb.network",
  141. "license": "MIT",
  142. "repository": "https://github.com/tronprotocol/tronweb.git"
  143. }