package.json 5.7 KB

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