diff --git a/.gitignore b/.gitignore index aef8e2b0..824ec382 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,5 @@ yarn-error.log .idea/ example/ test/lib/dist/ +lib/ + diff --git a/demo/tron-dapp-react-demo/.gitignore b/demo/tron-dapp-react-demo/.gitignore deleted file mode 100755 index a8c75992..00000000 --- a/demo/tron-dapp-react-demo/.gitignore +++ /dev/null @@ -1,103 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* - -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage -*.lcov - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# TypeScript v1 declaration files -typings/ - -# TypeScript cache -*.tsbuildinfo - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Microbundle cache -.rpt2_cache/ -.rts2_cache_cjs/ -.rts2_cache_es/ -.rts2_cache_umd/ - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file -.env.test - -# parcel-bundler cache (https://parceljs.org/) -.cache - -# Next.js build output -.next - -# Nuxt.js build / generate output -.nuxt -dist - -# Gatsby files -.cache/ -# Comment in the public line in if your project uses Gatsby and *not* Next.js -# https://nextjs.org/blog/next-9-1#public-directory-support -# public - -# vuepress build output -.vuepress/dist - -# Serverless directories -.serverless/ - -# FuseBox cache -.fusebox/ - -# DynamoDB Local files -.dynamodb/ - -# TernJS port file -.tern-port diff --git a/demo/tron-dapp-react-demo/.prettierrc b/demo/tron-dapp-react-demo/.prettierrc deleted file mode 100755 index e8c29038..00000000 --- a/demo/tron-dapp-react-demo/.prettierrc +++ /dev/null @@ -1,8 +0,0 @@ -{ - "arrowParens": "avoid", - "trailingComma": "none", - "singleQuote": true, - "quoteProps": "preserve", - "printWidth": 120, - "tabWidth": 2 -} diff --git a/demo/tron-dapp-react-demo/LICENSE b/demo/tron-dapp-react-demo/LICENSE deleted file mode 100755 index 261eeb9e..00000000 --- a/demo/tron-dapp-react-demo/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/demo/tron-dapp-react-demo/README.md b/demo/tron-dapp-react-demo/README.md deleted file mode 100755 index 02aac3f6..00000000 --- a/demo/tron-dapp-react-demo/README.md +++ /dev/null @@ -1,70 +0,0 @@ -# Getting Started with Create React App - -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). - -## Available Scripts - -In the project directory, you can run: - -### `yarn start` - -Runs the app in the development mode.\ -Open [http://localhost:3000](http://localhost:3000) to view it in the browser. - -The page will reload if you make edits.\ -You will also see any lint errors in the console. - -### `yarn test` - -Launches the test runner in the interactive watch mode.\ -See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. - -### `yarn build` - -Builds the app for production to the `build` folder.\ -It correctly bundles React in production mode and optimizes the build for the best performance. - -The build is minified and the filenames include the hashes.\ -Your app is ready to be deployed! - -See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. - -### `yarn eject` - -**Note: this is a one-way operation. Once you `eject`, you can’t go back!** - -If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. - -Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. - -You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. - -## Learn More - -You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). - -To learn React, check out the [React documentation](https://reactjs.org/). - -### Code Splitting - -This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) - -### Analyzing the Bundle Size - -This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) - -### Making a Progressive Web App - -This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) - -### Advanced Configuration - -This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) - -### Deployment - -This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) - -### `yarn build` fails to minify - -This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) diff --git a/demo/tron-dapp-react-demo/config-overrides.js b/demo/tron-dapp-react-demo/config-overrides.js deleted file mode 100755 index d0cad5e3..00000000 --- a/demo/tron-dapp-react-demo/config-overrides.js +++ /dev/null @@ -1,20 +0,0 @@ -const { override, addDecoratorsLegacy, disableEsLint, overrideDevServer, watchAll } = require('customize-cra'); - -const rewiredMap = () => config => { - config.devtool = config.mode === 'development' ? 'cheap-module-source-map' : false; - return config; -}; - -module.exports = { - webpack: override( - // enable legacy decorators babel plugin - addDecoratorsLegacy(), - // usual webpack plugin - disableEsLint(), - rewiredMap() - ), - devServer: overrideDevServer( - // dev server plugin - watchAll() - ) -}; diff --git a/demo/tron-dapp-react-demo/package.json b/demo/tron-dapp-react-demo/package.json deleted file mode 100755 index 9f6f481a..00000000 --- a/demo/tron-dapp-react-demo/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "tron-dapp-react", - "version": "1.0.0", - "private": true, - "dependencies": { - "@ant-design/icons": "^4.7.0", - "antd": "^4.8.3", - "bignumber.js": "^9.0.1", - "cross-env": "^7.0.2", - "customize-cra": "^1.0.0", - "husky": "^4.3.0", - "ismobilejs": "^1.1.1", - "lint-staged": "^10.5.0", - "lodash": "^4.17.15", - "mobx": "^5.15.4", - "mobx-react": "^6.2.2", - "prettier": "^2.1.2", - "qrcode.react": "^1.0.0", - "react": "^16.8.0 || 16.9.0-alpha.0", - "react-app-rewired": "^2.1.6", - "react-dom": "^16.0.1", - "react-intl-universal": "^2.2.5", - "react-router-dom": "^5.2.0", - "react-scripts": "4.0.1", - "sass": "^1.26.8", - "styled-components": "^5.2.1", - "tronweb": "^4.1.0", - "web-vitals": "^0.2.4" - }, - "scripts": { - "start": "PORT=18113 cross-env REACT_APP_ENV=test react-app-rewired start", - "startPro": "PORT=18116 react-app-rewired start", - "build": "react-app-rewired build", - "test": "cross-env REACT_APP_ENV=test react-app-rewired build", - "eject": "react-scripts eject" - }, - "lint-staged": { - "src/**/*.{js,jsx,ts,tsx,json,css,scss,md}": [ - "prettier --write" - ] - }, - "husky": { - "hooks": { - "pre-commit": "lint-staged" - } - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] - } -} diff --git a/demo/tron-dapp-react-demo/public/favicon.ico b/demo/tron-dapp-react-demo/public/favicon.ico deleted file mode 100755 index a11777cc..00000000 Binary files a/demo/tron-dapp-react-demo/public/favicon.ico and /dev/null differ diff --git a/demo/tron-dapp-react-demo/public/index.html b/demo/tron-dapp-react-demo/public/index.html deleted file mode 100644 index d9555ad4..00000000 --- a/demo/tron-dapp-react-demo/public/index.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - TronWeb Demo - - - -
- - - diff --git a/demo/tron-dapp-react-demo/public/logo192.png b/demo/tron-dapp-react-demo/public/logo192.png deleted file mode 100755 index fc44b0a3..00000000 Binary files a/demo/tron-dapp-react-demo/public/logo192.png and /dev/null differ diff --git a/demo/tron-dapp-react-demo/public/logo512.png b/demo/tron-dapp-react-demo/public/logo512.png deleted file mode 100755 index a4e47a65..00000000 Binary files a/demo/tron-dapp-react-demo/public/logo512.png and /dev/null differ diff --git a/demo/tron-dapp-react-demo/public/manifest.json b/demo/tron-dapp-react-demo/public/manifest.json deleted file mode 100755 index 080d6c77..00000000 --- a/demo/tron-dapp-react-demo/public/manifest.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "short_name": "React App", - "name": "Create React App Sample", - "icons": [ - { - "src": "favicon.ico", - "sizes": "64x64 32x32 24x24 16x16", - "type": "image/x-icon" - }, - { - "src": "logo192.png", - "type": "image/png", - "sizes": "192x192" - }, - { - "src": "logo512.png", - "type": "image/png", - "sizes": "512x512" - } - ], - "start_url": ".", - "display": "standalone", - "theme_color": "#000000", - "background_color": "#ffffff" -} diff --git a/demo/tron-dapp-react-demo/public/robots.txt b/demo/tron-dapp-react-demo/public/robots.txt deleted file mode 100755 index e9e57dc4..00000000 --- a/demo/tron-dapp-react-demo/public/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -# https://www.robotstxt.org/robotstxt.html -User-agent: * -Disallow: diff --git a/demo/tron-dapp-react-demo/src/assets/css/header.scss b/demo/tron-dapp-react-demo/src/assets/css/header.scss deleted file mode 100755 index b6c0ab3d..00000000 --- a/demo/tron-dapp-react-demo/src/assets/css/header.scss +++ /dev/null @@ -1,46 +0,0 @@ -.header-container { - width: 220px; - float: left; - position: absolute; - top: 0; - left: 0; - // padding: 20px; - .menu-content { - padding-top: 20px; - } - .connect-wallet { - margin-bottom: 15px; - } - .address-text { - width: 90%; - height: 46px; - line-height: 46px; - color: #fff; - background: #1a8796; - margin: 0 auto; - transition: all ease-in-out 0.2s; - border-radius: 5px; - text-align: center; - - img { - width: 17px; - display: inline-block; - margin-right: 10px; - } - - > span { - font-size: 12px; - } - } - .links { - padding-left: 20px; - padding-top: 10px; - } - .language-logo { - display: block; - cursor: pointer; - } - .lg-active { - color: #3d56d6; - } -} diff --git a/demo/tron-dapp-react-demo/src/assets/css/home.scss b/demo/tron-dapp-react-demo/src/assets/css/home.scss deleted file mode 100755 index e69de29b..00000000 diff --git a/demo/tron-dapp-react-demo/src/assets/css/index.scss b/demo/tron-dapp-react-demo/src/assets/css/index.scss deleted file mode 100755 index 838b4e3a..00000000 --- a/demo/tron-dapp-react-demo/src/assets/css/index.scss +++ /dev/null @@ -1,193 +0,0 @@ -html, -body, -* { - margin: 0; - padding: 0; - font-size: 14px; -} - -p, -h1, -h2, -h3, -h4, -h5, -h6 { - margin-bottom: 0; -} - -body { - overscroll-behavior: none; -} - -ul, -li { - list-style: none; -} - -button, -.modal-btn { - border: none; - cursor: pointer; -} - -#root .main-content { - min-height: 100vh; -} - -.flexB { - display: flex; - justify-content: space-between; -} - -.flexC { - display: flex; - flex-direction: column; - justify-content: center; - - span { - display: block; - line-height: 33px; - } -} - -.flex { - display: flex; - - &.between { - justify-content: space-between; - } - - &.ai-center { - align-items: center; - } -} - -.ques { - color: #999; - display: inline-block; - background: #fff; - width: 18px; - height: 18px; - line-height: 18px; - text-align: center; - border-radius: 100%; - // margin-left: 10px; - margin-right: 10px; - border: 1px solid #999; - font-family: AvenirNext-Medium; - font-size: 16px; - cursor: pointer; -} - -.pointer { - cursor: pointer; -} - -.center { - text-align: center; -} - -.collateralSymbol { - align-items: center; - - img { - width: 24px; - height: 24px; - } -} - -.ant-progress { - &.deposit-stroke { - .ant-progress-success-bg, - .ant-progress-bg, - .ant-progress-status-success .ant-progress-bg { - background-color: #3d56d6; - } - } - - &.lend-stroke { - .ant-progress-success-bg, - .ant-progress-bg, - .ant-progress-status-success .ant-progress-bg { - background-color: #1ed0ac; - } - } -} - -.ant-notification .ant-notification-notice { - border-radius: 10px !important; -} - -.trans-notify { - font-family: AvenirNext-Medium; - display: flex; - justify-content: space-between; - align-items: center; - border-radius: 10px; - - .typo-text-link { - font-size: 14px; - color: #4850e5; - } - - .trans-btn-tip { - display: inline-block; - font-size: 12px; - border-radius: 10px; - padding: 10px; - } - - .trans-pending { - background: rgb(22, 195, 120, 0.2); - color: rgb(22, 195, 120); - } - - .trans-confirmed { - background: rgb(72, 80, 229, 0.2); - color: rgb(72, 80, 229); - } - - .trans-failed { - background: rgb(255, 142, 24, 0.2); - color: rgb(255, 142, 24); - } -} - -@font-face { - // font-family: 'Roboto'; - // src: url('../font/Roboto/Roboto-Black.ttf'); - // src: url('../font/Roboto/Roboto-Black.ttf') format('truetype'); -} - -body { - font-family: 'PingFang SC', 'Roboto', 'sans-serif' !important; -} - -.copied-style-sp { - position: absolute; - font-family: PingFang SC; - font-style: normal; - font-weight: normal; - font-size: 12px; - line-height: 17px; - text-align: center; - color: #ffffff; - background: #0f134f; - border-radius: 34px; - z-index: 9000; - padding: 7px 22px; - white-space: nowrap; - cursor: pointer; - bottom: 30px; - left: 0; - right: 0; - margin: auto; - width: 85px; -} - -.main-content { - margin-left: 220px; - padding: 30px; - width: calc(100% - 220px); -} diff --git a/demo/tron-dapp-react-demo/src/assets/images/TransactionCanceled.svg b/demo/tron-dapp-react-demo/src/assets/images/TransactionCanceled.svg deleted file mode 100755 index f5f90a0b..00000000 --- a/demo/tron-dapp-react-demo/src/assets/images/TransactionCanceled.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/demo/tron-dapp-react-demo/src/assets/images/TransactionSubmitted.svg b/demo/tron-dapp-react-demo/src/assets/images/TransactionSubmitted.svg deleted file mode 100755 index 03f2d7bf..00000000 --- a/demo/tron-dapp-react-demo/src/assets/images/TransactionSubmitted.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/demo/tron-dapp-react-demo/src/assets/images/Tronlink.svg b/demo/tron-dapp-react-demo/src/assets/images/Tronlink.svg deleted file mode 100755 index 474e1f43..00000000 --- a/demo/tron-dapp-react-demo/src/assets/images/Tronlink.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - Tronlink - Created with Sketch. - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/demo/tron-dapp-react-demo/src/assets/images/authorize.svg b/demo/tron-dapp-react-demo/src/assets/images/authorize.svg deleted file mode 100755 index 7c058deb..00000000 --- a/demo/tron-dapp-react-demo/src/assets/images/authorize.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/demo/tron-dapp-react-demo/src/assets/images/closeBlack.svg b/demo/tron-dapp-react-demo/src/assets/images/closeBlack.svg deleted file mode 100755 index 7b661519..00000000 --- a/demo/tron-dapp-react-demo/src/assets/images/closeBlack.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/demo/tron-dapp-react-demo/src/assets/images/mainLogo.png b/demo/tron-dapp-react-demo/src/assets/images/mainLogo.png deleted file mode 100755 index 80405d19..00000000 Binary files a/demo/tron-dapp-react-demo/src/assets/images/mainLogo.png and /dev/null differ diff --git a/demo/tron-dapp-react-demo/src/assets/images/tronlinkBlue.svg b/demo/tron-dapp-react-demo/src/assets/images/tronlinkBlue.svg deleted file mode 100755 index 9909c546..00000000 --- a/demo/tron-dapp-react-demo/src/assets/images/tronlinkBlue.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/demo/tron-dapp-react-demo/src/assets/images/tronlinkLogo.svg b/demo/tron-dapp-react-demo/src/assets/images/tronlinkLogo.svg deleted file mode 100755 index fbbdc15a..00000000 --- a/demo/tron-dapp-react-demo/src/assets/images/tronlinkLogo.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/demo/tron-dapp-react-demo/src/assets/images/tronlinkRightArrow.svg b/demo/tron-dapp-react-demo/src/assets/images/tronlinkRightArrow.svg deleted file mode 100755 index f1ee6114..00000000 --- a/demo/tron-dapp-react-demo/src/assets/images/tronlinkRightArrow.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/demo/tron-dapp-react-demo/src/assets/images/walletFail.svg b/demo/tron-dapp-react-demo/src/assets/images/walletFail.svg deleted file mode 100755 index 4e025059..00000000 --- a/demo/tron-dapp-react-demo/src/assets/images/walletFail.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/demo/tron-dapp-react-demo/src/assets/images/walletSuccess.svg b/demo/tron-dapp-react-demo/src/assets/images/walletSuccess.svg deleted file mode 100755 index f59c224a..00000000 --- a/demo/tron-dapp-react-demo/src/assets/images/walletSuccess.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/demo/tron-dapp-react-demo/src/components/Footer.js b/demo/tron-dapp-react-demo/src/components/Footer.js deleted file mode 100755 index 41791846..00000000 --- a/demo/tron-dapp-react-demo/src/components/Footer.js +++ /dev/null @@ -1,27 +0,0 @@ -import React from 'react'; -import isMobile from 'ismobilejs'; -import intl from 'react-intl-universal'; -import { inject, observer } from 'mobx-react'; -import Config from '../config'; -import '../assets/css/home.scss'; - -@inject('network') -@observer -class FooterPage extends React.Component { - constructor(props) { - super(props); - this.state = { - lang: window.localStorage.getItem('lang') || intl.options.currentLocale - }; - } - render() { - const { lang } = this.state; - return ( -
- {Config.version} -
- ); - } -} - -export default FooterPage; diff --git a/demo/tron-dapp-react-demo/src/components/Header.js b/demo/tron-dapp-react-demo/src/components/Header.js deleted file mode 100755 index 8c0e870e..00000000 --- a/demo/tron-dapp-react-demo/src/components/Header.js +++ /dev/null @@ -1,54 +0,0 @@ -import React from 'react'; -import isMobile from 'ismobilejs'; -import intl from 'react-intl-universal'; -import { inject, observer } from 'mobx-react'; -import { Link } from 'react-router-dom'; -import { Layout, Select, Menu, Modal, Drawer, Tooltip, Popover, Button } from 'antd'; - -import { cutMiddle, copyToClipboard } from '../utils/helper'; -import '../assets/css/header.scss'; -import walletSuccess from '../assets/images/walletSuccess.svg'; -import walletFail from '../assets/images/walletFail.svg'; -import logoSingle from '../assets/images/mainLogo.png'; -import tronlink from '../assets/images/tronlinkLogo.svg'; -import tronlinkBlue from '../assets/images/tronlinkBlue.svg'; -import tronlinkRightArrow from '../assets/images/tronlinkRightArrow.svg'; -import { PieChartOutlined, DesktopOutlined, ContainerOutlined } from '@ant-design/icons'; - -const { Option } = Select; -const { SubMenu } = Menu; - -@inject('network') -@observer -class LeftMenu extends React.Component { - constructor(props) { - super(props); - this.state = {}; - } - - componentDidMount() { - this.props.instantActions && this.props.instantActions(); // should excute when componentDidMount, we need not check if a user logined or not - if (!this.props.network.isConnected) { - this.props.network.initTronLinkWallet( - () => { - this.props.mountedActions && this.props.mountedActions(); - }, - () => { - // if a user do not login TronLink wallet, we should do something - this.props.unmountedActions && this.props.unmountedActions(); - } - ); - } else { - this.props.mountedActions && this.props.mountedActions(); - } - // when a user change a node or change a account or change a chain type, - // we shoule listen TronLink to reload the webpage to get new account info - this.props.network.listenTronLink(); - } - - render() { - return <>; - } -} - -export default LeftMenu; diff --git a/demo/tron-dapp-react-demo/src/components/HeaderH.js b/demo/tron-dapp-react-demo/src/components/HeaderH.js deleted file mode 100755 index 4e00459e..00000000 --- a/demo/tron-dapp-react-demo/src/components/HeaderH.js +++ /dev/null @@ -1,300 +0,0 @@ -import React from 'react'; -import isMobile from 'ismobilejs'; -import intl from 'react-intl-universal'; -import { inject, observer } from 'mobx-react'; -import { Link } from 'react-router-dom'; -import { Layout, Select, Menu, Modal, Drawer, Tooltip, Popover, Button } from 'antd'; - -import { cutMiddle, copyToClipboard } from '../utils/helper'; -import '../assets/css/header.scss'; -import walletSuccess from '../assets/images/walletSuccess.svg'; -import walletFail from '../assets/images/walletFail.svg'; -import logoSingle from '../assets/images/mainLogo.png'; -import tronlink from '../assets/images/tronlinkLogo.svg'; -import tronlinkBlue from '../assets/images/tronlinkBlue.svg'; -import tronlinkRightArrow from '../assets/images/tronlinkRightArrow.svg'; -import { PieChartOutlined, DesktopOutlined, ContainerOutlined } from '@ant-design/icons'; - -const { Option } = Select; -const { SubMenu } = Menu; - -@inject('network') -@observer -class LeftMenu extends React.Component { - constructor(props) { - super(props); - this.state = { - lang: window.localStorage.getItem('lang') || intl.options.currentLocale, - visible: false, - step: 1, - accountModal: false, - drawerVisible: false, - mobile: isMobile(window.navigator).any - }; - } - - componentDidMount() { - this.props.instantActions && this.props.instantActions(); // should excute when componentDidMount, we need not check if a user logined or not - if (!this.props.network.isConnected) { - this.props.network.initTronLinkWallet( - () => { - this.props.mountedActions && this.props.mountedActions(); - }, - () => { - // if a user do not login TronLink wallet, we should do something - this.props.unmountedActions && this.props.unmountedActions(); - } - ); - } else { - this.props.mountedActions && this.props.mountedActions(); - } - // when a user change a node or change a account or change a chain type, - // we shoule listen TronLink to reload the webpage to get new account info - this.props.network.listenTronLink(); - } - - setLanguage = lang => { - if (lang === 'en-US') { - lang = 'zh-CN'; - } else { - lang = 'en-US'; - } - this.props.network.setData({ lang }); - this.setState({ lang }); - window.localStorage.setItem('lang', lang); - window.location.search = `?lang=${lang}`; - }; - - handleCancel = () => { - this.props.network.setData({ loginModalVisible: false }); - }; - - goBack = () => { - this.props.network.setData({ loginModalStep: 1 }); - }; - - showLoginModal = e => { - this.props.network.connectWallet(); - }; - - loginWallet = (e, type) => { - this.props.network.setData({ loginModalStep: 2 }); - this.props.network.initTronLinkWallet(() => { - if (this.props.network.isConnected) { - this.props.network.setData({ loginModalStep: 2 }); - } - }); - }; - - showAccountInfo = () => { - this.setState({ accountModal: true }); - }; - - handleCancelAccount = () => { - this.setState({ accountModal: false }); - }; - - hideSecondPop = () => { - this.props.network.setData({ noSupport: false }); - this.onClose(); - }; - - openDrawer = () => { - this.setState({ drawerVisible: true }); - }; - - onClose = () => { - this.setState({ drawerVisible: false }); - }; - - render() { - const { accountModal, lang, drawerVisible, mobile } = this.state; - const { - isConnected, - defaultAccount, - defaultSelectedKeys, - loginModalVisible, - loginModalStep, - routeName, - menuFlag - } = this.props.network; - return ( - <> -
-
-
-
TRON DAPP Logo
-
-
-
- {isConnected ? ( -
-
{ - this.showAccountInfo(); - }} - className="address-text pointer" - > - - {cutMiddle(defaultAccount, 4, 4)} -
-
- ) : ( -
{ - this.showLoginModal(e); - }} - className="address-text pointer" - > - - {intl.get('navi.wallet_linkbtn')} -
- )} -
- - }> - - {intl.get('navi.index_btn')} - - - }> - - {intl.get('navi.index_btn1')} - - - }> - - - {intl.get('navi.index_btn2')} - - - - - -
- { - this.setLanguage(lang); - }} - > - - - English - / - 中文 - - -
-
-
-
-
-
- - {loginModalStep === 1 ? ( -
-
- -
-
{intl.get('wallet.use_justlend')}
-
-
{ - this.loginWallet(e, 1); - }} - > - - - -
- {intl.get('login_modal.tronlink')} - -
-
-
- -
- {intl.get('wallet.accept_tips')} - - {intl.get('wallet.service')} - -   - - {intl.get('wallet.privacy')} - -
-
- ) : ( -
-
- -
-
{intl.get('wallet.authorize_justlend')}
-
-
-
- - - -
-
-
-
- {intl.get('wallet.no_wallet')} - - {intl.get('wallet.click_to_get')} - -
-
- )} -
- - -
- -
-
{intl.get('account_modal.connect_with_tronlink')}
-
-
{defaultAccount}
-
{ - copyToClipboard(e, '', 'copySpan'); - }} - > - {intl.get('account_modal.copy')} -
-
-
-
-
- - ); - } -} - -export default LeftMenu; diff --git a/demo/tron-dapp-react-demo/src/components/Home.js b/demo/tron-dapp-react-demo/src/components/Home.js deleted file mode 100644 index 86684c84..00000000 --- a/demo/tron-dapp-react-demo/src/components/Home.js +++ /dev/null @@ -1,30 +0,0 @@ -import React from 'react'; -import { inject, observer } from 'mobx-react'; -import HeaderPage from './Header'; -import UserList from './UserList'; - -@inject('dapp') -@observer -class Home extends React.Component { - constructor(props) { - super(props); - this.state = {}; - } - - componentDidMount = async () => {}; - - mountedActions = async () => { - await this.props.dapp.getUserList(); - }; - - render() { - return ( -
- - -
- ); - } -} - -export default Home; diff --git a/demo/tron-dapp-react-demo/src/components/MarketList.js b/demo/tron-dapp-react-demo/src/components/MarketList.js deleted file mode 100755 index ae168a08..00000000 --- a/demo/tron-dapp-react-demo/src/components/MarketList.js +++ /dev/null @@ -1,22 +0,0 @@ -import React from 'react'; -import intl from 'react-intl-universal'; -import { inject, observer } from 'mobx-react'; -import Config from '../config'; -import '../assets/css/home.scss'; - -@inject('network') -@observer -class MarketList extends React.Component { - constructor(props) { - super(props); - this.state = { - lang: window.localStorage.getItem('lang') || intl.options.currentLocale - }; - } - render() { - const { lang } = this.state; - return
; - } -} - -export default MarketList; diff --git a/demo/tron-dapp-react-demo/src/components/Modals/Transaction.js b/demo/tron-dapp-react-demo/src/components/Modals/Transaction.js deleted file mode 100755 index aaec5fab..00000000 --- a/demo/tron-dapp-react-demo/src/components/Modals/Transaction.js +++ /dev/null @@ -1,92 +0,0 @@ -import React from 'react'; -import isMobile from 'ismobilejs'; -import { inject, observer } from 'mobx-react'; -import { tronscanTX } from '../../utils/helper'; -import { Modal, Tabs, Input, Button, Progress } from 'antd'; -import intl from 'react-intl-universal'; - -import { LoadingOutlined } from '@ant-design/icons'; - -import TransCancelledIcon from '../../assets/images/TransactionCanceled.svg'; -import TransSubmittedIcon from '../../assets/images/TransactionSubmitted.svg'; -import authorizeIcon from '../../assets/images/authorize.svg'; - -@inject('network') -@inject('system') -@observer -class Transaction extends React.Component { - constructor() { - super(); - this.state = {}; - } - - componentDidMount() {} - - close = () => { - this.props.system.setData({ transModalInfo: { visible: false } }); - // this.props.system.visible = false - }; - render() { - const { transModalInfo } = this.props.system; - const { visible, step, txId, title, obj, title2, title3, title4 } = transModalInfo; - return ( - this.props.system.hideTransModal()} - footer={null} - width={320} - className="trans-modal" - > -
- {step == 1 ? ( - - {title &&
{intl.get(title4 || title, obj)}
} -
- -
- - - -
- {/* */} -
-
{intl.get('deposit.explanation2')}
-
- ) : null} - {step == 2 ? ( - -
{intl.get(title2 || 'deposit.transactionsent', obj)}
-
- -
-
- {tronscanTX(intl.get('deposit.explanation4'), txId)} -
-
- {intl.get('deposit.closed')} -
-
- ) : null} - {step == 3 ? ( - -
{intl.get(title3 || 'toast.ex_failed', obj)}
-
- -
-
{intl.get('deposit.explanation3')}
-
- ) : null} -
-
- ); - } -} - -export default Transaction; diff --git a/demo/tron-dapp-react-demo/src/components/Tip.js b/demo/tron-dapp-react-demo/src/components/Tip.js deleted file mode 100755 index 0aaafe89..00000000 --- a/demo/tron-dapp-react-demo/src/components/Tip.js +++ /dev/null @@ -1,51 +0,0 @@ -import React from 'react'; -import intl from 'react-intl-universal'; -import isMobile from 'ismobilejs'; -import { inject, observer } from 'mobx-react'; -import { Tooltip } from 'antd'; - -class Tip extends React.Component { - constructor(props) { - super(props); - this.state = {}; - } - - render() { - let { placement = 'bottom' } = this.props; - return ( - - {this.props.left ? ( -
- - ? - - {this.props.children} -
- ) : ( -
- {this.props.children} - - ? - -
- )} -
- ); - } -} - -export default Tip; diff --git a/demo/tron-dapp-react-demo/src/components/UserList.js b/demo/tron-dapp-react-demo/src/components/UserList.js deleted file mode 100755 index 7449c635..00000000 --- a/demo/tron-dapp-react-demo/src/components/UserList.js +++ /dev/null @@ -1,163 +0,0 @@ -import React from 'react'; -import intl from 'react-intl-universal'; -import { inject, observer } from 'mobx-react'; -import Config from '../config'; -import '../assets/css/home.scss'; - -import { Table, Button, Modal, Input } from 'antd'; -import { emptyReactNode, formatNumber, isAddress, BigNumber } from '../utils/helper'; - -@inject('network') -@inject('dapp') -@inject('system') -@observer -class UserList extends React.Component { - constructor(props) { - super(props); - this.state = { - lang: window.localStorage.getItem('lang') || intl.options.currentLocale, - modalVisible: false, - to: '', - amount: '' - }; - } - - openTransferModal = () => { - this.setState({ - modalVisible: true - }); - }; - - closeTransferModal = () => { - this.setState({ - modalVisible: false - }); - }; - - transfer = async () => { - const { to, amount } = this.state; - const amountToken = BigNumber(amount).times(BigNumber(10).pow(Config.defaultDecimal))._toHex(); // for a large amount, we can pass value with hex string - await this.props.system.transferToken(to, amountToken); - }; - - changeTo = e => { - const value = e.target.value; - // if (!isAddress(value)) { - // return; - // } - this.setState({ - to: value - }); - }; - - changeAmount = e => { - const value = e.target.value; - this.setState({ - amount: value - }); - }; - - getColumns = () => { - const { lang } = this.state; - const columns = [ - { - title: intl.get('table.symbol'), - dataIndex: 'tokenSymbol', - key: '1', - render: (text, item) => ( - -
- { - e.target.onerror = null; - }} - /> -
-
{text}
-
{item.tokenName}
-
-
-
- ) - }, - { - title: intl.get('table.address'), - dataIndex: 'tokenAddress', - key: '2', - render: (text, item) => ( - - {text} - - ) - }, - { - title: intl.get('table.balance'), - dataIndex: 'balance', - key: '3', - render: (text, item) => {isNaN(text) ? '--' : formatNumber({ text })} - }, - { - title: intl.get('table.transfer'), - dataIndex: 'operation', - key: '4', - render: (text, item) => ( - - ) - } - ]; - return columns; - }; - - render() { - const { modalVisible, to, amount } = this.state; - const { userList } = this.props.dapp; - return ( - <> - {userList && ( -
- - -
-
{intl.get('transfer.to')}
- -
{intl.get('transfer.amount')}
- -
- -
-
-
- - )} - - ); - } -} - -export default UserList; diff --git a/demo/tron-dapp-react-demo/src/config.js b/demo/tron-dapp-react-demo/src/config.js deleted file mode 100755 index 5caac523..00000000 --- a/demo/tron-dapp-react-demo/src/config.js +++ /dev/null @@ -1,38 +0,0 @@ -const env = process.env.REACT_APP_ENV; - -const Config = { - version: 'v1.0.0', - chain: { - privateKey: '01', - fullHost: 'https://api.trongrid.io' - }, - trongrid: { - host: 'https://api.trongrid.io', - key: 'xxxxxx' - }, - service: {}, - contract: { - usdt: 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t' - }, - defaultDecimal: 6, - tronLinkTime: 8, - justSwap: 'https://justswap.org/', - tronscanUrl: 'https://tronscan.io/#' -}; - -let devConfig = {}; -if (env === 'test') { - devConfig = { - chain: { - privateKey: '01', - fullHost: 'https://api.nileex.io' - }, - service: {}, - contract: { - usdt: 'TXYZopYRdj2D9XRtbG411XZZ3kM5VkAeBf' - }, - justSwap: 'https://justswap.org/', - tronscanUrl: 'https://nile.tronscan.io/#' - }; -} -export default Object.assign(Config, devConfig); diff --git a/demo/tron-dapp-react-demo/src/index.css b/demo/tron-dapp-react-demo/src/index.css deleted file mode 100755 index 7323ae85..00000000 --- a/demo/tron-dapp-react-demo/src/index.css +++ /dev/null @@ -1,11 +0,0 @@ -body { - margin: 0; - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', - 'Droid Sans', 'Helvetica Neue', sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -code { - font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace; -} diff --git a/demo/tron-dapp-react-demo/src/index.js b/demo/tron-dapp-react-demo/src/index.js deleted file mode 100755 index f07d7890..00000000 --- a/demo/tron-dapp-react-demo/src/index.js +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; -import ReactDOM from 'react-dom'; -import './assets/css/index.scss'; -import App from './routes/index.js'; -import reportWebVitals from './reportWebVitals'; - -import 'antd/dist/antd.css'; - -ReactDOM.render(, document.getElementById('root')); - -// If you want to start measuring performance in your app, pass a function -// to log results (for example: reportWebVitals(console.log)) -// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals -reportWebVitals(); diff --git a/demo/tron-dapp-react-demo/src/locales/en-US.json b/demo/tron-dapp-react-demo/src/locales/en-US.json deleted file mode 100755 index 12ba9ab0..00000000 --- a/demo/tron-dapp-react-demo/src/locales/en-US.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "account_modal": { - "account": "Account", - "connect_with_tronlink": "Connected with TronLink", - "copy": "Copy", - "copied": "Copied" - }, - "deposit": { - "deposit": "Supply", - "withdraw": "Withdraw", - "explanation1": "You need to approve before supply or repay {value} to smart contracts.", - "wallet_balance": "Wallet Balance", - "depositapy": "Supply APY", - "approve": "Approve {value}", - "confirm_approve": "Approval Confirmation", - "explanation2": "Need your approval from the wallet", - "enteramount": "Enter the supply amount", - "max": "Max", - "Loanlimit": "Borrow Limit", - "limitused": "Borrow Limit Used", - "deposited": "Supplied", - "confirm_transaction": "Transaction Confirmation", - "explanation3": "Transaction confirmation failed in the wallet", - "transactionsent": "Transaction Sent", - "explanation4": "Transaction sent, waiting for confirmation on-chain", - "closed": "Close", - "amountout": "Insufficient wallet balance", - "enteramount2": "Enter the supply amount" - }, - "table": { - "symbol": "Token Symbol", - "address": "Token Address", - "balance": "Balance", - "operate": "Operation", - "transfer": "Transfer" - }, - "transfer": { - "title": "Transfer", - "amount": "Transfer Amount", - "to": "Recieve Address", - "confirm": "Transfer" - }, - "no_data": "No Data" -} diff --git a/demo/tron-dapp-react-demo/src/locales/zh-CN.json b/demo/tron-dapp-react-demo/src/locales/zh-CN.json deleted file mode 100755 index 2fc4cbbc..00000000 --- a/demo/tron-dapp-react-demo/src/locales/zh-CN.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "account_modal": { - "account": "账户", - "connect_with_tronlink": "已连接 TronLink", - "copy": "复制", - "copied": "已复制" - }, - "deposit": { - "deposit": "存款", - "withdraw": "提现", - "explanation1": "要向智能合约存款或偿还{value}
需要先授权启用", - "wallet_balance": "钱包余额", - "depositapy": "存款APY", - "approve": "授权{value}", - "confirm_approve": "确认授权", - "explanation2": "需要在钱包中授权", - "enteramount": "输入存款数量", - "max": "最大", - "Loanlimit": "可借限额", - "limitused": "限额已使用", - "deposited": "已存", - "confirm_transaction": "确认交易", - "explanation3": "钱包确认交易失败", - "transactionsent": "交易已发送", - "explanation4": "交易已发送,等待链上确认", - "closed": "关闭", - "amountout": "钱包余额不足", - "enteramount2": "请输入存款数量" - }, - "table": { - "symbol": "Token Symbol", - "address": "Token Address", - "balance": "Balance", - "operate": "操作", - "transfer": "触发合约转账" - }, - "transfer": { - "title": "转账", - "amount": "转账数量", - "to": "接受地址", - "confirm": "确认" - }, - "no_data": "无数据" -} diff --git a/demo/tron-dapp-react-demo/src/logo.svg b/demo/tron-dapp-react-demo/src/logo.svg deleted file mode 100755 index 9dfc1c05..00000000 --- a/demo/tron-dapp-react-demo/src/logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/demo/tron-dapp-react-demo/src/reportWebVitals.js b/demo/tron-dapp-react-demo/src/reportWebVitals.js deleted file mode 100755 index 5253d3ad..00000000 --- a/demo/tron-dapp-react-demo/src/reportWebVitals.js +++ /dev/null @@ -1,13 +0,0 @@ -const reportWebVitals = onPerfEntry => { - if (onPerfEntry && onPerfEntry instanceof Function) { - import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { - getCLS(onPerfEntry); - getFID(onPerfEntry); - getFCP(onPerfEntry); - getLCP(onPerfEntry); - getTTFB(onPerfEntry); - }); - } -}; - -export default reportWebVitals; diff --git a/demo/tron-dapp-react-demo/src/routes/Home.js b/demo/tron-dapp-react-demo/src/routes/Home.js deleted file mode 100644 index d9ba806e..00000000 --- a/demo/tron-dapp-react-demo/src/routes/Home.js +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; -import { inject, observer } from 'mobx-react'; - -import HomePage from '../components/Home'; - -@inject('network') -@observer -class Home extends React.Component { - render() { - return ; - } -} - -export default Home; diff --git a/demo/tron-dapp-react-demo/src/routes/index.js b/demo/tron-dapp-react-demo/src/routes/index.js deleted file mode 100755 index d315fe0f..00000000 --- a/demo/tron-dapp-react-demo/src/routes/index.js +++ /dev/null @@ -1,71 +0,0 @@ -import React, { lazy, Suspense } from 'react'; -import { Provider } from 'mobx-react'; -import { Switch, Route, HashRouter, Redirect } from 'react-router-dom'; -import intl from 'react-intl-universal'; -import _ from 'lodash'; - -import Stores from '../stores'; - -import { SUPPOER_LOCALES } from '../utils/helper'; - -const Home = lazy(() => import('./Home')); -const Home1 = lazy(() => import('./Home')); -const Home2 = lazy(() => import('./Home')); - -const locales = { - 'zh-CN': require('../locales/zh-CN.json'), - 'en-US': require('../locales/en-US.json') -}; - -class App extends React.Component { - componentDidMount() {} - - UNSAFE_componentWillMount() { - this.loadLocales(); - } - - loadLocales = () => { - let currentLocale = intl.determineLocale({ - urlLocaleKey: 'lang', - cookieLocaleKey: 'lang' - }); - - // 如果没找到,则默认为汉语 - if (!_.find(SUPPOER_LOCALES, { value: currentLocale })) { - currentLocale = 'en-US'; - } - - // let currentLocale = 'en-US'; // later will deleted - window.localStorage.setItem('lang', currentLocale); - // init 方法将根据 currentLocale 来加载当前语言环境的数据 - return intl.init({ - currentLocale, - locales - }); - }; - - render() { - const time = 1; - const Routes = () => ( - -
- } /> -
}> - - - - - - - -
- ); - return ( - - - - ); - } -} - -export default App; diff --git a/demo/tron-dapp-react-demo/src/setupTests.js b/demo/tron-dapp-react-demo/src/setupTests.js deleted file mode 100755 index 8f2609b7..00000000 --- a/demo/tron-dapp-react-demo/src/setupTests.js +++ /dev/null @@ -1,5 +0,0 @@ -// jest-dom adds custom jest matchers for asserting on DOM nodes. -// allows you to do things like: -// expect(element).toHaveTextContent(/react/i) -// learn more: https://github.com/testing-library/jest-dom -import '@testing-library/jest-dom'; diff --git a/demo/tron-dapp-react-demo/src/stores/dapp.js b/demo/tron-dapp-react-demo/src/stores/dapp.js deleted file mode 100755 index abb0e662..00000000 --- a/demo/tron-dapp-react-demo/src/stores/dapp.js +++ /dev/null @@ -1,32 +0,0 @@ -import { observable } from 'mobx'; -import { getUserList } from '../utils/backend'; -export default class NetworkStore { - @observable userList = []; - @observable marketList = []; - - constructor(rootStore) { - this.rootStore = rootStore; - } - - addKey = (data = []) => { - data.map((item, index) => (item.key = index)); - return data; - }; - - getUserList = async () => { - const account = window.defaultAccount; - if (!account) return; - const res = await getUserList(account); - if (!res.success) return; - this.userList = this.addKey(res.data); - }; - - getMarketList = () => {}; - - setData = (obj = {}) => { - const self = this; - Object.keys(obj).map(key => { - self[key] = obj[key]; - }); - }; -} diff --git a/demo/tron-dapp-react-demo/src/stores/index.js b/demo/tron-dapp-react-demo/src/stores/index.js deleted file mode 100755 index c6f2222c..00000000 --- a/demo/tron-dapp-react-demo/src/stores/index.js +++ /dev/null @@ -1,14 +0,0 @@ -import NetworkStore from './network'; -import System from './system'; -import Dapp from './dapp'; - -class RootStore { - constructor() { - this.network = new NetworkStore(this); - this.system = new System(this); - this.dapp = new Dapp(this); - } -} - -const store = new RootStore(); -export default store; diff --git a/demo/tron-dapp-react-demo/src/stores/network.js b/demo/tron-dapp-react-demo/src/stores/network.js deleted file mode 100755 index bb75ac83..00000000 --- a/demo/tron-dapp-react-demo/src/stores/network.js +++ /dev/null @@ -1,238 +0,0 @@ -import React from 'react'; -import { observable } from 'mobx'; -import { notification } from 'antd'; -import intl from 'react-intl-universal'; -import Config from '../config'; -import { tronscanTX } from '../utils/helper'; -import Tip from '../components/Tip'; -import { getTransactionInfo } from '../utils/blockchain'; -export default class NetworkStore { - @observable tronWeb = false; - @observable defaultAccount = null; // current login tron account address - @observable isConnected = null; - @observable routeName = ''; // current route hash - @observable lang = ''; - @observable loginModalVisible = false; - @observable loginModalStep = 1; - @observable menuFlag = true; // true means open, false means collapse - @observable start = null; - @observable nowTime = null; - - constructor(rootStore) { - this.rootStore = rootStore; - } - - getDescription = (type, item, text) => { - const { tx, title, status } = item; - let className = ''; - switch (type) { - case 1: - className = 'trans-pending'; - break; - case 2: - className = 'trans-confirmed'; - break; - case 3: - className = 'trans-failed'; - break; - } - return ( -
- {tronscanTX(intl.get('view_on_tronscan'), tx)} - {type === 3 ? ( - - {text} - - ) : ( - {text} - )} -
- ); - }; - - checkPendingTransactions = () => { - let data = window.localStorage.getItem(window.defaultAccount) || '[]'; - const transactions = JSON.parse(data); - - transactions.map(item => { - const { tx, status, showPending } = item; - if (Number(status) === 1) { - if (showPending) { - this.logTransactionPending(item); - } - item.checkCnt++; - getTransactionInfo(tx) - .then(r => { - if (r) { - if (r && r.ret && r.ret[0].contractRet === 'SUCCESS') { - this.logTransactionConfirmed(item); - } else if (r && r.ret && r.ret[0].contractRet && r.ret[0].contractRet != 'SUCCESS') { - this.logTransactionFailed(item); - } else { - if (item.checkCnt != undefined && item.checkCnt < 30) { - setTimeout(this.checkPendingTransactions, 3000); - } else { - this.logTransactionFailed(item, true); // Failed transactions after 90s are directly deleted locally - } - } - } - }) - .catch(ex => { - // setTimeout(this.checkPendingTransactions, 5000); - console.error(ex); - }); - } - return false; - }); - }; - - logTransactionPending = item => { - item.showPending = false; - const { tx, intlObj } = item; - notification.open({ - key: tx, - message: intl.get(intlObj.title, intlObj.obj), - description: this.getDescription(1, item, intl.get('trans_status.pending')) - }); - this.saveTransactions(item); - }; - - logTransactionConfirmed = item => { - item.status = 2; - const { tx, intlObj } = item; - notification.open({ - key: tx, - message: intl.get(intlObj && intlObj.title4 ? intlObj.title4 : intlObj.title, intlObj.obj), - description: this.getDescription(2, item, intl.get('trans_status.confirmed')) - }); - this.saveTransactions(item); - - // After 5s destroy the notification corresponding to the key... - }; - - logTransactionFailed = (item, needDelete = false) => { - item.status = 3; - const { tx, intlObj } = item; - notification.open({ - key: tx, - message: intl.get(intlObj && intlObj.title3 ? intlObj.title3 : intlObj.title, intlObj.obj), - description: this.getDescription(3, item, intl.get('trans_status.failed')), - duration: 30 - }); - this.saveTransactions(item, needDelete); - // Update transaction status of localstorage - // After 5s destroy the notification corresponding to the key... - }; - - saveTransactions = (record, needDelete) => { - const { tx, status } = record; - let data = window.localStorage.getItem(window.defaultAccount) || '[]'; - let dataArr = JSON.parse(data); - let pos = 'true'; - dataArr.map((item, index) => { - if (item.tx === tx) { - pos = index; - } - }); - if (pos === 'true') { - return; - } - dataArr[pos] = record; - window.localStorage.setItem(window.defaultAccount, JSON.stringify(dataArr)); - }; - - setVariablesInterval = () => { - if (!this.interval) { - this.interval = setInterval(async () => { - try { - this.checkPendingTransactions(); - } catch (err) { - console.log('interval error:' + err); - } - }, 3000); - } - }; - - setData = (obj = {}) => { - const self = this; - Object.keys(obj).map(key => { - self[key] = obj[key]; - }); - }; - - // Determine if there is a wallet and login - checkLogin = () => { - if (!this.tronWeb || !this.tronWeb.defaultAddress.base58) { - return false; - } - if (!this.defaultAccount) { - return false; - } - return true; - }; - - initTronLinkWallet = async (cb, cbn) => { - try { - let timeCount = 0; - const self = this; - const tmpTimer1 = setInterval(() => { - timeCount++; - if (timeCount > Config.tronLinkTime) { - self.isConnected = false; - cbn && cbn(); - clearInterval(tmpTimer1); - } - if (window.tronWeb && window.tronWeb.ready) { - if (process.env.REACT_APP_ENV === 'test' || process.env.REACT_APP_ENV === 'qaTest') { - window.tronWeb.setFullNode(Config.chain.fullHost); - window.tronWeb.setSolidityNode(Config.chain.fullHost); - } - const { trongrid } = Config; - - if (trongrid && window.tronWeb.setHeader && window.tronWeb.fullNode.host === trongrid.host) { - window.tronWeb.setHeader({ 'TRON-PRO-API-KEY': trongrid.key }); - } - self.tronWeb = window.tronWeb; - self.defaultAccount = self.tronWeb.defaultAddress.base58; - window.defaultAccount = self.defaultAccount; - self.isConnected = true; - cb && cb(); - this.setVariablesInterval(); // Global scheduled tasks - clearInterval(tmpTimer1); - } - }, 1000); - } catch (e) { - console.log(e); - } - }; - - connectWallet = async () => { - this.setData({ - loginModalVisible: true, - loginModalStep: 1 - }); - }; - - listenTronLink = () => { - window.addEventListener('message', res => { - if (res.data.message && res.data.message.action == 'setAccount') { - if (window.tronWeb) { - if (res.data.message.data.address != this.defaultAccount) { - window.location.reload(); - } - } else { - window.location.reload(); - } - } - if (res.data.message && res.data.message.action == 'setNode') { - window.location.reload(); - } - }); - }; - - changeMenuWidth = () => { - this.setData({ - menuFlag: !this.menuFlag - }); - }; -} diff --git a/demo/tron-dapp-react-demo/src/stores/system.js b/demo/tron-dapp-react-demo/src/stores/system.js deleted file mode 100755 index 10f27018..00000000 --- a/demo/tron-dapp-react-demo/src/stores/system.js +++ /dev/null @@ -1,140 +0,0 @@ -// Libraries -import { observable } from 'mobx'; -import Config from '../config'; - -import { triggerSmartContract, sign, sendRawTransaction, MAX_UINT256 } from '../utils/blockchain'; -import { BigNumber, setTransactionsData } from '../utils/helper'; - -export default class SystemStore { - @observable transModalInfo = { - visible: false, - step: 1, - title: '', - obj: {}, - txId: '', - callbacks: false // Callback after closing the trading window - }; - - constructor(rootStore) { - this.rootStore = rootStore; - } - - openTransModal = newInfo => { - this.transModalInfo.visible = true; - Object.assign(this.transModalInfo, newInfo); - }; - - hideTransModal = () => { - const callbacks = this.transModalInfo.callbacks; - this.transModalInfo = { - visible: false, - step: 1, - title: '', - obj: {}, - txId: '', - callbacks: false - }; - callbacks && this.executeCallback(callbacks, 0); - }; - - trigger = async (address, functionSelector, parameters = [], options = {}, intlObj = {}, callbacks = false) => { - try { - this.openTransModal({ ...intlObj, step: 1 }); - const transaction = await triggerSmartContract( - address, - functionSelector, - Object.assign({ feeLimit: 20 * 1e6 }, options), - parameters - ); - - const signedTransaction = await sign(transaction); - const result = await sendRawTransaction(signedTransaction); - this.openTransModal({ ...intlObj, step: 2, txId: result.transaction.txID }); - if (result && result.result) { - setTransactionsData(result.transaction.txID, intlObj); - } - - callbacks && this.executeCallback(callbacks); - return result; - } catch (error) { - if (error && error.message == 'Confirmation declined by user') { - this.openTransModal({ ...intlObj, step: 3 }); - } - console.log(`trigger error ${address} - ${functionSelector}`, error.message ? error.message : error); - return {}; - } - }; - - approveToken = async (popData, callbacks = false) => { - const intlObj = { - action: 'approve', - title: 'deposit.confirm_approve', - callbacks - }; - const txID = await this.lendApprove(popData, intlObj); - txID && this.hideTransModal(); - return txID; - }; - - lockMortgage = async (contractAddr, jTokens = '', intlObj) => { - intlObj.callbacks = [['lend/hideMortgageModal']]; - const result = await this.trigger( - contractAddr, - 'exitMarket(address)', - [{ type: 'address', value: jTokens }], - {}, - intlObj - ); - return result && result.transaction ? result.transaction.txID : ''; - }; - - transferToken = async (to, value) => { - const intlObj = {}; - console.log(Config.contract.usdt); - const result = await this.trigger( - Config.contract.usdt, - 'transfer(address,uint256)', - [ - { type: 'address', value: to }, - { type: 'uint256', value: value } - ], - {}, - intlObj - ); - return result && result.transaction ? result.transaction.txID : ''; - }; - - setData = (obj = {}) => { - const self = this; - Object.keys(obj).map(key => { - self[key] = obj[key]; - }); - }; - - executeCallback = (args = [], timeout = 5000) => { - args.map(arg => { - let method = arg.shift(); - // Edge case: Skip executing this here so it's only called after an error (via lookForCleanCallBack) - // If the callback is to execute a getter function is better to wait as sometimes the new value is not uopdated instantly when the tx is confirmed - setTimeout(() => { - method = method.split('/'); - if (method[0] === 'system') { - this[method[1]](...arg); - } else { - let object = null; - switch (method[0]) { - case 'network': - object = this.rootStore.network; - break; - case 'dapp': - object = this.rootStore.dapp; - break; - default: - break; - } - object && object[method[1]](...arg); - } - }, timeout); - }); - }; -} diff --git a/demo/tron-dapp-react-demo/src/utils/backend.js b/demo/tron-dapp-react-demo/src/utils/backend.js deleted file mode 100755 index 9c8d1a78..00000000 --- a/demo/tron-dapp-react-demo/src/utils/backend.js +++ /dev/null @@ -1,42 +0,0 @@ -import axios from 'axios'; -import Config from '../config'; -import { BigNumber, randomSleep } from './helper'; -const { service } = Config; -const { host } = service; - -const env = process.env.REACT_APP_ENV; - -export const getUserList = async params => { - try { - // let { data } = await axios.get(url); - return { - success: true, - data: - env === 'test' - ? [ - { - tokenAddress: 'TXYZopYRdj2D9XRtbG411XZZ3kM5VkAeBf', - tokenDecimal: 6, - tokenLogoUrl: 'https://coin.top/production/logo/usdtlogo.png', - tokenName: 'Tether USD', - tokenSymbol: 'USDT', - balance: '--' - } - ] - : [ - { - tokenAddress: 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t', - tokenDecimal: 6, - tokenLogoUrl: 'https://coin.top/production/logo/usdtlogo.png', - tokenName: 'Tether USD', - tokenSymbol: 'USDT', - balance: '--' - } - ] - }; - } catch (error) { - return { - success: false - }; - } -}; diff --git a/demo/tron-dapp-react-demo/src/utils/blockchain.js b/demo/tron-dapp-react-demo/src/utils/blockchain.js deleted file mode 100755 index e8e297dc..00000000 --- a/demo/tron-dapp-react-demo/src/utils/blockchain.js +++ /dev/null @@ -1,124 +0,0 @@ -import TronWeb from 'tronweb'; -import Config from '../config'; - -import { BigNumber, openTransModal, setTransactionsData, randomSleep, myLocal } from './helper'; - -const chain = Config.chain; - -const DATA_LEN = 64; -export const MAX_UINT256 = '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'; -const privateKey = chain.privateKey; - -const mainchain = new TronWeb({ - fullHost: chain.fullHost, - privateKey -}); - -export const triggerSmartContract = async (address, functionSelector, options = {}, parameters = []) => { - try { - const tronweb = window.tronWeb; - const transaction = await tronweb.transactionBuilder.triggerSmartContract( - address, - functionSelector, - Object.assign({ feeLimit: 20 * 1e6 }, options), - parameters - ); - - if (!transaction.result || !transaction.result.result) { - throw new Error('Unknown trigger error: ' + JSON.stringify(transaction.transaction)); - } - return transaction; - } catch (error) { - throw new Error(error); - } -}; - -export const sign = async transaction => { - try { - const tronweb = window.tronWeb; - const signedTransaction = await tronweb.trx.sign(transaction.transaction); - return signedTransaction; - } catch (error) { - console.log(error, 'signerr'); - throw new Error(error); - } -}; - -export const sendRawTransaction = async signedTransaction => { - try { - const tronweb = window.tronWeb; - const result = await tronweb.trx.sendRawTransaction(signedTransaction); - return result; - } catch (error) { - throw new Error(error); - } -}; - -export const view = async (address, functionSelector, parameters = [], isDappTronWeb = true) => { - try { - let tronweb = mainchain; - if (!isDappTronWeb && window.tronWeb && window.tronWeb.ready) { - tronweb = window.tronWeb; - } - const result = await tronweb.transactionBuilder.triggerSmartContract( - address, - functionSelector, - { _isConstant: true }, - parameters - ); - return result && result.result ? result.constant_result : []; - } catch (error) { - console.log(`view error ${address} - ${functionSelector}`, error.message ? error.message : error); - return []; - } -}; - -export const getTrxBalance = async (address, isDappTronWeb = false) => { - try { - let tronWeb = mainchain; - if (!isDappTronWeb && window.tronWeb && window.tronWeb.ready) { - tronWeb = window.tronWeb; - } - const balance = await tronWeb.trx.getBalance(address); - return { - balance: BigNumber(balance).div(Config.defaultPrecision), - success: true - }; - } catch (err) { - console.log(`getPairBalance: ${err}`, address); - return { - balance: BigNumber(0), - success: false - }; - } -}; - -export const getTransactionInfo = tx => { - const tronWeb = mainchain; - return new Promise((resolve, reject) => { - tronWeb.trx.getConfirmedTransaction(tx, (e, r) => { - if (!e) { - resolve(r); - } else { - reject(e, null); - } - }); - }); -}; - -export const getTRC20Balance = async (tokenAddress, userAddress) => { - console.log('params of getbalance: ', userAddress, tokenAddress); - const result = await view(tokenAddress, 'balanceOf(address)', [{ type: 'address', value: userAddress }]); - let value = BigNumber(0); - let success = false; - - if (result.length) { - value = new BigNumber(result[0].slice(0, DATA_LEN), 16); - success = true; - } - - return { - value, - success - }; -}; diff --git a/demo/tron-dapp-react-demo/src/utils/helper.js b/demo/tron-dapp-react-demo/src/utils/helper.js deleted file mode 100755 index 0dcc58ae..00000000 --- a/demo/tron-dapp-react-demo/src/utils/helper.js +++ /dev/null @@ -1,247 +0,0 @@ -import React from 'react'; -import TronWeb from 'tronweb'; -import intl from 'react-intl-universal'; -import moment from 'moment'; -import bigNumber from 'bignumber.js'; -import Config from '../config'; - -const chain = Config.chain; - -const tronWeb = new TronWeb({ - fullHost: chain.fullHost -}); - -bigNumber.config({ EXPONENTIAL_AT: 1e9 }); -bigNumber.prototype._toFixed = function (...arg) { - return new bigNumber(this.toFixed(...arg)).toString(); -}; -bigNumber.prototype._toBg = function () { - return this; -}; -bigNumber.prototype._toHex = function () { - return `0x${this.toString(16)}`; -}; - -export const toBigNumber = tronWeb.toBigNumber; - -// export const BigNumber = tronWeb.BigNumber; -export const BigNumber = bigNumber; - -export const toDecimal = tronWeb.toDecimal; - -export const getTrxBalance = address => { - return tronWeb.trx.getBalance(address); -}; -export const formatNumber = (_num, dp = 2, rm = 1) => { - if (_num === '--') return '--'; - return BigNumber(_num).toFormat(dp, rm); -}; - -export const toFixedDown = (num, decimals = 4) => { - const d = toBigNumber(10).pow(decimals); - return BigNumber(num).times(d).integerValue(BigNumber.ROUND_DOWN).div(d).toFixed(decimals); -}; - -export const fromHex = hexString => { - return tronWeb.address.fromHex(hexString.replace('/^0x/', '41')); -}; - -export const addressToHex = addr => { - return tronWeb.address.toHex(addr); -}; - -export const isAddress = address => { - return tronWeb.isAddress(address); -}; - -export const tronscanAddress = (text, address) => { - return ( - - {text} - - ); -}; - -export const tronscanTX = (text, tx) => { - return ( - - {text} - - ); -}; - -export const copyToClipboard = (e, disBottom = '5px', p = false) => { - let value = ''; - if (p) { - value = document.getElementById(p).title; - } else { - value = e.target.title; - } - value = value.replace(/,/g, ''); - - var aux = document.createElement('input'); - - if (tronWeb.BigNumber.isBigNumber(value)) { - aux.setAttribute('value', toBigNumber(value).valueOf()); - } else { - aux.setAttribute('value', value.valueOf()); - } - - document.body.appendChild(aux); - aux.select(); - document.execCommand('copy'); - document.body.removeChild(aux); - const div = document.createElement('div'); - div.innerHTML = intl.get('account_modal.copied'); - div.className = 'copied-style-sp'; - Object.assign(div.style, { - bottom: disBottom - }); - if (p) { - document.getElementById(p).appendChild(div); - } else { - e.target.appendChild(div); - } - const parent = p ? document.getElementById(p) : e.target; - setTimeout(() => parent.removeChild(div), 1000); -}; - -export const SUPPOER_LOCALES = [ - { - name: 'English', - value: 'en-US' - }, - { - name: '简体中文', - value: 'zh-CN' - } -]; - -export const cutMiddle = (text = '', left = 4, right = 4) => { - if (text.length <= left + right) return text; - return `${text.substr(0, left).trim()}...${text.substr(-right)}`; -}; - -export const numberParser = (str, decimal) => { - str = String(str); - if (!str) return { valid: true, str: '' }; - - let reg = new RegExp(`^(\\d+)(\\.\\d*)?$`); - if (decimal !== undefined) { - reg = new RegExp(`^(\\d+)(\\.\\d{0,${decimal}})?$`); - } - - if (!reg.test(str)) { - return { valid: false, str: '' }; - } else { - return { valid: true, str: str.replace(/^0+(\d)/g, '$1') }; - } -}; - -export const setTransactionsData = (tx, intlObj) => { - let data = window.localStorage.getItem(window.defaultAccount) || '[]'; - let dataArr = JSON.parse(data); - let item = { - title: '', // compatible - intlObj, - tx, - status: 1, // 1: pending, 2: confirmed, 3: failed - checkCnt: 0, - showPending: true - }; - dataArr.unshift(item); - window.localStorage.setItem(window.defaultAccount, JSON.stringify(dataArr.slice(0, 10))); -}; - -export const getParameterByName = (name, url) => { - if (!url) url = window.location.href; - name = name.replace(/[\[\]]/g, '\\$&'); - var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'), - results = regex.exec(url); - if (!results) return null; - if (!results[2]) return ''; - return decodeURIComponent(results[2].replace(/\+/g, ' ')); -}; - -// Get the whole day that the current time corresponds to the zero time zone, that is, zero o'clock millisecond level -export function getUTCDay(unixDateParams) { - let unix = moment(moment.unix(unixDateParams).utc().format('YYYY-MM-DD 00:00:00Z')).unix(); - return unix; -} - -// Get the last minute of the current time as an integer UTC -export function getLastUTCMinutes() { - let unix = moment(moment().subtract(1, 'minutes').format('YYYY-MM-DD HH:mm:00')).utc().unix(); - return unix; -} - -// Get the current minute of the current time One minute rounded up as an integer UTC -export function getCurrentMinutes() { - let unix = moment(moment().format('YYYY-MM-DD HH:mm:00')).utc().unix(); - return unix; -} - -export const randomSleep = (time = 1000) => { - return new Promise((reslove, reject) => { - const timeout = parseInt(Math.random() * time); - setTimeout(() => { - reslove(); - }, timeout); - }); -}; - -export const reTry = async func => { - try { - await randomSleep(1000); - return await func(); - } catch (error) { - // console.log(error); - await randomSleep(3000); - return await reTry(func); - } -}; - -export const addKey = (data = []) => { - data.map((item, index) => { - item.key = index; - }); - return [...data]; -}; - -export const emptyReactNode = () => { - let centerStyle = { - paddingTop: '10%', - paddingBottom: '10%', - position: 'relative' - }; - let imgStyle = { - width: '10%', - maxWidth: '200px', - minWidth: '100px' - }; - let textStyle = { - position: 'absolute', - transform: 'translate(-50%)', - top: '40%', - left: '50%', - color: '#84869E', - fontSize: '12px' - }; - return ( -
-
- {intl.get('no_data')} -
-
- ); -}; diff --git a/demo/tron-dapp-react-demo/src/utils/number.js b/demo/tron-dapp-react-demo/src/utils/number.js deleted file mode 100755 index 4039b616..00000000 --- a/demo/tron-dapp-react-demo/src/utils/number.js +++ /dev/null @@ -1,18 +0,0 @@ -export function toThousands(num) { - let NUM = (num || 0).toString(); - let arr = NUM.split('.'); - let number = (arr[0] || 0).toString(), - result = ''; - while (number.length > 3) { - result = ',' + number.slice(-3) + result; - number = number.slice(0, number.length - 3); - } - if (number) { - if (arr[1]) { - result = number + result + '.' + arr[1]; - } else { - result = number + result; - } - } - return result; -} diff --git a/demo/tronweb-demo/.gitignore b/demo/tronweb-demo/.gitignore deleted file mode 100755 index a8c75992..00000000 --- a/demo/tronweb-demo/.gitignore +++ /dev/null @@ -1,103 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* - -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage -*.lcov - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# TypeScript v1 declaration files -typings/ - -# TypeScript cache -*.tsbuildinfo - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Microbundle cache -.rpt2_cache/ -.rts2_cache_cjs/ -.rts2_cache_es/ -.rts2_cache_umd/ - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file -.env.test - -# parcel-bundler cache (https://parceljs.org/) -.cache - -# Next.js build output -.next - -# Nuxt.js build / generate output -.nuxt -dist - -# Gatsby files -.cache/ -# Comment in the public line in if your project uses Gatsby and *not* Next.js -# https://nextjs.org/blog/next-9-1#public-directory-support -# public - -# vuepress build output -.vuepress/dist - -# Serverless directories -.serverless/ - -# FuseBox cache -.fusebox/ - -# DynamoDB Local files -.dynamodb/ - -# TernJS port file -.tern-port diff --git a/demo/tronweb-demo/LICENSE b/demo/tronweb-demo/LICENSE deleted file mode 100755 index 261eeb9e..00000000 --- a/demo/tronweb-demo/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/demo/tronweb-demo/README.md b/demo/tronweb-demo/README.md deleted file mode 100755 index 02aac3f6..00000000 --- a/demo/tronweb-demo/README.md +++ /dev/null @@ -1,70 +0,0 @@ -# Getting Started with Create React App - -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). - -## Available Scripts - -In the project directory, you can run: - -### `yarn start` - -Runs the app in the development mode.\ -Open [http://localhost:3000](http://localhost:3000) to view it in the browser. - -The page will reload if you make edits.\ -You will also see any lint errors in the console. - -### `yarn test` - -Launches the test runner in the interactive watch mode.\ -See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. - -### `yarn build` - -Builds the app for production to the `build` folder.\ -It correctly bundles React in production mode and optimizes the build for the best performance. - -The build is minified and the filenames include the hashes.\ -Your app is ready to be deployed! - -See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. - -### `yarn eject` - -**Note: this is a one-way operation. Once you `eject`, you can’t go back!** - -If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. - -Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. - -You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. - -## Learn More - -You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). - -To learn React, check out the [React documentation](https://reactjs.org/). - -### Code Splitting - -This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) - -### Analyzing the Bundle Size - -This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) - -### Making a Progressive Web App - -This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) - -### Advanced Configuration - -This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) - -### Deployment - -This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) - -### `yarn build` fails to minify - -This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) diff --git a/demo/tronweb-demo/config-overrides.js b/demo/tronweb-demo/config-overrides.js deleted file mode 100755 index d0cad5e3..00000000 --- a/demo/tronweb-demo/config-overrides.js +++ /dev/null @@ -1,20 +0,0 @@ -const { override, addDecoratorsLegacy, disableEsLint, overrideDevServer, watchAll } = require('customize-cra'); - -const rewiredMap = () => config => { - config.devtool = config.mode === 'development' ? 'cheap-module-source-map' : false; - return config; -}; - -module.exports = { - webpack: override( - // enable legacy decorators babel plugin - addDecoratorsLegacy(), - // usual webpack plugin - disableEsLint(), - rewiredMap() - ), - devServer: overrideDevServer( - // dev server plugin - watchAll() - ) -}; diff --git a/demo/tronweb-demo/package.json b/demo/tronweb-demo/package.json deleted file mode 100755 index 2a1ebdef..00000000 --- a/demo/tronweb-demo/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "tronweb_dapp", - "version": "0.1.0", - "private": true, - "dependencies": { - "@ant-design/icons": "^4.2.1", - "@babel/plugin-proposal-decorators": "^7.10.1", - "@testing-library/jest-dom": "^5.11.4", - "@testing-library/react": "^11.1.0", - "@testing-library/user-event": "^12.1.10", - "cross-env": "^7.0.3", - "customize-cra": "^1.0.0", - "react": "^17.0.1", - "react-app-rewired": "^2.1.6", - "react-dom": "^17.0.1", - "react-scripts": "4.0.1", - "tronweb": "^4.1.0", - "web-vitals": "^0.2.4" - }, - "scripts": { - "start": "PORT=18000 cross-env REACT_APP_ENV=qaTest react-app-rewired start", - "startPro": "PORT=18083 react-app-rewired start", - "startTest": "PORT=18084 cross-env REACT_APP_ENV=qaTest react-app-rewired start", - "build": "react-app-rewired build", - "test": "cross-env REACT_APP_ENV=qaTest react-app-rewired build" - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] - } -} \ No newline at end of file diff --git a/demo/tronweb-demo/public/favicon.ico b/demo/tronweb-demo/public/favicon.ico deleted file mode 100755 index a11777cc..00000000 Binary files a/demo/tronweb-demo/public/favicon.ico and /dev/null differ diff --git a/demo/tronweb-demo/public/index.html b/demo/tronweb-demo/public/index.html deleted file mode 100644 index d9555ad4..00000000 --- a/demo/tronweb-demo/public/index.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - TronWeb Demo - - - -
- - - diff --git a/demo/tronweb-demo/public/logo192.png b/demo/tronweb-demo/public/logo192.png deleted file mode 100755 index fc44b0a3..00000000 Binary files a/demo/tronweb-demo/public/logo192.png and /dev/null differ diff --git a/demo/tronweb-demo/public/logo512.png b/demo/tronweb-demo/public/logo512.png deleted file mode 100755 index a4e47a65..00000000 Binary files a/demo/tronweb-demo/public/logo512.png and /dev/null differ diff --git a/demo/tronweb-demo/public/manifest.json b/demo/tronweb-demo/public/manifest.json deleted file mode 100755 index 080d6c77..00000000 --- a/demo/tronweb-demo/public/manifest.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "short_name": "React App", - "name": "Create React App Sample", - "icons": [ - { - "src": "favicon.ico", - "sizes": "64x64 32x32 24x24 16x16", - "type": "image/x-icon" - }, - { - "src": "logo192.png", - "type": "image/png", - "sizes": "192x192" - }, - { - "src": "logo512.png", - "type": "image/png", - "sizes": "512x512" - } - ], - "start_url": ".", - "display": "standalone", - "theme_color": "#000000", - "background_color": "#ffffff" -} diff --git a/demo/tronweb-demo/public/robots.txt b/demo/tronweb-demo/public/robots.txt deleted file mode 100755 index e9e57dc4..00000000 --- a/demo/tronweb-demo/public/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -# https://www.robotstxt.org/robotstxt.html -User-agent: * -Disallow: diff --git a/demo/tronweb-demo/src/App.css b/demo/tronweb-demo/src/App.css deleted file mode 100755 index 74b5e053..00000000 --- a/demo/tronweb-demo/src/App.css +++ /dev/null @@ -1,38 +0,0 @@ -.App { - text-align: center; -} - -.App-logo { - height: 40vmin; - pointer-events: none; -} - -@media (prefers-reduced-motion: no-preference) { - .App-logo { - animation: App-logo-spin infinite 20s linear; - } -} - -.App-header { - background-color: #282c34; - min-height: 100vh; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: calc(10px + 2vmin); - color: white; -} - -.App-link { - color: #61dafb; -} - -@keyframes App-logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} diff --git a/demo/tronweb-demo/src/App.js b/demo/tronweb-demo/src/App.js deleted file mode 100755 index b48a68f4..00000000 --- a/demo/tronweb-demo/src/App.js +++ /dev/null @@ -1,73 +0,0 @@ -import logo from './logo.svg'; -import './App.css'; - -import React from 'react'; -import './App.css'; - -import TronWeb from 'tronweb' - -// const mainOptions = { -// fullNode: "https://testhttpapi.tronex.io", -// solidityNode: "https://testhttpapi.tronex.io", -// eventServer: "https://testapi.tronex.io" -// } - -// const mainOptions = { -// fullNode: "https://api.shasta.trongrid.io", -// solidityNode: "https://api.shasta.trongrid.io", -// eventServer: "https://api.shasta.trongrid.io" -// } - -const mainOptions = { - fullNode: 'https://api.nileex.io', - solidityNode: 'https://api.nileex.io', - eventServer: 'https://api.nileex.io' - // fullNode: "http://47.252.3.238:8090", - // solidityNode: "http://47.252.3.238:8090", - // eventServer: "http://47.252.3.238:8090" -}; -const privateKey = ''; - -const mainGatewayAddress = 'TFLtPoEtVJBMcj6kZPrQrwEdM3W3shxsBU'; //testnet mainchain -const sideGatewayAddress = 'TRDepx5KoQ8oNbFVZ5sogwUxtdYmATDRgX'; -const sideChainId = '413AF23F37DA0D48234FDD43D89931E98E1144481B'; - -const sideOptions = { - fullNode: 'https://suntest.tronex.io', - solidityNode: 'https://suntest.tronex.io', - eventServer: 'https://suntest.tronex.io', - mainGatewayAddress, - sideGatewayAddress, - sideChainId -}; - -class App extends React.Component { - constructor(props) { - super(props); - this.state = {}; - } - - componentDidMount() { - window.tronWeb1 = new TronWeb(mainOptions.fullNode, mainOptions.solidityNode, mainOptions.eventServer, privateKey); - } - - send = e => {}; - - render() { - return ( -
-
- logo -

- Edit src/App.js and save to reload. -

- - Learn React - -
-
- ); - } -} - -export default App; diff --git a/demo/tronweb-demo/src/App.test.js b/demo/tronweb-demo/src/App.test.js deleted file mode 100755 index 1f03afee..00000000 --- a/demo/tronweb-demo/src/App.test.js +++ /dev/null @@ -1,8 +0,0 @@ -import { render, screen } from '@testing-library/react'; -import App from './App'; - -test('renders learn react link', () => { - render(); - const linkElement = screen.getByText(/learn react/i); - expect(linkElement).toBeInTheDocument(); -}); diff --git a/demo/tronweb-demo/src/index.css b/demo/tronweb-demo/src/index.css deleted file mode 100755 index ec2585e8..00000000 --- a/demo/tronweb-demo/src/index.css +++ /dev/null @@ -1,13 +0,0 @@ -body { - margin: 0; - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', - 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', - sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -code { - font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', - monospace; -} diff --git a/demo/tronweb-demo/src/index.js b/demo/tronweb-demo/src/index.js deleted file mode 100755 index ef2edf8e..00000000 --- a/demo/tronweb-demo/src/index.js +++ /dev/null @@ -1,17 +0,0 @@ -import React from 'react'; -import ReactDOM from 'react-dom'; -import './index.css'; -import App from './App'; -import reportWebVitals from './reportWebVitals'; - -ReactDOM.render( - - - , - document.getElementById('root') -); - -// If you want to start measuring performance in your app, pass a function -// to log results (for example: reportWebVitals(console.log)) -// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals -reportWebVitals(); diff --git a/demo/tronweb-demo/src/logo.svg b/demo/tronweb-demo/src/logo.svg deleted file mode 100755 index 9dfc1c05..00000000 --- a/demo/tronweb-demo/src/logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/demo/tronweb-demo/src/reportWebVitals.js b/demo/tronweb-demo/src/reportWebVitals.js deleted file mode 100755 index 5253d3ad..00000000 --- a/demo/tronweb-demo/src/reportWebVitals.js +++ /dev/null @@ -1,13 +0,0 @@ -const reportWebVitals = onPerfEntry => { - if (onPerfEntry && onPerfEntry instanceof Function) { - import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { - getCLS(onPerfEntry); - getFID(onPerfEntry); - getFCP(onPerfEntry); - getLCP(onPerfEntry); - getTTFB(onPerfEntry); - }); - } -}; - -export default reportWebVitals; diff --git a/demo/tronweb-demo/src/setupTests.js b/demo/tronweb-demo/src/setupTests.js deleted file mode 100755 index 8f2609b7..00000000 --- a/demo/tronweb-demo/src/setupTests.js +++ /dev/null @@ -1,5 +0,0 @@ -// jest-dom adds custom jest matchers for asserting on DOM nodes. -// allows you to do things like: -// expect(element).toHaveTextContent(/react/i) -// learn more: https://github.com/testing-library/jest-dom -import '@testing-library/jest-dom'; diff --git a/package-lock.json b/package-lock.json index 4c2756c6..8115a215 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "6.0.0", "license": "MIT", "dependencies": { + "@babel/plugin-proposal-private-property-in-object": "^7.21.11", "@babel/runtime": "^7.0.0", "@ethersproject/abi": "^5.7.0", "@noble/secp256k1": "^1.7.1", @@ -22,6 +23,7 @@ "lodash": "^4.17.21", "querystring-es3": "^0.2.1", "semver": "^5.6.0", + "typescript": "^5.0.4", "validator": "^13.7.0" }, "devDependencies": { @@ -32,11 +34,14 @@ "@babel/plugin-proposal-private-methods": "^7.18.6", "@babel/plugin-transform-runtime": "^7.0.0", "@babel/preset-env": "^7.20.2", + "@types/validator": "^13.7.17", "babel-loader": "^8.0.2", "babel-plugin-istanbul": "^6.1.1", "babel-plugin-source-map-support": "^2.1.3", "chai": "^4.1.2", "chalk": "^2.4.1", + "eslint": "^8.38.0", + "eslint-import-resolver-typescript": "^3.5.5", "globby": "^13.1.3", "husky": "^7.0.0", "istanbul": "^0.4.5", @@ -56,22 +61,23 @@ "puppeteer": "^13.5.1", "rimraf": "^3.0.2", "source-map-support": "^0.5.19", - "webpack": "^5.75.0", + "ts-loader": "^9.4.3", + "webpack": "^5.78.0", "webpack-cli": "^5.0.1", "webpack-node-externals": "^3.0.0" } }, "node_modules/@adraffy/ens-normalize": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.9.0.tgz", - "integrity": "sha512-iowxq3U30sghZotgl4s/oJRci6WPBfNO5YYgk2cIOMCHr3LeGPcsZjCEr+33Q4N+oV3OABDAtA+pyvWjbvBifQ==" + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.9.2.tgz", + "integrity": "sha512-0h+FrQDqe2Wn+IIGFkTCd4aAwTJ+7834Ek1COohCyV26AXhwQ7WQaz+4F/nLOeVl/3BtWHOHLPsq46V8YB46Eg==" }, "node_modules/@ampproject/remapping": { - "version": "2.2.0", - "dev": true, - "license": "Apache-2.0", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", + "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", "dependencies": { - "@jridgewell/gen-mapping": "^0.1.0", + "@jridgewell/gen-mapping": "^0.3.0", "@jridgewell/trace-mapping": "^0.3.9" }, "engines": { @@ -79,39 +85,39 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.18.6", - "dev": true, - "license": "MIT", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", + "integrity": "sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==", "dependencies": { - "@babel/highlight": "^7.18.6" + "@babel/highlight": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/compat-data": { - "version": "7.21.0", - "dev": true, - "license": "MIT", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.5.tgz", + "integrity": "sha512-4Jc/YuIaYqKnDDz892kPIledykKg12Aw1PYX5i/TY28anJtacvM1Rrr8wbieB9GfEJwlzqT0hUEao0CxEebiDA==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.21.0", - "dev": true, - "license": "MIT", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.5.tgz", + "integrity": "sha512-SBuTAjg91A3eKOvD+bPEz3LlhHZRNu1nFOVts9lzDJTXshHTjII0BAtDS3Y2DAkdZdDKWVZGVwkDfc4Clxn1dg==", "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.21.0", - "@babel/helper-compilation-targets": "^7.20.7", - "@babel/helper-module-transforms": "^7.21.0", - "@babel/helpers": "^7.21.0", - "@babel/parser": "^7.21.0", - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.21.0", - "@babel/types": "^7.21.0", + "@babel/code-frame": "^7.22.5", + "@babel/generator": "^7.22.5", + "@babel/helper-compilation-targets": "^7.22.5", + "@babel/helper-module-transforms": "^7.22.5", + "@babel/helpers": "^7.22.5", + "@babel/parser": "^7.22.5", + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.5", + "@babel/types": "^7.22.5", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -126,13 +132,20 @@ "url": "https://opencollective.com/babel" } }, - "node_modules/@babel/core/node_modules/@babel/generator": { - "version": "7.21.1", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.21.1.tgz", - "integrity": "sha512-1lT45bAYlQhFn/BHivJs43AiW2rg3/UbLyShGfF3C0KmHvO5fSghWd5kBJy30kpRRucGzXStvnnCFniCR2kXAA==", - "dev": true, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/generator": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.5.tgz", + "integrity": "sha512-+lcUbnTRhd0jOewtFSedLyiPsD5tswKkbgcezOqqWFUVNEwoUTlpPOBmvhG7OXWLR4jMdv0czPGH5XbflnD1EA==", "dependencies": { - "@babel/types": "^7.21.0", + "@babel/types": "^7.22.5", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -141,98 +154,69 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/core/node_modules/@babel/helper-compilation-targets": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz", - "integrity": "sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==", - "dev": true, + "node_modules/@babel/helper-annotate-as-pure": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz", + "integrity": "sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==", "dependencies": { - "@babel/compat-data": "^7.20.5", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", - "lru-cache": "^5.1.1", - "semver": "^6.3.0" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" } }, - "node_modules/@babel/core/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.22.5.tgz", + "integrity": "sha512-m1EP3lVOPptR+2DwD125gziZNcmoNSHGmJROKoy87loWUQyJaVXDgpmruWqDARZSmtYQ+Dl25okU8+qhVzuykw==", "dev": true, "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@babel/types": "^7.22.5" }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/core/node_modules/convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true - }, - "node_modules/@babel/core/node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.0", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.18.6", - "dev": true, - "license": "MIT", + "node_modules/@babel/helper-compilation-targets": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.5.tgz", + "integrity": "sha512-Ji+ywpHeuqxB8WDxraCiqR0xfhYjiDE/e6k7FuIaANnoOFxAHskHChz4vA1mJC9Lbm01s1PVAGhQY4FUKSkGZw==", "dependencies": { - "@babel/types": "^7.18.6" + "@babel/compat-data": "^7.22.5", + "@babel/helper-validator-option": "^7.22.5", + "browserslist": "^4.21.3", + "lru-cache": "^5.1.1", + "semver": "^6.3.0" }, "engines": { "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.18.9", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-explode-assignable-expression": "^7.18.6", - "@babel/types": "^7.18.9" - }, - "engines": { - "node": ">=6.9.0" + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "bin": { + "semver": "bin/semver.js" } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.21.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.21.0", - "@babel/helper-member-expression-to-functions": "^7.21.0", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/helper-replace-supers": "^7.20.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0", - "@babel/helper-split-export-declaration": "^7.18.6" + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.5.tgz", + "integrity": "sha512-xkb58MyOYIslxu3gKmVXmjTtUPvBU4odYzbiIQbWwLKIHCsx6UGZGX6F1IznMFVnDdirseUZopzN+ZRt8Xb33Q==", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-function-name": "^7.22.5", + "@babel/helper-member-expression-to-functions": "^7.22.5", + "@babel/helper-optimise-call-expression": "^7.22.5", + "@babel/helper-replace-supers": "^7.22.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.5", + "semver": "^6.3.0" }, "engines": { "node": ">=6.9.0" @@ -241,13 +225,23 @@ "@babel/core": "^7.0.0" } }, + "node_modules/@babel/helper-create-class-features-plugin/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.21.0", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.22.5.tgz", + "integrity": "sha512-1VpEFOIbMRaXyDeUwUfmTIxExLwQ+zkW+Bh5zXpApA3oQedBx9v/updixWxnx/bZpKw7u8VxWjb/qWpIcmPq8A==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "regexpu-core": "^5.3.1" + "@babel/helper-annotate-as-pure": "^7.22.5", + "regexpu-core": "^5.3.1", + "semver": "^6.3.0" }, "engines": { "node": ">=6.9.0" @@ -256,116 +250,141 @@ "@babel/core": "^7.0.0" } }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.18.9", + "node_modules/@babel/helper-create-regexp-features-plugin/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" + "bin": { + "semver": "bin/semver.js" } }, - "node_modules/@babel/helper-explode-assignable-expression": { - "version": "7.18.6", + "node_modules/@babel/helper-define-polyfill-provider": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.0.tgz", + "integrity": "sha512-RnanLx5ETe6aybRi1cO/edaRH+bNYWaryCEmjDDYyNr4wnSzyOp8T0dWipmqVHKEY3AbVKUom50AKSlj1zmKbg==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/types": "^7.18.6" + "@babel/helper-compilation-targets": "^7.17.7", + "@babel/helper-plugin-utils": "^7.16.7", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2", + "semver": "^6.1.2" }, + "peerDependencies": { + "@babel/core": "^7.4.0-0" + } + }, + "node_modules/@babel/helper-define-polyfill-provider/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", + "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.21.0", - "dev": true, - "license": "MIT", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", + "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", "dependencies": { - "@babel/template": "^7.20.7", - "@babel/types": "^7.21.0" + "@babel/template": "^7.22.5", + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.18.6", - "dev": true, - "license": "MIT", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.21.0", - "dev": true, - "license": "MIT", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.22.5.tgz", + "integrity": "sha512-aBiH1NKMG0H2cGZqspNvsaBe6wNGjbJjuLy29aU+eDZjSbbN53BaxlpB02xm9v34pLTZ1nIQPFYn2qMZoa5BQQ==", "dependencies": { - "@babel/types": "^7.21.0" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.18.6", - "dev": true, - "license": "MIT", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz", + "integrity": "sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==", "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.21.2", - "dev": true, - "license": "MIT", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.5.tgz", + "integrity": "sha512-+hGKDt/Ze8GFExiVHno/2dvG5IdstpzCq0y4Qc9OJ25D4q3pKfiIP/4Vp3/JvhDkLKsDK2api3q3fpIgiIF5bw==", "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.20.2", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.19.1", - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.21.2", - "@babel/types": "^7.21.2" + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-module-imports": "^7.22.5", + "@babel/helper-simple-access": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.5", + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.5", + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.18.6", - "dev": true, - "license": "MIT", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz", + "integrity": "sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==", "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.20.2", - "dev": true, - "license": "MIT", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", + "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-remap-async-to-generator": { - "version": "7.18.9", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.5.tgz", + "integrity": "sha512-cU0Sq1Rf4Z55fgz7haOakIyM7+x/uCFwXpLPaeRzfoUtAEAuUZjZvFPjL/rk5rW693dIgn2hng1W7xbT7lWT4g==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-wrap-function": "^7.18.9", - "@babel/types": "^7.18.9" + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-wrap-function": "^7.22.5", + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -375,111 +394,112 @@ } }, "node_modules/@babel/helper-replace-supers": { - "version": "7.20.7", - "dev": true, - "license": "MIT", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.22.5.tgz", + "integrity": "sha512-aLdNM5I3kdI/V9xGNyKSF3X/gTyMUBohTZ+/3QdQKAA9vxIiy12E+8E2HoOP1/DjeqU+g6as35QHJNMDDYpuCg==", "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-member-expression-to-functions": "^7.20.7", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.7", - "@babel/types": "^7.20.7" + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-member-expression-to-functions": "^7.22.5", + "@babel/helper-optimise-call-expression": "^7.22.5", + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.5", + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-simple-access": { - "version": "7.20.2", - "dev": true, - "license": "MIT", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", + "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", "dependencies": { - "@babel/types": "^7.20.2" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.20.0", - "dev": true, - "license": "MIT", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz", + "integrity": "sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==", "dependencies": { - "@babel/types": "^7.20.0" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.18.6", - "dev": true, - "license": "MIT", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.5.tgz", + "integrity": "sha512-thqK5QFghPKWLhAV321lxF95yCg2K3Ob5yw+M3VHWfdia0IkPXUtoLH8x/6Fh486QUvzhb8YOWHChTVen2/PoQ==", "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.19.4", - "dev": true, - "license": "MIT", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.19.1", - "dev": true, - "license": "MIT", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", + "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.21.0", - "dev": true, - "license": "MIT", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz", + "integrity": "sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-wrap-function": { - "version": "7.20.5", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.22.5.tgz", + "integrity": "sha512-bYqLIBSEshYcYQyfks8ewYA8S30yaGSeRslcvKMvoUk6HHPySbxHq9YRi6ghhzEU+yhQv9bP/jXnygkStOcqZw==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-function-name": "^7.19.0", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.20.5", - "@babel/types": "^7.20.5" + "@babel/helper-function-name": "^7.22.5", + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.5", + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.21.0", - "dev": true, - "license": "MIT", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.5.tgz", + "integrity": "sha512-pSXRmfE1vzcUIDFQcSGA5Mr+GxBV9oiRKDuDxXvWQQBCh8HoIjs/2DlDB7H8smac1IVrB9/xdXj2N3Wol9Cr+Q==", "dependencies": { - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.21.0", - "@babel/types": "^7.21.0" + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.5", + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.18.6", - "dev": true, - "license": "MIT", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.5.tgz", + "integrity": "sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==", "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", + "@babel/helper-validator-identifier": "^7.22.5", "chalk": "^2.0.0", "js-tokens": "^4.0.0" }, @@ -488,9 +508,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.21.2", - "dev": true, - "license": "MIT", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.5.tgz", + "integrity": "sha512-DFZMC9LJUG9PLOclRC32G63UXwzqS2koQC8dkx+PLdmt1xSePYpbT/NbsrJy8Q/muXz7o/h/d4A7Fuyixm559Q==", "bin": { "parser": "bin/babel-parser.js" }, @@ -499,11 +519,12 @@ } }, "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.18.6", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.22.5.tgz", + "integrity": "sha512-NP1M5Rf+u2Gw9qfSO4ihjcTGW5zXTi36ITLd4/EoAcEhIZ0yjMqmftDNl3QC19CX7olhrjpyU454g/2W7X0jvQ==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -513,13 +534,14 @@ } }, "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.20.7", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.22.5.tgz", + "integrity": "sha512-31Bb65aZaUwqCbWMnZPduIZxCBngHFlzyN6Dq6KAJjtx+lx6ohKHubc61OomYi7XwVD4Ol0XCVz4h+pYFR048g==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0", - "@babel/plugin-proposal-optional-chaining": "^7.20.7" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", + "@babel/plugin-transform-optional-chaining": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -528,15 +550,14 @@ "@babel/core": "^7.13.0" } }, - "node_modules/@babel/plugin-proposal-async-generator-functions": { - "version": "7.20.7", + "node_modules/@babel/plugin-proposal-class-properties": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz", + "integrity": "sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-remap-async-to-generator": "^7.18.9", - "@babel/plugin-syntax-async-generators": "^7.8.4" + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -545,13 +566,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-class-properties": { + "node_modules/@babel/plugin-proposal-numeric-separator": { "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz", + "integrity": "sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" }, "engines": { "node": ">=6.9.0" @@ -560,29 +582,33 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-class-static-block": { - "version": "7.21.0", + "node_modules/@babel/plugin-proposal-object-rest-spread": { + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz", + "integrity": "sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.21.0", + "@babel/compat-data": "^7.20.5", + "@babel/helper-compilation-targets": "^7.20.7", "@babel/helper-plugin-utils": "^7.20.2", - "@babel/plugin-syntax-class-static-block": "^7.14.5" + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.20.7" }, "engines": { "node": ">=6.9.0" }, "peerDependencies": { - "@babel/core": "^7.12.0" + "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-dynamic-import": { + "node_modules/@babel/plugin-proposal-private-methods": { "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz", + "integrity": "sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-dynamic-import": "^7.8.3" + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -591,13 +617,15 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-export-namespace-from": { - "version": "7.18.9", - "dev": true, - "license": "MIT", + "node_modules/@babel/plugin-proposal-private-property-in-object": { + "version": "7.21.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.11.tgz", + "integrity": "sha512-0QZ8qP/3RLDVBwBFoWAwCtgcDZJVwA5LUJRZU8x2YFfKNuFq161wK3cuGrALu5yiPu+vzwTAg/sMWVNeWeNyaw==", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-create-class-features-plugin": "^7.21.0", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" }, "engines": { "node": ">=6.9.0" @@ -606,58 +634,53 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-json-strings": { + "node_modules/@babel/plugin-proposal-unicode-property-regex": { "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz", + "integrity": "sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-json-strings": "^7.8.3" + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { - "node": ">=6.9.0" + "node": ">=4" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-logical-assignment-operators": { - "version": "7.20.7", + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" - }, - "engines": { - "node": ">=6.9.0" + "@babel/helper-plugin-utils": "^7.8.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.18.6", + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" + "@babel/helper-plugin-utils": "^7.12.13" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-numeric-separator": { - "version": "7.18.6", + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-numeric-separator": "^7.10.4" + "@babel/helper-plugin-utils": "^7.14.5" }, "engines": { "node": ">=6.9.0" @@ -666,108 +689,37 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-object-rest-spread": { - "version": "7.20.7", + "node_modules/@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.20.5", - "@babel/helper-compilation-targets": "^7.20.7", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.20.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-object-rest-spread/node_modules/@babel/helper-compilation-targets": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz", - "integrity": "sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.20.5", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", - "lru-cache": "^5.1.1", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-proposal-object-rest-spread/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/plugin-proposal-optional-catch-binding": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-optional-chaining": { - "version": "7.21.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0", - "@babel/plugin-syntax-optional-chaining": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" + "@babel/helper-plugin-utils": "^7.8.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-private-methods": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz", - "integrity": "sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==", + "node_modules/@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", "dev": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" + "@babel/helper-plugin-utils": "^7.8.3" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-private-property-in-object": { - "version": "7.21.0", + "node_modules/@babel/plugin-syntax-import-assertions": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.22.5.tgz", + "integrity": "sha512-rdV97N7KqsRzeNGoWUOK6yUsWarLjE5Su/Snk9IYPU9CwkWHs4t+rTGOvffTR8XGkJMTAdLfO0xVnXm8wugIJg==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-create-class-features-plugin": "^7.21.0", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -776,49 +728,13 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-unicode-property-regex": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-static-block": { - "version": "7.14.5", + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.22.5.tgz", + "integrity": "sha512-KwvoWDeNKPETmozyFE0P2rOLqh39EoQHNjqizrI5B8Vt0ZNS7M56s7dAiAqbYfiAYOuIzIh96z3iR2ktgu3tEg==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -827,37 +743,13 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-dynamic-import": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-export-namespace-from": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.3" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-import-assertions": { - "version": "7.20.0", + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.19.0" - }, - "engines": { - "node": ">=6.9.0" + "@babel/helper-plugin-utils": "^7.10.4" }, "peerDependencies": { "@babel/core": "^7.0.0-0" @@ -865,8 +757,9 @@ }, "node_modules/@babel/plugin-syntax-json-strings": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -876,8 +769,9 @@ }, "node_modules/@babel/plugin-syntax-logical-assignment-operators": { "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -887,8 +781,9 @@ }, "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -898,8 +793,9 @@ }, "node_modules/@babel/plugin-syntax-numeric-separator": { "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -909,8 +805,9 @@ }, "node_modules/@babel/plugin-syntax-object-rest-spread": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -920,8 +817,9 @@ }, "node_modules/@babel/plugin-syntax-optional-catch-binding": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -931,8 +829,9 @@ }, "node_modules/@babel/plugin-syntax-optional-chaining": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -942,8 +841,8 @@ }, "node_modules/@babel/plugin-syntax-private-property-in-object": { "version": "7.14.5", - "dev": true, - "license": "MIT", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" }, @@ -956,8 +855,9 @@ }, "node_modules/@babel/plugin-syntax-top-level-await": { "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" }, @@ -968,12 +868,29 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-unicode-sets-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz", + "integrity": "sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, "node_modules/@babel/plugin-transform-arrow-functions": { - "version": "7.20.7", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.22.5.tgz", + "integrity": "sha512-26lTNXoVRdAnsaDXPpvCNUq+OVWEVC6bx7Vvz9rC53F2bagUWW4u4ii2+h8Fejfh7RYqPxn+libeFBBck9muEw==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -982,14 +899,16 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-async-to-generator": { - "version": "7.20.7", + "node_modules/@babel/plugin-transform-async-generator-functions": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.22.5.tgz", + "integrity": "sha512-gGOEvFzm3fWoyD5uZq7vVTD57pPJ3PczPUD/xCFGjzBpUosnklmXyKnGQbbbGs1NPNPskFex0j93yKbHt0cHyg==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-remap-async-to-generator": "^7.18.9" + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-remap-async-to-generator": "^7.22.5", + "@babel/plugin-syntax-async-generators": "^7.8.4" }, "engines": { "node": ">=6.9.0" @@ -998,12 +917,15 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-block-scoped-functions": { - "version": "7.18.6", + "node_modules/@babel/plugin-transform-async-to-generator": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.22.5.tgz", + "integrity": "sha512-b1A8D8ZzE/VhNDoV1MSJTnpKkCG5bJo+19R4o4oy03zM7ws8yEMK755j61Dc3EyvdysbqH5BOOTquJ7ZX9C6vQ==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-module-imports": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-remap-async-to-generator": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1012,12 +934,13 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.21.0", + "node_modules/@babel/plugin-transform-block-scoped-functions": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.22.5.tgz", + "integrity": "sha512-tdXZ2UdknEKQWKJP1KMNmuF5Lx3MymtMN/pvA+p/VEkhK8jVcQ1fzSy8KM9qRYhAf2/lV33hoMPKI/xaI9sADA==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1026,20 +949,13 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-classes": { - "version": "7.21.0", + "node_modules/@babel/plugin-transform-block-scoping": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.22.5.tgz", + "integrity": "sha512-EcACl1i5fSQ6bt+YGuU/XGCeZKStLmyVGytWkpyhCLeQVA0eu6Wtiw92V+I1T/hnezUv7j74dA/Ro69gWcU+hg==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-compilation-targets": "^7.20.7", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.21.0", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-replace-supers": "^7.20.7", - "@babel/helper-split-export-declaration": "^7.18.6", - "globals": "^11.1.0" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1048,50 +964,70 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-classes/node_modules/@babel/helper-compilation-targets": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz", - "integrity": "sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==", + "node_modules/@babel/plugin-transform-class-properties": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.22.5.tgz", + "integrity": "sha512-nDkQ0NfkOhPTq8YCLiWNxp1+f9fCobEjCb0n8WdbNUBc4IB5V7P1QnX9IjpSoquKrXF5SKojHleVNs2vGeHCHQ==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.20.5", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", - "lru-cache": "^5.1.1", - "semver": "^6.3.0" + "@babel/helper-create-class-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" }, "peerDependencies": { - "@babel/core": "^7.0.0" + "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-classes/node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "node_modules/@babel/plugin-transform-class-static-block": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.22.5.tgz", + "integrity": "sha512-SPToJ5eYZLxlnp1UzdARpOGeC2GbHvr9d/UV0EukuVx8atktg194oe+C5BqQ8jRTkgLRVOPYeXRSBg1IlMoVRA==", "dev": true, + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-class-static-block": "^7.14.5" + }, "engines": { - "node": ">=4" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.12.0" } }, - "node_modules/@babel/plugin-transform-classes/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" + "node_modules/@babel/plugin-transform-classes": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.22.5.tgz", + "integrity": "sha512-2edQhLfibpWpsVBx2n/GKOz6JdGQvLruZQfGr9l1qes2KQaWswjBzhQF7UDUZMNaMMQeYnQzxwOMPsbYF7wqPQ==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-compilation-targets": "^7.22.5", + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-function-name": "^7.22.5", + "@babel/helper-optimise-call-expression": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-replace-supers": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.5", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, "node_modules/@babel/plugin-transform-computed-properties": { - "version": "7.20.7", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.22.5.tgz", + "integrity": "sha512-4GHWBgRf0krxPX+AaPtgBAlTgTeZmqDynokHOX7aqqAB4tHs3U2Y02zH6ETFdLZGcg9UQSD1WCmkVrE9ErHeOg==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/template": "^7.20.7" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/template": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1101,11 +1037,12 @@ } }, "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.20.7", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.22.5.tgz", + "integrity": "sha512-GfqcFuGW8vnEqTUBM7UtPd5A4q797LTvvwKxXTgRsFjoqaJiEg9deBG6kWeQYkVEL569NpnmpC0Pkr/8BLKGnQ==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1115,12 +1052,13 @@ } }, "node_modules/@babel/plugin-transform-dotall-regex": { - "version": "7.18.6", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.22.5.tgz", + "integrity": "sha512-5/Yk9QxCQCl+sOIB1WelKnVRxTJDSAIxtJLL2/pqL14ZVlbH0fUQUZa/T5/UnQtBNgghR7mfB8ERBKyKPCi7Vw==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-create-regexp-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1130,11 +1068,12 @@ } }, "node_modules/@babel/plugin-transform-duplicate-keys": { - "version": "7.18.9", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.22.5.tgz", + "integrity": "sha512-dEnYD+9BBgld5VBXHnF/DbYGp3fqGMsyxKbtD1mDyIA7AkTSpKXFhCVuj/oQVOoALfBs77DudA0BE4d5mcpmqw==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1143,13 +1082,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.18.6", + "node_modules/@babel/plugin-transform-dynamic-import": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.22.5.tgz", + "integrity": "sha512-0MC3ppTB1AMxd8fXjSrbPa7LT9hrImt+/fcj+Pg5YMD7UQyWp/02+JWpdnCymmsXwIx5Z+sYn1bwCn4ZJNvhqQ==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" }, "engines": { "node": ">=6.9.0" @@ -1158,12 +1098,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-for-of": { - "version": "7.21.0", + "node_modules/@babel/plugin-transform-exponentiation-operator": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.22.5.tgz", + "integrity": "sha512-vIpJFNM/FjZ4rh1myqIya9jXwrwwgFRHPjT3DkUA9ZLHuzox8jiXkOLvwm1H+PQIP3CqfC++WPKeuDi0Sjdj1g==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1172,14 +1114,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-function-name": { - "version": "7.18.9", + "node_modules/@babel/plugin-transform-export-namespace-from": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.22.5.tgz", + "integrity": "sha512-X4hhm7FRnPgd4nDA4b/5V280xCx6oL7Oob5+9qVS5C13Zq4bh1qq7LU0GgRU6b5dBWBvhGaXYVB4AcN6+ol6vg==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-compilation-targets": "^7.18.9", - "@babel/helper-function-name": "^7.18.9", - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" }, "engines": { "node": ">=6.9.0" @@ -1188,40 +1130,77 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-function-name/node_modules/@babel/helper-compilation-targets": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz", - "integrity": "sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==", + "node_modules/@babel/plugin-transform-for-of": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.22.5.tgz", + "integrity": "sha512-3kxQjX1dU9uudwSshyLeEipvrLjBCVthCgeTp6CzE/9JYrlAIaeekVxRpCWsDDfYTfRZRoCeZatCQvwo+wvK8A==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.20.5", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", - "lru-cache": "^5.1.1", - "semver": "^6.3.0" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" }, "peerDependencies": { - "@babel/core": "^7.0.0" + "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-function-name/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "node_modules/@babel/plugin-transform-function-name": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.22.5.tgz", + "integrity": "sha512-UIzQNMS0p0HHiQm3oelztj+ECwFnj+ZRV4KnguvlsD2of1whUeM6o7wGNj6oLwcDoAXQ8gEqfgC24D+VdIcevg==", "dev": true, - "bin": { - "semver": "bin/semver.js" + "dependencies": { + "@babel/helper-compilation-targets": "^7.22.5", + "@babel/helper-function-name": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-json-strings": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.22.5.tgz", + "integrity": "sha512-DuCRB7fu8MyTLbEQd1ew3R85nx/88yMoqo2uPSjevMj3yoN7CDM8jkgrY0wmVxfJZyJ/B9fE1iq7EQppWQmR5A==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-json-strings": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, "node_modules/@babel/plugin-transform-literals": { - "version": "7.18.9", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.22.5.tgz", + "integrity": "sha512-fTLj4D79M+mepcw3dgFBTIDYpbcB9Sm0bpm4ppXPaO+U+PKFFyV9MGRvS0gvGw62sd10kT5lRMKXAADb9pWy8g==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-logical-assignment-operators": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.22.5.tgz", + "integrity": "sha512-MQQOUW1KL8X0cDWfbwYP+TbVbZm16QmQXJQ+vndPtH/BoO0lOKpVoEDMI7+PskYxH+IiE0tS8xZye0qr1lGzSA==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" }, "engines": { "node": ">=6.9.0" @@ -1231,11 +1210,12 @@ } }, "node_modules/@babel/plugin-transform-member-expression-literals": { - "version": "7.18.6", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.22.5.tgz", + "integrity": "sha512-RZEdkNtzzYCFl9SE9ATaUMTj2hqMb4StarOJLrZRbqqU4HSBE7UlBw9WBWQiDzrJZJdUWiMTVDI6Gv/8DPvfew==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1245,12 +1225,13 @@ } }, "node_modules/@babel/plugin-transform-modules-amd": { - "version": "7.20.11", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.22.5.tgz", + "integrity": "sha512-R+PTfLTcYEmb1+kK7FNkhQ1gP4KgjpSO6HfH9+f8/yfp2Nt3ggBjiVpRwmwTlfqZLafYKJACy36yDXlEmI9HjQ==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-module-transforms": "^7.20.11", - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-module-transforms": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1260,13 +1241,14 @@ } }, "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.21.2", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.22.5.tgz", + "integrity": "sha512-B4pzOXj+ONRmuaQTg05b3y/4DuFz3WcCNAXPLb2Q0GT0TrGKGxNKV4jwsXts+StaM0LQczZbOpj8o1DLPDJIiA==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-module-transforms": "^7.21.2", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-simple-access": "^7.20.2" + "@babel/helper-module-transforms": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-simple-access": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1276,14 +1258,15 @@ } }, "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.20.11", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.22.5.tgz", + "integrity": "sha512-emtEpoaTMsOs6Tzz+nbmcePl6AKVtS1yC4YNAeMun9U8YCsgadPNxnOPQ8GhHFB2qdx+LZu9LgoC0Lthuu05DQ==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-module-transforms": "^7.20.11", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-validator-identifier": "^7.19.1" + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-module-transforms": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1293,12 +1276,13 @@ } }, "node_modules/@babel/plugin-transform-modules-umd": { - "version": "7.18.6", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.22.5.tgz", + "integrity": "sha512-+S6kzefN/E1vkSsKx8kmQuqeQsvCKCd1fraCM7zXm4SFoggI099Tr4G8U81+5gtMdUeMQ4ipdQffbKLX0/7dBQ==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-module-transforms": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-module-transforms": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1308,12 +1292,13 @@ } }, "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.20.5", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.22.5.tgz", + "integrity": "sha512-YgLLKmS3aUBhHaxp5hi1WJTgOUb/NCuDHzGT9z9WTt3YG+CPRhJs6nprbStx6DnWM4dh6gt7SU3sZodbZ08adQ==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.20.5", - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-create-regexp-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1323,11 +1308,12 @@ } }, "node_modules/@babel/plugin-transform-new-target": { - "version": "7.18.6", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.22.5.tgz", + "integrity": "sha512-AsF7K0Fx/cNKVyk3a+DW0JLo+Ua598/NxMRvxDnkpCIGFh43+h/v2xyhRUYf6oD8gE4QtL83C7zZVghMjHd+iw==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1336,13 +1322,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-object-super": { - "version": "7.18.6", + "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.22.5.tgz", + "integrity": "sha512-6CF8g6z1dNYZ/VXok5uYkkBBICHZPiGEl7oDnAx2Mt1hlHVHOSIKWJaXHjQJA5VB43KZnXZDIexMchY4y2PGdA==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-replace-supers": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" }, "engines": { "node": ">=6.9.0" @@ -1351,12 +1338,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-parameters": { - "version": "7.20.7", + "node_modules/@babel/plugin-transform-numeric-separator": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.22.5.tgz", + "integrity": "sha512-NbslED1/6M+sXiwwtcAB/nieypGw02Ejf4KtDeMkCEpP6gWFMX1wI9WKYua+4oBneCCEmulOkRpwywypVZzs/g==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" }, "engines": { "node": ">=6.9.0" @@ -1365,12 +1354,17 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-property-literals": { - "version": "7.18.6", + "node_modules/@babel/plugin-transform-object-rest-spread": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.22.5.tgz", + "integrity": "sha512-Kk3lyDmEslH9DnvCDA1s1kkd3YWQITiBOHngOtDL9Pt6BZjzqb6hiOlb8VfjiiQJ2unmegBqZu0rx5RxJb5vmQ==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/compat-data": "^7.22.5", + "@babel/helper-compilation-targets": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1379,13 +1373,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.20.5", + "node_modules/@babel/plugin-transform-object-super": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.22.5.tgz", + "integrity": "sha512-klXqyaT9trSjIUrcsYIfETAzmOEZL3cBYqOYLJxBHfMFFggmXOv+NYSX/Jbs9mzMVESw/WycLFPRx8ba/b2Ipw==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2", - "regenerator-transform": "^0.15.1" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-replace-supers": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1394,12 +1389,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-reserved-words": { - "version": "7.18.6", + "node_modules/@babel/plugin-transform-optional-catch-binding": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.22.5.tgz", + "integrity": "sha512-pH8orJahy+hzZje5b8e2QIlBWQvGpelS76C63Z+jhZKsmzfNaPQ+LaW6dcJ9bxTpo1mtXbgHwy765Ro3jftmUg==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" }, "engines": { "node": ">=6.9.0" @@ -1408,17 +1405,15 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-runtime": { - "version": "7.21.0", + "node_modules/@babel/plugin-transform-optional-chaining": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.22.5.tgz", + "integrity": "sha512-AconbMKOMkyG+xCng2JogMCDcqW8wedQAqpVIL4cOSescZ7+iW8utC6YDZLMCSUIReEA733gzRSaOSXMAt/4WQ==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-plugin-utils": "^7.20.2", - "babel-plugin-polyfill-corejs2": "^0.3.3", - "babel-plugin-polyfill-corejs3": "^0.6.0", - "babel-plugin-polyfill-regenerator": "^0.4.1", - "semver": "^6.3.0" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" }, "engines": { "node": ">=6.9.0" @@ -1427,108 +1422,137 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-runtime/node_modules/@babel/helper-compilation-targets": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz", - "integrity": "sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==", + "node_modules/@babel/plugin-transform-parameters": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.22.5.tgz", + "integrity": "sha512-AVkFUBurORBREOmHRKo06FjHYgjrabpdqRSwq6+C7R5iTCZOsM4QbcB27St0a4U6fffyAOqh3s/qEfybAhfivg==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.20.5", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", - "lru-cache": "^5.1.1", - "semver": "^6.3.0" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" }, "peerDependencies": { - "@babel/core": "^7.0.0" + "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-runtime/node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.3.tgz", - "integrity": "sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww==", + "node_modules/@babel/plugin-transform-private-methods": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.22.5.tgz", + "integrity": "sha512-PPjh4gyrQnGe97JTalgRGMuU4icsZFnWkzicB/fUtzlKUqvsWBKEpPPfr5a2JiyirZkHxnAqkQMO5Z5B2kK3fA==", "dev": true, "dependencies": { - "@babel/helper-compilation-targets": "^7.17.7", - "@babel/helper-plugin-utils": "^7.16.7", - "debug": "^4.1.1", - "lodash.debounce": "^4.0.8", - "resolve": "^1.14.2", - "semver": "^6.1.2" + "@babel/helper-create-class-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { - "@babel/core": "^7.4.0-0" + "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-runtime/node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz", - "integrity": "sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q==", + "node_modules/@babel/plugin-transform-private-property-in-object": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.22.5.tgz", + "integrity": "sha512-/9xnaTTJcVoBtSSmrVyhtSvO3kbqS2ODoh2juEU72c3aYonNF0OMGiaz2gjukyKM2wBBYJP38S4JiE0Wfb5VMQ==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.17.7", - "@babel/helper-define-polyfill-provider": "^0.3.3", - "semver": "^6.1.1" + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-create-class-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-runtime/node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.6.0.tgz", - "integrity": "sha512-+eHqR6OPcBhJOGgsIar7xoAB1GcSwVUA3XjAd7HJNzOXT4wv6/H7KIdA/Nc60cvUlDbKApmqNvD1B1bzOt4nyA==", + "node_modules/@babel/plugin-transform-property-literals": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.22.5.tgz", + "integrity": "sha512-TiOArgddK3mK/x1Qwf5hay2pxI6wCZnvQqrFSqbtg1GLl2JcNMitVH/YnqjP+M31pLUeTfzY1HAXFDnUBV30rQ==", "dev": true, "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.3.3", - "core-js-compat": "^3.25.1" + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-runtime/node_modules/babel-plugin-polyfill-regenerator": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.4.1.tgz", - "integrity": "sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw==", + "node_modules/@babel/plugin-transform-regenerator": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.22.5.tgz", + "integrity": "sha512-rR7KePOE7gfEtNTh9Qw+iO3Q/e4DEsoQ+hdvM6QUDH7JRJ5qxq5AA52ZzBWbI5i9lfNuvySgOGP8ZN7LAmaiPw==", "dev": true, "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.3.3" + "@babel/helper-plugin-utils": "^7.22.5", + "regenerator-transform": "^0.15.1" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-runtime/node_modules/core-js-compat": { - "version": "3.29.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.29.0.tgz", - "integrity": "sha512-ScMn3uZNAFhK2DGoEfErguoiAHhV2Ju+oJo/jK08p7B3f3UhocUrCCkTvnZaiS+edl5nlIoiBXKcwMc6elv4KQ==", + "node_modules/@babel/plugin-transform-reserved-words": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.22.5.tgz", + "integrity": "sha512-DTtGKFRQUDm8svigJzZHzb/2xatPc6TzNvAIJ5GqOKDsGFYgAskjRulbR/vGsPKq3OPqtexnz327qYpP57RFyA==", "dev": true, "dependencies": { - "browserslist": "^4.21.5" + "@babel/helper-plugin-utils": "^7.22.5" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-runtime": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.22.5.tgz", + "integrity": "sha512-bg4Wxd1FWeFx3daHFTWk1pkSWK/AyQuiyAoeZAOkAOUBjnZPH6KT7eMxouV47tQ6hl6ax2zyAWBdWZXbrvXlaw==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "babel-plugin-polyfill-corejs2": "^0.4.3", + "babel-plugin-polyfill-corejs3": "^0.8.1", + "babel-plugin-polyfill-regenerator": "^0.5.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, "node_modules/@babel/plugin-transform-runtime/node_modules/semver": { "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true, - "license": "ISC", "bin": { "semver": "bin/semver.js" } }, "node_modules/@babel/plugin-transform-shorthand-properties": { - "version": "7.18.6", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.22.5.tgz", + "integrity": "sha512-vM4fq9IXHscXVKzDv5itkO1X52SmdFBFcMIBZ2FRn2nqVYqw6dBexUgMvAjHW+KXpPPViD/Yo3GrDEBaRC0QYA==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1538,12 +1562,13 @@ } }, "node_modules/@babel/plugin-transform-spread": { - "version": "7.20.7", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.22.5.tgz", + "integrity": "sha512-5ZzDQIGyvN4w8+dMmpohL6MBo+l2G7tfC/O2Dg7/hjpgeWvUx8FzfeOKxGog9IimPa4YekaQ9PlDqTLOljkcxg==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1553,11 +1578,12 @@ } }, "node_modules/@babel/plugin-transform-sticky-regex": { - "version": "7.18.6", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.22.5.tgz", + "integrity": "sha512-zf7LuNpHG0iEeiyCNwX4j3gDg1jgt1k3ZdXBKbZSoA3BbGQGvMiSvfbZRR3Dr3aeJe3ooWFZxOOG3IRStYp2Bw==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1567,11 +1593,12 @@ } }, "node_modules/@babel/plugin-transform-template-literals": { - "version": "7.18.9", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.22.5.tgz", + "integrity": "sha512-5ciOehRNf+EyUeewo8NkbQiUs4d6ZxiHo6BcBcnFlgiJfu16q0bQUw9Jvo0b0gBKFG1SMhDSjeKXSYuJLeFSMA==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1581,11 +1608,12 @@ } }, "node_modules/@babel/plugin-transform-typeof-symbol": { - "version": "7.18.9", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.22.5.tgz", + "integrity": "sha512-bYkI5lMzL4kPii4HHEEChkD0rkc+nvnlR6+o/qdqR6zrm0Sv/nodmyLhlq2DO0YKLUNd2VePmPRjJXSBh9OIdA==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1595,11 +1623,28 @@ } }, "node_modules/@babel/plugin-transform-unicode-escapes": { - "version": "7.18.10", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.22.5.tgz", + "integrity": "sha512-biEmVg1IYB/raUO5wT1tgfacCef15Fbzhkx493D3urBI++6hpJ+RFG4SrWMn0NEZLfvilqKf3QDrRVZHo08FYg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-property-regex": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.22.5.tgz", + "integrity": "sha512-HCCIb+CbJIAE6sXn5CjFQXMwkCClcOfPCzTlilJ8cUatfzwHlWQkbtV0zD338u9dZskwvuOYTuuaMaA8J5EI5A==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-create-regexp-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1609,12 +1654,13 @@ } }, "node_modules/@babel/plugin-transform-unicode-regex": { - "version": "7.18.6", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.22.5.tgz", + "integrity": "sha512-028laaOKptN5vHJf9/Arr/HiJekMd41hOEZYvNsrsXqJ7YPYuX2bQxh31fkZzGmq3YqHRJzYFFAVYvKfMPKqyg==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-create-regexp-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1623,39 +1669,43 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/preset-env": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.20.2.tgz", - "integrity": "sha512-1G0efQEWR1EHkKvKHqbG+IN/QdgwfByUpM5V5QroDzGV2t3S/WXNQd693cHiHTlCFMpr9B6FkPFXDA2lQcKoDg==", + "node_modules/@babel/plugin-transform-unicode-sets-regex": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.22.5.tgz", + "integrity": "sha512-lhMfi4FC15j13eKrh3DnYHjpGj6UKQHtNKTbtc1igvAhRy4+kLhV07OpLcsN0VgDEw/MjAvJO4BdMJsHwMhzCg==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.20.1", - "@babel/helper-compilation-targets": "^7.20.0", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-validator-option": "^7.18.6", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.18.6", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.18.9", - "@babel/plugin-proposal-async-generator-functions": "^7.20.1", - "@babel/plugin-proposal-class-properties": "^7.18.6", - "@babel/plugin-proposal-class-static-block": "^7.18.6", - "@babel/plugin-proposal-dynamic-import": "^7.18.6", - "@babel/plugin-proposal-export-namespace-from": "^7.18.9", - "@babel/plugin-proposal-json-strings": "^7.18.6", - "@babel/plugin-proposal-logical-assignment-operators": "^7.18.9", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", - "@babel/plugin-proposal-numeric-separator": "^7.18.6", - "@babel/plugin-proposal-object-rest-spread": "^7.20.2", - "@babel/plugin-proposal-optional-catch-binding": "^7.18.6", - "@babel/plugin-proposal-optional-chaining": "^7.18.9", - "@babel/plugin-proposal-private-methods": "^7.18.6", - "@babel/plugin-proposal-private-property-in-object": "^7.18.6", - "@babel/plugin-proposal-unicode-property-regex": "^7.18.6", + "@babel/helper-create-regexp-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/preset-env": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.22.5.tgz", + "integrity": "sha512-fj06hw89dpiZzGZtxn+QybifF07nNiZjZ7sazs2aVDcysAZVGjW7+7iFYxg6GLNM47R/thYfLdrXc+2f11Vi9A==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.22.5", + "@babel/helper-compilation-targets": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-validator-option": "^7.22.5", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.22.5", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.22.5", + "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-class-properties": "^7.12.13", "@babel/plugin-syntax-class-static-block": "^7.14.5", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-export-namespace-from": "^7.8.3", - "@babel/plugin-syntax-import-assertions": "^7.20.0", + "@babel/plugin-syntax-import-assertions": "^7.22.5", + "@babel/plugin-syntax-import-attributes": "^7.22.5", + "@babel/plugin-syntax-import-meta": "^7.10.4", "@babel/plugin-syntax-json-strings": "^7.8.3", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", @@ -1665,44 +1715,61 @@ "@babel/plugin-syntax-optional-chaining": "^7.8.3", "@babel/plugin-syntax-private-property-in-object": "^7.14.5", "@babel/plugin-syntax-top-level-await": "^7.14.5", - "@babel/plugin-transform-arrow-functions": "^7.18.6", - "@babel/plugin-transform-async-to-generator": "^7.18.6", - "@babel/plugin-transform-block-scoped-functions": "^7.18.6", - "@babel/plugin-transform-block-scoping": "^7.20.2", - "@babel/plugin-transform-classes": "^7.20.2", - "@babel/plugin-transform-computed-properties": "^7.18.9", - "@babel/plugin-transform-destructuring": "^7.20.2", - "@babel/plugin-transform-dotall-regex": "^7.18.6", - "@babel/plugin-transform-duplicate-keys": "^7.18.9", - "@babel/plugin-transform-exponentiation-operator": "^7.18.6", - "@babel/plugin-transform-for-of": "^7.18.8", - "@babel/plugin-transform-function-name": "^7.18.9", - "@babel/plugin-transform-literals": "^7.18.9", - "@babel/plugin-transform-member-expression-literals": "^7.18.6", - "@babel/plugin-transform-modules-amd": "^7.19.6", - "@babel/plugin-transform-modules-commonjs": "^7.19.6", - "@babel/plugin-transform-modules-systemjs": "^7.19.6", - "@babel/plugin-transform-modules-umd": "^7.18.6", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.19.1", - "@babel/plugin-transform-new-target": "^7.18.6", - "@babel/plugin-transform-object-super": "^7.18.6", - "@babel/plugin-transform-parameters": "^7.20.1", - "@babel/plugin-transform-property-literals": "^7.18.6", - "@babel/plugin-transform-regenerator": "^7.18.6", - "@babel/plugin-transform-reserved-words": "^7.18.6", - "@babel/plugin-transform-shorthand-properties": "^7.18.6", - "@babel/plugin-transform-spread": "^7.19.0", - "@babel/plugin-transform-sticky-regex": "^7.18.6", - "@babel/plugin-transform-template-literals": "^7.18.9", - "@babel/plugin-transform-typeof-symbol": "^7.18.9", - "@babel/plugin-transform-unicode-escapes": "^7.18.10", - "@babel/plugin-transform-unicode-regex": "^7.18.6", + "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", + "@babel/plugin-transform-arrow-functions": "^7.22.5", + "@babel/plugin-transform-async-generator-functions": "^7.22.5", + "@babel/plugin-transform-async-to-generator": "^7.22.5", + "@babel/plugin-transform-block-scoped-functions": "^7.22.5", + "@babel/plugin-transform-block-scoping": "^7.22.5", + "@babel/plugin-transform-class-properties": "^7.22.5", + "@babel/plugin-transform-class-static-block": "^7.22.5", + "@babel/plugin-transform-classes": "^7.22.5", + "@babel/plugin-transform-computed-properties": "^7.22.5", + "@babel/plugin-transform-destructuring": "^7.22.5", + "@babel/plugin-transform-dotall-regex": "^7.22.5", + "@babel/plugin-transform-duplicate-keys": "^7.22.5", + "@babel/plugin-transform-dynamic-import": "^7.22.5", + "@babel/plugin-transform-exponentiation-operator": "^7.22.5", + "@babel/plugin-transform-export-namespace-from": "^7.22.5", + "@babel/plugin-transform-for-of": "^7.22.5", + "@babel/plugin-transform-function-name": "^7.22.5", + "@babel/plugin-transform-json-strings": "^7.22.5", + "@babel/plugin-transform-literals": "^7.22.5", + "@babel/plugin-transform-logical-assignment-operators": "^7.22.5", + "@babel/plugin-transform-member-expression-literals": "^7.22.5", + "@babel/plugin-transform-modules-amd": "^7.22.5", + "@babel/plugin-transform-modules-commonjs": "^7.22.5", + "@babel/plugin-transform-modules-systemjs": "^7.22.5", + "@babel/plugin-transform-modules-umd": "^7.22.5", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.22.5", + "@babel/plugin-transform-new-target": "^7.22.5", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.22.5", + "@babel/plugin-transform-numeric-separator": "^7.22.5", + "@babel/plugin-transform-object-rest-spread": "^7.22.5", + "@babel/plugin-transform-object-super": "^7.22.5", + "@babel/plugin-transform-optional-catch-binding": "^7.22.5", + "@babel/plugin-transform-optional-chaining": "^7.22.5", + "@babel/plugin-transform-parameters": "^7.22.5", + "@babel/plugin-transform-private-methods": "^7.22.5", + "@babel/plugin-transform-private-property-in-object": "^7.22.5", + "@babel/plugin-transform-property-literals": "^7.22.5", + "@babel/plugin-transform-regenerator": "^7.22.5", + "@babel/plugin-transform-reserved-words": "^7.22.5", + "@babel/plugin-transform-shorthand-properties": "^7.22.5", + "@babel/plugin-transform-spread": "^7.22.5", + "@babel/plugin-transform-sticky-regex": "^7.22.5", + "@babel/plugin-transform-template-literals": "^7.22.5", + "@babel/plugin-transform-typeof-symbol": "^7.22.5", + "@babel/plugin-transform-unicode-escapes": "^7.22.5", + "@babel/plugin-transform-unicode-property-regex": "^7.22.5", + "@babel/plugin-transform-unicode-regex": "^7.22.5", + "@babel/plugin-transform-unicode-sets-regex": "^7.22.5", "@babel/preset-modules": "^0.1.5", - "@babel/types": "^7.20.2", - "babel-plugin-polyfill-corejs2": "^0.3.3", - "babel-plugin-polyfill-corejs3": "^0.6.0", - "babel-plugin-polyfill-regenerator": "^0.4.1", - "core-js-compat": "^3.25.1", + "@babel/types": "^7.22.5", + "babel-plugin-polyfill-corejs2": "^0.4.3", + "babel-plugin-polyfill-corejs3": "^0.8.1", + "babel-plugin-polyfill-regenerator": "^0.5.0", + "core-js-compat": "^3.30.2", "semver": "^6.3.0" }, "engines": { @@ -1712,106 +1779,32 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/preset-env/node_modules/@babel/helper-compilation-targets": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz", - "integrity": "sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==", + "node_modules/@babel/preset-env/node_modules/@babel/plugin-proposal-private-property-in-object": { + "version": "7.21.0-placeholder-for-preset-env.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", + "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==", "dev": true, - "dependencies": { - "@babel/compat-data": "^7.20.5", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", - "lru-cache": "^5.1.1", - "semver": "^6.3.0" - }, "engines": { "node": ">=6.9.0" }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/preset-env/node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.3.tgz", - "integrity": "sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww==", - "dev": true, - "dependencies": { - "@babel/helper-compilation-targets": "^7.17.7", - "@babel/helper-plugin-utils": "^7.16.7", - "debug": "^4.1.1", - "lodash.debounce": "^4.0.8", - "resolve": "^1.14.2", - "semver": "^6.1.2" - }, - "peerDependencies": { - "@babel/core": "^7.4.0-0" - } - }, - "node_modules/@babel/preset-env/node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz", - "integrity": "sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.17.7", - "@babel/helper-define-polyfill-provider": "^0.3.3", - "semver": "^6.1.1" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/preset-env/node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.6.0.tgz", - "integrity": "sha512-+eHqR6OPcBhJOGgsIar7xoAB1GcSwVUA3XjAd7HJNzOXT4wv6/H7KIdA/Nc60cvUlDbKApmqNvD1B1bzOt4nyA==", - "dev": true, - "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.3.3", - "core-js-compat": "^3.25.1" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/preset-env/node_modules/babel-plugin-polyfill-regenerator": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.4.1.tgz", - "integrity": "sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw==", - "dev": true, - "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.3.3" - }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/preset-env/node_modules/core-js-compat": { - "version": "3.29.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.29.0.tgz", - "integrity": "sha512-ScMn3uZNAFhK2DGoEfErguoiAHhV2Ju+oJo/jK08p7B3f3UhocUrCCkTvnZaiS+edl5nlIoiBXKcwMc6elv4KQ==", - "dev": true, - "dependencies": { - "browserslist": "^4.21.5" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" - } - }, "node_modules/@babel/preset-env/node_modules/semver": { "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true, - "license": "ISC", "bin": { "semver": "bin/semver.js" } }, "node_modules/@babel/preset-modules": { "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", + "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.0.0", "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", @@ -1823,23 +1816,16 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/preset-modules/node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/@babel/regjsgen": { "version": "0.8.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@babel/regjsgen/-/regjsgen-0.8.0.tgz", + "integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==", + "dev": true }, "node_modules/@babel/runtime": { - "version": "7.21.0", - "license": "MIT", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.5.tgz", + "integrity": "sha512-ecjvYlnAaZ/KVneE/OdKYBYfgXV3Ptu6zQWmgEF7vwKhQnvVS6bjMD2XYgj+SNvQ1GfK/pjgokfPkC/2CO8CuA==", "dependencies": { "regenerator-runtime": "^0.13.11" }, @@ -1848,31 +1834,31 @@ } }, "node_modules/@babel/template": { - "version": "7.20.7", - "dev": true, - "license": "MIT", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", + "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7" + "@babel/code-frame": "^7.22.5", + "@babel/parser": "^7.22.5", + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.21.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.21.1", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.21.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.21.2", - "@babel/types": "^7.21.2", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.5.tgz", + "integrity": "sha512-7DuIjPgERaNo6r+PZwItpjCZEa5vyw4eJGufeLxrPdBXBoLcCJCIasvK6pK/9DVNrLZTLFhUGqaC6X/PA007TQ==", + "dependencies": { + "@babel/code-frame": "^7.22.5", + "@babel/generator": "^7.22.5", + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-function-name": "^7.22.5", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.5", + "@babel/parser": "^7.22.5", + "@babel/types": "^7.22.5", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -1880,71 +1866,124 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/traverse/node_modules/@babel/generator": { - "version": "7.21.1", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.21.1.tgz", - "integrity": "sha512-1lT45bAYlQhFn/BHivJs43AiW2rg3/UbLyShGfF3C0KmHvO5fSghWd5kBJy30kpRRucGzXStvnnCFniCR2kXAA==", - "dev": true, + "node_modules/@babel/types": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.5.tgz", + "integrity": "sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==", "dependencies": { - "@babel/types": "^7.21.0", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.5", + "to-fast-properties": "^2.0.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/traverse/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "node_modules/@colors/colors": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "dev": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/@discoveryjs/json-ext": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", + "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", + "dev": true, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", "dev": true, "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "eslint-visitor-keys": "^3.3.0" }, "engines": { - "node": ">=6.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, - "node_modules/@babel/traverse/node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "node_modules/@eslint-community/regexpp": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.1.tgz", + "integrity": "sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==", "dev": true, "engines": { - "node": ">=4" + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, - "node_modules/@babel/types": { - "version": "7.21.2", + "node_modules/@eslint/eslintrc": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz", + "integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.5.2", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" }, "engines": { - "node": ">=6.9.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/@colors/colors": { - "version": "1.5.0", + "node_modules/@eslint/eslintrc/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", "dev": true, - "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, "engines": { - "node": ">=0.1.90" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@discoveryjs/json-ext": { - "version": "0.5.7", + "node_modules/@eslint/eslintrc/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@eslint/js": { + "version": "8.42.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.42.0.tgz", + "integrity": "sha512-6SWlXpWU5AvId8Ac7zjzmIOqMOba/JWY8XZ4A7q7Gn1Vlfg/SFFIlrtHXt9nPn4op9ZPAkl91Jao+QQv3r/ukw==", "dev": true, - "license": "MIT", "engines": { - "node": ">=10.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@ethersproject/abi": { @@ -2321,67 +2360,72 @@ "@ethersproject/strings": "^5.7.0" } }, - "node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", + "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", "dev": true, - "license": "ISC", "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.5" }, "engines": { - "node": ">=8" + "node": ">=10.10.0" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true, "engines": { - "node": ">=6" + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "node_modules/@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", "dev": true, "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" }, "engines": { "node": ">=8" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true, - "engines": { - "node": ">=8.0.0" - } - }, "node_modules/@istanbuljs/schema": { "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.1.1", - "dev": true, - "license": "MIT", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", "dependencies": { - "@jridgewell/set-array": "^1.0.0", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" }, "engines": { "node": ">=6.0.0" @@ -2389,58 +2433,76 @@ }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.0", - "dev": true, - "license": "MIT", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/set-array": { "version": "1.1.2", - "dev": true, - "license": "MIT", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", "engines": { "node": ">=6.0.0" } }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", + "node_modules/@jridgewell/source-map": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.3.tgz", + "integrity": "sha512-b+fsZXeLYi9fEULmfBrhxn4IrPlINf8fiNarzTof004v3lFdntdwa9PF7vFJqm3mg7s+ScJMxXaE3Acp1irZcg==", "dev": true, - "license": "MIT" + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.17", - "dev": true, - "license": "MIT", + "version": "0.3.18", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", + "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", "dependencies": { "@jridgewell/resolve-uri": "3.1.0", "@jridgewell/sourcemap-codec": "1.4.14" } }, + "node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" + }, "node_modules/@noble/hashes": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.1.2.tgz", + "integrity": "sha512-KYRCASVTv6aeUi1tsF8/vpyR7zpfs3FUzy2Jqm+MU+LmUKhQ0y2FpfwqkCcxSg2ua4GALJd8k2R76WxwZGbQpA==", "funding": [ { "type": "individual", "url": "https://paulmillr.com/funding/" } - ], - "license": "MIT" + ] }, "node_modules/@noble/secp256k1": { "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-1.7.1.tgz", + "integrity": "sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==", "funding": [ { "type": "individual", "url": "https://paulmillr.com/funding/" } - ], - "license": "MIT" + ] }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, - "license": "MIT", "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -2451,16 +2513,18 @@ }, "node_modules/@nodelib/fs.stat": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, - "license": "MIT", "engines": { "node": ">= 8" } }, "node_modules/@nodelib/fs.walk": { "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, - "license": "MIT", "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -2469,23 +2533,42 @@ "node": ">= 8" } }, - "node_modules/@nodelib/fs.walk/node_modules/fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "node_modules/@pkgr/utils": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.1.tgz", + "integrity": "sha512-JOqwkgFEyi+OROIyq7l4Jy28h/WwhDnG/cPkXG2Z1iFbubB6jsHW1NDvmyOzTBxHr3yg68YGirmh1JUgMqa+9w==", "dev": true, "dependencies": { - "reusify": "^1.0.4" + "cross-spawn": "^7.0.3", + "fast-glob": "^3.2.12", + "is-glob": "^4.0.3", + "open": "^9.1.0", + "picocolors": "^1.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" } }, + "node_modules/@pkgr/utils/node_modules/tslib": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", + "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", + "dev": true + }, "node_modules/@socket.io/component-emitter": { "version": "3.1.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz", + "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==", + "dev": true }, "node_modules/@tronweb3/google-protobuf": { "version": "3.21.2", - "license": "(BSD-3-Clause AND Apache-2.0)" + "resolved": "https://registry.npmjs.org/@tronweb3/google-protobuf/-/google-protobuf-3.21.2.tgz", + "integrity": "sha512-IVcT2GfWX3K6tHUVhs14NP5uzKhQt4KeDya1g9ACxuZsUzsaoGUIGzceK2Ltu7xp1YV94AaHOf4yxLAivlvEkQ==" }, "node_modules/@types/cookie": { "version": "0.4.1", @@ -2503,9 +2586,10 @@ } }, "node_modules/@types/eslint": { - "version": "8.21.1", + "version": "8.40.2", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.40.2.tgz", + "integrity": "sha512-PRVjQ4Eh9z9pmmtaq8nTjZjQwKFk7YIHIud3lRoKRBgUQjgjRmoGxxGEPXQkF+lH7QkHJRNr5F4aBgYCW0lqpQ==", "dev": true, - "license": "MIT", "dependencies": { "@types/estree": "*", "@types/json-schema": "*" @@ -2513,172 +2597,205 @@ }, "node_modules/@types/eslint-scope": { "version": "3.7.4", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz", + "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", "dev": true, - "license": "MIT", "dependencies": { "@types/eslint": "*", "@types/estree": "*" } }, "node_modules/@types/estree": { - "version": "0.0.51", - "dev": true, - "license": "MIT" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz", + "integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==", + "dev": true }, "node_modules/@types/json-schema": { - "version": "7.0.11", + "version": "7.0.12", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz", + "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==", + "dev": true + }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true, - "license": "MIT" + "peer": true }, "node_modules/@types/node": { - "version": "18.14.6", - "dev": true, - "license": "MIT" + "version": "18.15.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", + "integrity": "sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==" + }, + "node_modules/@types/validator": { + "version": "13.7.17", + "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.7.17.tgz", + "integrity": "sha512-aqayTNmeWrZcvnG2MG9eGYI6b7S5fl+yKgPs6bAjOTwPS316R5SxBGKvtSExfyoJU7pIeHJfsHI0Ji41RVMkvQ==", + "dev": true }, "node_modules/@types/yauzl": { "version": "2.10.0", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", "dev": true, - "license": "MIT", "optional": true, "dependencies": { "@types/node": "*" } }, "node_modules/@webassemblyjs/ast": { - "version": "1.11.1", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", + "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", "dev": true, - "license": "MIT", "dependencies": { - "@webassemblyjs/helper-numbers": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1" + "@webassemblyjs/helper-numbers": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6" } }, "node_modules/@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.1", - "dev": true, - "license": "MIT" + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", + "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", + "dev": true }, "node_modules/@webassemblyjs/helper-api-error": { - "version": "1.11.1", - "dev": true, - "license": "MIT" + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", + "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", + "dev": true }, "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.11.1", - "dev": true, - "license": "MIT" + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", + "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==", + "dev": true }, "node_modules/@webassemblyjs/helper-numbers": { - "version": "1.11.1", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", + "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", "dev": true, - "license": "MIT", "dependencies": { - "@webassemblyjs/floating-point-hex-parser": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", + "@webassemblyjs/floating-point-hex-parser": "1.11.6", + "@webassemblyjs/helper-api-error": "1.11.6", "@xtuc/long": "4.2.2" } }, "node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.1", - "dev": true, - "license": "MIT" + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", + "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", + "dev": true }, "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.11.1", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", + "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==", "dev": true, - "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1" + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/wasm-gen": "1.11.6" } }, "node_modules/@webassemblyjs/ieee754": { - "version": "1.11.1", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", + "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", "dev": true, - "license": "MIT", "dependencies": { "@xtuc/ieee754": "^1.2.0" } }, "node_modules/@webassemblyjs/leb128": { - "version": "1.11.1", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", + "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", "dev": true, - "license": "Apache-2.0", "dependencies": { "@xtuc/long": "4.2.2" } }, "node_modules/@webassemblyjs/utf8": { - "version": "1.11.1", - "dev": true, - "license": "MIT" + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", + "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", + "dev": true }, "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.11.1", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz", + "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==", "dev": true, - "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/helper-wasm-section": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-opt": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", - "@webassemblyjs/wast-printer": "1.11.1" + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/helper-wasm-section": "1.11.6", + "@webassemblyjs/wasm-gen": "1.11.6", + "@webassemblyjs/wasm-opt": "1.11.6", + "@webassemblyjs/wasm-parser": "1.11.6", + "@webassemblyjs/wast-printer": "1.11.6" } }, "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.11.1", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz", + "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==", "dev": true, - "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" } }, "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.11.1", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz", + "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==", "dev": true, - "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1" + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/wasm-gen": "1.11.6", + "@webassemblyjs/wasm-parser": "1.11.6" } }, "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.11.1", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz", + "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==", "dev": true, - "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-api-error": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" } }, "node_modules/@webassemblyjs/wast-printer": { - "version": "1.11.1", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz", + "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==", "dev": true, - "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/ast": "1.11.6", "@xtuc/long": "4.2.2" } }, "node_modules/@webpack-cli/configtest": { - "version": "2.0.1", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz", + "integrity": "sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==", "dev": true, - "license": "MIT", "engines": { "node": ">=14.15.0" }, @@ -2688,9 +2805,10 @@ } }, "node_modules/@webpack-cli/info": { - "version": "2.0.1", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.2.tgz", + "integrity": "sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==", "dev": true, - "license": "MIT", "engines": { "node": ">=14.15.0" }, @@ -2700,9 +2818,10 @@ } }, "node_modules/@webpack-cli/serve": { - "version": "2.0.1", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.5.tgz", + "integrity": "sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=14.15.0" }, @@ -2718,13 +2837,15 @@ }, "node_modules/@xtuc/ieee754": { "version": "1.2.0", - "dev": true, - "license": "BSD-3-Clause" + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true }, "node_modules/@xtuc/long": { "version": "4.2.2", - "dev": true, - "license": "Apache-2.0" + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true }, "node_modules/abbrev": { "version": "1.0.9", @@ -2745,69 +2866,260 @@ "node": ">= 0.6" } }, - "node_modules/aes-js": { - "version": "4.0.0-beta.3", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.3.tgz", - "integrity": "sha512-/xJX0/VTPcbc5xQE2VUP91y1xN8q/rDfhEzLm+vLc3hYvb5+qHCnpJRuFcrKn63zumK/sCwYYzhG8HP78JYSTA==" - }, - "node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "node_modules/acorn": { + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.9.0.tgz", + "integrity": "sha512-jaVNAFBHNLXspO543WnNNPZFRtavh3skAkITqD0/2aeMkKZTN+254PyhwxFYrk3vQ1xfY+2wbesJMs/JC8/PwQ==", "dev": true, + "bin": { + "acorn": "bin/acorn" + }, "engines": { - "node": ">=6" + "node": ">=0.4.0" } }, - "node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "node_modules/acorn-import-assertions": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", + "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" + "peerDependencies": { + "acorn": "^8" } }, - "node_modules/ansi-styles/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, - "dependencies": { - "color-name": "1.1.3" + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/ansi-styles/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true + "node_modules/aes-js": { + "version": "4.0.0-beta.5", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", + "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==" }, - "node_modules/arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==", + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", "dev": true, + "dependencies": { + "debug": "4" + }, "engines": { - "node": ">=0.10.0" + "node": ">= 6.0.0" } }, - "node_modules/assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, - "engines": { - "node": "*" + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==", + "node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.4.2" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-includes": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz", + "integrity": "sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "get-intrinsic": "^1.1.3", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", + "integrity": "sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flatmap": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", + "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==", "dev": true, "engines": { "node": ">=0.10.0" @@ -2819,6 +3131,31 @@ "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==", "dev": true }, + "node_modules/atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true, + "bin": { + "atob": "bin/atob.js" + }, + "engines": { + "node": ">= 4.5.0" + } + }, + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/axios": { "version": "0.26.1", "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", @@ -2862,6 +3199,54 @@ "node": ">=8" } }, + "node_modules/babel-plugin-polyfill-corejs2": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.3.tgz", + "integrity": "sha512-bM3gHc337Dta490gg+/AseNB9L4YLHxq1nGKZZSHbhXv4aTYU2MD2cjza1Ru4S6975YLTaL1K8uJf6ukJhhmtw==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.17.7", + "@babel/helper-define-polyfill-provider": "^0.4.0", + "semver": "^6.1.1" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/babel-plugin-polyfill-corejs2/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/babel-plugin-polyfill-corejs3": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.1.tgz", + "integrity": "sha512-ikFrZITKg1xH6pLND8zT14UPgjKHiGLqex7rGEZCH2EvhsneJaJPemmpQaIZV5AL03II+lXylw3UmddDK8RU5Q==", + "dev": true, + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.4.0", + "core-js-compat": "^3.30.1" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/babel-plugin-polyfill-regenerator": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.0.tgz", + "integrity": "sha512-hDJtKjMLVa7Z+LwnTCxoDLQj6wdc+B8dun7ayF2fYieI6OzfuvcLMB32ihJZ4UhCBwNYGl5bg/x/P9cMdnkc2g==", + "dev": true, + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.4.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/babel-plugin-source-map-support": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/babel-plugin-source-map-support/-/babel-plugin-source-map-support-2.2.0.tgz", @@ -2871,6 +3256,12 @@ "@babel/helper-module-imports": "^7.16.7" } }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, "node_modules/base": { "version": "0.11.2", "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", @@ -2901,6 +3292,26 @@ "node": ">=0.10.0" } }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/base64id": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", @@ -2910,6 +3321,24 @@ "node": "^4.5.0 || >= 5.9" } }, + "node_modules/big-integer": { + "version": "1.6.51", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", + "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true, + "engines": { + "node": "*" + } + }, "node_modules/bignumber.js": { "version": "9.1.1", "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz", @@ -2918,20 +3347,40 @@ "node": "*" } }, - "node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" - }, - "node_modules/body-parser": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", - "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true, - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.5", - "debug": "2.6.9", + "engines": { + "node": ">=8" + } + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + }, + "node_modules/body-parser": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", + "dev": true, + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", "depd": "2.0.0", "destroy": "1.2.0", "http-errors": "2.0.0", @@ -2947,24 +3396,6 @@ "npm": "1.2.8000 || >= 1.4.16" } }, - "node_modules/body-parser/node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/body-parser/node_modules/content-type": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/body-parser/node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -2974,57 +3405,32 @@ "ms": "2.0.0" } }, - "node_modules/body-parser/node_modules/destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "dev": true, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/body-parser/node_modules/http-errors": { + "node_modules/body-parser/node_modules/ms": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dev": true, - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true }, - "node_modules/body-parser/node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "node_modules/bplist-parser": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", + "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==", "dev": true, "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" + "big-integer": "^1.6.44" }, "engines": { - "node": ">=0.10.0" + "node": ">= 5.10.0" } }, - "node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/body-parser/node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "engines": { - "node": ">= 0.8" + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, "node_modules/braces": { @@ -3039,18 +3445,6 @@ "node": ">=8" } }, - "node_modules/braces/node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/brorand": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", @@ -3063,10 +3457,9 @@ "dev": true }, "node_modules/browserslist": { - "version": "4.21.5", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz", - "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==", - "dev": true, + "version": "4.21.9", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.9.tgz", + "integrity": "sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==", "funding": [ { "type": "opencollective", @@ -3075,13 +3468,17 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { - "caniuse-lite": "^1.0.30001449", - "electron-to-chromium": "^1.4.284", - "node-releases": "^2.0.8", - "update-browserslist-db": "^1.0.10" + "caniuse-lite": "^1.0.30001503", + "electron-to-chromium": "^1.4.431", + "node-releases": "^2.0.12", + "update-browserslist-db": "^1.0.11" }, "bin": { "browserslist": "cli.js" @@ -3090,12 +3487,75 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", + "dev": true + }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, + "node_modules/bundle-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz", + "integrity": "sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==", + "dev": true, + "dependencies": { + "run-applescript": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/cache-base": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", @@ -3116,11 +3576,41 @@ "node": ">=0.10.0" } }, - "node_modules/caniuse-lite": { - "version": "1.0.30001464", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001464.tgz", - "integrity": "sha512-oww27MtUmusatpRpCGSOneQk2/l5czXANDSFvsc7VuOQ86s3ANhZetpwXNf1zY/zdfP63Xvjz325DAdAoES13g==", + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001503", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001503.tgz", + "integrity": "sha512-Sf9NiF+wZxPfzv8Z3iS0rXM1Do+iOy2Lxvib38glFX+08TCYYYGR5fRJXk4d77C4AYwhUjgYgMsMudbh2TqCKw==", "funding": [ { "type": "opencollective", @@ -3129,6 +3619,10 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ] }, @@ -3154,7 +3648,6 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -3200,33 +3693,6 @@ "fsevents": "~2.3.2" } }, - "node_modules/chokidar/node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/chokidar/node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/chokidar/node_modules/glob-parent": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", @@ -3239,6 +3705,21 @@ "node": ">= 6" } }, + "node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true + }, + "node_modules/chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "dev": true, + "engines": { + "node": ">=6.0" + } + }, "node_modules/class-utils": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", @@ -3337,6 +3818,31 @@ "node": ">=0.10.0" } }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", @@ -3351,27 +3857,43 @@ } }, "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" + "color-name": "1.1.3" } }, "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" }, "node_modules/colorette": { - "version": "2.0.19", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", - "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true + }, + "node_modules/colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", "dev": true }, "node_modules/component-emitter": { @@ -3410,63 +3932,26 @@ "ms": "2.0.0" } }, - "node_modules/connect/node_modules/ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "dev": true - }, - "node_modules/connect/node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/connect/node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "dev": true - }, - "node_modules/connect/node_modules/finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", - "dev": true, - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "statuses": "~1.5.0", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/connect/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, - "node_modules/connect/node_modules/on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", "dev": true, - "dependencies": { - "ee-first": "1.1.1" - }, "engines": { - "node": ">= 0.8" + "node": ">= 0.6" } }, + "node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==" + }, "node_modules/cookie": { "version": "0.4.2", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", @@ -3485,6 +3970,19 @@ "node": ">=0.10.0" } }, + "node_modules/core-js-compat": { + "version": "3.31.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.31.0.tgz", + "integrity": "sha512-hM7YCu1cU6Opx7MXNu0NuumM0ezNeAeRKadixyiQELWY3vT3De9S4J5ZBMraWV2vZnrE1Cirl0GtFtDtMUXzPw==", + "dev": true, + "dependencies": { + "browserslist": "^4.21.5" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, "node_modules/cors": { "version": "2.8.5", "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", @@ -3498,6 +3996,15 @@ "node": ">= 0.10" } }, + "node_modules/cross-fetch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", + "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", + "dev": true, + "dependencies": { + "node-fetch": "2.6.7" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -3512,26 +4019,25 @@ "node": ">= 8" } }, - "node_modules/cross-spawn/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "node_modules/custom-event": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", + "integrity": "sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg==", + "dev": true + }, + "node_modules/date-format": { + "version": "4.0.14", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.14.tgz", + "integrity": "sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==", "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, "engines": { - "node": ">= 8" + "node": ">=4.0" } }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, "dependencies": { "ms": "2.1.2" }, @@ -3544,6 +4050,27 @@ } } }, + "node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/decode-uri-component": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", + "dev": true, + "engines": { + "node": ">=0.10" + } + }, "node_modules/deep-eql": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", @@ -3556,6 +4083,88 @@ "node": ">=6" } }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "node_modules/default-browser": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-4.0.0.tgz", + "integrity": "sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==", + "dev": true, + "dependencies": { + "bundle-name": "^3.0.0", + "default-browser-id": "^3.0.0", + "execa": "^7.1.1", + "titleize": "^3.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser-id": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-3.0.0.tgz", + "integrity": "sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==", + "dev": true, + "dependencies": { + "bplist-parser": "^0.2.0", + "untildify": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-lazy-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-properties": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "dev": true, + "peer": true, + "dependencies": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "dependencies": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/depd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", @@ -3565,6 +4174,31 @@ "node": ">= 0.8" } }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "dev": true, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/devtools-protocol": { + "version": "0.0.981744", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.981744.tgz", + "integrity": "sha512-0cuGS8+jhR67Fy7qG3i3Pc7Aw494sb9yG9QgpG97SFVWwolgYjlhJg7n+UaHxOQT30d1TYu/EYe9k01ivLErIg==", + "dev": true + }, "node_modules/di": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz", @@ -3592,6 +4226,18 @@ "node": ">=8" } }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/dom-serialize": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", @@ -3604,29 +4250,31 @@ "void-elements": "^2.0.0" } }, - "node_modules/dom-serialize/node_modules/custom-event": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", - "integrity": "sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg==", - "dev": true + "node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.0.1" + } }, - "node_modules/dom-serialize/node_modules/ent": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", - "integrity": "sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA==", + "node_modules/edge-launcher": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/edge-launcher/-/edge-launcher-1.2.2.tgz", + "integrity": "sha512-JcD5WBi3BHZXXVSSeEhl6sYO8g5cuynk/hifBzds2Bp4JdzCGLNMHgMCKu5DvrO1yatMgF0goFsxXRGus0yh1g==", "dev": true }, - "node_modules/dom-serialize/node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.325", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.325.tgz", - "integrity": "sha512-K1C03NT4I7BuzsRdCU5RWkgZxtswnKDYM6/eMhkEXqKu4e5T+ck610x3FPzu1y7HVFSiQKZqP16gnJzPpji1TQ==", - "dev": true + "version": "1.4.432", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.432.tgz", + "integrity": "sha512-yz3U/khQgAFT2HURJA3/F4fKIyO2r5eK09BQzBZFd6BvBSSaRuzKc2ZNBHtJcO75/EKiRYbVYJZ2RB0P4BuD2g==" }, "node_modules/elliptic": { "version": "6.5.4", @@ -3647,9 +4295,42 @@ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" }, - "node_modules/engine.io": { - "version": "6.4.2", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.4.2.tgz", + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/engine.io": { + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.4.2.tgz", "integrity": "sha512-FKn/3oMiJjrOEOeUub2WCox6JhxBXq/Zn3fZOMCBxKnNYtsdKjxhl7yR3fZhM9PV+rdE75SU5SYMc+2PGzo+Tg==", "dev": true, "dependencies": { @@ -3669,9 +4350,9 @@ } }, "node_modules/engine.io-parser": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.6.tgz", - "integrity": "sha512-tjuoZDMAdEhVnSFleYPCtdL2GXwVTGtNjoeJd9IhIG3C1xs9uwxqRNEu5WpnDZCaozwVlK/nuQhpodhXSIMaxw==", + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.7.tgz", + "integrity": "sha512-P+jDFbvK6lE3n1OL+q9KuzdOFWkkZ/cMV9gol/SbVfpyqfvrfrFTOFJ6fQm2VC3PZHlU3QPhVwmbsCnauHF2MQ==", "dev": true, "engines": { "node": ">=10.0.0" @@ -3698,10 +4379,30 @@ } } }, + "node_modules/enhanced-resolve": { + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", + "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/ent": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", + "integrity": "sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA==", + "dev": true + }, "node_modules/envinfo": { "version": "7.8.1", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", + "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", "dev": true, - "license": "MIT", "bin": { "envinfo": "dist/cli.js" }, @@ -3709,11 +4410,122 @@ "node": ">=4" } }, + "node_modules/es-abstract": { + "version": "1.21.2", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.2.tgz", + "integrity": "sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg==", + "dev": true, + "peer": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-set-tostringtag": "^2.0.1", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.2.0", + "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.5", + "is-array-buffer": "^3.0.2", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.10", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.3", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.4.3", + "safe-regex-test": "^1.0.0", + "string.prototype.trim": "^1.2.7", + "string.prototype.trimend": "^1.0.6", + "string.prototype.trimstart": "^1.0.6", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.9" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-module-lexer": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.3.0.tgz", + "integrity": "sha512-vZK7T0N2CBmBOixhmjdqx2gWVbFZ4DXZ/NyRMZVlJXPa7CyFS+/a4QQsDGDQy9ZfEzxFuNEsMLeQJnKP2p5/JA==", + "dev": true + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", + "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "dev": true, + "peer": true, + "dependencies": { + "get-intrinsic": "^1.1.3", + "has": "^1.0.3", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-shim-unscopables": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", + "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "dev": true, + "peer": true, + "dependencies": { + "has": "^1.0.3" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "peer": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "dev": true + }, "node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, "engines": { "node": ">=0.8.0" } @@ -3749,533 +4561,653 @@ "node": ">=0.10.0" } }, - "node_modules/escodegen/node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "node_modules/escodegen/node_modules/levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", "dev": true, + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.8.0" } }, - "node_modules/esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A==", + "node_modules/escodegen/node_modules/optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" + "dependencies": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.8.0" } }, - "node_modules/ethers": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.2.0.tgz", - "integrity": "sha512-F/RiSDU8d7k9wpt6iMfJyGSuHM3/FmzjZwQkGwfLxLj5aaoAagjBMIyAg96FL2LJEerRHBRenTep6+bF48Ei1w==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/ethers-io/" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], + "node_modules/escodegen/node_modules/prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/escodegen/node_modules/type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", + "dev": true, "dependencies": { - "@adraffy/ens-normalize": "1.9.0", - "@noble/hashes": "1.1.2", - "@noble/secp256k1": "1.7.1", - "aes-js": "4.0.0-beta.3", - "tslib": "2.4.0", - "ws": "8.5.0" + "prelude-ls": "~1.1.2" }, "engines": { - "node": ">=14.0.0" + "node": ">= 0.8.0" } }, - "node_modules/eventemitter3": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", - "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==" - }, - "node_modules/events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "node_modules/eslint": { + "version": "8.42.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.42.0.tgz", + "integrity": "sha512-ulg9Ms6E1WPf67PHaEY4/6E2tEn5/f7FXGzr3t9cBMugOmf1INYvuUwwh1aXQN4MfJ6a5K2iNwP3w4AColvI9A==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.4.0", + "@eslint/eslintrc": "^2.0.3", + "@eslint/js": "8.42.0", + "@humanwhocodes/config-array": "^0.11.10", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.0", + "eslint-visitor-keys": "^3.4.1", + "espree": "^9.5.2", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, "engines": { - "node": ">=0.8.x" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA==", + "node_modules/eslint-import-resolver-node": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz", + "integrity": "sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==", "dev": true, + "peer": true, "dependencies": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" + "debug": "^3.2.7", + "is-core-module": "^2.11.0", + "resolve": "^1.22.1" } }, - "node_modules/expand-brackets/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, + "peer": true, "dependencies": { - "ms": "2.0.0" + "ms": "^2.1.1" } }, - "node_modules/expand-brackets/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "node_modules/eslint-import-resolver-typescript": { + "version": "3.5.5", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.5.5.tgz", + "integrity": "sha512-TdJqPHs2lW5J9Zpe17DZNQuDnox4xo2o+0tE7Pggain9Rbc19ik8kFtXdxZ250FVx2kF4vlt2RSf4qlUpG7bhw==", "dev": true, "dependencies": { - "is-descriptor": "^0.1.0" + "debug": "^4.3.4", + "enhanced-resolve": "^5.12.0", + "eslint-module-utils": "^2.7.4", + "get-tsconfig": "^4.5.0", + "globby": "^13.1.3", + "is-core-module": "^2.11.0", + "is-glob": "^4.0.3", + "synckit": "^0.8.5" }, "engines": { - "node": ">=0.10.0" + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts/projects/eslint-import-resolver-ts" + }, + "peerDependencies": { + "eslint": "*", + "eslint-plugin-import": "*" } }, - "node_modules/expand-brackets/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "node_modules/eslint-module-utils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", + "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", "dev": true, "dependencies": { - "is-extendable": "^0.1.0" + "debug": "^3.2.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } } }, - "node_modules/expand-brackets/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" + "ms": "^2.1.1" } }, - "node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "node_modules/eslint-plugin-import": { + "version": "2.27.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz", + "integrity": "sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==", "dev": true, + "peer": true, "dependencies": { - "is-buffer": "^1.1.5" + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "array.prototype.flatmap": "^1.3.1", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.7", + "eslint-module-utils": "^2.7.4", + "has": "^1.0.3", + "is-core-module": "^2.11.0", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.values": "^1.1.6", + "resolve": "^1.22.1", + "semver": "^6.3.0", + "tsconfig-paths": "^3.14.1" }, "engines": { - "node": ">=0.10.0" + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" } }, - "node_modules/expand-brackets/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, + "peer": true, "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" + "ms": "^2.1.1" } }, - "node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, + "peer": true, "dependencies": { - "is-buffer": "^1.1.5" + "esutils": "^2.0.2" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/expand-brackets/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "node_modules/eslint-plugin-import/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" + "peer": true, + "bin": { + "semver": "bin/semver.js" } }, - "node_modules/expand-brackets/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "node_modules/eslint-scope": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", + "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, "engines": { - "node": ">=0.10.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/expand-brackets/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "node_modules/eslint-visitor-keys": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", + "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/expand-brackets/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/expand-brackets/node_modules/snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "node_modules/eslint/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "dependencies": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "node_modules/eslint/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, - "node_modules/fast-glob": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "node_modules/eslint/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=8.6.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "node_modules/eslint/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "dependencies": { - "is-glob": "^4.0.1" + "color-name": "~1.1.4" }, "engines": { - "node": ">= 6" + "node": ">=7.0.0" } }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "node_modules/eslint/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/fastest-levenshtein": { - "version": "1.0.16", - "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", - "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", + "node_modules/eslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, "engines": { - "node": ">= 4.9.1" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/find-cache-dir": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", - "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "node_modules/eslint/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" }, "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/find-cache-dir/node_modules/commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", - "dev": true - }, - "node_modules/findup-sync": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", - "integrity": "sha512-vs+3unmJT45eczmcAZ6zMJtxN3l/QXeccaXQx5cu/MeJMhewVfoWZqibRkOxPnmoR59+Zy5hjabfQc6JLSah4g==", + "node_modules/eslint/node_modules/globals": { + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", "dev": true, "dependencies": { - "detect-file": "^1.0.0", - "is-glob": "^3.1.0", - "micromatch": "^3.0.4", - "resolve-dir": "^1.0.1" + "type-fest": "^0.20.2" }, "engines": { - "node": ">= 0.10" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/findup-sync/node_modules/arr-diff": { + "node_modules/eslint/node_modules/has-flag": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/findup-sync/node_modules/arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "node_modules/eslint/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, - "engines": { - "node": ">=0.10.0" + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/findup-sync/node_modules/array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==", + "node_modules/eslint/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/findup-sync/node_modules/braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "node_modules/eslint/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "dependencies": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" + "yocto-queue": "^0.1.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/findup-sync/node_modules/braces/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "node_modules/eslint/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "dependencies": { - "is-extendable": "^0.1.0" + "p-limit": "^3.0.2" }, "engines": { - "node": ">=0.10.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/findup-sync/node_modules/braces/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "node_modules/eslint/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/findup-sync/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "node_modules/espree": { + "version": "9.5.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz", + "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==", "dev": true, "dependencies": { - "ms": "2.0.0" + "acorn": "^8.8.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/findup-sync/node_modules/define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "node_modules/esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A==", "dev": true, - "dependencies": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/findup-sync/node_modules/detect-file": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", - "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==", + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">=0.10" } }, - "node_modules/findup-sync/node_modules/extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" + "estraverse": "^5.2.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=4.0" } }, - "node_modules/findup-sync/node_modules/extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "dependencies": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, "engines": { - "node": ">=0.10.0" + "node": ">=4.0" } }, - "node_modules/findup-sync/node_modules/extglob/node_modules/define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ethers": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.6.0.tgz", + "integrity": "sha512-7D2U+n8eZYmh592VZqap9vBu50jN7YUDHqAmwBYTMntmUKC9RVgcqcFbd+3DTCOQ1jMyK6QHv1usbcfgiGaHOA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/ethers-io/" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], "dependencies": { - "is-descriptor": "^1.0.0" + "@adraffy/ens-normalize": "1.9.2", + "@noble/hashes": "1.1.2", + "@noble/secp256k1": "1.7.1", + "@types/node": "18.15.13", + "aes-js": "4.0.0-beta.5", + "tslib": "2.4.0", + "ws": "8.5.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=14.0.0" } }, - "node_modules/findup-sync/node_modules/extglob/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "node_modules/eventemitter3": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", + "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==" + }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/execa": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-7.1.1.tgz", + "integrity": "sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q==", "dev": true, "dependencies": { - "is-extendable": "^0.1.0" + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.1", + "human-signals": "^4.3.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^3.0.7", + "strip-final-newline": "^3.0.0" }, "engines": { - "node": ">=0.10.0" + "node": "^14.18.0 || ^16.14.0 || >=18.0.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/findup-sync/node_modules/extglob/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "node_modules/execa/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/findup-sync/node_modules/fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==", + "node_modules/expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA==", "dev": true, "dependencies": { + "debug": "^2.3.3", + "define-property": "^0.2.5", "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/findup-sync/node_modules/fill-range/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "node_modules/expand-brackets/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" + "ms": "2.0.0" } }, - "node_modules/findup-sync/node_modules/fill-range/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "node_modules/expand-brackets/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, "engines": { "node": ">=0.10.0" } }, - "node_modules/findup-sync/node_modules/fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==", + "node_modules/expand-brackets/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", "dev": true, "dependencies": { - "map-cache": "^0.2.2" + "is-extendable": "^0.1.0" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/findup-sync/node_modules/is-accessor-descriptor": { + "node_modules/expand-brackets/node_modules/is-accessor-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", "integrity": "sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", @@ -4287,7 +5219,7 @@ "node": ">=0.10.0" } }, - "node_modules/findup-sync/node_modules/is-accessor-descriptor/node_modules/kind-of": { + "node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", @@ -4299,7 +5231,7 @@ "node": ">=0.10.0" } }, - "node_modules/findup-sync/node_modules/is-data-descriptor": { + "node_modules/expand-brackets/node_modules/is-data-descriptor": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", "integrity": "sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", @@ -4311,7 +5243,7 @@ "node": ">=0.10.0" } }, - "node_modules/findup-sync/node_modules/is-data-descriptor/node_modules/kind-of": { + "node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", @@ -4323,106 +5255,95 @@ "node": ">=0.10.0" } }, - "node_modules/findup-sync/node_modules/is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw==", + "node_modules/expand-brackets/node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "dev": true, "dependencies": { - "is-extglob": "^2.1.0" + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/findup-sync/node_modules/is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", + "node_modules/expand-brackets/node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, "engines": { "node": ">=0.10.0" } }, - "node_modules/findup-sync/node_modules/is-number/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "node_modules/expand-brackets/node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, "engines": { "node": ">=0.10.0" } }, - "node_modules/findup-sync/node_modules/micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "node_modules/expand-brackets/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", "dev": true, "dependencies": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" + "homedir-polyfill": "^1.0.1" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/findup-sync/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "dev": true }, - "node_modules/findup-sync/node_modules/snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", "dev": true, "dependencies": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/findup-sync/node_modules/snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "node_modules/extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", "dev": true, "dependencies": { + "array-unique": "^0.3.2", "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/findup-sync/node_modules/snapdragon-node/node_modules/define-property": { + "node_modules/extglob/node_modules/define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", @@ -4434,19 +5355,7 @@ "node": ">=0.10.0" } }, - "node_modules/findup-sync/node_modules/snapdragon/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", - "dev": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/findup-sync/node_modules/snapdragon/node_modules/extend-shallow": { + "node_modules/extglob/node_modules/extend-shallow": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", @@ -4458,21 +5367,7 @@ "node": ">=0.10.0" } }, - "node_modules/findup-sync/node_modules/snapdragon/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/findup-sync/node_modules/snapdragon/node_modules/is-extendable": { + "node_modules/extglob/node_modules/is-extendable": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", @@ -4481,61 +5376,536 @@ "node": ">=0.10.0" } }, - "node_modules/findup-sync/node_modules/snapdragon/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "node_modules/extract-zip": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" + }, + "bin": { + "extract-zip": "cli.js" + }, + "engines": { + "node": ">= 10.17.0" + }, + "optionalDependencies": { + "@types/yauzl": "^2.9.1" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "node_modules/fastest-levenshtein": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", + "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", + "dev": true, + "engines": { + "node": ">= 4.9.1" + } + }, + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "dev": true, + "dependencies": { + "pend": "~1.2.0" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "dev": true, + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/finalhandler/node_modules/on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", + "dev": true, + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/find-cache-dir": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "dev": true, + "dependencies": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/avajs/find-cache-dir?sponsor=1" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/findup-sync": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", + "integrity": "sha512-vs+3unmJT45eczmcAZ6zMJtxN3l/QXeccaXQx5cu/MeJMhewVfoWZqibRkOxPnmoR59+Zy5hjabfQc6JLSah4g==", + "dev": true, + "dependencies": { + "detect-file": "^1.0.0", + "is-glob": "^3.1.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/findup-sync/node_modules/braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "dev": true, + "dependencies": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, "engines": { "node": ">=0.10.0" } }, - "node_modules/findup-sync/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "node_modules/findup-sync/node_modules/braces/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/findup-sync/node_modules/fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==", + "dev": true, + "dependencies": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/findup-sync/node_modules/fill-range/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/findup-sync/node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/findup-sync/node_modules/is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/findup-sync/node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/findup-sync/node_modules/is-number/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/findup-sync/node_modules/micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/findup-sync/node_modules/to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==", + "dev": true, + "dependencies": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "bin": { + "flat": "cli.js" + } + }, + "node_modules/flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "dependencies": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "dev": true + }, + "node_modules/follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "peer": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, + "node_modules/for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==", + "dev": true, + "dependencies": { + "map-cache": "^0.2.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fs-access": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz", + "integrity": "sha512-05cXDIwNbFaoFWaz5gNHlUTbH5whiss/hr/ibzPd4MH3cR4w0ZKeIPiVdbyJurg3O5r/Bjpvn9KOb1/rPMf3nA==", + "dev": true, + "dependencies": { + "null-check": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true + }, + "node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=0.10.0" + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/findup-sync/node_modules/to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==", + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/function.prototype.name": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", "dev": true, + "peer": true, "dependencies": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "peer": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } + "node": ">=6.9.0" } }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } }, "node_modules/get-func-name": { "version": "2.0.0", @@ -4546,6 +5916,74 @@ "node": "*" } }, + "node_modules/get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-tsconfig": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.6.0.tgz", + "integrity": "sha512-lgbo68hHTQnFddybKbbs/RDRJnJT5YyGy2kQzVwbq+g67X73i+5MVTval34QxGkOe9X5Ujf1UYpCaphLyltjEg==", + "dev": true, + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, "node_modules/get-value": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", @@ -4571,6 +6009,38 @@ "node": "*" } }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true + }, + "node_modules/global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dev": true, + "dependencies": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/global-prefix": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", @@ -4587,22 +6057,46 @@ "node": ">=0.10.0" } }, - "node_modules/global-prefix/node_modules/expand-tilde": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", + "node_modules/global-prefix/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "dependencies": { - "homedir-polyfill": "^1.0.1" + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "peer": true, + "dependencies": { + "define-properties": "^1.1.3" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/globby": { - "version": "13.1.3", - "resolved": "https://registry.npmjs.org/globby/-/globby-13.1.3.tgz", - "integrity": "sha512-8krCNHXvlCgHDpegPzleMq07yMYTO2sXKASmZmquEYWEmCx6J5UTRbp5RwMJkTJGtcQ44YpiUYUiN0b9mzy8Bw==", + "version": "13.1.4", + "resolved": "https://registry.npmjs.org/globby/-/globby-13.1.4.tgz", + "integrity": "sha512-iui/IiiW+QrJ1X1hKH5qwlMQyv34wJAYwH1vrf8b9kBA4sNiif3gKsMHa+BrdnOpEudWjpotfa7LrTzB1ERS/g==", "dev": true, "dependencies": { "dir-glob": "^3.0.1", @@ -4618,10 +6112,29 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "peer": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, "node_modules/handlebars": { @@ -4654,6 +6167,61 @@ "node": ">=0.10.0" } }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "peer": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dev": true, + "peer": true, + "dependencies": { + "get-intrinsic": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", @@ -4666,6 +6234,22 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "peer": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", @@ -4762,11 +6346,42 @@ "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", "dev": true, - "dependencies": { - "parse-passwd": "^1.0.0" - }, + "dependencies": { + "parse-passwd": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dev": true, + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-errors/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">= 0.8" } }, "node_modules/http-proxy": { @@ -4789,6 +6404,28 @@ "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", "dev": true }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/human-signals": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", + "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==", + "dev": true, + "engines": { + "node": ">=14.18.0" + } + }, "node_modules/husky": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/husky/-/husky-7.0.4.tgz", @@ -4804,18 +6441,77 @@ "url": "https://github.com/sponsors/typicode" } }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/ignore": { "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", "dev": true, - "license": "MIT", "engines": { "node": ">= 4" } }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-fresh/node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/import-local": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", "dev": true, - "license": "MIT", "dependencies": { "pkg-dir": "^4.2.0", "resolve-cwd": "^3.0.0" @@ -4830,10 +6526,20 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, "node_modules/inflight": { "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "dev": true, - "license": "ISC", "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -4841,7 +6547,8 @@ }, "node_modules/inherits": { "version": "2.0.4", - "license": "ISC" + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "node_modules/ini": { "version": "1.3.8", @@ -4851,20 +6558,38 @@ }, "node_modules/injectpromise": { "version": "1.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/injectpromise/-/injectpromise-1.0.0.tgz", + "integrity": "sha512-qNq5wy4qX4uWHcVFOEU+RqZkoVG65FhvGkyDWbuBxILMjK6A1LFf5A1mgXZkD4nRx5FCorD81X/XvPKp/zVfPA==" + }, + "node_modules/internal-slot": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", + "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", + "dev": true, + "peer": true, + "dependencies": { + "get-intrinsic": "^1.2.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } }, "node_modules/interpret": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", + "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=10.13.0" } }, "node_modules/is-accessor-descriptor": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, - "license": "MIT", "dependencies": { "kind-of": "^6.0.0" }, @@ -4872,10 +6597,39 @@ "node": ">=0.10.0" } }, + "node_modules/is-array-buffer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "peer": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-binary-path": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, - "license": "MIT", "dependencies": { "binary-extensions": "^2.0.0" }, @@ -4883,24 +6637,47 @@ "node": ">=8" } }, - "node_modules/is-binary-path/node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, "engines": { - "node": ">=8" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-buffer": { "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "dev": true, - "license": "MIT" + "peer": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/is-core-module": { - "version": "2.11.0", + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", + "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", "dev": true, - "license": "MIT", "dependencies": { "has": "^1.0.3" }, @@ -4908,33 +6685,39 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-core-module/node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "node_modules/is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "dependencies": { - "function-bind": "^1.1.1" + "kind-of": "^6.0.0" }, "engines": { - "node": ">= 0.4.0" + "node": ">=0.10.0" } }, - "node_modules/is-data-descriptor": { - "version": "1.0.0", + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", "dev": true, - "license": "MIT", + "peer": true, "dependencies": { - "kind-of": "^6.0.0" + "has-tostringtag": "^1.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-descriptor": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, - "license": "MIT", "dependencies": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", @@ -4946,8 +6729,9 @@ }, "node_modules/is-docker": { "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", "dev": true, - "license": "MIT", "bin": { "is-docker": "cli.js" }, @@ -4958,75 +6742,248 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-extendable": { - "version": "1.0.1", + "node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dev": true, + "dependencies": { + "is-docker": "^3.0.0" + }, + "bin": { + "is-inside-container": "cli.js" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-inside-container/node_modules/is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "dev": true, + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "peer": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "dev": true, - "license": "MIT", + "peer": true, "dependencies": { - "is-plain-object": "^2.0.4" + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-extglob": { - "version": "2.1.1", + "node_modules/is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" + "peer": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-fullwidth-code-point": { + "node_modules/is-stream": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", "dev": true, - "license": "MIT", "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-glob": { - "version": "4.0.3", + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", "dev": true, - "license": "MIT", + "peer": true, "dependencies": { - "is-extglob": "^2.1.1" + "has-tostringtag": "^1.0.0" }, "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-plain-obj": { - "version": "2.1.0", + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", "dev": true, - "license": "MIT", + "peer": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, "engines": { - "node": ">=8" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-plain-object": { - "version": "2.0.4", + "node_modules/is-typed-array": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", + "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", "dev": true, - "license": "MIT", + "peer": true, "dependencies": { - "isobject": "^3.0.1" + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-unicode-supported": { "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -5034,18 +6991,33 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-windows": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/is-wsl": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", "dev": true, - "license": "MIT", "dependencies": { "is-docker": "^2.0.0" }, @@ -5061,8 +7033,9 @@ }, "node_modules/isbinaryfile": { "version": "4.0.10", + "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.10.tgz", + "integrity": "sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==", "dev": true, - "license": "MIT", "engines": { "node": ">= 8.0.0" }, @@ -5072,13 +7045,15 @@ }, "node_modules/isexe": { "version": "2.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true }, "node_modules/isobject": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -5111,8 +7086,9 @@ }, "node_modules/istanbul-lib-coverage": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=8" } @@ -5177,10 +7153,34 @@ "node": ">=8" } }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-source-maps/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/istanbul-reports": { "version": "3.1.5", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", + "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" @@ -5189,29 +7189,26 @@ "node": ">=8" } }, - "node_modules/istanbul-reports/node_modules/html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true - }, "node_modules/istanbul/node_modules/has-flag": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/istanbul/node_modules/resolve": { "version": "1.1.7", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg==", + "dev": true }, "node_modules/istanbul/node_modules/supports-color": { "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^1.0.0" }, @@ -5219,6 +7216,56 @@ "node": ">=0.8.0" } }, + "node_modules/istanbul/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "dev": true, + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/jest-worker/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, "node_modules/js-sha3": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", @@ -5226,8 +7273,8 @@ }, "node_modules/js-tokens": { "version": "4.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "node_modules/js-yaml": { "version": "3.14.1", @@ -5242,15 +7289,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/js-yaml/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, "node_modules/js-yaml/node_modules/esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", @@ -5266,8 +7304,8 @@ }, "node_modules/jsesc": { "version": "2.5.2", - "dev": true, - "license": "MIT", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "bin": { "jsesc": "bin/jsesc" }, @@ -5277,18 +7315,26 @@ }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true }, "node_modules/json-schema-traverse": { "version": "0.4.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true }, "node_modules/json5": { "version": "2.2.3", - "dev": true, - "license": "MIT", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "bin": { "json5": "lib/cli.js" }, @@ -5323,8 +7369,9 @@ }, "node_modules/jsonwebtoken/node_modules/lru-cache": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, - "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -5333,9 +7380,10 @@ } }, "node_modules/jsonwebtoken/node_modules/semver": { - "version": "7.3.8", + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", + "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", "dev": true, - "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" }, @@ -5348,47 +7396,35 @@ }, "node_modules/jsonwebtoken/node_modules/yallist": { "version": "4.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true }, "node_modules/jwa": { "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", "dev": true, - "license": "MIT", "dependencies": { "buffer-equal-constant-time": "1.0.1", "ecdsa-sig-formatter": "1.0.11", "safe-buffer": "^5.0.1" } }, - "node_modules/jwa/node_modules/buffer-equal-constant-time": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", - "dev": true - }, - "node_modules/jwa/node_modules/ecdsa-sig-formatter": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", - "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.0.1" - } - }, "node_modules/jws": { "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", "dev": true, - "license": "MIT", "dependencies": { "jwa": "^1.4.1", "safe-buffer": "^5.0.1" } }, "node_modules/karma": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/karma/-/karma-6.4.1.tgz", - "integrity": "sha512-Cj57NKOskK7wtFWSlMvZf459iX+kpYIPXmkNUzP2WAFcA7nhr/ALn5R7sw3w+1udFDcpMx/tuB8d5amgm3ijaA==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/karma/-/karma-6.4.2.tgz", + "integrity": "sha512-C6SU/53LB31BEgRg+omznBEMY4SjHU3ricV6zBcAe1EeILKkeScr+fZXtaI5WyDbkVowJxxAI6h73NcFPmXolQ==", "dev": true, "dependencies": { "@colors/colors": "1.5.0", @@ -5425,29 +7461,31 @@ }, "node_modules/karma-chrome-launcher": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz", + "integrity": "sha512-uf/ZVpAabDBPvdPdveyk1EPgbnloPvFFGgmRhYLTDH7gEB4nZdSBk8yTU47w1g/drLSx5uMOkjKk7IWKfWg/+w==", "dev": true, - "license": "MIT", "dependencies": { "fs-access": "^1.0.0", "which": "^1.2.1" } }, - "node_modules/karma-chrome-launcher/node_modules/fs-access": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz", - "integrity": "sha512-05cXDIwNbFaoFWaz5gNHlUTbH5whiss/hr/ibzPd4MH3cR4w0ZKeIPiVdbyJurg3O5r/Bjpvn9KOb1/rPMf3nA==", + "node_modules/karma-chrome-launcher/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "dependencies": { - "null-check": "^1.0.0" + "isexe": "^2.0.0" }, - "engines": { - "node": ">=0.10.0" + "bin": { + "which": "bin/which" } }, "node_modules/karma-coverage": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/karma-coverage/-/karma-coverage-2.2.0.tgz", + "integrity": "sha512-gPVdoZBNDZ08UCzdMHHhEImKrw1+PAOQOIiffv1YsvxFhBjqvo/SVXNk4tqn1SYqX0BJZT6S/59zgxiBe+9OuA==", "dev": true, - "license": "MIT", "dependencies": { "istanbul-lib-coverage": "^3.2.0", "istanbul-lib-instrument": "^5.1.0", @@ -5476,16 +7514,11 @@ "url": "https://github.com/sponsors/mattlewis92" } }, - "node_modules/karma-coverage-istanbul-reporter/node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, "node_modules/karma-coverage-istanbul-reporter/node_modules/glob": { "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, - "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -5503,8 +7536,9 @@ }, "node_modules/karma-coverage-istanbul-reporter/node_modules/istanbul-lib-source-maps": { "version": "3.0.6", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz", + "integrity": "sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "debug": "^4.1.1", "istanbul-lib-coverage": "^2.0.5", @@ -5518,16 +7552,18 @@ }, "node_modules/karma-coverage-istanbul-reporter/node_modules/istanbul-lib-source-maps/node_modules/istanbul-lib-coverage": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", + "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=6" } }, "node_modules/karma-coverage-istanbul-reporter/node_modules/make-dir": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", "dev": true, - "license": "MIT", "dependencies": { "pify": "^4.0.1", "semver": "^5.6.0" @@ -5538,8 +7574,9 @@ }, "node_modules/karma-coverage-istanbul-reporter/node_modules/rimraf": { "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", "dev": true, - "license": "ISC", "dependencies": { "glob": "^7.1.3" }, @@ -5548,28 +7585,6 @@ } }, "node_modules/karma-coverage-istanbul-reporter/node_modules/source-map": { - "version": "0.6.1", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/karma-coverage/node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", - "dev": true, - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/karma-coverage/node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", @@ -5580,8 +7595,9 @@ }, "node_modules/karma-edge-launcher": { "version": "0.4.2", + "resolved": "https://registry.npmjs.org/karma-edge-launcher/-/karma-edge-launcher-0.4.2.tgz", + "integrity": "sha512-YAJZb1fmRcxNhMIWYsjLuxwODBjh2cSHgTW/jkVmdpGguJjLbs9ZgIK/tEJsMQcBLUkO+yO4LBbqYxqgGW2HIw==", "dev": true, - "license": "MIT", "dependencies": { "edge-launcher": "1.2.2" }, @@ -5592,40 +7608,38 @@ "karma": ">=0.9" } }, - "node_modules/karma-edge-launcher/node_modules/edge-launcher": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/edge-launcher/-/edge-launcher-1.2.2.tgz", - "integrity": "sha512-JcD5WBi3BHZXXVSSeEhl6sYO8g5cuynk/hifBzds2Bp4JdzCGLNMHgMCKu5DvrO1yatMgF0goFsxXRGus0yh1g==", - "dev": true - }, "node_modules/karma-firefox-launcher": { "version": "1.3.0", + "resolved": "https://registry.npmjs.org/karma-firefox-launcher/-/karma-firefox-launcher-1.3.0.tgz", + "integrity": "sha512-Fi7xPhwrRgr+94BnHX0F5dCl1miIW4RHnzjIGxF8GaIEp7rNqX7LSi7ok63VXs3PS/5MQaQMhGxw+bvD+pibBQ==", "dev": true, - "license": "MIT", "dependencies": { "is-wsl": "^2.1.0" } }, "node_modules/karma-mocha": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/karma-mocha/-/karma-mocha-2.0.1.tgz", + "integrity": "sha512-Tzd5HBjm8his2OA4bouAsATYEpZrp9vC7z5E5j4C5Of5Rrs1jY67RAwXNcVmd/Bnk1wgvQRou0zGVLey44G4tQ==", "dev": true, - "license": "MIT", "dependencies": { "minimist": "^1.2.3" } }, "node_modules/karma-sourcemap-loader": { "version": "0.3.8", + "resolved": "https://registry.npmjs.org/karma-sourcemap-loader/-/karma-sourcemap-loader-0.3.8.tgz", + "integrity": "sha512-zorxyAakYZuBcHRJE+vbrK2o2JXLFWK8VVjiT/6P+ltLBUGUvqTEkUiQ119MGdOrK7mrmxXHZF1/pfT6GgIZ6g==", "dev": true, - "license": "MIT", "dependencies": { "graceful-fs": "^4.1.2" } }, "node_modules/karma-spec-reporter": { "version": "0.0.32", + "resolved": "https://registry.npmjs.org/karma-spec-reporter/-/karma-spec-reporter-0.0.32.tgz", + "integrity": "sha512-ZXsYERZJMTNRR2F3QN11OWF5kgnT/K2dzhM+oY3CDyMrDI3TjIWqYGG7c15rR9wjmy9lvdC+CCshqn3YZqnNrA==", "dev": true, - "license": "MIT", "dependencies": { "colors": "^1.1.2" }, @@ -5633,15 +7647,6 @@ "karma": ">=0.9" } }, - "node_modules/karma-spec-reporter/node_modules/colors": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", - "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", - "dev": true, - "engines": { - "node": ">=0.1.90" - } - }, "node_modules/karma-webpack": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/karma-webpack/-/karma-webpack-5.0.0.tgz", @@ -5656,19 +7661,14 @@ "node": ">= 6" }, "peerDependencies": { - "webpack": "^5.0.0" - } - }, - "node_modules/karma-webpack/node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true + "webpack": "^5.0.0" + } }, "node_modules/karma-webpack/node_modules/glob": { "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, - "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -5684,16 +7684,11 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/karma/node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, "node_modules/karma/node_modules/glob": { "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, - "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -5711,27 +7706,30 @@ }, "node_modules/karma/node_modules/source-map": { "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } }, "node_modules/kind-of": { "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/levn": { - "version": "0.3.0", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, - "license": "MIT", "dependencies": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" }, "engines": { "node": ">= 0.8.0" @@ -5739,16 +7737,18 @@ }, "node_modules/loader-runner": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.11.5" } }, "node_modules/loader-utils": { "version": "2.0.4", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", "dev": true, - "license": "MIT", "dependencies": { "big.js": "^5.2.2", "emojis-list": "^3.0.0", @@ -5758,28 +7758,11 @@ "node": ">=8.9.0" } }, - "node_modules/loader-utils/node_modules/big.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/loader-utils/node_modules/emojis-list": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", - "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, "node_modules/locate-path": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, - "license": "MIT", "dependencies": { "p-locate": "^4.1.0" }, @@ -5789,12 +7772,20 @@ }, "node_modules/lodash": { "version": "4.17.21", - "license": "MIT" + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "node_modules/lodash.debounce": { "version": "4.0.8", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", + "dev": true + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true }, "node_modules/log-symbols": { "version": "4.1.0", @@ -5843,6 +7834,24 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/log-symbols/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/log-symbols/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "node_modules/log-symbols/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -5866,8 +7875,9 @@ }, "node_modules/log4js": { "version": "6.9.1", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.9.1.tgz", + "integrity": "sha512-1somDdy9sChrr9/f4UlzhdaGfDR2c/SaD2a4T7qEkG4jTS57/B3qmnjLYePwQ8cqWnUHZI0iAKxMBpCZICiZ2g==", "dev": true, - "license": "Apache-2.0", "dependencies": { "date-format": "^4.0.14", "debug": "^4.3.4", @@ -5879,33 +7889,19 @@ "node": ">=8.0" } }, - "node_modules/log4js/node_modules/date-format": { - "version": "4.0.14", - "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.14.tgz", - "integrity": "sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/log4js/node_modules/flatted": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", - "dev": true - }, "node_modules/loupe": { "version": "2.3.6", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", + "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", "dev": true, - "license": "MIT", "dependencies": { "get-func-name": "^2.0.0" } }, "node_modules/lru-cache": { "version": "5.1.1", - "dev": true, - "license": "ISC", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dependencies": { "yallist": "^3.0.2" } @@ -5934,269 +7930,97 @@ "semver": "bin/semver.js" } }, - "node_modules/map-cache": { - "version": "0.2.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==", - "dev": true, - "dependencies": { - "object-visit": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/matchdep": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz", - "integrity": "sha512-LFgVbaHIHMqCRuCZyfCtUOq9/Lnzhi7Z0KFUE2fhD54+JN2jLh3hC02RLkqauJ3U4soU6H1J3tfj/Byk7GoEjA==", - "dev": true, - "dependencies": { - "findup-sync": "^2.0.0", - "micromatch": "^3.0.4", - "resolve": "^1.4.0", - "stack-trace": "0.0.10" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/matchdep/node_modules/arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/matchdep/node_modules/arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/matchdep/node_modules/array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/matchdep/node_modules/braces": { - "version": "2.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/matchdep/node_modules/braces/node_modules/extend-shallow": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/matchdep/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/matchdep/node_modules/define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "dependencies": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/matchdep/node_modules/extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", - "dev": true, - "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/matchdep/node_modules/extend-shallow/node_modules/is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "dependencies": { - "is-plain-object": "^2.0.4" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/matchdep/node_modules/extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "dependencies": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/matchdep/node_modules/extglob/node_modules/define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", - "dev": true, - "dependencies": { - "is-descriptor": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/matchdep/node_modules/extglob/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/matchdep/node_modules/fill-range": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, + "node_modules/map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", + "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/matchdep/node_modules/fill-range/node_modules/extend-shallow": { - "version": "2.0.1", + "node_modules/map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==", "dev": true, - "license": "MIT", "dependencies": { - "is-extendable": "^0.1.0" + "object-visit": "^1.0.0" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/matchdep/node_modules/fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==", + "node_modules/matchdep": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz", + "integrity": "sha512-LFgVbaHIHMqCRuCZyfCtUOq9/Lnzhi7Z0KFUE2fhD54+JN2jLh3hC02RLkqauJ3U4soU6H1J3tfj/Byk7GoEjA==", "dev": true, "dependencies": { - "map-cache": "^0.2.2" + "findup-sync": "^2.0.0", + "micromatch": "^3.0.4", + "resolve": "^1.4.0", + "stack-trace": "0.0.10" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.10.0" } }, - "node_modules/matchdep/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", + "node_modules/matchdep/node_modules/braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "dev": true, "dependencies": { - "kind-of": "^3.0.2" + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/matchdep/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "node_modules/matchdep/node_modules/braces/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", "dev": true, "dependencies": { - "is-buffer": "^1.1.5" + "is-extendable": "^0.1.0" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/matchdep/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", + "node_modules/matchdep/node_modules/fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==", "dev": true, "dependencies": { - "kind-of": "^3.0.2" + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/matchdep/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "node_modules/matchdep/node_modules/fill-range/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", "dev": true, "dependencies": { - "is-buffer": "^1.1.5" + "is-extendable": "^0.1.0" }, "engines": { "node": ">=0.10.0" @@ -6204,16 +8028,18 @@ }, "node_modules/matchdep/node_modules/is-extendable": { "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/matchdep/node_modules/is-number": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", "dev": true, - "license": "MIT", "dependencies": { "kind-of": "^3.0.2" }, @@ -6223,8 +8049,9 @@ }, "node_modules/matchdep/node_modules/is-number/node_modules/kind-of": { "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", "dev": true, - "license": "MIT", "dependencies": { "is-buffer": "^1.1.5" }, @@ -6234,8 +8061,9 @@ }, "node_modules/matchdep/node_modules/micromatch": { "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", "dev": true, - "license": "MIT", "dependencies": { "arr-diff": "^4.0.0", "array-unique": "^0.3.2", @@ -6255,117 +8083,11 @@ "node": ">=0.10.0" } }, - "node_modules/matchdep/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/matchdep/node_modules/snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, - "dependencies": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/matchdep/node_modules/snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, - "dependencies": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/matchdep/node_modules/snapdragon-node/node_modules/define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", - "dev": true, - "dependencies": { - "is-descriptor": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/matchdep/node_modules/snapdragon/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", - "dev": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/matchdep/node_modules/snapdragon/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/matchdep/node_modules/snapdragon/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/matchdep/node_modules/snapdragon/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/matchdep/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/matchdep/node_modules/to-regex-range": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==", "dev": true, - "license": "MIT", "dependencies": { "is-number": "^3.0.0", "repeat-string": "^1.6.1" @@ -6376,29 +8098,33 @@ }, "node_modules/media-typer": { "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/merge-stream": { "version": "2.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true }, "node_modules/merge2": { "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 8" } }, "node_modules/micromatch": { "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", "dev": true, - "license": "MIT", "dependencies": { "braces": "^3.0.2", "picomatch": "^2.3.1" @@ -6409,8 +8135,9 @@ }, "node_modules/mime": { "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", + "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==", "dev": true, - "license": "MIT", "bin": { "mime": "cli.js" }, @@ -6420,16 +8147,18 @@ }, "node_modules/mime-db": { "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/mime-types": { "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dev": true, - "license": "MIT", "dependencies": { "mime-db": "1.52.0" }, @@ -6437,6 +8166,18 @@ "node": ">= 0.6" } }, + "node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -6449,8 +8190,9 @@ }, "node_modules/minimatch": { "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -6458,34 +8200,20 @@ "node": "*" } }, - "node_modules/minimatch/node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/minimatch/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, "node_modules/minimist": { "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "dev": true, - "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/mixin-deep": { "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", "dev": true, - "license": "MIT", "dependencies": { "for-in": "^1.0.2", "is-extendable": "^1.0.1" @@ -6494,19 +8222,11 @@ "node": ">=0.10.0" } }, - "node_modules/mixin-deep/node_modules/for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/mkdirp": { "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", "dev": true, - "license": "MIT", "dependencies": { "minimist": "^1.2.6" }, @@ -6516,8 +8236,9 @@ }, "node_modules/mkdirp-classic": { "version": "0.5.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "dev": true }, "node_modules/mocha": { "version": "10.2.0", @@ -6561,29 +8282,15 @@ }, "node_modules/mocha/node_modules/argparse": { "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "node_modules/mocha/node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, - "node_modules/mocha/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, "node_modules/mocha/node_modules/escape-string-regexp": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -6593,29 +8300,25 @@ }, "node_modules/mocha/node_modules/find-up": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, - "license": "MIT", "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" }, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/mocha/node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/mocha/node_modules/glob": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, - "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -6633,8 +8336,9 @@ }, "node_modules/mocha/node_modules/glob/node_modules/minimatch": { "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -6644,16 +8348,18 @@ }, "node_modules/mocha/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/mocha/node_modules/js-yaml": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, - "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -6663,8 +8369,9 @@ }, "node_modules/mocha/node_modules/locate-path": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, - "license": "MIT", "dependencies": { "p-locate": "^5.0.0" }, @@ -6677,8 +8384,9 @@ }, "node_modules/mocha/node_modules/minimatch": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -6688,21 +8396,24 @@ }, "node_modules/mocha/node_modules/minimatch/node_modules/brace-expansion": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/mocha/node_modules/ms": { "version": "2.1.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true }, "node_modules/mocha/node_modules/p-limit": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, - "license": "MIT", "dependencies": { "yocto-queue": "^0.1.0" }, @@ -6715,8 +8426,9 @@ }, "node_modules/mocha/node_modules/p-locate": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, - "license": "MIT", "dependencies": { "p-limit": "^3.0.2" }, @@ -6729,8 +8441,9 @@ }, "node_modules/mocha/node_modules/supports-color": { "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -6743,13 +8456,14 @@ }, "node_modules/ms": { "version": "2.1.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/nanoid": { "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", "dev": true, - "license": "MIT", "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -6759,8 +8473,9 @@ }, "node_modules/nanomatch": { "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", "dev": true, - "license": "MIT", "dependencies": { "arr-diff": "^4.0.0", "array-unique": "^0.3.2", @@ -6778,209 +8493,12 @@ "node": ">=0.10.0" } }, - "node_modules/nanomatch/node_modules/arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nanomatch/node_modules/array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nanomatch/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/nanomatch/node_modules/define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "dependencies": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nanomatch/node_modules/extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", - "dev": true, - "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nanomatch/node_modules/fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==", - "dev": true, - "dependencies": { - "map-cache": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nanomatch/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nanomatch/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nanomatch/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nanomatch/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nanomatch/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, - "node_modules/nanomatch/node_modules/snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, - "dependencies": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nanomatch/node_modules/snapdragon/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", - "dev": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nanomatch/node_modules/snapdragon/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nanomatch/node_modules/snapdragon/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nanomatch/node_modules/snapdragon/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nanomatch/node_modules/snapdragon/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nanomatch/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", @@ -6992,13 +8510,15 @@ }, "node_modules/neo-async": { "version": "2.6.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true }, "node_modules/node-fetch": { "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", "dev": true, - "license": "MIT", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -7015,14 +8535,15 @@ } }, "node_modules/node-releases": { - "version": "2.0.10", - "dev": true, - "license": "MIT" + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.12.tgz", + "integrity": "sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ==" }, "node_modules/nopt": { "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==", "dev": true, - "license": "ISC", "dependencies": { "abbrev": "1" }, @@ -7032,16 +8553,45 @@ }, "node_modules/normalize-path": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, + "node_modules/npm-run-path": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", + "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "dev": true, + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm-run-path/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/null-check": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/null-check/-/null-check-1.0.0.tgz", + "integrity": "sha512-j8ZNHg19TyIQOWCGeeQJBuu6xZYIEurf8M1Qsfd8mFrGEfIZytbw18YjKWg+LcO25NowXGZXZpKAx+Ui3TFfDw==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -7142,12 +8692,23 @@ }, "node_modules/object-inspect": { "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", "dev": true, - "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/object-visit": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", @@ -7160,10 +8721,30 @@ "node": ">=0.10.0" } }, + "node_modules/object.assign": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/object.pick": { "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", "dev": true, - "license": "MIT", "dependencies": { "isobject": "^3.0.1" }, @@ -7171,10 +8752,29 @@ "node": ">=0.10.0" } }, + "node_modules/object.values": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", + "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/on-finished": { "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", "dev": true, - "license": "MIT", "dependencies": { "ee-first": "1.1.1" }, @@ -7182,52 +8782,70 @@ "node": ">= 0.8" } }, - "node_modules/on-finished/node_modules/ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "dev": true - }, "node_modules/once": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, - "license": "ISC", "dependencies": { "wrappy": "1" } }, - "node_modules/optionator": { - "version": "0.8.3", + "node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", "dev": true, - "license": "MIT", "dependencies": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" + "mimic-fn": "^4.0.0" }, "engines": { - "node": ">= 0.8.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/optionator/node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true + "node_modules/open": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/open/-/open-9.1.0.tgz", + "integrity": "sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==", + "dev": true, + "dependencies": { + "default-browser": "^4.0.0", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "node_modules/optionator/node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true + "node_modules/optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } }, "node_modules/p-limit": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, - "license": "MIT", "dependencies": { "p-try": "^2.0.0" }, @@ -7240,8 +8858,9 @@ }, "node_modules/p-locate": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, - "license": "MIT", "dependencies": { "p-limit": "^2.2.0" }, @@ -7251,8 +8870,21 @@ }, "node_modules/p-try": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true, - "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, "engines": { "node": ">=6" } @@ -7268,61 +8900,69 @@ }, "node_modules/parseurl": { "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.8" } }, "node_modules/pascalcase": { "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/path-exists": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/path-is-absolute": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/path-key": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/path-parse": { "version": "1.0.7", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true }, "node_modules/path-type": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/pathval": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", "dev": true, - "license": "MIT", "engines": { "node": "*" } @@ -7335,13 +8975,14 @@ }, "node_modules/picocolors": { "version": "1.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" }, "node_modules/picomatch": { "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8.6" }, @@ -7351,16 +8992,18 @@ }, "node_modules/pify": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/pkg-dir": { "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, - "license": "MIT", "dependencies": { "find-up": "^4.0.0" }, @@ -7368,29 +9011,19 @@ "node": ">=8" } }, - "node_modules/pkg-dir/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/posix-character-classes": { "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/prelude-ls": { - "version": "1.1.2", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, "engines": { "node": ">= 0.8.0" @@ -7398,48 +9031,45 @@ }, "node_modules/progress": { "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.4.0" } }, "node_modules/proxy-from-env": { "version": "1.1.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true }, "node_modules/pump": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "dev": true, - "license": "MIT", "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" } }, - "node_modules/pump/node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "dependencies": { - "once": "^1.4.0" - } - }, "node_modules/punycode": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/puppeteer": { "version": "13.7.0", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-13.7.0.tgz", + "integrity": "sha512-U1uufzBjz3+PkpCxFrWzh4OrMIdIb2ztzCu0YEPfRHjHswcSwHZswnK+WdsOQJsRV8WeTg3jLhJR4D867+fjsA==", + "deprecated": "< 19.4.0 is no longer supported", "dev": true, "hasInstallScript": true, - "license": "Apache-2.0", "dependencies": { "cross-fetch": "3.1.5", "debug": "4.3.4", @@ -7458,93 +9088,20 @@ "node": ">=10.18.1" } }, - "node_modules/puppeteer/node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dev": true, - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/puppeteer/node_modules/cross-fetch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", - "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", - "dev": true, - "dependencies": { - "node-fetch": "2.6.7" - } - }, - "node_modules/puppeteer/node_modules/devtools-protocol": { - "version": "0.0.981744", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.981744.tgz", - "integrity": "sha512-0cuGS8+jhR67Fy7qG3i3Pc7Aw494sb9yG9QgpG97SFVWwolgYjlhJg7n+UaHxOQT30d1TYu/EYe9k01ivLErIg==", - "dev": true - }, - "node_modules/puppeteer/node_modules/extract-zip": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", - "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", - "dev": true, - "dependencies": { - "debug": "^4.1.1", - "get-stream": "^5.1.0", - "yauzl": "^2.10.0" - }, - "bin": { - "extract-zip": "cli.js" - }, - "engines": { - "node": ">= 10.17.0" - }, - "optionalDependencies": { - "@types/yauzl": "^2.9.1" - } - }, - "node_modules/puppeteer/node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/puppeteer/node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "dev": true, - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/qjobs": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz", + "integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.9" } }, "node_modules/qs": { "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "side-channel": "^1.0.4" }, @@ -7557,12 +9114,16 @@ }, "node_modules/querystring-es3": { "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==", "engines": { "node": ">=0.4.x" } }, "node_modules/queue-microtask": { "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true, "funding": [ { @@ -7577,29 +9138,31 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/randombytes": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, - "license": "MIT", "dependencies": { "safe-buffer": "^5.1.0" } }, "node_modules/range-parser": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/raw-body": { "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "dev": true, - "license": "MIT", "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", @@ -7610,56 +9173,11 @@ "node": ">= 0.8" } }, - "node_modules/raw-body/node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/raw-body/node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dev": true, - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/raw-body/node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/raw-body/node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/readable-stream": { - "version": "3.6.1", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dev": true, - "license": "MIT", "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -7671,8 +9189,9 @@ }, "node_modules/readdirp": { "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, - "license": "MIT", "dependencies": { "picomatch": "^2.2.1" }, @@ -7682,8 +9201,9 @@ }, "node_modules/rechoir": { "version": "0.8.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", + "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", "dev": true, - "license": "MIT", "dependencies": { "resolve": "^1.20.0" }, @@ -7693,13 +9213,15 @@ }, "node_modules/regenerate": { "version": "1.4.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", + "dev": true }, "node_modules/regenerate-unicode-properties": { "version": "10.1.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz", + "integrity": "sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ==", "dev": true, - "license": "MIT", "dependencies": { "regenerate": "^1.4.2" }, @@ -7709,20 +9231,23 @@ }, "node_modules/regenerator-runtime": { "version": "0.13.11", - "license": "MIT" + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" }, "node_modules/regenerator-transform": { "version": "0.15.1", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.1.tgz", + "integrity": "sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg==", "dev": true, - "license": "MIT", "dependencies": { "@babel/runtime": "^7.8.4" } }, "node_modules/regex-not": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", "dev": true, - "license": "MIT", "dependencies": { "extend-shallow": "^3.0.2", "safe-regex": "^1.1.0" @@ -7731,23 +9256,29 @@ "node": ">=0.10.0" } }, - "node_modules/regex-not/node_modules/extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "node_modules/regexp.prototype.flags": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", + "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", "dev": true, + "peer": true, "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "functions-have-names": "^1.2.3" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/regexpu-core": { - "version": "5.3.1", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.3.2.tgz", + "integrity": "sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==", "dev": true, - "license": "MIT", "dependencies": { "@babel/regjsgen": "^0.8.0", "regenerate": "^1.4.2", @@ -7760,16 +9291,7 @@ "node": ">=4" } }, - "node_modules/regexpu-core/node_modules/jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - } - }, - "node_modules/regexpu-core/node_modules/regjsparser": { + "node_modules/regjsparser": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz", "integrity": "sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==", @@ -7781,41 +9303,55 @@ "regjsparser": "bin/parser" } }, + "node_modules/regjsparser/node_modules/jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + } + }, "node_modules/repeat-element": { "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/repeat-string": { "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10" } }, "node_modules/require-directory": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/requires-port": { "version": "1.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "dev": true }, "node_modules/resolve": { - "version": "1.22.1", + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", + "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", "dev": true, - "license": "MIT", "dependencies": { - "is-core-module": "^2.9.0", + "is-core-module": "^2.11.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -7828,8 +9364,9 @@ }, "node_modules/resolve-cwd": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", "dev": true, - "license": "MIT", "dependencies": { "resolve-from": "^5.0.0" }, @@ -7839,8 +9376,9 @@ }, "node_modules/resolve-dir": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==", "dev": true, - "license": "MIT", "dependencies": { "expand-tilde": "^2.0.0", "global-modules": "^1.0.0" @@ -7849,49 +9387,36 @@ "node": ">=0.10.0" } }, - "node_modules/resolve-dir/node_modules/expand-tilde": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, - "dependencies": { - "homedir-polyfill": "^1.0.1" - }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/resolve-dir/node_modules/global-modules": { + "node_modules/resolve-pkg-maps": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", - "dev": true, - "dependencies": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve-from": { - "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" } }, "node_modules/resolve-url": { "version": "0.2.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==", + "deprecated": "https://github.com/lydell/resolve-url#deprecated", + "dev": true }, "node_modules/ret": { "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.12" } @@ -7908,8 +9433,9 @@ }, "node_modules/rfdc": { "version": "1.3.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", + "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", + "dev": true }, "node_modules/rimraf": { "version": "3.0.2", @@ -7926,12 +9452,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/rimraf/node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, "node_modules/rimraf/node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -7952,8 +9472,126 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/run-applescript": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", + "integrity": "sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==", + "dev": true, + "dependencies": { + "execa": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/run-applescript/node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/run-applescript/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/run-applescript/node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/run-applescript/node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/run-applescript/node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/run-applescript/node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/run-applescript/node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/run-applescript/node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/run-parallel": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, "funding": [ { @@ -7969,13 +9607,14 @@ "url": "https://feross.org/support" } ], - "license": "MIT", "dependencies": { "queue-microtask": "^1.2.2" } }, "node_modules/safe-buffer": { "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true, "funding": [ { @@ -7990,26 +9629,43 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/safe-regex": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg==", "dev": true, - "license": "MIT", "dependencies": { "ret": "~0.1.10" } }, + "node_modules/safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true }, "node_modules/schema-utils": { "version": "2.7.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", + "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", "dev": true, - "license": "MIT", "dependencies": { "@types/json-schema": "^7.0.5", "ajv": "^6.12.4", @@ -8023,42 +9679,19 @@ "url": "https://opencollective.com/webpack" } }, - "node_modules/schema-utils/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/schema-utils/node_modules/ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "peerDependencies": { - "ajv": "^6.9.1" - } - }, "node_modules/semver": { "version": "5.7.1", - "license": "ISC", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "bin": { "semver": "bin/semver" } }, "node_modules/serialize-javascript": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "randombytes": "^2.1.0" } @@ -8101,8 +9734,9 @@ }, "node_modules/setprototypeof": { "version": "1.2.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true }, "node_modules/shallow-clone": { "version": "3.0.1", @@ -8118,8 +9752,9 @@ }, "node_modules/shebang-command": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, - "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -8129,16 +9764,18 @@ }, "node_modules/shebang-regex": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/side-channel": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.0", "get-intrinsic": "^1.0.2", @@ -8148,69 +9785,163 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/side-channel/node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/slash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", + "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "dependencies": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "dependencies": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dev": true, + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "dependencies": { + "kind-of": "^3.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-util/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/snapdragon/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", "dev": true, "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "is-descriptor": "^0.1.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/side-channel/node_modules/get-intrinsic": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", - "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", + "node_modules/snapdragon/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", "dev": true, "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" + "is-extendable": "^0.1.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/side-channel/node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "node_modules/snapdragon/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", "dev": true, "dependencies": { - "function-bind": "^1.1.1" + "kind-of": "^3.0.2" }, "engines": { - "node": ">= 0.4.0" + "node": ">=0.10.0" } }, - "node_modules/slash": { - "version": "4.0.0", + "node_modules/snapdragon/node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" + "dependencies": { + "is-buffer": "^1.1.5" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "node_modules/snapdragon/node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", "dev": true, "dependencies": { - "kind-of": "^3.2.0" + "kind-of": "^3.0.2" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/snapdragon-util/node_modules/kind-of": { + "node_modules/snapdragon/node_modules/is-data-descriptor/node_modules/kind-of": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", @@ -8222,36 +9953,71 @@ "node": ">=0.10.0" } }, - "node_modules/socket.io": { - "version": "4.6.1", + "node_modules/snapdragon/node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "dev": true, - "license": "MIT", "dependencies": { - "accepts": "~1.3.4", - "base64id": "~2.0.0", - "debug": "~4.3.2", - "engine.io": "~6.4.1", - "socket.io-adapter": "~2.5.2", - "socket.io-parser": "~4.2.1" + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" }, "engines": { - "node": ">=10.0.0" + "node": ">=0.10.0" } }, - "node_modules/socket.io-parser": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz", - "integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==", + "node_modules/snapdragon/node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/snapdragon/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/socket.io": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.6.2.tgz", + "integrity": "sha512-Vp+lSks5k0dewYTfwgPT9UeGGd+ht7sCpB7p0e83VgO4X/AHYWhXITMrNk/pg8syY2bpx23ptClCQuHhqi2BgQ==", "dev": true, "dependencies": { - "@socket.io/component-emitter": "~3.1.0", - "debug": "~4.3.1" + "accepts": "~1.3.4", + "base64id": "~2.0.0", + "debug": "~4.3.2", + "engine.io": "~6.4.2", + "socket.io-adapter": "~2.5.2", + "socket.io-parser": "~4.2.4" }, "engines": { "node": ">=10.0.0" } }, - "node_modules/socket.io/node_modules/socket.io-adapter": { + "node_modules/socket.io-adapter": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.2.tgz", "integrity": "sha512-87C3LO/NOMc+eMcpcxUBebGjkpMDkNBS9tf7KJqcDsmL936EChtVva71Dw2q4tQcuVC+hAUy4an2NO/sYXmwRA==", @@ -8260,7 +10026,7 @@ "ws": "~8.11.0" } }, - "node_modules/socket.io/node_modules/ws": { + "node_modules/socket.io-adapter/node_modules/ws": { "version": "8.11.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", @@ -8281,8 +10047,23 @@ } } }, + "node_modules/socket.io-parser": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz", + "integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==", + "dev": true, + "dependencies": { + "@socket.io/component-emitter": "~3.1.0", + "debug": "~4.3.1" + }, + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/source-map": { "version": "0.2.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", + "integrity": "sha512-CBdZ2oa/BHhS4xj5DlhjWNHcan57/5YuvfdLf17iVmIpd9KRm+DFLmC6nBNj+6Ua7Kt3TmOjDpQT1aTYOQtoUA==", "dev": true, "optional": true, "dependencies": { @@ -8294,8 +10075,10 @@ }, "node_modules/source-map-resolve": { "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "deprecated": "See https://github.com/lydell/source-map-resolve#deprecated", "dev": true, - "license": "MIT", "dependencies": { "atob": "^2.1.2", "decode-uri-component": "^0.2.0", @@ -8304,27 +10087,6 @@ "urix": "^0.1.0" } }, - "node_modules/source-map-resolve/node_modules/atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true, - "bin": { - "atob": "bin/atob.js" - }, - "engines": { - "node": ">= 4.5.0" - } - }, - "node_modules/source-map-resolve/node_modules/decode-uri-component": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", - "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", - "dev": true, - "engines": { - "node": ">=0.10" - } - }, "node_modules/source-map-support": { "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", @@ -8337,31 +10099,25 @@ }, "node_modules/source-map-support/node_modules/source-map": { "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } }, "node_modules/source-map-url": { "version": "0.4.1", - "dev": true, - "license": "MIT" - }, - "node_modules/source-map/node_modules/amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.4.2" - } + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", + "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", + "deprecated": "See https://github.com/lydell/source-map-url#deprecated", + "dev": true }, "node_modules/split-string": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", "dev": true, - "license": "MIT", "dependencies": { "extend-shallow": "^3.0.0" }, @@ -8369,28 +10125,17 @@ "node": ">=0.10.0" } }, - "node_modules/split-string/node_modules/extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", - "dev": true, - "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/sprintf-js": { "version": "1.0.3", - "dev": true, - "license": "BSD-3-Clause" + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true }, "node_modules/stack-trace": { "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==", "dev": true, - "license": "MIT", "engines": { "node": "*" } @@ -8493,16 +10238,18 @@ }, "node_modules/statuses": { "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/streamroller": { "version": "3.1.5", + "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.1.5.tgz", + "integrity": "sha512-KFxaM7XT+irxvdqSP1LGLgNWbYN7ay5owZ3r/8t77p+EtSUAfUgtl7be3xtqtOmGUl9K9YPO2ca8133RlTjvKw==", "dev": true, - "license": "MIT", "dependencies": { "date-format": "^4.0.14", "debug": "^4.3.4", @@ -8512,41 +10259,20 @@ "node": ">=8.0" } }, - "node_modules/streamroller/node_modules/date-format": { - "version": "4.0.14", - "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.14.tgz", - "integrity": "sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/streamroller/node_modules/fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, "node_modules/string_decoder": { "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "dev": true, - "license": "MIT", "dependencies": { "safe-buffer": "~5.2.0" } }, "node_modules/string-width": { "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, - "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -8556,16 +10282,59 @@ "node": ">=8" } }, - "node_modules/string-width/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "node_modules/string.prototype.trim": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", + "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", + "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", + "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/strip-ansi": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, - "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -8573,19 +10342,33 @@ "node": ">=8" } }, - "node_modules/strip-ansi/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", "dev": true, + "peer": true, "engines": { - "node": ">=8" + "node": ">=4" + } + }, + "node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/strip-json-comments": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" }, @@ -8595,8 +10378,8 @@ }, "node_modules/supports-color": { "version": "5.5.0", - "dev": true, - "license": "MIT", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dependencies": { "has-flag": "^3.0.0" }, @@ -8604,38 +10387,54 @@ "node": ">=4" } }, - "node_modules/supports-color/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true, "engines": { - "node": ">=4" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", + "node_modules/synckit": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.5.tgz", + "integrity": "sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==", "dev": true, - "license": "MIT", + "dependencies": { + "@pkgr/utils": "^2.3.1", + "tslib": "^2.5.0" + }, "engines": { - "node": ">= 0.4" + "node": "^14.18.0 || >=16.0.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://opencollective.com/unts" } }, + "node_modules/synckit/node_modules/tslib": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", + "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", + "dev": true + }, "node_modules/tapable": { "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/tar-fs": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", "dev": true, - "license": "MIT", "dependencies": { "chownr": "^1.1.1", "mkdirp-classic": "^0.5.2", @@ -8643,16 +10442,11 @@ "tar-stream": "^2.1.4" } }, - "node_modules/tar-fs/node_modules/chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "dev": true - }, "node_modules/tar-stream": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", "dev": true, - "license": "MIT", "dependencies": { "bl": "^4.0.3", "end-of-stream": "^1.4.1", @@ -8664,103 +10458,14 @@ "node": ">=6" } }, - "node_modules/tar-stream/node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/tar-stream/node_modules/bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dev": true, - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/tar-stream/node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "node_modules/tar-stream/node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "dependencies": { - "once": "^1.4.0" - } - }, - "node_modules/tar-stream/node_modules/fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", - "dev": true - }, - "node_modules/tar-stream/node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/terser": { - "version": "5.16.5", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.18.0.tgz", + "integrity": "sha512-pdL757Ig5a0I+owA42l6tIuEycRuM7FPY4n62h44mRLRfnOxJkkOHd6i89dOpwZlpF6JXBwaAHF6yWzFrt+QyA==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { - "@jridgewell/source-map": "^0.3.2", - "acorn": "^8.5.0", + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", "commander": "^2.20.0", "source-map-support": "~0.5.20" }, @@ -8771,47 +10476,66 @@ "node": ">=10" } }, - "node_modules/terser/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "node_modules/terser-webpack-plugin": { + "version": "5.3.9", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz", + "integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==", "dev": true, "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.17", + "jest-worker": "^27.4.5", + "schema-utils": "^3.1.1", + "serialize-javascript": "^6.0.1", + "terser": "^5.16.8" }, "engines": { - "node": ">=6.0.0" + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "uglify-js": { + "optional": true + } } }, - "node_modules/terser/node_modules/@jridgewell/source-map": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", - "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", + "node_modules/terser-webpack-plugin/node_modules/schema-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", "dev": true, "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" - } - }, - "node_modules/terser/node_modules/acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", - "dev": true, - "bin": { - "acorn": "bin/acorn" + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" }, "engines": { - "node": ">=0.4.0" + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" } }, - "node_modules/terser/node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true + "node_modules/terser-webpack-plugin/node_modules/serialize-javascript": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", + "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", + "dev": true, + "dependencies": { + "randombytes": "^2.1.0" + } }, "node_modules/test-exclude": { "version": "6.0.0", @@ -8827,12 +10551,6 @@ "node": ">=8" } }, - "node_modules/test-exclude/node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, "node_modules/test-exclude/node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -8853,15 +10571,35 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, "node_modules/through": { "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true + }, + "node_modules/titleize": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz", + "integrity": "sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==", "dev": true, - "license": "MIT" + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/tmp": { "version": "0.2.1", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", "dev": true, - "license": "MIT", "dependencies": { "rimraf": "^3.0.0" }, @@ -8871,8 +10609,8 @@ }, "node_modules/to-fast-properties": { "version": "2.0.0", - "dev": true, - "license": "MIT", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", "engines": { "node": ">=4" } @@ -8903,8 +10641,9 @@ }, "node_modules/to-regex": { "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", "dev": true, - "license": "MIT", "dependencies": { "define-property": "^2.0.2", "extend-shallow": "^3.0.2", @@ -8912,69 +10651,196 @@ "safe-regex": "^1.1.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=0.10.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true + }, + "node_modules/ts-loader": { + "version": "9.4.3", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.4.3.tgz", + "integrity": "sha512-n3hBnm6ozJYzwiwt5YRiJZkzktftRpMiBApHaJPoWLA+qetQBAXkHqCLM6nwSdRDimqVtA5ocIkcTRLMTt7yzA==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "enhanced-resolve": "^5.0.0", + "micromatch": "^4.0.0", + "semver": "^7.3.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "typescript": "*", + "webpack": "^5.0.0" + } + }, + "node_modules/ts-loader/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/ts-loader/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/ts-loader/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/ts-loader/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/ts-loader/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" } }, - "node_modules/to-regex-range": { - "version": "5.0.1", + "node_modules/ts-loader/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, - "license": "MIT", "dependencies": { - "is-number": "^7.0.0" + "yallist": "^4.0.0" }, "engines": { - "node": ">=8.0" + "node": ">=10" } }, - "node_modules/to-regex/node_modules/define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "node_modules/ts-loader/node_modules/semver": { + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", + "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", "dev": true, "dependencies": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" }, "engines": { - "node": ">=0.10.0" + "node": ">=10" } }, - "node_modules/to-regex/node_modules/extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "node_modules/ts-loader/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/toidentifier": { - "version": "1.0.1", + "node_modules/ts-loader/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/tsconfig-paths": { + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", + "integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.6" + "peer": true, + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" } }, - "node_modules/tr46": { - "version": "0.0.3", + "node_modules/tsconfig-paths/node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, - "license": "MIT" + "peer": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } }, "node_modules/tslib": { "version": "2.4.0", - "license": "0BSD" + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" }, "node_modules/type-check": { - "version": "0.3.2", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, - "license": "MIT", "dependencies": { - "prelude-ls": "~1.1.2" + "prelude-ls": "^1.2.1" }, "engines": { "node": ">= 0.8.0" @@ -8982,16 +10848,30 @@ }, "node_modules/type-detect": { "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/type-is": { "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", "dev": true, - "license": "MIT", "dependencies": { "media-typer": "0.3.0", "mime-types": "~2.1.24" @@ -9000,8 +10880,37 @@ "node": ">= 0.6" } }, + "node_modules/typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typescript": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.3.tgz", + "integrity": "sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, "node_modules/ua-parser-js": { - "version": "0.7.34", + "version": "0.7.35", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.35.tgz", + "integrity": "sha512-veRf7dawaj9xaWEu9HoTVn5Pggtc/qj+kqTOFvNiN1l0YdxwC1kvel57UCjThjGa3BHBihE8/UJAHI+uQHmd/g==", "dev": true, "funding": [ { @@ -9013,15 +10922,15 @@ "url": "https://paypal.me/faisalman" } ], - "license": "MIT", "engines": { "node": "*" } }, "node_modules/uglify-js": { "version": "3.17.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", + "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", "dev": true, - "license": "BSD-2-Clause", "optional": true, "bin": { "uglifyjs": "bin/uglifyjs" @@ -9030,91 +10939,46 @@ "node": ">=0.8.0" } }, - "node_modules/unbzip2-stream": { - "version": "1.4.3", + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", "dev": true, - "license": "MIT", + "peer": true, "dependencies": { - "buffer": "^5.2.1", - "through": "^2.3.8" + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/unbzip2-stream/node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/unbzip2-stream/node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "node_modules/unbzip2-stream": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" + "buffer": "^5.2.1", + "through": "^2.3.8" } }, - "node_modules/unbzip2-stream/node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/unicode-canonical-property-names-ecmascript": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", + "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/unicode-match-property-ecmascript": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", + "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", "dev": true, - "license": "MIT", "dependencies": { "unicode-canonical-property-names-ecmascript": "^2.0.0", "unicode-property-aliases-ecmascript": "^2.0.0" @@ -9125,16 +10989,18 @@ }, "node_modules/unicode-match-property-value-ecmascript": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz", + "integrity": "sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/unicode-property-aliases-ecmascript": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz", + "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } @@ -9174,8 +11040,9 @@ }, "node_modules/unpipe": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.8" } @@ -9228,9 +11095,19 @@ "node": ">=0.10.0" } }, - "node_modules/update-browserslist-db": { - "version": "1.0.10", + "node_modules/untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", + "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", "funding": [ { "type": "opencollective", @@ -9239,66 +11116,67 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], - "license": "MIT", "dependencies": { "escalade": "^3.1.1", "picocolors": "^1.0.0" }, "bin": { - "browserslist-lint": "cli.js" + "update-browserslist-db": "cli.js" }, "peerDependencies": { "browserslist": ">= 4.21.0" } }, - "node_modules/update-browserslist-db/node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/uri-js": { "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } }, "node_modules/urix": { "version": "0.1.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==", + "deprecated": "Please see https://github.com/lydell/urix#deprecated", + "dev": true }, "node_modules/use": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/util-deprecate": { "version": "1.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true }, "node_modules/utils-merge": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.4.0" } }, "node_modules/validator": { "version": "13.9.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.9.0.tgz", + "integrity": "sha512-B+dGG8U3fdtM0/aNK4/X8CXq/EcxU2WPrPEkJGslb47qyHsxmbggTWK0yEA4qnYVNF+nxNlN88o14hIcPmSIEA==", "engines": { "node": ">= 0.10" } @@ -9314,16 +11192,18 @@ }, "node_modules/void-elements": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", + "integrity": "sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/watchpack": { "version": "2.4.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", + "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", "dev": true, - "license": "MIT", "dependencies": { "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.1.2" @@ -9332,34 +11212,29 @@ "node": ">=10.13.0" } }, - "node_modules/watchpack/node_modules/glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true - }, "node_modules/webidl-conversions": { "version": "3.0.1", - "dev": true, - "license": "BSD-2-Clause" + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true }, "node_modules/webpack": { - "version": "5.76.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.0.tgz", - "integrity": "sha512-l5sOdYBDunyf72HW8dF23rFtWq/7Zgvt/9ftMof71E/yUb1YLOBmTgA2K4vQthB3kotMrSj609txVE0dnr2fjA==", + "version": "5.87.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.87.0.tgz", + "integrity": "sha512-GOu1tNbQ7p1bDEoFRs2YPcfyGs8xq52yyPBZ3m2VGnXGtV9MxjrkABHm4V9Ia280OefsSLzvbVoXcfLxjKY/Iw==", "dev": true, "dependencies": { "@types/eslint-scope": "^3.7.3", - "@types/estree": "^0.0.51", - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/wasm-edit": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", + "@types/estree": "^1.0.0", + "@webassemblyjs/ast": "^1.11.5", + "@webassemblyjs/wasm-edit": "^1.11.5", + "@webassemblyjs/wasm-parser": "^1.11.5", "acorn": "^8.7.1", - "acorn-import-assertions": "^1.7.6", + "acorn-import-assertions": "^1.9.0", "browserslist": "^4.14.5", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.10.0", - "es-module-lexer": "^0.9.0", + "enhanced-resolve": "^5.15.0", + "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", @@ -9368,9 +11243,9 @@ "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", - "schema-utils": "^3.1.0", + "schema-utils": "^3.2.0", "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.1.3", + "terser-webpack-plugin": "^5.3.7", "watchpack": "^2.4.0", "webpack-sources": "^3.2.3" }, @@ -9391,17 +11266,17 @@ } }, "node_modules/webpack-cli": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.0.1.tgz", - "integrity": "sha512-S3KVAyfwUqr0Mo/ur3NzIp6jnerNpo7GUO6so51mxLi1spqsA17YcMXy0WOIJtBSnj748lthxC6XLbNKh/ZC+A==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.4.tgz", + "integrity": "sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==", "dev": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^2.0.1", - "@webpack-cli/info": "^2.0.1", - "@webpack-cli/serve": "^2.0.1", + "@webpack-cli/configtest": "^2.1.1", + "@webpack-cli/info": "^2.0.2", + "@webpack-cli/serve": "^2.0.5", "colorette": "^2.0.14", - "commander": "^9.4.1", + "commander": "^10.0.1", "cross-spawn": "^7.0.3", "envinfo": "^7.7.3", "fastest-levenshtein": "^1.0.12", @@ -9431,142 +11306,59 @@ "optional": true }, "webpack-dev-server": { - "optional": true - } - } - }, - "node_modules/webpack-cli/node_modules/clone-deep": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", - "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", - "dev": true, - "dependencies": { - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.2", - "shallow-clone": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/webpack-cli/node_modules/commander": { - "version": "9.5.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.20.0 || >=14" - } - }, - "node_modules/webpack-cli/node_modules/webpack-merge": { - "version": "5.8.0", - "dev": true, - "license": "MIT", - "dependencies": { - "clone-deep": "^4.0.1", - "wildcard": "^2.0.0" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/webpack-merge": { - "version": "4.2.2", - "dev": true, - "license": "MIT", - "dependencies": { - "lodash": "^4.17.15" - } - }, - "node_modules/webpack-node-externals": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/webpack-sources": { - "version": "3.2.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/webpack/node_modules/acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" + "optional": true + } } }, - "node_modules/webpack/node_modules/acorn-import-assertions": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", - "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", + "node_modules/webpack-cli/node_modules/commander": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", "dev": true, - "peerDependencies": { - "acorn": "^8" + "engines": { + "node": ">=14" } }, - "node_modules/webpack/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "node_modules/webpack-cli/node_modules/webpack-merge": { + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.9.0.tgz", + "integrity": "sha512-6NbRQw4+Sy50vYNTw7EyOn41OZItPiXB8GNv3INSoe3PSFaHJEz3SHTrYVaRm2LilNGnFUzh0FAwqPEmU/CwDg==", "dev": true, "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" + "clone-deep": "^4.0.1", + "wildcard": "^2.0.0" }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" + "engines": { + "node": ">=10.0.0" } }, - "node_modules/webpack/node_modules/ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "node_modules/webpack-merge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.2.2.tgz", + "integrity": "sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g==", "dev": true, - "peerDependencies": { - "ajv": "^6.9.1" + "dependencies": { + "lodash": "^4.17.15" } }, - "node_modules/webpack/node_modules/chrome-trace-event": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", - "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "node_modules/webpack-node-externals": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/webpack-node-externals/-/webpack-node-externals-3.0.0.tgz", + "integrity": "sha512-LnL6Z3GGDPht/AigwRh2dvL9PQPFQ8skEpVrWZXLWBYmqcaojHNN0onvHzie6rq7EWKrrBfPYqNEzTJgiwEQDQ==", "dev": true, "engines": { - "node": ">=6.0" + "node": ">=6" } }, - "node_modules/webpack/node_modules/enhanced-resolve": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz", - "integrity": "sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==", + "node_modules/webpack-sources": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", "dev": true, - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - }, "engines": { "node": ">=10.13.0" } }, - "node_modules/webpack/node_modules/es-module-lexer": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", - "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", - "dev": true - }, "node_modules/webpack/node_modules/eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -9580,27 +11372,6 @@ "node": ">=8.0.0" } }, - "node_modules/webpack/node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/webpack/node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/webpack/node_modules/estraverse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", @@ -9610,39 +11381,10 @@ "node": ">=4.0" } }, - "node_modules/webpack/node_modules/glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true - }, - "node_modules/webpack/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/webpack/node_modules/jest-worker": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", - "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", - "dev": true, - "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": ">= 10.13.0" - } - }, "node_modules/webpack/node_modules/schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.8", @@ -9657,106 +11399,95 @@ "url": "https://opencollective.com/webpack" } }, - "node_modules/webpack/node_modules/serialize-javascript": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", - "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "dev": true, "dependencies": { - "randombytes": "^2.1.0" + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" } }, - "node_modules/webpack/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "dependencies": { - "has-flag": "^4.0.0" + "isexe": "^2.0.0" }, - "engines": { - "node": ">=10" + "bin": { + "node-which": "bin/node-which" }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" + "engines": { + "node": ">= 8" } }, - "node_modules/webpack/node_modules/terser-webpack-plugin": { - "version": "5.3.7", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.7.tgz", - "integrity": "sha512-AfKwIktyP7Cu50xNjXF/6Qb5lBNzYaWpU6YfoX3uZicTx0zTy0stDDCsvjDapKsSDvOeWo5MEq4TmdBy2cNoHw==", + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", "dev": true, + "peer": true, "dependencies": { - "@jridgewell/trace-mapping": "^0.3.17", - "jest-worker": "^27.4.5", - "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.1", - "terser": "^5.16.5" - }, - "engines": { - "node": ">= 10.13.0" + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.1.0" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "uglify-js": { - "optional": true - } - } - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/which": { - "version": "1.3.1", + "node_modules/which-typed-array": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", + "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", "dev": true, - "license": "ISC", + "peer": true, "dependencies": { - "isexe": "^2.0.0" + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.10" }, - "bin": { - "which": "bin/which" + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/wildcard": { - "version": "2.0.0", - "dev": true, - "license": "MIT" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", + "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", + "dev": true }, "node_modules/word-wrap": { "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/wordwrap": { "version": "1.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true }, "node_modules/workerpool": { "version": "6.2.1", - "dev": true, - "license": "Apache-2.0" + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", + "dev": true }, "node_modules/wrap-ansi": { "version": "7.0.0", @@ -9790,14 +11521,34 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/wrap-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "node_modules/wrappy": { "version": "1.0.2", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true }, "node_modules/ws": { "version": "8.5.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", + "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", "engines": { "node": ">=10.0.0" }, @@ -9816,21 +11567,23 @@ }, "node_modules/y18n": { "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true, - "license": "ISC", "engines": { "node": ">=10" } }, "node_modules/yallist": { "version": "3.1.1", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" }, "node_modules/yargs": { "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, - "license": "MIT", "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", @@ -9846,8 +11599,9 @@ }, "node_modules/yargs-parser": { "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "dev": true, - "license": "ISC", "engines": { "node": ">=10" } @@ -9873,93 +11627,27 @@ "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yargs-unparser/node_modules/decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yargs-unparser/node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true, - "bin": { - "flat": "cli.js" - } - }, - "node_modules/yargs/node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/yargs/node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/yargs/node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/yauzl": { - "version": "2.10.0", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" - } - }, - "node_modules/yauzl/node_modules/buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", - "dev": true, - "engines": { - "node": "*" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/yauzl/node_modules/fd-slicer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "node_modules/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", "dev": true, "dependencies": { - "pend": "~1.2.0" + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" } }, "node_modules/yocto-queue": { "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -9970,43 +11658,47 @@ }, "dependencies": { "@adraffy/ens-normalize": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.9.0.tgz", - "integrity": "sha512-iowxq3U30sghZotgl4s/oJRci6WPBfNO5YYgk2cIOMCHr3LeGPcsZjCEr+33Q4N+oV3OABDAtA+pyvWjbvBifQ==" + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.9.2.tgz", + "integrity": "sha512-0h+FrQDqe2Wn+IIGFkTCd4aAwTJ+7834Ek1COohCyV26AXhwQ7WQaz+4F/nLOeVl/3BtWHOHLPsq46V8YB46Eg==" }, "@ampproject/remapping": { - "version": "2.2.0", - "dev": true, + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", + "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", "requires": { - "@jridgewell/gen-mapping": "^0.1.0", + "@jridgewell/gen-mapping": "^0.3.0", "@jridgewell/trace-mapping": "^0.3.9" } }, "@babel/code-frame": { - "version": "7.18.6", - "dev": true, + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", + "integrity": "sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==", "requires": { - "@babel/highlight": "^7.18.6" + "@babel/highlight": "^7.22.5" } }, "@babel/compat-data": { - "version": "7.21.0", - "dev": true + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.5.tgz", + "integrity": "sha512-4Jc/YuIaYqKnDDz892kPIledykKg12Aw1PYX5i/TY28anJtacvM1Rrr8wbieB9GfEJwlzqT0hUEao0CxEebiDA==" }, "@babel/core": { - "version": "7.21.0", - "dev": true, + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.5.tgz", + "integrity": "sha512-SBuTAjg91A3eKOvD+bPEz3LlhHZRNu1nFOVts9lzDJTXshHTjII0BAtDS3Y2DAkdZdDKWVZGVwkDfc4Clxn1dg==", "requires": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.21.0", - "@babel/helper-compilation-targets": "^7.20.7", - "@babel/helper-module-transforms": "^7.21.0", - "@babel/helpers": "^7.21.0", - "@babel/parser": "^7.21.0", - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.21.0", - "@babel/types": "^7.21.0", + "@babel/code-frame": "^7.22.5", + "@babel/generator": "^7.22.5", + "@babel/helper-compilation-targets": "^7.22.5", + "@babel/helper-module-transforms": "^7.22.5", + "@babel/helpers": "^7.22.5", + "@babel/parser": "^7.22.5", + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.5", + "@babel/types": "^7.22.5", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -10014,334 +11706,325 @@ "semver": "^6.3.0" }, "dependencies": { - "@babel/generator": { - "version": "7.21.1", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.21.1.tgz", - "integrity": "sha512-1lT45bAYlQhFn/BHivJs43AiW2rg3/UbLyShGfF3C0KmHvO5fSghWd5kBJy30kpRRucGzXStvnnCFniCR2kXAA==", - "dev": true, - "requires": { - "@babel/types": "^7.21.0", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" - } - }, - "@babel/helper-compilation-targets": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz", - "integrity": "sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.20.5", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", - "lru-cache": "^5.1.1", - "semver": "^6.3.0" - } - }, - "@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, - "requires": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - } - }, - "convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true - }, - "gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true - }, "semver": { "version": "6.3.0", - "dev": true + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" } } }, + "@babel/generator": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.5.tgz", + "integrity": "sha512-+lcUbnTRhd0jOewtFSedLyiPsD5tswKkbgcezOqqWFUVNEwoUTlpPOBmvhG7OXWLR4jMdv0czPGH5XbflnD1EA==", + "requires": { + "@babel/types": "^7.22.5", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" + } + }, "@babel/helper-annotate-as-pure": { - "version": "7.18.6", - "dev": true, + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz", + "integrity": "sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==", "requires": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" } }, "@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.18.9", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.22.5.tgz", + "integrity": "sha512-m1EP3lVOPptR+2DwD125gziZNcmoNSHGmJROKoy87loWUQyJaVXDgpmruWqDARZSmtYQ+Dl25okU8+qhVzuykw==", "dev": true, "requires": { - "@babel/helper-explode-assignable-expression": "^7.18.6", - "@babel/types": "^7.18.9" + "@babel/types": "^7.22.5" } }, - "@babel/helper-create-class-features-plugin": { - "version": "7.21.0", - "dev": true, + "@babel/helper-compilation-targets": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.5.tgz", + "integrity": "sha512-Ji+ywpHeuqxB8WDxraCiqR0xfhYjiDE/e6k7FuIaANnoOFxAHskHChz4vA1mJC9Lbm01s1PVAGhQY4FUKSkGZw==", "requires": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.21.0", - "@babel/helper-member-expression-to-functions": "^7.21.0", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/helper-replace-supers": "^7.20.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0", - "@babel/helper-split-export-declaration": "^7.18.6" + "@babel/compat-data": "^7.22.5", + "@babel/helper-validator-option": "^7.22.5", + "browserslist": "^4.21.3", + "lru-cache": "^5.1.1", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } + } + }, + "@babel/helper-create-class-features-plugin": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.5.tgz", + "integrity": "sha512-xkb58MyOYIslxu3gKmVXmjTtUPvBU4odYzbiIQbWwLKIHCsx6UGZGX6F1IznMFVnDdirseUZopzN+ZRt8Xb33Q==", + "requires": { + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-function-name": "^7.22.5", + "@babel/helper-member-expression-to-functions": "^7.22.5", + "@babel/helper-optimise-call-expression": "^7.22.5", + "@babel/helper-replace-supers": "^7.22.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.5", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } } }, "@babel/helper-create-regexp-features-plugin": { - "version": "7.21.0", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.22.5.tgz", + "integrity": "sha512-1VpEFOIbMRaXyDeUwUfmTIxExLwQ+zkW+Bh5zXpApA3oQedBx9v/updixWxnx/bZpKw7u8VxWjb/qWpIcmPq8A==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "regexpu-core": "^5.3.1" + "@babel/helper-annotate-as-pure": "^7.22.5", + "regexpu-core": "^5.3.1", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, - "@babel/helper-environment-visitor": { - "version": "7.18.9", - "dev": true - }, - "@babel/helper-explode-assignable-expression": { - "version": "7.18.6", + "@babel/helper-define-polyfill-provider": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.0.tgz", + "integrity": "sha512-RnanLx5ETe6aybRi1cO/edaRH+bNYWaryCEmjDDYyNr4wnSzyOp8T0dWipmqVHKEY3AbVKUom50AKSlj1zmKbg==", "dev": true, "requires": { - "@babel/types": "^7.18.6" + "@babel/helper-compilation-targets": "^7.17.7", + "@babel/helper-plugin-utils": "^7.16.7", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2", + "semver": "^6.1.2" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, + "@babel/helper-environment-visitor": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", + "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==" + }, "@babel/helper-function-name": { - "version": "7.21.0", - "dev": true, + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", + "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", "requires": { - "@babel/template": "^7.20.7", - "@babel/types": "^7.21.0" + "@babel/template": "^7.22.5", + "@babel/types": "^7.22.5" } }, "@babel/helper-hoist-variables": { - "version": "7.18.6", - "dev": true, + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "requires": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" } }, "@babel/helper-member-expression-to-functions": { - "version": "7.21.0", - "dev": true, + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.22.5.tgz", + "integrity": "sha512-aBiH1NKMG0H2cGZqspNvsaBe6wNGjbJjuLy29aU+eDZjSbbN53BaxlpB02xm9v34pLTZ1nIQPFYn2qMZoa5BQQ==", "requires": { - "@babel/types": "^7.21.0" + "@babel/types": "^7.22.5" } }, "@babel/helper-module-imports": { - "version": "7.18.6", - "dev": true, + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz", + "integrity": "sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==", "requires": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" } }, "@babel/helper-module-transforms": { - "version": "7.21.2", - "dev": true, + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.5.tgz", + "integrity": "sha512-+hGKDt/Ze8GFExiVHno/2dvG5IdstpzCq0y4Qc9OJ25D4q3pKfiIP/4Vp3/JvhDkLKsDK2api3q3fpIgiIF5bw==", "requires": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.20.2", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.19.1", - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.21.2", - "@babel/types": "^7.21.2" + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-module-imports": "^7.22.5", + "@babel/helper-simple-access": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.5", + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.5", + "@babel/types": "^7.22.5" } }, "@babel/helper-optimise-call-expression": { - "version": "7.18.6", - "dev": true, + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz", + "integrity": "sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==", "requires": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" } }, "@babel/helper-plugin-utils": { - "version": "7.20.2", - "dev": true + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", + "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==" }, "@babel/helper-remap-async-to-generator": { - "version": "7.18.9", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.5.tgz", + "integrity": "sha512-cU0Sq1Rf4Z55fgz7haOakIyM7+x/uCFwXpLPaeRzfoUtAEAuUZjZvFPjL/rk5rW693dIgn2hng1W7xbT7lWT4g==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-wrap-function": "^7.18.9", - "@babel/types": "^7.18.9" + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-wrap-function": "^7.22.5", + "@babel/types": "^7.22.5" } }, "@babel/helper-replace-supers": { - "version": "7.20.7", - "dev": true, + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.22.5.tgz", + "integrity": "sha512-aLdNM5I3kdI/V9xGNyKSF3X/gTyMUBohTZ+/3QdQKAA9vxIiy12E+8E2HoOP1/DjeqU+g6as35QHJNMDDYpuCg==", "requires": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-member-expression-to-functions": "^7.20.7", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.7", - "@babel/types": "^7.20.7" + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-member-expression-to-functions": "^7.22.5", + "@babel/helper-optimise-call-expression": "^7.22.5", + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.5", + "@babel/types": "^7.22.5" } }, "@babel/helper-simple-access": { - "version": "7.20.2", - "dev": true, + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", + "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", "requires": { - "@babel/types": "^7.20.2" + "@babel/types": "^7.22.5" } }, "@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.20.0", - "dev": true, + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz", + "integrity": "sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==", "requires": { - "@babel/types": "^7.20.0" + "@babel/types": "^7.22.5" } }, "@babel/helper-split-export-declaration": { - "version": "7.18.6", - "dev": true, + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.5.tgz", + "integrity": "sha512-thqK5QFghPKWLhAV321lxF95yCg2K3Ob5yw+M3VHWfdia0IkPXUtoLH8x/6Fh486QUvzhb8YOWHChTVen2/PoQ==", "requires": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" } }, "@babel/helper-string-parser": { - "version": "7.19.4", - "dev": true + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==" }, "@babel/helper-validator-identifier": { - "version": "7.19.1", - "dev": true + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", + "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==" }, "@babel/helper-validator-option": { - "version": "7.21.0", - "dev": true + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz", + "integrity": "sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==" }, "@babel/helper-wrap-function": { - "version": "7.20.5", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.22.5.tgz", + "integrity": "sha512-bYqLIBSEshYcYQyfks8ewYA8S30yaGSeRslcvKMvoUk6HHPySbxHq9YRi6ghhzEU+yhQv9bP/jXnygkStOcqZw==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.19.0", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.20.5", - "@babel/types": "^7.20.5" + "@babel/helper-function-name": "^7.22.5", + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.5", + "@babel/types": "^7.22.5" } }, "@babel/helpers": { - "version": "7.21.0", - "dev": true, + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.5.tgz", + "integrity": "sha512-pSXRmfE1vzcUIDFQcSGA5Mr+GxBV9oiRKDuDxXvWQQBCh8HoIjs/2DlDB7H8smac1IVrB9/xdXj2N3Wol9Cr+Q==", "requires": { - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.21.0", - "@babel/types": "^7.21.0" + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.5", + "@babel/types": "^7.22.5" } }, "@babel/highlight": { - "version": "7.18.6", - "dev": true, + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.5.tgz", + "integrity": "sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==", "requires": { - "@babel/helper-validator-identifier": "^7.18.6", + "@babel/helper-validator-identifier": "^7.22.5", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.21.2", - "dev": true + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.5.tgz", + "integrity": "sha512-DFZMC9LJUG9PLOclRC32G63UXwzqS2koQC8dkx+PLdmt1xSePYpbT/NbsrJy8Q/muXz7o/h/d4A7Fuyixm559Q==" }, "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.18.6", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.22.5.tgz", + "integrity": "sha512-NP1M5Rf+u2Gw9qfSO4ihjcTGW5zXTi36ITLd4/EoAcEhIZ0yjMqmftDNl3QC19CX7olhrjpyU454g/2W7X0jvQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.20.7", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0", - "@babel/plugin-proposal-optional-chaining": "^7.20.7" - } - }, - "@babel/plugin-proposal-async-generator-functions": { - "version": "7.20.7", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.22.5.tgz", + "integrity": "sha512-31Bb65aZaUwqCbWMnZPduIZxCBngHFlzyN6Dq6KAJjtx+lx6ohKHubc61OomYi7XwVD4Ol0XCVz4h+pYFR048g==", "dev": true, "requires": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-remap-async-to-generator": "^7.18.9", - "@babel/plugin-syntax-async-generators": "^7.8.4" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", + "@babel/plugin-transform-optional-chaining": "^7.22.5" } }, "@babel/plugin-proposal-class-properties": { "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz", + "integrity": "sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==", "dev": true, "requires": { "@babel/helper-create-class-features-plugin": "^7.18.6", "@babel/helper-plugin-utils": "^7.18.6" } }, - "@babel/plugin-proposal-class-static-block": { - "version": "7.21.0", - "dev": true, - "requires": { - "@babel/helper-create-class-features-plugin": "^7.21.0", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/plugin-syntax-class-static-block": "^7.14.5" - } - }, - "@babel/plugin-proposal-dynamic-import": { - "version": "7.18.6", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-dynamic-import": "^7.8.3" - } - }, - "@babel/plugin-proposal-export-namespace-from": { - "version": "7.18.9", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3" - } - }, - "@babel/plugin-proposal-json-strings": { - "version": "7.18.6", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-json-strings": "^7.8.3" - } - }, - "@babel/plugin-proposal-logical-assignment-operators": { - "version": "7.20.7", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" - } - }, - "@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.18.6", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" - } - }, "@babel/plugin-proposal-numeric-separator": { "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz", + "integrity": "sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.18.6", @@ -10350,6 +12033,8 @@ }, "@babel/plugin-proposal-object-rest-spread": { "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz", + "integrity": "sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg==", "dev": true, "requires": { "@babel/compat-data": "^7.20.5", @@ -10357,44 +12042,6 @@ "@babel/helper-plugin-utils": "^7.20.2", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", "@babel/plugin-transform-parameters": "^7.20.7" - }, - "dependencies": { - "@babel/helper-compilation-targets": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz", - "integrity": "sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.20.5", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", - "lru-cache": "^5.1.1", - "semver": "^6.3.0" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "@babel/plugin-proposal-optional-catch-binding": { - "version": "7.18.6", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" - } - }, - "@babel/plugin-proposal-optional-chaining": { - "version": "7.21.0", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0", - "@babel/plugin-syntax-optional-chaining": "^7.8.3" } }, "@babel/plugin-proposal-private-methods": { @@ -10408,8 +12055,9 @@ } }, "@babel/plugin-proposal-private-property-in-object": { - "version": "7.21.0", - "dev": true, + "version": "7.21.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.11.tgz", + "integrity": "sha512-0QZ8qP/3RLDVBwBFoWAwCtgcDZJVwA5LUJRZU8x2YFfKNuFq161wK3cuGrALu5yiPu+vzwTAg/sMWVNeWeNyaw==", "requires": { "@babel/helper-annotate-as-pure": "^7.18.6", "@babel/helper-create-class-features-plugin": "^7.21.0", @@ -10419,6 +12067,8 @@ }, "@babel/plugin-proposal-unicode-property-regex": { "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz", + "integrity": "sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==", "dev": true, "requires": { "@babel/helper-create-regexp-features-plugin": "^7.18.6", @@ -10427,6 +12077,8 @@ }, "@babel/plugin-syntax-async-generators": { "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.0" @@ -10434,6 +12086,8 @@ }, "@babel/plugin-syntax-class-properties": { "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.12.13" @@ -10441,6 +12095,8 @@ }, "@babel/plugin-syntax-class-static-block": { "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.14.5" @@ -10448,6 +12104,8 @@ }, "@babel/plugin-syntax-dynamic-import": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.0" @@ -10455,20 +12113,44 @@ }, "@babel/plugin-syntax-export-namespace-from": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-syntax-import-assertions": { - "version": "7.20.0", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.22.5.tgz", + "integrity": "sha512-rdV97N7KqsRzeNGoWUOK6yUsWarLjE5Su/Snk9IYPU9CwkWHs4t+rTGOvffTR8XGkJMTAdLfO0xVnXm8wugIJg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.22.5" + } + }, + "@babel/plugin-syntax-import-attributes": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.22.5.tgz", + "integrity": "sha512-KwvoWDeNKPETmozyFE0P2rOLqh39EoQHNjqizrI5B8Vt0ZNS7M56s7dAiAqbYfiAYOuIzIh96z3iR2ktgu3tEg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.19.0" + "@babel/helper-plugin-utils": "^7.22.5" + } + }, + "@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-syntax-json-strings": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.0" @@ -10476,6 +12158,8 @@ }, "@babel/plugin-syntax-logical-assignment-operators": { "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4" @@ -10483,6 +12167,8 @@ }, "@babel/plugin-syntax-nullish-coalescing-operator": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.0" @@ -10490,6 +12176,8 @@ }, "@babel/plugin-syntax-numeric-separator": { "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4" @@ -10497,6 +12185,8 @@ }, "@babel/plugin-syntax-object-rest-spread": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.0" @@ -10504,6 +12194,8 @@ }, "@babel/plugin-syntax-optional-catch-binding": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.0" @@ -10511,6 +12203,8 @@ }, "@babel/plugin-syntax-optional-chaining": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.0" @@ -10518,434 +12212,558 @@ }, "@babel/plugin-syntax-private-property-in-object": { "version": "7.14.5", - "dev": true, + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", "requires": { "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-syntax-top-level-await": { "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.14.5" } }, + "@babel/plugin-syntax-unicode-sets-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz", + "integrity": "sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, "@babel/plugin-transform-arrow-functions": { - "version": "7.20.7", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.22.5.tgz", + "integrity": "sha512-26lTNXoVRdAnsaDXPpvCNUq+OVWEVC6bx7Vvz9rC53F2bagUWW4u4ii2+h8Fejfh7RYqPxn+libeFBBck9muEw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.22.5" + } + }, + "@babel/plugin-transform-async-generator-functions": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.22.5.tgz", + "integrity": "sha512-gGOEvFzm3fWoyD5uZq7vVTD57pPJ3PczPUD/xCFGjzBpUosnklmXyKnGQbbbGs1NPNPskFex0j93yKbHt0cHyg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-remap-async-to-generator": "^7.22.5", + "@babel/plugin-syntax-async-generators": "^7.8.4" } }, "@babel/plugin-transform-async-to-generator": { - "version": "7.20.7", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.22.5.tgz", + "integrity": "sha512-b1A8D8ZzE/VhNDoV1MSJTnpKkCG5bJo+19R4o4oy03zM7ws8yEMK755j61Dc3EyvdysbqH5BOOTquJ7ZX9C6vQ==", "dev": true, "requires": { - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-remap-async-to-generator": "^7.18.9" + "@babel/helper-module-imports": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-remap-async-to-generator": "^7.22.5" } }, "@babel/plugin-transform-block-scoped-functions": { - "version": "7.18.6", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.22.5.tgz", + "integrity": "sha512-tdXZ2UdknEKQWKJP1KMNmuF5Lx3MymtMN/pvA+p/VEkhK8jVcQ1fzSy8KM9qRYhAf2/lV33hoMPKI/xaI9sADA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-transform-block-scoping": { - "version": "7.21.0", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.22.5.tgz", + "integrity": "sha512-EcACl1i5fSQ6bt+YGuU/XGCeZKStLmyVGytWkpyhCLeQVA0eu6Wtiw92V+I1T/hnezUv7j74dA/Ro69gWcU+hg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-plugin-utils": "^7.22.5" } }, - "@babel/plugin-transform-classes": { - "version": "7.21.0", + "@babel/plugin-transform-class-properties": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.22.5.tgz", + "integrity": "sha512-nDkQ0NfkOhPTq8YCLiWNxp1+f9fCobEjCb0n8WdbNUBc4IB5V7P1QnX9IjpSoquKrXF5SKojHleVNs2vGeHCHQ==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-compilation-targets": "^7.20.7", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.21.0", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-replace-supers": "^7.20.7", - "@babel/helper-split-export-declaration": "^7.18.6", - "globals": "^11.1.0" - }, - "dependencies": { - "@babel/helper-compilation-targets": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz", - "integrity": "sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.20.5", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", - "lru-cache": "^5.1.1", - "semver": "^6.3.0" - } - }, - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } + "@babel/helper-create-class-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" + } + }, + "@babel/plugin-transform-class-static-block": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.22.5.tgz", + "integrity": "sha512-SPToJ5eYZLxlnp1UzdARpOGeC2GbHvr9d/UV0EukuVx8atktg194oe+C5BqQ8jRTkgLRVOPYeXRSBg1IlMoVRA==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-class-static-block": "^7.14.5" + } + }, + "@babel/plugin-transform-classes": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.22.5.tgz", + "integrity": "sha512-2edQhLfibpWpsVBx2n/GKOz6JdGQvLruZQfGr9l1qes2KQaWswjBzhQF7UDUZMNaMMQeYnQzxwOMPsbYF7wqPQ==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-compilation-targets": "^7.22.5", + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-function-name": "^7.22.5", + "@babel/helper-optimise-call-expression": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-replace-supers": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.5", + "globals": "^11.1.0" } }, "@babel/plugin-transform-computed-properties": { - "version": "7.20.7", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.22.5.tgz", + "integrity": "sha512-4GHWBgRf0krxPX+AaPtgBAlTgTeZmqDynokHOX7aqqAB4tHs3U2Y02zH6ETFdLZGcg9UQSD1WCmkVrE9ErHeOg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/template": "^7.20.7" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/template": "^7.22.5" } }, "@babel/plugin-transform-destructuring": { - "version": "7.20.7", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.22.5.tgz", + "integrity": "sha512-GfqcFuGW8vnEqTUBM7UtPd5A4q797LTvvwKxXTgRsFjoqaJiEg9deBG6kWeQYkVEL569NpnmpC0Pkr/8BLKGnQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-transform-dotall-regex": { - "version": "7.18.6", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.22.5.tgz", + "integrity": "sha512-5/Yk9QxCQCl+sOIB1WelKnVRxTJDSAIxtJLL2/pqL14ZVlbH0fUQUZa/T5/UnQtBNgghR7mfB8ERBKyKPCi7Vw==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-create-regexp-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-transform-duplicate-keys": { - "version": "7.18.9", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.22.5.tgz", + "integrity": "sha512-dEnYD+9BBgld5VBXHnF/DbYGp3fqGMsyxKbtD1mDyIA7AkTSpKXFhCVuj/oQVOoALfBs77DudA0BE4d5mcpmqw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.22.5" + } + }, + "@babel/plugin-transform-dynamic-import": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.22.5.tgz", + "integrity": "sha512-0MC3ppTB1AMxd8fXjSrbPa7LT9hrImt+/fcj+Pg5YMD7UQyWp/02+JWpdnCymmsXwIx5Z+sYn1bwCn4ZJNvhqQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" } }, "@babel/plugin-transform-exponentiation-operator": { - "version": "7.18.6", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.22.5.tgz", + "integrity": "sha512-vIpJFNM/FjZ4rh1myqIya9jXwrwwgFRHPjT3DkUA9ZLHuzox8jiXkOLvwm1H+PQIP3CqfC++WPKeuDi0Sjdj1g==", "dev": true, "requires": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" + } + }, + "@babel/plugin-transform-export-namespace-from": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.22.5.tgz", + "integrity": "sha512-X4hhm7FRnPgd4nDA4b/5V280xCx6oL7Oob5+9qVS5C13Zq4bh1qq7LU0GgRU6b5dBWBvhGaXYVB4AcN6+ol6vg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" } }, "@babel/plugin-transform-for-of": { - "version": "7.21.0", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.22.5.tgz", + "integrity": "sha512-3kxQjX1dU9uudwSshyLeEipvrLjBCVthCgeTp6CzE/9JYrlAIaeekVxRpCWsDDfYTfRZRoCeZatCQvwo+wvK8A==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-transform-function-name": { - "version": "7.18.9", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.22.5.tgz", + "integrity": "sha512-UIzQNMS0p0HHiQm3oelztj+ECwFnj+ZRV4KnguvlsD2of1whUeM6o7wGNj6oLwcDoAXQ8gEqfgC24D+VdIcevg==", "dev": true, "requires": { - "@babel/helper-compilation-targets": "^7.18.9", - "@babel/helper-function-name": "^7.18.9", - "@babel/helper-plugin-utils": "^7.18.9" - }, - "dependencies": { - "@babel/helper-compilation-targets": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz", - "integrity": "sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.20.5", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", - "lru-cache": "^5.1.1", - "semver": "^6.3.0" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } + "@babel/helper-compilation-targets": "^7.22.5", + "@babel/helper-function-name": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" + } + }, + "@babel/plugin-transform-json-strings": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.22.5.tgz", + "integrity": "sha512-DuCRB7fu8MyTLbEQd1ew3R85nx/88yMoqo2uPSjevMj3yoN7CDM8jkgrY0wmVxfJZyJ/B9fE1iq7EQppWQmR5A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-json-strings": "^7.8.3" } }, "@babel/plugin-transform-literals": { - "version": "7.18.9", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.22.5.tgz", + "integrity": "sha512-fTLj4D79M+mepcw3dgFBTIDYpbcB9Sm0bpm4ppXPaO+U+PKFFyV9MGRvS0gvGw62sd10kT5lRMKXAADb9pWy8g==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-plugin-utils": "^7.22.5" + } + }, + "@babel/plugin-transform-logical-assignment-operators": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.22.5.tgz", + "integrity": "sha512-MQQOUW1KL8X0cDWfbwYP+TbVbZm16QmQXJQ+vndPtH/BoO0lOKpVoEDMI7+PskYxH+IiE0tS8xZye0qr1lGzSA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" } }, "@babel/plugin-transform-member-expression-literals": { - "version": "7.18.6", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.22.5.tgz", + "integrity": "sha512-RZEdkNtzzYCFl9SE9ATaUMTj2hqMb4StarOJLrZRbqqU4HSBE7UlBw9WBWQiDzrJZJdUWiMTVDI6Gv/8DPvfew==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-transform-modules-amd": { - "version": "7.20.11", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.22.5.tgz", + "integrity": "sha512-R+PTfLTcYEmb1+kK7FNkhQ1gP4KgjpSO6HfH9+f8/yfp2Nt3ggBjiVpRwmwTlfqZLafYKJACy36yDXlEmI9HjQ==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.20.11", - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-module-transforms": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.21.2", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.22.5.tgz", + "integrity": "sha512-B4pzOXj+ONRmuaQTg05b3y/4DuFz3WcCNAXPLb2Q0GT0TrGKGxNKV4jwsXts+StaM0LQczZbOpj8o1DLPDJIiA==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.21.2", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-simple-access": "^7.20.2" + "@babel/helper-module-transforms": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-simple-access": "^7.22.5" } }, "@babel/plugin-transform-modules-systemjs": { - "version": "7.20.11", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.22.5.tgz", + "integrity": "sha512-emtEpoaTMsOs6Tzz+nbmcePl6AKVtS1yC4YNAeMun9U8YCsgadPNxnOPQ8GhHFB2qdx+LZu9LgoC0Lthuu05DQ==", "dev": true, "requires": { - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-module-transforms": "^7.20.11", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-validator-identifier": "^7.19.1" + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-module-transforms": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.5" } }, "@babel/plugin-transform-modules-umd": { - "version": "7.18.6", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.22.5.tgz", + "integrity": "sha512-+S6kzefN/E1vkSsKx8kmQuqeQsvCKCd1fraCM7zXm4SFoggI099Tr4G8U81+5gtMdUeMQ4ipdQffbKLX0/7dBQ==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-module-transforms": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.20.5", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.22.5.tgz", + "integrity": "sha512-YgLLKmS3aUBhHaxp5hi1WJTgOUb/NCuDHzGT9z9WTt3YG+CPRhJs6nprbStx6DnWM4dh6gt7SU3sZodbZ08adQ==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.20.5", - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-create-regexp-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-transform-new-target": { - "version": "7.18.6", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.22.5.tgz", + "integrity": "sha512-AsF7K0Fx/cNKVyk3a+DW0JLo+Ua598/NxMRvxDnkpCIGFh43+h/v2xyhRUYf6oD8gE4QtL83C7zZVghMjHd+iw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" + } + }, + "@babel/plugin-transform-nullish-coalescing-operator": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.22.5.tgz", + "integrity": "sha512-6CF8g6z1dNYZ/VXok5uYkkBBICHZPiGEl7oDnAx2Mt1hlHVHOSIKWJaXHjQJA5VB43KZnXZDIexMchY4y2PGdA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + } + }, + "@babel/plugin-transform-numeric-separator": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.22.5.tgz", + "integrity": "sha512-NbslED1/6M+sXiwwtcAB/nieypGw02Ejf4KtDeMkCEpP6gWFMX1wI9WKYua+4oBneCCEmulOkRpwywypVZzs/g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + } + }, + "@babel/plugin-transform-object-rest-spread": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.22.5.tgz", + "integrity": "sha512-Kk3lyDmEslH9DnvCDA1s1kkd3YWQITiBOHngOtDL9Pt6BZjzqb6hiOlb8VfjiiQJ2unmegBqZu0rx5RxJb5vmQ==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.22.5", + "@babel/helper-compilation-targets": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.22.5" } }, "@babel/plugin-transform-object-super": { - "version": "7.18.6", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.22.5.tgz", + "integrity": "sha512-klXqyaT9trSjIUrcsYIfETAzmOEZL3cBYqOYLJxBHfMFFggmXOv+NYSX/Jbs9mzMVESw/WycLFPRx8ba/b2Ipw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-replace-supers": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-replace-supers": "^7.22.5" + } + }, + "@babel/plugin-transform-optional-catch-binding": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.22.5.tgz", + "integrity": "sha512-pH8orJahy+hzZje5b8e2QIlBWQvGpelS76C63Z+jhZKsmzfNaPQ+LaW6dcJ9bxTpo1mtXbgHwy765Ro3jftmUg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + } + }, + "@babel/plugin-transform-optional-chaining": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.22.5.tgz", + "integrity": "sha512-AconbMKOMkyG+xCng2JogMCDcqW8wedQAqpVIL4cOSescZ7+iW8utC6YDZLMCSUIReEA733gzRSaOSXMAt/4WQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" } }, "@babel/plugin-transform-parameters": { - "version": "7.20.7", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.22.5.tgz", + "integrity": "sha512-AVkFUBurORBREOmHRKo06FjHYgjrabpdqRSwq6+C7R5iTCZOsM4QbcB27St0a4U6fffyAOqh3s/qEfybAhfivg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.22.5" + } + }, + "@babel/plugin-transform-private-methods": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.22.5.tgz", + "integrity": "sha512-PPjh4gyrQnGe97JTalgRGMuU4icsZFnWkzicB/fUtzlKUqvsWBKEpPPfr5a2JiyirZkHxnAqkQMO5Z5B2kK3fA==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" + } + }, + "@babel/plugin-transform-private-property-in-object": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.22.5.tgz", + "integrity": "sha512-/9xnaTTJcVoBtSSmrVyhtSvO3kbqS2ODoh2juEU72c3aYonNF0OMGiaz2gjukyKM2wBBYJP38S4JiE0Wfb5VMQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-create-class-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" } }, "@babel/plugin-transform-property-literals": { - "version": "7.18.6", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.22.5.tgz", + "integrity": "sha512-TiOArgddK3mK/x1Qwf5hay2pxI6wCZnvQqrFSqbtg1GLl2JcNMitVH/YnqjP+M31pLUeTfzY1HAXFDnUBV30rQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-transform-regenerator": { - "version": "7.20.5", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.22.5.tgz", + "integrity": "sha512-rR7KePOE7gfEtNTh9Qw+iO3Q/e4DEsoQ+hdvM6QUDH7JRJ5qxq5AA52ZzBWbI5i9lfNuvySgOGP8ZN7LAmaiPw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.20.2", + "@babel/helper-plugin-utils": "^7.22.5", "regenerator-transform": "^0.15.1" } }, "@babel/plugin-transform-reserved-words": { - "version": "7.18.6", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.22.5.tgz", + "integrity": "sha512-DTtGKFRQUDm8svigJzZHzb/2xatPc6TzNvAIJ5GqOKDsGFYgAskjRulbR/vGsPKq3OPqtexnz327qYpP57RFyA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-transform-runtime": { - "version": "7.21.0", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.22.5.tgz", + "integrity": "sha512-bg4Wxd1FWeFx3daHFTWk1pkSWK/AyQuiyAoeZAOkAOUBjnZPH6KT7eMxouV47tQ6hl6ax2zyAWBdWZXbrvXlaw==", "dev": true, "requires": { - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-plugin-utils": "^7.20.2", - "babel-plugin-polyfill-corejs2": "^0.3.3", - "babel-plugin-polyfill-corejs3": "^0.6.0", - "babel-plugin-polyfill-regenerator": "^0.4.1", + "@babel/helper-module-imports": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "babel-plugin-polyfill-corejs2": "^0.4.3", + "babel-plugin-polyfill-corejs3": "^0.8.1", + "babel-plugin-polyfill-regenerator": "^0.5.0", "semver": "^6.3.0" }, "dependencies": { - "@babel/helper-compilation-targets": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz", - "integrity": "sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.20.5", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", - "lru-cache": "^5.1.1", - "semver": "^6.3.0" - } - }, - "@babel/helper-define-polyfill-provider": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.3.tgz", - "integrity": "sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww==", - "dev": true, - "requires": { - "@babel/helper-compilation-targets": "^7.17.7", - "@babel/helper-plugin-utils": "^7.16.7", - "debug": "^4.1.1", - "lodash.debounce": "^4.0.8", - "resolve": "^1.14.2", - "semver": "^6.1.2" - } - }, - "babel-plugin-polyfill-corejs2": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz", - "integrity": "sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.17.7", - "@babel/helper-define-polyfill-provider": "^0.3.3", - "semver": "^6.1.1" - } - }, - "babel-plugin-polyfill-corejs3": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.6.0.tgz", - "integrity": "sha512-+eHqR6OPcBhJOGgsIar7xoAB1GcSwVUA3XjAd7HJNzOXT4wv6/H7KIdA/Nc60cvUlDbKApmqNvD1B1bzOt4nyA==", - "dev": true, - "requires": { - "@babel/helper-define-polyfill-provider": "^0.3.3", - "core-js-compat": "^3.25.1" - } - }, - "babel-plugin-polyfill-regenerator": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.4.1.tgz", - "integrity": "sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw==", - "dev": true, - "requires": { - "@babel/helper-define-polyfill-provider": "^0.3.3" - } - }, - "core-js-compat": { - "version": "3.29.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.29.0.tgz", - "integrity": "sha512-ScMn3uZNAFhK2DGoEfErguoiAHhV2Ju+oJo/jK08p7B3f3UhocUrCCkTvnZaiS+edl5nlIoiBXKcwMc6elv4KQ==", - "dev": true, - "requires": { - "browserslist": "^4.21.5" - } - }, "semver": { "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true } } }, "@babel/plugin-transform-shorthand-properties": { - "version": "7.18.6", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.22.5.tgz", + "integrity": "sha512-vM4fq9IXHscXVKzDv5itkO1X52SmdFBFcMIBZ2FRn2nqVYqw6dBexUgMvAjHW+KXpPPViD/Yo3GrDEBaRC0QYA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-transform-spread": { - "version": "7.20.7", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.22.5.tgz", + "integrity": "sha512-5ZzDQIGyvN4w8+dMmpohL6MBo+l2G7tfC/O2Dg7/hjpgeWvUx8FzfeOKxGog9IimPa4YekaQ9PlDqTLOljkcxg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5" } }, "@babel/plugin-transform-sticky-regex": { - "version": "7.18.6", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.22.5.tgz", + "integrity": "sha512-zf7LuNpHG0iEeiyCNwX4j3gDg1jgt1k3ZdXBKbZSoA3BbGQGvMiSvfbZRR3Dr3aeJe3ooWFZxOOG3IRStYp2Bw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-transform-template-literals": { - "version": "7.18.9", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.22.5.tgz", + "integrity": "sha512-5ciOehRNf+EyUeewo8NkbQiUs4d6ZxiHo6BcBcnFlgiJfu16q0bQUw9Jvo0b0gBKFG1SMhDSjeKXSYuJLeFSMA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-transform-typeof-symbol": { - "version": "7.18.9", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.22.5.tgz", + "integrity": "sha512-bYkI5lMzL4kPii4HHEEChkD0rkc+nvnlR6+o/qdqR6zrm0Sv/nodmyLhlq2DO0YKLUNd2VePmPRjJXSBh9OIdA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-transform-unicode-escapes": { - "version": "7.18.10", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.22.5.tgz", + "integrity": "sha512-biEmVg1IYB/raUO5wT1tgfacCef15Fbzhkx493D3urBI++6hpJ+RFG4SrWMn0NEZLfvilqKf3QDrRVZHo08FYg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.22.5" + } + }, + "@babel/plugin-transform-unicode-property-regex": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.22.5.tgz", + "integrity": "sha512-HCCIb+CbJIAE6sXn5CjFQXMwkCClcOfPCzTlilJ8cUatfzwHlWQkbtV0zD338u9dZskwvuOYTuuaMaA8J5EI5A==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-create-regexp-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-transform-unicode-regex": { - "version": "7.18.6", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.22.5.tgz", + "integrity": "sha512-028laaOKptN5vHJf9/Arr/HiJekMd41hOEZYvNsrsXqJ7YPYuX2bQxh31fkZzGmq3YqHRJzYFFAVYvKfMPKqyg==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-create-regexp-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" } }, - "@babel/preset-env": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.20.2.tgz", - "integrity": "sha512-1G0efQEWR1EHkKvKHqbG+IN/QdgwfByUpM5V5QroDzGV2t3S/WXNQd693cHiHTlCFMpr9B6FkPFXDA2lQcKoDg==", + "@babel/plugin-transform-unicode-sets-regex": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.22.5.tgz", + "integrity": "sha512-lhMfi4FC15j13eKrh3DnYHjpGj6UKQHtNKTbtc1igvAhRy4+kLhV07OpLcsN0VgDEw/MjAvJO4BdMJsHwMhzCg==", "dev": true, "requires": { - "@babel/compat-data": "^7.20.1", - "@babel/helper-compilation-targets": "^7.20.0", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-validator-option": "^7.18.6", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.18.6", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.18.9", - "@babel/plugin-proposal-async-generator-functions": "^7.20.1", - "@babel/plugin-proposal-class-properties": "^7.18.6", - "@babel/plugin-proposal-class-static-block": "^7.18.6", - "@babel/plugin-proposal-dynamic-import": "^7.18.6", - "@babel/plugin-proposal-export-namespace-from": "^7.18.9", - "@babel/plugin-proposal-json-strings": "^7.18.6", - "@babel/plugin-proposal-logical-assignment-operators": "^7.18.9", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", - "@babel/plugin-proposal-numeric-separator": "^7.18.6", - "@babel/plugin-proposal-object-rest-spread": "^7.20.2", - "@babel/plugin-proposal-optional-catch-binding": "^7.18.6", - "@babel/plugin-proposal-optional-chaining": "^7.18.9", - "@babel/plugin-proposal-private-methods": "^7.18.6", - "@babel/plugin-proposal-private-property-in-object": "^7.18.6", - "@babel/plugin-proposal-unicode-property-regex": "^7.18.6", + "@babel/helper-create-regexp-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" + } + }, + "@babel/preset-env": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.22.5.tgz", + "integrity": "sha512-fj06hw89dpiZzGZtxn+QybifF07nNiZjZ7sazs2aVDcysAZVGjW7+7iFYxg6GLNM47R/thYfLdrXc+2f11Vi9A==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.22.5", + "@babel/helper-compilation-targets": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-validator-option": "^7.22.5", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.22.5", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.22.5", + "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-class-properties": "^7.12.13", "@babel/plugin-syntax-class-static-block": "^7.14.5", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-export-namespace-from": "^7.8.3", - "@babel/plugin-syntax-import-assertions": "^7.20.0", + "@babel/plugin-syntax-import-assertions": "^7.22.5", + "@babel/plugin-syntax-import-attributes": "^7.22.5", + "@babel/plugin-syntax-import-meta": "^7.10.4", "@babel/plugin-syntax-json-strings": "^7.8.3", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", @@ -10955,121 +12773,83 @@ "@babel/plugin-syntax-optional-chaining": "^7.8.3", "@babel/plugin-syntax-private-property-in-object": "^7.14.5", "@babel/plugin-syntax-top-level-await": "^7.14.5", - "@babel/plugin-transform-arrow-functions": "^7.18.6", - "@babel/plugin-transform-async-to-generator": "^7.18.6", - "@babel/plugin-transform-block-scoped-functions": "^7.18.6", - "@babel/plugin-transform-block-scoping": "^7.20.2", - "@babel/plugin-transform-classes": "^7.20.2", - "@babel/plugin-transform-computed-properties": "^7.18.9", - "@babel/plugin-transform-destructuring": "^7.20.2", - "@babel/plugin-transform-dotall-regex": "^7.18.6", - "@babel/plugin-transform-duplicate-keys": "^7.18.9", - "@babel/plugin-transform-exponentiation-operator": "^7.18.6", - "@babel/plugin-transform-for-of": "^7.18.8", - "@babel/plugin-transform-function-name": "^7.18.9", - "@babel/plugin-transform-literals": "^7.18.9", - "@babel/plugin-transform-member-expression-literals": "^7.18.6", - "@babel/plugin-transform-modules-amd": "^7.19.6", - "@babel/plugin-transform-modules-commonjs": "^7.19.6", - "@babel/plugin-transform-modules-systemjs": "^7.19.6", - "@babel/plugin-transform-modules-umd": "^7.18.6", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.19.1", - "@babel/plugin-transform-new-target": "^7.18.6", - "@babel/plugin-transform-object-super": "^7.18.6", - "@babel/plugin-transform-parameters": "^7.20.1", - "@babel/plugin-transform-property-literals": "^7.18.6", - "@babel/plugin-transform-regenerator": "^7.18.6", - "@babel/plugin-transform-reserved-words": "^7.18.6", - "@babel/plugin-transform-shorthand-properties": "^7.18.6", - "@babel/plugin-transform-spread": "^7.19.0", - "@babel/plugin-transform-sticky-regex": "^7.18.6", - "@babel/plugin-transform-template-literals": "^7.18.9", - "@babel/plugin-transform-typeof-symbol": "^7.18.9", - "@babel/plugin-transform-unicode-escapes": "^7.18.10", - "@babel/plugin-transform-unicode-regex": "^7.18.6", + "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", + "@babel/plugin-transform-arrow-functions": "^7.22.5", + "@babel/plugin-transform-async-generator-functions": "^7.22.5", + "@babel/plugin-transform-async-to-generator": "^7.22.5", + "@babel/plugin-transform-block-scoped-functions": "^7.22.5", + "@babel/plugin-transform-block-scoping": "^7.22.5", + "@babel/plugin-transform-class-properties": "^7.22.5", + "@babel/plugin-transform-class-static-block": "^7.22.5", + "@babel/plugin-transform-classes": "^7.22.5", + "@babel/plugin-transform-computed-properties": "^7.22.5", + "@babel/plugin-transform-destructuring": "^7.22.5", + "@babel/plugin-transform-dotall-regex": "^7.22.5", + "@babel/plugin-transform-duplicate-keys": "^7.22.5", + "@babel/plugin-transform-dynamic-import": "^7.22.5", + "@babel/plugin-transform-exponentiation-operator": "^7.22.5", + "@babel/plugin-transform-export-namespace-from": "^7.22.5", + "@babel/plugin-transform-for-of": "^7.22.5", + "@babel/plugin-transform-function-name": "^7.22.5", + "@babel/plugin-transform-json-strings": "^7.22.5", + "@babel/plugin-transform-literals": "^7.22.5", + "@babel/plugin-transform-logical-assignment-operators": "^7.22.5", + "@babel/plugin-transform-member-expression-literals": "^7.22.5", + "@babel/plugin-transform-modules-amd": "^7.22.5", + "@babel/plugin-transform-modules-commonjs": "^7.22.5", + "@babel/plugin-transform-modules-systemjs": "^7.22.5", + "@babel/plugin-transform-modules-umd": "^7.22.5", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.22.5", + "@babel/plugin-transform-new-target": "^7.22.5", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.22.5", + "@babel/plugin-transform-numeric-separator": "^7.22.5", + "@babel/plugin-transform-object-rest-spread": "^7.22.5", + "@babel/plugin-transform-object-super": "^7.22.5", + "@babel/plugin-transform-optional-catch-binding": "^7.22.5", + "@babel/plugin-transform-optional-chaining": "^7.22.5", + "@babel/plugin-transform-parameters": "^7.22.5", + "@babel/plugin-transform-private-methods": "^7.22.5", + "@babel/plugin-transform-private-property-in-object": "^7.22.5", + "@babel/plugin-transform-property-literals": "^7.22.5", + "@babel/plugin-transform-regenerator": "^7.22.5", + "@babel/plugin-transform-reserved-words": "^7.22.5", + "@babel/plugin-transform-shorthand-properties": "^7.22.5", + "@babel/plugin-transform-spread": "^7.22.5", + "@babel/plugin-transform-sticky-regex": "^7.22.5", + "@babel/plugin-transform-template-literals": "^7.22.5", + "@babel/plugin-transform-typeof-symbol": "^7.22.5", + "@babel/plugin-transform-unicode-escapes": "^7.22.5", + "@babel/plugin-transform-unicode-property-regex": "^7.22.5", + "@babel/plugin-transform-unicode-regex": "^7.22.5", + "@babel/plugin-transform-unicode-sets-regex": "^7.22.5", "@babel/preset-modules": "^0.1.5", - "@babel/types": "^7.20.2", - "babel-plugin-polyfill-corejs2": "^0.3.3", - "babel-plugin-polyfill-corejs3": "^0.6.0", - "babel-plugin-polyfill-regenerator": "^0.4.1", - "core-js-compat": "^3.25.1", + "@babel/types": "^7.22.5", + "babel-plugin-polyfill-corejs2": "^0.4.3", + "babel-plugin-polyfill-corejs3": "^0.8.1", + "babel-plugin-polyfill-regenerator": "^0.5.0", + "core-js-compat": "^3.30.2", "semver": "^6.3.0" }, "dependencies": { - "@babel/helper-compilation-targets": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz", - "integrity": "sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.20.5", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", - "lru-cache": "^5.1.1", - "semver": "^6.3.0" - } - }, - "@babel/helper-define-polyfill-provider": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.3.tgz", - "integrity": "sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww==", - "dev": true, - "requires": { - "@babel/helper-compilation-targets": "^7.17.7", - "@babel/helper-plugin-utils": "^7.16.7", - "debug": "^4.1.1", - "lodash.debounce": "^4.0.8", - "resolve": "^1.14.2", - "semver": "^6.1.2" - } - }, - "babel-plugin-polyfill-corejs2": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz", - "integrity": "sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.17.7", - "@babel/helper-define-polyfill-provider": "^0.3.3", - "semver": "^6.1.1" - } - }, - "babel-plugin-polyfill-corejs3": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.6.0.tgz", - "integrity": "sha512-+eHqR6OPcBhJOGgsIar7xoAB1GcSwVUA3XjAd7HJNzOXT4wv6/H7KIdA/Nc60cvUlDbKApmqNvD1B1bzOt4nyA==", - "dev": true, - "requires": { - "@babel/helper-define-polyfill-provider": "^0.3.3", - "core-js-compat": "^3.25.1" - } - }, - "babel-plugin-polyfill-regenerator": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.4.1.tgz", - "integrity": "sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw==", - "dev": true, - "requires": { - "@babel/helper-define-polyfill-provider": "^0.3.3" - } - }, - "core-js-compat": { - "version": "3.29.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.29.0.tgz", - "integrity": "sha512-ScMn3uZNAFhK2DGoEfErguoiAHhV2Ju+oJo/jK08p7B3f3UhocUrCCkTvnZaiS+edl5nlIoiBXKcwMc6elv4KQ==", + "@babel/plugin-proposal-private-property-in-object": { + "version": "7.21.0-placeholder-for-preset-env.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", + "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==", "dev": true, - "requires": { - "browserslist": "^4.21.5" - } + "requires": {} }, "semver": { "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true } } }, "@babel/preset-modules": { "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", + "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", @@ -11077,97 +12857,133 @@ "@babel/plugin-transform-dotall-regex": "^7.4.4", "@babel/types": "^7.4.4", "esutils": "^2.0.2" - }, - "dependencies": { - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true - } } }, "@babel/regjsgen": { "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@babel/regjsgen/-/regjsgen-0.8.0.tgz", + "integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==", "dev": true }, "@babel/runtime": { - "version": "7.21.0", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.5.tgz", + "integrity": "sha512-ecjvYlnAaZ/KVneE/OdKYBYfgXV3Ptu6zQWmgEF7vwKhQnvVS6bjMD2XYgj+SNvQ1GfK/pjgokfPkC/2CO8CuA==", "requires": { "regenerator-runtime": "^0.13.11" } }, "@babel/template": { - "version": "7.20.7", - "dev": true, + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", + "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", "requires": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7" + "@babel/code-frame": "^7.22.5", + "@babel/parser": "^7.22.5", + "@babel/types": "^7.22.5" } }, "@babel/traverse": { - "version": "7.21.2", - "dev": true, - "requires": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.21.1", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.21.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.21.2", - "@babel/types": "^7.21.2", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.5.tgz", + "integrity": "sha512-7DuIjPgERaNo6r+PZwItpjCZEa5vyw4eJGufeLxrPdBXBoLcCJCIasvK6pK/9DVNrLZTLFhUGqaC6X/PA007TQ==", + "requires": { + "@babel/code-frame": "^7.22.5", + "@babel/generator": "^7.22.5", + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-function-name": "^7.22.5", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.5", + "@babel/parser": "^7.22.5", + "@babel/types": "^7.22.5", "debug": "^4.1.0", "globals": "^11.1.0" - }, - "dependencies": { - "@babel/generator": { - "version": "7.21.1", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.21.1.tgz", - "integrity": "sha512-1lT45bAYlQhFn/BHivJs43AiW2rg3/UbLyShGfF3C0KmHvO5fSghWd5kBJy30kpRRucGzXStvnnCFniCR2kXAA==", - "dev": true, - "requires": { - "@babel/types": "^7.21.0", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" - } - }, - "@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, - "requires": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - } - }, - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true - } } }, "@babel/types": { - "version": "7.21.2", - "dev": true, + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.5.tgz", + "integrity": "sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==", "requires": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.5", "to-fast-properties": "^2.0.0" } }, "@colors/colors": { "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", "dev": true }, "@discoveryjs/json-ext": { "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", + "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", + "dev": true + }, + "@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^3.3.0" + } + }, + "@eslint-community/regexpp": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.1.tgz", + "integrity": "sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==", + "dev": true + }, + "@eslint/eslintrc": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz", + "integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.5.2", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "globals": { + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + } + } + }, + "@eslint/js": { + "version": "8.42.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.42.0.tgz", + "integrity": "sha512-6SWlXpWU5AvId8Ac7zjzmIOqMOba/JWY8XZ4A7q7Gn1Vlfg/SFFIlrtHXt9nPn4op9ZPAkl91Jao+QQv3r/ukw==", "dev": true }, "@ethersproject/abi": { @@ -11364,81 +13180,113 @@ "@ethersproject/strings": "^5.7.0" } }, - "@istanbuljs/load-nyc-config": { - "version": "1.1.0", + "@humanwhocodes/config-array": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", + "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", "dev": true, "requires": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "dependencies": { - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true - } + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.5" + } + }, + "@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true + }, + "@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, + "@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "requires": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" } }, "@istanbuljs/schema": { "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", "dev": true }, "@jridgewell/gen-mapping": { - "version": "0.1.1", - "dev": true, + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", "requires": { - "@jridgewell/set-array": "^1.0.0", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" } }, "@jridgewell/resolve-uri": { "version": "3.1.0", - "dev": true + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==" }, "@jridgewell/set-array": { "version": "1.1.2", - "dev": true + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==" + }, + "@jridgewell/source-map": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.3.tgz", + "integrity": "sha512-b+fsZXeLYi9fEULmfBrhxn4IrPlINf8fiNarzTof004v3lFdntdwa9PF7vFJqm3mg7s+ScJMxXaE3Acp1irZcg==", + "dev": true, + "requires": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + } }, "@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "dev": true + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" }, "@jridgewell/trace-mapping": { - "version": "0.3.17", - "dev": true, + "version": "0.3.18", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", + "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", "requires": { "@jridgewell/resolve-uri": "3.1.0", "@jridgewell/sourcemap-codec": "1.4.14" + }, + "dependencies": { + "@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" + } } }, "@noble/hashes": { - "version": "1.1.2" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.1.2.tgz", + "integrity": "sha512-KYRCASVTv6aeUi1tsF8/vpyR7zpfs3FUzy2Jqm+MU+LmUKhQ0y2FpfwqkCcxSg2ua4GALJd8k2R76WxwZGbQpA==" }, "@noble/secp256k1": { - "version": "1.7.1" + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-1.7.1.tgz", + "integrity": "sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==" }, "@nodelib/fs.scandir": { "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, "requires": { "@nodelib/fs.stat": "2.0.5", @@ -11447,33 +13295,52 @@ }, "@nodelib/fs.stat": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true }, "@nodelib/fs.walk": { "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, "requires": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" + } + }, + "@pkgr/utils": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.1.tgz", + "integrity": "sha512-JOqwkgFEyi+OROIyq7l4Jy28h/WwhDnG/cPkXG2Z1iFbubB6jsHW1NDvmyOzTBxHr3yg68YGirmh1JUgMqa+9w==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "fast-glob": "^3.2.12", + "is-glob": "^4.0.3", + "open": "^9.1.0", + "picocolors": "^1.0.0", + "tslib": "^2.5.0" }, "dependencies": { - "fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", - "dev": true, - "requires": { - "reusify": "^1.0.4" - } + "tslib": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", + "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", + "dev": true } } }, "@socket.io/component-emitter": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz", + "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==", "dev": true }, "@tronweb3/google-protobuf": { - "version": "3.21.2" + "version": "3.21.2", + "resolved": "https://registry.npmjs.org/@tronweb3/google-protobuf/-/google-protobuf-3.21.2.tgz", + "integrity": "sha512-IVcT2GfWX3K6tHUVhs14NP5uzKhQt4KeDya1g9ACxuZsUzsaoGUIGzceK2Ltu7xp1YV94AaHOf4yxLAivlvEkQ==" }, "@types/cookie": { "version": "0.4.1", @@ -11491,7 +13358,9 @@ } }, "@types/eslint": { - "version": "8.21.1", + "version": "8.40.2", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.40.2.tgz", + "integrity": "sha512-PRVjQ4Eh9z9pmmtaq8nTjZjQwKFk7YIHIud3lRoKRBgUQjgjRmoGxxGEPXQkF+lH7QkHJRNr5F4aBgYCW0lqpQ==", "dev": true, "requires": { "@types/estree": "*", @@ -11500,6 +13369,8 @@ }, "@types/eslint-scope": { "version": "3.7.4", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz", + "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", "dev": true, "requires": { "@types/eslint": "*", @@ -11507,19 +13378,39 @@ } }, "@types/estree": { - "version": "0.0.51", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz", + "integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==", "dev": true }, "@types/json-schema": { - "version": "7.0.11", + "version": "7.0.12", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz", + "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==", "dev": true }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true, + "peer": true + }, "@types/node": { - "version": "18.14.6", + "version": "18.15.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", + "integrity": "sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==" + }, + "@types/validator": { + "version": "13.7.17", + "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.7.17.tgz", + "integrity": "sha512-aqayTNmeWrZcvnG2MG9eGYI6b7S5fl+yKgPs6bAjOTwPS316R5SxBGKvtSExfyoJU7pIeHJfsHI0Ji41RVMkvQ==", "dev": true }, "@types/yauzl": { "version": "2.10.0", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", "dev": true, "optional": true, "requires": { @@ -11527,142 +13418,182 @@ } }, "@webassemblyjs/ast": { - "version": "1.11.1", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", + "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", "dev": true, "requires": { - "@webassemblyjs/helper-numbers": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1" + "@webassemblyjs/helper-numbers": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6" } }, "@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.1", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", + "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", "dev": true }, "@webassemblyjs/helper-api-error": { - "version": "1.11.1", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", + "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", "dev": true }, "@webassemblyjs/helper-buffer": { - "version": "1.11.1", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", + "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==", "dev": true }, "@webassemblyjs/helper-numbers": { - "version": "1.11.1", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", + "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", "dev": true, "requires": { - "@webassemblyjs/floating-point-hex-parser": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", + "@webassemblyjs/floating-point-hex-parser": "1.11.6", + "@webassemblyjs/helper-api-error": "1.11.6", "@xtuc/long": "4.2.2" } }, "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.1", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", + "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", "dev": true }, "@webassemblyjs/helper-wasm-section": { - "version": "1.11.1", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", + "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1" + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/wasm-gen": "1.11.6" } }, "@webassemblyjs/ieee754": { - "version": "1.11.1", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", + "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", "dev": true, "requires": { "@xtuc/ieee754": "^1.2.0" } }, "@webassemblyjs/leb128": { - "version": "1.11.1", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", + "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", "dev": true, "requires": { "@xtuc/long": "4.2.2" } }, "@webassemblyjs/utf8": { - "version": "1.11.1", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", + "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", "dev": true }, "@webassemblyjs/wasm-edit": { - "version": "1.11.1", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz", + "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/helper-wasm-section": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-opt": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", - "@webassemblyjs/wast-printer": "1.11.1" + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/helper-wasm-section": "1.11.6", + "@webassemblyjs/wasm-gen": "1.11.6", + "@webassemblyjs/wasm-opt": "1.11.6", + "@webassemblyjs/wasm-parser": "1.11.6", + "@webassemblyjs/wast-printer": "1.11.6" } }, "@webassemblyjs/wasm-gen": { - "version": "1.11.1", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz", + "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" } }, "@webassemblyjs/wasm-opt": { - "version": "1.11.1", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz", + "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1" + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/wasm-gen": "1.11.6", + "@webassemblyjs/wasm-parser": "1.11.6" } }, "@webassemblyjs/wasm-parser": { - "version": "1.11.1", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz", + "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-api-error": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" } }, "@webassemblyjs/wast-printer": { - "version": "1.11.1", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz", + "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/ast": "1.11.6", "@xtuc/long": "4.2.2" } }, "@webpack-cli/configtest": { - "version": "2.0.1", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz", + "integrity": "sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==", "dev": true, "requires": {} }, "@webpack-cli/info": { - "version": "2.0.1", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.2.tgz", + "integrity": "sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==", "dev": true, "requires": {} }, "@webpack-cli/serve": { - "version": "2.0.1", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.5.tgz", + "integrity": "sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==", "dev": true, "requires": {} }, "@xtuc/ieee754": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", "dev": true }, "@xtuc/long": { "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", "dev": true }, "abbrev": { @@ -11681,10 +13612,65 @@ "negotiator": "0.6.3" } }, + "acorn": { + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.9.0.tgz", + "integrity": "sha512-jaVNAFBHNLXspO543WnNNPZFRtavh3skAkITqD0/2aeMkKZTN+254PyhwxFYrk3vQ1xfY+2wbesJMs/JC8/PwQ==", + "dev": true + }, + "acorn-import-assertions": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", + "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", + "dev": true, + "requires": {} + }, + "acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "requires": {} + }, "aes-js": { - "version": "4.0.0-beta.3", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.3.tgz", - "integrity": "sha512-/xJX0/VTPcbc5xQE2VUP91y1xN8q/rDfhEzLm+vLc3hYvb5+qHCnpJRuFcrKn63zumK/sCwYYzhG8HP78JYSTA==" + "version": "4.0.0-beta.5", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", + "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==" + }, + "agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "requires": { + "debug": "4" + } + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "requires": {} + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==", + "dev": true, + "optional": true }, "ansi-colors": { "version": "4.1.1", @@ -11692,38 +13678,114 @@ "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, "requires": { "color-convert": "^1.9.0" - }, - "dependencies": { - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - } } }, + "anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, "arr-union": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", "integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==", "dev": true }, + "array-buffer-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "dev": true, + "peer": true, + "requires": { + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" + } + }, + "array-includes": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz", + "integrity": "sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==", + "dev": true, + "peer": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "get-intrinsic": "^1.1.3", + "is-string": "^1.0.7" + } + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==", + "dev": true + }, + "array.prototype.flat": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", + "integrity": "sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==", + "dev": true, + "peer": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" + } + }, + "array.prototype.flatmap": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", + "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", + "dev": true, + "peer": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" + } + }, "assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", @@ -11742,6 +13804,19 @@ "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==", "dev": true }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, + "available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true, + "peer": true + }, "axios": { "version": "0.26.1", "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", @@ -11775,6 +13850,44 @@ "test-exclude": "^6.0.0" } }, + "babel-plugin-polyfill-corejs2": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.3.tgz", + "integrity": "sha512-bM3gHc337Dta490gg+/AseNB9L4YLHxq1nGKZZSHbhXv4aTYU2MD2cjza1Ru4S6975YLTaL1K8uJf6ukJhhmtw==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.17.7", + "@babel/helper-define-polyfill-provider": "^0.4.0", + "semver": "^6.1.1" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "babel-plugin-polyfill-corejs3": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.1.tgz", + "integrity": "sha512-ikFrZITKg1xH6pLND8zT14UPgjKHiGLqex7rGEZCH2EvhsneJaJPemmpQaIZV5AL03II+lXylw3UmddDK8RU5Q==", + "dev": true, + "requires": { + "@babel/helper-define-polyfill-provider": "^0.4.0", + "core-js-compat": "^3.30.1" + } + }, + "babel-plugin-polyfill-regenerator": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.0.tgz", + "integrity": "sha512-hDJtKjMLVa7Z+LwnTCxoDLQj6wdc+B8dun7ayF2fYieI6OzfuvcLMB32ihJZ4UhCBwNYGl5bg/x/P9cMdnkc2g==", + "dev": true, + "requires": { + "@babel/helper-define-polyfill-provider": "^0.4.0" + } + }, "babel-plugin-source-map-support": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/babel-plugin-source-map-support/-/babel-plugin-source-map-support-2.2.0.tgz", @@ -11784,6 +13897,12 @@ "@babel/helper-module-imports": "^7.16.7" } }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, "base": { "version": "0.11.2", "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", @@ -11810,17 +13929,52 @@ } } }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true + }, "base64id": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==", "dev": true }, + "big-integer": { + "version": "1.6.51", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", + "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", + "dev": true + }, + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true + }, "bignumber.js": { "version": "9.1.1", "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz", "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==" }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true + }, + "bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, "bn.js": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", @@ -11846,18 +14000,6 @@ "unpipe": "1.0.0" }, "dependencies": { - "bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "dev": true - }, - "content-type": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "dev": true - }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -11867,48 +14009,33 @@ "ms": "2.0.0" } }, - "destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "dev": true - }, - "http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dev": true, - "requires": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - } - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true - }, - "statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true } } }, + "bplist-parser": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", + "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==", + "dev": true, + "requires": { + "big-integer": "^1.6.44" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "braces": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", @@ -11916,17 +14043,6 @@ "dev": true, "requires": { "fill-range": "^7.0.1" - }, - "dependencies": { - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - } } }, "brorand": { @@ -11941,23 +14057,59 @@ "dev": true }, "browserslist": { - "version": "4.21.5", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz", - "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==", + "version": "4.21.9", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.9.tgz", + "integrity": "sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==", + "requires": { + "caniuse-lite": "^1.0.30001503", + "electron-to-chromium": "^1.4.431", + "node-releases": "^2.0.12", + "update-browserslist-db": "^1.0.11" + } + }, + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001449", - "electron-to-chromium": "^1.4.284", - "node-releases": "^2.0.8", - "update-browserslist-db": "^1.0.10" + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" } }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "dev": true + }, + "buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", + "dev": true + }, "buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, + "bundle-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz", + "integrity": "sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==", + "dev": true, + "requires": { + "run-applescript": "^5.0.0" + } + }, + "bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "dev": true + }, "cache-base": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", @@ -11975,12 +14127,33 @@ "unset-value": "^1.0.0" } }, - "caniuse-lite": { - "version": "1.0.30001464", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001464.tgz", - "integrity": "sha512-oww27MtUmusatpRpCGSOneQk2/l5czXANDSFvsc7VuOQ86s3ANhZetpwXNf1zY/zdfP63Xvjz325DAdAoES13g==", + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, + "caniuse-lite": { + "version": "1.0.30001503", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001503.tgz", + "integrity": "sha512-Sf9NiF+wZxPfzv8Z3iS0rXM1Do+iOy2Lxvib38glFX+08TCYYYGR5fRJXk4d77C4AYwhUjgYgMsMudbh2TqCKw==" + }, "chai": { "version": "4.3.7", "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.7.tgz", @@ -12000,7 +14173,6 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -12029,23 +14201,6 @@ "readdirp": "~3.6.0" }, "dependencies": { - "anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "optional": true - }, "glob-parent": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", @@ -12057,6 +14212,18 @@ } } }, + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true + }, + "chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "dev": true + }, "class-utils": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", @@ -12137,6 +14304,28 @@ } } }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + } + }, "collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", @@ -12148,24 +14337,40 @@ } }, "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "requires": { - "color-name": "~1.1.4" + "color-name": "1.1.3" } }, "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" }, "colorette": { - "version": "2.0.19", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", - "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true + }, + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", "dev": true }, "component-emitter": { @@ -12201,56 +14406,25 @@ "ms": "2.0.0" } }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "dev": true - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "dev": true - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "dev": true - }, - "finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", - "dev": true, - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "statuses": "~1.5.0", - "unpipe": "~1.0.0" - } - }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true - }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", - "dev": true, - "requires": { - "ee-first": "1.1.1" - } } } }, + "content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "dev": true + }, + "convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==" + }, "cookie": { "version": "0.4.2", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", @@ -12263,6 +14437,15 @@ "integrity": "sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==", "dev": true }, + "core-js-compat": { + "version": "3.31.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.31.0.tgz", + "integrity": "sha512-hM7YCu1cU6Opx7MXNu0NuumM0ezNeAeRKadixyiQELWY3vT3De9S4J5ZBMraWV2vZnrE1Cirl0GtFtDtMUXzPw==", + "dev": true, + "requires": { + "browserslist": "^4.21.5" + } + }, "cors": { "version": "2.8.5", "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", @@ -12273,6 +14456,15 @@ "vary": "^1" } }, + "cross-fetch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", + "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", + "dev": true, + "requires": { + "node-fetch": "2.6.7" + } + }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -12282,28 +14474,40 @@ "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" - }, - "dependencies": { - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } } }, + "custom-event": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", + "integrity": "sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg==", + "dev": true + }, + "date-format": { + "version": "4.0.14", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.14.tgz", + "integrity": "sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==", + "dev": true + }, "debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, "requires": { "ms": "2.1.2" } }, + "decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true + }, + "decode-uri-component": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", + "dev": true + }, "deep-eql": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", @@ -12313,12 +14517,85 @@ "type-detect": "^4.0.0" } }, + "deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "default-browser": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-4.0.0.tgz", + "integrity": "sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==", + "dev": true, + "requires": { + "bundle-name": "^3.0.0", + "default-browser-id": "^3.0.0", + "execa": "^7.1.1", + "titleize": "^3.0.0" + } + }, + "default-browser-id": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-3.0.0.tgz", + "integrity": "sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==", + "dev": true, + "requires": { + "bplist-parser": "^0.2.0", + "untildify": "^4.0.0" + } + }, + "define-lazy-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", + "dev": true + }, + "define-properties": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "dev": true, + "peer": true, + "requires": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + } + }, "depd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", "dev": true }, + "destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "dev": true + }, + "detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==", + "dev": true + }, + "devtools-protocol": { + "version": "0.0.981744", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.981744.tgz", + "integrity": "sha512-0cuGS8+jhR67Fy7qG3i3Pc7Aw494sb9yG9QgpG97SFVWwolgYjlhJg7n+UaHxOQT30d1TYu/EYe9k01ivLErIg==", + "dev": true + }, "di": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz", @@ -12340,6 +14617,15 @@ "path-type": "^4.0.0" } }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, "dom-serialize": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", @@ -12350,34 +14636,34 @@ "ent": "~2.2.0", "extend": "^3.0.0", "void-elements": "^2.0.0" - }, - "dependencies": { - "custom-event": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", - "integrity": "sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg==", - "dev": true - }, - "ent": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", - "integrity": "sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA==", - "dev": true - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - } } }, - "electron-to-chromium": { - "version": "1.4.325", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.325.tgz", - "integrity": "sha512-K1C03NT4I7BuzsRdCU5RWkgZxtswnKDYM6/eMhkEXqKu4e5T+ck610x3FPzu1y7HVFSiQKZqP16gnJzPpji1TQ==", + "ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "edge-launcher": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/edge-launcher/-/edge-launcher-1.2.2.tgz", + "integrity": "sha512-JcD5WBi3BHZXXVSSeEhl6sYO8g5cuynk/hifBzds2Bp4JdzCGLNMHgMCKu5DvrO1yatMgF0goFsxXRGus0yh1g==", + "dev": true + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", "dev": true }, + "electron-to-chromium": { + "version": "1.4.432", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.432.tgz", + "integrity": "sha512-yz3U/khQgAFT2HURJA3/F4fKIyO2r5eK09BQzBZFd6BvBSSaRuzKc2ZNBHtJcO75/EKiRYbVYJZ2RB0P4BuD2g==" + }, "elliptic": { "version": "6.5.4", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", @@ -12399,6 +14685,33 @@ } } }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", + "dev": true + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "dev": true + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, "engine.io": { "version": "6.4.2", "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.4.2.tgz", @@ -12427,20 +14740,131 @@ } }, "engine.io-parser": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.6.tgz", - "integrity": "sha512-tjuoZDMAdEhVnSFleYPCtdL2GXwVTGtNjoeJd9IhIG3C1xs9uwxqRNEu5WpnDZCaozwVlK/nuQhpodhXSIMaxw==", + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.7.tgz", + "integrity": "sha512-P+jDFbvK6lE3n1OL+q9KuzdOFWkkZ/cMV9gol/SbVfpyqfvrfrFTOFJ6fQm2VC3PZHlU3QPhVwmbsCnauHF2MQ==", + "dev": true + }, + "enhanced-resolve": { + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", + "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + } + }, + "ent": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", + "integrity": "sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA==", "dev": true }, "envinfo": { "version": "7.8.1", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", + "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", + "dev": true + }, + "es-abstract": { + "version": "1.21.2", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.2.tgz", + "integrity": "sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg==", + "dev": true, + "peer": true, + "requires": { + "array-buffer-byte-length": "^1.0.0", + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-set-tostringtag": "^2.0.1", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.2.0", + "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.5", + "is-array-buffer": "^3.0.2", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.10", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.3", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.4.3", + "safe-regex-test": "^1.0.0", + "string.prototype.trim": "^1.2.7", + "string.prototype.trimend": "^1.0.6", + "string.prototype.trimstart": "^1.0.6", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.9" + } + }, + "es-module-lexer": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.3.0.tgz", + "integrity": "sha512-vZK7T0N2CBmBOixhmjdqx2gWVbFZ4DXZ/NyRMZVlJXPa7CyFS+/a4QQsDGDQy9ZfEzxFuNEsMLeQJnKP2p5/JA==", + "dev": true + }, + "es-set-tostringtag": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", + "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "dev": true, + "peer": true, + "requires": { + "get-intrinsic": "^1.1.3", + "has": "^1.0.3", + "has-tostringtag": "^1.0.0" + } + }, + "es-shim-unscopables": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", + "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "dev": true, + "peer": true, + "requires": { + "has": "^1.0.3" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "peer": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", "dev": true }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==" }, "escodegen": { "version": "1.8.1", @@ -12461,29 +14885,398 @@ "integrity": "sha512-25w1fMXQrGdoquWnScXZGckOv+Wes+JDnuN/+7ex3SauFRS72r2lFDec0EKPt2YD1wUJ/IrfEex+9yp4hfSOJA==", "dev": true }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + } + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + } + } + }, + "eslint": { + "version": "8.42.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.42.0.tgz", + "integrity": "sha512-ulg9Ms6E1WPf67PHaEY4/6E2tEn5/f7FXGzr3t9cBMugOmf1INYvuUwwh1aXQN4MfJ6a5K2iNwP3w4AColvI9A==", + "dev": true, + "requires": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.4.0", + "@eslint/eslintrc": "^2.0.3", + "@eslint/js": "8.42.0", + "@humanwhocodes/config-array": "^0.11.10", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.0", + "eslint-visitor-keys": "^3.4.1", + "espree": "^9.5.2", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "globals": { + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "requires": { + "p-locate": "^5.0.0" + } + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "requires": { + "p-limit": "^3.0.2" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "eslint-import-resolver-node": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz", + "integrity": "sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==", + "dev": true, + "peer": true, + "requires": { + "debug": "^3.2.7", + "is-core-module": "^2.11.0", + "resolve": "^1.22.1" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "peer": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "eslint-import-resolver-typescript": { + "version": "3.5.5", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.5.5.tgz", + "integrity": "sha512-TdJqPHs2lW5J9Zpe17DZNQuDnox4xo2o+0tE7Pggain9Rbc19ik8kFtXdxZ250FVx2kF4vlt2RSf4qlUpG7bhw==", + "dev": true, + "requires": { + "debug": "^4.3.4", + "enhanced-resolve": "^5.12.0", + "eslint-module-utils": "^2.7.4", + "get-tsconfig": "^4.5.0", + "globby": "^13.1.3", + "is-core-module": "^2.11.0", + "is-glob": "^4.0.3", + "synckit": "^0.8.5" + } + }, + "eslint-module-utils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", + "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", + "dev": true, + "requires": { + "debug": "^3.2.7" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "eslint-plugin-import": { + "version": "2.27.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz", + "integrity": "sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==", + "dev": true, + "peer": true, + "requires": { + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "array.prototype.flatmap": "^1.3.1", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.7", + "eslint-module-utils": "^2.7.4", + "has": "^1.0.3", + "is-core-module": "^2.11.0", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.values": "^1.1.6", + "resolve": "^1.22.1", + "semver": "^6.3.0", + "tsconfig-paths": "^3.14.1" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "peer": true, + "requires": { + "ms": "^2.1.1" + } + }, + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "peer": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "peer": true } } }, + "eslint-scope": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", + "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + } + }, + "eslint-visitor-keys": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", + "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", + "dev": true + }, + "espree": { + "version": "9.5.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz", + "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==", + "dev": true, + "requires": { + "acorn": "^8.8.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + } + }, "esprima": { "version": "2.7.3", "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", "integrity": "sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A==", "dev": true }, + "esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + } + }, + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, "ethers": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.2.0.tgz", - "integrity": "sha512-F/RiSDU8d7k9wpt6iMfJyGSuHM3/FmzjZwQkGwfLxLj5aaoAagjBMIyAg96FL2LJEerRHBRenTep6+bF48Ei1w==", + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.6.0.tgz", + "integrity": "sha512-7D2U+n8eZYmh592VZqap9vBu50jN7YUDHqAmwBYTMntmUKC9RVgcqcFbd+3DTCOQ1jMyK6QHv1usbcfgiGaHOA==", "requires": { - "@adraffy/ens-normalize": "1.9.0", + "@adraffy/ens-normalize": "1.9.2", "@noble/hashes": "1.1.2", "@noble/secp256k1": "1.7.1", - "aes-js": "4.0.0-beta.3", + "@types/node": "18.15.13", + "aes-js": "4.0.0-beta.5", "tslib": "2.4.0", "ws": "8.5.0" } @@ -12498,6 +15291,31 @@ "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==" }, + "execa": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-7.1.1.tgz", + "integrity": "sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.1", + "human-signals": "^4.3.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^3.0.7", + "strip-final-newline": "^3.0.0" + }, + "dependencies": { + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + } + } + }, "expand-brackets": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", @@ -12608,31 +15426,88 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true + } + } + }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", "dev": true, "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" + "is-extendable": "^0.1.0" } }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", "dev": true } } }, + "extract-zip": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", + "dev": true, + "requires": { + "@types/yauzl": "^2.9.1", + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" + } + }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -12669,96 +15544,69 @@ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, "fastest-levenshtein": { "version": "1.0.16", "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", "dev": true }, - "find-cache-dir": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", - "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", "dev": true, "requires": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - }, - "dependencies": { - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", - "dev": true - } + "reusify": "^1.0.4" } }, - "findup-sync": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", - "integrity": "sha512-vs+3unmJT45eczmcAZ6zMJtxN3l/QXeccaXQx5cu/MeJMhewVfoWZqibRkOxPnmoR59+Zy5hjabfQc6JLSah4g==", + "fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", "dev": true, "requires": { - "detect-file": "^1.0.0", - "is-glob": "^3.1.0", - "micromatch": "^3.0.4", - "resolve-dir": "^1.0.1" + "pend": "~1.2.0" + } + }, + "file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "requires": { + "flat-cache": "^3.0.4" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" }, "dependencies": { - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", - "dev": true - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==", - "dev": true - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "dev": true - } - } - }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -12768,57 +15616,74 @@ "ms": "2.0.0" } }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - } - }, - "detect-file": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", - "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==", + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", "dev": true, "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" + "ee-first": "1.1.1" } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + } + } + }, + "find-cache-dir": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + } + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "findup-sync": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", + "integrity": "sha512-vs+3unmJT45eczmcAZ6zMJtxN3l/QXeccaXQx5cu/MeJMhewVfoWZqibRkOxPnmoR59+Zy5hjabfQc6JLSah4g==", + "dev": true, + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^3.1.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + }, + "dependencies": { + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "dev": true, "requires": { + "arr-flatten": "^1.1.0", "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", "to-regex": "^3.0.1" }, "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, "extend-shallow": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", @@ -12827,12 +15692,6 @@ "requires": { "is-extendable": "^0.1.0" } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "dev": true } } }, @@ -12856,63 +15715,14 @@ "requires": { "is-extendable": "^0.1.0" } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "dev": true - } - } - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==", - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } } } }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "dev": true }, "is-glob": { "version": "3.1.0", @@ -12964,99 +15774,6 @@ "to-regex": "^3.0.2" } }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "dev": true - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - } - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "dev": true - }, "to-regex-range": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", @@ -13069,23 +15786,187 @@ } } }, + "flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true + }, + "flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "requires": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + } + }, + "flatted": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "dev": true + }, "follow-redirects": { "version": "1.15.2", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==" }, + "for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "peer": true, + "requires": { + "is-callable": "^1.1.3" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", + "dev": true + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fs-access": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz", + "integrity": "sha512-05cXDIwNbFaoFWaz5gNHlUTbH5whiss/hr/ibzPd4MH3cR4w0ZKeIPiVdbyJurg3O5r/Bjpvn9KOb1/rPMf3nA==", + "dev": true, + "requires": { + "null-check": "^1.0.0" + } + }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true + }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, + "function.prototype.name": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "dev": true, + "peer": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + } + }, + "functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "peer": true + }, + "gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==" + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, "get-func-name": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", "dev": true }, + "get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + } + }, + "get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true + }, + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "peer": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + } + }, + "get-tsconfig": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.6.0.tgz", + "integrity": "sha512-lgbo68hHTQnFddybKbbs/RDRJnJT5YyGy2kQzVwbq+g67X73i+5MVTval34QxGkOe9X5Ujf1UYpCaphLyltjEg==", + "dev": true, + "requires": { + "resolve-pkg-maps": "^1.0.0" + } + }, "get-value": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", @@ -13105,6 +15986,32 @@ "path-is-absolute": "^1.0.0" } }, + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "requires": { + "is-glob": "^4.0.3" + } + }, + "glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true + }, + "global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dev": true, + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, "global-prefix": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", @@ -13118,21 +16025,36 @@ "which": "^1.2.14" }, "dependencies": { - "expand-tilde": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "requires": { - "homedir-polyfill": "^1.0.1" + "isexe": "^2.0.0" } } } }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" + }, + "globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "peer": true, + "requires": { + "define-properties": "^1.1.3" + } + }, "globby": { - "version": "13.1.3", - "resolved": "https://registry.npmjs.org/globby/-/globby-13.1.3.tgz", - "integrity": "sha512-8krCNHXvlCgHDpegPzleMq07yMYTO2sXKASmZmquEYWEmCx6J5UTRbp5RwMJkTJGtcQ44YpiUYUiN0b9mzy8Bw==", + "version": "13.1.4", + "resolved": "https://registry.npmjs.org/globby/-/globby-13.1.4.tgz", + "integrity": "sha512-iui/IiiW+QrJ1X1hKH5qwlMQyv34wJAYwH1vrf8b9kBA4sNiif3gKsMHa+BrdnOpEudWjpotfa7LrTzB1ERS/g==", "dev": true, "requires": { "dir-glob": "^3.0.1", @@ -13142,10 +16064,26 @@ "slash": "^4.0.0" } }, + "gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "peer": true, + "requires": { + "get-intrinsic": "^1.1.3" + } + }, "graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, "handlebars": { @@ -13169,12 +16107,59 @@ } } }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "peer": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==" + }, + "has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dev": true, + "peer": true, + "requires": { + "get-intrinsic": "^1.1.1" + } + }, + "has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true + }, "has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true }, + "has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "peer": true, + "requires": { + "has-symbols": "^1.0.2" + } + }, "has-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", @@ -13261,6 +16246,33 @@ "parse-passwd": "^1.0.0" } }, + "html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dev": true, + "requires": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "dependencies": { + "statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true + } + } + }, "http-proxy": { "version": "1.18.1", "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", @@ -13280,26 +16292,87 @@ } } }, + "https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "requires": { + "agent-base": "6", + "debug": "4" + } + }, + "human-signals": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", + "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==", + "dev": true + }, "husky": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/husky/-/husky-7.0.4.tgz", "integrity": "sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ==", "dev": true }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true + }, "ignore": { "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", "dev": true }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + } + } + }, "import-local": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", "dev": true, "requires": { "pkg-dir": "^4.2.0", "resolve-cwd": "^3.0.0" } }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true + }, "inflight": { "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "dev": true, "requires": { "once": "^1.3.0", @@ -13307,7 +16380,9 @@ } }, "inherits": { - "version": "2.0.4" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "ini": { "version": "1.3.8", @@ -13316,65 +16391,124 @@ "dev": true }, "injectpromise": { - "version": "1.0.0" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/injectpromise/-/injectpromise-1.0.0.tgz", + "integrity": "sha512-qNq5wy4qX4uWHcVFOEU+RqZkoVG65FhvGkyDWbuBxILMjK6A1LFf5A1mgXZkD4nRx5FCorD81X/XvPKp/zVfPA==" + }, + "internal-slot": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", + "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", + "dev": true, + "peer": true, + "requires": { + "get-intrinsic": "^1.2.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + } }, "interpret": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", + "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", "dev": true }, "is-accessor-descriptor": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, "requires": { "kind-of": "^6.0.0" } }, + "is-array-buffer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "dev": true, + "peer": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" + } + }, + "is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "peer": true, + "requires": { + "has-bigints": "^1.0.1" + } + }, "is-binary-path": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, "requires": { "binary-extensions": "^2.0.0" - }, - "dependencies": { - "binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true - } + } + }, + "is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "peer": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" } }, "is-buffer": { "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", "dev": true }, + "is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "peer": true + }, "is-core-module": { - "version": "2.11.0", + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", + "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", "dev": true, "requires": { "has": "^1.0.3" - }, - "dependencies": { - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - } } }, "is-data-descriptor": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "requires": { "kind-of": "^6.0.0" } }, + "is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "peer": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, "is-descriptor": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, "requires": { "is-accessor-descriptor": "^1.0.0", @@ -13384,10 +16518,14 @@ }, "is-docker": { "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", "dev": true }, "is-extendable": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "dev": true, "requires": { "is-plain-object": "^2.0.4" @@ -13395,44 +16533,173 @@ }, "is-extglob": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true }, "is-fullwidth-code-point": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, "is-glob": { "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "requires": { "is-extglob": "^2.1.1" } }, + "is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dev": true, + "requires": { + "is-docker": "^3.0.0" + }, + "dependencies": { + "is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "dev": true + } + } + }, + "is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "dev": true, + "peer": true + }, "is-number": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "peer": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true }, "is-plain-obj": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true }, "is-plain-object": { "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, "requires": { "isobject": "^3.0.1" } }, + "is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "peer": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "peer": true, + "requires": { + "call-bind": "^1.0.2" + } + }, + "is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true + }, + "is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "peer": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "peer": true, + "requires": { + "has-symbols": "^1.0.2" + } + }, + "is-typed-array": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", + "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "dev": true, + "peer": true, + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + } + }, "is-unicode-supported": { "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true }, + "is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "peer": true, + "requires": { + "call-bind": "^1.0.2" + } + }, "is-windows": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", "dev": true }, "is-wsl": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", "dev": true, "requires": { "is-docker": "^2.0.0" @@ -13446,14 +16713,20 @@ }, "isbinaryfile": { "version": "4.0.10", + "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.10.tgz", + "integrity": "sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==", "dev": true }, "isexe": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, "isobject": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", "dev": true }, "istanbul": { @@ -13480,23 +16753,40 @@ "dependencies": { "has-flag": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA==", "dev": true }, "resolve": { "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg==", "dev": true }, "supports-color": { "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A==", "dev": true, "requires": { "has-flag": "^1.0.0" } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } } } }, "istanbul-lib-coverage": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", "dev": true }, "istanbul-lib-instrument": { @@ -13548,19 +16838,60 @@ } } }, + "istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, "istanbul-reports": { "version": "3.1.5", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", + "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", "dev": true, "requires": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" + } + }, + "jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" }, "dependencies": { - "html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } } } }, @@ -13571,7 +16902,8 @@ }, "js-tokens": { "version": "4.0.0", - "dev": true + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "js-yaml": { "version": "3.14.1", @@ -13583,15 +16915,6 @@ "esprima": "^4.0.0" }, "dependencies": { - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", @@ -13602,19 +16925,31 @@ }, "jsesc": { "version": "2.5.2", - "dev": true + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==" }, "json-parse-even-better-errors": { "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, "json-schema-traverse": { "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, "json5": { "version": "2.2.3", - "dev": true + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==" }, "jsonfile": { "version": "4.0.0", @@ -13639,13 +16974,17 @@ "dependencies": { "lru-cache": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, "requires": { "yallist": "^4.0.0" } }, "semver": { - "version": "7.3.8", + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", + "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -13653,38 +16992,27 @@ }, "yallist": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true } } }, "jwa": { "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", "dev": true, "requires": { "buffer-equal-constant-time": "1.0.1", "ecdsa-sig-formatter": "1.0.11", "safe-buffer": "^5.0.1" - }, - "dependencies": { - "buffer-equal-constant-time": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", - "dev": true - }, - "ecdsa-sig-formatter": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", - "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - } } }, "jws": { "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", "dev": true, "requires": { "jwa": "^1.4.1", @@ -13692,9 +17020,9 @@ } }, "karma": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/karma/-/karma-6.4.1.tgz", - "integrity": "sha512-Cj57NKOskK7wtFWSlMvZf459iX+kpYIPXmkNUzP2WAFcA7nhr/ALn5R7sw3w+1udFDcpMx/tuB8d5amgm3ijaA==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/karma/-/karma-6.4.2.tgz", + "integrity": "sha512-C6SU/53LB31BEgRg+omznBEMY4SjHU3ricV6zBcAe1EeILKkeScr+fZXtaI5WyDbkVowJxxAI6h73NcFPmXolQ==", "dev": true, "requires": { "@colors/colors": "1.5.0", @@ -13723,14 +17051,10 @@ "yargs": "^16.1.1" }, "dependencies": { - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, "glob": { "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -13743,31 +17067,37 @@ }, "source-map": { "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true } } }, "karma-chrome-launcher": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz", + "integrity": "sha512-uf/ZVpAabDBPvdPdveyk1EPgbnloPvFFGgmRhYLTDH7gEB4nZdSBk8yTU47w1g/drLSx5uMOkjKk7IWKfWg/+w==", "dev": true, "requires": { "fs-access": "^1.0.0", "which": "^1.2.1" }, "dependencies": { - "fs-access": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz", - "integrity": "sha512-05cXDIwNbFaoFWaz5gNHlUTbH5whiss/hr/ibzPd4MH3cR4w0ZKeIPiVdbyJurg3O5r/Bjpvn9KOb1/rPMf3nA==", + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "requires": { - "null-check": "^1.0.0" + "isexe": "^2.0.0" } } } }, "karma-coverage": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/karma-coverage/-/karma-coverage-2.2.0.tgz", + "integrity": "sha512-gPVdoZBNDZ08UCzdMHHhEImKrw1+PAOQOIiffv1YsvxFhBjqvo/SVXNk4tqn1SYqX0BJZT6S/59zgxiBe+9OuA==", "dev": true, "requires": { "istanbul-lib-coverage": "^3.2.0", @@ -13776,25 +17106,6 @@ "istanbul-lib-source-maps": "^4.0.1", "istanbul-reports": "^3.0.5", "minimatch": "^3.0.4" - }, - "dependencies": { - "istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", - "dev": true, - "requires": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } } }, "karma-coverage-istanbul-reporter": { @@ -13810,14 +17121,10 @@ "minimatch": "^3.0.4" }, "dependencies": { - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, "glob": { "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -13830,6 +17137,8 @@ }, "istanbul-lib-source-maps": { "version": "3.0.6", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz", + "integrity": "sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw==", "dev": true, "requires": { "debug": "^4.1.1", @@ -13841,12 +17150,16 @@ "dependencies": { "istanbul-lib-coverage": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", + "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", "dev": true } } }, "make-dir": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", "dev": true, "requires": { "pify": "^4.0.1", @@ -13855,6 +17168,8 @@ }, "rimraf": { "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", "dev": true, "requires": { "glob": "^7.1.3" @@ -13862,27 +17177,25 @@ }, "source-map": { "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true } } }, "karma-edge-launcher": { "version": "0.4.2", + "resolved": "https://registry.npmjs.org/karma-edge-launcher/-/karma-edge-launcher-0.4.2.tgz", + "integrity": "sha512-YAJZb1fmRcxNhMIWYsjLuxwODBjh2cSHgTW/jkVmdpGguJjLbs9ZgIK/tEJsMQcBLUkO+yO4LBbqYxqgGW2HIw==", "dev": true, "requires": { "edge-launcher": "1.2.2" - }, - "dependencies": { - "edge-launcher": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/edge-launcher/-/edge-launcher-1.2.2.tgz", - "integrity": "sha512-JcD5WBi3BHZXXVSSeEhl6sYO8g5cuynk/hifBzds2Bp4JdzCGLNMHgMCKu5DvrO1yatMgF0goFsxXRGus0yh1g==", - "dev": true - } } }, "karma-firefox-launcher": { "version": "1.3.0", + "resolved": "https://registry.npmjs.org/karma-firefox-launcher/-/karma-firefox-launcher-1.3.0.tgz", + "integrity": "sha512-Fi7xPhwrRgr+94BnHX0F5dCl1miIW4RHnzjIGxF8GaIEp7rNqX7LSi7ok63VXs3PS/5MQaQMhGxw+bvD+pibBQ==", "dev": true, "requires": { "is-wsl": "^2.1.0" @@ -13890,6 +17203,8 @@ }, "karma-mocha": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/karma-mocha/-/karma-mocha-2.0.1.tgz", + "integrity": "sha512-Tzd5HBjm8his2OA4bouAsATYEpZrp9vC7z5E5j4C5Of5Rrs1jY67RAwXNcVmd/Bnk1wgvQRou0zGVLey44G4tQ==", "dev": true, "requires": { "minimist": "^1.2.3" @@ -13897,6 +17212,8 @@ }, "karma-sourcemap-loader": { "version": "0.3.8", + "resolved": "https://registry.npmjs.org/karma-sourcemap-loader/-/karma-sourcemap-loader-0.3.8.tgz", + "integrity": "sha512-zorxyAakYZuBcHRJE+vbrK2o2JXLFWK8VVjiT/6P+ltLBUGUvqTEkUiQ119MGdOrK7mrmxXHZF1/pfT6GgIZ6g==", "dev": true, "requires": { "graceful-fs": "^4.1.2" @@ -13904,17 +17221,11 @@ }, "karma-spec-reporter": { "version": "0.0.32", + "resolved": "https://registry.npmjs.org/karma-spec-reporter/-/karma-spec-reporter-0.0.32.tgz", + "integrity": "sha512-ZXsYERZJMTNRR2F3QN11OWF5kgnT/K2dzhM+oY3CDyMrDI3TjIWqYGG7c15rR9wjmy9lvdC+CCshqn3YZqnNrA==", "dev": true, "requires": { "colors": "^1.1.2" - }, - "dependencies": { - "colors": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", - "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", - "dev": true - } } }, "karma-webpack": { @@ -13928,14 +17239,10 @@ "webpack-merge": "^4.1.5" }, "dependencies": { - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, "glob": { "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -13950,55 +17257,61 @@ }, "kind-of": { "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true }, "levn": { - "version": "0.3.0", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" } }, "loader-runner": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", "dev": true }, "loader-utils": { "version": "2.0.4", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", "dev": true, "requires": { "big.js": "^5.2.2", "emojis-list": "^3.0.0", "json5": "^2.1.2" - }, - "dependencies": { - "big.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", - "dev": true - }, - "emojis-list": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", - "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", - "dev": true - } } }, "locate-path": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "requires": { "p-locate": "^4.1.0" } }, "lodash": { - "version": "4.17.21" + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "lodash.debounce": { "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", + "dev": true + }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, "log-symbols": { @@ -14030,6 +17343,21 @@ "supports-color": "^7.1.0" } }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -14049,6 +17377,8 @@ }, "log4js": { "version": "6.9.1", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.9.1.tgz", + "integrity": "sha512-1somDdy9sChrr9/f4UlzhdaGfDR2c/SaD2a4T7qEkG4jTS57/B3qmnjLYePwQ8cqWnUHZI0iAKxMBpCZICiZ2g==", "dev": true, "requires": { "date-format": "^4.0.14", @@ -14056,24 +17386,12 @@ "flatted": "^3.2.7", "rfdc": "^1.3.0", "streamroller": "^3.1.5" - }, - "dependencies": { - "date-format": { - "version": "4.0.14", - "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.14.tgz", - "integrity": "sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==", - "dev": true - }, - "flatted": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", - "dev": true - } } }, "loupe": { "version": "2.3.6", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", + "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", "dev": true, "requires": { "get-func-name": "^2.0.0" @@ -14081,7 +17399,8 @@ }, "lru-cache": { "version": "5.1.1", - "dev": true, + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "requires": { "yallist": "^3.0.2" } @@ -14105,6 +17424,8 @@ }, "map-cache": { "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", "dev": true }, "map-visit": { @@ -14128,26 +17449,10 @@ "stack-trace": "0.0.10" }, "dependencies": { - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", - "dev": true - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==", - "dev": true - }, "braces": { "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "dev": true, "requires": { "arr-flatten": "^1.1.0", @@ -14162,80 +17467,6 @@ "to-regex": "^3.0.1" }, "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - } - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, "extend-shallow": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", @@ -14249,6 +17480,8 @@ }, "fill-range": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==", "dev": true, "requires": { "extend-shallow": "^2.0.1", @@ -14259,6 +17492,8 @@ "dependencies": { "extend-shallow": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", "dev": true, "requires": { "is-extendable": "^0.1.0" @@ -14266,61 +17501,16 @@ } } }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==", - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, "is-extendable": { "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", "dev": true }, "is-number": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", "dev": true, "requires": { "kind-of": "^3.0.2" @@ -14328,6 +17518,8 @@ "dependencies": { "kind-of": { "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", "dev": true, "requires": { "is-buffer": "^1.1.5" @@ -14337,6 +17529,8 @@ }, "micromatch": { "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", "dev": true, "requires": { "arr-diff": "^4.0.0", @@ -14348,101 +17542,16 @@ "fragment-cache": "^0.2.1", "kind-of": "^6.0.2", "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - } - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "dev": true + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } }, "to-regex-range": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==", "dev": true, "requires": { "is-number": "^3.0.0", @@ -14453,18 +17562,26 @@ }, "media-typer": { "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", "dev": true }, "merge-stream": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "dev": true }, "merge2": { "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true }, "micromatch": { "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", "dev": true, "requires": { "braces": "^3.0.2", @@ -14473,19 +17590,31 @@ }, "mime": { "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", + "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==", "dev": true }, "mime-db": { "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "dev": true }, "mime-types": { "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dev": true, "requires": { "mime-db": "1.52.0" } }, + "mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true + }, "minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -14498,51 +17627,33 @@ }, "minimatch": { "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "requires": { "brace-expansion": "^1.1.7" - }, - "dependencies": { - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - } } }, "minimist": { "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "dev": true }, "mixin-deep": { "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", "dev": true, "requires": { "for-in": "^1.0.2", "is-extendable": "^1.0.1" - }, - "dependencies": { - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", - "dev": true - } } }, "mkdirp": { "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", "dev": true, "requires": { "minimist": "^1.2.6" @@ -14550,6 +17661,8 @@ }, "mkdirp-classic": { "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", "dev": true }, "mocha": { @@ -14583,44 +17696,30 @@ "dependencies": { "argparse": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, "escape-string-regexp": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true }, "find-up": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "requires": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" } }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, "glob": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -14633,6 +17732,8 @@ "dependencies": { "minimatch": { "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -14642,10 +17743,14 @@ }, "has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "js-yaml": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "requires": { "argparse": "^2.0.1" @@ -14653,6 +17758,8 @@ }, "locate-path": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "requires": { "p-locate": "^5.0.0" @@ -14660,6 +17767,8 @@ }, "minimatch": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", "dev": true, "requires": { "brace-expansion": "^2.0.1" @@ -14667,6 +17776,8 @@ "dependencies": { "brace-expansion": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "requires": { "balanced-match": "^1.0.0" @@ -14676,10 +17787,14 @@ }, "ms": { "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, "p-limit": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "requires": { "yocto-queue": "^0.1.0" @@ -14687,6 +17802,8 @@ }, "p-locate": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "requires": { "p-limit": "^3.0.2" @@ -14694,6 +17811,8 @@ }, "supports-color": { "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -14703,14 +17822,19 @@ }, "ms": { "version": "2.1.2", - "dev": true + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "nanoid": { "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", "dev": true }, "nanomatch": { "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", "dev": true, "requires": { "arr-diff": "^4.0.0", @@ -14724,171 +17848,14 @@ "regex-not": "^1.0.0", "snapdragon": "^0.8.1", "to-regex": "^3.0.1" - }, - "dependencies": { - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==", - "dev": true - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - } - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - } - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==", - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "dev": true - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "dev": true - } } }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, "negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", @@ -14897,21 +17864,28 @@ }, "neo-async": { "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "dev": true }, "node-fetch": { "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", "dev": true, "requires": { "whatwg-url": "^5.0.0" } }, "node-releases": { - "version": "2.0.10", - "dev": true + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.12.tgz", + "integrity": "sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ==" }, "nopt": { "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==", "dev": true, "requires": { "abbrev": "1" @@ -14919,10 +17893,31 @@ }, "normalize-path": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, + "npm-run-path": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", + "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "dev": true, + "requires": { + "path-key": "^4.0.0" + }, + "dependencies": { + "path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true + } + } + }, "null-check": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/null-check/-/null-check-1.0.0.tgz", + "integrity": "sha512-j8ZNHg19TyIQOWCGeeQJBuu6xZYIEurf8M1Qsfd8mFrGEfIZytbw18YjKWg+LcO25NowXGZXZpKAx+Ui3TFfDw==", "dev": true }, "object-assign": { @@ -15001,8 +17996,17 @@ }, "object-inspect": { "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", "dev": true }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "peer": true + }, "object-visit": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", @@ -15012,63 +18016,97 @@ "isobject": "^3.0.0" } }, + "object.assign": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "dev": true, + "peer": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + } + }, "object.pick": { "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", "dev": true, "requires": { "isobject": "^3.0.1" } }, + "object.values": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", + "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==", + "dev": true, + "peer": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + } + }, "on-finished": { "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", "dev": true, "requires": { "ee-first": "1.1.1" - }, - "dependencies": { - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "dev": true - } } }, "once": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, "requires": { "wrappy": "1" } }, + "onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "requires": { + "mimic-fn": "^4.0.0" + } + }, + "open": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/open/-/open-9.1.0.tgz", + "integrity": "sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==", + "dev": true, + "requires": { + "default-browser": "^4.0.0", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", + "is-wsl": "^2.2.0" + } + }, "optionator": { - "version": "0.8.3", + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", "dev": true, "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - }, - "dependencies": { - "deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - } + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" } }, "p-limit": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "requires": { "p-try": "^2.0.0" @@ -15076,6 +18114,8 @@ }, "p-locate": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "requires": { "p-limit": "^2.2.0" @@ -15083,8 +18123,19 @@ }, "p-try": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, "parse-passwd": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", @@ -15093,34 +18144,50 @@ }, "parseurl": { "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", "dev": true }, "pascalcase": { "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw==", "dev": true }, "path-exists": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true }, "path-is-absolute": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true }, "path-key": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true }, "path-parse": { "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, "path-type": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true }, "pathval": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", "dev": true }, "pend": { @@ -15131,76 +18198,74 @@ }, "picocolors": { "version": "1.0.0", - "dev": true + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" }, "picomatch": { "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, "pify": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "dev": true }, "pkg-dir": { "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, "requires": { "find-up": "^4.0.0" - }, - "dependencies": { - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - } } }, "posix-character-classes": { "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==", "dev": true }, "prelude-ls": { - "version": "1.1.2", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, "progress": { "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true }, "proxy-from-env": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", "dev": true }, "pump": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "dev": true, "requires": { "end-of-stream": "^1.1.0", "once": "^1.3.1" - }, - "dependencies": { - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - } } }, "punycode": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", "dev": true }, "puppeteer": { "version": "13.7.0", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-13.7.0.tgz", + "integrity": "sha512-U1uufzBjz3+PkpCxFrWzh4OrMIdIb2ztzCu0YEPfRHjHswcSwHZswnK+WdsOQJsRV8WeTg3jLhJR4D867+fjsA==", "dev": true, "requires": { "cross-fetch": "3.1.5", @@ -15215,85 +18280,38 @@ "tar-fs": "2.1.1", "unbzip2-stream": "1.4.3", "ws": "8.5.0" - }, - "dependencies": { - "agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dev": true, - "requires": { - "debug": "4" - } - }, - "cross-fetch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", - "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", - "dev": true, - "requires": { - "node-fetch": "2.6.7" - } - }, - "devtools-protocol": { - "version": "0.0.981744", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.981744.tgz", - "integrity": "sha512-0cuGS8+jhR67Fy7qG3i3Pc7Aw494sb9yG9QgpG97SFVWwolgYjlhJg7n+UaHxOQT30d1TYu/EYe9k01ivLErIg==", - "dev": true - }, - "extract-zip": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", - "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", - "dev": true, - "requires": { - "@types/yauzl": "^2.9.1", - "debug": "^4.1.1", - "get-stream": "^5.1.0", - "yauzl": "^2.10.0" - } - }, - "get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "dev": true, - "requires": { - "agent-base": "6", - "debug": "4" - } - } } }, "qjobs": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz", + "integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==", "dev": true }, "qs": { "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", "dev": true, "requires": { "side-channel": "^1.0.4" } }, "querystring-es3": { - "version": "0.2.1" + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==" }, "queue-microtask": { "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true }, "randombytes": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, "requires": { "safe-buffer": "^5.1.0" @@ -15301,56 +18319,26 @@ }, "range-parser": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", "dev": true }, "raw-body": { "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "dev": true, "requires": { "bytes": "3.1.2", "http-errors": "2.0.0", "iconv-lite": "0.4.24", "unpipe": "1.0.0" - }, - "dependencies": { - "bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "dev": true - }, - "http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dev": true, - "requires": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - } - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true - } } }, "readable-stream": { - "version": "3.6.1", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dev": true, "requires": { "inherits": "^2.0.3", @@ -15360,6 +18348,8 @@ }, "readdirp": { "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, "requires": { "picomatch": "^2.2.1" @@ -15367,6 +18357,8 @@ }, "rechoir": { "version": "0.8.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", + "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", "dev": true, "requires": { "resolve": "^1.20.0" @@ -15374,20 +18366,28 @@ }, "regenerate": { "version": "1.4.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", "dev": true }, "regenerate-unicode-properties": { "version": "10.1.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz", + "integrity": "sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ==", "dev": true, "requires": { "regenerate": "^1.4.2" } }, "regenerator-runtime": { - "version": "0.13.11" + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" }, "regenerator-transform": { "version": "0.15.1", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.1.tgz", + "integrity": "sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg==", "dev": true, "requires": { "@babel/runtime": "^7.8.4" @@ -15395,26 +18395,30 @@ }, "regex-not": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", "dev": true, "requires": { "extend-shallow": "^3.0.2", "safe-regex": "^1.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - } - } + } + }, + "regexp.prototype.flags": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", + "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", + "dev": true, + "peer": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "functions-have-names": "^1.2.3" } }, "regexpu-core": { - "version": "5.3.1", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.3.2.tgz", + "integrity": "sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==", "dev": true, "requires": { "@babel/regjsgen": "^0.8.0", @@ -15423,6 +18427,15 @@ "regjsparser": "^0.9.1", "unicode-match-property-ecmascript": "^2.0.0", "unicode-match-property-value-ecmascript": "^2.1.0" + } + }, + "regjsparser": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz", + "integrity": "sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==", + "dev": true, + "requires": { + "jsesc": "~0.5.0" }, "dependencies": { "jsesc": { @@ -15430,45 +18443,48 @@ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", "dev": true - }, - "regjsparser": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz", - "integrity": "sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==", - "dev": true, - "requires": { - "jsesc": "~0.5.0" - } } } }, "repeat-element": { "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", "dev": true }, "repeat-string": { "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", "dev": true }, "require-directory": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true }, "requires-port": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", "dev": true }, "resolve": { - "version": "1.22.1", + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", + "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", "dev": true, "requires": { - "is-core-module": "^2.9.0", + "is-core-module": "^2.11.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" } }, "resolve-cwd": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", "dev": true, "requires": { "resolve-from": "^5.0.0" @@ -15476,44 +18492,36 @@ }, "resolve-dir": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==", "dev": true, "requires": { "expand-tilde": "^2.0.0", "global-modules": "^1.0.0" - }, - "dependencies": { - "expand-tilde": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", - "dev": true, - "requires": { - "homedir-polyfill": "^1.0.1" - } - }, - "global-modules": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", - "dev": true, - "requires": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" - } - } } }, "resolve-from": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + }, + "resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", "dev": true }, "resolve-url": { "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==", "dev": true }, "ret": { "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", "dev": true }, "reusify": { @@ -15524,6 +18532,8 @@ }, "rfdc": { "version": "1.3.0", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", + "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", "dev": true }, "rimraf": { @@ -15535,12 +18545,6 @@ "glob": "^7.1.3" }, "dependencies": { - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, "glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -15557,8 +18561,86 @@ } } }, + "run-applescript": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", + "integrity": "sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==", + "dev": true, + "requires": { + "execa": "^5.0.0" + }, + "dependencies": { + "execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + } + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + }, + "human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true + }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true + } + } + }, "run-parallel": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, "requires": { "queue-microtask": "^1.2.2" @@ -15566,78 +18648,236 @@ }, "safe-buffer": { "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true }, "safe-regex": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg==", "dev": true, "requires": { "ret": "~0.1.10" } }, + "safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "dev": true, + "peer": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + } + }, "safer-buffer": { "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, "schema-utils": { "version": "2.7.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", + "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", "dev": true, "requires": { "@types/json-schema": "^7.0.5", "ajv": "^6.12.4", "ajv-keywords": "^3.5.2" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, + "serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, + "set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" }, "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "dev": true + } + } + }, + "setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true + }, + "shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, + "signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "slash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", + "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", + "dev": true + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", "dev": true, "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } } }, - "ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "requires": {} - } - } - }, - "semver": { - "version": "5.7.1" - }, - "serialize-javascript": { - "version": "6.0.0", - "dev": true, - "requires": { - "randombytes": "^2.1.0" - } - }, - "set-value": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", - "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" } }, "is-extendable": { @@ -15645,78 +18885,49 @@ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", "dev": true + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "dev": true } } }, - "setprototypeof": { - "version": "1.2.0", - "dev": true - }, - "shallow-clone": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", - "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", - "dev": true, - "requires": { - "kind-of": "^6.0.2" - } - }, - "shebang-command": { - "version": "2.0.0", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "dev": true - }, - "side-channel": { - "version": "1.0.4", + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", "dev": true, "requires": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" }, "dependencies": { - "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - } - }, - "get-intrinsic": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", - "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", "dev": true, "requires": { - "function-bind": "^1.1.1" + "is-descriptor": "^1.0.0" } } } }, - "slash": { - "version": "4.0.0", - "dev": true - }, "snapdragon-util": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", @@ -15738,26 +18949,28 @@ } }, "socket.io": { - "version": "4.6.1", + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.6.2.tgz", + "integrity": "sha512-Vp+lSks5k0dewYTfwgPT9UeGGd+ht7sCpB7p0e83VgO4X/AHYWhXITMrNk/pg8syY2bpx23ptClCQuHhqi2BgQ==", "dev": true, "requires": { "accepts": "~1.3.4", "base64id": "~2.0.0", "debug": "~4.3.2", - "engine.io": "~6.4.1", + "engine.io": "~6.4.2", "socket.io-adapter": "~2.5.2", - "socket.io-parser": "~4.2.1" + "socket.io-parser": "~4.2.4" + } + }, + "socket.io-adapter": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.2.tgz", + "integrity": "sha512-87C3LO/NOMc+eMcpcxUBebGjkpMDkNBS9tf7KJqcDsmL936EChtVva71Dw2q4tQcuVC+hAUy4an2NO/sYXmwRA==", + "dev": true, + "requires": { + "ws": "~8.11.0" }, "dependencies": { - "socket.io-adapter": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.2.tgz", - "integrity": "sha512-87C3LO/NOMc+eMcpcxUBebGjkpMDkNBS9tf7KJqcDsmL936EChtVva71Dw2q4tQcuVC+hAUy4an2NO/sYXmwRA==", - "dev": true, - "requires": { - "ws": "~8.11.0" - } - }, "ws": { "version": "8.11.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", @@ -15779,23 +18992,18 @@ }, "source-map": { "version": "0.2.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", + "integrity": "sha512-CBdZ2oa/BHhS4xj5DlhjWNHcan57/5YuvfdLf17iVmIpd9KRm+DFLmC6nBNj+6Ua7Kt3TmOjDpQT1aTYOQtoUA==", "dev": true, "optional": true, "requires": { "amdefine": ">=0.0.4" - }, - "dependencies": { - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==", - "dev": true, - "optional": true - } } }, "source-map-resolve": { "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", "dev": true, "requires": { "atob": "^2.1.2", @@ -15803,20 +19011,6 @@ "resolve-url": "^0.2.1", "source-map-url": "^0.4.0", "urix": "^0.1.0" - }, - "dependencies": { - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true - }, - "decode-uri-component": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", - "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", - "dev": true - } } }, "source-map-support": { @@ -15831,39 +19025,37 @@ "dependencies": { "source-map": { "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true } } }, "source-map-url": { "version": "0.4.1", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", + "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", "dev": true }, "split-string": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", "dev": true, "requires": { "extend-shallow": "^3.0.0" - }, - "dependencies": { - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - } - } } }, "sprintf-js": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true }, "stack-trace": { "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==", "dev": true }, "static-extend": { @@ -15946,38 +19138,25 @@ }, "statuses": { "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", "dev": true }, "streamroller": { "version": "3.1.5", + "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.1.5.tgz", + "integrity": "sha512-KFxaM7XT+irxvdqSP1LGLgNWbYN7ay5owZ3r/8t77p+EtSUAfUgtl7be3xtqtOmGUl9K9YPO2ca8133RlTjvKw==", "dev": true, "requires": { "date-format": "^4.0.14", "debug": "^4.3.4", "fs-extra": "^8.1.0" - }, - "dependencies": { - "date-format": { - "version": "4.0.14", - "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.14.tgz", - "integrity": "sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==", - "dev": true - }, - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - } } }, "string_decoder": { "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "dev": true, "requires": { "safe-buffer": "~5.2.0" @@ -15985,83 +19164,133 @@ }, "string-width": { "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "requires": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" - }, - "dependencies": { - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - } + } + }, + "string.prototype.trim": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", + "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", + "dev": true, + "peer": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + } + }, + "string.prototype.trimend": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", + "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", + "dev": true, + "peer": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + } + }, + "string.prototype.trimstart": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", + "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", + "dev": true, + "peer": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" } }, "strip-ansi": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { "ansi-regex": "^5.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - } } }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "peer": true + }, + "strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true + }, "strip-json-comments": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true }, "supports-color": { "version": "5.5.0", - "dev": true, + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "requires": { "has-flag": "^3.0.0" - }, - "dependencies": { - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true - } } }, "supports-preserve-symlinks-flag": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true }, + "synckit": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.5.tgz", + "integrity": "sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==", + "dev": true, + "requires": { + "@pkgr/utils": "^2.3.1", + "tslib": "^2.5.0" + }, + "dependencies": { + "tslib": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", + "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", + "dev": true + } + } + }, "tapable": { "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", "dev": true }, "tar-fs": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", "dev": true, "requires": { "chownr": "^1.1.1", "mkdirp-classic": "^0.5.2", "pump": "^3.0.0", "tar-stream": "^2.1.4" - }, - "dependencies": { - "chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "dev": true - } } }, "tar-stream": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", "dev": true, "requires": { "bl": "^4.0.3", @@ -16069,100 +19298,52 @@ "fs-constants": "^1.0.0", "inherits": "^2.0.3", "readable-stream": "^3.1.1" - }, - "dependencies": { - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true - }, - "bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dev": true, - "requires": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", - "dev": true - }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true - } } }, "terser": { - "version": "5.16.5", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.18.0.tgz", + "integrity": "sha512-pdL757Ig5a0I+owA42l6tIuEycRuM7FPY4n62h44mRLRfnOxJkkOHd6i89dOpwZlpF6JXBwaAHF6yWzFrt+QyA==", "dev": true, "requires": { - "@jridgewell/source-map": "^0.3.2", - "acorn": "^8.5.0", + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", "commander": "^2.20.0", "source-map-support": "~0.5.20" + } + }, + "terser-webpack-plugin": { + "version": "5.3.9", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz", + "integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "^0.3.17", + "jest-worker": "^27.4.5", + "schema-utils": "^3.1.1", + "serialize-javascript": "^6.0.1", + "terser": "^5.16.8" }, "dependencies": { - "@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "schema-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", "dev": true, "requires": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" } }, - "@jridgewell/source-map": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", - "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", + "serialize-javascript": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", + "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", "dev": true, "requires": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "randombytes": "^2.1.0" } - }, - "acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", - "dev": true - }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true } } }, @@ -16177,12 +19358,6 @@ "minimatch": "^3.0.4" }, "dependencies": { - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, "glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -16199,12 +19374,28 @@ } } }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, "through": { "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true + }, + "titleize": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz", + "integrity": "sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==", "dev": true }, "tmp": { "version": "0.2.1", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", "dev": true, "requires": { "rimraf": "^3.0.0" @@ -16212,7 +19403,8 @@ }, "to-fast-properties": { "version": "2.0.0", - "dev": true + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==" }, "to-object-path": { "version": "0.3.0", @@ -16236,38 +19428,20 @@ }, "to-regex": { "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", "dev": true, "requires": { "define-property": "^2.0.2", "extend-shallow": "^3.0.2", "regex-not": "^1.0.2", "safe-regex": "^1.1.0" - }, - "dependencies": { - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - } - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - } - } } }, "to-regex-range": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "requires": { "is-number": "^7.0.0" @@ -16275,81 +19449,227 @@ }, "toidentifier": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", "dev": true }, "tr46": { "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", "dev": true }, + "ts-loader": { + "version": "9.4.3", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.4.3.tgz", + "integrity": "sha512-n3hBnm6ozJYzwiwt5YRiJZkzktftRpMiBApHaJPoWLA+qetQBAXkHqCLM6nwSdRDimqVtA5ocIkcTRLMTt7yzA==", + "dev": true, + "requires": { + "chalk": "^4.1.0", + "enhanced-resolve": "^5.0.0", + "micromatch": "^4.0.0", + "semver": "^7.3.4" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", + "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "tsconfig-paths": { + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", + "integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==", + "dev": true, + "peer": true, + "requires": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "peer": true, + "requires": { + "minimist": "^1.2.0" + } + } + } + }, "tslib": { - "version": "2.4.0" + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" }, "type-check": { - "version": "0.3.2", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, "requires": { - "prelude-ls": "~1.1.2" + "prelude-ls": "^1.2.1" } }, "type-detect": { "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true }, "type-is": { "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", "dev": true, "requires": { "media-typer": "0.3.0", "mime-types": "~2.1.24" } }, + "typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, + "peer": true, + "requires": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + } + }, + "typescript": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.3.tgz", + "integrity": "sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==" + }, "ua-parser-js": { - "version": "0.7.34", + "version": "0.7.35", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.35.tgz", + "integrity": "sha512-veRf7dawaj9xaWEu9HoTVn5Pggtc/qj+kqTOFvNiN1l0YdxwC1kvel57UCjThjGa3BHBihE8/UJAHI+uQHmd/g==", "dev": true }, "uglify-js": { "version": "3.17.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", + "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", "dev": true, "optional": true }, + "unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "peer": true, + "requires": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + } + }, "unbzip2-stream": { "version": "1.4.3", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", "dev": true, "requires": { "buffer": "^5.2.1", "through": "^2.3.8" - }, - "dependencies": { - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true - }, - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true - } } }, "unicode-canonical-property-names-ecmascript": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", + "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", "dev": true }, "unicode-match-property-ecmascript": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", + "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", "dev": true, "requires": { "unicode-canonical-property-names-ecmascript": "^2.0.0", @@ -16358,10 +19678,14 @@ }, "unicode-match-property-value-ecmascript": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz", + "integrity": "sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA==", "dev": true }, "unicode-property-aliases-ecmascript": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz", + "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==", "dev": true }, "union-value": { @@ -16392,6 +19716,8 @@ }, "unpipe": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", "dev": true }, "unset-value": { @@ -16434,24 +19760,25 @@ } } }, + "untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true + }, "update-browserslist-db": { - "version": "1.0.10", - "dev": true, + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", + "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", "requires": { "escalade": "^3.1.1", "picocolors": "^1.0.0" - }, - "dependencies": { - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true - } } }, "uri-js": { "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, "requires": { "punycode": "^2.1.0" @@ -16459,22 +19786,32 @@ }, "urix": { "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==", "dev": true }, "use": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", "dev": true }, "util-deprecate": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, "utils-merge": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", "dev": true }, "validator": { - "version": "13.9.0" + "version": "13.9.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.9.0.tgz", + "integrity": "sha512-B+dGG8U3fdtM0/aNK4/X8CXq/EcxU2WPrPEkJGslb47qyHsxmbggTWK0yEA4qnYVNF+nxNlN88o14hIcPmSIEA==" }, "vary": { "version": "1.1.2", @@ -16484,45 +19821,43 @@ }, "void-elements": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", + "integrity": "sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung==", "dev": true }, "watchpack": { "version": "2.4.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", + "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", "dev": true, "requires": { "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.1.2" - }, - "dependencies": { - "glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true - } } }, "webidl-conversions": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", "dev": true }, "webpack": { - "version": "5.76.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.0.tgz", - "integrity": "sha512-l5sOdYBDunyf72HW8dF23rFtWq/7Zgvt/9ftMof71E/yUb1YLOBmTgA2K4vQthB3kotMrSj609txVE0dnr2fjA==", + "version": "5.87.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.87.0.tgz", + "integrity": "sha512-GOu1tNbQ7p1bDEoFRs2YPcfyGs8xq52yyPBZ3m2VGnXGtV9MxjrkABHm4V9Ia280OefsSLzvbVoXcfLxjKY/Iw==", "dev": true, "requires": { "@types/eslint-scope": "^3.7.3", - "@types/estree": "^0.0.51", - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/wasm-edit": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", + "@types/estree": "^1.0.0", + "@webassemblyjs/ast": "^1.11.5", + "@webassemblyjs/wasm-edit": "^1.11.5", + "@webassemblyjs/wasm-parser": "^1.11.5", "acorn": "^8.7.1", - "acorn-import-assertions": "^1.7.6", + "acorn-import-assertions": "^1.9.0", "browserslist": "^4.14.5", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.10.0", - "es-module-lexer": "^0.9.0", + "enhanced-resolve": "^5.15.0", + "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", @@ -16531,67 +19866,13 @@ "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", - "schema-utils": "^3.1.0", + "schema-utils": "^3.2.0", "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.1.3", + "terser-webpack-plugin": "^5.3.7", "watchpack": "^2.4.0", "webpack-sources": "^3.2.3" }, "dependencies": { - "acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", - "dev": true - }, - "acorn-import-assertions": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", - "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", - "dev": true, - "requires": {} - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "requires": {} - }, - "chrome-trace-event": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", - "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", - "dev": true - }, - "enhanced-resolve": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz", - "integrity": "sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - } - }, - "es-module-lexer": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", - "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", - "dev": true - }, "eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -16602,108 +19883,37 @@ "estraverse": "^4.1.1" } }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "requires": { - "estraverse": "^5.2.0" - }, - "dependencies": { - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - } - } - }, "estraverse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true }, - "glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "jest-worker": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", - "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", - "dev": true, - "requires": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - } - }, "schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", "dev": true, "requires": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", "ajv-keywords": "^3.5.2" } - }, - "serialize-javascript": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", - "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", - "dev": true, - "requires": { - "randombytes": "^2.1.0" - } - }, - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "terser-webpack-plugin": { - "version": "5.3.7", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.7.tgz", - "integrity": "sha512-AfKwIktyP7Cu50xNjXF/6Qb5lBNzYaWpU6YfoX3uZicTx0zTy0stDDCsvjDapKsSDvOeWo5MEq4TmdBy2cNoHw==", - "dev": true, - "requires": { - "@jridgewell/trace-mapping": "^0.3.17", - "jest-worker": "^27.4.5", - "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.1", - "terser": "^5.16.5" - } } } }, "webpack-cli": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.0.1.tgz", - "integrity": "sha512-S3KVAyfwUqr0Mo/ur3NzIp6jnerNpo7GUO6so51mxLi1spqsA17YcMXy0WOIJtBSnj748lthxC6XLbNKh/ZC+A==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.4.tgz", + "integrity": "sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==", "dev": true, "requires": { "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^2.0.1", - "@webpack-cli/info": "^2.0.1", - "@webpack-cli/serve": "^2.0.1", + "@webpack-cli/configtest": "^2.1.1", + "@webpack-cli/info": "^2.0.2", + "@webpack-cli/serve": "^2.0.5", "colorette": "^2.0.14", - "commander": "^9.4.1", + "commander": "^10.0.1", "cross-spawn": "^7.0.3", "envinfo": "^7.7.3", "fastest-levenshtein": "^1.0.12", @@ -16713,23 +19923,16 @@ "webpack-merge": "^5.7.3" }, "dependencies": { - "clone-deep": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", - "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.2", - "shallow-clone": "^3.0.0" - } - }, "commander": { - "version": "9.5.0", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", "dev": true }, "webpack-merge": { - "version": "5.8.0", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.9.0.tgz", + "integrity": "sha512-6NbRQw4+Sy50vYNTw7EyOn41OZItPiXB8GNv3INSoe3PSFaHJEz3SHTrYVaRm2LilNGnFUzh0FAwqPEmU/CwDg==", "dev": true, "requires": { "clone-deep": "^4.0.1", @@ -16740,6 +19943,8 @@ }, "webpack-merge": { "version": "4.2.2", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.2.2.tgz", + "integrity": "sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g==", "dev": true, "requires": { "lodash": "^4.17.15" @@ -16747,14 +19952,20 @@ }, "webpack-node-externals": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/webpack-node-externals/-/webpack-node-externals-3.0.0.tgz", + "integrity": "sha512-LnL6Z3GGDPht/AigwRh2dvL9PQPFQ8skEpVrWZXLWBYmqcaojHNN0onvHzie6rq7EWKrrBfPYqNEzTJgiwEQDQ==", "dev": true }, "webpack-sources": { "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", "dev": true }, "whatwg-url": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "dev": true, "requires": { "tr46": "~0.0.3", @@ -16762,26 +19973,65 @@ } }, "which": { - "version": "1.3.1", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "requires": { "isexe": "^2.0.0" } }, + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "peer": true, + "requires": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + } + }, + "which-typed-array": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", + "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", + "dev": true, + "peer": true, + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.10" + } + }, "wildcard": { - "version": "2.0.0", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", + "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", "dev": true }, "word-wrap": { "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true }, "wordwrap": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", "dev": true }, "workerpool": { "version": "6.2.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", "dev": true }, "wrap-ansi": { @@ -16803,27 +20053,51 @@ "requires": { "color-convert": "^2.0.1" } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true } } }, "wrappy": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, "ws": { "version": "8.5.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", + "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", "requires": {} }, "y18n": { "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true }, "yallist": { "version": "3.1.1", - "dev": true + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" }, "yargs": { "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, "requires": { "cliui": "^7.0.2", @@ -16833,35 +20107,12 @@ "string-width": "^4.2.0", "y18n": "^5.0.5", "yargs-parser": "^20.2.2" - }, - "dependencies": { - "cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - } } }, "yargs-parser": { "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "dev": true }, "yargs-unparser": { @@ -16881,48 +20132,23 @@ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true - }, - "decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true - }, - "flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true } } }, "yauzl": { "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", "dev": true, "requires": { "buffer-crc32": "~0.2.3", "fd-slicer": "~1.1.0" - }, - "dependencies": { - "buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", - "dev": true - }, - "fd-slicer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", - "dev": true, - "requires": { - "pend": "~1.2.0" - } - } } }, "yocto-queue": { "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true } } diff --git a/package.json b/package.json index c791bdc4..d68baf3b 100644 --- a/package.json +++ b/package.json @@ -2,15 +2,35 @@ "name": "tronweb", "version": "6.0.0", "description": "JavaScript SDK that encapsulates the TRON HTTP API", - "main": "dist/TronWeb.node.js", + "main": "./lib/commonjs/index.js", + "module": "./lib/esm/index.js", + "types": "./lib/types/index.d.ts", + "exports": { + ".": { + "types": "./lib/types/index.d.ts", + "import": "./lib/esm/index.js", + "require": "./lib/commonjs/index.js" + }, + "./utils": { + "types": "./lib/types/utils/index.d.ts", + "import": "./lib/esm/utils/index.js", + "require": "./lib/commonjs/utils/index.js" + } + }, "keywords": [ "TRON", "tronweb" ], "scripts": { + "build:esm": "tsc --project tsconfig.esm.json && echo '{\"type\": \"module\"}' > ./lib/esm/package.json", + "build:cjs": "tsc --project tsconfig.cjs.json && echo '{\"type\": \"commonjs\"}' > ./lib/commonjs/package.json", + "build:types": "tsc --project tsconfig.types.json", + "build:dist": "webpack --config webpack.config.js --progress --color", + "build:all": "npm run clean:all && npm run build:esm && npm run build:cjs && npm run build:types && npm run build:dist", "prepare": "npm run build", "build": "npm run clean && webpack --config webpack.config.js --progress --color", "build:dev": "NODE_ENV=development npm run build", + "clean:all": "rimraf dist lib", "clean": "rimraf dist", "newaccount": "node scripts/test-node.js && node test/helpers/newAccounts 100", "test": "npm run-script newaccount && npx mocha 'test/**/*.test.js' --timeout 120000", @@ -40,6 +60,7 @@ "lodash": "^4.17.21", "querystring-es3": "^0.2.1", "semver": "^5.6.0", + "typescript": "^5.0.4", "validator": "^13.7.0" }, "devDependencies": { @@ -48,16 +69,23 @@ "@babel/plugin-proposal-numeric-separator": "^7.0.0", "@babel/plugin-proposal-object-rest-spread": "^7.0.0", "@babel/plugin-proposal-private-methods": "^7.18.6", + "@babel/plugin-proposal-private-property-in-object": "^7.21.11", "@babel/plugin-transform-runtime": "^7.0.0", "@babel/preset-env": "^7.20.2", + "@types/estree": "^1.0.1", + "@types/json-schema": "^7.0.12", + "@types/validator": "^13.7.17", "babel-loader": "^8.0.2", "babel-plugin-istanbul": "^6.1.1", "babel-plugin-source-map-support": "^2.1.3", "chai": "^4.1.2", "chalk": "^2.4.1", + "eslint": "^8.38.0", + "eslint-import-resolver-typescript": "^3.5.5", "globby": "^13.1.3", "husky": "^7.0.0", "istanbul": "^0.4.5", + "json-schema": "^0.4.0", "jsonwebtoken": "^9.0.0", "karma": "^6.3.17", "karma-chrome-launcher": "^2.2.0", @@ -74,24 +102,15 @@ "puppeteer": "^13.5.1", "rimraf": "^3.0.2", "source-map-support": "^0.5.19", - "webpack": "^5.75.0", + "ts-loader": "^9.4.3", + "webpack": "^5.78.0", "webpack-cli": "^5.0.1", "webpack-node-externals": "^3.0.0" }, "author": { - "name": "Kondax", - "url": "https://github.com/Kondax" + "name": "Tron Protocol", + "url": "https://github.com/tronprotocol" }, - "contributors": [ - { - "name": "Francesco Sullo", - "url": "https://github.com/sullof" - }, - { - "name": "TRON-US", - "url": "https://github.com/tron-us" - } - ], "homepage": "https://tronweb.network", "license": "MIT", "repository": "https://github.com/tronprotocol/tronweb.git" diff --git a/pre-commit-result b/pre-commit-result deleted file mode 100644 index 1c3b1fc0..00000000 --- a/pre-commit-result +++ /dev/null @@ -1 +0,0 @@ -Test skipped before git commit. \ No newline at end of file diff --git a/src/index.js b/src/index.js deleted file mode 100644 index d24747d8..00000000 --- a/src/index.js +++ /dev/null @@ -1,454 +0,0 @@ -import providers from 'lib/providers'; -import utils from 'utils'; -import BigNumber from 'bignumber.js'; -import EventEmitter from 'eventemitter3'; -import { version } from '../package.json'; -import semver from 'semver'; -import injectpromise from 'injectpromise'; - -import TransactionBuilder from 'lib/transactionBuilder'; -import Trx from 'lib/trx'; -import Contract from 'lib/contract'; -import Plugin from 'lib/plugin'; -import Event from 'lib/event'; -import SideChain from 'lib/sidechain'; -import { keccak256 } from 'utils/ethersUtils'; -import { ADDRESS_PREFIX, TRON_BIP39_PATH_INDEX_0 } from 'utils/address'; - -const DEFAULT_VERSION = '4.7.1'; - -const FEE_LIMIT = 150000000; - -export default class TronWeb extends EventEmitter { - static providers = providers; - static BigNumber = BigNumber; - static TransactionBuilder = TransactionBuilder; - static Trx = Trx; - static Contract = Contract; - static Plugin = Plugin; - static Event = Event; - static version = version; - static utils = utils; - - constructor(options = false, - // for retro-compatibility: - solidityNode = false, eventServer = false, sideOptions = false, privateKey = false) { - super(); - - let fullNode; - let headers = false; - let eventHeaders = false; - - if (typeof options === 'object' && (options.fullNode || options.fullHost)) { - fullNode = options.fullNode || options.fullHost; - sideOptions = solidityNode; - solidityNode = options.solidityNode || options.fullHost; - eventServer = options.eventServer || options.fullHost; - headers = options.headers || false; - eventHeaders = options.eventHeaders || headers; - privateKey = options.privateKey; - } else { - fullNode = options; - } - if (utils.isString(fullNode)) - fullNode = new providers.HttpProvider(fullNode); - - if (utils.isString(solidityNode)) - solidityNode = new providers.HttpProvider(solidityNode); - - if (utils.isString(eventServer)) - eventServer = new providers.HttpProvider(eventServer); - - this.event = new Event(this); - this.transactionBuilder = new TransactionBuilder(this); - this.trx = new Trx(this); - this.plugin = new Plugin(this, options); - this.utils = utils; - - this.setFullNode(fullNode); - this.setSolidityNode(solidityNode); - this.setEventServer(eventServer); - - this.providers = providers; - this.BigNumber = BigNumber; - - this.defaultBlock = false; - this.defaultPrivateKey = false; - this.defaultAddress = { - hex: false, - base58: false - }; - - [ - 'sha3', 'toHex', 'toUtf8', 'fromUtf8', - 'toAscii', 'fromAscii', 'toDecimal', 'fromDecimal', - 'toSun', 'fromSun', 'toBigNumber', 'isAddress', - 'createAccount', 'address', 'version', 'createRandom', 'fromMnemonic' - ].forEach(key => { - this[key] = TronWeb[key]; - }); - // for sidechain - if (typeof sideOptions === 'object' && (sideOptions.fullNode || sideOptions.fullHost)) { - this.sidechain = new SideChain(sideOptions, TronWeb, this, privateKey); - } else { - privateKey = privateKey || sideOptions; - } - - if (privateKey) - this.setPrivateKey(privateKey); - this.fullnodeVersion = DEFAULT_VERSION; - this.feeLimit = FEE_LIMIT; - this.injectPromise = injectpromise(this); - - if (headers) { - this.setFullNodeHeader(headers); - } - - if (eventHeaders) { - this.setEventHeader(eventHeaders); - } - } - - async getFullnodeVersion() { - try { - const nodeInfo = await this.trx.getNodeInfo() - this.fullnodeVersion = nodeInfo.configNodeInfo.codeVersion - if (this.fullnodeVersion.split('.').length === 2) { - this.fullnodeVersion += '.0'; - } - } catch (err) { - this.fullnodeVersion = DEFAULT_VERSION; - } - } - - setDefaultBlock(blockID = false) { - if ([false, 'latest', 'earliest', 0].includes(blockID)) { - return this.defaultBlock = blockID; - } - - if (!utils.isInteger(blockID) || !blockID) - throw new Error('Invalid block ID provided'); - - this.defaultBlock = Math.abs(blockID); - } - - setPrivateKey(privateKey) { - try { - this.setAddress( - this.address.fromPrivateKey(privateKey) - ); - } catch { - throw new Error('Invalid private key provided'); - } - - this.defaultPrivateKey = privateKey; - this.emit('privateKeyChanged', privateKey); - } - - setAddress(address) { - if (!this.isAddress(address)) - throw new Error('Invalid address provided'); - - const hex = this.address.toHex(address); - const base58 = this.address.fromHex(address); - - if (this.defaultPrivateKey && this.address.fromPrivateKey(this.defaultPrivateKey) !== base58) - this.defaultPrivateKey = false; - - this.defaultAddress = { - hex, - base58 - }; - - this.emit('addressChanged', { hex, base58 }); - } - - fullnodeSatisfies(version) { - return semver.satisfies(this.fullnodeVersion, version); - } - - isValidProvider(provider) { - return Object.values(providers).some(knownProvider => provider instanceof knownProvider); - } - - setFullNode(fullNode) { - if (utils.isString(fullNode)) - fullNode = new providers.HttpProvider(fullNode); - - if (!this.isValidProvider(fullNode)) - throw new Error('Invalid full node provided'); - - this.fullNode = fullNode; - this.fullNode.setStatusPage('wallet/getnowblock'); - } - - setSolidityNode(solidityNode) { - if (utils.isString(solidityNode)) - solidityNode = new providers.HttpProvider(solidityNode); - - if (!this.isValidProvider(solidityNode)) - throw new Error('Invalid solidity node provided'); - - this.solidityNode = solidityNode; - this.solidityNode.setStatusPage('walletsolidity/getnowblock'); - } - - setEventServer(...params) { - this.event.setServer(...params) - } - - setHeader (headers = {}) { - const fullNode = new providers.HttpProvider(this.fullNode.host, 30000, false, false, headers); - const solidityNode = new providers.HttpProvider(this.solidityNode.host, 30000, false, false, headers); - const eventServer = new providers.HttpProvider(this.eventServer.host, 30000, false, false, headers); - - this.setFullNode(fullNode); - this.setSolidityNode(solidityNode); - this.setEventServer(eventServer); - } - - setFullNodeHeader (headers = {}) { - const fullNode = new providers.HttpProvider(this.fullNode.host, 30000, false, false, headers); - const solidityNode = new providers.HttpProvider(this.solidityNode.host, 30000, false, false, headers); - - this.setFullNode(fullNode); - this.setSolidityNode(solidityNode); - } - - setEventHeader (headers = {}) { - const eventServer = new providers.HttpProvider(this.eventServer.host, 30000, false, false, headers); - this.setEventServer(eventServer); - } - - currentProviders() { - return { - fullNode: this.fullNode, - solidityNode: this.solidityNode, - eventServer: this.eventServer - }; - } - - currentProvider() { - return this.currentProviders(); - } - - - getEventResult(...params) { - - if (typeof params[1] !== 'object') { - params[1] = { - sinceTimestamp: params[1] || 0, - eventName: params[2] || false, - blockNumber: params[3] || false, - size: params[4] || 20, - page: params[5] || 1 - } - params.splice(2, 4) - - // callback: - if (!utils.isFunction(params[2])) { - - if (utils.isFunction(params[1].page)) { - params[2] = params[1].page; - params[1].page = 1; - } else if (utils.isFunction(params[1].size)) { - params[2] = params[1].size; - params[1].size = 20; - params[1].page = 1; - } - } - } - - return this.event.getEventsByContractAddress(...params); - } - - getEventByTransactionID(...params) { - return this.event.getEventsByTransactionID(...params) - } - - contract(abi = [], address = false) { - return new Contract(this, abi, address); - } - - static get address() { - return { - fromHex(address) { - if (!utils.isHex(address)) - return address; - - return utils.crypto.getBase58CheckAddress( - utils.code.hexStr2byteArray(address.replace(/^0x/, ADDRESS_PREFIX)) - ); - }, - toHex(address) { - if (utils.isHex(address)) - return address.toLowerCase().replace(/^0x/, ADDRESS_PREFIX); - - return utils.code.byteArray2hexStr( - utils.crypto.decodeBase58Address(address) - ).toLowerCase(); - }, - fromPrivateKey(privateKey, strict = false) { - try { - return utils.crypto.pkToAddress(privateKey, strict); - } catch { - return false; - } - } - } - } - - static sha3(string, prefix = true) { - return (prefix ? '0x' : '') + keccak256(Buffer.from(string, 'utf-8')).toString().substring(2); - } - - static toHex(val) { - if (utils.isBoolean(val)) - return TronWeb.fromDecimal(+val); - - if (utils.isBigNumber(val)) - return TronWeb.fromDecimal(val); - - if (typeof val === 'object') - return TronWeb.fromUtf8(JSON.stringify(val)); - - if (utils.isString(val)) { - if (/^(-|)0x/.test(val)) - return val; - - if ((!isFinite(val)) || /^\s*$/.test(val)) - return TronWeb.fromUtf8(val); - } - - let result = TronWeb.fromDecimal(val); - if (result === '0xNaN') { - throw new Error('The passed value is not convertible to a hex string'); - } else { - return result; - } - } - - static toUtf8(hex) { - if (utils.isHex(hex)) { - hex = hex.replace(/^0x/, ''); - return Buffer.from(hex, 'hex').toString('utf8'); - } else { - throw new Error('The passed value is not a valid hex string'); - } - } - - static fromUtf8(string) { - if (!utils.isString(string)) { - throw new Error('The passed value is not a valid utf-8 string') - } - return '0x' + Buffer.from(string, 'utf8').toString('hex'); - } - - static toAscii(hex) { - if (utils.isHex(hex)) { - let str = ""; - let i = 0, l = hex.length; - if (hex.substring(0, 2) === '0x') { - i = 2; - } - for (; i < l; i += 2) { - let code = parseInt(hex.substr(i, 2), 16); - str += String.fromCharCode(code); - } - return str; - } else { - throw new Error('The passed value is not a valid hex string'); - } - } - - static fromAscii(string, padding) { - if (!utils.isString(string)) { - throw new Error('The passed value is not a valid utf-8 string') - } - return '0x' + Buffer.from(string, 'ascii').toString('hex').padEnd(padding, '0'); - } - - - static toDecimal(value) { - return TronWeb.toBigNumber(value).toNumber(); - } - - static fromDecimal(value) { - const number = TronWeb.toBigNumber(value); - const result = number.toString(16); - - return number.isLessThan(0) ? '-0x' + result.substr(1) : '0x' + result; - } - - static fromSun(sun) { - const trx = TronWeb.toBigNumber(sun).div(1_000_000); - return utils.isBigNumber(sun) ? trx : trx.toString(10); - } - - static toSun(trx) { - const sun = TronWeb.toBigNumber(trx).times(1_000_000); - return utils.isBigNumber(trx) ? sun : sun.toString(10); - } - - static toBigNumber(amount = 0) { - if (utils.isBigNumber(amount)) - return amount; - - if (utils.isString(amount) && /^(-|)0x/.test(amount)) - return new BigNumber(amount.replace('0x', ''), 16); - - return new BigNumber(amount.toString(10), 10); - } - - static isAddress(address = false) { - if (!utils.isString(address)) - return false; - - // Convert HEX to Base58 - if (address.length === 42) { - try { - return TronWeb.isAddress( - utils.crypto.getBase58CheckAddress( - utils.code.hexStr2byteArray(address) // it throws an error if the address starts with 0x - ) - ); - } catch (err) { - return false; - } - } - try { - return utils.crypto.isAddressValid(address); - } catch (err) { - return false; - } - } - - static async createAccount() { - const account = utils.accounts.generateAccount(); - - return account; - } - - static createRandom(options) { - const account = utils.accounts.generateRandom(options); - - return account - } - - static fromMnemonic(mnemonic, path = TRON_BIP39_PATH_INDEX_0, wordlist = null) { - const account = utils.accounts.generateAccountWithMnemonic(mnemonic, path, wordlist); - - return account - } - - async isConnected(callback = false) { - if (!callback) - return this.injectPromise(this.isConnected); - - return callback(null, { - fullNode: await this.fullNode.isConnected(), - solidityNode: await this.solidityNode.isConnected(), - eventServer: this.eventServer && await this.eventServer.isConnected() - }); - } -}; diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/src/index.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/lib/contract/index.js b/src/lib/contract/index.js deleted file mode 100644 index b26aa238..00000000 --- a/src/lib/contract/index.js +++ /dev/null @@ -1,248 +0,0 @@ -import TronWeb from 'index'; -import utils from 'utils'; -import Method from './method'; -import injectpromise from 'injectpromise'; - -export default class Contract { - constructor(tronWeb = false, abi = [], address = false) { - if (!tronWeb || !tronWeb instanceof TronWeb) - throw new Error('Expected instance of TronWeb'); - - this.tronWeb = tronWeb; - this.injectPromise = injectpromise(this); - - this.address = address; - this.abi = abi; - - this.eventListener = false; - this.bytecode = false; - this.deployed = false; - this.lastBlock = false; - - this.methods = {}; - this.methodInstances = {}; - this.props = []; - - if (this.tronWeb.isAddress(address)) - this.deployed = true; - else this.address = false; - - this.loadAbi(abi); - } - - async _getEvents(options = {}) { - const events = await this.tronWeb.event.getEventsByContractAddress(this.address, options); - const [latestEvent] = events.sort((a, b) => b.block - a.block); - const newEvents = events.filter((event, index) => { - - if (options.resourceNode && event.resourceNode && - options.resourceNode.toLowerCase() !== event.resourceNode.toLowerCase()) { - return false - } - - const duplicate = events.slice(0, index).some(priorEvent => ( - JSON.stringify(priorEvent) == JSON.stringify(event) - )); - - if (duplicate) - return false; - - if (!this.lastBlock) - return true; - - return event.block > this.lastBlock; - }); - - if (latestEvent) - this.lastBlock = latestEvent.block; - - return newEvents; - } - - async _startEventListener(options = {}, callback) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (this.eventListener) - clearInterval(this.eventListener); - - if (!this.tronWeb.eventServer) - throw new Error('Event server is not configured'); - - if (!this.address) - throw new Error('Contract is not configured with an address'); - - this.eventCallback = callback; - await this._getEvents(options); - - this.eventListener = setInterval(() => { - this._getEvents(options).then(newEvents => newEvents.forEach(event => { - this.eventCallback && this.eventCallback(event) - })).catch(err => { - console.error('Failed to get event list', err); - }); - }, 3000); - } - - _stopEventListener() { - if (!this.eventListener) - return; - - clearInterval(this.eventListener); - this.eventListener = false; - this.eventCallback = false; - } - - hasProperty(property) { - return this.hasOwnProperty(property) || this.__proto__.hasOwnProperty(property); - } - - loadAbi(abi) { - this.abi = abi; - this.methods = {}; - - this.props.forEach(prop => delete this[prop]); - - abi.forEach(func => { - // Don't build a method for constructor function. That's handled through contract create. - // Don't build a method for error function. - if (!func.type || /constructor|error/i.test(func.type)) - return; - - const method = new Method(this, func); - const methodCall = method.onMethod.bind(method); - - const { - name, - functionSelector, - signature - } = method; - - this.methods[name] = methodCall; - this.methods[functionSelector] = methodCall; - this.methods[signature] = methodCall; - - this.methodInstances[name] = method; - this.methodInstances[functionSelector] = method; - this.methodInstances[signature] = method; - - if (!this.hasProperty(name)) { - this[name] = methodCall; - this.props.push(name); - } - - if (!this.hasProperty(functionSelector)) { - this[functionSelector] = methodCall; - this.props.push(functionSelector); - } - - if (!this.hasProperty(signature)) { - this[signature] = methodCall; - this.props.push(signature); - } - }); - } - - decodeInput(data) { - - const methodName = data.substring(0, 8); - const inputData = data.substring(8); - - if (!this.methodInstances[methodName]) - throw new Error('Contract method ' + methodName + " not found"); - - const methodInstance = this.methodInstances[methodName]; - - return { - name: methodInstance.name, - params: this.methodInstances[methodName].decodeInput(inputData), - } - } - - async new(options, privateKey = this.tronWeb.defaultPrivateKey, callback = false) { - if (utils.isFunction(privateKey)) { - callback = privateKey; - privateKey = this.tronWeb.defaultPrivateKey; - } - - if (!callback) - return this.injectPromise(this.new, options, privateKey); - - try { - const address = this.tronWeb.address.fromPrivateKey(privateKey); - const transaction = await this.tronWeb.transactionBuilder.createSmartContract(options, address); - const signedTransaction = await this.tronWeb.trx.sign(transaction, privateKey); - const contract = await this.tronWeb.trx.sendRawTransaction(signedTransaction); - - if (contract.code) - return callback({ - error: contract.code, - message: this.tronWeb.toUtf8(contract.message) - }) - - await utils.sleep(3000); - return this.at(signedTransaction.contract_address, callback); - } catch (ex) { - return callback(ex); - } - } - - async at(contractAddress, callback = false) { - if (!callback) - return this.injectPromise(this.at, contractAddress); - - try { - const contract = await this.tronWeb.trx.getContract(contractAddress); - - if (!contract.contract_address) - return callback('Unknown error: ' + JSON.stringify(contract, null, 2)); - - this.address = contract.contract_address; - this.bytecode = contract.bytecode; - this.deployed = true; - - this.loadAbi(contract.abi ? contract.abi.entrys ? contract.abi.entrys : [] : []); - - return callback(null, this); - } catch (ex) { - if (ex.toString().includes('does not exist')) - return callback('Contract has not been deployed on the network'); - - return callback(ex); - } - } - - events(options = {}, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (!utils.isFunction(callback)) - throw new Error('Callback function expected'); - - const self = this; - - return { - start(startCallback = false) { - if (!startCallback) { - self._startEventListener(options, callback); - return this; - } - - self._startEventListener(options, callback).then(() => { - startCallback(); - }).catch(err => { - startCallback(err) - }); - - return this; - }, - stop() { - self._stopEventListener(); - } - }; - } -} diff --git a/src/lib/contract/method.js b/src/lib/contract/method.js deleted file mode 100644 index cab6e552..00000000 --- a/src/lib/contract/method.js +++ /dev/null @@ -1,400 +0,0 @@ -import utils from 'utils'; -import {encodeParamsV2ByABI, decodeParamsV2ByABI} from 'utils/abi'; -import injectpromise from 'injectpromise'; - -const getFunctionSelector = abi => { - abi.stateMutability = abi.stateMutability ? abi.stateMutability.toLowerCase() : 'nonpayable'; - abi.type = abi.type ? abi.type.toLowerCase() : ''; - if(abi.type === 'fallback' || abi.type === 'receive') return '0x'; - let iface = new utils.ethersUtils.Interface([abi]); - if(abi.type === 'event') { - return iface.getEvent(abi.name).format(utils.ethersUtils.FormatTypes.sighash); - } - return iface.getFunction(abi.name).format(utils.ethersUtils.FormatTypes.sighash); -} - -const decodeOutput = (abi, output) => { - return decodeParamsV2ByABI(abi, output) -}; - -export default class Method { - constructor(contract, abi) { - this.tronWeb = contract.tronWeb; - this.contract = contract; - - this.abi = abi; - this.name = abi.name || (abi.name = abi.type); - - this.inputs = abi.inputs || []; - this.outputs = abi.outputs || []; - - this.functionSelector = getFunctionSelector(abi); - this.signature = this.tronWeb.sha3(this.functionSelector, false).slice(0, 8); - this.injectPromise = injectpromise(this); - - this.defaultOptions = { - feeLimit: this.tronWeb.feeLimit, - callValue: 0, - userFeePercentage: 100, - shouldPollResponse: false, // Only used for sign() - pollTimes: 20 - }; - } - - decodeInput(data) { - return decodeOutput(this.inputs, '0x' + data); - } - - onMethod(...args) { - let rawParameter = ''; - if(this.abi && !/event/i.test(this.abi.type)) { - rawParameter = encodeParamsV2ByABI(this.abi, args); - } - return { - call: (options = {}, callback = false) => { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - options = { - ...options, - rawParameter - }; - - return this._call([], [], options, callback); - }, - send: (options = {}, privateKey = this.tronWeb.defaultPrivateKey, callback = false) => { - if (utils.isFunction(privateKey)) { - callback = privateKey; - privateKey = this.tronWeb.defaultPrivateKey; - } - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - options = { - ...options, - rawParameter - }; - - return this._send([], [], options, privateKey, callback); - }, - watch: (...methodArgs) => this._watch(...methodArgs) - } - } - - async _call(types, args, options = {}, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (!callback) - return this.injectPromise(this._call, types, args, options); - - if (types.length !== args.length) - return callback('Invalid argument count provided'); - - if (!this.contract.address) - return callback('Smart contract is missing address'); - - if (!this.contract.deployed) - return callback('Calling smart contracts requires you to load the contract first'); - - const {stateMutability} = this.abi; - - if (!['pure', 'view'].includes(stateMutability.toLowerCase())) - return callback(`Methods with state mutability "${stateMutability}" must use send()`); - - options = { - ...this.defaultOptions, - from: this.tronWeb.defaultAddress.hex, - ...options, - _isConstant: true - }; - - const parameters = args.map((value, index) => ({ - type: types[index], - value - })); - - this.tronWeb.transactionBuilder.triggerSmartContract( - this.contract.address, - this.functionSelector, - options, - parameters, - options.from ? this.tronWeb.address.toHex(options.from) : false, - (err, transaction) => { - if (err) - return callback(err); - - if (!utils.hasProperty(transaction, 'constant_result')) - return callback('Failed to execute'); - - try { - - const len = transaction.constant_result[0].length - if (len === 0 || len % 64 === 8) { - let msg = 'The call has been reverted or has thrown an error.' - if (len !== 0) { - msg += ' Error message: ' - let msg2 = '' - let chunk = transaction.constant_result[0].substring(8) - for (let i = 0; i < len - 8; i += 64) { - msg2 += this.tronWeb.toUtf8(chunk.substring(i, i + 64)) - } - msg += msg2.replace(/(\u0000|\u000b|\f)+/g, ' ').replace(/ +/g, ' ').replace(/\s+$/g, ''); - } - return callback(msg) - } - - let output = decodeOutput(this.abi, '0x' + transaction.constant_result[0]); - - if (output.length === 1 && Object.keys(output).length === 1) { - output = output[0]; - } - - return callback(null, output); - } catch (ex) { - return callback(ex); - } - }); - } - - async _send(types, args, options = {}, privateKey = this.tronWeb.defaultPrivateKey, callback = false) { - if (utils.isFunction(privateKey)) { - callback = privateKey; - privateKey = this.tronWeb.defaultPrivateKey; - } - - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (!callback) - return this.injectPromise(this._send, types, args, options, privateKey); - - if (types.length !== args.length) - throw new Error('Invalid argument count provided'); - - if (!this.contract.address) - return callback('Smart contract is missing address'); - - if (!this.contract.deployed) - return callback('Calling smart contracts requires you to load the contract first'); - - const {stateMutability} = this.abi; - - if (['pure', 'view'].includes(stateMutability.toLowerCase())) - return callback(`Methods with state mutability "${stateMutability}" must use call()`); - - // If a function isn't payable, dont provide a callValue. - if (!['payable'].includes(stateMutability.toLowerCase())) - options.callValue = 0; - - options = { - ...this.defaultOptions, - from: this.tronWeb.defaultAddress.hex, - ...options, - }; - - const parameters = args.map((value, index) => ({ - type: types[index], - value - })); - - try { - const address = privateKey ? this.tronWeb.address.fromPrivateKey(privateKey) : this.tronWeb.defaultAddress.base58; - const transaction = await this.tronWeb.transactionBuilder.triggerSmartContract( - this.contract.address, - this.functionSelector, - options, - parameters, - this.tronWeb.address.toHex(address) - ); - - if (!transaction.result || !transaction.result.result) - return callback('Unknown error: ' + JSON.stringify(transaction, null, 2)); - - // If privateKey is false, this won't be signed here. We assume sign functionality will be replaced. - const signedTransaction = await this.tronWeb.trx.sign(transaction.transaction, privateKey); - - if (!signedTransaction.signature) { - if (!privateKey) - return callback('Transaction was not signed properly'); - - return callback('Invalid private key provided'); - } - - const broadcast = await this.tronWeb.trx.sendRawTransaction(signedTransaction); - - if (broadcast.code) { - const err = { - error: broadcast.code, - message: broadcast.code - }; - if (broadcast.message) - err.message = this.tronWeb.toUtf8(broadcast.message); - return callback(err) - } - - if (!options.shouldPollResponse) - return callback(null, signedTransaction.txID); - - const checkResult = async (index = 0) => { - if (index === options.pollTimes) { - return callback({ - error: 'Cannot find result in solidity node', - transaction: signedTransaction - }); - } - - const output = await this.tronWeb.trx.getTransactionInfo(signedTransaction.txID); - - if (!Object.keys(output).length) { - return setTimeout(() => { - checkResult(index + 1); - }, 3000); - } - - if (output.result && output.result === 'FAILED') { - return callback({ - error: this.tronWeb.toUtf8(output.resMessage), - transaction: signedTransaction, - output - }); - } - - if (!utils.hasProperty(output, 'contractResult')) { - return callback({ - error: 'Failed to execute: ' + JSON.stringify(output, null, 2), - transaction: signedTransaction, - output - }); - } - - if (options.rawResponse) - return callback(null, output); - - let decoded = decodeOutput(this.abi, '0x' + output.contractResult[0]); - - if (decoded.length === 1 && Object.keys(decoded).length === 1) { - decoded = decoded[0]; - } - - if (options.keepTxID) { - return callback(null, [signedTransaction.txID, decoded]); - } - - return callback(null, decoded); - } - - checkResult(); - } catch (ex) { - return callback(ex); - } - } - - async _watch(options = {}, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (!utils.isFunction(callback)) - throw new Error('Expected callback to be provided'); - - if (!this.contract.address) - return callback('Smart contract is missing address'); - - if (!this.abi.type || !/event/i.test(this.abi.type)) - return callback('Invalid method type for event watching'); - - if (!this.tronWeb.eventServer) - return callback('No event server configured'); - - let listener = false; - let lastBlock = false; - let since = Date.now() - 1000; - - const getEvents = async () => { - try { - - const params = { - since, - eventName: this.name, - sort: 'block_timestamp', - blockNumber: 'latest', - filters: options.filters - } - - if(options.size) { - params.size = options.size; - } - - if (options.resourceNode) { - if (/full/i.test(options.resourceNode)) - params.onlyUnconfirmed = true - else - params.onlyConfirmed = true - } - - const events = await this.tronWeb.event.getEventsByContractAddress(this.contract.address, params); - const [latestEvent] = events.sort((a, b) => b.block - a.block); - const newEvents = events.filter((event, index) => { - - if (options.resourceNode && event.resourceNode && - options.resourceNode.toLowerCase() !== event.resourceNode.toLowerCase()) { - return false - } - - const duplicate = events.slice(0, index).some(priorEvent => ( - JSON.stringify(priorEvent) == JSON.stringify(event) - )); - - if (duplicate) - return false; - - if (!lastBlock) - return true; - - return event.block > lastBlock; - }); - - if (latestEvent) - lastBlock = latestEvent.block; - - return newEvents; - } catch (ex) { - return Promise.reject(ex); - } - - }; - - const bindListener = () => { - if (listener) - clearInterval(listener); - - listener = setInterval(() => { - getEvents().then(events => events.forEach(event => { - callback(null, utils.parseEvent(event, this.abi)) - })).catch(err => callback(err)); - }, 3000); - }; - - await getEvents(); - bindListener(); - - return { - start: bindListener, - stop: () => { - if (!listener) - return; - - clearInterval(listener); - listener = false; - } - } - } -} diff --git a/src/lib/event.js b/src/lib/event.js deleted file mode 100644 index 90e76f07..00000000 --- a/src/lib/event.js +++ /dev/null @@ -1,165 +0,0 @@ -import TronWeb from 'index'; -import utils from 'utils'; -import providers from "./providers"; -import querystring from "querystring-es3"; -import injectpromise from 'injectpromise'; - -export default class Event { - - constructor(tronWeb = false) { - if (!tronWeb || !(tronWeb instanceof TronWeb)) - throw new Error('Expected instance of TronWeb'); - this.tronWeb = tronWeb; - this.injectPromise = injectpromise(this); - } - - setServer(eventServer = false, healthcheck = 'healthcheck') { - if (!eventServer) - return this.tronWeb.eventServer = false; - - if (utils.isString(eventServer)) - eventServer = new providers.HttpProvider(eventServer); - - if (!this.tronWeb.isValidProvider(eventServer)) - throw new Error('Invalid event server provided'); - - this.tronWeb.eventServer = eventServer; - this.tronWeb.eventServer.isConnected = () => this.tronWeb.eventServer.request(healthcheck).then(() => true).catch(() => false); - } - - getEventsByContractAddress(contractAddress = false, options = {}, callback = false) { - - let { - sinceTimestamp, - since, - fromTimestamp, - eventName, - blockNumber, - size, - page, - onlyConfirmed, - onlyUnconfirmed, - previousLastEventFingerprint, - previousFingerprint, - fingerprint, - rawResponse, - sort, - filters - } = Object.assign({ - sinceTimestamp: 0, - eventName: false, - blockNumber: false, - size: 20, - page: 1 - }, options) - - if (!callback) - return this.injectPromise(this.getEventsByContractAddress, contractAddress, options); - - fromTimestamp = fromTimestamp || sinceTimestamp || since; - - if (!this.tronWeb.eventServer) - return callback('No event server configured'); - - const routeParams = []; - - if (!this.tronWeb.isAddress(contractAddress)) - return callback('Invalid contract address provided'); - - if (eventName && !contractAddress) - return callback('Usage of event name filtering requires a contract address'); - - if (typeof fromTimestamp !== 'undefined' && !utils.isInteger(fromTimestamp)) - return callback('Invalid fromTimestamp provided'); - - if (!utils.isInteger(size)) - return callback('Invalid size provided'); - - if (size > 200) { - console.warn('Defaulting to maximum accepted size: 200'); - size = 200; - } - - if (!utils.isInteger(page)) - return callback('Invalid page provided'); - - if (blockNumber && !eventName) - return callback('Usage of block number filtering requires an event name'); - - if (contractAddress) - routeParams.push(this.tronWeb.address.fromHex(contractAddress)); - - if (eventName) - routeParams.push(eventName); - - if (blockNumber) - routeParams.push(blockNumber); - - const qs = { - size, - page - } - - if (typeof filters === 'object' && Object.keys(filters).length > 0) { - qs.filters = JSON.stringify(filters); - } - - if (fromTimestamp) { - qs.fromTimestamp = qs.since = fromTimestamp; - } - - if (onlyConfirmed) - qs.only_confirmed = onlyConfirmed - - if (onlyUnconfirmed && !onlyConfirmed) - qs.only_unconfirmed = onlyUnconfirmed - - if (sort) - qs.sort = sort - - fingerprint = fingerprint || previousFingerprint || previousLastEventFingerprint - if (fingerprint) - qs.fingerprint = fingerprint - - return this.tronWeb.eventServer.request(`event/contract/${routeParams.join('/')}?${querystring.stringify(qs)}`).then((data = false) => { - if (!data) - return callback('Unknown error occurred'); - - if (!utils.isArray(data)) - return callback(data); - - return callback(null, - rawResponse === true ? data : data.map(event => utils.mapEvent(event)) - ); - }).catch(err => callback((err.response && err.response.data) || err)); - } - - - getEventsByTransactionID(transactionID = false, options = {}, callback = false) { - - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (!callback) - return this.injectPromise(this.getEventsByTransactionID, transactionID, options); - - if (!this.tronWeb.eventServer) - return callback('No event server configured'); - - return this.tronWeb.eventServer.request(`event/transaction/${transactionID}`).then((data = false) => { - if (!data) - return callback('Unknown error occurred'); - - if (!utils.isArray(data)) - return callback(data); - - return callback(null, - options.rawResponse === true ? data : data.map(event => utils.mapEvent(event)) - ); - }).catch(err => callback((err.response && err.response.data) || err)); - } - -} - diff --git a/src/lib/plugin.js b/src/lib/plugin.js deleted file mode 100644 index 15da4f8a..00000000 --- a/src/lib/plugin.js +++ /dev/null @@ -1,70 +0,0 @@ -import TronWeb from 'index'; -import utils from 'utils'; -import semver from 'semver'; - -export default class Plugin { - - constructor(tronWeb = false, options = {}) { - if (!tronWeb || !tronWeb instanceof TronWeb) - throw new Error('Expected instance of TronWeb'); - this.tronWeb = tronWeb; - this.pluginNoOverride = ['register']; - this.disablePlugins = options.disablePlugins; - } - - register(Plugin, options) { - let pluginInterface = { - requires: '0.0.0', - components: {} - } - let result = { - libs: [], - plugged: [], - skipped: [] - } - if (this.disablePlugins) { - result.error = 'This instance of TronWeb has plugins disabled.' - return result; - } - const plugin = new Plugin(this.tronWeb) - if (utils.isFunction(plugin.pluginInterface)) { - pluginInterface = plugin.pluginInterface(options) - } - if (semver.satisfies(TronWeb.version, pluginInterface.requires)) { - if (pluginInterface.fullClass) { - // plug the entire class at the same level of tronWeb.trx - let className = plugin.constructor.name - let classInstanceName = className.substring(0, 1).toLowerCase() + className.substring(1) - if (className !== classInstanceName) { - TronWeb[className] = Plugin - this.tronWeb[classInstanceName] = plugin - result.libs.push(className) - } - } else { - // plug methods into a class, like trx - for (let component in pluginInterface.components) { - if (!this.tronWeb.hasOwnProperty(component)) { - continue - } - let methods = pluginInterface.components[component] - let pluginNoOverride = this.tronWeb[component].pluginNoOverride || [] - for (let method in methods) { - if (method === 'constructor' || (this.tronWeb[component][method] && - (pluginNoOverride.includes(method) // blacklisted methods - || /^_/.test(method)) // private methods - )) { - result.skipped.push(method) - continue - } - this.tronWeb[component][method] = methods[method].bind(this.tronWeb[component]) - result.plugged.push(method) - } - } - } - } else { - throw new Error('The plugin is not compatible with this version of TronWeb') - } - return result - } -} - diff --git a/src/lib/providers/HttpProvider.js b/src/lib/providers/HttpProvider.js deleted file mode 100644 index 5cdd5101..00000000 --- a/src/lib/providers/HttpProvider.js +++ /dev/null @@ -1,55 +0,0 @@ -import axios from 'axios'; -import utils from 'utils'; - -export default class HttpProvider { - constructor(host, timeout = 30000, user = false, password = false, headers = {}, statusPage = '/') { - if (!utils.isValidURL(host)) - throw new Error('Invalid URL provided to HttpProvider'); - - if (isNaN(timeout) || timeout < 0) - throw new Error('Invalid timeout duration provided'); - - if (!utils.isObject(headers)) - throw new Error('Invalid headers object provided'); - - host = host.replace(/\/+$/, ''); - - this.host = host; - this.timeout = timeout; - this.user = user; - this.password = password; - this.headers = headers; - this.statusPage = statusPage; - - this.instance = axios.create({ - baseURL: host, - timeout: timeout, - headers: headers, - auth: user && { - user, - password - }, - }); - } - - setStatusPage(statusPage = '/') { - this.statusPage = statusPage; - } - - async isConnected(statusPage = this.statusPage) { - return this.request(statusPage).then(data => { - return utils.hasProperties(data, 'blockID', 'block_header'); - }).catch(() => false); - } - - request(url, payload = {}, method = 'get') { - method = method.toLowerCase(); - - return this.instance.request({ - data: method == 'post' && Object.keys(payload).length ? payload : null, - params: method == 'get' && payload, - url, - method - }).then(({data}) => data); - } -}; diff --git a/src/lib/providers/index.js b/src/lib/providers/index.js deleted file mode 100644 index f98811bb..00000000 --- a/src/lib/providers/index.js +++ /dev/null @@ -1,5 +0,0 @@ -import HttpProvider from './HttpProvider'; - -export default { - HttpProvider -}; \ No newline at end of file diff --git a/src/lib/sidechain.js b/src/lib/sidechain.js deleted file mode 100644 index 030ca346..00000000 --- a/src/lib/sidechain.js +++ /dev/null @@ -1,1023 +0,0 @@ -import injectpromise from 'injectpromise'; -import Validator from 'paramValidator'; - -export default class SideChain { - constructor(sideOptions, TronWeb = false, mainchain = false, privateKey = false) { - this.mainchain = mainchain; - const { fullHost, fullNode, solidityNode, eventServer, mainGatewayAddress, sideGatewayAddress, sideChainId } = sideOptions; - this.sidechain = new TronWeb(fullHost || fullNode, fullHost || solidityNode, fullHost || eventServer, privateKey); - this.isAddress = this.mainchain.isAddress; - this.utils = this.mainchain.utils; - this.setMainGatewayAddress(mainGatewayAddress); - this.setSideGatewayAddress(sideGatewayAddress); - this.setChainId(sideChainId); - this.injectPromise = injectpromise(this); - this.validator = new Validator(this.sidechain); - - const self = this; - this.sidechain.trx.sign = (...args) => { - return self.sign(...args); - }; - this.sidechain.trx.multiSign = (...args) => { - return self.multiSign(...args); - }; - } - setMainGatewayAddress(mainGatewayAddress) { - if (!this.isAddress(mainGatewayAddress)) - throw new Error('Invalid main gateway address provided'); - this.mainGatewayAddress = mainGatewayAddress; - } - - setSideGatewayAddress(sideGatewayAddress) { - if (!this.isAddress(sideGatewayAddress)) - throw new Error('Invalid side gateway address provided'); - this.sideGatewayAddress = sideGatewayAddress; - } - - setChainId(sideChainId) { - if (!this.utils.isString(sideChainId) || !sideChainId) - throw new Error('Invalid side chainId provided'); - this.chainId = sideChainId; - } - - signTransaction(priKeyBytes, transaction) { - if (typeof priKeyBytes === 'string') { - priKeyBytes = this.utils.code.hexStr2byteArray(priKeyBytes); - } - let chainIdByteArr = this.utils.code.hexStr2byteArray(this.chainId); - - let byteArr = this.utils.code.hexStr2byteArray(transaction.txID).concat(chainIdByteArr); - let byteArrHash = this.sidechain.utils.ethersUtils.sha256(byteArr); - - const signature = this.utils.crypto.ECKeySign(this.utils.code.hexStr2byteArray(byteArrHash.replace(/^0x/, '')), priKeyBytes); - - if (Array.isArray(transaction.signature)) { - if (!transaction.signature.includes(signature)) - transaction.signature.push(signature); - } else - transaction.signature = [signature]; - return transaction; - } - - async multiSign(transaction = false, privateKey = this.sidechain.defaultPrivateKey, permissionId = false, callback = false) { - if (this.utils.isFunction(permissionId)) { - callback = permissionId; - permissionId = 0; - } - - if (this.utils.isFunction(privateKey)) { - callback = privateKey; - privateKey = this.mainchain.defaultPrivateKey; - permissionId = 0; - } - - if (!callback) return this.injectPromise(this.multiSign, transaction, privateKey, permissionId); - - if (!this.utils.isObject(transaction) || !transaction.raw_data || !transaction.raw_data.contract) return callback('Invalid transaction provided'); - - if (!transaction.raw_data.contract[0].Permission_id && permissionId > 0) { - // set permission id - transaction.raw_data.contract[0].Permission_id = permissionId; - - // check if private key insides permission list - const address = this.sidechain.address.toHex(this.sidechain.address.fromPrivateKey(privateKey)).toLowerCase(); - const signWeight = await this.sidechain.trx.getSignWeight(transaction, permissionId); - - if (signWeight.result.code === 'PERMISSION_ERROR') { - return callback(signWeight.result.message); - } - - let foundKey = false; - signWeight.permission.keys.map(key => { - if (key.address === address) foundKey = true; - }); - - if (!foundKey) return callback(privateKey + ' has no permission to sign'); - - if (signWeight.approved_list && signWeight.approved_list.indexOf(address) != -1) { - return callback(privateKey + ' already sign transaction'); - } - - // reset transaction - if (signWeight.transaction && signWeight.transaction.transaction) { - transaction = signWeight.transaction.transaction; - transaction.raw_data.contract[0].Permission_id = permissionId; - } else { - return callback('Invalid transaction provided'); - } - } - // sign - try { - return callback(null, this.signTransaction(privateKey, transaction)); - } catch (ex) { - callback(ex); - } - } - - async sign(transaction = false, privateKey = this.sidechain.defaultPrivateKey, useTronHeader = true, multisig = false, callback = false) { - if (this.utils.isFunction(multisig)) { - callback = multisig; - multisig = false; - } - - if (this.utils.isFunction(useTronHeader)) { - callback = useTronHeader; - useTronHeader = true; - multisig = false; - } - - if (this.utils.isFunction(privateKey)) { - callback = privateKey; - privateKey = this.sidechain.defaultPrivateKey; - useTronHeader = true; - multisig = false; - } - - if (!callback) - return this.injectPromise(this.sign, transaction, privateKey, useTronHeader, multisig); - - // Message signing - if (this.utils.isString(transaction)) { - - if (!this.utils.isHex(transaction)) - return callback('Expected hex message input'); - - try { - const signatureHex = this.sidechain.trx.signString(transaction, privateKey, useTronHeader); - return callback(null, signatureHex); - } catch (ex) { - callback(ex); - } - } - - if (!this.utils.isObject(transaction)) - return callback('Invalid transaction provided'); - - if (!multisig && transaction.signature) - return callback('Transaction is already signed'); - - try { - if (!multisig) { - const address = this.sidechain.address.toHex( - this.sidechain.address.fromPrivateKey(privateKey) - ).toLowerCase(); - if (address !== this.sidechain.address.toHex(transaction.raw_data.contract[0].parameter.value.owner_address)) - return callback('Private key does not match address in transaction'); - } - return callback(null, - this.signTransaction(privateKey, transaction) - ); - } catch (ex) { - callback(ex); - } - } - - /** - * deposit asset to sidechain - */ - async depositTrx( - callValue, - depositFee, - feeLimit, - options = {}, - privateKey = this.mainchain.defaultPrivateKey, - callback = false - ) { - if (this.utils.isFunction(privateKey)) { - callback = privateKey; - privateKey = this.mainchain.defaultPrivateKey; - } - if (this.utils.isFunction(options)) { - callback = options; - options = {}; - } - if (!callback) { - return this.injectPromise(this.depositTrx, callValue, depositFee, feeLimit, options, privateKey); - } - if (this.validator.notValid([ - { - name: 'callValue', - type: 'integer', - value: callValue, - gte: 0 - }, - { - name: 'depositFee', - type: 'integer', - value: depositFee, - gte: 0 - }, - { - name: 'feeLimit', - type: 'integer', - value: feeLimit, - gte: 0 - } - ], callback)) { - return; - } - options = { - callValue: Number(callValue) + Number(depositFee), - feeLimit, - ...options - }; - try { - const contractInstance = await this.mainchain.contract().at(this.mainGatewayAddress); - const result = await contractInstance.depositTRX().send(options, privateKey); - return callback(null, result); - } catch (ex) { - return callback(ex); - } - } - - async depositTrc10( - tokenId, - tokenValue, - depositFee, - feeLimit, - options = {}, - privateKey = this.mainchain.defaultPrivateKey, - callback = false) { - if (this.utils.isFunction(privateKey)) { - callback = privateKey; - privateKey = this.mainchain.defaultPrivateKey; - } - if (this.utils.isFunction(options)) { - callback = options; - options = {}; - } - if (!callback) { - return this.injectPromise(this.depositTrc10, tokenId, tokenValue, depositFee, feeLimit, options, privateKey); - } - if (this.validator.notValid([ - { - name: 'tokenValue', - type: 'integer', - value: tokenValue, - gte: 0 - }, - { - name: 'depositFee', - type: 'integer', - value: depositFee, - gte: 0 - }, - { - name: 'feeLimit', - type: 'integer', - value: feeLimit, - gte: 0 - }, - { - name: 'tokenId', - type: 'integer', - value: tokenId, - gte: 0 - } - ], callback)) { - return; - } - options = { - tokenId, - tokenValue, - feeLimit, - ...options, - callValue: depositFee - }; - try { - const contractInstance = await this.mainchain.contract().at(this.mainGatewayAddress); - const result = await contractInstance.depositTRC10(tokenId, tokenValue).send(options, privateKey); - callback(null, result); - } catch (ex) { - return callback(ex); - } - } - - async depositTrc( - functionSelector, - num, - fee, - feeLimit, - contractAddress, - options = {}, - privateKey = this.mainchain.defaultPrivateKey, - callback = false - ) { - if (this.utils.isFunction(privateKey)) { - callback = privateKey; - privateKey = this.mainchain.defaultPrivateKey; - } - if (this.utils.isFunction(options)) { - callback = options; - options = {}; - } - if (!callback) { - return this.injectPromise(this.depositTrc, functionSelector, num, fee, feeLimit, contractAddress, options, privateKey); - } - if (this.validator.notValid([ - { - name: 'functionSelector', - type: 'not-empty-string', - value: functionSelector - }, - { - name: 'num', - type: 'integer', - value: num, - gte: 0 - }, - { - name: 'fee', - type: 'integer', - value: fee, - gte: 0 - }, - { - name: 'feeLimit', - type: 'integer', - value: feeLimit, - gte: 0 - }, - { - name: 'contractAddress', - type: 'address', - value: contractAddress - } - ], callback)) { - return; - } - options = { - feeLimit, - ...options, - callValue: fee, - tokenId: '', - tokenValue: 0 - }; - try { - let result = null; - if (functionSelector === 'approve') { - const approveInstance = await this.mainchain.contract().at(contractAddress); - result = await approveInstance.approve(this.mainGatewayAddress, num).send(options, privateKey); - } else { - const contractInstance = await this.mainchain.contract().at(this.mainGatewayAddress); - switch (functionSelector) { - case 'depositTRC20': - result = await contractInstance.depositTRC20(contractAddress, num).send(options, privateKey); - break; - case 'depositTRC721': - result = await contractInstance.depositTRC721(contractAddress, num).send(options, privateKey); - break; - case 'retryDeposit': - result = await contractInstance.retryDeposit(num).send(options, privateKey); - break; - case 'retryMapping': - result = await contractInstance.retryMapping(num).send(options, privateKey); - break; - default: - break; - } - } - callback(null, result); - } catch (ex) { - return callback(ex); - } - } - - async approveTrc20( - num, - feeLimit, - contractAddress, - options = {}, - privateKey = this.mainchain.defaultPrivateKey, - callback = false - ) { - const functionSelector = 'approve'; - return this.depositTrc( - functionSelector, - num, - 0, - feeLimit, - contractAddress, - options, - privateKey, - callback - ); - } - - async approveTrc721( - id, - feeLimit, - contractAddress, - options = {}, - privateKey = this.mainchain.defaultPrivateKey, - callback = false - ) { - const functionSelector = 'approve'; - return this.depositTrc( - functionSelector, - id, - 0, - feeLimit, - contractAddress, - options, - privateKey, - callback - ); - } - - async depositTrc20( - num, - depositFee, - feeLimit, - contractAddress, - options = {}, - privateKey = this.mainchain.defaultPrivateKey, - callback = false - ) { - const functionSelector = 'depositTRC20'; - return this.depositTrc( - functionSelector, - num, - depositFee, - feeLimit, - contractAddress, - options, - privateKey, - callback - ); - } - - async depositTrc721( - id, - depositFee, - feeLimit, - contractAddress, - options = {}, - privateKey = this.mainchain.defaultPrivateKey, - callback = false - ) { - const functionSelector = 'depositTRC721'; - return this.depositTrc( - functionSelector, - id, - depositFee, - feeLimit, - contractAddress, - options, - privateKey, - callback - ); - } - - /** - * mapping asset TRC20 or TRC721 to DAppChain - */ - async mappingTrc( - trxHash, - mappingFee, - feeLimit, - functionSelector, - options = {}, - privateKey = this.mainchain.defaultPrivateKey, - callback - ) { - if (this.utils.isFunction(privateKey)) { - callback = privateKey; - privateKey = this.mainchain.defaultPrivateKey; - } - if (this.utils.isFunction(options)) { - callback = options; - options = {}; - } - if (!callback) { - return this.injectPromise(this.mappingTrc, trxHash, mappingFee, feeLimit, functionSelector, options, privateKey); - } - if (this.validator.notValid([ - { - name: 'trxHash', - type: 'not-empty-string', - value: trxHash - }, - { - name: 'mappingFee', - type: 'integer', - value: mappingFee, - gte: 0 - }, - { - name: 'feeLimit', - type: 'integer', - value: feeLimit, - gte: 0 - } - ], callback)) { - return; - } - trxHash = trxHash.startsWith('0x') ? trxHash : ('0x' + trxHash); - options = { - feeLimit, - ...options, - callValue: mappingFee - }; - try { - const contractInstance = await this.mainchain.contract().at(this.mainGatewayAddress); - let result = null; - if (functionSelector === 'mappingTRC20') { - result = await contractInstance.mappingTRC20(trxHash).send(options, privateKey); - } else if (functionSelector === 'mappingTRC721') { - result = await contractInstance.mappingTRC721(trxHash).send(options, privateKey); - } else { - callback(new Error('type must be trc20 or trc721')); - } - callback(null, result); - } catch (ex) { - return callback(ex); - } - } - - async mappingTrc20( - trxHash, - mappingFee, - feeLimit, - options = {}, - privateKey = this.mainchain.defaultPrivateKey, - callback = false - ) { - const functionSelector = 'mappingTRC20'; - return this.mappingTrc( - trxHash, - mappingFee, - feeLimit, - functionSelector, - options, - privateKey, - callback); - } - - async mappingTrc721( - trxHash, - mappingFee, - feeLimit, - options = {}, - privateKey = this.mainchain.defaultPrivateKey, - callback = false - ) { - const functionSelector = 'mappingTRC721'; - return this.mappingTrc( - trxHash, - mappingFee, - feeLimit, - functionSelector, - options, - privateKey, - callback); - } - - /** - * withdraw trx from sidechain to mainchain - */ - async withdrawTrx( - callValue, - withdrawFee, - feeLimit, - options = {}, - privateKey = this.mainchain.defaultPrivateKey, - callback = false - ) { - if (this.utils.isFunction(privateKey)) { - callback = privateKey; - privateKey = this.mainchain.defaultPrivateKey; - } - if (this.utils.isFunction(options)) { - callback = options; - options = {}; - } - if (!callback) { - return this.injectPromise(this.withdrawTrx, callValue, withdrawFee, feeLimit, options, privateKey); - } - if (this.validator.notValid([ - { - name: 'callValue', - type: 'integer', - value: callValue, - gte: 0 - }, - { - name: 'withdrawFee', - type: 'integer', - value: withdrawFee, - gte: 0 - }, - { - name: 'feeLimit', - type: 'integer', - value: feeLimit, - gte: 0 - } - ], callback)) { - return; - } - options = { - callValue: Number(callValue) + Number(withdrawFee), - feeLimit, - ...options - }; - try { - const contractInstance = await this.sidechain.contract().at(this.sideGatewayAddress); - const result = await contractInstance.withdrawTRX().send(options, privateKey); - return callback(null, result); - } catch (ex) { - return callback(ex); - } - } - - async withdrawTrc10( - tokenId, - tokenValue, - withdrawFee, - feeLimit, - options = {}, - privateKey = this.mainchain.defaultPrivateKey, - callback = false - ) { - if (this.utils.isFunction(privateKey)) { - callback = privateKey; - privateKey = this.mainchain.defaultPrivateKey; - } - if (this.utils.isFunction(options)) { - callback = options; - options = {}; - } - if (!callback) { - return this.injectPromise(this.withdrawTrc10, tokenId, tokenValue, withdrawFee, feeLimit, options, privateKey); - } - if (this.validator.notValid([ - { - name: 'tokenId', - type: 'integer', - value: tokenId, - gte: 0 - }, - { - name: 'tokenValue', - type: 'integer', - value: tokenValue, - gte: 0 - }, - { - name: 'withdrawFee', - type: 'integer', - value: withdrawFee, - gte: 0 - }, - { - name: 'feeLimit', - type: 'integer', - value: feeLimit, - gte: 0 - } - ], callback)) { - return; - } - options = { - tokenValue, - tokenId, - callValue: withdrawFee, - feeLimit, - ...options - }; - try { - const contractInstance = await this.sidechain.contract().at(this.sideGatewayAddress); - const result = await contractInstance.withdrawTRC10(tokenId, tokenValue).send(options, privateKey); - return callback(null, result); - } catch (ex) { - return callback(ex); - } - } - - async withdrawTrc( - functionSelector, - numOrId, - withdrawFee, - feeLimit, - contractAddress, - options = {}, - privateKey = this.mainchain.defaultPrivateKey, - callback = false - ) { - if (this.utils.isFunction(privateKey)) { - callback = privateKey; - privateKey = this.mainchain.defaultPrivateKey; - } - if (this.utils.isFunction(options)) { - callback = options; - options = {}; - } - if (!callback) { - return this.injectPromise(this.withdrawTrc, functionSelector, numOrId, withdrawFee, feeLimit, contractAddress, options, privateKey); - } - if (this.validator.notValid([ - { - name: 'functionSelector', - type: 'not-empty-string', - value: functionSelector - }, - { - name: 'numOrId', - type: 'integer', - value: numOrId, - gte: 0 - }, - { - name: 'withdrawFee', - type: 'integer', - value: withdrawFee, - gte: 0 - }, - { - name: 'feeLimit', - type: 'integer', - value: feeLimit, - gte: 0 - }, - { - name: 'contractAddress', - type: 'address', - value: contractAddress - } - ], callback)) { - return; - } - options = { - feeLimit, - ...options, - callValue: withdrawFee - }; - const parameters = [ - { - type: 'uint256', - value: numOrId - } - ]; - - try { - const address = privateKey ? this.sidechain.address.fromPrivateKey(privateKey) : this.sidechain.defaultAddress.base58; - const transaction = await this.sidechain.transactionBuilder.triggerSmartContract( - contractAddress, - functionSelector, - options, - parameters, - this.sidechain.address.toHex(address) - ); - if (!transaction.result || !transaction.result.result) { - return callback('Unknown error: ' + JSON.stringify(transaction.transaction, null, 2)); - } - - const signedTransaction = await this.sidechain.trx.sign(transaction.transaction, privateKey); - - if (!signedTransaction.signature) { - if (!privateKey) - return callback('Transaction was not signed properly'); - - return callback('Invalid private key provided'); - } - - const broadcast = await this.sidechain.trx.sendRawTransaction(signedTransaction); - if (broadcast.code) { - const err = { - error: broadcast.code, - message: broadcast.code - }; - if (broadcast.message) - err.message = this.sidechain.toUtf8(broadcast.message); - return callback(err) - } - - if (!options.shouldPollResponse) - return callback(null, signedTransaction.txID); - - const checkResult = async (index = 0) => { - if (index == 20) { - return callback({ - error: 'Cannot find result in solidity node', - transaction: signedTransaction - }); - } - - const output = await this.sidechain.trx.getTransactionInfo(signedTransaction.txID); - - if (!Object.keys(output).length) { - return setTimeout(() => { - checkResult(index + 1); - }, 3000); - } - - if (output.result && output.result == 'FAILED') { - return callback({ - error: this.sidechain.toUtf8(output.resMessage), - transaction: signedTransaction, - output - }); - } - - if (!this.utils.hasProperty(output, 'contractResult')) { - return callback({ - error: 'Failed to execute: ' + JSON.stringify(output, null, 2), - transaction: signedTransaction, - output - }); - } - - if (options.rawResponse) - return callback(null, output); - - let decoded = decodeOutput(this.outputs, '0x' + output.contractResult[0]); - - if (decoded.length === 1) - decoded = decoded[0]; - - return callback(null, decoded); - } - - checkResult(); - } catch (ex) { - return callback(ex); - } - } - - async withdrawTrc20( - num, - withdrawFee, - feeLimit, - contractAddress, - options, - privateKey = this.mainchain.defaultPrivateKey, - callback = false - ) { - const functionSelector = 'withdrawal(uint256)'; - return this.withdrawTrc( - functionSelector, - num, - withdrawFee, - feeLimit, - contractAddress, - options, - privateKey, - callback); - } - - async withdrawTrc721( - id, - withdrawFee, - feeLimit, - contractAddress, - options, - privateKey = this.mainchain.defaultPrivateKey, - callback = false - ) { - const functionSelector = 'withdrawal(uint256)'; - return this.withdrawTrc( - functionSelector, - id, - withdrawFee, - feeLimit, - contractAddress, - options, - privateKey, - callback); - } - - - async injectFund( - num, - feeLimit, - options, - privateKey = this.mainchain.defaultPrivateKey, - callback = false - ) { - if (this.utils.isFunction(privateKey)) { - callback = privateKey; - privateKey = this.mainchain.defaultPrivateKey; - } - - if (this.utils.isFunction(options)) { - callback = options; - options = {}; - } - if (!callback) { - return this.injectPromise(this.injectFund, num, feeLimit, options, privateKey); - } - if (this.validator.notValid([ - { - name: 'num', - type: 'integer', - value: num, - gte: 0 - }, - { - name: 'feeLimit', - type: 'integer', - value: feeLimit, - gte: 0 - } - ], callback)) { - return; - } - - try { - const address = this.sidechain.address.fromPrivateKey(privateKey); - const hexAddress = this.sidechain.address.toHex(address); - const transaction = await this.sidechain.fullNode.request('/wallet/fundinject', { - owner_address: hexAddress, - amount: num - }, 'post'); - - const signedTransaction = await this.sidechain.trx.sign(transaction, privateKey); - - if (!signedTransaction.signature) { - if (!privateKey) - return callback('Transaction was not signed properly'); - - return callback('Invalid private key provided'); - } - - const broadcast = await this.sidechain.trx.sendRawTransaction(signedTransaction); - if (broadcast.code) { - const err = { - error: broadcast.code, - message: broadcast.code - }; - if (broadcast.message) - err.message = this.mainchain.toUtf8(broadcast.message); - return callback(err) - } - return callback(null, signedTransaction.txID); - } catch (ex) { - return callback(ex); - } - } - - async retryWithdraw( - nonce, - retryWithdrawFee, - feeLimit, - options = {}, - privateKey = this.sidechain.defaultPrivateKey, - callback = false - ) { - const functionSelector = 'retryWithdraw(uint256)'; - return this.withdrawTrc( - functionSelector, - nonce, - retryWithdrawFee, - feeLimit, - this.sideGatewayAddress, - options, - privateKey, - callback - ); - } - - async retryDeposit( - nonce, - retryDepositFee, - feeLimit, - options = {}, - privateKey = this.mainchain.defaultPrivateKey, - callback = false - ) { - const functionSelector = 'retryDeposit'; - return this.depositTrc( - functionSelector, - nonce, - retryDepositFee, - feeLimit, - this.mainGatewayAddress, - options, - privateKey, - callback - ); - } - - async retryMapping( - nonce, - retryMappingFee, - feeLimit, - options = {}, - privateKey = this.mainchain.defaultPrivateKey, - callback = false - ) { - const functionSelector = 'retryMapping'; - return this.depositTrc( - functionSelector, - nonce, - retryMappingFee, - feeLimit, - this.mainGatewayAddress, - options, - privateKey, - callback - ); - } -} - diff --git a/src/lib/transactionBuilder.js b/src/lib/transactionBuilder.js deleted file mode 100644 index a5ead487..00000000 --- a/src/lib/transactionBuilder.js +++ /dev/null @@ -1,2744 +0,0 @@ -import TronWeb from 'index'; -import utils from 'utils'; -import { AbiCoder } from '@ethersproject/abi'; -import Validator from 'paramValidator'; -import {ADDRESS_PREFIX_REGEX} from 'utils/address'; -import injectpromise from 'injectpromise'; -import {encodeParamsV2ByABI} from 'utils/abi'; -import {txCheckWithArgs, txJsonToPb, txPbToTxID, txPbToRawDataHex} from 'utils/transaction'; -import { keccak256 } from 'utils/ethersUtils'; - -let self; - -//helpers - -function toHex(value) { - return TronWeb.address.toHex(value); -} - -function fromUtf8(value) { - return self.tronWeb.fromUtf8(value).replace(/^0x/, ''); -} - -function deepCopyJson(json) { - return JSON.parse(JSON.stringify(json)); -} - -function resultManager(transaction, data, options, callback) { - if (typeof options === 'function') { - callback = options; - } - - if (typeof data === 'function') { - callback = data; - data = null; - } - - if (transaction.Error) - return callback(transaction.Error); - - if (transaction.result && transaction.result.message) { - return callback( - self.tronWeb.toUtf8(transaction.result.message) - ); - } - const authResult = txCheckWithArgs(transaction, data, options); - if(authResult) { - return callback(null, transaction); - } - return callback('Invalid transaction'); -} - -function resultManagerTriggerSmartContract(transaction, data, options, callback) { - if (transaction.Error) - return callback(transaction.Error); - - if (transaction.result && transaction.result.message) { - return callback( - self.tronWeb.toUtf8(transaction.result.message) - ); - } - - if(!(options._isConstant || options.estimateEnergy)) { - const authResult = txCheckWithArgs(transaction.transaction, data, options); - if(authResult) { - return callback(null, transaction); - } - return callback('Invalid transaction'); - } - return callback(null, transaction); -} - -function genContractAddress(ownerAddress, txID) { - return '41' + keccak256(Buffer.from(txID + ownerAddress, 'hex')).toString().substring(2).slice(24); -} - -function getHeaderInfo(node) { - return node.request('wallet/getblock', { detail: false }, 'post') - .then((data) => { - return { - ref_block_bytes: data.block_header.raw_data.number.toString(16).slice(-4).padStart(4, '0'), - ref_block_hash: data.blockID.slice(16, 32), - expiration: data.block_header.raw_data.timestamp + 60 * 1000, - timestamp: data.block_header.raw_data.timestamp, - }; - }); -} - -async function createTransaction(tronWeb, type, value, Permission_id, options = {}) { - const metaData = await getHeaderInfo(tronWeb.fullNode); - const tx = { - visible: false, - txID: '', - raw_data_hex: '', - raw_data: { - contract: [{ - parameter: { - value, - type_url: `type.googleapis.com/protocol.${type}`, - }, - type, - }], - ...metaData, - ...options, - }, - }; - if (Permission_id) { - tx.raw_data.contract[0].Permission_id = Permission_id; - } - const pb = txJsonToPb(tx); - tx.txID = txPbToTxID(pb).replace(/^0x/, ''); - tx.raw_data_hex = txPbToRawDataHex(pb).toLowerCase(); - return tx; -} - -export default class TransactionBuilder { - constructor(tronWeb = false) { - if (!tronWeb || !tronWeb instanceof TronWeb) - throw new Error('Expected instance of TronWeb'); - self = this; - this.tronWeb = tronWeb; - this.injectPromise = injectpromise(this); - this.validator = new Validator(tronWeb); - } - - sendTrx(to = false, amount = 0, from = this.tronWeb.defaultAddress.hex, options, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (utils.isFunction(from)) { - callback = from; - from = this.tronWeb.defaultAddress.hex; - } else if (utils.isObject(from)) { - options = from; - from = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this.sendTrx, to, amount, from, options); - - // accept amounts passed as strings - amount = parseInt(amount) - - if (this.validator.notValid([ - { - name: 'recipient', - type: 'address', - value: to - }, - { - name: 'origin', - type: 'address', - value: from - }, - { - names: ['recipient', 'origin'], - type: 'notEqual', - msg: 'Cannot transfer TRX to the same account' - }, - { - name: 'amount', - type: 'integer', - gt: 0, - value: amount - } - ], callback)) - return; - - const data = { - to_address: toHex(to), - owner_address: toHex(from), - amount: amount, - }; - - createTransaction(this.tronWeb, 'TransferContract', data, options?.permissionId) - .then(transaction => callback(null, transaction)) - .catch(err => callback(err)); - } - - sendToken(to = false, amount = 0, tokenID = false, from = this.tronWeb.defaultAddress.hex, options, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (utils.isFunction(from)) { - callback = from; - from = this.tronWeb.defaultAddress.hex; - } else if (utils.isObject(from)) { - options = from; - from = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this.sendToken, to, amount, tokenID, from, options); - - amount = parseInt(amount) - if (this.validator.notValid([ - { - name: 'recipient', - type: 'address', - value: to - }, - { - name: 'origin', - type: 'address', - value: from, - }, - { - names: ['recipient', 'origin'], - type: 'notEqual', - msg: 'Cannot transfer tokens to the same account' - }, - { - name: 'amount', - type: 'integer', - gt: 0, - value: amount - }, - { - name: 'token ID', - type: 'tokenId', - value: tokenID - } - ], callback)) - return; - - const data = { - to_address: toHex(to), - owner_address: toHex(from), - asset_name: fromUtf8(tokenID), - amount: parseInt(amount) - }; - - createTransaction(this.tronWeb, 'TransferAssetContract', data, options?.permissionId) - .then(transaction => callback(null, transaction)) - .catch(err => callback(err)); - } - - purchaseToken(issuerAddress = false, tokenID = false, amount = 0, buyer = this.tronWeb.defaultAddress.hex, options, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (utils.isFunction(buyer)) { - callback = buyer; - buyer = this.tronWeb.defaultAddress.hex; - } else if (utils.isObject(buyer)) { - options = buyer; - buyer = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this.purchaseToken, issuerAddress, tokenID, amount, buyer, options); - - if (this.validator.notValid([ - { - name: 'buyer', - type: 'address', - value: buyer - }, - { - name: 'issuer', - type: 'address', - value: issuerAddress - }, - { - names: ['buyer', 'issuer'], - type: 'notEqual', - msg: 'Cannot purchase tokens from same account' - }, - { - name: 'amount', - type: 'integer', - gt: 0, - value: amount - }, - { - name: 'token ID', - type: 'tokenId', - value: tokenID - } - ], callback)) - return; - - const data = { - to_address: toHex(issuerAddress), - owner_address: toHex(buyer), - asset_name: fromUtf8(tokenID), - amount: parseInt(amount) - }; - - createTransaction(this.tronWeb, 'ParticipateAssetIssueContract', data, options?.permissionId) - .then(transaction => callback(null, transaction)) - .catch(err => callback(err)); - } - - freezeBalance(amount = 0, duration = 3, resource = "BANDWIDTH", address = this.tronWeb.defaultAddress.hex, receiverAddress = undefined, options, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (utils.isFunction(receiverAddress)) { - callback = receiverAddress; - receiverAddress = undefined; - } else if (utils.isObject(receiverAddress)) { - options = receiverAddress; - receiverAddress = undefined; - } - - if (utils.isFunction(address)) { - callback = address; - address = this.tronWeb.defaultAddress.hex; - } else if (utils.isObject(address)) { - options = address; - address = this.tronWeb.defaultAddress.hex; - } - - if (utils.isFunction(duration)) { - callback = duration; - duration = 3; - } - - if (utils.isFunction(resource)) { - callback = resource; - resource = "BANDWIDTH"; - } - - if (!callback) - return this.injectPromise(this.freezeBalance, amount, duration, resource, address, receiverAddress, options); - - if (this.validator.notValid([ - { - name: 'origin', - type: 'address', - value: address - }, - { - name: 'receiver', - type: 'address', - value: receiverAddress, - optional: true - }, - { - name: 'amount', - type: 'integer', - gt: 0, - value: amount - }, - { - name: 'duration', - type: 'integer', - gte: 3, - value: duration - }, - { - name: 'resource', - type: 'resource', - value: resource, - msg: 'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"' - } - ], callback)) - return; - - const data = { - owner_address: toHex(address), - frozen_balance: parseInt(amount), - frozen_duration: parseInt(duration), - }; - if (resource !== 'BANDWIDTH') { - data.resource = resource; - } - - if (utils.isNotNullOrUndefined(receiverAddress) && toHex(receiverAddress) !== toHex(address)) { - data.receiver_address = toHex(receiverAddress) - } - - createTransaction(this.tronWeb, 'FreezeBalanceContract', data, options?.permissionId) - .then(transaction => callback(null, transaction)) - .catch(err => callback(err)); - } - - unfreezeBalance(resource = "BANDWIDTH", address = this.tronWeb.defaultAddress.hex, receiverAddress = undefined, options, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (utils.isFunction(receiverAddress)) { - callback = receiverAddress; - receiverAddress = undefined; - } else if (utils.isObject(receiverAddress)) { - options = receiverAddress; - receiverAddress = undefined; - } - - if (utils.isFunction(address)) { - callback = address; - address = this.tronWeb.defaultAddress.hex; - } else if (utils.isObject(address)) { - options = address; - address = this.tronWeb.defaultAddress.hex; - } - - if (utils.isFunction(resource)) { - callback = resource; - resource = "BANDWIDTH"; - } - - if (!callback) - return this.injectPromise(this.unfreezeBalance, resource, address, receiverAddress, options); - - if (this.validator.notValid([ - { - name: 'origin', - type: 'address', - value: address - }, - { - name: 'receiver', - type: 'address', - value: receiverAddress, - optional: true - }, - { - name: 'resource', - type: 'resource', - value: resource, - msg: 'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"' - } - ], callback)) - return; - - const data = { - owner_address: toHex(address), - }; - if (resource !== 'BANDWIDTH') { - data.resource = resource; - } - - if (utils.isNotNullOrUndefined(receiverAddress) && toHex(receiverAddress) !== toHex(address)) { - data.receiver_address = toHex(receiverAddress) - } - - createTransaction(this.tronWeb, 'UnfreezeBalanceContract', data, options?.permissionId) - .then(transaction => callback(null, transaction)) - .catch(err => callback(err)); - } - - freezeBalanceV2(amount = 0, resource = "BANDWIDTH", address = this.tronWeb.defaultAddress.hex, options, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (utils.isFunction(address)) { - callback = address; - address = this.tronWeb.defaultAddress.hex; - } else if (utils.isObject(address)) { - options = address; - address = this.tronWeb.defaultAddress.hex; - } - - if (utils.isFunction(resource)) { - callback = resource; - resource = "BANDWIDTH"; - } else if (utils.isObject(resource)) { - options = resource; - resource = "BANDWIDTH"; - } - - if (!callback) - return this.injectPromise(this.freezeBalanceV2, amount, resource, address, options); - - if (this.validator.notValid([ - { - name: 'origin', - type: 'address', - value: address - }, - { - name: 'amount', - type: 'integer', - gt: 0, - value: amount - }, - { - name: 'resource', - type: 'resource', - value: resource, - msg: 'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"' - } - ], callback)) - return; - - const data = { - owner_address: toHex(address), - frozen_balance: parseInt(amount), - }; - if (resource !== 'BANDWIDTH') { - data.resource = resource; - } - - createTransaction(this.tronWeb, 'FreezeBalanceV2Contract', data, options?.permissionId) - .then(transaction => callback(null, transaction)) - .catch(err => callback(err)); - } - - unfreezeBalanceV2(amount = 0, resource = "BANDWIDTH", address = this.tronWeb.defaultAddress.hex, options, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (utils.isFunction(address)) { - callback = address; - address = this.tronWeb.defaultAddress.hex; - } else if (utils.isObject(address)) { - options = address; - address = this.tronWeb.defaultAddress.hex; - } - - if (utils.isFunction(resource)) { - callback = resource; - resource = "BANDWIDTH"; - } else if (utils.isObject(resource)) { - options = resource; - resource = "BANDWIDTH"; - } - - if (!callback) - return this.injectPromise(this.unfreezeBalanceV2, amount, resource, address, options); - - if (this.validator.notValid([ - { - name: 'origin', - type: 'address', - value: address - }, - { - name: 'amount', - type: 'integer', - gt: 0, - value: amount - }, - { - name: 'resource', - type: 'resource', - value: resource, - msg: 'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"' - } - ], callback)) - return; - - const data = { - owner_address: toHex(address), - unfreeze_balance: parseInt(amount), - }; - if (resource !== 'BANDWIDTH') { - data.resource = resource; - } - - createTransaction(this.tronWeb, 'UnfreezeBalanceV2Contract', data, options?.permissionId) - .then(transaction => callback(null, transaction)) - .catch(err => callback(err)); - } - - delegateResource(amount = 0, receiverAddress, resource = "BANDWIDTH", address = this.tronWeb.defaultAddress.hex, lock = false, options, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (utils.isFunction(lock)) { - callback = lock; - lock = false; - } else if (utils.isObject(lock)) { - options = lock; - lock = false; - } - - if (utils.isFunction(address)) { - callback = address; - address = this.tronWeb.defaultAddress.hex; - } else if (utils.isObject(address)) { - options = address; - address = this.tronWeb.defaultAddress.hex; - } - - if (utils.isFunction(resource)) { - callback = resource; - resource = "BANDWIDTH"; - } else if (utils.isObject(resource)) { - options = resource; - resource = "BANDWIDTH"; - } - - if (!callback) - return this.injectPromise(this.delegateResource, amount, receiverAddress, resource, address, lock, options); - - if (this.validator.notValid([ - { - name: 'amount', - type: 'integer', - gt: 0, - value: amount - }, - { - name: 'resource', - type: 'resource', - value: resource, - msg: 'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"' - }, - { - name: 'receiver', - type: 'address', - value: receiverAddress - }, - { - name: 'origin', - type: 'address', - value: address - }, - { - name: 'lock', - type: 'boolean', - value: lock - } - ], callback)) - return; - - if(toHex(receiverAddress) === toHex(address)) { - return callback('Receiver address must not be the same as owner address'); - } - - const data = { - owner_address: toHex(address), - receiver_address: toHex(receiverAddress), - balance: parseInt(amount), - }; - if (resource !== 'BANDWIDTH') { - data.resource = resource; - } - if (lock) { - data.lock = lock; - } - - createTransaction(this.tronWeb, 'DelegateResourceContract', data, options?.permissionId) - .then(transaction => callback(null, transaction)) - .catch(err => callback(err)); - } - - undelegateResource(amount = 0, receiverAddress, resource = "BANDWIDTH", address = this.tronWeb.defaultAddress.hex, options, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (utils.isFunction(address)) { - callback = address; - address = this.tronWeb.defaultAddress.hex; - } else if (utils.isObject(address)) { - options = address; - address = this.tronWeb.defaultAddress.hex; - } - - if (utils.isFunction(resource)) { - callback = resource; - resource = "BANDWIDTH"; - } else if (utils.isObject(resource)) { - options = resource; - resource = "BANDWIDTH"; - } - - if (!callback) - return this.injectPromise(this.undelegateResource, amount, receiverAddress, resource, address, options); - - if (this.validator.notValid([ - { - name: 'origin', - type: 'address', - value: address - }, - { - name: 'receiver', - type: 'address', - value: receiverAddress - }, - { - name: 'amount', - type: 'integer', - gt: 0, - value: amount - }, - { - name: 'resource', - type: 'resource', - value: resource, - msg: 'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"' - } - ], callback)) - return; - - if(toHex(receiverAddress) === toHex(address)) { - return callback('Receiver address must not be the same as owner address'); - } - - const data = { - owner_address: toHex(address), - receiver_address: toHex(receiverAddress), - balance: parseInt(amount), - }; - if (resource !== 'BANDWIDTH') { - data.resource = resource; - } - - createTransaction(this.tronWeb, 'UnDelegateResourceContract', data, options?.permissionId) - .then(transaction => callback(null, transaction)) - .catch(err => callback(err)); - } - - withdrawExpireUnfreeze(address = this.tronWeb.defaultAddress.hex, options, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (utils.isFunction(address)) { - callback = address; - address = this.tronWeb.defaultAddress.hex; - } else if (utils.isObject(address)) { - options = address; - address = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this.withdrawExpireUnfreeze, address, options); - - if (this.validator.notValid([ - { - name: 'origin', - type: 'address', - value: address - } - ], callback)) - return; - - const data = { - owner_address: toHex(address) - } - - createTransaction(this.tronWeb, 'WithdrawExpireUnfreezeContract', data, options?.permissionId) - .then(transaction => callback(null, transaction)) - .catch(err => callback(err)); - } - - withdrawBlockRewards(address = this.tronWeb.defaultAddress.hex, options, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (utils.isFunction(address)) { - callback = address; - address = this.tronWeb.defaultAddress.hex; - } else if (utils.isObject(address)) { - options = address; - address = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this.withdrawBlockRewards, address, options); - - if (this.validator.notValid([ - { - name: 'origin', - type: 'address', - value: address - } - ], callback)) - return; - - const data = { - owner_address: toHex(address) - }; - - createTransaction(this.tronWeb, 'WithdrawBalanceContract', data, options?.permissionId) - .then(transaction => callback(null, transaction)) - .catch(err => callback(err)); - } - - applyForSR( - address = this.tronWeb.defaultAddress.hex, - url = false, - options, - callback = false - ) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - if (utils.isObject(url) && utils.isValidURL(address)) { - options = url; - url = address; - address = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this.applyForSR, address, url, options); - - if (this.validator.notValid([ - { - name: 'origin', - type: 'address', - value: address - }, - { - name: 'url', - type: 'url', - value: url, - msg: 'Invalid url provided' - }, - { - name: 'url', - type: 'string', - value: url, - lte: 256, - msg: 'Invalid url provided' - }, - ], callback)) - return; - - - const data = { - owner_address: toHex(address), - url: fromUtf8(url), - }; - - createTransaction(this.tronWeb, 'WitnessCreateContract', data, options?.permissionId) - .then(transaction => callback(null, transaction)) - .catch(err => callback(err)); - } - - vote(votes = {}, voterAddress = this.tronWeb.defaultAddress.hex, options, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (utils.isFunction(voterAddress)) { - callback = voterAddress; - voterAddress = this.tronWeb.defaultAddress.hex; - } else if (utils.isObject(voterAddress)) { - options = voterAddress; - voterAddress = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this.vote, votes, voterAddress, options); - - if (this.validator.notValid([ - { - name: 'voter', - type: 'address', - value: voterAddress - }, - { - name: 'votes', - type: 'notEmptyObject', - value: votes - } - ], callback)) - return; - - let invalid = false; - - votes = Object.entries(votes).map(([srAddress, voteCount]) => { - if (invalid) - return; - - if (this.validator.notValid([ - { - name: 'SR', - type: 'address', - value: srAddress - }, - { - name: 'vote count', - type: 'integer', - gt: 0, - value: voteCount, - msg: 'Invalid vote count provided for SR: ' + srAddress - } - ])) - return invalid = true; - - return { - vote_address: toHex(srAddress), - vote_count: parseInt(voteCount) - }; - }); - - if (invalid) - return; - - const data = { - owner_address: toHex(voterAddress), - votes, - }; - - createTransaction(this.tronWeb, 'VoteWitnessContract', data, options?.permissionId) - .then(transaction => callback(null, transaction)) - .catch(err => callback(err)); - } - - createSmartContract(options = {}, issuerAddress = this.tronWeb.defaultAddress.hex, callback = false) { - if (utils.isFunction(issuerAddress)) { - callback = issuerAddress; - issuerAddress = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this.createSmartContract, options, issuerAddress); - - const feeLimit = options.feeLimit || this.tronWeb.feeLimit; - let userFeePercentage = options.userFeePercentage; - if (typeof userFeePercentage !== 'number' && !userFeePercentage) { - userFeePercentage = 100; - } - const originEnergyLimit = options.originEnergyLimit || 10_000_000; - const callValue = options.callValue || 0; - const tokenValue = options.tokenValue; - const tokenId = options.tokenId || options.token_id; - - let { - abi = false, - bytecode = false, - parameters = [], - name = "" - } = options; - - if (abi && utils.isString(abi)) { - try { - abi = JSON.parse(abi); - } catch { - return callback('Invalid options.abi provided'); - } - } - - if (abi.entrys) - abi = abi.entrys; - - if (!utils.isArray(abi)) - return callback('Invalid options.abi provided'); - - - const payable = abi.some(func => { - return func.type === 'constructor' && 'payable' === func.stateMutability.toLowerCase(); - }); - - if (this.validator.notValid([ - { - name: 'bytecode', - type: 'hex', - value: bytecode - }, - { - name: 'feeLimit', - type: 'integer', - value: feeLimit, - gt: 0 - }, - { - name: 'callValue', - type: 'integer', - value: callValue, - gte: 0 - }, - { - name: 'userFeePercentage', - type: 'integer', - value: userFeePercentage, - gte: 0, - lte: 100 - }, - { - name: 'originEnergyLimit', - type: 'integer', - value: originEnergyLimit, - gte: 0, - lte: 10_000_000 - }, - { - name: 'parameters', - type: 'array', - value: parameters - }, - { - name: 'issuer', - type: 'address', - value: issuerAddress - }, - { - name: 'tokenValue', - type: 'integer', - value: tokenValue, - gte: 0, - optional: true - }, - { - name: 'tokenId', - type: 'integer', - value: tokenId, - gte: 0, - optional: true - } - ], callback)) - return; - - if (!payable && (callValue > 0 || tokenValue > 0)) - return callback('When contract is not payable, options.callValue and options.tokenValue must be 0'); - - - if (options.rawParameter && utils.isString(options.rawParameter)) { - parameters = options.rawParameter.replace(/^(0x)/, ''); - } else if (options.funcABIV2) { - parameters = encodeParamsV2ByABI(options.funcABIV2, options.parametersV2).replace(/^(0x)/, ''); - } else { - var constructorParams = abi.find( - (it) => { - return it.type === 'constructor'; - } - ); - - if (typeof constructorParams !== 'undefined' && constructorParams) { - const abiCoder = new AbiCoder(); - const types = []; - const values = []; - constructorParams = constructorParams.inputs; - - if (parameters.length != constructorParams.length) - return callback(`constructor needs ${constructorParams.length} but ${parameters.length} provided`); - - for (let i = 0; i < parameters.length; i++) { - let type = constructorParams[i].type; - let value = parameters[i]; - - if (!type || !utils.isString(type) || !type.length) - return callback('Invalid parameter type provided: ' + type); - - if (type === 'address') - value = toHex(value).replace(ADDRESS_PREFIX_REGEX, '0x'); - else if (type.match(/^([^\x5b]*)(\x5b|$)/)[0] === 'address[') - value = value.map(v => toHex(v).replace(ADDRESS_PREFIX_REGEX, '0x')); - else if (/trcToken/.test(type)) { - type = type.replace(/trcToken/, 'uint256') - } - - types.push(type); - values.push(value); - } - - try { - parameters = abiCoder.encode(types, values).replace(/^(0x)/, ''); - } catch (ex) { - return callback(ex); - } - } else parameters = ''; - } - - const args = { - owner_address: toHex(issuerAddress), - fee_limit: parseInt(feeLimit), - call_value: parseInt(callValue), - consume_user_resource_percent: userFeePercentage, - origin_energy_limit: originEnergyLimit, - abi: JSON.stringify(abi), - bytecode, - parameter: parameters, - name - }; - - // tokenValue and tokenId can cause errors if provided when the trx10 proposal has not been approved yet. So we set them only if they are passed to the method. - if (utils.isNotNullOrUndefined(tokenValue)) - args.call_token_value = parseInt(tokenValue) - if (utils.isNotNullOrUndefined(tokenId)) - args.token_id = parseInt(tokenId) - - new Promise((resolve) => { - const contract = {}; - contract.owner_address = args.owner_address; - if (utils.isNotNullOrUndefined(args.call_token_value)) { - contract.call_token_value = args.call_token_value; - } - if (utils.isNotNullOrUndefined(args.token_id)) { - contract.token_id = args.token_id; - } - const new_contract = contract.new_contract = {}; - - if (args.abi) { - new_contract.abi = { - entrys: JSON.parse(args.abi), - }; - } else { - new_contract.abi = {}; - } - if (args.call_value) { - new_contract.call_value = args.call_value; - } - new_contract.consume_user_resource_percent = args.consume_user_resource_percent; - new_contract.origin_energy_limit = args.origin_energy_limit; - new_contract.origin_address = args.origin_address ?? args.owner_address; - if (args.bytecode + args.parameter) { - new_contract.bytecode = (args.bytecode + args.parameter).replace(/^0x/, ''); - } - if (utils.isNotNullOrUndefined(args.name)) { - new_contract.name = args.name; - } - - resolve(contract); - }) - .then(async contract => { - const tx = await createTransaction(this.tronWeb, 'CreateSmartContract', contract, options?.permissionId, { fee_limit: args.fee_limit }) - tx.contract_address = genContractAddress(args.owner_address, tx.txID); - return tx; - }) - .then(transaction => callback(null, transaction)) - .catch(err => callback(err)); - } - - triggerSmartContract(...params) { - if (typeof params[2] !== 'object') { - params[2] = { - feeLimit: params[2], - callValue: params[3] - } - params.splice(3, 1) - } - if (params[2]?.txLocal) { - return this._triggerSmartContractLocal(...params); - } - return this._triggerSmartContract(...params); - } - - triggerConstantContract(...params) { - params[2]._isConstant = true - return this._triggerSmartContract(...params); - } - - triggerConfirmedConstantContract(...params) { - params[2]._isConstant = true - params[2].confirmed = true - return this._triggerSmartContract(...params); - } - - estimateEnergy(...params) { - params[2].estimateEnergy = true; - return this._triggerSmartContract(...params); - } - - _getTriggerSmartContractArgs( - contractAddress, - functionSelector, - options, - parameters, - issuerAddress, - tokenValue, - tokenId, - callValue, - feeLimit, - ) { - const args = { - contract_address: toHex(contractAddress), - owner_address: toHex(issuerAddress) - }; - - - if (functionSelector && utils.isString(functionSelector)) { - functionSelector = functionSelector.replace('/\s*/g', ''); - if (parameters.length) { - const abiCoder = new AbiCoder(); - let types = []; - const values = []; - - for (let i = 0; i < parameters.length; i++) { - let {type, value} = parameters[i]; - - if (!type || !utils.isString(type) || !type.length) - return callback('Invalid parameter type provided: ' + type); - - if (type === 'address') - value = toHex(value).replace(ADDRESS_PREFIX_REGEX, '0x'); - else if (type.match(/^([^\x5b]*)(\x5b|$)/)[0] === 'address[') - value = value.map(v => toHex(v).replace(ADDRESS_PREFIX_REGEX, '0x')); - - types.push(type); - values.push(value); - } - - try { - // workaround for unsupported trcToken type - types = types.map(type => { - if (/trcToken/.test(type)) { - type = type.replace(/trcToken/, 'uint256') - } - return type - }) - - parameters = abiCoder.encode(types, values).replace(/^(0x)/, ''); - - } catch (ex) { - return callback(ex); - } - } else parameters = ''; - - // work for abiv2 if passed the function abi in options - if (options.funcABIV2) { - parameters = encodeParamsV2ByABI(options.funcABIV2, options.parametersV2).replace(/^(0x)/, ''); - } - - if (options.shieldedParameter && utils.isString(options.shieldedParameter)) { - parameters = options.shieldedParameter.replace(/^(0x)/, ''); - } - - if (options.rawParameter && utils.isString(options.rawParameter)) { - parameters = options.rawParameter.replace(/^(0x)/, ''); - } - - args.function_selector = functionSelector; - args.parameter = parameters; - } - - args.call_value = parseInt(callValue) - if (utils.isNotNullOrUndefined(tokenValue)) - args.call_token_value = parseInt(tokenValue) - if (utils.isNotNullOrUndefined(tokenId)) - args.token_id = parseInt(tokenId) - - if (!(options._isConstant || options.estimateEnergy)) { - args.fee_limit = parseInt(feeLimit) - } - - if (options.permissionId) { - args.Permission_id = options.permissionId; - } - - return args; - } - - _triggerSmartContractLocal( - contractAddress, - functionSelector, - options = {}, - parameters = [], - issuerAddress = this.tronWeb.defaultAddress.hex, - callback = false - ) { - - if (utils.isFunction(issuerAddress)) { - callback = issuerAddress; - issuerAddress = this.tronWeb.defaultAddress.hex; - } - - if (utils.isFunction(parameters)) { - callback = parameters; - parameters = []; - } - - if (!callback) { - return this.injectPromise( - this._triggerSmartContractLocal, - contractAddress, - functionSelector, - options, - parameters, - issuerAddress - ); - } - - let { - tokenValue, - tokenId, - callValue, - feeLimit, - } = Object.assign({ - callValue: 0, - feeLimit: this.tronWeb.feeLimit - }, options) - - if (this.validator.notValid([ - { - name: 'feeLimit', - type: 'integer', - value: feeLimit, - gt: 0 - }, - { - name: 'callValue', - type: 'integer', - value: callValue, - gte: 0 - }, - { - name: 'parameters', - type: 'array', - value: parameters - }, - { - name: 'contract', - type: 'address', - value: contractAddress - }, - { - name: 'issuer', - type: 'address', - value: issuerAddress, - optional: true - }, - { - name: 'tokenValue', - type: 'integer', - value: tokenValue, - gte: 0, - optional: true - }, - { - name: 'tokenId', - type: 'integer', - value: tokenId, - gte: 0, - optional: true - } - ], callback)) - return; - - const args = this._getTriggerSmartContractArgs( - contractAddress, - functionSelector, - options, - parameters, - issuerAddress, - tokenValue, - tokenId, - callValue, - feeLimit - ); - - if (args.function_selector) { - args.data = keccak256(Buffer.from(args.function_selector, 'utf-8')).toString().substring(2, 10) + args.parameter; - } - const value = { - data: args.data, - owner_address: args.owner_address, - contract_address: args.contract_address, - }; - if (args.call_value) { - value.call_value = args.call_value; - } - if (args.call_token_value) { - value.call_token_value = args.call_token_value; - } - if (args.token_id) { - value.token_id = args.token_id; - } - createTransaction( - this.tronWeb, - 'TriggerSmartContract', - value, - options.permissionId, - { - fee_limit: args.fee_limit, - } - ).then(transaction => { - callback(null, { - result: { - result: true, - }, - transaction, - }); - }).catch(err => callback(err)); - } - - _triggerSmartContract( - contractAddress, - functionSelector, - options = {}, - parameters = [], - issuerAddress = this.tronWeb.defaultAddress.hex, - callback = false - ) { - - if (utils.isFunction(issuerAddress)) { - callback = issuerAddress; - issuerAddress = this.tronWeb.defaultAddress.hex; - } - - if (utils.isFunction(parameters)) { - callback = parameters; - parameters = []; - } - - if (!callback) { - return this.injectPromise( - this._triggerSmartContract, - contractAddress, - functionSelector, - options, - parameters, - issuerAddress - ); - } - - let { - tokenValue, - tokenId, - callValue, - feeLimit, - } = Object.assign({ - callValue: 0, - feeLimit: this.tronWeb.feeLimit - }, options) - - if (this.validator.notValid([ - { - name: 'feeLimit', - type: 'integer', - value: feeLimit, - gt: 0 - }, - { - name: 'callValue', - type: 'integer', - value: callValue, - gte: 0 - }, - { - name: 'parameters', - type: 'array', - value: parameters - }, - { - name: 'contract', - type: 'address', - value: contractAddress - }, - { - name: 'issuer', - type: 'address', - value: issuerAddress, - optional: true - }, - { - name: 'tokenValue', - type: 'integer', - value: tokenValue, - gte: 0, - optional: true - }, - { - name: 'tokenId', - type: 'integer', - value: tokenId, - gte: 0, - optional: true - } - ], callback)) - return; - - const args = this._getTriggerSmartContractArgs( - contractAddress, - functionSelector, - options, - parameters, - issuerAddress, - tokenValue, - tokenId, - callValue, - feeLimit - ); - - let pathInfo = 'triggersmartcontract'; - if(options._isConstant) { - pathInfo = 'triggerconstantcontract'; - } else if (options.estimateEnergy) { - pathInfo = 'estimateenergy'; - } - - pathInfo = `wallet${options.confirmed ? 'solidity' : ''}/${pathInfo}`; - this.tronWeb[options.confirmed ? 'solidityNode' : 'fullNode'].request(pathInfo, args, 'post').then(transaction => resultManagerTriggerSmartContract(transaction, args, options, callback)).catch(err => callback(err)); - } - - clearABI(contractAddress, ownerAddress = this.tronWeb.defaultAddress.hex, options, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (utils.isFunction(ownerAddress)) { - callback = ownerAddress; - ownerAddress = this.tronWeb.defaultAddress.hex; - } else if (utils.isObject(ownerAddress)) { - options = ownerAddress; - ownerAddress = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this.clearABI, contractAddress, ownerAddress, options); - - if (!this.tronWeb.isAddress(contractAddress)) - return callback('Invalid contract address provided'); - - if (!this.tronWeb.isAddress(ownerAddress)) - return callback('Invalid owner address provided'); - - const data = { - contract_address: toHex(contractAddress), - owner_address: toHex(ownerAddress) - }; - - if (this.tronWeb.trx.cache.contracts[contractAddress]) { - delete this.tronWeb.trx.cache.contracts[contractAddress] - } - - createTransaction(this.tronWeb, 'ClearABIContract', data, options?.permissionId) - .then(transaction => callback(null, transaction)) - .catch(err => callback(err)); - - } - - updateBrokerage(brokerage, ownerAddress = this.tronWeb.defaultAddress.hex, options, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (utils.isFunction(ownerAddress)) { - callback = ownerAddress; - ownerAddress = this.tronWeb.defaultAddress.hex; - } else if (utils.isObject(ownerAddress)) { - options = ownerAddress; - ownerAddress = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this.updateBrokerage, brokerage, ownerAddress, options); - - if (!utils.isNotNullOrUndefined(brokerage)) - return callback('Invalid brokerage provided'); - - if (!utils.isInteger(brokerage) || brokerage < 0 || brokerage > 100) - return callback('Brokerage must be an integer between 0 and 100'); - - if (!this.tronWeb.isAddress(ownerAddress)) - return callback('Invalid owner address provided'); - - const data = { - brokerage: parseInt(brokerage), - owner_address: toHex(ownerAddress) - }; - - createTransaction(this.tronWeb, 'UpdateBrokerageContract', data, options?.permissionId) - .then(transaction => callback(null, transaction)) - .catch(err => callback(err)); - } - - createToken(options = {}, issuerAddress = this.tronWeb.defaultAddress.hex, callback = false) { - if (utils.isFunction(issuerAddress)) { - callback = issuerAddress; - issuerAddress = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this.createToken, options, issuerAddress); - - const { - name = false, - abbreviation = false, - description = '', - url = false, - totalSupply = 0, - trxRatio = 1, // How much TRX will `tokenRatio` cost? - tokenRatio = 1, // How many tokens will `trxRatio` afford? - saleStart = Date.now(), - saleEnd = false, - freeBandwidth = 0, // The creator's "donated" bandwidth for use by token holders - freeBandwidthLimit = 0, // Out of `totalFreeBandwidth`, the amount each token holder get - frozenAmount = 0, - frozenDuration = 0, - // for now there is no default for the following values - voteScore, - precision - } = options; - - if (this.validator.notValid([ - { - name: 'Supply amount', - type: 'positive-integer', - value: totalSupply - }, - { - name: 'TRX ratio', - type: 'positive-integer', - value: trxRatio - }, - { - name: 'Token ratio', - type: 'positive-integer', - value: tokenRatio - }, - { - name: 'token abbreviation', - type: 'string', - value: abbreviation, - lte: 32, - gt: 0 - }, - { - name: 'token name', - type: 'not-empty-string', - value: name - }, - { - name: 'token description', - type: 'string', - value: description, - lte: 200 - }, - { - name: 'token url', - type: 'url', - value: url - }, - { - name: 'token url', - type: 'string', - value: url, - lte: 256, - }, - { - name: 'issuer', - type: 'address', - value: issuerAddress - }, - { - name: 'sale start timestamp', - type: 'integer', - value: saleStart, - gte: Date.now() - }, - { - name: 'sale end timestamp', - type: 'integer', - value: saleEnd, - gt: saleStart - }, - { - name: 'Frozen supply', - type: 'integer', - value: frozenAmount, - gte: 0 - }, - { - name: 'Frozen duration', - type: 'integer', - value: frozenDuration, - gte: 0 - } - ], callback)) - return; - - if (utils.isNotNullOrUndefined(voteScore) && (!utils.isInteger(voteScore) || voteScore <= 0)) - return callback('voteScore must be a positive integer greater than 0'); - - if (utils.isNotNullOrUndefined(precision) && (!utils.isInteger(precision) || precision < 0 || precision > 6)) - return callback('precision must be a positive integer >= 0 and <= 6'); - - const data = { - owner_address: toHex(issuerAddress), - name: fromUtf8(name), - abbr: fromUtf8(abbreviation), - description: fromUtf8(description), - url: fromUtf8(url), - total_supply: parseInt(totalSupply), - trx_num: parseInt(trxRatio), - num: parseInt(tokenRatio), - start_time: parseInt(saleStart), - end_time: parseInt(saleEnd), - // free_asset_net_limit: parseInt(freeBandwidth), - // public_free_asset_net_limit: parseInt(freeBandwidthLimit), - frozen_supply: [{ - frozen_amount: parseInt(frozenAmount), - frozen_days: parseInt(frozenDuration) - }] - }; - ['name', 'abbr', 'description', 'url'].forEach((key) => { - if (!data[key]) { - delete data[key]; - } - }); - if (!(parseInt(frozenAmount) > 0)) { - delete data.frozen_supply - } - if (freeBandwidth && !isNaN(parseInt(freeBandwidth)) && parseInt(freeBandwidth) >= 0) { - data.free_asset_net_limit = parseInt(freeBandwidth); - } - if (freeBandwidthLimit && !isNaN(parseInt(freeBandwidthLimit)) && parseInt(freeBandwidthLimit) >= 0) { - data.public_free_asset_net_limit = parseInt(freeBandwidthLimit); - } - if (precision && !isNaN(parseInt(precision))) { - data.precision = parseInt(precision); - } - if (voteScore && !isNaN(parseInt(voteScore))) { - data.vote_score = parseInt(voteScore) - } - - createTransaction(this.tronWeb, 'AssetIssueContract', data, options?.permissionId) - .then(transaction => callback(null, transaction)) - .catch(err => callback(err)); - } - - createAccount(accountAddress, address = this.tronWeb.defaultAddress.hex, options, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (utils.isFunction(address)) { - callback = address; - address = this.tronWeb.defaultAddress.hex; - } else if (utils.isObject(address)) { - options = address; - address = this.tronWeb.defaultAddress.hex; - } - - if (!callback) { - return this.injectPromise(this.createAccount, accountAddress, address, options); - } - - if (this.validator.notValid([ - { - name: 'account', - type: 'address', - value: accountAddress - }, - { - name: 'origin', - type: 'address', - value: address - } - ], callback)) - return; - - const data = { - owner_address: toHex(address), - account_address: toHex(accountAddress), - }; - - createTransaction(this.tronWeb, 'AccountCreateContract', data, options?.permissionId) - .then(transaction => callback(null, transaction)) - .catch(err => callback(err)); - } - - updateAccount(accountName = false, address = this.tronWeb.defaultAddress.hex, options, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (utils.isFunction(address)) { - callback = address; - address = this.tronWeb.defaultAddress.hex; - } else if (utils.isObject(address)) { - options = address; - address = this.tronWeb.defaultAddress.hex; - } - - if (!callback) { - return this.injectPromise(this.updateAccount, accountName, address, options); - } - - if (this.validator.notValid([ - { - name: 'Name', - type: 'string', - lte: 200, - gte: 0, - value: accountName, - }, - { - name: 'origin', - type: 'address', - value: address - } - ], callback)) - return; - - const data = { - account_name: fromUtf8(accountName), - owner_address: toHex(address), - }; - - createTransaction(this.tronWeb, 'AccountUpdateContract', data, options?.permissionId) - .then(transaction => callback(null, transaction)) - .catch(err => callback(err)); - } - - setAccountId(accountId, address = this.tronWeb.defaultAddress.hex, options, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (utils.isFunction(address)) { - callback = address; - address = this.tronWeb.defaultAddress.hex; - } else if (utils.isObject(address)) { - options = address; - address = this.tronWeb.defaultAddress.hex; - } - - if (!callback) { - return this.injectPromise(this.setAccountId, accountId, address, options); - } - - if (accountId && utils.isString(accountId) && accountId.startsWith('0x')) { - accountId = accountId.slice(2); - } - - if (this.validator.notValid([ - { - name: 'accountId', - type: 'hex', - value: accountId - }, - { - name: 'accountId', - type: 'string', - lte: 32, - gte: 8, - value: accountId - }, - { - name: 'origin', - type: 'address', - value: address - } - ], callback)) - return; - - const data = { - account_id: accountId, - owner_address: toHex(address), - } - - createTransaction(this.tronWeb, 'SetAccountIdContract', data, options?.permissionId) - .then(transaction => callback(null, transaction)) - .catch(err => callback(err)); - } - - updateToken(options = {}, issuerAddress = this.tronWeb.defaultAddress.hex, callback = false) { - if (utils.isFunction(issuerAddress)) { - callback = issuerAddress; - issuerAddress = this.tronWeb.defaultAddress.hex; - } else if (utils.isObject(issuerAddress)) { - options = issuerAddress; - issuerAddress = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this.updateToken, options, issuerAddress); - - const { - description = '', - url = false, - freeBandwidth = 0, // The creator's "donated" bandwidth for use by token holders - freeBandwidthLimit = 0 // Out of `totalFreeBandwidth`, the amount each token holder get - } = options; - - - if (this.validator.notValid([ - { - name: 'token description', - type: 'string', - value: description, - lte: 200 - }, - { - name: 'token url', - type: 'url', - value: url - }, - { - name: 'token url', - type: 'string', - value: url, - lte: 256, - }, - { - name: 'issuer', - type: 'address', - value: issuerAddress - }, - { - name: 'Free bandwidth amount', - type: 'positive-integer', - value: freeBandwidth - }, - { - name: 'Free bandwidth limit', - type: 'positive-integer', - value: freeBandwidthLimit - } - ], callback)) - return; - - const data = { - owner_address: toHex(issuerAddress), - description: fromUtf8(description), - url: fromUtf8(url), - new_limit: parseInt(freeBandwidth), - new_public_limit: parseInt(freeBandwidthLimit) - }; - - createTransaction(this.tronWeb, 'UpdateAssetContract', data, options?.permissionId) - .then(transaction => callback(null, transaction)) - .catch(err => callback(err)); - } - - sendAsset(...args) { - return this.sendToken(...args); - } - - purchaseAsset(...args) { - return this.purchaseToken(...args); - } - - createAsset(...args) { - return this.createToken(...args); - } - - updateAsset(...args) { - return this.updateToken(...args); - } - - /** - * Creates a proposal to modify the network. - * Can only be created by a current Super Representative. - */ - createProposal(parameters = false, issuerAddress = this.tronWeb.defaultAddress.hex, options, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (utils.isFunction(issuerAddress)) { - callback = issuerAddress; - issuerAddress = this.tronWeb.defaultAddress.hex; - } else if (utils.isObject(issuerAddress)) { - options = issuerAddress; - issuerAddress = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this.createProposal, parameters, issuerAddress, options); - - if (this.validator.notValid([ - { - name: 'issuer', - type: 'address', - value: issuerAddress - } - ], callback)) - return; - - const invalid = 'Invalid proposal parameters provided'; - - if (!parameters) - return callback(invalid); - - if (!utils.isArray(parameters)) - parameters = [parameters]; - - for (let parameter of parameters) { - if (!utils.isObject(parameter)) - return callback(invalid); - } - - const data = { - owner_address: toHex(issuerAddress), - parameters: parameters - }; - - createTransaction(this.tronWeb, 'ProposalCreateContract', data, options?.permissionId) - .then(transaction => callback(null, transaction)) - .catch(err => callback(err)); - } - - /** - * Deletes a network modification proposal that the owner issued. - * Only current Super Representative can vote on a proposal. - */ - deleteProposal(proposalID = false, issuerAddress = this.tronWeb.defaultAddress.hex, options, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (utils.isFunction(issuerAddress)) { - callback = issuerAddress; - issuerAddress = this.tronWeb.defaultAddress.hex; - } else if (utils.isObject(issuerAddress)) { - options = issuerAddress; - issuerAddress = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this.deleteProposal, proposalID, issuerAddress, options); - - if (this.validator.notValid([ - { - name: 'issuer', - type: 'address', - value: issuerAddress - }, - { - name: 'proposalID', - type: 'integer', - value: proposalID, - gte: 0 - } - ], callback)) - return; - - const data = { - owner_address: toHex(issuerAddress), - proposal_id: parseInt(proposalID) - }; - - createTransaction(this.tronWeb, 'ProposalDeleteContract', data, options?.permissionId) - .then(transaction => callback(null, transaction)) - .catch(err => callback(err)); - } - - /** - * Adds a vote to an issued network modification proposal. - * Only current Super Representative can vote on a proposal. - */ - voteProposal(proposalID = false, isApproval = false, voterAddress = this.tronWeb.defaultAddress.hex, options, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (utils.isFunction(voterAddress)) { - callback = voterAddress; - voterAddress = this.tronWeb.defaultAddress.hex; - } else if (utils.isObject(voterAddress)) { - options = voterAddress; - voterAddress = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this.voteProposal, proposalID, isApproval, voterAddress, options); - - if (this.validator.notValid([ - { - name: 'voter', - type: 'address', - value: voterAddress - }, - { - name: 'proposalID', - type: 'integer', - value: proposalID, - gte: 0 - }, - { - name: 'has approval', - type: 'boolean', - value: isApproval - } - ], callback)) - return; - - const data = { - owner_address: toHex(voterAddress), - proposal_id: parseInt(proposalID), - is_add_approval: isApproval - }; - - createTransaction(this.tronWeb, 'ProposalApproveContract', data, options?.permissionId) - .then(transaction => callback(null, transaction)) - .catch(err => callback(err)); - } - - /** - * Create an exchange between a token and TRX. - * Token Name should be a CASE SENSITIVE string. - * PLEASE VERIFY THIS ON TRONSCAN. - */ - createTRXExchange(tokenName, tokenBalance, trxBalance, ownerAddress = this.tronWeb.defaultAddress.hex, options, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (utils.isFunction(ownerAddress)) { - callback = ownerAddress; - ownerAddress = this.tronWeb.defaultAddress.hex; - } else if (utils.isObject(ownerAddress)) { - options = ownerAddress; - ownerAddress = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this.createTRXExchange, tokenName, tokenBalance, trxBalance, ownerAddress, options); - - if (this.validator.notValid([ - { - name: 'owner', - type: 'address', - value: ownerAddress - }, - { - name: 'token name', - type: 'not-empty-string', - value: tokenName - }, - { - name: 'token balance', - type: 'positive-integer', - value: tokenBalance - }, - { - name: 'trx balance', - type: 'positive-integer', - value: trxBalance - } - ], callback)) - return; - - const data = { - owner_address: toHex(ownerAddress), - first_token_id: fromUtf8(tokenName), - first_token_balance: tokenBalance, - second_token_id: '5f', // Constant for TRX. - second_token_balance: trxBalance - }; - - createTransaction(this.tronWeb, 'ExchangeCreateContract', data, options?.permissionId) - .then(transaction => callback(null, transaction)) - .catch(err => callback(err)); - } - - /** - * Create an exchange between a token and another token. - * DO NOT USE THIS FOR TRX. - * Token Names should be a CASE SENSITIVE string. - * PLEASE VERIFY THIS ON TRONSCAN. - */ - createTokenExchange(firstTokenName, firstTokenBalance, secondTokenName, secondTokenBalance, ownerAddress = this.tronWeb.defaultAddress.hex, options, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (utils.isFunction(ownerAddress)) { - callback = ownerAddress; - ownerAddress = this.tronWeb.defaultAddress.hex; - } else if (utils.isObject(ownerAddress)) { - options = ownerAddress; - ownerAddress = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this.createTokenExchange, firstTokenName, firstTokenBalance, secondTokenName, secondTokenBalance, ownerAddress, options); - - if (this.validator.notValid([ - { - name: 'owner', - type: 'address', - value: ownerAddress - }, - { - name: 'first token name', - type: 'not-empty-string', - value: firstTokenName - }, - { - name: 'second token name', - type: 'not-empty-string', - value: secondTokenName - }, - { - name: 'first token balance', - type: 'positive-integer', - value: firstTokenBalance - }, - { - name: 'second token balance', - type: 'positive-integer', - value: secondTokenBalance - } - ], callback)) - return; - - const data = { - owner_address: toHex(ownerAddress), - first_token_id: fromUtf8(firstTokenName), - first_token_balance: firstTokenBalance, - second_token_id: fromUtf8(secondTokenName), - second_token_balance: secondTokenBalance - }; - - createTransaction(this.tronWeb, 'ExchangeCreateContract', data, options?.permissionId) - .then(transaction => callback(null, transaction)) - .catch(err => callback(err)); - } - - /** - * Adds tokens into a bancor style exchange. - * Will add both tokens at market rate. - * Use "_" for the constant value for TRX. - */ - injectExchangeTokens(exchangeID = false, tokenName = false, tokenAmount = 0, ownerAddress = this.tronWeb.defaultAddress.hex, options, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (utils.isFunction(ownerAddress)) { - callback = ownerAddress; - ownerAddress = this.tronWeb.defaultAddress.hex; - } else if (utils.isObject(ownerAddress)) { - options = ownerAddress; - ownerAddress = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this.injectExchangeTokens, exchangeID, tokenName, tokenAmount, ownerAddress, options); - - if (this.validator.notValid([ - { - name: 'owner', - type: 'address', - value: ownerAddress - }, - { - name: 'token name', - type: 'not-empty-string', - value: tokenName - }, - { - name: 'token amount', - type: 'integer', - value: tokenAmount, - gte: 1 - }, - { - name: 'exchangeID', - type: 'integer', - value: exchangeID, - gte: 0 - } - ], callback)) - return; - - const data = { - owner_address: toHex(ownerAddress), - exchange_id: parseInt(exchangeID), - token_id: fromUtf8(tokenName), - quant: parseInt(tokenAmount) - }; - - createTransaction(this.tronWeb, 'ExchangeInjectContract', data, options?.permissionId) - .then(transaction => callback(null, transaction)) - .catch(err => callback(err)); - } - - /** - * Withdraws tokens from a bancor style exchange. - * Will withdraw at market rate both tokens. - * Use "_" for the constant value for TRX. - */ - withdrawExchangeTokens(exchangeID = false, tokenName = false, tokenAmount = 0, ownerAddress = this.tronWeb.defaultAddress.hex, options, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (utils.isFunction(ownerAddress)) { - callback = ownerAddress; - ownerAddress = this.tronWeb.defaultAddress.hex; - } else if (utils.isObject(ownerAddress)) { - options = ownerAddress; - ownerAddress = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this.withdrawExchangeTokens, exchangeID, tokenName, tokenAmount, ownerAddress, options); - - if (this.validator.notValid([ - { - name: 'owner', - type: 'address', - value: ownerAddress - }, - { - name: 'token name', - type: 'not-empty-string', - value: tokenName - }, - { - name: 'token amount', - type: 'integer', - value: tokenAmount, - gte: 1 - }, - { - name: 'exchangeID', - type: 'integer', - value: exchangeID, - gte: 0 - } - ], callback)) - return; - - const data = { - owner_address: toHex(ownerAddress), - exchange_id: parseInt(exchangeID), - token_id: fromUtf8(tokenName), - quant: parseInt(tokenAmount) - }; - - createTransaction(this.tronWeb, 'ExchangeWithdrawContract', data, options?.permissionId) - .then(transaction => callback(null, transaction)) - .catch(err => callback(err)); - } - - /** - * Trade tokens on a bancor style exchange. - * Expected value is a validation and used to cap the total amt of token 2 spent. - * Use "_" for the constant value for TRX. - */ - tradeExchangeTokens(exchangeID = false, - tokenName = false, - tokenAmountSold = 0, - tokenAmountExpected = 0, - ownerAddress = this.tronWeb.defaultAddress.hex, - options, - callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (utils.isFunction(ownerAddress)) { - callback = ownerAddress; - ownerAddress = this.tronWeb.defaultAddress.hex; - } else if (utils.isObject(ownerAddress)) { - options = ownerAddress; - ownerAddress = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this.tradeExchangeTokens, exchangeID, tokenName, tokenAmountSold, tokenAmountExpected, ownerAddress, options); - - if (this.validator.notValid([ - { - name: 'owner', - type: 'address', - value: ownerAddress - }, - { - name: 'token name', - type: 'not-empty-string', - value: tokenName - }, - { - name: 'tokenAmountSold', - type: 'integer', - value: tokenAmountSold, - gte: 1 - }, - { - name: 'tokenAmountExpected', - type: 'integer', - value: tokenAmountExpected, - gte: 1 - }, - { - name: 'exchangeID', - type: 'integer', - value: exchangeID, - gte: 0 - } - ], callback)) - return; - - const data = { - owner_address: toHex(ownerAddress), - exchange_id: parseInt(exchangeID), - token_id: this.tronWeb.fromAscii(tokenName).replace(/^0x/, ''), - quant: parseInt(tokenAmountSold), - expected: parseInt(tokenAmountExpected) - }; - - createTransaction(this.tronWeb, 'ExchangeTransactionContract', data, options?.permissionId) - .then(transaction => callback(null, transaction)) - .catch(err => callback(err)); - } - - /** - * Update userFeePercentage. - */ - updateSetting(contractAddress = false, - userFeePercentage = false, - ownerAddress = this.tronWeb.defaultAddress.hex, - options, - callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (utils.isFunction(ownerAddress)) { - callback = ownerAddress; - ownerAddress = this.tronWeb.defaultAddress.hex; - } else if (utils.isObject(ownerAddress)) { - options = ownerAddress; - ownerAddress = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this.updateSetting, contractAddress, userFeePercentage, ownerAddress, options); - - if (this.validator.notValid([ - { - name: 'owner', - type: 'address', - value: ownerAddress - }, - { - name: 'contract', - type: 'address', - value: contractAddress - }, - { - name: 'userFeePercentage', - type: 'integer', - value: userFeePercentage, - gte: 0, - lte: 100 - } - ], callback)) - return; - - const data = { - owner_address: toHex(ownerAddress), - contract_address: toHex(contractAddress), - consume_user_resource_percent: userFeePercentage - }; - - createTransaction(this.tronWeb, 'UpdateSettingContract', data, options?.permissionId) - .then(transaction => callback(null, transaction)) - .catch(err => callback(err)); - } - - /** - * Update energy limit. - */ - updateEnergyLimit(contractAddress = false, - originEnergyLimit = false, - ownerAddress = this.tronWeb.defaultAddress.hex, - options, - callback = false) { - - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (utils.isFunction(ownerAddress)) { - callback = ownerAddress; - ownerAddress = this.tronWeb.defaultAddress.hex; - } else if (utils.isObject(ownerAddress)) { - options = ownerAddress; - ownerAddress = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this.updateEnergyLimit, contractAddress, originEnergyLimit, ownerAddress, options); - - if (this.validator.notValid([ - { - name: 'owner', - type: 'address', - value: ownerAddress - }, - { - name: 'contract', - type: 'address', - value: contractAddress - }, - { - name: 'originEnergyLimit', - type: 'integer', - value: originEnergyLimit, - gte: 0, - lte: 10_000_000 - } - ], callback)) - return; - - const data = { - owner_address: toHex(ownerAddress), - contract_address: toHex(contractAddress), - origin_energy_limit: originEnergyLimit - }; - - createTransaction(this.tronWeb, 'UpdateEnergyLimitContract', data, options?.permissionId) - .then(transaction => callback(null, transaction)) - .catch(err => callback(err)); - } - - checkPermissions(permissions, type) { - if (permissions) { - if (permissions.type !== type - || !permissions.permission_name - || !utils.isString(permissions.permission_name) - || !utils.isInteger(permissions.threshold) - || permissions.threshold < 1 - || !permissions.keys - ) { - return false - } - for (let key of permissions.keys) { - if (!this.tronWeb.isAddress(key.address) - || !utils.isInteger(key.weight) - || key.weight > permissions.threshold - || key.weight < 1 - || (type === 2 && !permissions.operations) - ) { - return false - } - } - } - return true - } - - updateAccountPermissions( - ownerAddress = this.tronWeb.defaultAddress.hex, - ownerPermissions = false, - witnessPermissions = false, - activesPermissions = false, - options, - callback = false - ) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (utils.isFunction(activesPermissions)) { - callback = activesPermissions; - activesPermissions = false; - } - - if (utils.isFunction(witnessPermissions)) { - callback = witnessPermissions; - witnessPermissions = activesPermissions = false; - } - - if (utils.isFunction(ownerPermissions)) { - callback = ownerPermissions; - ownerPermissions = witnessPermissions = activesPermissions = false; - } - - if (!callback) - return this.injectPromise(this.updateAccountPermissions, ownerAddress, ownerPermissions, witnessPermissions, activesPermissions, options); - - if (!this.tronWeb.isAddress(ownerAddress)) - return callback('Invalid ownerAddress provided'); - - if (!this.checkPermissions(ownerPermissions, 0)) { - return callback('Invalid ownerPermissions provided'); - } - - if (!this.checkPermissions(witnessPermissions, 1)) { - return callback('Invalid witnessPermissions provided'); - } - - if (!Array.isArray(activesPermissions)) { - activesPermissions = [activesPermissions] - } - - for (let activesPermission of activesPermissions) { - if (!this.checkPermissions(activesPermission, 2)) { - return callback('Invalid activesPermissions provided'); - } - } - - const data = { - owner_address: toHex(ownerAddress) - } - if (ownerPermissions) { - const _ownerPermissions = deepCopyJson(ownerPermissions); - // for compatible with old way of building transaction from chain which type prop is omitted - if ('type' in _ownerPermissions) { - delete _ownerPermissions.type; - } - data.owner = _ownerPermissions; - } - if (witnessPermissions) { - const _witnessPermissions = deepCopyJson(witnessPermissions); - // for compatible with old way of building transaction from chain which type prop is Witness - _witnessPermissions.type = 'Witness'; - data.witness = _witnessPermissions; - } - if (activesPermissions) { - const _activesPermissions = deepCopyJson(activesPermissions); - // for compatible with old way of building transaction from chain which type prop is Active - _activesPermissions.forEach((activePermissions) => { - activePermissions.type = 'Active'; - }); - data.actives = _activesPermissions; - } - - createTransaction(this.tronWeb, 'AccountPermissionUpdateContract', data, options?.permissionId) - .then(transaction => callback(null, transaction)) - .catch(err => callback(err)); - } - - async newTxID(transaction, options, callback) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (!callback) - return this.injectPromise(this.newTxID, transaction, options); - - if (options?.txLocal) { - const contract = transaction.raw_data.contract[0]; - createTransaction(this.tronWeb, contract.type, contract.parameter.value, contract.Permission_id, { - fee_limit: transaction.raw_data.fee_limit, - data: transaction.raw_data.data, - ref_block_bytes: transaction.raw_data.ref_block_bytes, - ref_block_hash: transaction.raw_data.ref_block_hash, - expiration: transaction.raw_data.expiration, - timestamp: transaction.raw_data.timestamp, - }).then((tx) => { - tx.signature = transaction.signature; - tx.visible = transaction.visible; - callback(null, tx); - }).catch((err) => callback('Error generating a new transaction id.')); - return; - } - - this.tronWeb.fullNode - .request( - 'wallet/getsignweight', - transaction, - 'post' - ) - .then(newTransaction => { - if (typeof transaction.visible === 'boolean') { - newTransaction.transaction.transaction.visible = transaction.visible - } - return resultManager( - newTransaction.transaction.transaction, - { - ...transaction.raw_data.contract[0].parameter.value, - Permission_id: transaction.raw_data.contract[0].Permission_id, - }, - { data: transaction.raw_data.data, fee_limit: transaction.raw_data.fee_limit }, - callback - ); - }) - .catch(err => callback('Error generating a new transaction id.')); - } - - async alterTransaction(transaction, options = {}, callback = false) { - if (!callback) - return this.injectPromise(this.alterTransaction, transaction, options); - - if (transaction.signature) - return callback('You can not extend the expiration of a signed transaction.') - - if (options.data) { - if (options.dataFormat !== 'hex') - options.data = this.tronWeb.toHex(options.data); - options.data = options.data.replace(/^0x/, '') - if (options.data.length === 0) - return callback('Invalid data provided'); - transaction.raw_data.data = options.data; - } - - if (options.extension) { - options.extension = parseInt(options.extension * 1000); - if (isNaN(options.extension) || transaction.raw_data.expiration + options.extension <= Date.now() + 3000) - return callback('Invalid extension provided'); - transaction.raw_data.expiration += options.extension; - } - - this.newTxID(transaction, { txLocal: options.txLocal }, callback) - } - - async extendExpiration(transaction, extension, options, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (!callback) - return this.injectPromise(this.extendExpiration, transaction, extension, options); - - this.alterTransaction(transaction, {extension, txLocal: options?.txLocal}, callback); - } - - async addUpdateData(transaction, data, dataFormat = 'utf8', options, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (utils.isFunction(dataFormat)) { - callback = dataFormat; - dataFormat = 'utf8'; - } else if (utils.isObject(dataFormat)) { - options = dataFormat; - dataFormat = 'utf8'; - } - - if (!callback) - return this.injectPromise(this.addUpdateData, transaction, data, dataFormat, options); - - this.alterTransaction(transaction, {data, dataFormat, txLocal: options?.txLocal}, callback); - } - -} diff --git a/src/lib/trx.js b/src/lib/trx.js deleted file mode 100644 index a76aff77..00000000 --- a/src/lib/trx.js +++ /dev/null @@ -1,1737 +0,0 @@ -import TronWeb from 'index'; -import utils from 'utils'; -import { keccak256, toUtf8Bytes, recoverAddress, SigningKey } from 'utils/ethersUtils'; -import { ADDRESS_PREFIX } from 'utils/address'; -import Validator from "../paramValidator"; -import injectpromise from 'injectpromise'; -import { txCheck } from '../utils/transaction'; - -const TRX_MESSAGE_HEADER = '\x19TRON Signed Message:\n32'; -// it should be: '\x15TRON Signed Message:\n32'; -const ETH_MESSAGE_HEADER = '\x19Ethereum Signed Message:\n32'; - -function toHex(value) { - return TronWeb.address.toHex(value); -} - -export default class Trx { - constructor(tronWeb = false) { - if (!tronWeb || !tronWeb instanceof TronWeb) - throw new Error('Expected instance of TronWeb'); - - this.tronWeb = tronWeb; - this.injectPromise = injectpromise(this); - this.cache = { - contracts: {} - } - this.validator = new Validator(tronWeb); - } - - _parseToken(token) { - return { - ...token, - name: this.tronWeb.toUtf8(token.name), - abbr: token.abbr && this.tronWeb.toUtf8(token.abbr), - description: token.description && this.tronWeb.toUtf8(token.description), - url: token.url && this.tronWeb.toUtf8(token.url) - }; - } - - getCurrentBlock(callback = false) { - if (!callback) - return this.injectPromise(this.getCurrentBlock); - this.tronWeb.fullNode.request('wallet/getnowblock').then(block => { - callback(null, block); - }).catch(err => callback(err)); - } - - getConfirmedCurrentBlock(callback = false) { - if (!callback) - return this.injectPromise(this.getConfirmedCurrentBlock); - - this.tronWeb.solidityNode.request('walletsolidity/getnowblock').then(block => { - callback(null, block); - }).catch(err => callback(err)); - } - - getBlock(block = this.tronWeb.defaultBlock, callback = false) { - if (utils.isFunction(block)) { - callback = block; - block = this.tronWeb.defaultBlock; - } - - if (!callback) - return this.injectPromise(this.getBlock, block); - - if (block === false) - return callback('No block identifier provided'); - - if (block == 'earliest') - block = 0; - - if (block == 'latest') - return this.getCurrentBlock(callback); - - if (isNaN(block) && utils.isHex(block)) - return this.getBlockByHash(block, callback); - - this.getBlockByNumber(block, callback); - } - - getBlockByHash(blockHash, callback = false) { - if (!callback) - return this.injectPromise(this.getBlockByHash, blockHash); - - this.tronWeb.fullNode.request('wallet/getblockbyid', { - value: blockHash - }, 'post').then(block => { - if (!Object.keys(block).length) - return callback('Block not found'); - - callback(null, block); - }).catch(err => callback(err)); - } - - getBlockByNumber(blockID, callback = false) { - if (!callback) - return this.injectPromise(this.getBlockByNumber, blockID); - - if (!utils.isInteger(blockID) || blockID < 0) - return callback('Invalid block number provided'); - - this.tronWeb.fullNode.request('wallet/getblockbynum', { - num: parseInt(blockID) - }, 'post').then(block => { - if (!Object.keys(block).length) - return callback('Block not found'); - - callback(null, block); - }).catch(err => callback(err)); - } - - getBlockTransactionCount(block = this.tronWeb.defaultBlock, callback = false) { - if (utils.isFunction(block)) { - callback = block; - block = this.tronWeb.defaultBlock; - } - - if (!callback) - return this.injectPromise(this.getBlockTransactionCount, block); - - this.getBlock(block).then(({transactions = []}) => { - callback(null, transactions.length); - }).catch(err => callback(err)); - } - - getTransactionFromBlock(block = this.tronWeb.defaultBlock, index, callback = false) { - if (utils.isFunction(index)) { - callback = index; - index = 0; - } - - if (utils.isFunction(block)) { - callback = block; - block = this.tronWeb.defaultBlock; - } - - if (!callback) - return this.injectPromise(this.getTransactionFromBlock, block, index); - - this.getBlock(block).then(({transactions = false}) => { - if (!transactions) - callback('Transaction not found in block'); - else if (typeof index == 'number') { - if (index >= 0 && index < transactions.length) - callback(null, transactions[index]); - else - callback('Invalid transaction index provided'); - } else - callback(null, transactions); - }).catch(err => callback(err)); - } - - getTransaction(transactionID, callback = false) { - if (!callback) - return this.injectPromise(this.getTransaction, transactionID); - - this.tronWeb.fullNode.request('wallet/gettransactionbyid', { - value: transactionID - }, 'post').then(transaction => { - if (!Object.keys(transaction).length) - return callback('Transaction not found'); - - callback(null, transaction); - }).catch(err => callback(err)); - } - - getConfirmedTransaction(transactionID, callback = false) { - if (!callback) - return this.injectPromise(this.getConfirmedTransaction, transactionID); - - this.tronWeb.solidityNode.request('walletsolidity/gettransactionbyid', { - value: transactionID - }, 'post').then(transaction => { - if (!Object.keys(transaction).length) - return callback('Transaction not found'); - - callback(null, transaction); - }).catch(err => callback(err)); - } - - getUnconfirmedTransactionInfo(transactionID, callback = false) { - return this._getTransactionInfoById(transactionID, {confirmed: false}, callback) - } - - getTransactionInfo(transactionID, callback = false) { - return this._getTransactionInfoById(transactionID, {confirmed: true}, callback) - } - - _getTransactionInfoById(transactionID, options, callback = false) { - if (!callback) - return this.injectPromise(this._getTransactionInfoById, transactionID, options); - - this.tronWeb[options.confirmed ? 'solidityNode' : 'fullNode'].request(`wallet${options.confirmed ? 'solidity' : ''}/gettransactioninfobyid`, { - value: transactionID - }, 'post').then(transaction => { - callback(null, transaction); - }).catch(err => callback(err)); - } - - getTransactionsToAddress(address = this.tronWeb.defaultAddress.hex, limit = 30, offset = 0, callback = false) { - if (utils.isFunction(offset)) { - callback = offset; - offset = 0; - } - - if (utils.isFunction(limit)) { - callback = limit; - limit = 30; - } - - if (!callback) - return this.injectPromise(this.getTransactionsToAddress, address, limit, offset); - - address = this.tronWeb.address.toHex(address); - - return this.getTransactionsRelated(address, 'to', limit, offset, callback); - } - - getTransactionsFromAddress(address = this.tronWeb.defaultAddress.hex, limit = 30, offset = 0, callback = false) { - if (utils.isFunction(offset)) { - callback = offset; - offset = 0; - } - - if (utils.isFunction(limit)) { - callback = limit; - limit = 30; - } - - if (!callback) - return this.injectPromise(this.getTransactionsFromAddress, address, limit, offset); - - address = this.tronWeb.address.toHex(address); - - return this.getTransactionsRelated(address, 'from', limit, offset, callback); - } - - async getTransactionsRelated(address = this.tronWeb.defaultAddress.hex, direction = 'all', limit = 30, offset = 0, callback = false) { - if (utils.isFunction(offset)) { - callback = offset; - offset = 0; - } - - if (utils.isFunction(limit)) { - callback = limit; - limit = 30; - } - - if (utils.isFunction(direction)) { - callback = direction; - direction = 'all'; - } - - if (utils.isFunction(address)) { - callback = address; - address = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this.getTransactionsRelated, address, direction, limit, offset); - - if (!['to', 'from', 'all'].includes(direction)) - return callback('Invalid direction provided: Expected "to", "from" or "all"'); - - if (direction == 'all') { - try { - const [from, to] = await Promise.all([ - this.getTransactionsRelated(address, 'from', limit, offset), - this.getTransactionsRelated(address, 'to', limit, offset) - ]) - - return callback(null, [ - ...from.map(tx => (tx.direction = 'from', tx)), - ...to.map(tx => (tx.direction = 'to', tx)) - ].sort((a, b) => { - return b.raw_data.timestamp - a.raw_data.timestamp - })); - } catch (ex) { - return callback(ex); - } - } - - if (!this.tronWeb.isAddress(address)) - return callback('Invalid address provided'); - - if (!utils.isInteger(limit) || limit < 0 || (offset && limit < 1)) - return callback('Invalid limit provided'); - - if (!utils.isInteger(offset) || offset < 0) - return callback('Invalid offset provided'); - - address = this.tronWeb.address.toHex(address); - - this.tronWeb.solidityNode.request(`walletextension/gettransactions${direction}this`, { - account: { - address - }, - offset, - limit - }, 'post').then(({transaction}) => { - callback(null, transaction); - }).catch(err => callback(err)); - } - - getAccount(address = this.tronWeb.defaultAddress.hex, callback = false) { - if (utils.isFunction(address)) { - callback = address; - address = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this.getAccount, address); - - if (!this.tronWeb.isAddress(address)) - return callback('Invalid address provided'); - - address = this.tronWeb.address.toHex(address); - - this.tronWeb.solidityNode.request('walletsolidity/getaccount', { - address - }, 'post').then(account => { - callback(null, account); - }).catch(err => callback(err)); - } - - getAccountById(id = false, callback = false) { - if (!callback) - return this.injectPromise(this.getAccountById, id); - - this.getAccountInfoById(id, {confirmed: true}, callback); - } - - getAccountInfoById(id, options, callback) { - if (this.validator.notValid([ - { - name: 'accountId', - type: 'hex', - value: id - }, - { - name: 'accountId', - type: 'string', - lte: 32, - gte: 8, - value: id - } - ], callback)) - return; - - if (id.startsWith('0x')) { - id = id.slice(2); - } - - this.tronWeb[options.confirmed ? 'solidityNode' : 'fullNode'].request(`wallet${options.confirmed ? 'solidity' : ''}/getaccountbyid`, { - account_id: id - }, 'post').then(account => { - callback(null, account); - }).catch(err => callback(err)); - } - - getBalance(address = this.tronWeb.defaultAddress.hex, callback = false) { - if (utils.isFunction(address)) { - callback = address; - address = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this.getBalance, address); - - this.getAccount(address).then(({balance = 0}) => { - callback(null, balance); - }).catch(err => callback(err)); - } - - getUnconfirmedAccount(address = this.tronWeb.defaultAddress.hex, callback = false) { - if (utils.isFunction(address)) { - callback = address; - address = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this.getUnconfirmedAccount, address); - - if (!this.tronWeb.isAddress(address)) - return callback('Invalid address provided'); - - address = this.tronWeb.address.toHex(address); - - this.tronWeb.fullNode.request('wallet/getaccount', { - address - }, 'post').then(account => { - callback(null, account); - }).catch(err => callback(err)); - } - - getUnconfirmedAccountById(id, callback = false) { - if (!callback) - return this.injectPromise(this.getUnconfirmedAccountById, id); - - this.getAccountInfoById(id, {confirmed: false}, callback); - } - - getUnconfirmedBalance(address = this.tronWeb.defaultAddress.hex, callback = false) { - if (utils.isFunction(address)) { - callback = address; - address = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this.getUnconfirmedBalance, address); - - this.getUnconfirmedAccount(address).then(({balance = 0}) => { - callback(null, balance); - }).catch(err => callback(err)); - } - - getBandwidth(address = this.tronWeb.defaultAddress.hex, callback = false) { - if (utils.isFunction(address)) { - callback = address; - address = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this.getBandwidth, address); - - if (!this.tronWeb.isAddress(address)) - return callback('Invalid address provided'); - - address = this.tronWeb.address.toHex(address); - - this.tronWeb.fullNode.request('wallet/getaccountnet', { - address - }, 'post').then(({freeNetUsed = 0, freeNetLimit = 0, NetUsed = 0, NetLimit = 0}) => { - callback(null, (freeNetLimit - freeNetUsed) + (NetLimit - NetUsed)); - }).catch(err => callback(err)); - } - - getTokensIssuedByAddress(address = this.tronWeb.defaultAddress.hex, callback = false) { - if (utils.isFunction(address)) { - callback = address; - address = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this.getTokensIssuedByAddress, address); - - if (!this.tronWeb.isAddress(address)) - return callback('Invalid address provided'); - - address = this.tronWeb.address.toHex(address); - - this.tronWeb.fullNode.request('wallet/getassetissuebyaccount', { - address - }, 'post').then(({assetIssue = false}) => { - if (!assetIssue) - return callback(null, {}); - - const tokens = assetIssue.map(token => { - return this._parseToken(token); - }).reduce((tokens, token) => { - return tokens[token.name] = token, tokens; - }, {}); - - callback(null, tokens); - }).catch(err => callback(err)); - } - - getTokenFromID(tokenID = false, callback = false) { - if (!callback) - return this.injectPromise(this.getTokenFromID, tokenID); - - if (utils.isInteger(tokenID)) - tokenID = tokenID.toString() - - if (!utils.isString(tokenID) || !tokenID.length) - return callback('Invalid token ID provided'); - - this.tronWeb.fullNode.request('wallet/getassetissuebyname', { - value: this.tronWeb.fromUtf8(tokenID) - }, 'post').then(token => { - if (!token.name) - return callback('Token does not exist'); - - callback(null, this._parseToken(token)); - }).catch(err => callback(err)); - } - - listNodes(callback = false) { - if (!callback) - return this.injectPromise(this.listNodes); - - this.tronWeb.fullNode.request('wallet/listnodes').then(({nodes = []}) => { - callback(null, nodes.map(({address: {host, port}}) => ( - `${this.tronWeb.toUtf8(host)}:${port}` - ))); - }).catch(err => callback(err)); - } - - getBlockRange(start = 0, end = 30, callback = false) { - if (utils.isFunction(end)) { - callback = end; - end = 30; - } - - if (utils.isFunction(start)) { - callback = start; - start = 0; - } - - if (!callback) - return this.injectPromise(this.getBlockRange, start, end); - - if (!utils.isInteger(start) || start < 0) - return callback('Invalid start of range provided'); - - if (!utils.isInteger(end) || end <= start) - return callback('Invalid end of range provided'); - - this.tronWeb.fullNode.request('wallet/getblockbylimitnext', { - startNum: parseInt(start), - endNum: parseInt(end) + 1 - }, 'post').then(({block = []}) => { - callback(null, block); - }).catch(err => callback(err)); - } - - listSuperRepresentatives(callback = false) { - if (!callback) - return this.injectPromise(this.listSuperRepresentatives); - - this.tronWeb.fullNode.request('wallet/listwitnesses').then(({witnesses = []}) => { - callback(null, witnesses); - }).catch(err => callback(err)); - } - - listTokens(limit = 0, offset = 0, callback = false) { - if (utils.isFunction(offset)) { - callback = offset; - offset = 0; - } - - if (utils.isFunction(limit)) { - callback = limit; - limit = 0; - } - - if (!callback) - return this.injectPromise(this.listTokens, limit, offset); - - if (!utils.isInteger(limit) || limit < 0 || (offset && limit < 1)) - return callback('Invalid limit provided'); - - if (!utils.isInteger(offset) || offset < 0) - return callback('Invalid offset provided'); - - if (!limit) { - return this.tronWeb.fullNode.request('wallet/getassetissuelist').then(({assetIssue = []}) => { - callback(null, assetIssue.map(token => this._parseToken(token))); - }).catch(err => callback(err)); - } - - this.tronWeb.fullNode.request('wallet/getpaginatedassetissuelist', { - offset: parseInt(offset), - limit: parseInt(limit) - }, 'post').then(({assetIssue = []}) => { - callback(null, assetIssue.map(token => this._parseToken(token))); - }).catch(err => callback(err)); - } - - timeUntilNextVoteCycle(callback = false) { - if (!callback) - return this.injectPromise(this.timeUntilNextVoteCycle); - - this.tronWeb.fullNode.request('wallet/getnextmaintenancetime').then(({num = -1}) => { - if (num == -1) - return callback('Failed to get time until next vote cycle'); - - callback(null, Math.floor(num / 1000)); - }).catch(err => callback(err)); - } - - getContract(contractAddress, callback = false) { - if (!callback) - return this.injectPromise(this.getContract, contractAddress); - - if (!this.tronWeb.isAddress(contractAddress)) - return callback('Invalid contract address provided'); - - if (this.cache.contracts[contractAddress]) { - callback(null, this.cache.contracts[contractAddress]); - return; - } - - contractAddress = this.tronWeb.address.toHex(contractAddress); - - this.tronWeb.fullNode.request('wallet/getcontract', { - value: contractAddress - }).then(contract => { - if (contract.Error) - return callback('Contract does not exist'); - this.cache.contracts[contractAddress] = contract; - callback(null, contract); - }).catch(err => callback(err)); - } - - async verifyMessage(message = false, signature = false, address = this.tronWeb.defaultAddress.base58, useTronHeader = true, callback = false) { - if (utils.isFunction(address)) { - callback = address; - address = this.tronWeb.defaultAddress.base58; - useTronHeader = true; - } - - if (utils.isFunction(useTronHeader)) { - callback = useTronHeader; - useTronHeader = true; - } - - if (!callback) - return this.injectPromise(this.verifyMessage, message, signature, address, useTronHeader); - - if (!utils.isHex(message)) - return callback('Expected hex message input'); - - if (Trx.verifySignature(message, address, signature, useTronHeader)) - return callback(null, true); - - callback('Signature does not match'); - } - - static verifySignature(message, address, signature, useTronHeader = true) { - message = message.replace(/^0x/, ''); - signature = signature.replace(/^0x/, ''); - const messageBytes = [ - ...toUtf8Bytes(useTronHeader ? TRX_MESSAGE_HEADER : ETH_MESSAGE_HEADER), - ...utils.code.hexStr2byteArray(message) - ]; - - const messageDigest = keccak256(new Uint8Array(messageBytes)); - const recovered = recoverAddress(messageDigest, { - yParity: signature.substring(128, 130) == '1c' ? 1 : 0, - r: '0x' + signature.substring(0, 64), - s: '0x' + signature.substring(64, 128) - }); - - const tronAddress = ADDRESS_PREFIX + recovered.substr(2); - const base58Address = TronWeb.address.fromHex(tronAddress); - - return base58Address == TronWeb.address.fromHex(address); - } - - verifyMessageV2(message = false, signature = false, options = {}, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (!callback) - return this.injectPromise(this.verifyMessageV2, message, signature, options); - - try { - const base58Address = Trx.verifyMessageV2(message, signature); - callback(null, base58Address); - } catch(ex) { - callback(ex); - } - } - - static verifyMessageV2(message, signature) { - return utils.message.verifyMessage(message, signature); - } - - verifyTypedData(domain, types, value, signature, address = this.tronWeb.defaultAddress.base58, callback = false) { - if (utils.isFunction(address)) { - callback = address; - address = this.tronWeb.defaultAddress.base58; - } - - if (!callback) - return this.injectPromise(this.verifyTypedData, domain, types, value, signature, address); - - if (Trx.verifyTypedData(domain, types, value, signature, address)) - return callback(null, true); - - callback('Signature does not match'); - } - - static verifyTypedData(domain, types, value, signature, address) { - signature = signature.replace(/^0x/, ''); - - const messageDigest = utils._TypedDataEncoder.hash(domain, types, value); - const recovered = recoverAddress(messageDigest, { - yParity: signature.substring(128, 130) == '1c' ? 1 : 0, - r: '0x' + signature.substring(0, 64), - s: '0x' + signature.substring(64, 128), - }); - - const tronAddress = ADDRESS_PREFIX + recovered.substr(2); - const base58Address = TronWeb.address.fromHex(tronAddress); - - return base58Address == TronWeb.address.fromHex(address); - } - - async sign(transaction = false, privateKey = this.tronWeb.defaultPrivateKey, useTronHeader = true, multisig = false, callback = false) { - - if (utils.isFunction(multisig)) { - callback = multisig; - multisig = false; - } - - if (utils.isFunction(useTronHeader)) { - callback = useTronHeader; - useTronHeader = true; - multisig = false; - } - - if (utils.isFunction(privateKey)) { - callback = privateKey; - privateKey = this.tronWeb.defaultPrivateKey; - useTronHeader = true; - multisig = false; - } - - - if (!callback) - return this.injectPromise(this.sign, transaction, privateKey, useTronHeader, multisig); - - // Message signing - if (utils.isString(transaction)) { - - if (!utils.isHex(transaction)) - return callback('Expected hex message input'); - - try { - const signatureHex = Trx.signString(transaction, privateKey, useTronHeader) - return callback(null, signatureHex); - } catch (ex) { - callback(ex); - } - } - - if (!utils.isObject(transaction)) - return callback('Invalid transaction provided'); - - if (!multisig && transaction.signature) - return callback('Transaction is already signed'); - - try { - if (!multisig) { - const address = this.tronWeb.address.toHex( - this.tronWeb.address.fromPrivateKey(privateKey) - ).toLowerCase(); - - if (address !== this.tronWeb.address.toHex(transaction.raw_data.contract[0].parameter.value.owner_address)) - return callback('Private key does not match address in transaction'); - - if (!txCheck(transaction)) { - return callback('Invalid transaction'); - } - } - return callback(null, - await utils.crypto.signTransaction(privateKey, transaction) - ); - } catch (ex) { - callback(ex); - } - } - - static signString(message, privateKey, useTronHeader = true) { - message = message.replace(/^0x/, ''); - const value = `0x${privateKey.replace(/^0x/, '')}`; - const signingKey = new SigningKey(value); - const messageBytes = [ - ...toUtf8Bytes(useTronHeader ? TRX_MESSAGE_HEADER : ETH_MESSAGE_HEADER), - ...utils.code.hexStr2byteArray(message) - ]; - const messageDigest = keccak256(new Uint8Array(messageBytes)); - const signature = signingKey.sign(messageDigest); - const signatureHex = [ - '0x', - signature.r.substring(2), - signature.s.substring(2), - Number(signature.v).toString(16) - ].join(''); - return signatureHex - } - - /** - * sign message v2 for verified header length - * - * @param {message to be signed, should be Bytes or string} message - * @param {privateKey for signature} privateKey - * @param {reserved} options - * @param {callback function} callback - */ - signMessageV2(message, privateKey = this.tronWeb.defaultPrivateKey, options = {}, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (utils.isFunction(privateKey)) { - callback = privateKey; - privateKey = this.tronWeb.defaultPrivateKey; - } - - if (!callback) - return this.injectPromise(this.signMessageV2, message, privateKey); - - try { - const signatureHex = Trx.signMessageV2(message, privateKey); - return callback(null, signatureHex); - } catch (ex) { - callback(ex); - } - } - - static signMessageV2(message, privateKey) { - return utils.message.signMessage(message, privateKey); - } - - _signTypedData(domain, types, value, privateKey = this.tronWeb.defaultPrivateKey, callback = false) { - if (utils.isFunction(privateKey)) { - callback = privateKey; - privateKey = this.tronWeb.defaultPrivateKey; - } - - if (!callback) - return this.injectPromise(this._signTypedData, domain, types, value, privateKey); - - try { - const signatureHex = Trx._signTypedData(domain, types, value, privateKey); - return callback(null, signatureHex); - } catch (ex) { - callback(ex); - } - } - - static _signTypedData(domain, types, value, privateKey) { - return utils.crypto._signTypedData(domain, types, value, privateKey); - } - - async multiSign(transaction = false, privateKey = this.tronWeb.defaultPrivateKey, permissionId = false, callback = false) { - - if (utils.isFunction(permissionId)) { - callback = permissionId; - permissionId = 0; - } - - if (utils.isFunction(privateKey)) { - callback = privateKey; - privateKey = this.tronWeb.defaultPrivateKey; - permissionId = 0; - } - - if (!callback) - return this.injectPromise(this.multiSign, transaction, privateKey, permissionId); - - if (!utils.isObject(transaction) || !transaction.raw_data || !transaction.raw_data.contract) - return callback('Invalid transaction provided'); - - // If owner permission or permission id exists in transaction, do sign directly - // If no permission id inside transaction or user passes permission id, use old way to reset permission id - if (!transaction.raw_data.contract[0].Permission_id && permissionId > 0) { - // set permission id - transaction.raw_data.contract[0].Permission_id = permissionId; - - // check if private key insides permission list - const address = this.tronWeb.address.toHex(this.tronWeb.address.fromPrivateKey(privateKey)).toLowerCase(); - const signWeight = await this.getSignWeight(transaction, permissionId); - - if (signWeight.result.code === 'PERMISSION_ERROR') { - return callback(signWeight.result.message); - } - - let foundKey = false; - signWeight.permission.keys.map(key => { - if (key.address === address) - foundKey = true; - }); - - if (!foundKey) - return callback(privateKey + ' has no permission to sign'); - - if (signWeight.approved_list && signWeight.approved_list.indexOf(address) != -1) { - return callback(privateKey + ' already sign transaction'); - } - - // reset transaction - if (signWeight.transaction && signWeight.transaction.transaction) { - transaction = signWeight.transaction.transaction; - if (permissionId > 0) { - transaction.raw_data.contract[0].Permission_id = permissionId; - } - } else { - return callback('Invalid transaction provided'); - } - } - - // sign - try { - if (!txCheck(transaction)) { - return callback('Invalid transaction'); - } - return callback(null, await utils.crypto.signTransaction(privateKey, transaction)); - } catch (ex) { - callback(ex); - } - } - - async getApprovedList(transaction, callback = false) { - if (!callback) - return this.injectPromise(this.getApprovedList, transaction); - - if (!utils.isObject(transaction)) - return callback('Invalid transaction provided'); - - - this.tronWeb.fullNode.request( - 'wallet/getapprovedlist', - transaction, - 'post' - ).then(result => { - callback(null, result); - }).catch(err => callback(err)); - } - - async getSignWeight(transaction, permissionId, callback = false) { - if (utils.isFunction(permissionId)) { - callback = permissionId; - permissionId = undefined; - } - - if (!callback) - return this.injectPromise(this.getSignWeight, transaction, permissionId); - - if (!utils.isObject(transaction) || !transaction.raw_data || !transaction.raw_data.contract) - return callback('Invalid transaction provided'); - - if (utils.isInteger(permissionId)) { - transaction.raw_data.contract[0].Permission_id = parseInt(permissionId); - } else if (typeof transaction.raw_data.contract[0].Permission_id !== 'number') { - transaction.raw_data.contract[0].Permission_id = 0; - } - - if (!utils.isObject(transaction)) - return callback('Invalid transaction provided'); - - - this.tronWeb.fullNode.request( - 'wallet/getsignweight', - transaction, - 'post' - ).then(result => { - callback(null, result); - }).catch(err => callback(err)); - } - - sendRawTransaction(signedTransaction = false, options = {}, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (!callback) - return this.injectPromise(this.sendRawTransaction, signedTransaction, options); - - if (!utils.isObject(signedTransaction)) - return callback('Invalid transaction provided'); - - if (!utils.isObject(options)) - return callback('Invalid options provided'); - - if (!signedTransaction.signature || !utils.isArray(signedTransaction.signature)) - return callback('Transaction is not signed'); - - this.tronWeb.fullNode.request( - 'wallet/broadcasttransaction', - signedTransaction, - 'post' - ).then(result => { - if (result.result) - result.transaction = signedTransaction; - callback(null, result); - }).catch(err => callback(err)); - } - - sendHexTransaction(signedHexTransaction = false, options = {}, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (!callback) - return this.injectPromise(this.sendHexTransaction, signedHexTransaction, options); - - if (!utils.isHex(signedHexTransaction)) - return callback('Invalid hex transaction provided'); - - if (!utils.isObject(options)) - return callback('Invalid options provided'); - - const params = { - transaction: signedHexTransaction - } - - this.tronWeb.fullNode.request( - 'wallet/broadcasthex', - params, - 'post' - ).then(result => { - if (result.result) { - result.transaction = JSON.parse(result.transaction) - result.hexTransaction = signedHexTransaction; - } - callback(null, result); - }).catch(err => callback(err)); - } - - async sendTransaction(to = false, amount = false, options = {}, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (typeof options === 'string') - options = {privateKey: options}; - - if (!callback) - return this.injectPromise(this.sendTransaction, to, amount, options); - - if (!this.tronWeb.isAddress(to)) - return callback('Invalid recipient provided'); - - if (!utils.isInteger(amount) || amount <= 0) - return callback('Invalid amount provided'); - - options = { - privateKey: this.tronWeb.defaultPrivateKey, - address: this.tronWeb.defaultAddress.hex, - ...options - }; - - if (!options.privateKey && !options.address) - return callback('Function requires either a private key or address to be set'); - - try { - const address = options.privateKey ? this.tronWeb.address.fromPrivateKey(options.privateKey) : options.address; - const transaction = await this.tronWeb.transactionBuilder.sendTrx(to, amount, address); - const signedTransaction = await this.sign(transaction, options.privateKey || undefined); - const result = await this.sendRawTransaction(signedTransaction); - - return callback(null, result); - } catch (ex) { - return callback(ex); - } - } - - async sendToken(to = false, amount = false, tokenID = false, options = {}, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (typeof options === 'string') - options = {privateKey: options}; - - if (!callback) - return this.injectPromise(this.sendToken, to, amount, tokenID, options); - - if (!this.tronWeb.isAddress(to)) - return callback('Invalid recipient provided'); - - if (!utils.isInteger(amount) || amount <= 0) - return callback('Invalid amount provided'); - - if (utils.isInteger(tokenID)) - tokenID = tokenID.toString() - - if (!utils.isString(tokenID)) - return callback('Invalid token ID provided'); - - options = { - privateKey: this.tronWeb.defaultPrivateKey, - address: this.tronWeb.defaultAddress.hex, - ...options - }; - - if (!options.privateKey && !options.address) - return callback('Function requires either a private key or address to be set'); - - try { - const address = options.privateKey ? this.tronWeb.address.fromPrivateKey(options.privateKey) : options.address; - const transaction = await this.tronWeb.transactionBuilder.sendToken(to, amount, tokenID, address); - const signedTransaction = await this.sign(transaction, options.privateKey || undefined); - const result = await this.sendRawTransaction(signedTransaction); - - return callback(null, result); - } catch (ex) { - return callback(ex); - } - } - - /** - * Freezes an amount of TRX. - * Will give bandwidth OR Energy and TRON Power(voting rights) - * to the owner of the frozen tokens. - * - * @param amount - is the number of frozen trx - * @param duration - is the duration in days to be frozen - * @param resource - is the type, must be either "ENERGY" or "BANDWIDTH" - * @param options - * @param callback - */ - async freezeBalance(amount = 0, duration = 3, resource = "BANDWIDTH", options = {}, receiverAddress = undefined, callback = false) { - if (utils.isFunction(receiverAddress)) { - callback = receiverAddress; - receiverAddress = undefined; - } - if (utils.isFunction(duration)) { - callback = duration; - duration = 3; - } - - if (utils.isFunction(resource)) { - callback = resource; - resource = "BANDWIDTH"; - } - - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (typeof options === 'string') - options = {privateKey: options}; - - if (!callback) - return this.injectPromise(this.freezeBalance, amount, duration, resource, options, receiverAddress); - - if (!['BANDWIDTH', 'ENERGY'].includes(resource)) - return callback('Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"'); - - if (!utils.isInteger(amount) || amount <= 0) - return callback('Invalid amount provided'); - - if (!utils.isInteger(duration) || duration < 3) - return callback('Invalid duration provided, minimum of 3 days'); - - options = { - privateKey: this.tronWeb.defaultPrivateKey, - address: this.tronWeb.defaultAddress.hex, - ...options - }; - - if (!options.privateKey && !options.address) - return callback('Function requires either a private key or address to be set'); - - try { - const address = options.privateKey ? this.tronWeb.address.fromPrivateKey(options.privateKey) : options.address; - const freezeBalance = await this.tronWeb.transactionBuilder.freezeBalance(amount, duration, resource, address, receiverAddress); - const signedTransaction = await this.sign(freezeBalance, options.privateKey || undefined); - const result = await this.sendRawTransaction(signedTransaction); - - return callback(null, result); - } catch (ex) { - return callback(ex); - } - } - - /** - * Unfreeze TRX that has passed the minimum freeze duration. - * Unfreezing will remove bandwidth and TRON Power. - * - * @param resource - is the type, must be either "ENERGY" or "BANDWIDTH" - * @param options - * @param callback - */ - async unfreezeBalance(resource = "BANDWIDTH", options = {}, receiverAddress = undefined, callback = false) { - if (utils.isFunction(receiverAddress)) { - callback = receiverAddress; - receiverAddress = undefined; - } - - if (utils.isFunction(resource)) { - callback = resource; - resource = 'BANDWIDTH'; - } - - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (typeof options === 'string') - options = {privateKey: options}; - - if (!callback) - return this.injectPromise(this.unfreezeBalance, resource, options, receiverAddress); - - if (!['BANDWIDTH', 'ENERGY'].includes(resource)) - return callback('Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"'); - - options = { - privateKey: this.tronWeb.defaultPrivateKey, - address: this.tronWeb.defaultAddress.hex, - ...options - }; - - if (!options.privateKey && !options.address) - return callback('Function requires either a private key or address to be set'); - - try { - const address = options.privateKey ? this.tronWeb.address.fromPrivateKey(options.privateKey) : options.address; - const unfreezeBalance = await this.tronWeb.transactionBuilder.unfreezeBalance(resource, address, receiverAddress); - const signedTransaction = await this.sign(unfreezeBalance, options.privateKey || undefined); - const result = await this.sendRawTransaction(signedTransaction); - - return callback(null, result); - } catch (ex) { - return callback(ex); - } - } - - /** - * Modify account name - * Note: Username is allowed to edit only once. - * - * @param privateKey - Account private Key - * @param accountName - name of the account - * @param callback - * - * @return modified Transaction Object - */ - async updateAccount(accountName = false, options = {}, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (typeof options === 'string') - options = {privateKey: options}; - - if (!callback) { - return this.injectPromise(this.updateAccount, accountName, options); - } - - if (!utils.isString(accountName) || !accountName.length) { - return callback('Name must be a string'); - } - - options = { - privateKey: this.tronWeb.defaultPrivateKey, - address: this.tronWeb.defaultAddress.hex, - ...options - }; - - if (!options.privateKey && !options.address) - return callback('Function requires either a private key or address to be set'); - - try { - const address = options.privateKey ? this.tronWeb.address.fromPrivateKey(options.privateKey) : options.address; - const updateAccount = await this.tronWeb.transactionBuilder.updateAccount(accountName, address); - const signedTransaction = await this.sign(updateAccount, options.privateKey || undefined); - const result = await this.sendRawTransaction(signedTransaction); - - return callback(null, result); - } catch (ex) { - return callback(ex); - } - } - - signMessage(...args) { - return this.sign(...args); - } - - sendAsset(...args) { - return this.sendToken(...args); - } - - send(...args) { - return this.sendTransaction(...args); - } - - sendTrx(...args) { - return this.sendTransaction(...args); - } - - broadcast(...args) { - return this.sendRawTransaction(...args); - } - - broadcastHex(...args) { - return this.sendHexTransaction(...args); - } - - signTransaction(...args) { - return this.sign(...args); - } - - /** - * Gets a network modification proposal by ID. - */ - getProposal(proposalID = false, callback = false) { - if (!callback) - return this.injectPromise(this.getProposal, proposalID); - - if (!utils.isInteger(proposalID) || proposalID < 0) - return callback('Invalid proposalID provided'); - - this.tronWeb.fullNode.request('wallet/getproposalbyid', { - id: parseInt(proposalID), - }, 'post').then(proposal => { - callback(null, proposal); - }).catch(err => callback(err)); - } - - /** - * Lists all network modification proposals. - */ - listProposals(callback = false) { - if (!callback) - return this.injectPromise(this.listProposals); - - this.tronWeb.fullNode.request('wallet/listproposals', {}, 'post').then(({proposals = []}) => { - callback(null, proposals); - }).catch(err => callback(err)); - } - - /** - * Lists all parameters available for network modification proposals. - */ - getChainParameters(callback = false) { - if (!callback) - return this.injectPromise(this.getChainParameters); - - this.tronWeb.fullNode.request('wallet/getchainparameters', {}, 'post').then(({chainParameter = []}) => { - callback(null, chainParameter); - }).catch(err => callback(err)); - } - - /** - * Get the account resources - */ - getAccountResources(address = this.tronWeb.defaultAddress.hex, callback = false) { - if (!callback) - return this.injectPromise(this.getAccountResources, address); - - if (!this.tronWeb.isAddress(address)) - return callback('Invalid address provided'); - - this.tronWeb.fullNode.request('wallet/getaccountresource', { - address: this.tronWeb.address.toHex(address), - }, 'post').then(resources => { - callback(null, resources); - }).catch(err => callback(err)); - } - - /** - * Query the amount of resources of a specific resourceType delegated by fromAddress to toAddress - */ - getDelegatedResourceV2(fromAddress = this.tronWeb.defaultAddress.hex, toAddress = this.tronWeb.defaultAddress.hex, options = { confirmed: true }, callback = false) { - if(utils.isFunction(options)) { - callback = options; - options = { confirmed: true }; - } - - if(utils.isFunction(toAddress)) { - callback = toAddress; - toAddress = this.tronWeb.defaultAddress.hex; - } - - if(utils.isFunction(fromAddress)) { - callback = fromAddress; - fromAddress = this.tronWeb.defaultAddress.hex; - toAddress = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this.getDelegatedResourceV2, fromAddress, toAddress, options); - - if (!this.tronWeb.isAddress(fromAddress)) - return callback('Invalid address provided'); - - if (!this.tronWeb.isAddress(toAddress)) - return callback('Invalid address provided'); - - this.tronWeb[options.confirmed ? 'solidityNode' : 'fullNode'].request(`wallet${options.confirmed ? 'solidity' : ''}/getdelegatedresourcev2`, { - fromAddress: toHex(fromAddress), - toAddress: toHex(toAddress) - }, 'post').then(resources => { - callback(null, resources); - }).catch(err => callback(err)); - } - - /** - * Query the resource delegation index by an account - */ - getDelegatedResourceAccountIndexV2(address = this.tronWeb.defaultAddress.hex, options = { confirmed: true }, callback = false) { - if(utils.isFunction(options)) { - callback = options; - options = { confirmed: true }; - } - - if(utils.isFunction(address)) { - callback = address; - address = this.tronWeb.defaultAddress.hex - } - - if (!callback) - return this.injectPromise(this.getDelegatedResourceAccountIndexV2, address, options); - - if (!this.tronWeb.isAddress(address)) - return callback('Invalid address provided'); - - this.tronWeb[options.confirmed ? 'solidityNode' : 'fullNode'].request(`wallet${options.confirmed ? 'solidity' : ''}/getdelegatedresourceaccountindexv2`, { - value: toHex(address) - }, 'post').then(resources => { - callback(null, resources); - }).catch(err => callback(err)); - } - - /** - * Query the amount of delegatable resources of the specified resource Type for target address, unit is sun. - */ - getCanDelegatedMaxSize(address = this.tronWeb.defaultAddress.hex, resource = 'BANDWIDTH', options = { confirmed: true }, callback = false) { - if(utils.isFunction(options)) { - callback = options; - options = { confirmed: true }; - } - - if(utils.isFunction(resource)) { - callback = resource; - resource = 'BANDWIDTH'; - } - - if(utils.isFunction(address)) { - callback = address; - address = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this.getCanDelegatedMaxSize, address, resource, options); - - if (!this.tronWeb.isAddress(address)) - return callback('Invalid address provided'); - - if (this.validator.notValid([ - { - name: 'resource', - type: 'resource', - value: resource, - msg: 'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"' - } - ], callback)) - return; - - this.tronWeb[options.confirmed ? 'solidityNode' : 'fullNode'].request(`wallet${options.confirmed ? 'solidity' : ''}/getcandelegatedmaxsize`, { - owner_address: toHex(address), - type: resource === "ENERGY" ? 1 : 0 - }, 'post').then(resources => { - callback(null, resources); - }).catch(err => callback(err)); - } - - /** - * Remaining times of available unstaking API - */ - getAvailableUnfreezeCount(address = this.tronWeb.defaultAddress.hex, options = { confirmed: true }, callback = false) { - if(utils.isFunction(options)) { - callback = options; - options = { confirmed: true }; - } - - if(utils.isFunction(address)) { - callback = address; - address = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this.getAvailableUnfreezeCount, address, options); - - if (!this.tronWeb.isAddress(address)) - return callback('Invalid address provided'); - - this.tronWeb[options.confirmed ? 'solidityNode' : 'fullNode'].request(`wallet${options.confirmed ? 'solidity' : ''}/getavailableunfreezecount`, { - owner_address: toHex(address), - }, 'post').then(data => { - callback(null, data); - }).catch(err => callback(err)); - } - - /** - * Query the withdrawable balance at the specified timestamp - */ - getCanWithdrawUnfreezeAmount(address = this.tronWeb.defaultAddress.hex, timestamp = Date.now(), options = { confirmed: true }, callback = false) { - if(utils.isFunction(options)) { - callback = options; - options = { confirmed: true }; - } - - if(utils.isFunction(timestamp)) { - callback = timestamp; - timestamp = Date.now(); - } - - if(utils.isFunction(address)) { - callback = address; - address = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this.getCanWithdrawUnfreezeAmount, address, timestamp, options); - - if (!this.tronWeb.isAddress(address)) - return callback('Invalid address provided'); - - if (!utils.isInteger(timestamp) || timestamp < 0) - return callback('Invalid timestamp provided'); - - this.tronWeb[options.confirmed ? 'solidityNode' : 'fullNode'].request(`wallet${options.confirmed ? 'solidity' : ''}/getcanwithdrawunfreezeamount`, { - owner_address: toHex(address), - timestamp: timestamp - }, 'post').then(data => { - callback(null, data); - }).catch(err => callback(err)); - - } - - /** - * Get the exchange ID. - */ - getExchangeByID(exchangeID = false, callback = false) { - if (!callback) - return this.injectPromise(this.getExchangeByID, exchangeID); - - if (!utils.isInteger(exchangeID) || exchangeID < 0) - return callback('Invalid exchangeID provided'); - - this.tronWeb.fullNode.request('wallet/getexchangebyid', { - id: exchangeID, - }, 'post').then(exchange => { - callback(null, exchange); - }).catch(err => callback(err)); - } - - /** - * Lists the exchanges - */ - listExchanges(callback = false) { - if (!callback) - return this.injectPromise(this.listExchanges); - - this.tronWeb.fullNode.request('wallet/listexchanges', {}, 'post').then(({exchanges = []}) => { - callback(null, exchanges); - }, 'post').catch(err => callback(err)); - } - - /** - * Lists all network modification proposals. - */ - listExchangesPaginated(limit = 10, offset = 0, callback = false) { - if (utils.isFunction(offset)) { - callback = offset; - offset = 0; - } - if (utils.isFunction(limit)) { - callback = limit; - limit = 10; - } - if (!callback) - return this.injectPromise(this.listExchangesPaginated, limit, offset); - - this.tronWeb.fullNode.request('wallet/getpaginatedexchangelist', { - limit, - offset - }, 'post').then(({exchanges = []}) => { - callback(null, exchanges); - }).catch(err => callback(err)); - } - - /** - * Get info about thre node - */ - getNodeInfo(callback = false) { - if (!callback) - return this.injectPromise(this.getNodeInfo); - - this.tronWeb.fullNode.request('wallet/getnodeinfo', {}, 'post').then(info => { - callback(null, info); - }, 'post').catch(err => callback(err)); - } - - - getTokenListByName(tokenID = false, callback = false) { - if (!callback) - return this.injectPromise(this.getTokenListByName, tokenID); - - if (utils.isInteger(tokenID)) - tokenID = tokenID.toString() - - if (!utils.isString(tokenID) || !tokenID.length) - return callback('Invalid token ID provided'); - - this.tronWeb.fullNode.request('wallet/getassetissuelistbyname', { - value: this.tronWeb.fromUtf8(tokenID) - }, 'post').then(token => { - if (Array.isArray(token.assetIssue)) { - callback(null, token.assetIssue.map(t => this._parseToken(t))); - } else if (!token.name) - return callback('Token does not exist'); - - callback(null, this._parseToken(token)); - }).catch(err => callback(err)); - } - - getTokenByID(tokenID = false, callback = false) { - if (!callback) - return this.injectPromise(this.getTokenByID, tokenID); - - if (utils.isInteger(tokenID)) - tokenID = tokenID.toString() - - if (!utils.isString(tokenID) || !tokenID.length) - return callback('Invalid token ID provided'); - - this.tronWeb.fullNode.request('wallet/getassetissuebyid', { - value: tokenID - }, 'post').then(token => { - if (!token.name) - return callback('Token does not exist'); - - callback(null, this._parseToken(token)); - }).catch(err => callback(err)); - } - - async getReward(address, options = {}, callback = false) { - options.confirmed = true; - return this._getReward(address, options, callback); - } - - async getUnconfirmedReward(address, options = {}, callback = false) { - options.confirmed = false; - return this._getReward(address, options, callback); - } - - async getBrokerage(address, options = {}, callback = false) { - options.confirmed = true; - return this._getBrokerage(address, options, callback); - } - - async getUnconfirmedBrokerage(address, options = {}, callback = false) { - options.confirmed = false; - return this._getBrokerage(address, options, callback); - } - - async _getReward(address = this.tronWeb.defaultAddress.hex, options, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (utils.isFunction(address)) { - callback = address; - address = this.tronWeb.defaultAddress.hex; - } else if (utils.isObject(address)) { - options = address; - address = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this._getReward, address, options); - - if (this.validator.notValid([ - { - name: 'origin', - type: 'address', - value: address - } - ], callback)) - return; - - const data = { - address: toHex(address) - }; - - this.tronWeb[options.confirmed ? 'solidityNode' : 'fullNode'].request(`wallet${options.confirmed ? 'solidity' : ''}/getReward`, data, 'post') - .then((result = {}) => { - - if (typeof result.reward === 'undefined') - return callback('Not found.'); - - callback(null, result.reward); - }).catch(err => callback(err)); - } - - - async _getBrokerage(address = this.tronWeb.defaultAddress.hex, options, callback = false) { - if (utils.isFunction(options)) { - callback = options; - options = {}; - } - - if (utils.isFunction(address)) { - callback = address; - address = this.tronWeb.defaultAddress.hex; - } else if (utils.isObject(address)) { - options = address; - address = this.tronWeb.defaultAddress.hex; - } - - if (!callback) - return this.injectPromise(this._getBrokerage, address, options); - - if (this.validator.notValid([ - { - name: 'origin', - type: 'address', - value: address - } - ], callback)) - return; - - const data = { - address: toHex(address) - }; - - this.tronWeb[options.confirmed ? 'solidityNode' : 'fullNode'].request(`wallet${options.confirmed ? 'solidity' : ''}/getBrokerage`, data, 'post') - .then((result = {}) => { - - if (typeof result.brokerage === 'undefined') - return callback('Not found.'); - - callback(null, result.brokerage); - }).catch(err => callback(err)); - } - -}; diff --git a/src/paramValidator/index.js b/src/paramValidator/index.js deleted file mode 100644 index 3f76d8ca..00000000 --- a/src/paramValidator/index.js +++ /dev/null @@ -1,145 +0,0 @@ -import TronWeb from 'index'; -import utils from 'utils'; - -export default class Validator { - - constructor(tronWeb = false) { - if (!tronWeb || !tronWeb instanceof TronWeb) - throw new Error('Expected instance of TronWeb'); - this.tronWeb = tronWeb; - } - - invalid(param) { - return param.msg || `Invalid ${param.name}${param.type === 'address' ? ' address' : ''} provided`; - } - - notPositive(param) { - return `${param.name} must be a positive integer`; - } - - notEqual(param) { - return param.msg || `${param.names[0]} can not be equal to ${param.names[1]}`; - } - - notValid(params = [], callback = new Function) { - - let normalized = {}; - let no = false; - for (const param of params) { - let { - name, - names, - value, - type, - gt, - lt, - gte, - lte, - se, - optional - } = param; - if (optional && ( - !utils.isNotNullOrUndefined(value) - || (type !== 'boolean' && value === false))) - continue; - normalized[param.name] = param.value; - switch (type) { - - case 'address': - if (!this.tronWeb.isAddress(value)) { - no = true; - } else { - normalized[name] = this.tronWeb.address.toHex(value); - } - break; - - case 'integer': - if (!utils.isInteger(value) || - (typeof gt === 'number' && value <= param.gt) || - (typeof lt === 'number' && value >= param.lt) || - (typeof gte === 'number' && value < param.gte) || - (typeof lte === 'number' && value > param.lte)) { - no = true; - } - break; - - case 'positive-integer': - if (!utils.isInteger(value) || value <= 0) { - callback(this.notPositive(param)); - return; - } - break; - - case 'tokenId': - if (!utils.isString(value) || !value.length) { - no = true; - } - break; - - case 'notEmptyObject': - if (!utils.isObject(value) || !Object.keys(value).length) { - no = true; - } - break; - - case 'notEqual': - if (normalized[names[0]] === normalized[names[1]]) { - callback(this.notEqual(param)); - return true; - } - break; - - case 'resource': - if (!['BANDWIDTH', 'ENERGY'].includes(value)) { - no = true; - } - break; - - case 'url': - if (!utils.isValidURL(value)) { - no = true; - } - break; - - case 'hex': - if (!utils.isHex(value)) { - no = true; - } - break; - - case 'array': - if (!Array.isArray(value)) { - no = true; - } - break; - - case 'not-empty-string': - if (!utils.isString(value) || !value.length) { - no = true; - } - break; - - case 'boolean': - if (!utils.isBoolean(value)) { - no = true; - } - break; - case 'string': - if (!utils.isString(value) || - (typeof gt === 'number' && value.length <= param.gt) || - (typeof lt === 'number' && value.length >= param.lt) || - (typeof gte === 'number' && value.length < param.gte) || - (typeof lte === 'number' && value.length > param.lte)) { - no = true; - } - break; - } - if (no) { - callback(this.invalid(param)); - return true; - } - } - return false; - } -} - diff --git a/src/protocol/core/Tron_pb.js b/src/protocol/core/Tron_pb.js deleted file mode 100644 index e362c993..00000000 --- a/src/protocol/core/Tron_pb.js +++ /dev/null @@ -1,7523 +0,0 @@ -// source: core/Tron.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('@tronweb3/google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -var core_google_protobuf_any_pb = require('@tronweb3/google-protobuf/google/protobuf/any_pb.js'); -goog.object.extend(proto, core_google_protobuf_any_pb); -goog.exportSymbol('proto.protocol.Account', null, global); -goog.exportSymbol('proto.protocol.Account.AccountResource', null, global); -goog.exportSymbol('proto.protocol.Account.Frozen', null, global); -goog.exportSymbol('proto.protocol.AccountId', null, global); -goog.exportSymbol('proto.protocol.AccountType', null, global); -goog.exportSymbol('proto.protocol.DelegatedResource', null, global); -goog.exportSymbol('proto.protocol.Exchange', null, global); -goog.exportSymbol('proto.protocol.Key', null, global); -goog.exportSymbol('proto.protocol.MarketOrderDetail', null, global); -goog.exportSymbol('proto.protocol.Permission', null, global); -goog.exportSymbol('proto.protocol.Permission.PermissionType', null, global); -goog.exportSymbol('proto.protocol.Proposal', null, global); -goog.exportSymbol('proto.protocol.Proposal.State', null, global); -goog.exportSymbol('proto.protocol.Transaction', null, global); -goog.exportSymbol('proto.protocol.Transaction.Contract', null, global); -goog.exportSymbol('proto.protocol.Transaction.Contract.ContractType', null, global); -goog.exportSymbol('proto.protocol.Transaction.Result', null, global); -goog.exportSymbol('proto.protocol.Transaction.Result.code', null, global); -goog.exportSymbol('proto.protocol.Transaction.Result.contractResult', null, global); -goog.exportSymbol('proto.protocol.Transaction.raw', null, global); -goog.exportSymbol('proto.protocol.Vote', null, global); -goog.exportSymbol('proto.protocol.Votes', null, global); -goog.exportSymbol('proto.protocol.Witness', null, global); -goog.exportSymbol('proto.protocol.authority', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.AccountId = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.AccountId, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.AccountId.displayName = 'proto.protocol.AccountId'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.Vote = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.Vote, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.Vote.displayName = 'proto.protocol.Vote'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.Proposal = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.Proposal.repeatedFields_, null); -}; -goog.inherits(proto.protocol.Proposal, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.Proposal.displayName = 'proto.protocol.Proposal'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.Exchange = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.Exchange, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.Exchange.displayName = 'proto.protocol.Exchange'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.Account = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.Account.repeatedFields_, null); -}; -goog.inherits(proto.protocol.Account, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.Account.displayName = 'proto.protocol.Account'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.Account.Frozen = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.Account.Frozen, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.Account.Frozen.displayName = 'proto.protocol.Account.Frozen'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.Account.AccountResource = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.Account.AccountResource, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.Account.AccountResource.displayName = 'proto.protocol.Account.AccountResource'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.Key = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.Key, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.Key.displayName = 'proto.protocol.Key'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.DelegatedResource = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.DelegatedResource, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.DelegatedResource.displayName = 'proto.protocol.DelegatedResource'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.authority = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.authority, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.authority.displayName = 'proto.protocol.authority'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.Permission = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.Permission.repeatedFields_, null); -}; -goog.inherits(proto.protocol.Permission, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.Permission.displayName = 'proto.protocol.Permission'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.Witness = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.Witness, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.Witness.displayName = 'proto.protocol.Witness'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.Votes = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.Votes.repeatedFields_, null); -}; -goog.inherits(proto.protocol.Votes, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.Votes.displayName = 'proto.protocol.Votes'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.MarketOrderDetail = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.MarketOrderDetail, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.MarketOrderDetail.displayName = 'proto.protocol.MarketOrderDetail'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.Transaction = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.Transaction.repeatedFields_, null); -}; -goog.inherits(proto.protocol.Transaction, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.Transaction.displayName = 'proto.protocol.Transaction'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.Transaction.Contract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.Transaction.Contract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.Transaction.Contract.displayName = 'proto.protocol.Transaction.Contract'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.Transaction.Result = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.Transaction.Result.repeatedFields_, null); -}; -goog.inherits(proto.protocol.Transaction.Result, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.Transaction.Result.displayName = 'proto.protocol.Transaction.Result'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.Transaction.raw = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.Transaction.raw.repeatedFields_, null); -}; -goog.inherits(proto.protocol.Transaction.raw, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.Transaction.raw.displayName = 'proto.protocol.Transaction.raw'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.AccountId.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.AccountId.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.AccountId} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.AccountId.toObject = function(includeInstance, msg) { - var f, obj = { - name: msg.getName_asB64(), - address: msg.getAddress_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.AccountId} - */ -proto.protocol.AccountId.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.AccountId; - return proto.protocol.AccountId.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.AccountId} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.AccountId} - */ -proto.protocol.AccountId.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setName(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.AccountId.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.AccountId.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.AccountId} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.AccountId.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getName_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional bytes name = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.AccountId.prototype.getName = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes name = 1; - * This is a type-conversion wrapper around `getName()` - * @return {string} - */ -proto.protocol.AccountId.prototype.getName_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getName())); -}; - - -/** - * optional bytes name = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getName()` - * @return {!Uint8Array} - */ -proto.protocol.AccountId.prototype.getName_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getName())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.AccountId} returns this - */ -proto.protocol.AccountId.prototype.setName = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes address = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.AccountId.prototype.getAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes address = 2; - * This is a type-conversion wrapper around `getAddress()` - * @return {string} - */ -proto.protocol.AccountId.prototype.getAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAddress())); -}; - - -/** - * optional bytes address = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAddress()` - * @return {!Uint8Array} - */ -proto.protocol.AccountId.prototype.getAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.AccountId} returns this - */ -proto.protocol.AccountId.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.Vote.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Vote.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.Vote} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Vote.toObject = function(includeInstance, msg) { - var f, obj = { - voteAddress: msg.getVoteAddress_asB64(), - voteCount: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Vote} - */ -proto.protocol.Vote.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Vote; - return proto.protocol.Vote.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.Vote} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Vote} - */ -proto.protocol.Vote.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setVoteAddress(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setVoteCount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.Vote.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.Vote.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Vote} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Vote.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVoteAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getVoteCount(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } -}; - - -/** - * optional bytes vote_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Vote.prototype.getVoteAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes vote_address = 1; - * This is a type-conversion wrapper around `getVoteAddress()` - * @return {string} - */ -proto.protocol.Vote.prototype.getVoteAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getVoteAddress())); -}; - - -/** - * optional bytes vote_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getVoteAddress()` - * @return {!Uint8Array} - */ -proto.protocol.Vote.prototype.getVoteAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getVoteAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Vote} returns this - */ -proto.protocol.Vote.prototype.setVoteAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int64 vote_count = 2; - * @return {number} - */ -proto.protocol.Vote.prototype.getVoteCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Vote} returns this - */ -proto.protocol.Vote.prototype.setVoteCount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.Proposal.repeatedFields_ = [6]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.Proposal.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Proposal.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.Proposal} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Proposal.toObject = function(includeInstance, msg) { - var f, obj = { - proposalId: jspb.Message.getFieldWithDefault(msg, 1, 0), - proposerAddress: msg.getProposerAddress_asB64(), - parametersMap: (f = msg.getParametersMap()) ? f.toObject(includeInstance, undefined) : [], - expirationTime: jspb.Message.getFieldWithDefault(msg, 4, 0), - createTime: jspb.Message.getFieldWithDefault(msg, 5, 0), - approvalsList: msg.getApprovalsList_asB64(), - state: jspb.Message.getFieldWithDefault(msg, 7, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Proposal} - */ -proto.protocol.Proposal.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Proposal; - return proto.protocol.Proposal.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.Proposal} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Proposal} - */ -proto.protocol.Proposal.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setProposalId(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setProposerAddress(value); - break; - case 3: - var value = msg.getParametersMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readInt64, jspb.BinaryReader.prototype.readInt64, null, 0, 0); - }); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExpirationTime(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCreateTime(value); - break; - case 6: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addApprovals(value); - break; - case 7: - var value = /** @type {!proto.protocol.Proposal.State} */ (reader.readEnum()); - msg.setState(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.Proposal.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.Proposal.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Proposal} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Proposal.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getProposalId(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getProposerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getParametersMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeInt64, jspb.BinaryWriter.prototype.writeInt64); - } - f = message.getExpirationTime(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getCreateTime(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getApprovalsList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 6, - f - ); - } - f = message.getState(); - if (f !== 0.0) { - writer.writeEnum( - 7, - f - ); - } -}; - - -/** - * @enum {number} - */ -proto.protocol.Proposal.State = { - PENDING: 0, - DISAPPROVED: 1, - APPROVED: 2, - CANCELED: 3 -}; - -/** - * optional int64 proposal_id = 1; - * @return {number} - */ -proto.protocol.Proposal.prototype.getProposalId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Proposal} returns this - */ -proto.protocol.Proposal.prototype.setProposalId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional bytes proposer_address = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Proposal.prototype.getProposerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes proposer_address = 2; - * This is a type-conversion wrapper around `getProposerAddress()` - * @return {string} - */ -proto.protocol.Proposal.prototype.getProposerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getProposerAddress())); -}; - - -/** - * optional bytes proposer_address = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getProposerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.Proposal.prototype.getProposerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getProposerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Proposal} returns this - */ -proto.protocol.Proposal.prototype.setProposerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * map parameters = 3; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.protocol.Proposal.prototype.getParametersMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 3, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.protocol.Proposal} returns this - */ -proto.protocol.Proposal.prototype.clearParametersMap = function() { - this.getParametersMap().clear(); - return this;}; - - -/** - * optional int64 expiration_time = 4; - * @return {number} - */ -proto.protocol.Proposal.prototype.getExpirationTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Proposal} returns this - */ -proto.protocol.Proposal.prototype.setExpirationTime = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional int64 create_time = 5; - * @return {number} - */ -proto.protocol.Proposal.prototype.getCreateTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Proposal} returns this - */ -proto.protocol.Proposal.prototype.setCreateTime = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * repeated bytes approvals = 6; - * @return {!(Array|Array)} - */ -proto.protocol.Proposal.prototype.getApprovalsList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 6)); -}; - - -/** - * repeated bytes approvals = 6; - * This is a type-conversion wrapper around `getApprovalsList()` - * @return {!Array} - */ -proto.protocol.Proposal.prototype.getApprovalsList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getApprovalsList())); -}; - - -/** - * repeated bytes approvals = 6; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getApprovalsList()` - * @return {!Array} - */ -proto.protocol.Proposal.prototype.getApprovalsList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getApprovalsList())); -}; - - -/** - * @param {!(Array|Array)} value - * @return {!proto.protocol.Proposal} returns this - */ -proto.protocol.Proposal.prototype.setApprovalsList = function(value) { - return jspb.Message.setField(this, 6, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.protocol.Proposal} returns this - */ -proto.protocol.Proposal.prototype.addApprovals = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 6, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.Proposal} returns this - */ -proto.protocol.Proposal.prototype.clearApprovalsList = function() { - return this.setApprovalsList([]); -}; - - -/** - * optional State state = 7; - * @return {!proto.protocol.Proposal.State} - */ -proto.protocol.Proposal.prototype.getState = function() { - return /** @type {!proto.protocol.Proposal.State} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {!proto.protocol.Proposal.State} value - * @return {!proto.protocol.Proposal} returns this - */ -proto.protocol.Proposal.prototype.setState = function(value) { - return jspb.Message.setProto3EnumField(this, 7, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.Exchange.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Exchange.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.Exchange} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Exchange.toObject = function(includeInstance, msg) { - var f, obj = { - exchangeId: jspb.Message.getFieldWithDefault(msg, 1, 0), - creatorAddress: msg.getCreatorAddress_asB64(), - createTime: jspb.Message.getFieldWithDefault(msg, 3, 0), - firstTokenId: msg.getFirstTokenId_asB64(), - firstTokenBalance: jspb.Message.getFieldWithDefault(msg, 7, 0), - secondTokenId: msg.getSecondTokenId_asB64(), - secondTokenBalance: jspb.Message.getFieldWithDefault(msg, 9, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Exchange} - */ -proto.protocol.Exchange.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Exchange; - return proto.protocol.Exchange.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.Exchange} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Exchange} - */ -proto.protocol.Exchange.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExchangeId(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setCreatorAddress(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCreateTime(value); - break; - case 6: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setFirstTokenId(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFirstTokenBalance(value); - break; - case 8: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSecondTokenId(value); - break; - case 9: - var value = /** @type {number} */ (reader.readInt64()); - msg.setSecondTokenBalance(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.Exchange.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.Exchange.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Exchange} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Exchange.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getExchangeId(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getCreatorAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getCreateTime(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getFirstTokenId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 6, - f - ); - } - f = message.getFirstTokenBalance(); - if (f !== 0) { - writer.writeInt64( - 7, - f - ); - } - f = message.getSecondTokenId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 8, - f - ); - } - f = message.getSecondTokenBalance(); - if (f !== 0) { - writer.writeInt64( - 9, - f - ); - } -}; - - -/** - * optional int64 exchange_id = 1; - * @return {number} - */ -proto.protocol.Exchange.prototype.getExchangeId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Exchange} returns this - */ -proto.protocol.Exchange.prototype.setExchangeId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional bytes creator_address = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Exchange.prototype.getCreatorAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes creator_address = 2; - * This is a type-conversion wrapper around `getCreatorAddress()` - * @return {string} - */ -proto.protocol.Exchange.prototype.getCreatorAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getCreatorAddress())); -}; - - -/** - * optional bytes creator_address = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getCreatorAddress()` - * @return {!Uint8Array} - */ -proto.protocol.Exchange.prototype.getCreatorAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getCreatorAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Exchange} returns this - */ -proto.protocol.Exchange.prototype.setCreatorAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional int64 create_time = 3; - * @return {number} - */ -proto.protocol.Exchange.prototype.getCreateTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Exchange} returns this - */ -proto.protocol.Exchange.prototype.setCreateTime = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional bytes first_token_id = 6; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Exchange.prototype.getFirstTokenId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * optional bytes first_token_id = 6; - * This is a type-conversion wrapper around `getFirstTokenId()` - * @return {string} - */ -proto.protocol.Exchange.prototype.getFirstTokenId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getFirstTokenId())); -}; - - -/** - * optional bytes first_token_id = 6; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getFirstTokenId()` - * @return {!Uint8Array} - */ -proto.protocol.Exchange.prototype.getFirstTokenId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getFirstTokenId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Exchange} returns this - */ -proto.protocol.Exchange.prototype.setFirstTokenId = function(value) { - return jspb.Message.setProto3BytesField(this, 6, value); -}; - - -/** - * optional int64 first_token_balance = 7; - * @return {number} - */ -proto.protocol.Exchange.prototype.getFirstTokenBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Exchange} returns this - */ -proto.protocol.Exchange.prototype.setFirstTokenBalance = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional bytes second_token_id = 8; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Exchange.prototype.getSecondTokenId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** - * optional bytes second_token_id = 8; - * This is a type-conversion wrapper around `getSecondTokenId()` - * @return {string} - */ -proto.protocol.Exchange.prototype.getSecondTokenId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSecondTokenId())); -}; - - -/** - * optional bytes second_token_id = 8; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSecondTokenId()` - * @return {!Uint8Array} - */ -proto.protocol.Exchange.prototype.getSecondTokenId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSecondTokenId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Exchange} returns this - */ -proto.protocol.Exchange.prototype.setSecondTokenId = function(value) { - return jspb.Message.setProto3BytesField(this, 8, value); -}; - - -/** - * optional int64 second_token_balance = 9; - * @return {number} - */ -proto.protocol.Exchange.prototype.getSecondTokenBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Exchange} returns this - */ -proto.protocol.Exchange.prototype.setSecondTokenBalance = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.Account.repeatedFields_ = [5,7,16,33]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.Account.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Account.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.Account} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Account.toObject = function(includeInstance, msg) { - var f, obj = { - accountName: msg.getAccountName_asB64(), - type: jspb.Message.getFieldWithDefault(msg, 2, 0), - address: msg.getAddress_asB64(), - balance: jspb.Message.getFieldWithDefault(msg, 4, 0), - votesList: jspb.Message.toObjectList(msg.getVotesList(), - proto.protocol.Vote.toObject, includeInstance), - assetMap: (f = msg.getAssetMap()) ? f.toObject(includeInstance, undefined) : [], - assetv2Map: (f = msg.getAssetv2Map()) ? f.toObject(includeInstance, undefined) : [], - frozenList: jspb.Message.toObjectList(msg.getFrozenList(), - proto.protocol.Account.Frozen.toObject, includeInstance), - netUsage: jspb.Message.getFieldWithDefault(msg, 8, 0), - acquiredDelegatedFrozenBalanceForBandwidth: jspb.Message.getFieldWithDefault(msg, 41, 0), - delegatedFrozenBalanceForBandwidth: jspb.Message.getFieldWithDefault(msg, 42, 0), - oldTronPower: jspb.Message.getFieldWithDefault(msg, 46, 0), - tronPower: (f = msg.getTronPower()) && proto.protocol.Account.Frozen.toObject(includeInstance, f), - assetOptimized: jspb.Message.getBooleanFieldWithDefault(msg, 60, false), - createTime: jspb.Message.getFieldWithDefault(msg, 9, 0), - latestOprationTime: jspb.Message.getFieldWithDefault(msg, 10, 0), - allowance: jspb.Message.getFieldWithDefault(msg, 11, 0), - latestWithdrawTime: jspb.Message.getFieldWithDefault(msg, 12, 0), - code: msg.getCode_asB64(), - isWitness: jspb.Message.getBooleanFieldWithDefault(msg, 14, false), - isCommittee: jspb.Message.getBooleanFieldWithDefault(msg, 15, false), - frozenSupplyList: jspb.Message.toObjectList(msg.getFrozenSupplyList(), - proto.protocol.Account.Frozen.toObject, includeInstance), - assetIssuedName: msg.getAssetIssuedName_asB64(), - assetIssuedId: msg.getAssetIssuedId_asB64(), - latestAssetOperationTimeMap: (f = msg.getLatestAssetOperationTimeMap()) ? f.toObject(includeInstance, undefined) : [], - latestAssetOperationTimev2Map: (f = msg.getLatestAssetOperationTimev2Map()) ? f.toObject(includeInstance, undefined) : [], - freeNetUsage: jspb.Message.getFieldWithDefault(msg, 19, 0), - freeAssetNetUsageMap: (f = msg.getFreeAssetNetUsageMap()) ? f.toObject(includeInstance, undefined) : [], - freeAssetNetUsagev2Map: (f = msg.getFreeAssetNetUsagev2Map()) ? f.toObject(includeInstance, undefined) : [], - latestConsumeTime: jspb.Message.getFieldWithDefault(msg, 21, 0), - latestConsumeFreeTime: jspb.Message.getFieldWithDefault(msg, 22, 0), - accountId: msg.getAccountId_asB64(), - accountResource: (f = msg.getAccountResource()) && proto.protocol.Account.AccountResource.toObject(includeInstance, f), - codehash: msg.getCodehash_asB64(), - ownerPermission: (f = msg.getOwnerPermission()) && proto.protocol.Permission.toObject(includeInstance, f), - witnessPermission: (f = msg.getWitnessPermission()) && proto.protocol.Permission.toObject(includeInstance, f), - activePermissionList: jspb.Message.toObjectList(msg.getActivePermissionList(), - proto.protocol.Permission.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Account} - */ -proto.protocol.Account.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Account; - return proto.protocol.Account.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.Account} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Account} - */ -proto.protocol.Account.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAccountName(value); - break; - case 2: - var value = /** @type {!proto.protocol.AccountType} */ (reader.readEnum()); - msg.setType(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAddress(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setBalance(value); - break; - case 5: - var value = new proto.protocol.Vote; - reader.readMessage(value,proto.protocol.Vote.deserializeBinaryFromReader); - msg.addVotes(value); - break; - case 6: - var value = msg.getAssetMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64, null, "", 0); - }); - break; - case 56: - var value = msg.getAssetv2Map(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64, null, "", 0); - }); - break; - case 7: - var value = new proto.protocol.Account.Frozen; - reader.readMessage(value,proto.protocol.Account.Frozen.deserializeBinaryFromReader); - msg.addFrozen(value); - break; - case 8: - var value = /** @type {number} */ (reader.readInt64()); - msg.setNetUsage(value); - break; - case 41: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAcquiredDelegatedFrozenBalanceForBandwidth(value); - break; - case 42: - var value = /** @type {number} */ (reader.readInt64()); - msg.setDelegatedFrozenBalanceForBandwidth(value); - break; - case 46: - var value = /** @type {number} */ (reader.readInt64()); - msg.setOldTronPower(value); - break; - case 47: - var value = new proto.protocol.Account.Frozen; - reader.readMessage(value,proto.protocol.Account.Frozen.deserializeBinaryFromReader); - msg.setTronPower(value); - break; - case 60: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setAssetOptimized(value); - break; - case 9: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCreateTime(value); - break; - case 10: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLatestOprationTime(value); - break; - case 11: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAllowance(value); - break; - case 12: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLatestWithdrawTime(value); - break; - case 13: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setCode(value); - break; - case 14: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsWitness(value); - break; - case 15: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsCommittee(value); - break; - case 16: - var value = new proto.protocol.Account.Frozen; - reader.readMessage(value,proto.protocol.Account.Frozen.deserializeBinaryFromReader); - msg.addFrozenSupply(value); - break; - case 17: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAssetIssuedName(value); - break; - case 57: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAssetIssuedId(value); - break; - case 18: - var value = msg.getLatestAssetOperationTimeMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64, null, "", 0); - }); - break; - case 58: - var value = msg.getLatestAssetOperationTimev2Map(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64, null, "", 0); - }); - break; - case 19: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFreeNetUsage(value); - break; - case 20: - var value = msg.getFreeAssetNetUsageMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64, null, "", 0); - }); - break; - case 59: - var value = msg.getFreeAssetNetUsagev2Map(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64, null, "", 0); - }); - break; - case 21: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLatestConsumeTime(value); - break; - case 22: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLatestConsumeFreeTime(value); - break; - case 23: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAccountId(value); - break; - case 26: - var value = new proto.protocol.Account.AccountResource; - reader.readMessage(value,proto.protocol.Account.AccountResource.deserializeBinaryFromReader); - msg.setAccountResource(value); - break; - case 30: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setCodehash(value); - break; - case 31: - var value = new proto.protocol.Permission; - reader.readMessage(value,proto.protocol.Permission.deserializeBinaryFromReader); - msg.setOwnerPermission(value); - break; - case 32: - var value = new proto.protocol.Permission; - reader.readMessage(value,proto.protocol.Permission.deserializeBinaryFromReader); - msg.setWitnessPermission(value); - break; - case 33: - var value = new proto.protocol.Permission; - reader.readMessage(value,proto.protocol.Permission.deserializeBinaryFromReader); - msg.addActivePermission(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.Account.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.Account.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Account} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Account.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAccountName_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } - f = message.getAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getBalance(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getVotesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 5, - f, - proto.protocol.Vote.serializeBinaryToWriter - ); - } - f = message.getAssetMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); - } - f = message.getAssetv2Map(true); - if (f && f.getLength() > 0) { - f.serializeBinary(56, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); - } - f = message.getFrozenList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 7, - f, - proto.protocol.Account.Frozen.serializeBinaryToWriter - ); - } - f = message.getNetUsage(); - if (f !== 0) { - writer.writeInt64( - 8, - f - ); - } - f = message.getAcquiredDelegatedFrozenBalanceForBandwidth(); - if (f !== 0) { - writer.writeInt64( - 41, - f - ); - } - f = message.getDelegatedFrozenBalanceForBandwidth(); - if (f !== 0) { - writer.writeInt64( - 42, - f - ); - } - f = message.getOldTronPower(); - if (f !== 0) { - writer.writeInt64( - 46, - f - ); - } - f = message.getTronPower(); - if (f != null) { - writer.writeMessage( - 47, - f, - proto.protocol.Account.Frozen.serializeBinaryToWriter - ); - } - f = message.getAssetOptimized(); - if (f) { - writer.writeBool( - 60, - f - ); - } - f = message.getCreateTime(); - if (f !== 0) { - writer.writeInt64( - 9, - f - ); - } - f = message.getLatestOprationTime(); - if (f !== 0) { - writer.writeInt64( - 10, - f - ); - } - f = message.getAllowance(); - if (f !== 0) { - writer.writeInt64( - 11, - f - ); - } - f = message.getLatestWithdrawTime(); - if (f !== 0) { - writer.writeInt64( - 12, - f - ); - } - f = message.getCode_asU8(); - if (f.length > 0) { - writer.writeBytes( - 13, - f - ); - } - f = message.getIsWitness(); - if (f) { - writer.writeBool( - 14, - f - ); - } - f = message.getIsCommittee(); - if (f) { - writer.writeBool( - 15, - f - ); - } - f = message.getFrozenSupplyList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 16, - f, - proto.protocol.Account.Frozen.serializeBinaryToWriter - ); - } - f = message.getAssetIssuedName_asU8(); - if (f.length > 0) { - writer.writeBytes( - 17, - f - ); - } - f = message.getAssetIssuedId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 57, - f - ); - } - f = message.getLatestAssetOperationTimeMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(18, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); - } - f = message.getLatestAssetOperationTimev2Map(true); - if (f && f.getLength() > 0) { - f.serializeBinary(58, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); - } - f = message.getFreeNetUsage(); - if (f !== 0) { - writer.writeInt64( - 19, - f - ); - } - f = message.getFreeAssetNetUsageMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(20, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); - } - f = message.getFreeAssetNetUsagev2Map(true); - if (f && f.getLength() > 0) { - f.serializeBinary(59, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); - } - f = message.getLatestConsumeTime(); - if (f !== 0) { - writer.writeInt64( - 21, - f - ); - } - f = message.getLatestConsumeFreeTime(); - if (f !== 0) { - writer.writeInt64( - 22, - f - ); - } - f = message.getAccountId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 23, - f - ); - } - f = message.getAccountResource(); - if (f != null) { - writer.writeMessage( - 26, - f, - proto.protocol.Account.AccountResource.serializeBinaryToWriter - ); - } - f = message.getCodehash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 30, - f - ); - } - f = message.getOwnerPermission(); - if (f != null) { - writer.writeMessage( - 31, - f, - proto.protocol.Permission.serializeBinaryToWriter - ); - } - f = message.getWitnessPermission(); - if (f != null) { - writer.writeMessage( - 32, - f, - proto.protocol.Permission.serializeBinaryToWriter - ); - } - f = message.getActivePermissionList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 33, - f, - proto.protocol.Permission.serializeBinaryToWriter - ); - } -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.Account.Frozen.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Account.Frozen.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.Account.Frozen} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Account.Frozen.toObject = function(includeInstance, msg) { - var f, obj = { - frozenBalance: jspb.Message.getFieldWithDefault(msg, 1, 0), - expireTime: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Account.Frozen} - */ -proto.protocol.Account.Frozen.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Account.Frozen; - return proto.protocol.Account.Frozen.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.Account.Frozen} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Account.Frozen} - */ -proto.protocol.Account.Frozen.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFrozenBalance(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExpireTime(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.Account.Frozen.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.Account.Frozen.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Account.Frozen} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Account.Frozen.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFrozenBalance(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getExpireTime(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } -}; - - -/** - * optional int64 frozen_balance = 1; - * @return {number} - */ -proto.protocol.Account.Frozen.prototype.getFrozenBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Account.Frozen} returns this - */ -proto.protocol.Account.Frozen.prototype.setFrozenBalance = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int64 expire_time = 2; - * @return {number} - */ -proto.protocol.Account.Frozen.prototype.getExpireTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Account.Frozen} returns this - */ -proto.protocol.Account.Frozen.prototype.setExpireTime = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.Account.AccountResource.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Account.AccountResource.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.Account.AccountResource} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Account.AccountResource.toObject = function(includeInstance, msg) { - var f, obj = { - energyUsage: jspb.Message.getFieldWithDefault(msg, 1, 0), - frozenBalanceForEnergy: (f = msg.getFrozenBalanceForEnergy()) && proto.protocol.Account.Frozen.toObject(includeInstance, f), - latestConsumeTimeForEnergy: jspb.Message.getFieldWithDefault(msg, 3, 0), - acquiredDelegatedFrozenBalanceForEnergy: jspb.Message.getFieldWithDefault(msg, 4, 0), - delegatedFrozenBalanceForEnergy: jspb.Message.getFieldWithDefault(msg, 5, 0), - storageLimit: jspb.Message.getFieldWithDefault(msg, 6, 0), - storageUsage: jspb.Message.getFieldWithDefault(msg, 7, 0), - latestExchangeStorageTime: jspb.Message.getFieldWithDefault(msg, 8, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Account.AccountResource} - */ -proto.protocol.Account.AccountResource.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Account.AccountResource; - return proto.protocol.Account.AccountResource.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.Account.AccountResource} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Account.AccountResource} - */ -proto.protocol.Account.AccountResource.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setEnergyUsage(value); - break; - case 2: - var value = new proto.protocol.Account.Frozen; - reader.readMessage(value,proto.protocol.Account.Frozen.deserializeBinaryFromReader); - msg.setFrozenBalanceForEnergy(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLatestConsumeTimeForEnergy(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAcquiredDelegatedFrozenBalanceForEnergy(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setDelegatedFrozenBalanceForEnergy(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setStorageLimit(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setStorageUsage(value); - break; - case 8: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLatestExchangeStorageTime(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.Account.AccountResource.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.Account.AccountResource.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Account.AccountResource} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Account.AccountResource.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getEnergyUsage(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getFrozenBalanceForEnergy(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.protocol.Account.Frozen.serializeBinaryToWriter - ); - } - f = message.getLatestConsumeTimeForEnergy(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getAcquiredDelegatedFrozenBalanceForEnergy(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getDelegatedFrozenBalanceForEnergy(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getStorageLimit(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getStorageUsage(); - if (f !== 0) { - writer.writeInt64( - 7, - f - ); - } - f = message.getLatestExchangeStorageTime(); - if (f !== 0) { - writer.writeInt64( - 8, - f - ); - } -}; - - -/** - * optional int64 energy_usage = 1; - * @return {number} - */ -proto.protocol.Account.AccountResource.prototype.getEnergyUsage = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Account.AccountResource} returns this - */ -proto.protocol.Account.AccountResource.prototype.setEnergyUsage = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional Frozen frozen_balance_for_energy = 2; - * @return {?proto.protocol.Account.Frozen} - */ -proto.protocol.Account.AccountResource.prototype.getFrozenBalanceForEnergy = function() { - return /** @type{?proto.protocol.Account.Frozen} */ ( - jspb.Message.getWrapperField(this, proto.protocol.Account.Frozen, 2)); -}; - - -/** - * @param {?proto.protocol.Account.Frozen|undefined} value - * @return {!proto.protocol.Account.AccountResource} returns this -*/ -proto.protocol.Account.AccountResource.prototype.setFrozenBalanceForEnergy = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.Account.AccountResource} returns this - */ -proto.protocol.Account.AccountResource.prototype.clearFrozenBalanceForEnergy = function() { - return this.setFrozenBalanceForEnergy(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.Account.AccountResource.prototype.hasFrozenBalanceForEnergy = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional int64 latest_consume_time_for_energy = 3; - * @return {number} - */ -proto.protocol.Account.AccountResource.prototype.getLatestConsumeTimeForEnergy = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Account.AccountResource} returns this - */ -proto.protocol.Account.AccountResource.prototype.setLatestConsumeTimeForEnergy = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int64 acquired_delegated_frozen_balance_for_energy = 4; - * @return {number} - */ -proto.protocol.Account.AccountResource.prototype.getAcquiredDelegatedFrozenBalanceForEnergy = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Account.AccountResource} returns this - */ -proto.protocol.Account.AccountResource.prototype.setAcquiredDelegatedFrozenBalanceForEnergy = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional int64 delegated_frozen_balance_for_energy = 5; - * @return {number} - */ -proto.protocol.Account.AccountResource.prototype.getDelegatedFrozenBalanceForEnergy = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Account.AccountResource} returns this - */ -proto.protocol.Account.AccountResource.prototype.setDelegatedFrozenBalanceForEnergy = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 storage_limit = 6; - * @return {number} - */ -proto.protocol.Account.AccountResource.prototype.getStorageLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Account.AccountResource} returns this - */ -proto.protocol.Account.AccountResource.prototype.setStorageLimit = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional int64 storage_usage = 7; - * @return {number} - */ -proto.protocol.Account.AccountResource.prototype.getStorageUsage = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Account.AccountResource} returns this - */ -proto.protocol.Account.AccountResource.prototype.setStorageUsage = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional int64 latest_exchange_storage_time = 8; - * @return {number} - */ -proto.protocol.Account.AccountResource.prototype.getLatestExchangeStorageTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Account.AccountResource} returns this - */ -proto.protocol.Account.AccountResource.prototype.setLatestExchangeStorageTime = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional bytes account_name = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Account.prototype.getAccountName = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes account_name = 1; - * This is a type-conversion wrapper around `getAccountName()` - * @return {string} - */ -proto.protocol.Account.prototype.getAccountName_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAccountName())); -}; - - -/** - * optional bytes account_name = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAccountName()` - * @return {!Uint8Array} - */ -proto.protocol.Account.prototype.getAccountName_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAccountName())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setAccountName = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional AccountType type = 2; - * @return {!proto.protocol.AccountType} - */ -proto.protocol.Account.prototype.getType = function() { - return /** @type {!proto.protocol.AccountType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.protocol.AccountType} value - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - -/** - * optional bytes address = 3; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Account.prototype.getAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes address = 3; - * This is a type-conversion wrapper around `getAddress()` - * @return {string} - */ -proto.protocol.Account.prototype.getAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAddress())); -}; - - -/** - * optional bytes address = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAddress()` - * @return {!Uint8Array} - */ -proto.protocol.Account.prototype.getAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional int64 balance = 4; - * @return {number} - */ -proto.protocol.Account.prototype.getBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setBalance = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * repeated Vote votes = 5; - * @return {!Array} - */ -proto.protocol.Account.prototype.getVotesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.Vote, 5)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.Account} returns this -*/ -proto.protocol.Account.prototype.setVotesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 5, value); -}; - - -/** - * @param {!proto.protocol.Vote=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.Vote} - */ -proto.protocol.Account.prototype.addVotes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.protocol.Vote, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.clearVotesList = function() { - return this.setVotesList([]); -}; - - -/** - * map asset = 6; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.protocol.Account.prototype.getAssetMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 6, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.clearAssetMap = function() { - this.getAssetMap().clear(); - return this;}; - - -/** - * map assetV2 = 56; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.protocol.Account.prototype.getAssetv2Map = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 56, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.clearAssetv2Map = function() { - this.getAssetv2Map().clear(); - return this;}; - - -/** - * repeated Frozen frozen = 7; - * @return {!Array} - */ -proto.protocol.Account.prototype.getFrozenList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.Account.Frozen, 7)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.Account} returns this -*/ -proto.protocol.Account.prototype.setFrozenList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 7, value); -}; - - -/** - * @param {!proto.protocol.Account.Frozen=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.Account.Frozen} - */ -proto.protocol.Account.prototype.addFrozen = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.protocol.Account.Frozen, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.clearFrozenList = function() { - return this.setFrozenList([]); -}; - - -/** - * optional int64 net_usage = 8; - * @return {number} - */ -proto.protocol.Account.prototype.getNetUsage = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setNetUsage = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional int64 acquired_delegated_frozen_balance_for_bandwidth = 41; - * @return {number} - */ -proto.protocol.Account.prototype.getAcquiredDelegatedFrozenBalanceForBandwidth = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 41, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setAcquiredDelegatedFrozenBalanceForBandwidth = function(value) { - return jspb.Message.setProto3IntField(this, 41, value); -}; - - -/** - * optional int64 delegated_frozen_balance_for_bandwidth = 42; - * @return {number} - */ -proto.protocol.Account.prototype.getDelegatedFrozenBalanceForBandwidth = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 42, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setDelegatedFrozenBalanceForBandwidth = function(value) { - return jspb.Message.setProto3IntField(this, 42, value); -}; - - -/** - * optional int64 old_tron_power = 46; - * @return {number} - */ -proto.protocol.Account.prototype.getOldTronPower = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 46, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setOldTronPower = function(value) { - return jspb.Message.setProto3IntField(this, 46, value); -}; - - -/** - * optional Frozen tron_power = 47; - * @return {?proto.protocol.Account.Frozen} - */ -proto.protocol.Account.prototype.getTronPower = function() { - return /** @type{?proto.protocol.Account.Frozen} */ ( - jspb.Message.getWrapperField(this, proto.protocol.Account.Frozen, 47)); -}; - - -/** - * @param {?proto.protocol.Account.Frozen|undefined} value - * @return {!proto.protocol.Account} returns this -*/ -proto.protocol.Account.prototype.setTronPower = function(value) { - return jspb.Message.setWrapperField(this, 47, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.clearTronPower = function() { - return this.setTronPower(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.Account.prototype.hasTronPower = function() { - return jspb.Message.getField(this, 47) != null; -}; - - -/** - * optional bool asset_optimized = 60; - * @return {boolean} - */ -proto.protocol.Account.prototype.getAssetOptimized = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 60, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setAssetOptimized = function(value) { - return jspb.Message.setProto3BooleanField(this, 60, value); -}; - - -/** - * optional int64 create_time = 9; - * @return {number} - */ -proto.protocol.Account.prototype.getCreateTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setCreateTime = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * optional int64 latest_opration_time = 10; - * @return {number} - */ -proto.protocol.Account.prototype.getLatestOprationTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setLatestOprationTime = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); -}; - - -/** - * optional int64 allowance = 11; - * @return {number} - */ -proto.protocol.Account.prototype.getAllowance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setAllowance = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); -}; - - -/** - * optional int64 latest_withdraw_time = 12; - * @return {number} - */ -proto.protocol.Account.prototype.getLatestWithdrawTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setLatestWithdrawTime = function(value) { - return jspb.Message.setProto3IntField(this, 12, value); -}; - - -/** - * optional bytes code = 13; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Account.prototype.getCode = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 13, "")); -}; - - -/** - * optional bytes code = 13; - * This is a type-conversion wrapper around `getCode()` - * @return {string} - */ -proto.protocol.Account.prototype.getCode_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getCode())); -}; - - -/** - * optional bytes code = 13; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getCode()` - * @return {!Uint8Array} - */ -proto.protocol.Account.prototype.getCode_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getCode())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setCode = function(value) { - return jspb.Message.setProto3BytesField(this, 13, value); -}; - - -/** - * optional bool is_witness = 14; - * @return {boolean} - */ -proto.protocol.Account.prototype.getIsWitness = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 14, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setIsWitness = function(value) { - return jspb.Message.setProto3BooleanField(this, 14, value); -}; - - -/** - * optional bool is_committee = 15; - * @return {boolean} - */ -proto.protocol.Account.prototype.getIsCommittee = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 15, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setIsCommittee = function(value) { - return jspb.Message.setProto3BooleanField(this, 15, value); -}; - - -/** - * repeated Frozen frozen_supply = 16; - * @return {!Array} - */ -proto.protocol.Account.prototype.getFrozenSupplyList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.Account.Frozen, 16)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.Account} returns this -*/ -proto.protocol.Account.prototype.setFrozenSupplyList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 16, value); -}; - - -/** - * @param {!proto.protocol.Account.Frozen=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.Account.Frozen} - */ -proto.protocol.Account.prototype.addFrozenSupply = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 16, opt_value, proto.protocol.Account.Frozen, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.clearFrozenSupplyList = function() { - return this.setFrozenSupplyList([]); -}; - - -/** - * optional bytes asset_issued_name = 17; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Account.prototype.getAssetIssuedName = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 17, "")); -}; - - -/** - * optional bytes asset_issued_name = 17; - * This is a type-conversion wrapper around `getAssetIssuedName()` - * @return {string} - */ -proto.protocol.Account.prototype.getAssetIssuedName_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAssetIssuedName())); -}; - - -/** - * optional bytes asset_issued_name = 17; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAssetIssuedName()` - * @return {!Uint8Array} - */ -proto.protocol.Account.prototype.getAssetIssuedName_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAssetIssuedName())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setAssetIssuedName = function(value) { - return jspb.Message.setProto3BytesField(this, 17, value); -}; - - -/** - * optional bytes asset_issued_ID = 57; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Account.prototype.getAssetIssuedId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 57, "")); -}; - - -/** - * optional bytes asset_issued_ID = 57; - * This is a type-conversion wrapper around `getAssetIssuedId()` - * @return {string} - */ -proto.protocol.Account.prototype.getAssetIssuedId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAssetIssuedId())); -}; - - -/** - * optional bytes asset_issued_ID = 57; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAssetIssuedId()` - * @return {!Uint8Array} - */ -proto.protocol.Account.prototype.getAssetIssuedId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAssetIssuedId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setAssetIssuedId = function(value) { - return jspb.Message.setProto3BytesField(this, 57, value); -}; - - -/** - * map latest_asset_operation_time = 18; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.protocol.Account.prototype.getLatestAssetOperationTimeMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 18, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.clearLatestAssetOperationTimeMap = function() { - this.getLatestAssetOperationTimeMap().clear(); - return this;}; - - -/** - * map latest_asset_operation_timeV2 = 58; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.protocol.Account.prototype.getLatestAssetOperationTimev2Map = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 58, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.clearLatestAssetOperationTimev2Map = function() { - this.getLatestAssetOperationTimev2Map().clear(); - return this;}; - - -/** - * optional int64 free_net_usage = 19; - * @return {number} - */ -proto.protocol.Account.prototype.getFreeNetUsage = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setFreeNetUsage = function(value) { - return jspb.Message.setProto3IntField(this, 19, value); -}; - - -/** - * map free_asset_net_usage = 20; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.protocol.Account.prototype.getFreeAssetNetUsageMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 20, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.clearFreeAssetNetUsageMap = function() { - this.getFreeAssetNetUsageMap().clear(); - return this;}; - - -/** - * map free_asset_net_usageV2 = 59; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.protocol.Account.prototype.getFreeAssetNetUsagev2Map = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 59, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.clearFreeAssetNetUsagev2Map = function() { - this.getFreeAssetNetUsagev2Map().clear(); - return this;}; - - -/** - * optional int64 latest_consume_time = 21; - * @return {number} - */ -proto.protocol.Account.prototype.getLatestConsumeTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setLatestConsumeTime = function(value) { - return jspb.Message.setProto3IntField(this, 21, value); -}; - - -/** - * optional int64 latest_consume_free_time = 22; - * @return {number} - */ -proto.protocol.Account.prototype.getLatestConsumeFreeTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 22, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setLatestConsumeFreeTime = function(value) { - return jspb.Message.setProto3IntField(this, 22, value); -}; - - -/** - * optional bytes account_id = 23; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Account.prototype.getAccountId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 23, "")); -}; - - -/** - * optional bytes account_id = 23; - * This is a type-conversion wrapper around `getAccountId()` - * @return {string} - */ -proto.protocol.Account.prototype.getAccountId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAccountId())); -}; - - -/** - * optional bytes account_id = 23; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAccountId()` - * @return {!Uint8Array} - */ -proto.protocol.Account.prototype.getAccountId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAccountId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setAccountId = function(value) { - return jspb.Message.setProto3BytesField(this, 23, value); -}; - - -/** - * optional AccountResource account_resource = 26; - * @return {?proto.protocol.Account.AccountResource} - */ -proto.protocol.Account.prototype.getAccountResource = function() { - return /** @type{?proto.protocol.Account.AccountResource} */ ( - jspb.Message.getWrapperField(this, proto.protocol.Account.AccountResource, 26)); -}; - - -/** - * @param {?proto.protocol.Account.AccountResource|undefined} value - * @return {!proto.protocol.Account} returns this -*/ -proto.protocol.Account.prototype.setAccountResource = function(value) { - return jspb.Message.setWrapperField(this, 26, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.clearAccountResource = function() { - return this.setAccountResource(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.Account.prototype.hasAccountResource = function() { - return jspb.Message.getField(this, 26) != null; -}; - - -/** - * optional bytes codeHash = 30; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Account.prototype.getCodehash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 30, "")); -}; - - -/** - * optional bytes codeHash = 30; - * This is a type-conversion wrapper around `getCodehash()` - * @return {string} - */ -proto.protocol.Account.prototype.getCodehash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getCodehash())); -}; - - -/** - * optional bytes codeHash = 30; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getCodehash()` - * @return {!Uint8Array} - */ -proto.protocol.Account.prototype.getCodehash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getCodehash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.setCodehash = function(value) { - return jspb.Message.setProto3BytesField(this, 30, value); -}; - - -/** - * optional Permission owner_permission = 31; - * @return {?proto.protocol.Permission} - */ -proto.protocol.Account.prototype.getOwnerPermission = function() { - return /** @type{?proto.protocol.Permission} */ ( - jspb.Message.getWrapperField(this, proto.protocol.Permission, 31)); -}; - - -/** - * @param {?proto.protocol.Permission|undefined} value - * @return {!proto.protocol.Account} returns this -*/ -proto.protocol.Account.prototype.setOwnerPermission = function(value) { - return jspb.Message.setWrapperField(this, 31, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.clearOwnerPermission = function() { - return this.setOwnerPermission(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.Account.prototype.hasOwnerPermission = function() { - return jspb.Message.getField(this, 31) != null; -}; - - -/** - * optional Permission witness_permission = 32; - * @return {?proto.protocol.Permission} - */ -proto.protocol.Account.prototype.getWitnessPermission = function() { - return /** @type{?proto.protocol.Permission} */ ( - jspb.Message.getWrapperField(this, proto.protocol.Permission, 32)); -}; - - -/** - * @param {?proto.protocol.Permission|undefined} value - * @return {!proto.protocol.Account} returns this -*/ -proto.protocol.Account.prototype.setWitnessPermission = function(value) { - return jspb.Message.setWrapperField(this, 32, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.clearWitnessPermission = function() { - return this.setWitnessPermission(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.Account.prototype.hasWitnessPermission = function() { - return jspb.Message.getField(this, 32) != null; -}; - - -/** - * repeated Permission active_permission = 33; - * @return {!Array} - */ -proto.protocol.Account.prototype.getActivePermissionList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.Permission, 33)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.Account} returns this -*/ -proto.protocol.Account.prototype.setActivePermissionList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 33, value); -}; - - -/** - * @param {!proto.protocol.Permission=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.Permission} - */ -proto.protocol.Account.prototype.addActivePermission = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 33, opt_value, proto.protocol.Permission, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.Account} returns this - */ -proto.protocol.Account.prototype.clearActivePermissionList = function() { - return this.setActivePermissionList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.Key.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Key.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.Key} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Key.toObject = function(includeInstance, msg) { - var f, obj = { - address: msg.getAddress_asB64(), - weight: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Key} - */ -proto.protocol.Key.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Key; - return proto.protocol.Key.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.Key} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Key} - */ -proto.protocol.Key.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAddress(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setWeight(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.Key.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.Key.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Key} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Key.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getWeight(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } -}; - - -/** - * optional bytes address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Key.prototype.getAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes address = 1; - * This is a type-conversion wrapper around `getAddress()` - * @return {string} - */ -proto.protocol.Key.prototype.getAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAddress())); -}; - - -/** - * optional bytes address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAddress()` - * @return {!Uint8Array} - */ -proto.protocol.Key.prototype.getAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Key} returns this - */ -proto.protocol.Key.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int64 weight = 2; - * @return {number} - */ -proto.protocol.Key.prototype.getWeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Key} returns this - */ -proto.protocol.Key.prototype.setWeight = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.DelegatedResource.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.DelegatedResource.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.DelegatedResource} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.DelegatedResource.toObject = function(includeInstance, msg) { - var f, obj = { - from: msg.getFrom_asB64(), - to: msg.getTo_asB64(), - frozenBalanceForBandwidth: jspb.Message.getFieldWithDefault(msg, 3, 0), - frozenBalanceForEnergy: jspb.Message.getFieldWithDefault(msg, 4, 0), - expireTimeForBandwidth: jspb.Message.getFieldWithDefault(msg, 5, 0), - expireTimeForEnergy: jspb.Message.getFieldWithDefault(msg, 6, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.DelegatedResource} - */ -proto.protocol.DelegatedResource.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.DelegatedResource; - return proto.protocol.DelegatedResource.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.DelegatedResource} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.DelegatedResource} - */ -proto.protocol.DelegatedResource.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setFrom(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTo(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFrozenBalanceForBandwidth(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFrozenBalanceForEnergy(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExpireTimeForBandwidth(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExpireTimeForEnergy(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.DelegatedResource.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.DelegatedResource.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.DelegatedResource} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.DelegatedResource.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFrom_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getTo_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getFrozenBalanceForBandwidth(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getFrozenBalanceForEnergy(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getExpireTimeForBandwidth(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getExpireTimeForEnergy(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } -}; - - -/** - * optional bytes from = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.DelegatedResource.prototype.getFrom = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes from = 1; - * This is a type-conversion wrapper around `getFrom()` - * @return {string} - */ -proto.protocol.DelegatedResource.prototype.getFrom_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getFrom())); -}; - - -/** - * optional bytes from = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getFrom()` - * @return {!Uint8Array} - */ -proto.protocol.DelegatedResource.prototype.getFrom_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getFrom())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.DelegatedResource} returns this - */ -proto.protocol.DelegatedResource.prototype.setFrom = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes to = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.DelegatedResource.prototype.getTo = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes to = 2; - * This is a type-conversion wrapper around `getTo()` - * @return {string} - */ -proto.protocol.DelegatedResource.prototype.getTo_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTo())); -}; - - -/** - * optional bytes to = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTo()` - * @return {!Uint8Array} - */ -proto.protocol.DelegatedResource.prototype.getTo_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTo())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.DelegatedResource} returns this - */ -proto.protocol.DelegatedResource.prototype.setTo = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional int64 frozen_balance_for_bandwidth = 3; - * @return {number} - */ -proto.protocol.DelegatedResource.prototype.getFrozenBalanceForBandwidth = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.DelegatedResource} returns this - */ -proto.protocol.DelegatedResource.prototype.setFrozenBalanceForBandwidth = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int64 frozen_balance_for_energy = 4; - * @return {number} - */ -proto.protocol.DelegatedResource.prototype.getFrozenBalanceForEnergy = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.DelegatedResource} returns this - */ -proto.protocol.DelegatedResource.prototype.setFrozenBalanceForEnergy = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional int64 expire_time_for_bandwidth = 5; - * @return {number} - */ -proto.protocol.DelegatedResource.prototype.getExpireTimeForBandwidth = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.DelegatedResource} returns this - */ -proto.protocol.DelegatedResource.prototype.setExpireTimeForBandwidth = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 expire_time_for_energy = 6; - * @return {number} - */ -proto.protocol.DelegatedResource.prototype.getExpireTimeForEnergy = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.DelegatedResource} returns this - */ -proto.protocol.DelegatedResource.prototype.setExpireTimeForEnergy = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.authority.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.authority.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.authority} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.authority.toObject = function(includeInstance, msg) { - var f, obj = { - account: (f = msg.getAccount()) && proto.protocol.AccountId.toObject(includeInstance, f), - permissionName: msg.getPermissionName_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.authority} - */ -proto.protocol.authority.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.authority; - return proto.protocol.authority.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.authority} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.authority} - */ -proto.protocol.authority.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.protocol.AccountId; - reader.readMessage(value,proto.protocol.AccountId.deserializeBinaryFromReader); - msg.setAccount(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPermissionName(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.authority.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.authority.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.authority} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.authority.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAccount(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.protocol.AccountId.serializeBinaryToWriter - ); - } - f = message.getPermissionName_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional AccountId account = 1; - * @return {?proto.protocol.AccountId} - */ -proto.protocol.authority.prototype.getAccount = function() { - return /** @type{?proto.protocol.AccountId} */ ( - jspb.Message.getWrapperField(this, proto.protocol.AccountId, 1)); -}; - - -/** - * @param {?proto.protocol.AccountId|undefined} value - * @return {!proto.protocol.authority} returns this -*/ -proto.protocol.authority.prototype.setAccount = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.authority} returns this - */ -proto.protocol.authority.prototype.clearAccount = function() { - return this.setAccount(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.authority.prototype.hasAccount = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes permission_name = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.authority.prototype.getPermissionName = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes permission_name = 2; - * This is a type-conversion wrapper around `getPermissionName()` - * @return {string} - */ -proto.protocol.authority.prototype.getPermissionName_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPermissionName())); -}; - - -/** - * optional bytes permission_name = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPermissionName()` - * @return {!Uint8Array} - */ -proto.protocol.authority.prototype.getPermissionName_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPermissionName())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.authority} returns this - */ -proto.protocol.authority.prototype.setPermissionName = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.Permission.repeatedFields_ = [7]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.Permission.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Permission.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.Permission} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Permission.toObject = function(includeInstance, msg) { - var f, obj = { - type: jspb.Message.getFieldWithDefault(msg, 1, 0), - id: jspb.Message.getFieldWithDefault(msg, 2, 0), - permissionName: jspb.Message.getFieldWithDefault(msg, 3, ""), - threshold: jspb.Message.getFieldWithDefault(msg, 4, 0), - parentId: jspb.Message.getFieldWithDefault(msg, 5, 0), - operations: msg.getOperations_asB64(), - keysList: jspb.Message.toObjectList(msg.getKeysList(), - proto.protocol.Key.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Permission} - */ -proto.protocol.Permission.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Permission; - return proto.protocol.Permission.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.Permission} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Permission} - */ -proto.protocol.Permission.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.protocol.Permission.PermissionType} */ (reader.readEnum()); - msg.setType(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setId(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setPermissionName(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setThreshold(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt32()); - msg.setParentId(value); - break; - case 6: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOperations(value); - break; - case 7: - var value = new proto.protocol.Key; - reader.readMessage(value,proto.protocol.Key.deserializeBinaryFromReader); - msg.addKeys(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.Permission.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.Permission.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Permission} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Permission.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getId(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } - f = message.getPermissionName(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getThreshold(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getParentId(); - if (f !== 0) { - writer.writeInt32( - 5, - f - ); - } - f = message.getOperations_asU8(); - if (f.length > 0) { - writer.writeBytes( - 6, - f - ); - } - f = message.getKeysList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 7, - f, - proto.protocol.Key.serializeBinaryToWriter - ); - } -}; - - -/** - * @enum {number} - */ -proto.protocol.Permission.PermissionType = { - OWNER: 0, - WITNESS: 1, - ACTIVE: 2 -}; - -/** - * optional PermissionType type = 1; - * @return {!proto.protocol.Permission.PermissionType} - */ -proto.protocol.Permission.prototype.getType = function() { - return /** @type {!proto.protocol.Permission.PermissionType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.protocol.Permission.PermissionType} value - * @return {!proto.protocol.Permission} returns this - */ -proto.protocol.Permission.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional int32 id = 2; - * @return {number} - */ -proto.protocol.Permission.prototype.getId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Permission} returns this - */ -proto.protocol.Permission.prototype.setId = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional string permission_name = 3; - * @return {string} - */ -proto.protocol.Permission.prototype.getPermissionName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.protocol.Permission} returns this - */ -proto.protocol.Permission.prototype.setPermissionName = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional int64 threshold = 4; - * @return {number} - */ -proto.protocol.Permission.prototype.getThreshold = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Permission} returns this - */ -proto.protocol.Permission.prototype.setThreshold = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional int32 parent_id = 5; - * @return {number} - */ -proto.protocol.Permission.prototype.getParentId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Permission} returns this - */ -proto.protocol.Permission.prototype.setParentId = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional bytes operations = 6; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Permission.prototype.getOperations = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * optional bytes operations = 6; - * This is a type-conversion wrapper around `getOperations()` - * @return {string} - */ -proto.protocol.Permission.prototype.getOperations_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOperations())); -}; - - -/** - * optional bytes operations = 6; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOperations()` - * @return {!Uint8Array} - */ -proto.protocol.Permission.prototype.getOperations_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOperations())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Permission} returns this - */ -proto.protocol.Permission.prototype.setOperations = function(value) { - return jspb.Message.setProto3BytesField(this, 6, value); -}; - - -/** - * repeated Key keys = 7; - * @return {!Array} - */ -proto.protocol.Permission.prototype.getKeysList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.Key, 7)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.Permission} returns this -*/ -proto.protocol.Permission.prototype.setKeysList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 7, value); -}; - - -/** - * @param {!proto.protocol.Key=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.Key} - */ -proto.protocol.Permission.prototype.addKeys = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.protocol.Key, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.Permission} returns this - */ -proto.protocol.Permission.prototype.clearKeysList = function() { - return this.setKeysList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.Witness.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Witness.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.Witness} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Witness.toObject = function(includeInstance, msg) { - var f, obj = { - address: msg.getAddress_asB64(), - votecount: jspb.Message.getFieldWithDefault(msg, 2, 0), - pubkey: msg.getPubkey_asB64(), - url: jspb.Message.getFieldWithDefault(msg, 4, ""), - totalproduced: jspb.Message.getFieldWithDefault(msg, 5, 0), - totalmissed: jspb.Message.getFieldWithDefault(msg, 6, 0), - latestblocknum: jspb.Message.getFieldWithDefault(msg, 7, 0), - latestslotnum: jspb.Message.getFieldWithDefault(msg, 8, 0), - isjobs: jspb.Message.getBooleanFieldWithDefault(msg, 9, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Witness} - */ -proto.protocol.Witness.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Witness; - return proto.protocol.Witness.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.Witness} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Witness} - */ -proto.protocol.Witness.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAddress(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setVotecount(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPubkey(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setUrl(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalproduced(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalmissed(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLatestblocknum(value); - break; - case 8: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLatestslotnum(value); - break; - case 9: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsjobs(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.Witness.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.Witness.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Witness} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Witness.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getVotecount(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getPubkey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getUrl(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getTotalproduced(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getTotalmissed(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getLatestblocknum(); - if (f !== 0) { - writer.writeInt64( - 7, - f - ); - } - f = message.getLatestslotnum(); - if (f !== 0) { - writer.writeInt64( - 8, - f - ); - } - f = message.getIsjobs(); - if (f) { - writer.writeBool( - 9, - f - ); - } -}; - - -/** - * optional bytes address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Witness.prototype.getAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes address = 1; - * This is a type-conversion wrapper around `getAddress()` - * @return {string} - */ -proto.protocol.Witness.prototype.getAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAddress())); -}; - - -/** - * optional bytes address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAddress()` - * @return {!Uint8Array} - */ -proto.protocol.Witness.prototype.getAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Witness} returns this - */ -proto.protocol.Witness.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int64 voteCount = 2; - * @return {number} - */ -proto.protocol.Witness.prototype.getVotecount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Witness} returns this - */ -proto.protocol.Witness.prototype.setVotecount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bytes pubKey = 3; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Witness.prototype.getPubkey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes pubKey = 3; - * This is a type-conversion wrapper around `getPubkey()` - * @return {string} - */ -proto.protocol.Witness.prototype.getPubkey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPubkey())); -}; - - -/** - * optional bytes pubKey = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPubkey()` - * @return {!Uint8Array} - */ -proto.protocol.Witness.prototype.getPubkey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPubkey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Witness} returns this - */ -proto.protocol.Witness.prototype.setPubkey = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional string url = 4; - * @return {string} - */ -proto.protocol.Witness.prototype.getUrl = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.protocol.Witness} returns this - */ -proto.protocol.Witness.prototype.setUrl = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional int64 totalProduced = 5; - * @return {number} - */ -proto.protocol.Witness.prototype.getTotalproduced = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Witness} returns this - */ -proto.protocol.Witness.prototype.setTotalproduced = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 totalMissed = 6; - * @return {number} - */ -proto.protocol.Witness.prototype.getTotalmissed = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Witness} returns this - */ -proto.protocol.Witness.prototype.setTotalmissed = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional int64 latestBlockNum = 7; - * @return {number} - */ -proto.protocol.Witness.prototype.getLatestblocknum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Witness} returns this - */ -proto.protocol.Witness.prototype.setLatestblocknum = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional int64 latestSlotNum = 8; - * @return {number} - */ -proto.protocol.Witness.prototype.getLatestslotnum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Witness} returns this - */ -proto.protocol.Witness.prototype.setLatestslotnum = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional bool isJobs = 9; - * @return {boolean} - */ -proto.protocol.Witness.prototype.getIsjobs = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.protocol.Witness} returns this - */ -proto.protocol.Witness.prototype.setIsjobs = function(value) { - return jspb.Message.setProto3BooleanField(this, 9, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.Votes.repeatedFields_ = [2,3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.Votes.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Votes.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.Votes} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Votes.toObject = function(includeInstance, msg) { - var f, obj = { - address: msg.getAddress_asB64(), - oldVotesList: jspb.Message.toObjectList(msg.getOldVotesList(), - proto.protocol.Vote.toObject, includeInstance), - newVotesList: jspb.Message.toObjectList(msg.getNewVotesList(), - proto.protocol.Vote.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Votes} - */ -proto.protocol.Votes.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Votes; - return proto.protocol.Votes.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.Votes} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Votes} - */ -proto.protocol.Votes.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAddress(value); - break; - case 2: - var value = new proto.protocol.Vote; - reader.readMessage(value,proto.protocol.Vote.deserializeBinaryFromReader); - msg.addOldVotes(value); - break; - case 3: - var value = new proto.protocol.Vote; - reader.readMessage(value,proto.protocol.Vote.deserializeBinaryFromReader); - msg.addNewVotes(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.Votes.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.Votes.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Votes} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Votes.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getOldVotesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.protocol.Vote.serializeBinaryToWriter - ); - } - f = message.getNewVotesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.protocol.Vote.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bytes address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Votes.prototype.getAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes address = 1; - * This is a type-conversion wrapper around `getAddress()` - * @return {string} - */ -proto.protocol.Votes.prototype.getAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAddress())); -}; - - -/** - * optional bytes address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAddress()` - * @return {!Uint8Array} - */ -proto.protocol.Votes.prototype.getAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Votes} returns this - */ -proto.protocol.Votes.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * repeated Vote old_votes = 2; - * @return {!Array} - */ -proto.protocol.Votes.prototype.getOldVotesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.Vote, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.Votes} returns this -*/ -proto.protocol.Votes.prototype.setOldVotesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.protocol.Vote=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.Vote} - */ -proto.protocol.Votes.prototype.addOldVotes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.protocol.Vote, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.Votes} returns this - */ -proto.protocol.Votes.prototype.clearOldVotesList = function() { - return this.setOldVotesList([]); -}; - - -/** - * repeated Vote new_votes = 3; - * @return {!Array} - */ -proto.protocol.Votes.prototype.getNewVotesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.Vote, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.Votes} returns this -*/ -proto.protocol.Votes.prototype.setNewVotesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.protocol.Vote=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.Vote} - */ -proto.protocol.Votes.prototype.addNewVotes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.protocol.Vote, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.Votes} returns this - */ -proto.protocol.Votes.prototype.clearNewVotesList = function() { - return this.setNewVotesList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.MarketOrderDetail.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.MarketOrderDetail.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.MarketOrderDetail} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.MarketOrderDetail.toObject = function(includeInstance, msg) { - var f, obj = { - makerorderid: msg.getMakerorderid_asB64(), - takerorderid: msg.getTakerorderid_asB64(), - fillsellquantity: jspb.Message.getFieldWithDefault(msg, 3, 0), - fillbuyquantity: jspb.Message.getFieldWithDefault(msg, 4, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.MarketOrderDetail} - */ -proto.protocol.MarketOrderDetail.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.MarketOrderDetail; - return proto.protocol.MarketOrderDetail.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.MarketOrderDetail} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.MarketOrderDetail} - */ -proto.protocol.MarketOrderDetail.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setMakerorderid(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTakerorderid(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFillsellquantity(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFillbuyquantity(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.MarketOrderDetail.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.MarketOrderDetail.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.MarketOrderDetail} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.MarketOrderDetail.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMakerorderid_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getTakerorderid_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getFillsellquantity(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getFillbuyquantity(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } -}; - - -/** - * optional bytes makerOrderId = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.MarketOrderDetail.prototype.getMakerorderid = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes makerOrderId = 1; - * This is a type-conversion wrapper around `getMakerorderid()` - * @return {string} - */ -proto.protocol.MarketOrderDetail.prototype.getMakerorderid_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getMakerorderid())); -}; - - -/** - * optional bytes makerOrderId = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getMakerorderid()` - * @return {!Uint8Array} - */ -proto.protocol.MarketOrderDetail.prototype.getMakerorderid_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getMakerorderid())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.MarketOrderDetail} returns this - */ -proto.protocol.MarketOrderDetail.prototype.setMakerorderid = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes takerOrderId = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.MarketOrderDetail.prototype.getTakerorderid = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes takerOrderId = 2; - * This is a type-conversion wrapper around `getTakerorderid()` - * @return {string} - */ -proto.protocol.MarketOrderDetail.prototype.getTakerorderid_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTakerorderid())); -}; - - -/** - * optional bytes takerOrderId = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTakerorderid()` - * @return {!Uint8Array} - */ -proto.protocol.MarketOrderDetail.prototype.getTakerorderid_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTakerorderid())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.MarketOrderDetail} returns this - */ -proto.protocol.MarketOrderDetail.prototype.setTakerorderid = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional int64 fillSellQuantity = 3; - * @return {number} - */ -proto.protocol.MarketOrderDetail.prototype.getFillsellquantity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.MarketOrderDetail} returns this - */ -proto.protocol.MarketOrderDetail.prototype.setFillsellquantity = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int64 fillBuyQuantity = 4; - * @return {number} - */ -proto.protocol.MarketOrderDetail.prototype.getFillbuyquantity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.MarketOrderDetail} returns this - */ -proto.protocol.MarketOrderDetail.prototype.setFillbuyquantity = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.Transaction.repeatedFields_ = [2,5]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.Transaction.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Transaction.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.Transaction} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Transaction.toObject = function(includeInstance, msg) { - var f, obj = { - rawData: (f = msg.getRawData()) && proto.protocol.Transaction.raw.toObject(includeInstance, f), - signatureList: msg.getSignatureList_asB64(), - retList: jspb.Message.toObjectList(msg.getRetList(), - proto.protocol.Transaction.Result.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Transaction} - */ -proto.protocol.Transaction.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Transaction; - return proto.protocol.Transaction.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.Transaction} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Transaction} - */ -proto.protocol.Transaction.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.protocol.Transaction.raw; - reader.readMessage(value,proto.protocol.Transaction.raw.deserializeBinaryFromReader); - msg.setRawData(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addSignature(value); - break; - case 5: - var value = new proto.protocol.Transaction.Result; - reader.readMessage(value,proto.protocol.Transaction.Result.deserializeBinaryFromReader); - msg.addRet(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.Transaction.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.Transaction.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Transaction} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Transaction.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRawData(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.protocol.Transaction.raw.serializeBinaryToWriter - ); - } - f = message.getSignatureList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 2, - f - ); - } - f = message.getRetList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 5, - f, - proto.protocol.Transaction.Result.serializeBinaryToWriter - ); - } -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.Transaction.Contract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Transaction.Contract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.Transaction.Contract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Transaction.Contract.toObject = function(includeInstance, msg) { - var f, obj = { - type: jspb.Message.getFieldWithDefault(msg, 1, 0), - parameter: (f = msg.getParameter()) && core_google_protobuf_any_pb.Any.toObject(includeInstance, f), - provider: msg.getProvider_asB64(), - contractname: msg.getContractname_asB64(), - permissionId: jspb.Message.getFieldWithDefault(msg, 5, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Transaction.Contract} - */ -proto.protocol.Transaction.Contract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Transaction.Contract; - return proto.protocol.Transaction.Contract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.Transaction.Contract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Transaction.Contract} - */ -proto.protocol.Transaction.Contract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.protocol.Transaction.Contract.ContractType} */ (reader.readEnum()); - msg.setType(value); - break; - case 2: - var value = new core_google_protobuf_any_pb.Any; - reader.readMessage(value,core_google_protobuf_any_pb.Any.deserializeBinaryFromReader); - msg.setParameter(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setProvider(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setContractname(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt32()); - msg.setPermissionId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.Transaction.Contract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.Transaction.Contract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Transaction.Contract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Transaction.Contract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getParameter(); - if (f != null) { - writer.writeMessage( - 2, - f, - core_google_protobuf_any_pb.Any.serializeBinaryToWriter - ); - } - f = message.getProvider_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getContractname_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getPermissionId(); - if (f !== 0) { - writer.writeInt32( - 5, - f - ); - } -}; - - -/** - * @enum {number} - */ -proto.protocol.Transaction.Contract.ContractType = { - ACCOUNTCREATECONTRACT: 0, - TRANSFERCONTRACT: 1, - TRANSFERASSETCONTRACT: 2, - VOTEASSETCONTRACT: 3, - VOTEWITNESSCONTRACT: 4, - WITNESSCREATECONTRACT: 5, - ASSETISSUECONTRACT: 6, - WITNESSUPDATECONTRACT: 8, - PARTICIPATEASSETISSUECONTRACT: 9, - ACCOUNTUPDATECONTRACT: 10, - FREEZEBALANCECONTRACT: 11, - UNFREEZEBALANCECONTRACT: 12, - WITHDRAWBALANCECONTRACT: 13, - UNFREEZEASSETCONTRACT: 14, - UPDATEASSETCONTRACT: 15, - PROPOSALCREATECONTRACT: 16, - PROPOSALAPPROVECONTRACT: 17, - PROPOSALDELETECONTRACT: 18, - SETACCOUNTIDCONTRACT: 19, - CUSTOMCONTRACT: 20, - CREATESMARTCONTRACT: 30, - TRIGGERSMARTCONTRACT: 31, - GETCONTRACT: 32, - UPDATESETTINGCONTRACT: 33, - EXCHANGECREATECONTRACT: 41, - EXCHANGEINJECTCONTRACT: 42, - EXCHANGEWITHDRAWCONTRACT: 43, - EXCHANGETRANSACTIONCONTRACT: 44, - UPDATEENERGYLIMITCONTRACT: 45, - ACCOUNTPERMISSIONUPDATECONTRACT: 46, - CLEARABICONTRACT: 48, - UPDATEBROKERAGECONTRACT: 49, - SHIELDEDTRANSFERCONTRACT: 51, - MARKETSELLASSETCONTRACT: 52, - MARKETCANCELORDERCONTRACT: 53, - FREEZEBALANCEV2CONTRACT: 54, - UNFREEZEBALANCEV2CONTRACT: 55, - WITHDRAWEXPIREUNFREEZECONTRACT: 56, - DELEGATERESOURCECONTRACT: 57, - UNDELEGATERESOURCECONTRACT: 58 -}; - -/** - * optional ContractType type = 1; - * @return {!proto.protocol.Transaction.Contract.ContractType} - */ -proto.protocol.Transaction.Contract.prototype.getType = function() { - return /** @type {!proto.protocol.Transaction.Contract.ContractType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.protocol.Transaction.Contract.ContractType} value - * @return {!proto.protocol.Transaction.Contract} returns this - */ -proto.protocol.Transaction.Contract.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional google.protobuf.Any parameter = 2; - * @return {?proto.google.protobuf.Any} - */ -proto.protocol.Transaction.Contract.prototype.getParameter = function() { - return /** @type{?proto.google.protobuf.Any} */ ( - jspb.Message.getWrapperField(this, core_google_protobuf_any_pb.Any, 2)); -}; - - -/** - * @param {?proto.google.protobuf.Any|undefined} value - * @return {!proto.protocol.Transaction.Contract} returns this -*/ -proto.protocol.Transaction.Contract.prototype.setParameter = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.Transaction.Contract} returns this - */ -proto.protocol.Transaction.Contract.prototype.clearParameter = function() { - return this.setParameter(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.Transaction.Contract.prototype.hasParameter = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional bytes provider = 3; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Transaction.Contract.prototype.getProvider = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes provider = 3; - * This is a type-conversion wrapper around `getProvider()` - * @return {string} - */ -proto.protocol.Transaction.Contract.prototype.getProvider_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getProvider())); -}; - - -/** - * optional bytes provider = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getProvider()` - * @return {!Uint8Array} - */ -proto.protocol.Transaction.Contract.prototype.getProvider_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getProvider())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Transaction.Contract} returns this - */ -proto.protocol.Transaction.Contract.prototype.setProvider = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional bytes ContractName = 4; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Transaction.Contract.prototype.getContractname = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes ContractName = 4; - * This is a type-conversion wrapper around `getContractname()` - * @return {string} - */ -proto.protocol.Transaction.Contract.prototype.getContractname_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getContractname())); -}; - - -/** - * optional bytes ContractName = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getContractname()` - * @return {!Uint8Array} - */ -proto.protocol.Transaction.Contract.prototype.getContractname_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getContractname())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Transaction.Contract} returns this - */ -proto.protocol.Transaction.Contract.prototype.setContractname = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional int32 Permission_id = 5; - * @return {number} - */ -proto.protocol.Transaction.Contract.prototype.getPermissionId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Transaction.Contract} returns this - */ -proto.protocol.Transaction.Contract.prototype.setPermissionId = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.Transaction.Result.repeatedFields_ = [26]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.Transaction.Result.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Transaction.Result.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.Transaction.Result} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Transaction.Result.toObject = function(includeInstance, msg) { - var f, obj = { - fee: jspb.Message.getFieldWithDefault(msg, 1, 0), - ret: jspb.Message.getFieldWithDefault(msg, 2, 0), - contractret: jspb.Message.getFieldWithDefault(msg, 3, 0), - assetissueid: jspb.Message.getFieldWithDefault(msg, 14, ""), - withdrawAmount: jspb.Message.getFieldWithDefault(msg, 15, 0), - unfreezeAmount: jspb.Message.getFieldWithDefault(msg, 16, 0), - exchangeReceivedAmount: jspb.Message.getFieldWithDefault(msg, 18, 0), - exchangeInjectAnotherAmount: jspb.Message.getFieldWithDefault(msg, 19, 0), - exchangeWithdrawAnotherAmount: jspb.Message.getFieldWithDefault(msg, 20, 0), - exchangeId: jspb.Message.getFieldWithDefault(msg, 21, 0), - shieldedTransactionFee: jspb.Message.getFieldWithDefault(msg, 22, 0), - orderid: msg.getOrderid_asB64(), - orderdetailsList: jspb.Message.toObjectList(msg.getOrderdetailsList(), - proto.protocol.MarketOrderDetail.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Transaction.Result} - */ -proto.protocol.Transaction.Result.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Transaction.Result; - return proto.protocol.Transaction.Result.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.Transaction.Result} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Transaction.Result} - */ -proto.protocol.Transaction.Result.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFee(value); - break; - case 2: - var value = /** @type {!proto.protocol.Transaction.Result.code} */ (reader.readEnum()); - msg.setRet(value); - break; - case 3: - var value = /** @type {!proto.protocol.Transaction.Result.contractResult} */ (reader.readEnum()); - msg.setContractret(value); - break; - case 14: - var value = /** @type {string} */ (reader.readString()); - msg.setAssetissueid(value); - break; - case 15: - var value = /** @type {number} */ (reader.readInt64()); - msg.setWithdrawAmount(value); - break; - case 16: - var value = /** @type {number} */ (reader.readInt64()); - msg.setUnfreezeAmount(value); - break; - case 18: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExchangeReceivedAmount(value); - break; - case 19: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExchangeInjectAnotherAmount(value); - break; - case 20: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExchangeWithdrawAnotherAmount(value); - break; - case 21: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExchangeId(value); - break; - case 22: - var value = /** @type {number} */ (reader.readInt64()); - msg.setShieldedTransactionFee(value); - break; - case 25: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOrderid(value); - break; - case 26: - var value = new proto.protocol.MarketOrderDetail; - reader.readMessage(value,proto.protocol.MarketOrderDetail.deserializeBinaryFromReader); - msg.addOrderdetails(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.Transaction.Result.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.Transaction.Result.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Transaction.Result} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Transaction.Result.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFee(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getRet(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } - f = message.getContractret(); - if (f !== 0.0) { - writer.writeEnum( - 3, - f - ); - } - f = message.getAssetissueid(); - if (f.length > 0) { - writer.writeString( - 14, - f - ); - } - f = message.getWithdrawAmount(); - if (f !== 0) { - writer.writeInt64( - 15, - f - ); - } - f = message.getUnfreezeAmount(); - if (f !== 0) { - writer.writeInt64( - 16, - f - ); - } - f = message.getExchangeReceivedAmount(); - if (f !== 0) { - writer.writeInt64( - 18, - f - ); - } - f = message.getExchangeInjectAnotherAmount(); - if (f !== 0) { - writer.writeInt64( - 19, - f - ); - } - f = message.getExchangeWithdrawAnotherAmount(); - if (f !== 0) { - writer.writeInt64( - 20, - f - ); - } - f = message.getExchangeId(); - if (f !== 0) { - writer.writeInt64( - 21, - f - ); - } - f = message.getShieldedTransactionFee(); - if (f !== 0) { - writer.writeInt64( - 22, - f - ); - } - f = message.getOrderid_asU8(); - if (f.length > 0) { - writer.writeBytes( - 25, - f - ); - } - f = message.getOrderdetailsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 26, - f, - proto.protocol.MarketOrderDetail.serializeBinaryToWriter - ); - } -}; - - -/** - * @enum {number} - */ -proto.protocol.Transaction.Result.code = { - SUCESS: 0, - FAILED: 1 -}; - -/** - * @enum {number} - */ -proto.protocol.Transaction.Result.contractResult = { - DEFAULT: 0, - SUCCESS: 1, - REVERT: 2, - BAD_JUMP_DESTINATION: 3, - OUT_OF_MEMORY: 4, - PRECOMPILED_CONTRACT: 5, - STACK_TOO_SMALL: 6, - STACK_TOO_LARGE: 7, - ILLEGAL_OPERATION: 8, - STACK_OVERFLOW: 9, - OUT_OF_ENERGY: 10, - OUT_OF_TIME: 11, - JVM_STACK_OVER_FLOW: 12, - UNKNOWN: 13, - TRANSFER_FAILED: 14, - INVALID_CODE: 15 -}; - -/** - * optional int64 fee = 1; - * @return {number} - */ -proto.protocol.Transaction.Result.prototype.getFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Transaction.Result} returns this - */ -proto.protocol.Transaction.Result.prototype.setFee = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional code ret = 2; - * @return {!proto.protocol.Transaction.Result.code} - */ -proto.protocol.Transaction.Result.prototype.getRet = function() { - return /** @type {!proto.protocol.Transaction.Result.code} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.protocol.Transaction.Result.code} value - * @return {!proto.protocol.Transaction.Result} returns this - */ -proto.protocol.Transaction.Result.prototype.setRet = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - -/** - * optional contractResult contractRet = 3; - * @return {!proto.protocol.Transaction.Result.contractResult} - */ -proto.protocol.Transaction.Result.prototype.getContractret = function() { - return /** @type {!proto.protocol.Transaction.Result.contractResult} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {!proto.protocol.Transaction.Result.contractResult} value - * @return {!proto.protocol.Transaction.Result} returns this - */ -proto.protocol.Transaction.Result.prototype.setContractret = function(value) { - return jspb.Message.setProto3EnumField(this, 3, value); -}; - - -/** - * optional string assetIssueID = 14; - * @return {string} - */ -proto.protocol.Transaction.Result.prototype.getAssetissueid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "")); -}; - - -/** - * @param {string} value - * @return {!proto.protocol.Transaction.Result} returns this - */ -proto.protocol.Transaction.Result.prototype.setAssetissueid = function(value) { - return jspb.Message.setProto3StringField(this, 14, value); -}; - - -/** - * optional int64 withdraw_amount = 15; - * @return {number} - */ -proto.protocol.Transaction.Result.prototype.getWithdrawAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Transaction.Result} returns this - */ -proto.protocol.Transaction.Result.prototype.setWithdrawAmount = function(value) { - return jspb.Message.setProto3IntField(this, 15, value); -}; - - -/** - * optional int64 unfreeze_amount = 16; - * @return {number} - */ -proto.protocol.Transaction.Result.prototype.getUnfreezeAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Transaction.Result} returns this - */ -proto.protocol.Transaction.Result.prototype.setUnfreezeAmount = function(value) { - return jspb.Message.setProto3IntField(this, 16, value); -}; - - -/** - * optional int64 exchange_received_amount = 18; - * @return {number} - */ -proto.protocol.Transaction.Result.prototype.getExchangeReceivedAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 18, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Transaction.Result} returns this - */ -proto.protocol.Transaction.Result.prototype.setExchangeReceivedAmount = function(value) { - return jspb.Message.setProto3IntField(this, 18, value); -}; - - -/** - * optional int64 exchange_inject_another_amount = 19; - * @return {number} - */ -proto.protocol.Transaction.Result.prototype.getExchangeInjectAnotherAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Transaction.Result} returns this - */ -proto.protocol.Transaction.Result.prototype.setExchangeInjectAnotherAmount = function(value) { - return jspb.Message.setProto3IntField(this, 19, value); -}; - - -/** - * optional int64 exchange_withdraw_another_amount = 20; - * @return {number} - */ -proto.protocol.Transaction.Result.prototype.getExchangeWithdrawAnotherAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Transaction.Result} returns this - */ -proto.protocol.Transaction.Result.prototype.setExchangeWithdrawAnotherAmount = function(value) { - return jspb.Message.setProto3IntField(this, 20, value); -}; - - -/** - * optional int64 exchange_id = 21; - * @return {number} - */ -proto.protocol.Transaction.Result.prototype.getExchangeId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Transaction.Result} returns this - */ -proto.protocol.Transaction.Result.prototype.setExchangeId = function(value) { - return jspb.Message.setProto3IntField(this, 21, value); -}; - - -/** - * optional int64 shielded_transaction_fee = 22; - * @return {number} - */ -proto.protocol.Transaction.Result.prototype.getShieldedTransactionFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 22, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Transaction.Result} returns this - */ -proto.protocol.Transaction.Result.prototype.setShieldedTransactionFee = function(value) { - return jspb.Message.setProto3IntField(this, 22, value); -}; - - -/** - * optional bytes orderId = 25; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Transaction.Result.prototype.getOrderid = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 25, "")); -}; - - -/** - * optional bytes orderId = 25; - * This is a type-conversion wrapper around `getOrderid()` - * @return {string} - */ -proto.protocol.Transaction.Result.prototype.getOrderid_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOrderid())); -}; - - -/** - * optional bytes orderId = 25; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOrderid()` - * @return {!Uint8Array} - */ -proto.protocol.Transaction.Result.prototype.getOrderid_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOrderid())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Transaction.Result} returns this - */ -proto.protocol.Transaction.Result.prototype.setOrderid = function(value) { - return jspb.Message.setProto3BytesField(this, 25, value); -}; - - -/** - * repeated MarketOrderDetail orderDetails = 26; - * @return {!Array} - */ -proto.protocol.Transaction.Result.prototype.getOrderdetailsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.MarketOrderDetail, 26)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.Transaction.Result} returns this -*/ -proto.protocol.Transaction.Result.prototype.setOrderdetailsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 26, value); -}; - - -/** - * @param {!proto.protocol.MarketOrderDetail=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.MarketOrderDetail} - */ -proto.protocol.Transaction.Result.prototype.addOrderdetails = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 26, opt_value, proto.protocol.MarketOrderDetail, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.Transaction.Result} returns this - */ -proto.protocol.Transaction.Result.prototype.clearOrderdetailsList = function() { - return this.setOrderdetailsList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.Transaction.raw.repeatedFields_ = [9,11]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.Transaction.raw.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.Transaction.raw.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.Transaction.raw} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Transaction.raw.toObject = function(includeInstance, msg) { - var f, obj = { - refBlockBytes: msg.getRefBlockBytes_asB64(), - refBlockNum: jspb.Message.getFieldWithDefault(msg, 3, 0), - refBlockHash: msg.getRefBlockHash_asB64(), - expiration: jspb.Message.getFieldWithDefault(msg, 8, 0), - authsList: jspb.Message.toObjectList(msg.getAuthsList(), - proto.protocol.authority.toObject, includeInstance), - data: msg.getData_asB64(), - contractList: jspb.Message.toObjectList(msg.getContractList(), - proto.protocol.Transaction.Contract.toObject, includeInstance), - scripts: msg.getScripts_asB64(), - timestamp: jspb.Message.getFieldWithDefault(msg, 14, 0), - feeLimit: jspb.Message.getFieldWithDefault(msg, 18, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.Transaction.raw} - */ -proto.protocol.Transaction.raw.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.Transaction.raw; - return proto.protocol.Transaction.raw.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.Transaction.raw} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.Transaction.raw} - */ -proto.protocol.Transaction.raw.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRefBlockBytes(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setRefBlockNum(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRefBlockHash(value); - break; - case 8: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExpiration(value); - break; - case 9: - var value = new proto.protocol.authority; - reader.readMessage(value,proto.protocol.authority.deserializeBinaryFromReader); - msg.addAuths(value); - break; - case 10: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setData(value); - break; - case 11: - var value = new proto.protocol.Transaction.Contract; - reader.readMessage(value,proto.protocol.Transaction.Contract.deserializeBinaryFromReader); - msg.addContract(value); - break; - case 12: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setScripts(value); - break; - case 14: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTimestamp(value); - break; - case 18: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFeeLimit(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.Transaction.raw.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.Transaction.raw.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.Transaction.raw} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.Transaction.raw.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRefBlockBytes_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getRefBlockNum(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getRefBlockHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getExpiration(); - if (f !== 0) { - writer.writeInt64( - 8, - f - ); - } - f = message.getAuthsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 9, - f, - proto.protocol.authority.serializeBinaryToWriter - ); - } - f = message.getData_asU8(); - if (f.length > 0) { - writer.writeBytes( - 10, - f - ); - } - f = message.getContractList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 11, - f, - proto.protocol.Transaction.Contract.serializeBinaryToWriter - ); - } - f = message.getScripts_asU8(); - if (f.length > 0) { - writer.writeBytes( - 12, - f - ); - } - f = message.getTimestamp(); - if (f !== 0) { - writer.writeInt64( - 14, - f - ); - } - f = message.getFeeLimit(); - if (f !== 0) { - writer.writeInt64( - 18, - f - ); - } -}; - - -/** - * optional bytes ref_block_bytes = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Transaction.raw.prototype.getRefBlockBytes = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes ref_block_bytes = 1; - * This is a type-conversion wrapper around `getRefBlockBytes()` - * @return {string} - */ -proto.protocol.Transaction.raw.prototype.getRefBlockBytes_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRefBlockBytes())); -}; - - -/** - * optional bytes ref_block_bytes = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRefBlockBytes()` - * @return {!Uint8Array} - */ -proto.protocol.Transaction.raw.prototype.getRefBlockBytes_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRefBlockBytes())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Transaction.raw} returns this - */ -proto.protocol.Transaction.raw.prototype.setRefBlockBytes = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int64 ref_block_num = 3; - * @return {number} - */ -proto.protocol.Transaction.raw.prototype.getRefBlockNum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Transaction.raw} returns this - */ -proto.protocol.Transaction.raw.prototype.setRefBlockNum = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional bytes ref_block_hash = 4; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Transaction.raw.prototype.getRefBlockHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes ref_block_hash = 4; - * This is a type-conversion wrapper around `getRefBlockHash()` - * @return {string} - */ -proto.protocol.Transaction.raw.prototype.getRefBlockHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRefBlockHash())); -}; - - -/** - * optional bytes ref_block_hash = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRefBlockHash()` - * @return {!Uint8Array} - */ -proto.protocol.Transaction.raw.prototype.getRefBlockHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRefBlockHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Transaction.raw} returns this - */ -proto.protocol.Transaction.raw.prototype.setRefBlockHash = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional int64 expiration = 8; - * @return {number} - */ -proto.protocol.Transaction.raw.prototype.getExpiration = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Transaction.raw} returns this - */ -proto.protocol.Transaction.raw.prototype.setExpiration = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * repeated authority auths = 9; - * @return {!Array} - */ -proto.protocol.Transaction.raw.prototype.getAuthsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.authority, 9)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.Transaction.raw} returns this -*/ -proto.protocol.Transaction.raw.prototype.setAuthsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 9, value); -}; - - -/** - * @param {!proto.protocol.authority=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.authority} - */ -proto.protocol.Transaction.raw.prototype.addAuths = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.protocol.authority, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.Transaction.raw} returns this - */ -proto.protocol.Transaction.raw.prototype.clearAuthsList = function() { - return this.setAuthsList([]); -}; - - -/** - * optional bytes data = 10; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Transaction.raw.prototype.getData = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, "")); -}; - - -/** - * optional bytes data = 10; - * This is a type-conversion wrapper around `getData()` - * @return {string} - */ -proto.protocol.Transaction.raw.prototype.getData_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getData())); -}; - - -/** - * optional bytes data = 10; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getData()` - * @return {!Uint8Array} - */ -proto.protocol.Transaction.raw.prototype.getData_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getData())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Transaction.raw} returns this - */ -proto.protocol.Transaction.raw.prototype.setData = function(value) { - return jspb.Message.setProto3BytesField(this, 10, value); -}; - - -/** - * repeated Contract contract = 11; - * @return {!Array} - */ -proto.protocol.Transaction.raw.prototype.getContractList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.Transaction.Contract, 11)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.Transaction.raw} returns this -*/ -proto.protocol.Transaction.raw.prototype.setContractList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 11, value); -}; - - -/** - * @param {!proto.protocol.Transaction.Contract=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.Transaction.Contract} - */ -proto.protocol.Transaction.raw.prototype.addContract = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.protocol.Transaction.Contract, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.Transaction.raw} returns this - */ -proto.protocol.Transaction.raw.prototype.clearContractList = function() { - return this.setContractList([]); -}; - - -/** - * optional bytes scripts = 12; - * @return {!(string|Uint8Array)} - */ -proto.protocol.Transaction.raw.prototype.getScripts = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 12, "")); -}; - - -/** - * optional bytes scripts = 12; - * This is a type-conversion wrapper around `getScripts()` - * @return {string} - */ -proto.protocol.Transaction.raw.prototype.getScripts_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getScripts())); -}; - - -/** - * optional bytes scripts = 12; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getScripts()` - * @return {!Uint8Array} - */ -proto.protocol.Transaction.raw.prototype.getScripts_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getScripts())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.Transaction.raw} returns this - */ -proto.protocol.Transaction.raw.prototype.setScripts = function(value) { - return jspb.Message.setProto3BytesField(this, 12, value); -}; - - -/** - * optional int64 timestamp = 14; - * @return {number} - */ -proto.protocol.Transaction.raw.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Transaction.raw} returns this - */ -proto.protocol.Transaction.raw.prototype.setTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 14, value); -}; - - -/** - * optional int64 fee_limit = 18; - * @return {number} - */ -proto.protocol.Transaction.raw.prototype.getFeeLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 18, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.Transaction.raw} returns this - */ -proto.protocol.Transaction.raw.prototype.setFeeLimit = function(value) { - return jspb.Message.setProto3IntField(this, 18, value); -}; - - -/** - * optional raw raw_data = 1; - * @return {?proto.protocol.Transaction.raw} - */ -proto.protocol.Transaction.prototype.getRawData = function() { - return /** @type{?proto.protocol.Transaction.raw} */ ( - jspb.Message.getWrapperField(this, proto.protocol.Transaction.raw, 1)); -}; - - -/** - * @param {?proto.protocol.Transaction.raw|undefined} value - * @return {!proto.protocol.Transaction} returns this -*/ -proto.protocol.Transaction.prototype.setRawData = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.Transaction} returns this - */ -proto.protocol.Transaction.prototype.clearRawData = function() { - return this.setRawData(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.Transaction.prototype.hasRawData = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * repeated bytes signature = 2; - * @return {!(Array|Array)} - */ -proto.protocol.Transaction.prototype.getSignatureList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 2)); -}; - - -/** - * repeated bytes signature = 2; - * This is a type-conversion wrapper around `getSignatureList()` - * @return {!Array} - */ -proto.protocol.Transaction.prototype.getSignatureList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getSignatureList())); -}; - - -/** - * repeated bytes signature = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSignatureList()` - * @return {!Array} - */ -proto.protocol.Transaction.prototype.getSignatureList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getSignatureList())); -}; - - -/** - * @param {!(Array|Array)} value - * @return {!proto.protocol.Transaction} returns this - */ -proto.protocol.Transaction.prototype.setSignatureList = function(value) { - return jspb.Message.setField(this, 2, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.protocol.Transaction} returns this - */ -proto.protocol.Transaction.prototype.addSignature = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.Transaction} returns this - */ -proto.protocol.Transaction.prototype.clearSignatureList = function() { - return this.setSignatureList([]); -}; - - -/** - * repeated Result ret = 5; - * @return {!Array} - */ -proto.protocol.Transaction.prototype.getRetList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.Transaction.Result, 5)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.Transaction} returns this -*/ -proto.protocol.Transaction.prototype.setRetList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 5, value); -}; - - -/** - * @param {!proto.protocol.Transaction.Result=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.Transaction.Result} - */ -proto.protocol.Transaction.prototype.addRet = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.protocol.Transaction.Result, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.Transaction} returns this - */ -proto.protocol.Transaction.prototype.clearRetList = function() { - return this.setRetList([]); -}; - - -/** - * @enum {number} - */ -proto.protocol.AccountType = { - NORMAL: 0, - ASSETISSUE: 1, - CONTRACT: 2 -}; - -goog.object.extend(exports, proto.protocol); diff --git a/src/protocol/core/contract/account_contract_pb.js b/src/protocol/core/contract/account_contract_pb.js deleted file mode 100644 index 8c655ee8..00000000 --- a/src/protocol/core/contract/account_contract_pb.js +++ /dev/null @@ -1,1084 +0,0 @@ -// source: core/contract/account_contract.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('@tronweb3/google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -var core_Tron_pb = require('../../core/Tron_pb.js'); -goog.object.extend(proto, core_Tron_pb); -goog.exportSymbol('proto.protocol.AccountCreateContract', null, global); -goog.exportSymbol('proto.protocol.AccountPermissionUpdateContract', null, global); -goog.exportSymbol('proto.protocol.AccountUpdateContract', null, global); -goog.exportSymbol('proto.protocol.SetAccountIdContract', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.AccountCreateContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.AccountCreateContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.AccountCreateContract.displayName = 'proto.protocol.AccountCreateContract'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.AccountUpdateContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.AccountUpdateContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.AccountUpdateContract.displayName = 'proto.protocol.AccountUpdateContract'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.SetAccountIdContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.SetAccountIdContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.SetAccountIdContract.displayName = 'proto.protocol.SetAccountIdContract'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.AccountPermissionUpdateContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.AccountPermissionUpdateContract.repeatedFields_, null); -}; -goog.inherits(proto.protocol.AccountPermissionUpdateContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.AccountPermissionUpdateContract.displayName = 'proto.protocol.AccountPermissionUpdateContract'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.AccountCreateContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.AccountCreateContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.AccountCreateContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.AccountCreateContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - accountAddress: msg.getAccountAddress_asB64(), - type: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.AccountCreateContract} - */ -proto.protocol.AccountCreateContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.AccountCreateContract; - return proto.protocol.AccountCreateContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.AccountCreateContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.AccountCreateContract} - */ -proto.protocol.AccountCreateContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAccountAddress(value); - break; - case 3: - var value = /** @type {!proto.protocol.AccountType} */ (reader.readEnum()); - msg.setType(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.AccountCreateContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.AccountCreateContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.AccountCreateContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.AccountCreateContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getAccountAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 3, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.AccountCreateContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.AccountCreateContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.AccountCreateContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.AccountCreateContract} returns this - */ -proto.protocol.AccountCreateContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes account_address = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.AccountCreateContract.prototype.getAccountAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes account_address = 2; - * This is a type-conversion wrapper around `getAccountAddress()` - * @return {string} - */ -proto.protocol.AccountCreateContract.prototype.getAccountAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAccountAddress())); -}; - - -/** - * optional bytes account_address = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAccountAddress()` - * @return {!Uint8Array} - */ -proto.protocol.AccountCreateContract.prototype.getAccountAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAccountAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.AccountCreateContract} returns this - */ -proto.protocol.AccountCreateContract.prototype.setAccountAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional AccountType type = 3; - * @return {!proto.protocol.AccountType} - */ -proto.protocol.AccountCreateContract.prototype.getType = function() { - return /** @type {!proto.protocol.AccountType} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {!proto.protocol.AccountType} value - * @return {!proto.protocol.AccountCreateContract} returns this - */ -proto.protocol.AccountCreateContract.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.AccountUpdateContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.AccountUpdateContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.AccountUpdateContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.AccountUpdateContract.toObject = function(includeInstance, msg) { - var f, obj = { - accountName: msg.getAccountName_asB64(), - ownerAddress: msg.getOwnerAddress_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.AccountUpdateContract} - */ -proto.protocol.AccountUpdateContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.AccountUpdateContract; - return proto.protocol.AccountUpdateContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.AccountUpdateContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.AccountUpdateContract} - */ -proto.protocol.AccountUpdateContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAccountName(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.AccountUpdateContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.AccountUpdateContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.AccountUpdateContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.AccountUpdateContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAccountName_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional bytes account_name = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.AccountUpdateContract.prototype.getAccountName = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes account_name = 1; - * This is a type-conversion wrapper around `getAccountName()` - * @return {string} - */ -proto.protocol.AccountUpdateContract.prototype.getAccountName_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAccountName())); -}; - - -/** - * optional bytes account_name = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAccountName()` - * @return {!Uint8Array} - */ -proto.protocol.AccountUpdateContract.prototype.getAccountName_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAccountName())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.AccountUpdateContract} returns this - */ -proto.protocol.AccountUpdateContract.prototype.setAccountName = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes owner_address = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.AccountUpdateContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes owner_address = 2; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.AccountUpdateContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.AccountUpdateContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.AccountUpdateContract} returns this - */ -proto.protocol.AccountUpdateContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.SetAccountIdContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.SetAccountIdContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.SetAccountIdContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.SetAccountIdContract.toObject = function(includeInstance, msg) { - var f, obj = { - accountId: msg.getAccountId_asB64(), - ownerAddress: msg.getOwnerAddress_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.SetAccountIdContract} - */ -proto.protocol.SetAccountIdContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.SetAccountIdContract; - return proto.protocol.SetAccountIdContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.SetAccountIdContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.SetAccountIdContract} - */ -proto.protocol.SetAccountIdContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAccountId(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.SetAccountIdContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.SetAccountIdContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.SetAccountIdContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.SetAccountIdContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAccountId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional bytes account_id = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.SetAccountIdContract.prototype.getAccountId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes account_id = 1; - * This is a type-conversion wrapper around `getAccountId()` - * @return {string} - */ -proto.protocol.SetAccountIdContract.prototype.getAccountId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAccountId())); -}; - - -/** - * optional bytes account_id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAccountId()` - * @return {!Uint8Array} - */ -proto.protocol.SetAccountIdContract.prototype.getAccountId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAccountId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.SetAccountIdContract} returns this - */ -proto.protocol.SetAccountIdContract.prototype.setAccountId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes owner_address = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.SetAccountIdContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes owner_address = 2; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.SetAccountIdContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.SetAccountIdContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.SetAccountIdContract} returns this - */ -proto.protocol.SetAccountIdContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.AccountPermissionUpdateContract.repeatedFields_ = [4]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.AccountPermissionUpdateContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.AccountPermissionUpdateContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.AccountPermissionUpdateContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.AccountPermissionUpdateContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - owner: (f = msg.getOwner()) && core_Tron_pb.Permission.toObject(includeInstance, f), - witness: (f = msg.getWitness()) && core_Tron_pb.Permission.toObject(includeInstance, f), - activesList: jspb.Message.toObjectList(msg.getActivesList(), - core_Tron_pb.Permission.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.AccountPermissionUpdateContract} - */ -proto.protocol.AccountPermissionUpdateContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.AccountPermissionUpdateContract; - return proto.protocol.AccountPermissionUpdateContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.AccountPermissionUpdateContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.AccountPermissionUpdateContract} - */ -proto.protocol.AccountPermissionUpdateContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = new core_Tron_pb.Permission; - reader.readMessage(value,core_Tron_pb.Permission.deserializeBinaryFromReader); - msg.setOwner(value); - break; - case 3: - var value = new core_Tron_pb.Permission; - reader.readMessage(value,core_Tron_pb.Permission.deserializeBinaryFromReader); - msg.setWitness(value); - break; - case 4: - var value = new core_Tron_pb.Permission; - reader.readMessage(value,core_Tron_pb.Permission.deserializeBinaryFromReader); - msg.addActives(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.AccountPermissionUpdateContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.AccountPermissionUpdateContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.AccountPermissionUpdateContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.AccountPermissionUpdateContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getOwner(); - if (f != null) { - writer.writeMessage( - 2, - f, - core_Tron_pb.Permission.serializeBinaryToWriter - ); - } - f = message.getWitness(); - if (f != null) { - writer.writeMessage( - 3, - f, - core_Tron_pb.Permission.serializeBinaryToWriter - ); - } - f = message.getActivesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 4, - f, - core_Tron_pb.Permission.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.AccountPermissionUpdateContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.AccountPermissionUpdateContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.AccountPermissionUpdateContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.AccountPermissionUpdateContract} returns this - */ -proto.protocol.AccountPermissionUpdateContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional Permission owner = 2; - * @return {?proto.protocol.Permission} - */ -proto.protocol.AccountPermissionUpdateContract.prototype.getOwner = function() { - return /** @type{?proto.protocol.Permission} */ ( - jspb.Message.getWrapperField(this, core_Tron_pb.Permission, 2)); -}; - - -/** - * @param {?proto.protocol.Permission|undefined} value - * @return {!proto.protocol.AccountPermissionUpdateContract} returns this -*/ -proto.protocol.AccountPermissionUpdateContract.prototype.setOwner = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.AccountPermissionUpdateContract} returns this - */ -proto.protocol.AccountPermissionUpdateContract.prototype.clearOwner = function() { - return this.setOwner(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.AccountPermissionUpdateContract.prototype.hasOwner = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional Permission witness = 3; - * @return {?proto.protocol.Permission} - */ -proto.protocol.AccountPermissionUpdateContract.prototype.getWitness = function() { - return /** @type{?proto.protocol.Permission} */ ( - jspb.Message.getWrapperField(this, core_Tron_pb.Permission, 3)); -}; - - -/** - * @param {?proto.protocol.Permission|undefined} value - * @return {!proto.protocol.AccountPermissionUpdateContract} returns this -*/ -proto.protocol.AccountPermissionUpdateContract.prototype.setWitness = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.AccountPermissionUpdateContract} returns this - */ -proto.protocol.AccountPermissionUpdateContract.prototype.clearWitness = function() { - return this.setWitness(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.AccountPermissionUpdateContract.prototype.hasWitness = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * repeated Permission actives = 4; - * @return {!Array} - */ -proto.protocol.AccountPermissionUpdateContract.prototype.getActivesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, core_Tron_pb.Permission, 4)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.AccountPermissionUpdateContract} returns this -*/ -proto.protocol.AccountPermissionUpdateContract.prototype.setActivesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); -}; - - -/** - * @param {!proto.protocol.Permission=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.Permission} - */ -proto.protocol.AccountPermissionUpdateContract.prototype.addActives = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.protocol.Permission, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.AccountPermissionUpdateContract} returns this - */ -proto.protocol.AccountPermissionUpdateContract.prototype.clearActivesList = function() { - return this.setActivesList([]); -}; - - -goog.object.extend(exports, proto.protocol); diff --git a/src/protocol/core/contract/asset_issue_contract_pb.js b/src/protocol/core/contract/asset_issue_contract_pb.js deleted file mode 100644 index 994b20f4..00000000 --- a/src/protocol/core/contract/asset_issue_contract_pb.js +++ /dev/null @@ -1,2196 +0,0 @@ -// source: core/contract/asset_issue_contract.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('@tronweb3/google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -goog.exportSymbol('proto.protocol.AssetIssueContract', null, global); -goog.exportSymbol('proto.protocol.AssetIssueContract.FrozenSupply', null, global); -goog.exportSymbol('proto.protocol.ParticipateAssetIssueContract', null, global); -goog.exportSymbol('proto.protocol.TransferAssetContract', null, global); -goog.exportSymbol('proto.protocol.UnfreezeAssetContract', null, global); -goog.exportSymbol('proto.protocol.UpdateAssetContract', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.AssetIssueContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.AssetIssueContract.repeatedFields_, null); -}; -goog.inherits(proto.protocol.AssetIssueContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.AssetIssueContract.displayName = 'proto.protocol.AssetIssueContract'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.AssetIssueContract.FrozenSupply = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.AssetIssueContract.FrozenSupply, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.AssetIssueContract.FrozenSupply.displayName = 'proto.protocol.AssetIssueContract.FrozenSupply'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.TransferAssetContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.TransferAssetContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.TransferAssetContract.displayName = 'proto.protocol.TransferAssetContract'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.UnfreezeAssetContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.UnfreezeAssetContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.UnfreezeAssetContract.displayName = 'proto.protocol.UnfreezeAssetContract'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.UpdateAssetContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.UpdateAssetContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.UpdateAssetContract.displayName = 'proto.protocol.UpdateAssetContract'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.ParticipateAssetIssueContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.ParticipateAssetIssueContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.ParticipateAssetIssueContract.displayName = 'proto.protocol.ParticipateAssetIssueContract'; -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.AssetIssueContract.repeatedFields_ = [5]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.AssetIssueContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.AssetIssueContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.AssetIssueContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.AssetIssueContract.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 41, ""), - ownerAddress: msg.getOwnerAddress_asB64(), - name: msg.getName_asB64(), - abbr: msg.getAbbr_asB64(), - totalSupply: jspb.Message.getFieldWithDefault(msg, 4, 0), - frozenSupplyList: jspb.Message.toObjectList(msg.getFrozenSupplyList(), - proto.protocol.AssetIssueContract.FrozenSupply.toObject, includeInstance), - trxNum: jspb.Message.getFieldWithDefault(msg, 6, 0), - precision: jspb.Message.getFieldWithDefault(msg, 7, 0), - num: jspb.Message.getFieldWithDefault(msg, 8, 0), - startTime: jspb.Message.getFieldWithDefault(msg, 9, 0), - endTime: jspb.Message.getFieldWithDefault(msg, 10, 0), - order: jspb.Message.getFieldWithDefault(msg, 11, 0), - voteScore: jspb.Message.getFieldWithDefault(msg, 16, 0), - description: msg.getDescription_asB64(), - url: msg.getUrl_asB64(), - freeAssetNetLimit: jspb.Message.getFieldWithDefault(msg, 22, 0), - publicFreeAssetNetLimit: jspb.Message.getFieldWithDefault(msg, 23, 0), - publicFreeAssetNetUsage: jspb.Message.getFieldWithDefault(msg, 24, 0), - publicLatestFreeNetTime: jspb.Message.getFieldWithDefault(msg, 25, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.AssetIssueContract} - */ -proto.protocol.AssetIssueContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.AssetIssueContract; - return proto.protocol.AssetIssueContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.AssetIssueContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.AssetIssueContract} - */ -proto.protocol.AssetIssueContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 41: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setName(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAbbr(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalSupply(value); - break; - case 5: - var value = new proto.protocol.AssetIssueContract.FrozenSupply; - reader.readMessage(value,proto.protocol.AssetIssueContract.FrozenSupply.deserializeBinaryFromReader); - msg.addFrozenSupply(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt32()); - msg.setTrxNum(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt32()); - msg.setPrecision(value); - break; - case 8: - var value = /** @type {number} */ (reader.readInt32()); - msg.setNum(value); - break; - case 9: - var value = /** @type {number} */ (reader.readInt64()); - msg.setStartTime(value); - break; - case 10: - var value = /** @type {number} */ (reader.readInt64()); - msg.setEndTime(value); - break; - case 11: - var value = /** @type {number} */ (reader.readInt64()); - msg.setOrder(value); - break; - case 16: - var value = /** @type {number} */ (reader.readInt32()); - msg.setVoteScore(value); - break; - case 20: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setDescription(value); - break; - case 21: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setUrl(value); - break; - case 22: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFreeAssetNetLimit(value); - break; - case 23: - var value = /** @type {number} */ (reader.readInt64()); - msg.setPublicFreeAssetNetLimit(value); - break; - case 24: - var value = /** @type {number} */ (reader.readInt64()); - msg.setPublicFreeAssetNetUsage(value); - break; - case 25: - var value = /** @type {number} */ (reader.readInt64()); - msg.setPublicLatestFreeNetTime(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.AssetIssueContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.AssetIssueContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.AssetIssueContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.AssetIssueContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 41, - f - ); - } - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getName_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getAbbr_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getTotalSupply(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getFrozenSupplyList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 5, - f, - proto.protocol.AssetIssueContract.FrozenSupply.serializeBinaryToWriter - ); - } - f = message.getTrxNum(); - if (f !== 0) { - writer.writeInt32( - 6, - f - ); - } - f = message.getPrecision(); - if (f !== 0) { - writer.writeInt32( - 7, - f - ); - } - f = message.getNum(); - if (f !== 0) { - writer.writeInt32( - 8, - f - ); - } - f = message.getStartTime(); - if (f !== 0) { - writer.writeInt64( - 9, - f - ); - } - f = message.getEndTime(); - if (f !== 0) { - writer.writeInt64( - 10, - f - ); - } - f = message.getOrder(); - if (f !== 0) { - writer.writeInt64( - 11, - f - ); - } - f = message.getVoteScore(); - if (f !== 0) { - writer.writeInt32( - 16, - f - ); - } - f = message.getDescription_asU8(); - if (f.length > 0) { - writer.writeBytes( - 20, - f - ); - } - f = message.getUrl_asU8(); - if (f.length > 0) { - writer.writeBytes( - 21, - f - ); - } - f = message.getFreeAssetNetLimit(); - if (f !== 0) { - writer.writeInt64( - 22, - f - ); - } - f = message.getPublicFreeAssetNetLimit(); - if (f !== 0) { - writer.writeInt64( - 23, - f - ); - } - f = message.getPublicFreeAssetNetUsage(); - if (f !== 0) { - writer.writeInt64( - 24, - f - ); - } - f = message.getPublicLatestFreeNetTime(); - if (f !== 0) { - writer.writeInt64( - 25, - f - ); - } -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.AssetIssueContract.FrozenSupply.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.AssetIssueContract.FrozenSupply.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.AssetIssueContract.FrozenSupply} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.AssetIssueContract.FrozenSupply.toObject = function(includeInstance, msg) { - var f, obj = { - frozenAmount: jspb.Message.getFieldWithDefault(msg, 1, 0), - frozenDays: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.AssetIssueContract.FrozenSupply} - */ -proto.protocol.AssetIssueContract.FrozenSupply.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.AssetIssueContract.FrozenSupply; - return proto.protocol.AssetIssueContract.FrozenSupply.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.AssetIssueContract.FrozenSupply} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.AssetIssueContract.FrozenSupply} - */ -proto.protocol.AssetIssueContract.FrozenSupply.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFrozenAmount(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFrozenDays(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.AssetIssueContract.FrozenSupply.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.AssetIssueContract.FrozenSupply.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.AssetIssueContract.FrozenSupply} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.AssetIssueContract.FrozenSupply.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFrozenAmount(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getFrozenDays(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } -}; - - -/** - * optional int64 frozen_amount = 1; - * @return {number} - */ -proto.protocol.AssetIssueContract.FrozenSupply.prototype.getFrozenAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.AssetIssueContract.FrozenSupply} returns this - */ -proto.protocol.AssetIssueContract.FrozenSupply.prototype.setFrozenAmount = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int64 frozen_days = 2; - * @return {number} - */ -proto.protocol.AssetIssueContract.FrozenSupply.prototype.getFrozenDays = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.AssetIssueContract.FrozenSupply} returns this - */ -proto.protocol.AssetIssueContract.FrozenSupply.prototype.setFrozenDays = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional string id = 41; - * @return {string} - */ -proto.protocol.AssetIssueContract.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 41, "")); -}; - - -/** - * @param {string} value - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 41, value); -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.AssetIssueContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.AssetIssueContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.AssetIssueContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes name = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.AssetIssueContract.prototype.getName = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes name = 2; - * This is a type-conversion wrapper around `getName()` - * @return {string} - */ -proto.protocol.AssetIssueContract.prototype.getName_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getName())); -}; - - -/** - * optional bytes name = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getName()` - * @return {!Uint8Array} - */ -proto.protocol.AssetIssueContract.prototype.getName_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getName())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setName = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional bytes abbr = 3; - * @return {!(string|Uint8Array)} - */ -proto.protocol.AssetIssueContract.prototype.getAbbr = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes abbr = 3; - * This is a type-conversion wrapper around `getAbbr()` - * @return {string} - */ -proto.protocol.AssetIssueContract.prototype.getAbbr_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAbbr())); -}; - - -/** - * optional bytes abbr = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAbbr()` - * @return {!Uint8Array} - */ -proto.protocol.AssetIssueContract.prototype.getAbbr_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAbbr())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setAbbr = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional int64 total_supply = 4; - * @return {number} - */ -proto.protocol.AssetIssueContract.prototype.getTotalSupply = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setTotalSupply = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * repeated FrozenSupply frozen_supply = 5; - * @return {!Array} - */ -proto.protocol.AssetIssueContract.prototype.getFrozenSupplyList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.AssetIssueContract.FrozenSupply, 5)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.AssetIssueContract} returns this -*/ -proto.protocol.AssetIssueContract.prototype.setFrozenSupplyList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 5, value); -}; - - -/** - * @param {!proto.protocol.AssetIssueContract.FrozenSupply=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.AssetIssueContract.FrozenSupply} - */ -proto.protocol.AssetIssueContract.prototype.addFrozenSupply = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.protocol.AssetIssueContract.FrozenSupply, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.clearFrozenSupplyList = function() { - return this.setFrozenSupplyList([]); -}; - - -/** - * optional int32 trx_num = 6; - * @return {number} - */ -proto.protocol.AssetIssueContract.prototype.getTrxNum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setTrxNum = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional int32 precision = 7; - * @return {number} - */ -proto.protocol.AssetIssueContract.prototype.getPrecision = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setPrecision = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional int32 num = 8; - * @return {number} - */ -proto.protocol.AssetIssueContract.prototype.getNum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setNum = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional int64 start_time = 9; - * @return {number} - */ -proto.protocol.AssetIssueContract.prototype.getStartTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setStartTime = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * optional int64 end_time = 10; - * @return {number} - */ -proto.protocol.AssetIssueContract.prototype.getEndTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setEndTime = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); -}; - - -/** - * optional int64 order = 11; - * @return {number} - */ -proto.protocol.AssetIssueContract.prototype.getOrder = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setOrder = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); -}; - - -/** - * optional int32 vote_score = 16; - * @return {number} - */ -proto.protocol.AssetIssueContract.prototype.getVoteScore = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setVoteScore = function(value) { - return jspb.Message.setProto3IntField(this, 16, value); -}; - - -/** - * optional bytes description = 20; - * @return {!(string|Uint8Array)} - */ -proto.protocol.AssetIssueContract.prototype.getDescription = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 20, "")); -}; - - -/** - * optional bytes description = 20; - * This is a type-conversion wrapper around `getDescription()` - * @return {string} - */ -proto.protocol.AssetIssueContract.prototype.getDescription_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getDescription())); -}; - - -/** - * optional bytes description = 20; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getDescription()` - * @return {!Uint8Array} - */ -proto.protocol.AssetIssueContract.prototype.getDescription_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getDescription())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setDescription = function(value) { - return jspb.Message.setProto3BytesField(this, 20, value); -}; - - -/** - * optional bytes url = 21; - * @return {!(string|Uint8Array)} - */ -proto.protocol.AssetIssueContract.prototype.getUrl = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 21, "")); -}; - - -/** - * optional bytes url = 21; - * This is a type-conversion wrapper around `getUrl()` - * @return {string} - */ -proto.protocol.AssetIssueContract.prototype.getUrl_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getUrl())); -}; - - -/** - * optional bytes url = 21; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getUrl()` - * @return {!Uint8Array} - */ -proto.protocol.AssetIssueContract.prototype.getUrl_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getUrl())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setUrl = function(value) { - return jspb.Message.setProto3BytesField(this, 21, value); -}; - - -/** - * optional int64 free_asset_net_limit = 22; - * @return {number} - */ -proto.protocol.AssetIssueContract.prototype.getFreeAssetNetLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 22, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setFreeAssetNetLimit = function(value) { - return jspb.Message.setProto3IntField(this, 22, value); -}; - - -/** - * optional int64 public_free_asset_net_limit = 23; - * @return {number} - */ -proto.protocol.AssetIssueContract.prototype.getPublicFreeAssetNetLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 23, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setPublicFreeAssetNetLimit = function(value) { - return jspb.Message.setProto3IntField(this, 23, value); -}; - - -/** - * optional int64 public_free_asset_net_usage = 24; - * @return {number} - */ -proto.protocol.AssetIssueContract.prototype.getPublicFreeAssetNetUsage = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 24, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setPublicFreeAssetNetUsage = function(value) { - return jspb.Message.setProto3IntField(this, 24, value); -}; - - -/** - * optional int64 public_latest_free_net_time = 25; - * @return {number} - */ -proto.protocol.AssetIssueContract.prototype.getPublicLatestFreeNetTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 25, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.AssetIssueContract} returns this - */ -proto.protocol.AssetIssueContract.prototype.setPublicLatestFreeNetTime = function(value) { - return jspb.Message.setProto3IntField(this, 25, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.TransferAssetContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.TransferAssetContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.TransferAssetContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.TransferAssetContract.toObject = function(includeInstance, msg) { - var f, obj = { - assetName: msg.getAssetName_asB64(), - ownerAddress: msg.getOwnerAddress_asB64(), - toAddress: msg.getToAddress_asB64(), - amount: jspb.Message.getFieldWithDefault(msg, 4, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.TransferAssetContract} - */ -proto.protocol.TransferAssetContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.TransferAssetContract; - return proto.protocol.TransferAssetContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.TransferAssetContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.TransferAssetContract} - */ -proto.protocol.TransferAssetContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAssetName(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setToAddress(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.TransferAssetContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.TransferAssetContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.TransferAssetContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.TransferAssetContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAssetName_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getToAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } -}; - - -/** - * optional bytes asset_name = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.TransferAssetContract.prototype.getAssetName = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes asset_name = 1; - * This is a type-conversion wrapper around `getAssetName()` - * @return {string} - */ -proto.protocol.TransferAssetContract.prototype.getAssetName_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAssetName())); -}; - - -/** - * optional bytes asset_name = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAssetName()` - * @return {!Uint8Array} - */ -proto.protocol.TransferAssetContract.prototype.getAssetName_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAssetName())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.TransferAssetContract} returns this - */ -proto.protocol.TransferAssetContract.prototype.setAssetName = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes owner_address = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.TransferAssetContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes owner_address = 2; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.TransferAssetContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.TransferAssetContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.TransferAssetContract} returns this - */ -proto.protocol.TransferAssetContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional bytes to_address = 3; - * @return {!(string|Uint8Array)} - */ -proto.protocol.TransferAssetContract.prototype.getToAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes to_address = 3; - * This is a type-conversion wrapper around `getToAddress()` - * @return {string} - */ -proto.protocol.TransferAssetContract.prototype.getToAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getToAddress())); -}; - - -/** - * optional bytes to_address = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getToAddress()` - * @return {!Uint8Array} - */ -proto.protocol.TransferAssetContract.prototype.getToAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getToAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.TransferAssetContract} returns this - */ -proto.protocol.TransferAssetContract.prototype.setToAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional int64 amount = 4; - * @return {number} - */ -proto.protocol.TransferAssetContract.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.TransferAssetContract} returns this - */ -proto.protocol.TransferAssetContract.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.UnfreezeAssetContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.UnfreezeAssetContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.UnfreezeAssetContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.UnfreezeAssetContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.UnfreezeAssetContract} - */ -proto.protocol.UnfreezeAssetContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.UnfreezeAssetContract; - return proto.protocol.UnfreezeAssetContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.UnfreezeAssetContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.UnfreezeAssetContract} - */ -proto.protocol.UnfreezeAssetContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.UnfreezeAssetContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.UnfreezeAssetContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.UnfreezeAssetContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.UnfreezeAssetContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.UnfreezeAssetContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.UnfreezeAssetContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.UnfreezeAssetContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.UnfreezeAssetContract} returns this - */ -proto.protocol.UnfreezeAssetContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.UpdateAssetContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.UpdateAssetContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.UpdateAssetContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.UpdateAssetContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - description: msg.getDescription_asB64(), - url: msg.getUrl_asB64(), - newLimit: jspb.Message.getFieldWithDefault(msg, 4, 0), - newPublicLimit: jspb.Message.getFieldWithDefault(msg, 5, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.UpdateAssetContract} - */ -proto.protocol.UpdateAssetContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.UpdateAssetContract; - return proto.protocol.UpdateAssetContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.UpdateAssetContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.UpdateAssetContract} - */ -proto.protocol.UpdateAssetContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setDescription(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setUrl(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setNewLimit(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setNewPublicLimit(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.UpdateAssetContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.UpdateAssetContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.UpdateAssetContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.UpdateAssetContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getDescription_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getUrl_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getNewLimit(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getNewPublicLimit(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.UpdateAssetContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.UpdateAssetContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.UpdateAssetContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.UpdateAssetContract} returns this - */ -proto.protocol.UpdateAssetContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes description = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.UpdateAssetContract.prototype.getDescription = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes description = 2; - * This is a type-conversion wrapper around `getDescription()` - * @return {string} - */ -proto.protocol.UpdateAssetContract.prototype.getDescription_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getDescription())); -}; - - -/** - * optional bytes description = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getDescription()` - * @return {!Uint8Array} - */ -proto.protocol.UpdateAssetContract.prototype.getDescription_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getDescription())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.UpdateAssetContract} returns this - */ -proto.protocol.UpdateAssetContract.prototype.setDescription = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional bytes url = 3; - * @return {!(string|Uint8Array)} - */ -proto.protocol.UpdateAssetContract.prototype.getUrl = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes url = 3; - * This is a type-conversion wrapper around `getUrl()` - * @return {string} - */ -proto.protocol.UpdateAssetContract.prototype.getUrl_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getUrl())); -}; - - -/** - * optional bytes url = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getUrl()` - * @return {!Uint8Array} - */ -proto.protocol.UpdateAssetContract.prototype.getUrl_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getUrl())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.UpdateAssetContract} returns this - */ -proto.protocol.UpdateAssetContract.prototype.setUrl = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional int64 new_limit = 4; - * @return {number} - */ -proto.protocol.UpdateAssetContract.prototype.getNewLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.UpdateAssetContract} returns this - */ -proto.protocol.UpdateAssetContract.prototype.setNewLimit = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional int64 new_public_limit = 5; - * @return {number} - */ -proto.protocol.UpdateAssetContract.prototype.getNewPublicLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.UpdateAssetContract} returns this - */ -proto.protocol.UpdateAssetContract.prototype.setNewPublicLimit = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.ParticipateAssetIssueContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.ParticipateAssetIssueContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.ParticipateAssetIssueContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.ParticipateAssetIssueContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - toAddress: msg.getToAddress_asB64(), - assetName: msg.getAssetName_asB64(), - amount: jspb.Message.getFieldWithDefault(msg, 4, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.ParticipateAssetIssueContract} - */ -proto.protocol.ParticipateAssetIssueContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.ParticipateAssetIssueContract; - return proto.protocol.ParticipateAssetIssueContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.ParticipateAssetIssueContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.ParticipateAssetIssueContract} - */ -proto.protocol.ParticipateAssetIssueContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setToAddress(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAssetName(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.ParticipateAssetIssueContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.ParticipateAssetIssueContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.ParticipateAssetIssueContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.ParticipateAssetIssueContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getToAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getAssetName_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.ParticipateAssetIssueContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.ParticipateAssetIssueContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.ParticipateAssetIssueContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.ParticipateAssetIssueContract} returns this - */ -proto.protocol.ParticipateAssetIssueContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes to_address = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.ParticipateAssetIssueContract.prototype.getToAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes to_address = 2; - * This is a type-conversion wrapper around `getToAddress()` - * @return {string} - */ -proto.protocol.ParticipateAssetIssueContract.prototype.getToAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getToAddress())); -}; - - -/** - * optional bytes to_address = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getToAddress()` - * @return {!Uint8Array} - */ -proto.protocol.ParticipateAssetIssueContract.prototype.getToAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getToAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.ParticipateAssetIssueContract} returns this - */ -proto.protocol.ParticipateAssetIssueContract.prototype.setToAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional bytes asset_name = 3; - * @return {!(string|Uint8Array)} - */ -proto.protocol.ParticipateAssetIssueContract.prototype.getAssetName = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes asset_name = 3; - * This is a type-conversion wrapper around `getAssetName()` - * @return {string} - */ -proto.protocol.ParticipateAssetIssueContract.prototype.getAssetName_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAssetName())); -}; - - -/** - * optional bytes asset_name = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAssetName()` - * @return {!Uint8Array} - */ -proto.protocol.ParticipateAssetIssueContract.prototype.getAssetName_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAssetName())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.ParticipateAssetIssueContract} returns this - */ -proto.protocol.ParticipateAssetIssueContract.prototype.setAssetName = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional int64 amount = 4; - * @return {number} - */ -proto.protocol.ParticipateAssetIssueContract.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.ParticipateAssetIssueContract} returns this - */ -proto.protocol.ParticipateAssetIssueContract.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -goog.object.extend(exports, proto.protocol); diff --git a/src/protocol/core/contract/balance_contract_pb.js b/src/protocol/core/contract/balance_contract_pb.js deleted file mode 100644 index 2c4dd3b0..00000000 --- a/src/protocol/core/contract/balance_contract_pb.js +++ /dev/null @@ -1,4086 +0,0 @@ -// source: core/contract/balance_contract.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('@tronweb3/google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -var core_contract_common_pb = require('../../core/contract/common_pb.js'); -goog.object.extend(proto, core_contract_common_pb); -goog.exportSymbol('proto.protocol.AccountBalanceRequest', null, global); -goog.exportSymbol('proto.protocol.AccountBalanceResponse', null, global); -goog.exportSymbol('proto.protocol.AccountIdentifier', null, global); -goog.exportSymbol('proto.protocol.AccountTrace', null, global); -goog.exportSymbol('proto.protocol.BlockBalanceTrace', null, global); -goog.exportSymbol('proto.protocol.BlockBalanceTrace.BlockIdentifier', null, global); -goog.exportSymbol('proto.protocol.DelegateResourceContract', null, global); -goog.exportSymbol('proto.protocol.FreezeBalanceContract', null, global); -goog.exportSymbol('proto.protocol.FreezeBalanceV2Contract', null, global); -goog.exportSymbol('proto.protocol.TransactionBalanceTrace', null, global); -goog.exportSymbol('proto.protocol.TransactionBalanceTrace.Operation', null, global); -goog.exportSymbol('proto.protocol.TransferContract', null, global); -goog.exportSymbol('proto.protocol.UnDelegateResourceContract', null, global); -goog.exportSymbol('proto.protocol.UnfreezeBalanceContract', null, global); -goog.exportSymbol('proto.protocol.UnfreezeBalanceV2Contract', null, global); -goog.exportSymbol('proto.protocol.WithdrawBalanceContract', null, global); -goog.exportSymbol('proto.protocol.WithdrawExpireUnfreezeContract', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.FreezeBalanceContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.FreezeBalanceContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.FreezeBalanceContract.displayName = 'proto.protocol.FreezeBalanceContract'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.UnfreezeBalanceContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.UnfreezeBalanceContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.UnfreezeBalanceContract.displayName = 'proto.protocol.UnfreezeBalanceContract'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.WithdrawBalanceContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.WithdrawBalanceContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.WithdrawBalanceContract.displayName = 'proto.protocol.WithdrawBalanceContract'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.TransferContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.TransferContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.TransferContract.displayName = 'proto.protocol.TransferContract'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.TransactionBalanceTrace = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.TransactionBalanceTrace.repeatedFields_, null); -}; -goog.inherits(proto.protocol.TransactionBalanceTrace, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.TransactionBalanceTrace.displayName = 'proto.protocol.TransactionBalanceTrace'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.TransactionBalanceTrace.Operation = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.TransactionBalanceTrace.Operation, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.TransactionBalanceTrace.Operation.displayName = 'proto.protocol.TransactionBalanceTrace.Operation'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.BlockBalanceTrace = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.BlockBalanceTrace.repeatedFields_, null); -}; -goog.inherits(proto.protocol.BlockBalanceTrace, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.BlockBalanceTrace.displayName = 'proto.protocol.BlockBalanceTrace'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.BlockBalanceTrace.BlockIdentifier = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.BlockBalanceTrace.BlockIdentifier, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.BlockBalanceTrace.BlockIdentifier.displayName = 'proto.protocol.BlockBalanceTrace.BlockIdentifier'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.AccountTrace = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.AccountTrace, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.AccountTrace.displayName = 'proto.protocol.AccountTrace'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.AccountIdentifier = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.AccountIdentifier, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.AccountIdentifier.displayName = 'proto.protocol.AccountIdentifier'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.AccountBalanceRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.AccountBalanceRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.AccountBalanceRequest.displayName = 'proto.protocol.AccountBalanceRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.AccountBalanceResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.AccountBalanceResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.AccountBalanceResponse.displayName = 'proto.protocol.AccountBalanceResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.FreezeBalanceV2Contract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.FreezeBalanceV2Contract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.FreezeBalanceV2Contract.displayName = 'proto.protocol.FreezeBalanceV2Contract'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.UnfreezeBalanceV2Contract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.UnfreezeBalanceV2Contract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.UnfreezeBalanceV2Contract.displayName = 'proto.protocol.UnfreezeBalanceV2Contract'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.WithdrawExpireUnfreezeContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.WithdrawExpireUnfreezeContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.WithdrawExpireUnfreezeContract.displayName = 'proto.protocol.WithdrawExpireUnfreezeContract'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.DelegateResourceContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.DelegateResourceContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.DelegateResourceContract.displayName = 'proto.protocol.DelegateResourceContract'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.UnDelegateResourceContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.UnDelegateResourceContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.UnDelegateResourceContract.displayName = 'proto.protocol.UnDelegateResourceContract'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.FreezeBalanceContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.FreezeBalanceContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.FreezeBalanceContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.FreezeBalanceContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - frozenBalance: jspb.Message.getFieldWithDefault(msg, 2, 0), - frozenDuration: jspb.Message.getFieldWithDefault(msg, 3, 0), - resource: jspb.Message.getFieldWithDefault(msg, 10, 0), - receiverAddress: msg.getReceiverAddress_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.FreezeBalanceContract} - */ -proto.protocol.FreezeBalanceContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.FreezeBalanceContract; - return proto.protocol.FreezeBalanceContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.FreezeBalanceContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.FreezeBalanceContract} - */ -proto.protocol.FreezeBalanceContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFrozenBalance(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFrozenDuration(value); - break; - case 10: - var value = /** @type {!proto.protocol.ResourceCode} */ (reader.readEnum()); - msg.setResource(value); - break; - case 15: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setReceiverAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.FreezeBalanceContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.FreezeBalanceContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.FreezeBalanceContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.FreezeBalanceContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getFrozenBalance(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getFrozenDuration(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getResource(); - if (f !== 0.0) { - writer.writeEnum( - 10, - f - ); - } - f = message.getReceiverAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 15, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.FreezeBalanceContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.FreezeBalanceContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.FreezeBalanceContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.FreezeBalanceContract} returns this - */ -proto.protocol.FreezeBalanceContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int64 frozen_balance = 2; - * @return {number} - */ -proto.protocol.FreezeBalanceContract.prototype.getFrozenBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.FreezeBalanceContract} returns this - */ -proto.protocol.FreezeBalanceContract.prototype.setFrozenBalance = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int64 frozen_duration = 3; - * @return {number} - */ -proto.protocol.FreezeBalanceContract.prototype.getFrozenDuration = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.FreezeBalanceContract} returns this - */ -proto.protocol.FreezeBalanceContract.prototype.setFrozenDuration = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional ResourceCode resource = 10; - * @return {!proto.protocol.ResourceCode} - */ -proto.protocol.FreezeBalanceContract.prototype.getResource = function() { - return /** @type {!proto.protocol.ResourceCode} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {!proto.protocol.ResourceCode} value - * @return {!proto.protocol.FreezeBalanceContract} returns this - */ -proto.protocol.FreezeBalanceContract.prototype.setResource = function(value) { - return jspb.Message.setProto3EnumField(this, 10, value); -}; - - -/** - * optional bytes receiver_address = 15; - * @return {!(string|Uint8Array)} - */ -proto.protocol.FreezeBalanceContract.prototype.getReceiverAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 15, "")); -}; - - -/** - * optional bytes receiver_address = 15; - * This is a type-conversion wrapper around `getReceiverAddress()` - * @return {string} - */ -proto.protocol.FreezeBalanceContract.prototype.getReceiverAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getReceiverAddress())); -}; - - -/** - * optional bytes receiver_address = 15; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getReceiverAddress()` - * @return {!Uint8Array} - */ -proto.protocol.FreezeBalanceContract.prototype.getReceiverAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getReceiverAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.FreezeBalanceContract} returns this - */ -proto.protocol.FreezeBalanceContract.prototype.setReceiverAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 15, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.UnfreezeBalanceContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.UnfreezeBalanceContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.UnfreezeBalanceContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.UnfreezeBalanceContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - resource: jspb.Message.getFieldWithDefault(msg, 10, 0), - receiverAddress: msg.getReceiverAddress_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.UnfreezeBalanceContract} - */ -proto.protocol.UnfreezeBalanceContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.UnfreezeBalanceContract; - return proto.protocol.UnfreezeBalanceContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.UnfreezeBalanceContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.UnfreezeBalanceContract} - */ -proto.protocol.UnfreezeBalanceContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 10: - var value = /** @type {!proto.protocol.ResourceCode} */ (reader.readEnum()); - msg.setResource(value); - break; - case 15: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setReceiverAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.UnfreezeBalanceContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.UnfreezeBalanceContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.UnfreezeBalanceContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.UnfreezeBalanceContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getResource(); - if (f !== 0.0) { - writer.writeEnum( - 10, - f - ); - } - f = message.getReceiverAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 15, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.UnfreezeBalanceContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.UnfreezeBalanceContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.UnfreezeBalanceContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.UnfreezeBalanceContract} returns this - */ -proto.protocol.UnfreezeBalanceContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional ResourceCode resource = 10; - * @return {!proto.protocol.ResourceCode} - */ -proto.protocol.UnfreezeBalanceContract.prototype.getResource = function() { - return /** @type {!proto.protocol.ResourceCode} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {!proto.protocol.ResourceCode} value - * @return {!proto.protocol.UnfreezeBalanceContract} returns this - */ -proto.protocol.UnfreezeBalanceContract.prototype.setResource = function(value) { - return jspb.Message.setProto3EnumField(this, 10, value); -}; - - -/** - * optional bytes receiver_address = 15; - * @return {!(string|Uint8Array)} - */ -proto.protocol.UnfreezeBalanceContract.prototype.getReceiverAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 15, "")); -}; - - -/** - * optional bytes receiver_address = 15; - * This is a type-conversion wrapper around `getReceiverAddress()` - * @return {string} - */ -proto.protocol.UnfreezeBalanceContract.prototype.getReceiverAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getReceiverAddress())); -}; - - -/** - * optional bytes receiver_address = 15; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getReceiverAddress()` - * @return {!Uint8Array} - */ -proto.protocol.UnfreezeBalanceContract.prototype.getReceiverAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getReceiverAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.UnfreezeBalanceContract} returns this - */ -proto.protocol.UnfreezeBalanceContract.prototype.setReceiverAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 15, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.WithdrawBalanceContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.WithdrawBalanceContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.WithdrawBalanceContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.WithdrawBalanceContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.WithdrawBalanceContract} - */ -proto.protocol.WithdrawBalanceContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.WithdrawBalanceContract; - return proto.protocol.WithdrawBalanceContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.WithdrawBalanceContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.WithdrawBalanceContract} - */ -proto.protocol.WithdrawBalanceContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.WithdrawBalanceContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.WithdrawBalanceContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.WithdrawBalanceContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.WithdrawBalanceContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.WithdrawBalanceContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.WithdrawBalanceContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.WithdrawBalanceContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.WithdrawBalanceContract} returns this - */ -proto.protocol.WithdrawBalanceContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.TransferContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.TransferContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.TransferContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.TransferContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - toAddress: msg.getToAddress_asB64(), - amount: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.TransferContract} - */ -proto.protocol.TransferContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.TransferContract; - return proto.protocol.TransferContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.TransferContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.TransferContract} - */ -proto.protocol.TransferContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setToAddress(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.TransferContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.TransferContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.TransferContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.TransferContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getToAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.TransferContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.TransferContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.TransferContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.TransferContract} returns this - */ -proto.protocol.TransferContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes to_address = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.TransferContract.prototype.getToAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes to_address = 2; - * This is a type-conversion wrapper around `getToAddress()` - * @return {string} - */ -proto.protocol.TransferContract.prototype.getToAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getToAddress())); -}; - - -/** - * optional bytes to_address = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getToAddress()` - * @return {!Uint8Array} - */ -proto.protocol.TransferContract.prototype.getToAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getToAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.TransferContract} returns this - */ -proto.protocol.TransferContract.prototype.setToAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional int64 amount = 3; - * @return {number} - */ -proto.protocol.TransferContract.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.TransferContract} returns this - */ -proto.protocol.TransferContract.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.TransactionBalanceTrace.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.TransactionBalanceTrace.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.TransactionBalanceTrace.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.TransactionBalanceTrace} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.TransactionBalanceTrace.toObject = function(includeInstance, msg) { - var f, obj = { - transactionIdentifier: msg.getTransactionIdentifier_asB64(), - operationList: jspb.Message.toObjectList(msg.getOperationList(), - proto.protocol.TransactionBalanceTrace.Operation.toObject, includeInstance), - type: jspb.Message.getFieldWithDefault(msg, 3, ""), - status: jspb.Message.getFieldWithDefault(msg, 4, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.TransactionBalanceTrace} - */ -proto.protocol.TransactionBalanceTrace.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.TransactionBalanceTrace; - return proto.protocol.TransactionBalanceTrace.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.TransactionBalanceTrace} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.TransactionBalanceTrace} - */ -proto.protocol.TransactionBalanceTrace.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTransactionIdentifier(value); - break; - case 2: - var value = new proto.protocol.TransactionBalanceTrace.Operation; - reader.readMessage(value,proto.protocol.TransactionBalanceTrace.Operation.deserializeBinaryFromReader); - msg.addOperation(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setType(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setStatus(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.TransactionBalanceTrace.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.TransactionBalanceTrace.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.TransactionBalanceTrace} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.TransactionBalanceTrace.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTransactionIdentifier_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getOperationList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.protocol.TransactionBalanceTrace.Operation.serializeBinaryToWriter - ); - } - f = message.getType(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getStatus(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.TransactionBalanceTrace.Operation.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.TransactionBalanceTrace.Operation.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.TransactionBalanceTrace.Operation} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.TransactionBalanceTrace.Operation.toObject = function(includeInstance, msg) { - var f, obj = { - operationIdentifier: jspb.Message.getFieldWithDefault(msg, 1, 0), - address: msg.getAddress_asB64(), - amount: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.TransactionBalanceTrace.Operation} - */ -proto.protocol.TransactionBalanceTrace.Operation.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.TransactionBalanceTrace.Operation; - return proto.protocol.TransactionBalanceTrace.Operation.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.TransactionBalanceTrace.Operation} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.TransactionBalanceTrace.Operation} - */ -proto.protocol.TransactionBalanceTrace.Operation.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setOperationIdentifier(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAddress(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.TransactionBalanceTrace.Operation.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.TransactionBalanceTrace.Operation.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.TransactionBalanceTrace.Operation} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.TransactionBalanceTrace.Operation.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOperationIdentifier(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } -}; - - -/** - * optional int64 operation_identifier = 1; - * @return {number} - */ -proto.protocol.TransactionBalanceTrace.Operation.prototype.getOperationIdentifier = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.TransactionBalanceTrace.Operation} returns this - */ -proto.protocol.TransactionBalanceTrace.Operation.prototype.setOperationIdentifier = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional bytes address = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.TransactionBalanceTrace.Operation.prototype.getAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes address = 2; - * This is a type-conversion wrapper around `getAddress()` - * @return {string} - */ -proto.protocol.TransactionBalanceTrace.Operation.prototype.getAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAddress())); -}; - - -/** - * optional bytes address = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAddress()` - * @return {!Uint8Array} - */ -proto.protocol.TransactionBalanceTrace.Operation.prototype.getAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.TransactionBalanceTrace.Operation} returns this - */ -proto.protocol.TransactionBalanceTrace.Operation.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional int64 amount = 3; - * @return {number} - */ -proto.protocol.TransactionBalanceTrace.Operation.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.TransactionBalanceTrace.Operation} returns this - */ -proto.protocol.TransactionBalanceTrace.Operation.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional bytes transaction_identifier = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.TransactionBalanceTrace.prototype.getTransactionIdentifier = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes transaction_identifier = 1; - * This is a type-conversion wrapper around `getTransactionIdentifier()` - * @return {string} - */ -proto.protocol.TransactionBalanceTrace.prototype.getTransactionIdentifier_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTransactionIdentifier())); -}; - - -/** - * optional bytes transaction_identifier = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTransactionIdentifier()` - * @return {!Uint8Array} - */ -proto.protocol.TransactionBalanceTrace.prototype.getTransactionIdentifier_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTransactionIdentifier())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.TransactionBalanceTrace} returns this - */ -proto.protocol.TransactionBalanceTrace.prototype.setTransactionIdentifier = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * repeated Operation operation = 2; - * @return {!Array} - */ -proto.protocol.TransactionBalanceTrace.prototype.getOperationList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.TransactionBalanceTrace.Operation, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.TransactionBalanceTrace} returns this -*/ -proto.protocol.TransactionBalanceTrace.prototype.setOperationList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.protocol.TransactionBalanceTrace.Operation=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.TransactionBalanceTrace.Operation} - */ -proto.protocol.TransactionBalanceTrace.prototype.addOperation = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.protocol.TransactionBalanceTrace.Operation, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.TransactionBalanceTrace} returns this - */ -proto.protocol.TransactionBalanceTrace.prototype.clearOperationList = function() { - return this.setOperationList([]); -}; - - -/** - * optional string type = 3; - * @return {string} - */ -proto.protocol.TransactionBalanceTrace.prototype.getType = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.protocol.TransactionBalanceTrace} returns this - */ -proto.protocol.TransactionBalanceTrace.prototype.setType = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string status = 4; - * @return {string} - */ -proto.protocol.TransactionBalanceTrace.prototype.getStatus = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.protocol.TransactionBalanceTrace} returns this - */ -proto.protocol.TransactionBalanceTrace.prototype.setStatus = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.BlockBalanceTrace.repeatedFields_ = [3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.BlockBalanceTrace.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.BlockBalanceTrace.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.BlockBalanceTrace} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.BlockBalanceTrace.toObject = function(includeInstance, msg) { - var f, obj = { - blockIdentifier: (f = msg.getBlockIdentifier()) && proto.protocol.BlockBalanceTrace.BlockIdentifier.toObject(includeInstance, f), - timestamp: jspb.Message.getFieldWithDefault(msg, 2, 0), - transactionBalanceTraceList: jspb.Message.toObjectList(msg.getTransactionBalanceTraceList(), - proto.protocol.TransactionBalanceTrace.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.BlockBalanceTrace} - */ -proto.protocol.BlockBalanceTrace.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.BlockBalanceTrace; - return proto.protocol.BlockBalanceTrace.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.BlockBalanceTrace} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.BlockBalanceTrace} - */ -proto.protocol.BlockBalanceTrace.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.protocol.BlockBalanceTrace.BlockIdentifier; - reader.readMessage(value,proto.protocol.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader); - msg.setBlockIdentifier(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTimestamp(value); - break; - case 3: - var value = new proto.protocol.TransactionBalanceTrace; - reader.readMessage(value,proto.protocol.TransactionBalanceTrace.deserializeBinaryFromReader); - msg.addTransactionBalanceTrace(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.BlockBalanceTrace.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.BlockBalanceTrace.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.BlockBalanceTrace} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.BlockBalanceTrace.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getBlockIdentifier(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.protocol.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter - ); - } - f = message.getTimestamp(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getTransactionBalanceTraceList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.protocol.TransactionBalanceTrace.serializeBinaryToWriter - ); - } -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.BlockBalanceTrace.BlockIdentifier.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.BlockBalanceTrace.BlockIdentifier.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.BlockBalanceTrace.BlockIdentifier} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.BlockBalanceTrace.BlockIdentifier.toObject = function(includeInstance, msg) { - var f, obj = { - hash: msg.getHash_asB64(), - number: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.BlockBalanceTrace.BlockIdentifier} - */ -proto.protocol.BlockBalanceTrace.BlockIdentifier.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.BlockBalanceTrace.BlockIdentifier; - return proto.protocol.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.BlockBalanceTrace.BlockIdentifier} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.BlockBalanceTrace.BlockIdentifier} - */ -proto.protocol.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setHash(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setNumber(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.BlockBalanceTrace.BlockIdentifier.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.BlockBalanceTrace.BlockIdentifier} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getNumber(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } -}; - - -/** - * optional bytes hash = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.BlockBalanceTrace.BlockIdentifier.prototype.getHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes hash = 1; - * This is a type-conversion wrapper around `getHash()` - * @return {string} - */ -proto.protocol.BlockBalanceTrace.BlockIdentifier.prototype.getHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getHash())); -}; - - -/** - * optional bytes hash = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getHash()` - * @return {!Uint8Array} - */ -proto.protocol.BlockBalanceTrace.BlockIdentifier.prototype.getHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.BlockBalanceTrace.BlockIdentifier} returns this - */ -proto.protocol.BlockBalanceTrace.BlockIdentifier.prototype.setHash = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int64 number = 2; - * @return {number} - */ -proto.protocol.BlockBalanceTrace.BlockIdentifier.prototype.getNumber = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.BlockBalanceTrace.BlockIdentifier} returns this - */ -proto.protocol.BlockBalanceTrace.BlockIdentifier.prototype.setNumber = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional BlockIdentifier block_identifier = 1; - * @return {?proto.protocol.BlockBalanceTrace.BlockIdentifier} - */ -proto.protocol.BlockBalanceTrace.prototype.getBlockIdentifier = function() { - return /** @type{?proto.protocol.BlockBalanceTrace.BlockIdentifier} */ ( - jspb.Message.getWrapperField(this, proto.protocol.BlockBalanceTrace.BlockIdentifier, 1)); -}; - - -/** - * @param {?proto.protocol.BlockBalanceTrace.BlockIdentifier|undefined} value - * @return {!proto.protocol.BlockBalanceTrace} returns this -*/ -proto.protocol.BlockBalanceTrace.prototype.setBlockIdentifier = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.BlockBalanceTrace} returns this - */ -proto.protocol.BlockBalanceTrace.prototype.clearBlockIdentifier = function() { - return this.setBlockIdentifier(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.BlockBalanceTrace.prototype.hasBlockIdentifier = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional int64 timestamp = 2; - * @return {number} - */ -proto.protocol.BlockBalanceTrace.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.BlockBalanceTrace} returns this - */ -proto.protocol.BlockBalanceTrace.prototype.setTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * repeated TransactionBalanceTrace transaction_balance_trace = 3; - * @return {!Array} - */ -proto.protocol.BlockBalanceTrace.prototype.getTransactionBalanceTraceList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.TransactionBalanceTrace, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.BlockBalanceTrace} returns this -*/ -proto.protocol.BlockBalanceTrace.prototype.setTransactionBalanceTraceList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.protocol.TransactionBalanceTrace=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.TransactionBalanceTrace} - */ -proto.protocol.BlockBalanceTrace.prototype.addTransactionBalanceTrace = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.protocol.TransactionBalanceTrace, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.BlockBalanceTrace} returns this - */ -proto.protocol.BlockBalanceTrace.prototype.clearTransactionBalanceTraceList = function() { - return this.setTransactionBalanceTraceList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.AccountTrace.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.AccountTrace.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.AccountTrace} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.AccountTrace.toObject = function(includeInstance, msg) { - var f, obj = { - balance: jspb.Message.getFieldWithDefault(msg, 1, 0), - placeholder: jspb.Message.getFieldWithDefault(msg, 99, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.AccountTrace} - */ -proto.protocol.AccountTrace.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.AccountTrace; - return proto.protocol.AccountTrace.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.AccountTrace} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.AccountTrace} - */ -proto.protocol.AccountTrace.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setBalance(value); - break; - case 99: - var value = /** @type {number} */ (reader.readInt64()); - msg.setPlaceholder(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.AccountTrace.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.AccountTrace.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.AccountTrace} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.AccountTrace.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getBalance(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getPlaceholder(); - if (f !== 0) { - writer.writeInt64( - 99, - f - ); - } -}; - - -/** - * optional int64 balance = 1; - * @return {number} - */ -proto.protocol.AccountTrace.prototype.getBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.AccountTrace} returns this - */ -proto.protocol.AccountTrace.prototype.setBalance = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int64 placeholder = 99; - * @return {number} - */ -proto.protocol.AccountTrace.prototype.getPlaceholder = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 99, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.AccountTrace} returns this - */ -proto.protocol.AccountTrace.prototype.setPlaceholder = function(value) { - return jspb.Message.setProto3IntField(this, 99, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.AccountIdentifier.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.AccountIdentifier.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.AccountIdentifier} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.AccountIdentifier.toObject = function(includeInstance, msg) { - var f, obj = { - address: msg.getAddress_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.AccountIdentifier} - */ -proto.protocol.AccountIdentifier.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.AccountIdentifier; - return proto.protocol.AccountIdentifier.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.AccountIdentifier} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.AccountIdentifier} - */ -proto.protocol.AccountIdentifier.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.AccountIdentifier.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.AccountIdentifier.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.AccountIdentifier} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.AccountIdentifier.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.AccountIdentifier.prototype.getAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes address = 1; - * This is a type-conversion wrapper around `getAddress()` - * @return {string} - */ -proto.protocol.AccountIdentifier.prototype.getAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAddress())); -}; - - -/** - * optional bytes address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAddress()` - * @return {!Uint8Array} - */ -proto.protocol.AccountIdentifier.prototype.getAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.AccountIdentifier} returns this - */ -proto.protocol.AccountIdentifier.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.AccountBalanceRequest.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.AccountBalanceRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.AccountBalanceRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.AccountBalanceRequest.toObject = function(includeInstance, msg) { - var f, obj = { - accountIdentifier: (f = msg.getAccountIdentifier()) && proto.protocol.AccountIdentifier.toObject(includeInstance, f), - blockIdentifier: (f = msg.getBlockIdentifier()) && proto.protocol.BlockBalanceTrace.BlockIdentifier.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.AccountBalanceRequest} - */ -proto.protocol.AccountBalanceRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.AccountBalanceRequest; - return proto.protocol.AccountBalanceRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.AccountBalanceRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.AccountBalanceRequest} - */ -proto.protocol.AccountBalanceRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.protocol.AccountIdentifier; - reader.readMessage(value,proto.protocol.AccountIdentifier.deserializeBinaryFromReader); - msg.setAccountIdentifier(value); - break; - case 2: - var value = new proto.protocol.BlockBalanceTrace.BlockIdentifier; - reader.readMessage(value,proto.protocol.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader); - msg.setBlockIdentifier(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.AccountBalanceRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.AccountBalanceRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.AccountBalanceRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.AccountBalanceRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAccountIdentifier(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.protocol.AccountIdentifier.serializeBinaryToWriter - ); - } - f = message.getBlockIdentifier(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.protocol.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter - ); - } -}; - - -/** - * optional AccountIdentifier account_identifier = 1; - * @return {?proto.protocol.AccountIdentifier} - */ -proto.protocol.AccountBalanceRequest.prototype.getAccountIdentifier = function() { - return /** @type{?proto.protocol.AccountIdentifier} */ ( - jspb.Message.getWrapperField(this, proto.protocol.AccountIdentifier, 1)); -}; - - -/** - * @param {?proto.protocol.AccountIdentifier|undefined} value - * @return {!proto.protocol.AccountBalanceRequest} returns this -*/ -proto.protocol.AccountBalanceRequest.prototype.setAccountIdentifier = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.AccountBalanceRequest} returns this - */ -proto.protocol.AccountBalanceRequest.prototype.clearAccountIdentifier = function() { - return this.setAccountIdentifier(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.AccountBalanceRequest.prototype.hasAccountIdentifier = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional BlockBalanceTrace.BlockIdentifier block_identifier = 2; - * @return {?proto.protocol.BlockBalanceTrace.BlockIdentifier} - */ -proto.protocol.AccountBalanceRequest.prototype.getBlockIdentifier = function() { - return /** @type{?proto.protocol.BlockBalanceTrace.BlockIdentifier} */ ( - jspb.Message.getWrapperField(this, proto.protocol.BlockBalanceTrace.BlockIdentifier, 2)); -}; - - -/** - * @param {?proto.protocol.BlockBalanceTrace.BlockIdentifier|undefined} value - * @return {!proto.protocol.AccountBalanceRequest} returns this -*/ -proto.protocol.AccountBalanceRequest.prototype.setBlockIdentifier = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.AccountBalanceRequest} returns this - */ -proto.protocol.AccountBalanceRequest.prototype.clearBlockIdentifier = function() { - return this.setBlockIdentifier(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.AccountBalanceRequest.prototype.hasBlockIdentifier = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.AccountBalanceResponse.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.AccountBalanceResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.AccountBalanceResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.AccountBalanceResponse.toObject = function(includeInstance, msg) { - var f, obj = { - balance: jspb.Message.getFieldWithDefault(msg, 1, 0), - blockIdentifier: (f = msg.getBlockIdentifier()) && proto.protocol.BlockBalanceTrace.BlockIdentifier.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.AccountBalanceResponse} - */ -proto.protocol.AccountBalanceResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.AccountBalanceResponse; - return proto.protocol.AccountBalanceResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.AccountBalanceResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.AccountBalanceResponse} - */ -proto.protocol.AccountBalanceResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setBalance(value); - break; - case 2: - var value = new proto.protocol.BlockBalanceTrace.BlockIdentifier; - reader.readMessage(value,proto.protocol.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader); - msg.setBlockIdentifier(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.AccountBalanceResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.AccountBalanceResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.AccountBalanceResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.AccountBalanceResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getBalance(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getBlockIdentifier(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.protocol.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter - ); - } -}; - - -/** - * optional int64 balance = 1; - * @return {number} - */ -proto.protocol.AccountBalanceResponse.prototype.getBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.AccountBalanceResponse} returns this - */ -proto.protocol.AccountBalanceResponse.prototype.setBalance = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional BlockBalanceTrace.BlockIdentifier block_identifier = 2; - * @return {?proto.protocol.BlockBalanceTrace.BlockIdentifier} - */ -proto.protocol.AccountBalanceResponse.prototype.getBlockIdentifier = function() { - return /** @type{?proto.protocol.BlockBalanceTrace.BlockIdentifier} */ ( - jspb.Message.getWrapperField(this, proto.protocol.BlockBalanceTrace.BlockIdentifier, 2)); -}; - - -/** - * @param {?proto.protocol.BlockBalanceTrace.BlockIdentifier|undefined} value - * @return {!proto.protocol.AccountBalanceResponse} returns this -*/ -proto.protocol.AccountBalanceResponse.prototype.setBlockIdentifier = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.AccountBalanceResponse} returns this - */ -proto.protocol.AccountBalanceResponse.prototype.clearBlockIdentifier = function() { - return this.setBlockIdentifier(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.AccountBalanceResponse.prototype.hasBlockIdentifier = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.FreezeBalanceV2Contract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.FreezeBalanceV2Contract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.FreezeBalanceV2Contract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.FreezeBalanceV2Contract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - frozenBalance: jspb.Message.getFieldWithDefault(msg, 2, 0), - resource: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.FreezeBalanceV2Contract} - */ -proto.protocol.FreezeBalanceV2Contract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.FreezeBalanceV2Contract; - return proto.protocol.FreezeBalanceV2Contract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.FreezeBalanceV2Contract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.FreezeBalanceV2Contract} - */ -proto.protocol.FreezeBalanceV2Contract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFrozenBalance(value); - break; - case 3: - var value = /** @type {!proto.protocol.ResourceCode} */ (reader.readEnum()); - msg.setResource(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.FreezeBalanceV2Contract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.FreezeBalanceV2Contract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.FreezeBalanceV2Contract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.FreezeBalanceV2Contract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getFrozenBalance(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getResource(); - if (f !== 0.0) { - writer.writeEnum( - 3, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.FreezeBalanceV2Contract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.FreezeBalanceV2Contract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.FreezeBalanceV2Contract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.FreezeBalanceV2Contract} returns this - */ -proto.protocol.FreezeBalanceV2Contract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int64 frozen_balance = 2; - * @return {number} - */ -proto.protocol.FreezeBalanceV2Contract.prototype.getFrozenBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.FreezeBalanceV2Contract} returns this - */ -proto.protocol.FreezeBalanceV2Contract.prototype.setFrozenBalance = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional ResourceCode resource = 3; - * @return {!proto.protocol.ResourceCode} - */ -proto.protocol.FreezeBalanceV2Contract.prototype.getResource = function() { - return /** @type {!proto.protocol.ResourceCode} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {!proto.protocol.ResourceCode} value - * @return {!proto.protocol.FreezeBalanceV2Contract} returns this - */ -proto.protocol.FreezeBalanceV2Contract.prototype.setResource = function(value) { - return jspb.Message.setProto3EnumField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.UnfreezeBalanceV2Contract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.UnfreezeBalanceV2Contract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.UnfreezeBalanceV2Contract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.UnfreezeBalanceV2Contract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - unfreezeBalance: jspb.Message.getFieldWithDefault(msg, 2, 0), - resource: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.UnfreezeBalanceV2Contract} - */ -proto.protocol.UnfreezeBalanceV2Contract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.UnfreezeBalanceV2Contract; - return proto.protocol.UnfreezeBalanceV2Contract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.UnfreezeBalanceV2Contract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.UnfreezeBalanceV2Contract} - */ -proto.protocol.UnfreezeBalanceV2Contract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setUnfreezeBalance(value); - break; - case 3: - var value = /** @type {!proto.protocol.ResourceCode} */ (reader.readEnum()); - msg.setResource(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.UnfreezeBalanceV2Contract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.UnfreezeBalanceV2Contract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.UnfreezeBalanceV2Contract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.UnfreezeBalanceV2Contract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getUnfreezeBalance(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getResource(); - if (f !== 0.0) { - writer.writeEnum( - 3, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.UnfreezeBalanceV2Contract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.UnfreezeBalanceV2Contract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.UnfreezeBalanceV2Contract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.UnfreezeBalanceV2Contract} returns this - */ -proto.protocol.UnfreezeBalanceV2Contract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int64 unfreeze_balance = 2; - * @return {number} - */ -proto.protocol.UnfreezeBalanceV2Contract.prototype.getUnfreezeBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.UnfreezeBalanceV2Contract} returns this - */ -proto.protocol.UnfreezeBalanceV2Contract.prototype.setUnfreezeBalance = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional ResourceCode resource = 3; - * @return {!proto.protocol.ResourceCode} - */ -proto.protocol.UnfreezeBalanceV2Contract.prototype.getResource = function() { - return /** @type {!proto.protocol.ResourceCode} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {!proto.protocol.ResourceCode} value - * @return {!proto.protocol.UnfreezeBalanceV2Contract} returns this - */ -proto.protocol.UnfreezeBalanceV2Contract.prototype.setResource = function(value) { - return jspb.Message.setProto3EnumField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.WithdrawExpireUnfreezeContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.WithdrawExpireUnfreezeContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.WithdrawExpireUnfreezeContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.WithdrawExpireUnfreezeContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.WithdrawExpireUnfreezeContract} - */ -proto.protocol.WithdrawExpireUnfreezeContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.WithdrawExpireUnfreezeContract; - return proto.protocol.WithdrawExpireUnfreezeContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.WithdrawExpireUnfreezeContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.WithdrawExpireUnfreezeContract} - */ -proto.protocol.WithdrawExpireUnfreezeContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.WithdrawExpireUnfreezeContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.WithdrawExpireUnfreezeContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.WithdrawExpireUnfreezeContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.WithdrawExpireUnfreezeContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.WithdrawExpireUnfreezeContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.WithdrawExpireUnfreezeContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.WithdrawExpireUnfreezeContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.WithdrawExpireUnfreezeContract} returns this - */ -proto.protocol.WithdrawExpireUnfreezeContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.DelegateResourceContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.DelegateResourceContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.DelegateResourceContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.DelegateResourceContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - resource: jspb.Message.getFieldWithDefault(msg, 2, 0), - balance: jspb.Message.getFieldWithDefault(msg, 3, 0), - receiverAddress: msg.getReceiverAddress_asB64(), - lock: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.DelegateResourceContract} - */ -proto.protocol.DelegateResourceContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.DelegateResourceContract; - return proto.protocol.DelegateResourceContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.DelegateResourceContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.DelegateResourceContract} - */ -proto.protocol.DelegateResourceContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = /** @type {!proto.protocol.ResourceCode} */ (reader.readEnum()); - msg.setResource(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setBalance(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setReceiverAddress(value); - break; - case 5: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setLock(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.DelegateResourceContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.DelegateResourceContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.DelegateResourceContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.DelegateResourceContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getResource(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } - f = message.getBalance(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getReceiverAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getLock(); - if (f) { - writer.writeBool( - 5, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.DelegateResourceContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.DelegateResourceContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.DelegateResourceContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.DelegateResourceContract} returns this - */ -proto.protocol.DelegateResourceContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional ResourceCode resource = 2; - * @return {!proto.protocol.ResourceCode} - */ -proto.protocol.DelegateResourceContract.prototype.getResource = function() { - return /** @type {!proto.protocol.ResourceCode} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.protocol.ResourceCode} value - * @return {!proto.protocol.DelegateResourceContract} returns this - */ -proto.protocol.DelegateResourceContract.prototype.setResource = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - -/** - * optional int64 balance = 3; - * @return {number} - */ -proto.protocol.DelegateResourceContract.prototype.getBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.DelegateResourceContract} returns this - */ -proto.protocol.DelegateResourceContract.prototype.setBalance = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional bytes receiver_address = 4; - * @return {!(string|Uint8Array)} - */ -proto.protocol.DelegateResourceContract.prototype.getReceiverAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes receiver_address = 4; - * This is a type-conversion wrapper around `getReceiverAddress()` - * @return {string} - */ -proto.protocol.DelegateResourceContract.prototype.getReceiverAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getReceiverAddress())); -}; - - -/** - * optional bytes receiver_address = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getReceiverAddress()` - * @return {!Uint8Array} - */ -proto.protocol.DelegateResourceContract.prototype.getReceiverAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getReceiverAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.DelegateResourceContract} returns this - */ -proto.protocol.DelegateResourceContract.prototype.setReceiverAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional bool lock = 5; - * @return {boolean} - */ -proto.protocol.DelegateResourceContract.prototype.getLock = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.protocol.DelegateResourceContract} returns this - */ -proto.protocol.DelegateResourceContract.prototype.setLock = function(value) { - return jspb.Message.setProto3BooleanField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.UnDelegateResourceContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.UnDelegateResourceContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.UnDelegateResourceContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.UnDelegateResourceContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - resource: jspb.Message.getFieldWithDefault(msg, 2, 0), - balance: jspb.Message.getFieldWithDefault(msg, 3, 0), - receiverAddress: msg.getReceiverAddress_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.UnDelegateResourceContract} - */ -proto.protocol.UnDelegateResourceContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.UnDelegateResourceContract; - return proto.protocol.UnDelegateResourceContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.UnDelegateResourceContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.UnDelegateResourceContract} - */ -proto.protocol.UnDelegateResourceContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = /** @type {!proto.protocol.ResourceCode} */ (reader.readEnum()); - msg.setResource(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setBalance(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setReceiverAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.UnDelegateResourceContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.UnDelegateResourceContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.UnDelegateResourceContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.UnDelegateResourceContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getResource(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } - f = message.getBalance(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getReceiverAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.UnDelegateResourceContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.UnDelegateResourceContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.UnDelegateResourceContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.UnDelegateResourceContract} returns this - */ -proto.protocol.UnDelegateResourceContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional ResourceCode resource = 2; - * @return {!proto.protocol.ResourceCode} - */ -proto.protocol.UnDelegateResourceContract.prototype.getResource = function() { - return /** @type {!proto.protocol.ResourceCode} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.protocol.ResourceCode} value - * @return {!proto.protocol.UnDelegateResourceContract} returns this - */ -proto.protocol.UnDelegateResourceContract.prototype.setResource = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - -/** - * optional int64 balance = 3; - * @return {number} - */ -proto.protocol.UnDelegateResourceContract.prototype.getBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.UnDelegateResourceContract} returns this - */ -proto.protocol.UnDelegateResourceContract.prototype.setBalance = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional bytes receiver_address = 4; - * @return {!(string|Uint8Array)} - */ -proto.protocol.UnDelegateResourceContract.prototype.getReceiverAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes receiver_address = 4; - * This is a type-conversion wrapper around `getReceiverAddress()` - * @return {string} - */ -proto.protocol.UnDelegateResourceContract.prototype.getReceiverAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getReceiverAddress())); -}; - - -/** - * optional bytes receiver_address = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getReceiverAddress()` - * @return {!Uint8Array} - */ -proto.protocol.UnDelegateResourceContract.prototype.getReceiverAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getReceiverAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.UnDelegateResourceContract} returns this - */ -proto.protocol.UnDelegateResourceContract.prototype.setReceiverAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -goog.object.extend(exports, proto.protocol); diff --git a/src/protocol/core/contract/common_pb.js b/src/protocol/core/contract/common_pb.js deleted file mode 100644 index 6d951b4a..00000000 --- a/src/protocol/core/contract/common_pb.js +++ /dev/null @@ -1,34 +0,0 @@ -// source: core/contract/common.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('@tronweb3/google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -goog.exportSymbol('proto.protocol.ResourceCode', null, global); -/** - * @enum {number} - */ -proto.protocol.ResourceCode = { - BANDWIDTH: 0, - ENERGY: 1, - TRON_POWER: 2 -}; - -goog.object.extend(exports, proto.protocol); diff --git a/src/protocol/core/contract/exchange_contract_pb.js b/src/protocol/core/contract/exchange_contract_pb.js deleted file mode 100644 index 883a719c..00000000 --- a/src/protocol/core/contract/exchange_contract_pb.js +++ /dev/null @@ -1,1268 +0,0 @@ -// source: core/contract/exchange_contract.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('@tronweb3/google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -goog.exportSymbol('proto.protocol.ExchangeCreateContract', null, global); -goog.exportSymbol('proto.protocol.ExchangeInjectContract', null, global); -goog.exportSymbol('proto.protocol.ExchangeTransactionContract', null, global); -goog.exportSymbol('proto.protocol.ExchangeWithdrawContract', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.ExchangeCreateContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.ExchangeCreateContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.ExchangeCreateContract.displayName = 'proto.protocol.ExchangeCreateContract'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.ExchangeInjectContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.ExchangeInjectContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.ExchangeInjectContract.displayName = 'proto.protocol.ExchangeInjectContract'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.ExchangeWithdrawContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.ExchangeWithdrawContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.ExchangeWithdrawContract.displayName = 'proto.protocol.ExchangeWithdrawContract'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.ExchangeTransactionContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.ExchangeTransactionContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.ExchangeTransactionContract.displayName = 'proto.protocol.ExchangeTransactionContract'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.ExchangeCreateContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.ExchangeCreateContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.ExchangeCreateContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.ExchangeCreateContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - firstTokenId: msg.getFirstTokenId_asB64(), - firstTokenBalance: jspb.Message.getFieldWithDefault(msg, 3, 0), - secondTokenId: msg.getSecondTokenId_asB64(), - secondTokenBalance: jspb.Message.getFieldWithDefault(msg, 5, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.ExchangeCreateContract} - */ -proto.protocol.ExchangeCreateContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.ExchangeCreateContract; - return proto.protocol.ExchangeCreateContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.ExchangeCreateContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.ExchangeCreateContract} - */ -proto.protocol.ExchangeCreateContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setFirstTokenId(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFirstTokenBalance(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSecondTokenId(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setSecondTokenBalance(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.ExchangeCreateContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.ExchangeCreateContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.ExchangeCreateContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.ExchangeCreateContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getFirstTokenId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getFirstTokenBalance(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getSecondTokenId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getSecondTokenBalance(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.ExchangeCreateContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.ExchangeCreateContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.ExchangeCreateContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.ExchangeCreateContract} returns this - */ -proto.protocol.ExchangeCreateContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes first_token_id = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.ExchangeCreateContract.prototype.getFirstTokenId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes first_token_id = 2; - * This is a type-conversion wrapper around `getFirstTokenId()` - * @return {string} - */ -proto.protocol.ExchangeCreateContract.prototype.getFirstTokenId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getFirstTokenId())); -}; - - -/** - * optional bytes first_token_id = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getFirstTokenId()` - * @return {!Uint8Array} - */ -proto.protocol.ExchangeCreateContract.prototype.getFirstTokenId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getFirstTokenId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.ExchangeCreateContract} returns this - */ -proto.protocol.ExchangeCreateContract.prototype.setFirstTokenId = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional int64 first_token_balance = 3; - * @return {number} - */ -proto.protocol.ExchangeCreateContract.prototype.getFirstTokenBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.ExchangeCreateContract} returns this - */ -proto.protocol.ExchangeCreateContract.prototype.setFirstTokenBalance = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional bytes second_token_id = 4; - * @return {!(string|Uint8Array)} - */ -proto.protocol.ExchangeCreateContract.prototype.getSecondTokenId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes second_token_id = 4; - * This is a type-conversion wrapper around `getSecondTokenId()` - * @return {string} - */ -proto.protocol.ExchangeCreateContract.prototype.getSecondTokenId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSecondTokenId())); -}; - - -/** - * optional bytes second_token_id = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSecondTokenId()` - * @return {!Uint8Array} - */ -proto.protocol.ExchangeCreateContract.prototype.getSecondTokenId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSecondTokenId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.ExchangeCreateContract} returns this - */ -proto.protocol.ExchangeCreateContract.prototype.setSecondTokenId = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional int64 second_token_balance = 5; - * @return {number} - */ -proto.protocol.ExchangeCreateContract.prototype.getSecondTokenBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.ExchangeCreateContract} returns this - */ -proto.protocol.ExchangeCreateContract.prototype.setSecondTokenBalance = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.ExchangeInjectContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.ExchangeInjectContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.ExchangeInjectContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.ExchangeInjectContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - exchangeId: jspb.Message.getFieldWithDefault(msg, 2, 0), - tokenId: msg.getTokenId_asB64(), - quant: jspb.Message.getFieldWithDefault(msg, 4, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.ExchangeInjectContract} - */ -proto.protocol.ExchangeInjectContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.ExchangeInjectContract; - return proto.protocol.ExchangeInjectContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.ExchangeInjectContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.ExchangeInjectContract} - */ -proto.protocol.ExchangeInjectContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExchangeId(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTokenId(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setQuant(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.ExchangeInjectContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.ExchangeInjectContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.ExchangeInjectContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.ExchangeInjectContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getExchangeId(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getTokenId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getQuant(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.ExchangeInjectContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.ExchangeInjectContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.ExchangeInjectContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.ExchangeInjectContract} returns this - */ -proto.protocol.ExchangeInjectContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int64 exchange_id = 2; - * @return {number} - */ -proto.protocol.ExchangeInjectContract.prototype.getExchangeId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.ExchangeInjectContract} returns this - */ -proto.protocol.ExchangeInjectContract.prototype.setExchangeId = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bytes token_id = 3; - * @return {!(string|Uint8Array)} - */ -proto.protocol.ExchangeInjectContract.prototype.getTokenId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes token_id = 3; - * This is a type-conversion wrapper around `getTokenId()` - * @return {string} - */ -proto.protocol.ExchangeInjectContract.prototype.getTokenId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTokenId())); -}; - - -/** - * optional bytes token_id = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTokenId()` - * @return {!Uint8Array} - */ -proto.protocol.ExchangeInjectContract.prototype.getTokenId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTokenId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.ExchangeInjectContract} returns this - */ -proto.protocol.ExchangeInjectContract.prototype.setTokenId = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional int64 quant = 4; - * @return {number} - */ -proto.protocol.ExchangeInjectContract.prototype.getQuant = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.ExchangeInjectContract} returns this - */ -proto.protocol.ExchangeInjectContract.prototype.setQuant = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.ExchangeWithdrawContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.ExchangeWithdrawContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.ExchangeWithdrawContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.ExchangeWithdrawContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - exchangeId: jspb.Message.getFieldWithDefault(msg, 2, 0), - tokenId: msg.getTokenId_asB64(), - quant: jspb.Message.getFieldWithDefault(msg, 4, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.ExchangeWithdrawContract} - */ -proto.protocol.ExchangeWithdrawContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.ExchangeWithdrawContract; - return proto.protocol.ExchangeWithdrawContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.ExchangeWithdrawContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.ExchangeWithdrawContract} - */ -proto.protocol.ExchangeWithdrawContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExchangeId(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTokenId(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setQuant(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.ExchangeWithdrawContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.ExchangeWithdrawContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.ExchangeWithdrawContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.ExchangeWithdrawContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getExchangeId(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getTokenId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getQuant(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.ExchangeWithdrawContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.ExchangeWithdrawContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.ExchangeWithdrawContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.ExchangeWithdrawContract} returns this - */ -proto.protocol.ExchangeWithdrawContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int64 exchange_id = 2; - * @return {number} - */ -proto.protocol.ExchangeWithdrawContract.prototype.getExchangeId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.ExchangeWithdrawContract} returns this - */ -proto.protocol.ExchangeWithdrawContract.prototype.setExchangeId = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bytes token_id = 3; - * @return {!(string|Uint8Array)} - */ -proto.protocol.ExchangeWithdrawContract.prototype.getTokenId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes token_id = 3; - * This is a type-conversion wrapper around `getTokenId()` - * @return {string} - */ -proto.protocol.ExchangeWithdrawContract.prototype.getTokenId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTokenId())); -}; - - -/** - * optional bytes token_id = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTokenId()` - * @return {!Uint8Array} - */ -proto.protocol.ExchangeWithdrawContract.prototype.getTokenId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTokenId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.ExchangeWithdrawContract} returns this - */ -proto.protocol.ExchangeWithdrawContract.prototype.setTokenId = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional int64 quant = 4; - * @return {number} - */ -proto.protocol.ExchangeWithdrawContract.prototype.getQuant = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.ExchangeWithdrawContract} returns this - */ -proto.protocol.ExchangeWithdrawContract.prototype.setQuant = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.ExchangeTransactionContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.ExchangeTransactionContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.ExchangeTransactionContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.ExchangeTransactionContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - exchangeId: jspb.Message.getFieldWithDefault(msg, 2, 0), - tokenId: msg.getTokenId_asB64(), - quant: jspb.Message.getFieldWithDefault(msg, 4, 0), - expected: jspb.Message.getFieldWithDefault(msg, 5, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.ExchangeTransactionContract} - */ -proto.protocol.ExchangeTransactionContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.ExchangeTransactionContract; - return proto.protocol.ExchangeTransactionContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.ExchangeTransactionContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.ExchangeTransactionContract} - */ -proto.protocol.ExchangeTransactionContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExchangeId(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTokenId(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setQuant(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExpected(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.ExchangeTransactionContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.ExchangeTransactionContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.ExchangeTransactionContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.ExchangeTransactionContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getExchangeId(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getTokenId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getQuant(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getExpected(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.ExchangeTransactionContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.ExchangeTransactionContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.ExchangeTransactionContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.ExchangeTransactionContract} returns this - */ -proto.protocol.ExchangeTransactionContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int64 exchange_id = 2; - * @return {number} - */ -proto.protocol.ExchangeTransactionContract.prototype.getExchangeId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.ExchangeTransactionContract} returns this - */ -proto.protocol.ExchangeTransactionContract.prototype.setExchangeId = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bytes token_id = 3; - * @return {!(string|Uint8Array)} - */ -proto.protocol.ExchangeTransactionContract.prototype.getTokenId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes token_id = 3; - * This is a type-conversion wrapper around `getTokenId()` - * @return {string} - */ -proto.protocol.ExchangeTransactionContract.prototype.getTokenId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTokenId())); -}; - - -/** - * optional bytes token_id = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTokenId()` - * @return {!Uint8Array} - */ -proto.protocol.ExchangeTransactionContract.prototype.getTokenId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTokenId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.ExchangeTransactionContract} returns this - */ -proto.protocol.ExchangeTransactionContract.prototype.setTokenId = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional int64 quant = 4; - * @return {number} - */ -proto.protocol.ExchangeTransactionContract.prototype.getQuant = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.ExchangeTransactionContract} returns this - */ -proto.protocol.ExchangeTransactionContract.prototype.setQuant = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional int64 expected = 5; - * @return {number} - */ -proto.protocol.ExchangeTransactionContract.prototype.getExpected = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.ExchangeTransactionContract} returns this - */ -proto.protocol.ExchangeTransactionContract.prototype.setExpected = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -goog.object.extend(exports, proto.protocol); diff --git a/src/protocol/core/contract/proposal_contract_pb.js b/src/protocol/core/contract/proposal_contract_pb.js deleted file mode 100644 index 38f3b3ec..00000000 --- a/src/protocol/core/contract/proposal_contract_pb.js +++ /dev/null @@ -1,675 +0,0 @@ -// source: core/contract/proposal_contract.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('@tronweb3/google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -goog.exportSymbol('proto.protocol.ProposalApproveContract', null, global); -goog.exportSymbol('proto.protocol.ProposalCreateContract', null, global); -goog.exportSymbol('proto.protocol.ProposalDeleteContract', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.ProposalApproveContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.ProposalApproveContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.ProposalApproveContract.displayName = 'proto.protocol.ProposalApproveContract'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.ProposalCreateContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.ProposalCreateContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.ProposalCreateContract.displayName = 'proto.protocol.ProposalCreateContract'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.ProposalDeleteContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.ProposalDeleteContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.ProposalDeleteContract.displayName = 'proto.protocol.ProposalDeleteContract'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.ProposalApproveContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.ProposalApproveContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.ProposalApproveContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.ProposalApproveContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - proposalId: jspb.Message.getFieldWithDefault(msg, 2, 0), - isAddApproval: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.ProposalApproveContract} - */ -proto.protocol.ProposalApproveContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.ProposalApproveContract; - return proto.protocol.ProposalApproveContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.ProposalApproveContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.ProposalApproveContract} - */ -proto.protocol.ProposalApproveContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setProposalId(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsAddApproval(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.ProposalApproveContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.ProposalApproveContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.ProposalApproveContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.ProposalApproveContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getProposalId(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getIsAddApproval(); - if (f) { - writer.writeBool( - 3, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.ProposalApproveContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.ProposalApproveContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.ProposalApproveContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.ProposalApproveContract} returns this - */ -proto.protocol.ProposalApproveContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int64 proposal_id = 2; - * @return {number} - */ -proto.protocol.ProposalApproveContract.prototype.getProposalId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.ProposalApproveContract} returns this - */ -proto.protocol.ProposalApproveContract.prototype.setProposalId = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bool is_add_approval = 3; - * @return {boolean} - */ -proto.protocol.ProposalApproveContract.prototype.getIsAddApproval = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.protocol.ProposalApproveContract} returns this - */ -proto.protocol.ProposalApproveContract.prototype.setIsAddApproval = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.ProposalCreateContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.ProposalCreateContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.ProposalCreateContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.ProposalCreateContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - parametersMap: (f = msg.getParametersMap()) ? f.toObject(includeInstance, undefined) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.ProposalCreateContract} - */ -proto.protocol.ProposalCreateContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.ProposalCreateContract; - return proto.protocol.ProposalCreateContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.ProposalCreateContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.ProposalCreateContract} - */ -proto.protocol.ProposalCreateContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = msg.getParametersMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readInt64, jspb.BinaryReader.prototype.readInt64, null, 0, 0); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.ProposalCreateContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.ProposalCreateContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.ProposalCreateContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.ProposalCreateContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getParametersMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeInt64, jspb.BinaryWriter.prototype.writeInt64); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.ProposalCreateContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.ProposalCreateContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.ProposalCreateContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.ProposalCreateContract} returns this - */ -proto.protocol.ProposalCreateContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * map parameters = 2; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.protocol.ProposalCreateContract.prototype.getParametersMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 2, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.protocol.ProposalCreateContract} returns this - */ -proto.protocol.ProposalCreateContract.prototype.clearParametersMap = function() { - this.getParametersMap().clear(); - return this;}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.ProposalDeleteContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.ProposalDeleteContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.ProposalDeleteContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.ProposalDeleteContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - proposalId: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.ProposalDeleteContract} - */ -proto.protocol.ProposalDeleteContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.ProposalDeleteContract; - return proto.protocol.ProposalDeleteContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.ProposalDeleteContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.ProposalDeleteContract} - */ -proto.protocol.ProposalDeleteContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setProposalId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.ProposalDeleteContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.ProposalDeleteContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.ProposalDeleteContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.ProposalDeleteContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getProposalId(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.ProposalDeleteContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.ProposalDeleteContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.ProposalDeleteContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.ProposalDeleteContract} returns this - */ -proto.protocol.ProposalDeleteContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int64 proposal_id = 2; - * @return {number} - */ -proto.protocol.ProposalDeleteContract.prototype.getProposalId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.ProposalDeleteContract} returns this - */ -proto.protocol.ProposalDeleteContract.prototype.setProposalId = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -goog.object.extend(exports, proto.protocol); diff --git a/src/protocol/core/contract/smart_contract_pb.js b/src/protocol/core/contract/smart_contract_pb.js deleted file mode 100644 index f0629fb8..00000000 --- a/src/protocol/core/contract/smart_contract_pb.js +++ /dev/null @@ -1,3060 +0,0 @@ -// source: core/contract/smart_contract.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('@tronweb3/google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -goog.exportSymbol('proto.protocol.ClearABIContract', null, global); -goog.exportSymbol('proto.protocol.CreateSmartContract', null, global); -goog.exportSymbol('proto.protocol.SmartContract', null, global); -goog.exportSymbol('proto.protocol.SmartContract.ABI', null, global); -goog.exportSymbol('proto.protocol.SmartContract.ABI.Entry', null, global); -goog.exportSymbol('proto.protocol.SmartContract.ABI.Entry.EntryType', null, global); -goog.exportSymbol('proto.protocol.SmartContract.ABI.Entry.Param', null, global); -goog.exportSymbol('proto.protocol.SmartContract.ABI.Entry.StateMutabilityType', null, global); -goog.exportSymbol('proto.protocol.SmartContractDataWrapper', null, global); -goog.exportSymbol('proto.protocol.TriggerSmartContract', null, global); -goog.exportSymbol('proto.protocol.UpdateEnergyLimitContract', null, global); -goog.exportSymbol('proto.protocol.UpdateSettingContract', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.SmartContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.SmartContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.SmartContract.displayName = 'proto.protocol.SmartContract'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.SmartContract.ABI = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.SmartContract.ABI.repeatedFields_, null); -}; -goog.inherits(proto.protocol.SmartContract.ABI, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.SmartContract.ABI.displayName = 'proto.protocol.SmartContract.ABI'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.SmartContract.ABI.Entry = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.SmartContract.ABI.Entry.repeatedFields_, null); -}; -goog.inherits(proto.protocol.SmartContract.ABI.Entry, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.SmartContract.ABI.Entry.displayName = 'proto.protocol.SmartContract.ABI.Entry'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.SmartContract.ABI.Entry.Param = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.SmartContract.ABI.Entry.Param, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.SmartContract.ABI.Entry.Param.displayName = 'proto.protocol.SmartContract.ABI.Entry.Param'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.CreateSmartContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.CreateSmartContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.CreateSmartContract.displayName = 'proto.protocol.CreateSmartContract'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.TriggerSmartContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.TriggerSmartContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.TriggerSmartContract.displayName = 'proto.protocol.TriggerSmartContract'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.ClearABIContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.ClearABIContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.ClearABIContract.displayName = 'proto.protocol.ClearABIContract'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.UpdateSettingContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.UpdateSettingContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.UpdateSettingContract.displayName = 'proto.protocol.UpdateSettingContract'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.UpdateEnergyLimitContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.UpdateEnergyLimitContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.UpdateEnergyLimitContract.displayName = 'proto.protocol.UpdateEnergyLimitContract'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.SmartContractDataWrapper = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.SmartContractDataWrapper, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.SmartContractDataWrapper.displayName = 'proto.protocol.SmartContractDataWrapper'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.SmartContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.SmartContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.SmartContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.SmartContract.toObject = function(includeInstance, msg) { - var f, obj = { - originAddress: msg.getOriginAddress_asB64(), - contractAddress: msg.getContractAddress_asB64(), - abi: (f = msg.getAbi()) && proto.protocol.SmartContract.ABI.toObject(includeInstance, f), - bytecode: msg.getBytecode_asB64(), - callValue: jspb.Message.getFieldWithDefault(msg, 5, 0), - consumeUserResourcePercent: jspb.Message.getFieldWithDefault(msg, 6, 0), - name: jspb.Message.getFieldWithDefault(msg, 7, ""), - originEnergyLimit: jspb.Message.getFieldWithDefault(msg, 8, 0), - codeHash: msg.getCodeHash_asB64(), - trxHash: msg.getTrxHash_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.SmartContract} - */ -proto.protocol.SmartContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.SmartContract; - return proto.protocol.SmartContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.SmartContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.SmartContract} - */ -proto.protocol.SmartContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOriginAddress(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setContractAddress(value); - break; - case 3: - var value = new proto.protocol.SmartContract.ABI; - reader.readMessage(value,proto.protocol.SmartContract.ABI.deserializeBinaryFromReader); - msg.setAbi(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setBytecode(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCallValue(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setConsumeUserResourcePercent(value); - break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 8: - var value = /** @type {number} */ (reader.readInt64()); - msg.setOriginEnergyLimit(value); - break; - case 9: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setCodeHash(value); - break; - case 10: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTrxHash(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.SmartContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.SmartContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.SmartContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.SmartContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOriginAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getContractAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getAbi(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.protocol.SmartContract.ABI.serializeBinaryToWriter - ); - } - f = message.getBytecode_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getCallValue(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getConsumeUserResourcePercent(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } - f = message.getOriginEnergyLimit(); - if (f !== 0) { - writer.writeInt64( - 8, - f - ); - } - f = message.getCodeHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 9, - f - ); - } - f = message.getTrxHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 10, - f - ); - } -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.SmartContract.ABI.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.SmartContract.ABI.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.SmartContract.ABI.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.SmartContract.ABI} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.SmartContract.ABI.toObject = function(includeInstance, msg) { - var f, obj = { - entrysList: jspb.Message.toObjectList(msg.getEntrysList(), - proto.protocol.SmartContract.ABI.Entry.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.SmartContract.ABI} - */ -proto.protocol.SmartContract.ABI.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.SmartContract.ABI; - return proto.protocol.SmartContract.ABI.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.SmartContract.ABI} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.SmartContract.ABI} - */ -proto.protocol.SmartContract.ABI.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.protocol.SmartContract.ABI.Entry; - reader.readMessage(value,proto.protocol.SmartContract.ABI.Entry.deserializeBinaryFromReader); - msg.addEntrys(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.SmartContract.ABI.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.SmartContract.ABI.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.SmartContract.ABI} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.SmartContract.ABI.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getEntrysList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.protocol.SmartContract.ABI.Entry.serializeBinaryToWriter - ); - } -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.SmartContract.ABI.Entry.repeatedFields_ = [4,5]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.SmartContract.ABI.Entry.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.SmartContract.ABI.Entry.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.SmartContract.ABI.Entry} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.SmartContract.ABI.Entry.toObject = function(includeInstance, msg) { - var f, obj = { - anonymous: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - constant: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - name: jspb.Message.getFieldWithDefault(msg, 3, ""), - inputsList: jspb.Message.toObjectList(msg.getInputsList(), - proto.protocol.SmartContract.ABI.Entry.Param.toObject, includeInstance), - outputsList: jspb.Message.toObjectList(msg.getOutputsList(), - proto.protocol.SmartContract.ABI.Entry.Param.toObject, includeInstance), - type: jspb.Message.getFieldWithDefault(msg, 6, 0), - payable: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), - statemutability: jspb.Message.getFieldWithDefault(msg, 8, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.SmartContract.ABI.Entry} - */ -proto.protocol.SmartContract.ABI.Entry.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.SmartContract.ABI.Entry; - return proto.protocol.SmartContract.ABI.Entry.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.SmartContract.ABI.Entry} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.SmartContract.ABI.Entry} - */ -proto.protocol.SmartContract.ABI.Entry.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setAnonymous(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setConstant(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 4: - var value = new proto.protocol.SmartContract.ABI.Entry.Param; - reader.readMessage(value,proto.protocol.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader); - msg.addInputs(value); - break; - case 5: - var value = new proto.protocol.SmartContract.ABI.Entry.Param; - reader.readMessage(value,proto.protocol.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader); - msg.addOutputs(value); - break; - case 6: - var value = /** @type {!proto.protocol.SmartContract.ABI.Entry.EntryType} */ (reader.readEnum()); - msg.setType(value); - break; - case 7: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPayable(value); - break; - case 8: - var value = /** @type {!proto.protocol.SmartContract.ABI.Entry.StateMutabilityType} */ (reader.readEnum()); - msg.setStatemutability(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.SmartContract.ABI.Entry.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.SmartContract.ABI.Entry.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.SmartContract.ABI.Entry} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.SmartContract.ABI.Entry.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAnonymous(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getConstant(); - if (f) { - writer.writeBool( - 2, - f - ); - } - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getInputsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 4, - f, - proto.protocol.SmartContract.ABI.Entry.Param.serializeBinaryToWriter - ); - } - f = message.getOutputsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 5, - f, - proto.protocol.SmartContract.ABI.Entry.Param.serializeBinaryToWriter - ); - } - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 6, - f - ); - } - f = message.getPayable(); - if (f) { - writer.writeBool( - 7, - f - ); - } - f = message.getStatemutability(); - if (f !== 0.0) { - writer.writeEnum( - 8, - f - ); - } -}; - - -/** - * @enum {number} - */ -proto.protocol.SmartContract.ABI.Entry.EntryType = { - UNKNOWNENTRYTYPE: 0, - CONSTRUCTOR: 1, - FUNCTION: 2, - EVENT: 3, - FALLBACK: 4, - RECEIVE: 5, - ERROR: 6 -}; - -/** - * @enum {number} - */ -proto.protocol.SmartContract.ABI.Entry.StateMutabilityType = { - UNKNOWNMUTABILITYTYPE: 0, - PURE: 1, - VIEW: 2, - NONPAYABLE: 3, - PAYABLE: 4 -}; - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.SmartContract.ABI.Entry.Param.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.SmartContract.ABI.Entry.Param.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.SmartContract.ABI.Entry.Param} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.SmartContract.ABI.Entry.Param.toObject = function(includeInstance, msg) { - var f, obj = { - indexed: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - name: jspb.Message.getFieldWithDefault(msg, 2, ""), - type: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.SmartContract.ABI.Entry.Param} - */ -proto.protocol.SmartContract.ABI.Entry.Param.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.SmartContract.ABI.Entry.Param; - return proto.protocol.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.SmartContract.ABI.Entry.Param} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.SmartContract.ABI.Entry.Param} - */ -proto.protocol.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIndexed(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setType(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.SmartContract.ABI.Entry.Param.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.SmartContract.ABI.Entry.Param.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.SmartContract.ABI.Entry.Param} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.SmartContract.ABI.Entry.Param.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getIndexed(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getType(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional bool indexed = 1; - * @return {boolean} - */ -proto.protocol.SmartContract.ABI.Entry.Param.prototype.getIndexed = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.protocol.SmartContract.ABI.Entry.Param} returns this - */ -proto.protocol.SmartContract.ABI.Entry.Param.prototype.setIndexed = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - -/** - * optional string name = 2; - * @return {string} - */ -proto.protocol.SmartContract.ABI.Entry.Param.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.protocol.SmartContract.ABI.Entry.Param} returns this - */ -proto.protocol.SmartContract.ABI.Entry.Param.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string type = 3; - * @return {string} - */ -proto.protocol.SmartContract.ABI.Entry.Param.prototype.getType = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.protocol.SmartContract.ABI.Entry.Param} returns this - */ -proto.protocol.SmartContract.ABI.Entry.Param.prototype.setType = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional bool anonymous = 1; - * @return {boolean} - */ -proto.protocol.SmartContract.ABI.Entry.prototype.getAnonymous = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.protocol.SmartContract.ABI.Entry} returns this - */ -proto.protocol.SmartContract.ABI.Entry.prototype.setAnonymous = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - -/** - * optional bool constant = 2; - * @return {boolean} - */ -proto.protocol.SmartContract.ABI.Entry.prototype.getConstant = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.protocol.SmartContract.ABI.Entry} returns this - */ -proto.protocol.SmartContract.ABI.Entry.prototype.setConstant = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - -/** - * optional string name = 3; - * @return {string} - */ -proto.protocol.SmartContract.ABI.Entry.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.protocol.SmartContract.ABI.Entry} returns this - */ -proto.protocol.SmartContract.ABI.Entry.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * repeated Param inputs = 4; - * @return {!Array} - */ -proto.protocol.SmartContract.ABI.Entry.prototype.getInputsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.SmartContract.ABI.Entry.Param, 4)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.SmartContract.ABI.Entry} returns this -*/ -proto.protocol.SmartContract.ABI.Entry.prototype.setInputsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); -}; - - -/** - * @param {!proto.protocol.SmartContract.ABI.Entry.Param=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.SmartContract.ABI.Entry.Param} - */ -proto.protocol.SmartContract.ABI.Entry.prototype.addInputs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.protocol.SmartContract.ABI.Entry.Param, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.SmartContract.ABI.Entry} returns this - */ -proto.protocol.SmartContract.ABI.Entry.prototype.clearInputsList = function() { - return this.setInputsList([]); -}; - - -/** - * repeated Param outputs = 5; - * @return {!Array} - */ -proto.protocol.SmartContract.ABI.Entry.prototype.getOutputsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.SmartContract.ABI.Entry.Param, 5)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.SmartContract.ABI.Entry} returns this -*/ -proto.protocol.SmartContract.ABI.Entry.prototype.setOutputsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 5, value); -}; - - -/** - * @param {!proto.protocol.SmartContract.ABI.Entry.Param=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.SmartContract.ABI.Entry.Param} - */ -proto.protocol.SmartContract.ABI.Entry.prototype.addOutputs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.protocol.SmartContract.ABI.Entry.Param, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.SmartContract.ABI.Entry} returns this - */ -proto.protocol.SmartContract.ABI.Entry.prototype.clearOutputsList = function() { - return this.setOutputsList([]); -}; - - -/** - * optional EntryType type = 6; - * @return {!proto.protocol.SmartContract.ABI.Entry.EntryType} - */ -proto.protocol.SmartContract.ABI.Entry.prototype.getType = function() { - return /** @type {!proto.protocol.SmartContract.ABI.Entry.EntryType} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {!proto.protocol.SmartContract.ABI.Entry.EntryType} value - * @return {!proto.protocol.SmartContract.ABI.Entry} returns this - */ -proto.protocol.SmartContract.ABI.Entry.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 6, value); -}; - - -/** - * optional bool payable = 7; - * @return {boolean} - */ -proto.protocol.SmartContract.ABI.Entry.prototype.getPayable = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.protocol.SmartContract.ABI.Entry} returns this - */ -proto.protocol.SmartContract.ABI.Entry.prototype.setPayable = function(value) { - return jspb.Message.setProto3BooleanField(this, 7, value); -}; - - -/** - * optional StateMutabilityType stateMutability = 8; - * @return {!proto.protocol.SmartContract.ABI.Entry.StateMutabilityType} - */ -proto.protocol.SmartContract.ABI.Entry.prototype.getStatemutability = function() { - return /** @type {!proto.protocol.SmartContract.ABI.Entry.StateMutabilityType} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {!proto.protocol.SmartContract.ABI.Entry.StateMutabilityType} value - * @return {!proto.protocol.SmartContract.ABI.Entry} returns this - */ -proto.protocol.SmartContract.ABI.Entry.prototype.setStatemutability = function(value) { - return jspb.Message.setProto3EnumField(this, 8, value); -}; - - -/** - * repeated Entry entrys = 1; - * @return {!Array} - */ -proto.protocol.SmartContract.ABI.prototype.getEntrysList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.SmartContract.ABI.Entry, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.SmartContract.ABI} returns this -*/ -proto.protocol.SmartContract.ABI.prototype.setEntrysList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.protocol.SmartContract.ABI.Entry=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.SmartContract.ABI.Entry} - */ -proto.protocol.SmartContract.ABI.prototype.addEntrys = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.protocol.SmartContract.ABI.Entry, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.SmartContract.ABI} returns this - */ -proto.protocol.SmartContract.ABI.prototype.clearEntrysList = function() { - return this.setEntrysList([]); -}; - - -/** - * optional bytes origin_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.SmartContract.prototype.getOriginAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes origin_address = 1; - * This is a type-conversion wrapper around `getOriginAddress()` - * @return {string} - */ -proto.protocol.SmartContract.prototype.getOriginAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOriginAddress())); -}; - - -/** - * optional bytes origin_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOriginAddress()` - * @return {!Uint8Array} - */ -proto.protocol.SmartContract.prototype.getOriginAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOriginAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.SmartContract} returns this - */ -proto.protocol.SmartContract.prototype.setOriginAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes contract_address = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.SmartContract.prototype.getContractAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes contract_address = 2; - * This is a type-conversion wrapper around `getContractAddress()` - * @return {string} - */ -proto.protocol.SmartContract.prototype.getContractAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getContractAddress())); -}; - - -/** - * optional bytes contract_address = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getContractAddress()` - * @return {!Uint8Array} - */ -proto.protocol.SmartContract.prototype.getContractAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getContractAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.SmartContract} returns this - */ -proto.protocol.SmartContract.prototype.setContractAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional ABI abi = 3; - * @return {?proto.protocol.SmartContract.ABI} - */ -proto.protocol.SmartContract.prototype.getAbi = function() { - return /** @type{?proto.protocol.SmartContract.ABI} */ ( - jspb.Message.getWrapperField(this, proto.protocol.SmartContract.ABI, 3)); -}; - - -/** - * @param {?proto.protocol.SmartContract.ABI|undefined} value - * @return {!proto.protocol.SmartContract} returns this -*/ -proto.protocol.SmartContract.prototype.setAbi = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.SmartContract} returns this - */ -proto.protocol.SmartContract.prototype.clearAbi = function() { - return this.setAbi(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.SmartContract.prototype.hasAbi = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional bytes bytecode = 4; - * @return {!(string|Uint8Array)} - */ -proto.protocol.SmartContract.prototype.getBytecode = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes bytecode = 4; - * This is a type-conversion wrapper around `getBytecode()` - * @return {string} - */ -proto.protocol.SmartContract.prototype.getBytecode_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBytecode())); -}; - - -/** - * optional bytes bytecode = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getBytecode()` - * @return {!Uint8Array} - */ -proto.protocol.SmartContract.prototype.getBytecode_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getBytecode())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.SmartContract} returns this - */ -proto.protocol.SmartContract.prototype.setBytecode = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional int64 call_value = 5; - * @return {number} - */ -proto.protocol.SmartContract.prototype.getCallValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.SmartContract} returns this - */ -proto.protocol.SmartContract.prototype.setCallValue = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 consume_user_resource_percent = 6; - * @return {number} - */ -proto.protocol.SmartContract.prototype.getConsumeUserResourcePercent = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.SmartContract} returns this - */ -proto.protocol.SmartContract.prototype.setConsumeUserResourcePercent = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional string name = 7; - * @return {string} - */ -proto.protocol.SmartContract.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * @param {string} value - * @return {!proto.protocol.SmartContract} returns this - */ -proto.protocol.SmartContract.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); -}; - - -/** - * optional int64 origin_energy_limit = 8; - * @return {number} - */ -proto.protocol.SmartContract.prototype.getOriginEnergyLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.SmartContract} returns this - */ -proto.protocol.SmartContract.prototype.setOriginEnergyLimit = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional bytes code_hash = 9; - * @return {!(string|Uint8Array)} - */ -proto.protocol.SmartContract.prototype.getCodeHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, "")); -}; - - -/** - * optional bytes code_hash = 9; - * This is a type-conversion wrapper around `getCodeHash()` - * @return {string} - */ -proto.protocol.SmartContract.prototype.getCodeHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getCodeHash())); -}; - - -/** - * optional bytes code_hash = 9; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getCodeHash()` - * @return {!Uint8Array} - */ -proto.protocol.SmartContract.prototype.getCodeHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getCodeHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.SmartContract} returns this - */ -proto.protocol.SmartContract.prototype.setCodeHash = function(value) { - return jspb.Message.setProto3BytesField(this, 9, value); -}; - - -/** - * optional bytes trx_hash = 10; - * @return {!(string|Uint8Array)} - */ -proto.protocol.SmartContract.prototype.getTrxHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, "")); -}; - - -/** - * optional bytes trx_hash = 10; - * This is a type-conversion wrapper around `getTrxHash()` - * @return {string} - */ -proto.protocol.SmartContract.prototype.getTrxHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTrxHash())); -}; - - -/** - * optional bytes trx_hash = 10; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTrxHash()` - * @return {!Uint8Array} - */ -proto.protocol.SmartContract.prototype.getTrxHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTrxHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.SmartContract} returns this - */ -proto.protocol.SmartContract.prototype.setTrxHash = function(value) { - return jspb.Message.setProto3BytesField(this, 10, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.CreateSmartContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.CreateSmartContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.CreateSmartContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.CreateSmartContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - newContract: (f = msg.getNewContract()) && proto.protocol.SmartContract.toObject(includeInstance, f), - callTokenValue: jspb.Message.getFieldWithDefault(msg, 3, 0), - tokenId: jspb.Message.getFieldWithDefault(msg, 4, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.CreateSmartContract} - */ -proto.protocol.CreateSmartContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.CreateSmartContract; - return proto.protocol.CreateSmartContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.CreateSmartContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.CreateSmartContract} - */ -proto.protocol.CreateSmartContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = new proto.protocol.SmartContract; - reader.readMessage(value,proto.protocol.SmartContract.deserializeBinaryFromReader); - msg.setNewContract(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCallTokenValue(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTokenId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.CreateSmartContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.CreateSmartContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.CreateSmartContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.CreateSmartContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getNewContract(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.protocol.SmartContract.serializeBinaryToWriter - ); - } - f = message.getCallTokenValue(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getTokenId(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.CreateSmartContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.CreateSmartContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.CreateSmartContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.CreateSmartContract} returns this - */ -proto.protocol.CreateSmartContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional SmartContract new_contract = 2; - * @return {?proto.protocol.SmartContract} - */ -proto.protocol.CreateSmartContract.prototype.getNewContract = function() { - return /** @type{?proto.protocol.SmartContract} */ ( - jspb.Message.getWrapperField(this, proto.protocol.SmartContract, 2)); -}; - - -/** - * @param {?proto.protocol.SmartContract|undefined} value - * @return {!proto.protocol.CreateSmartContract} returns this -*/ -proto.protocol.CreateSmartContract.prototype.setNewContract = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.CreateSmartContract} returns this - */ -proto.protocol.CreateSmartContract.prototype.clearNewContract = function() { - return this.setNewContract(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.CreateSmartContract.prototype.hasNewContract = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional int64 call_token_value = 3; - * @return {number} - */ -proto.protocol.CreateSmartContract.prototype.getCallTokenValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.CreateSmartContract} returns this - */ -proto.protocol.CreateSmartContract.prototype.setCallTokenValue = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int64 token_id = 4; - * @return {number} - */ -proto.protocol.CreateSmartContract.prototype.getTokenId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.CreateSmartContract} returns this - */ -proto.protocol.CreateSmartContract.prototype.setTokenId = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.TriggerSmartContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.TriggerSmartContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.TriggerSmartContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.TriggerSmartContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - contractAddress: msg.getContractAddress_asB64(), - callValue: jspb.Message.getFieldWithDefault(msg, 3, 0), - data: msg.getData_asB64(), - callTokenValue: jspb.Message.getFieldWithDefault(msg, 5, 0), - tokenId: jspb.Message.getFieldWithDefault(msg, 6, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.TriggerSmartContract} - */ -proto.protocol.TriggerSmartContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.TriggerSmartContract; - return proto.protocol.TriggerSmartContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.TriggerSmartContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.TriggerSmartContract} - */ -proto.protocol.TriggerSmartContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setContractAddress(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCallValue(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setData(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCallTokenValue(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTokenId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.TriggerSmartContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.TriggerSmartContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.TriggerSmartContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.TriggerSmartContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getContractAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getCallValue(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getData_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getCallTokenValue(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getTokenId(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.TriggerSmartContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.TriggerSmartContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.TriggerSmartContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.TriggerSmartContract} returns this - */ -proto.protocol.TriggerSmartContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes contract_address = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.TriggerSmartContract.prototype.getContractAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes contract_address = 2; - * This is a type-conversion wrapper around `getContractAddress()` - * @return {string} - */ -proto.protocol.TriggerSmartContract.prototype.getContractAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getContractAddress())); -}; - - -/** - * optional bytes contract_address = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getContractAddress()` - * @return {!Uint8Array} - */ -proto.protocol.TriggerSmartContract.prototype.getContractAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getContractAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.TriggerSmartContract} returns this - */ -proto.protocol.TriggerSmartContract.prototype.setContractAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional int64 call_value = 3; - * @return {number} - */ -proto.protocol.TriggerSmartContract.prototype.getCallValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.TriggerSmartContract} returns this - */ -proto.protocol.TriggerSmartContract.prototype.setCallValue = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional bytes data = 4; - * @return {!(string|Uint8Array)} - */ -proto.protocol.TriggerSmartContract.prototype.getData = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes data = 4; - * This is a type-conversion wrapper around `getData()` - * @return {string} - */ -proto.protocol.TriggerSmartContract.prototype.getData_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getData())); -}; - - -/** - * optional bytes data = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getData()` - * @return {!Uint8Array} - */ -proto.protocol.TriggerSmartContract.prototype.getData_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getData())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.TriggerSmartContract} returns this - */ -proto.protocol.TriggerSmartContract.prototype.setData = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional int64 call_token_value = 5; - * @return {number} - */ -proto.protocol.TriggerSmartContract.prototype.getCallTokenValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.TriggerSmartContract} returns this - */ -proto.protocol.TriggerSmartContract.prototype.setCallTokenValue = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 token_id = 6; - * @return {number} - */ -proto.protocol.TriggerSmartContract.prototype.getTokenId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.TriggerSmartContract} returns this - */ -proto.protocol.TriggerSmartContract.prototype.setTokenId = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.ClearABIContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.ClearABIContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.ClearABIContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.ClearABIContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - contractAddress: msg.getContractAddress_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.ClearABIContract} - */ -proto.protocol.ClearABIContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.ClearABIContract; - return proto.protocol.ClearABIContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.ClearABIContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.ClearABIContract} - */ -proto.protocol.ClearABIContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setContractAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.ClearABIContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.ClearABIContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.ClearABIContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.ClearABIContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getContractAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.ClearABIContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.ClearABIContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.ClearABIContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.ClearABIContract} returns this - */ -proto.protocol.ClearABIContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes contract_address = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.ClearABIContract.prototype.getContractAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes contract_address = 2; - * This is a type-conversion wrapper around `getContractAddress()` - * @return {string} - */ -proto.protocol.ClearABIContract.prototype.getContractAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getContractAddress())); -}; - - -/** - * optional bytes contract_address = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getContractAddress()` - * @return {!Uint8Array} - */ -proto.protocol.ClearABIContract.prototype.getContractAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getContractAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.ClearABIContract} returns this - */ -proto.protocol.ClearABIContract.prototype.setContractAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.UpdateSettingContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.UpdateSettingContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.UpdateSettingContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.UpdateSettingContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - contractAddress: msg.getContractAddress_asB64(), - consumeUserResourcePercent: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.UpdateSettingContract} - */ -proto.protocol.UpdateSettingContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.UpdateSettingContract; - return proto.protocol.UpdateSettingContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.UpdateSettingContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.UpdateSettingContract} - */ -proto.protocol.UpdateSettingContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setContractAddress(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setConsumeUserResourcePercent(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.UpdateSettingContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.UpdateSettingContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.UpdateSettingContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.UpdateSettingContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getContractAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getConsumeUserResourcePercent(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.UpdateSettingContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.UpdateSettingContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.UpdateSettingContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.UpdateSettingContract} returns this - */ -proto.protocol.UpdateSettingContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes contract_address = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.UpdateSettingContract.prototype.getContractAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes contract_address = 2; - * This is a type-conversion wrapper around `getContractAddress()` - * @return {string} - */ -proto.protocol.UpdateSettingContract.prototype.getContractAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getContractAddress())); -}; - - -/** - * optional bytes contract_address = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getContractAddress()` - * @return {!Uint8Array} - */ -proto.protocol.UpdateSettingContract.prototype.getContractAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getContractAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.UpdateSettingContract} returns this - */ -proto.protocol.UpdateSettingContract.prototype.setContractAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional int64 consume_user_resource_percent = 3; - * @return {number} - */ -proto.protocol.UpdateSettingContract.prototype.getConsumeUserResourcePercent = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.UpdateSettingContract} returns this - */ -proto.protocol.UpdateSettingContract.prototype.setConsumeUserResourcePercent = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.UpdateEnergyLimitContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.UpdateEnergyLimitContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.UpdateEnergyLimitContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.UpdateEnergyLimitContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - contractAddress: msg.getContractAddress_asB64(), - originEnergyLimit: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.UpdateEnergyLimitContract} - */ -proto.protocol.UpdateEnergyLimitContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.UpdateEnergyLimitContract; - return proto.protocol.UpdateEnergyLimitContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.UpdateEnergyLimitContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.UpdateEnergyLimitContract} - */ -proto.protocol.UpdateEnergyLimitContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setContractAddress(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setOriginEnergyLimit(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.UpdateEnergyLimitContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.UpdateEnergyLimitContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.UpdateEnergyLimitContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.UpdateEnergyLimitContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getContractAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getOriginEnergyLimit(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.UpdateEnergyLimitContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.UpdateEnergyLimitContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.UpdateEnergyLimitContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.UpdateEnergyLimitContract} returns this - */ -proto.protocol.UpdateEnergyLimitContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes contract_address = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.UpdateEnergyLimitContract.prototype.getContractAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes contract_address = 2; - * This is a type-conversion wrapper around `getContractAddress()` - * @return {string} - */ -proto.protocol.UpdateEnergyLimitContract.prototype.getContractAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getContractAddress())); -}; - - -/** - * optional bytes contract_address = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getContractAddress()` - * @return {!Uint8Array} - */ -proto.protocol.UpdateEnergyLimitContract.prototype.getContractAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getContractAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.UpdateEnergyLimitContract} returns this - */ -proto.protocol.UpdateEnergyLimitContract.prototype.setContractAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional int64 origin_energy_limit = 3; - * @return {number} - */ -proto.protocol.UpdateEnergyLimitContract.prototype.getOriginEnergyLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.UpdateEnergyLimitContract} returns this - */ -proto.protocol.UpdateEnergyLimitContract.prototype.setOriginEnergyLimit = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.SmartContractDataWrapper.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.SmartContractDataWrapper.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.SmartContractDataWrapper} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.SmartContractDataWrapper.toObject = function(includeInstance, msg) { - var f, obj = { - smartContract: (f = msg.getSmartContract()) && proto.protocol.SmartContract.toObject(includeInstance, f), - runtimecode: msg.getRuntimecode_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.SmartContractDataWrapper} - */ -proto.protocol.SmartContractDataWrapper.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.SmartContractDataWrapper; - return proto.protocol.SmartContractDataWrapper.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.SmartContractDataWrapper} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.SmartContractDataWrapper} - */ -proto.protocol.SmartContractDataWrapper.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.protocol.SmartContract; - reader.readMessage(value,proto.protocol.SmartContract.deserializeBinaryFromReader); - msg.setSmartContract(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRuntimecode(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.SmartContractDataWrapper.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.SmartContractDataWrapper.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.SmartContractDataWrapper} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.SmartContractDataWrapper.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSmartContract(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.protocol.SmartContract.serializeBinaryToWriter - ); - } - f = message.getRuntimecode_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional SmartContract smart_contract = 1; - * @return {?proto.protocol.SmartContract} - */ -proto.protocol.SmartContractDataWrapper.prototype.getSmartContract = function() { - return /** @type{?proto.protocol.SmartContract} */ ( - jspb.Message.getWrapperField(this, proto.protocol.SmartContract, 1)); -}; - - -/** - * @param {?proto.protocol.SmartContract|undefined} value - * @return {!proto.protocol.SmartContractDataWrapper} returns this -*/ -proto.protocol.SmartContractDataWrapper.prototype.setSmartContract = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.protocol.SmartContractDataWrapper} returns this - */ -proto.protocol.SmartContractDataWrapper.prototype.clearSmartContract = function() { - return this.setSmartContract(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.protocol.SmartContractDataWrapper.prototype.hasSmartContract = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes runtimecode = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.SmartContractDataWrapper.prototype.getRuntimecode = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes runtimecode = 2; - * This is a type-conversion wrapper around `getRuntimecode()` - * @return {string} - */ -proto.protocol.SmartContractDataWrapper.prototype.getRuntimecode_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRuntimecode())); -}; - - -/** - * optional bytes runtimecode = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRuntimecode()` - * @return {!Uint8Array} - */ -proto.protocol.SmartContractDataWrapper.prototype.getRuntimecode_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRuntimecode())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.SmartContractDataWrapper} returns this - */ -proto.protocol.SmartContractDataWrapper.prototype.setRuntimecode = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -goog.object.extend(exports, proto.protocol); diff --git a/src/protocol/core/contract/storage_contract_pb.js b/src/protocol/core/contract/storage_contract_pb.js deleted file mode 100644 index 5eb1ef0d..00000000 --- a/src/protocol/core/contract/storage_contract_pb.js +++ /dev/null @@ -1,848 +0,0 @@ -// source: core/contract/storage_contract.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('@tronweb3/google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -goog.exportSymbol('proto.protocol.BuyStorageBytesContract', null, global); -goog.exportSymbol('proto.protocol.BuyStorageContract', null, global); -goog.exportSymbol('proto.protocol.SellStorageContract', null, global); -goog.exportSymbol('proto.protocol.UpdateBrokerageContract', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.BuyStorageBytesContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.BuyStorageBytesContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.BuyStorageBytesContract.displayName = 'proto.protocol.BuyStorageBytesContract'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.BuyStorageContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.BuyStorageContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.BuyStorageContract.displayName = 'proto.protocol.BuyStorageContract'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.SellStorageContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.SellStorageContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.SellStorageContract.displayName = 'proto.protocol.SellStorageContract'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.UpdateBrokerageContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.UpdateBrokerageContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.UpdateBrokerageContract.displayName = 'proto.protocol.UpdateBrokerageContract'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.BuyStorageBytesContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.BuyStorageBytesContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.BuyStorageBytesContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.BuyStorageBytesContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - bytes: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.BuyStorageBytesContract} - */ -proto.protocol.BuyStorageBytesContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.BuyStorageBytesContract; - return proto.protocol.BuyStorageBytesContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.BuyStorageBytesContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.BuyStorageBytesContract} - */ -proto.protocol.BuyStorageBytesContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setBytes(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.BuyStorageBytesContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.BuyStorageBytesContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.BuyStorageBytesContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.BuyStorageBytesContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getBytes(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.BuyStorageBytesContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.BuyStorageBytesContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.BuyStorageBytesContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.BuyStorageBytesContract} returns this - */ -proto.protocol.BuyStorageBytesContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int64 bytes = 2; - * @return {number} - */ -proto.protocol.BuyStorageBytesContract.prototype.getBytes = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.BuyStorageBytesContract} returns this - */ -proto.protocol.BuyStorageBytesContract.prototype.setBytes = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.BuyStorageContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.BuyStorageContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.BuyStorageContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.BuyStorageContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - quant: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.BuyStorageContract} - */ -proto.protocol.BuyStorageContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.BuyStorageContract; - return proto.protocol.BuyStorageContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.BuyStorageContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.BuyStorageContract} - */ -proto.protocol.BuyStorageContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setQuant(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.BuyStorageContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.BuyStorageContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.BuyStorageContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.BuyStorageContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getQuant(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.BuyStorageContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.BuyStorageContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.BuyStorageContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.BuyStorageContract} returns this - */ -proto.protocol.BuyStorageContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int64 quant = 2; - * @return {number} - */ -proto.protocol.BuyStorageContract.prototype.getQuant = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.BuyStorageContract} returns this - */ -proto.protocol.BuyStorageContract.prototype.setQuant = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.SellStorageContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.SellStorageContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.SellStorageContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.SellStorageContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - storageBytes: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.SellStorageContract} - */ -proto.protocol.SellStorageContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.SellStorageContract; - return proto.protocol.SellStorageContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.SellStorageContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.SellStorageContract} - */ -proto.protocol.SellStorageContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setStorageBytes(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.SellStorageContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.SellStorageContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.SellStorageContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.SellStorageContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getStorageBytes(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.SellStorageContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.SellStorageContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.SellStorageContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.SellStorageContract} returns this - */ -proto.protocol.SellStorageContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int64 storage_bytes = 2; - * @return {number} - */ -proto.protocol.SellStorageContract.prototype.getStorageBytes = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.SellStorageContract} returns this - */ -proto.protocol.SellStorageContract.prototype.setStorageBytes = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.UpdateBrokerageContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.UpdateBrokerageContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.UpdateBrokerageContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.UpdateBrokerageContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - brokerage: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.UpdateBrokerageContract} - */ -proto.protocol.UpdateBrokerageContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.UpdateBrokerageContract; - return proto.protocol.UpdateBrokerageContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.UpdateBrokerageContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.UpdateBrokerageContract} - */ -proto.protocol.UpdateBrokerageContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setBrokerage(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.UpdateBrokerageContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.UpdateBrokerageContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.UpdateBrokerageContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.UpdateBrokerageContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getBrokerage(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.UpdateBrokerageContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.UpdateBrokerageContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.UpdateBrokerageContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.UpdateBrokerageContract} returns this - */ -proto.protocol.UpdateBrokerageContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int32 brokerage = 2; - * @return {number} - */ -proto.protocol.UpdateBrokerageContract.prototype.getBrokerage = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.UpdateBrokerageContract} returns this - */ -proto.protocol.UpdateBrokerageContract.prototype.setBrokerage = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -goog.object.extend(exports, proto.protocol); diff --git a/src/protocol/core/contract/vote_asset_contract_pb.js b/src/protocol/core/contract/vote_asset_contract_pb.js deleted file mode 100644 index 1945fde7..00000000 --- a/src/protocol/core/contract/vote_asset_contract_pb.js +++ /dev/null @@ -1,340 +0,0 @@ -// source: core/contract/vote_asset_contract.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('@tronweb3/google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -goog.exportSymbol('proto.protocol.VoteAssetContract', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.VoteAssetContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.VoteAssetContract.repeatedFields_, null); -}; -goog.inherits(proto.protocol.VoteAssetContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.VoteAssetContract.displayName = 'proto.protocol.VoteAssetContract'; -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.VoteAssetContract.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.VoteAssetContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.VoteAssetContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.VoteAssetContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.VoteAssetContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - voteAddressList: msg.getVoteAddressList_asB64(), - support: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), - count: jspb.Message.getFieldWithDefault(msg, 5, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.VoteAssetContract} - */ -proto.protocol.VoteAssetContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.VoteAssetContract; - return proto.protocol.VoteAssetContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.VoteAssetContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.VoteAssetContract} - */ -proto.protocol.VoteAssetContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addVoteAddress(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSupport(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt32()); - msg.setCount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.VoteAssetContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.VoteAssetContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.VoteAssetContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.VoteAssetContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getVoteAddressList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 2, - f - ); - } - f = message.getSupport(); - if (f) { - writer.writeBool( - 3, - f - ); - } - f = message.getCount(); - if (f !== 0) { - writer.writeInt32( - 5, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.VoteAssetContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.VoteAssetContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.VoteAssetContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.VoteAssetContract} returns this - */ -proto.protocol.VoteAssetContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * repeated bytes vote_address = 2; - * @return {!(Array|Array)} - */ -proto.protocol.VoteAssetContract.prototype.getVoteAddressList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 2)); -}; - - -/** - * repeated bytes vote_address = 2; - * This is a type-conversion wrapper around `getVoteAddressList()` - * @return {!Array} - */ -proto.protocol.VoteAssetContract.prototype.getVoteAddressList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getVoteAddressList())); -}; - - -/** - * repeated bytes vote_address = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getVoteAddressList()` - * @return {!Array} - */ -proto.protocol.VoteAssetContract.prototype.getVoteAddressList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getVoteAddressList())); -}; - - -/** - * @param {!(Array|Array)} value - * @return {!proto.protocol.VoteAssetContract} returns this - */ -proto.protocol.VoteAssetContract.prototype.setVoteAddressList = function(value) { - return jspb.Message.setField(this, 2, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.protocol.VoteAssetContract} returns this - */ -proto.protocol.VoteAssetContract.prototype.addVoteAddress = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.VoteAssetContract} returns this - */ -proto.protocol.VoteAssetContract.prototype.clearVoteAddressList = function() { - return this.setVoteAddressList([]); -}; - - -/** - * optional bool support = 3; - * @return {boolean} - */ -proto.protocol.VoteAssetContract.prototype.getSupport = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.protocol.VoteAssetContract} returns this - */ -proto.protocol.VoteAssetContract.prototype.setSupport = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - -/** - * optional int32 count = 5; - * @return {number} - */ -proto.protocol.VoteAssetContract.prototype.getCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.VoteAssetContract} returns this - */ -proto.protocol.VoteAssetContract.prototype.setCount = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -goog.object.extend(exports, proto.protocol); diff --git a/src/protocol/core/contract/witness_contract_pb.js b/src/protocol/core/contract/witness_contract_pb.js deleted file mode 100644 index 8d580ee3..00000000 --- a/src/protocol/core/contract/witness_contract_pb.js +++ /dev/null @@ -1,956 +0,0 @@ -// source: core/contract/witness_contract.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('@tronweb3/google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -goog.exportSymbol('proto.protocol.VoteWitnessContract', null, global); -goog.exportSymbol('proto.protocol.VoteWitnessContract.Vote', null, global); -goog.exportSymbol('proto.protocol.WitnessCreateContract', null, global); -goog.exportSymbol('proto.protocol.WitnessUpdateContract', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.WitnessCreateContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.WitnessCreateContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.WitnessCreateContract.displayName = 'proto.protocol.WitnessCreateContract'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.WitnessUpdateContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.WitnessUpdateContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.WitnessUpdateContract.displayName = 'proto.protocol.WitnessUpdateContract'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.VoteWitnessContract = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.VoteWitnessContract.repeatedFields_, null); -}; -goog.inherits(proto.protocol.VoteWitnessContract, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.VoteWitnessContract.displayName = 'proto.protocol.VoteWitnessContract'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.protocol.VoteWitnessContract.Vote = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.protocol.VoteWitnessContract.Vote, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.protocol.VoteWitnessContract.Vote.displayName = 'proto.protocol.VoteWitnessContract.Vote'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.WitnessCreateContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.WitnessCreateContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.WitnessCreateContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.WitnessCreateContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - url: msg.getUrl_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.WitnessCreateContract} - */ -proto.protocol.WitnessCreateContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.WitnessCreateContract; - return proto.protocol.WitnessCreateContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.WitnessCreateContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.WitnessCreateContract} - */ -proto.protocol.WitnessCreateContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setUrl(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.WitnessCreateContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.WitnessCreateContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.WitnessCreateContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.WitnessCreateContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getUrl_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.WitnessCreateContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.WitnessCreateContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.WitnessCreateContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.WitnessCreateContract} returns this - */ -proto.protocol.WitnessCreateContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes url = 2; - * @return {!(string|Uint8Array)} - */ -proto.protocol.WitnessCreateContract.prototype.getUrl = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes url = 2; - * This is a type-conversion wrapper around `getUrl()` - * @return {string} - */ -proto.protocol.WitnessCreateContract.prototype.getUrl_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getUrl())); -}; - - -/** - * optional bytes url = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getUrl()` - * @return {!Uint8Array} - */ -proto.protocol.WitnessCreateContract.prototype.getUrl_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getUrl())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.WitnessCreateContract} returns this - */ -proto.protocol.WitnessCreateContract.prototype.setUrl = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.WitnessUpdateContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.WitnessUpdateContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.WitnessUpdateContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.WitnessUpdateContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - updateUrl: msg.getUpdateUrl_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.WitnessUpdateContract} - */ -proto.protocol.WitnessUpdateContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.WitnessUpdateContract; - return proto.protocol.WitnessUpdateContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.WitnessUpdateContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.WitnessUpdateContract} - */ -proto.protocol.WitnessUpdateContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 12: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setUpdateUrl(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.WitnessUpdateContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.WitnessUpdateContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.WitnessUpdateContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.WitnessUpdateContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getUpdateUrl_asU8(); - if (f.length > 0) { - writer.writeBytes( - 12, - f - ); - } -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.WitnessUpdateContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.WitnessUpdateContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.WitnessUpdateContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.WitnessUpdateContract} returns this - */ -proto.protocol.WitnessUpdateContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes update_url = 12; - * @return {!(string|Uint8Array)} - */ -proto.protocol.WitnessUpdateContract.prototype.getUpdateUrl = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 12, "")); -}; - - -/** - * optional bytes update_url = 12; - * This is a type-conversion wrapper around `getUpdateUrl()` - * @return {string} - */ -proto.protocol.WitnessUpdateContract.prototype.getUpdateUrl_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getUpdateUrl())); -}; - - -/** - * optional bytes update_url = 12; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getUpdateUrl()` - * @return {!Uint8Array} - */ -proto.protocol.WitnessUpdateContract.prototype.getUpdateUrl_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getUpdateUrl())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.WitnessUpdateContract} returns this - */ -proto.protocol.WitnessUpdateContract.prototype.setUpdateUrl = function(value) { - return jspb.Message.setProto3BytesField(this, 12, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.protocol.VoteWitnessContract.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.VoteWitnessContract.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.VoteWitnessContract.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.VoteWitnessContract} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.VoteWitnessContract.toObject = function(includeInstance, msg) { - var f, obj = { - ownerAddress: msg.getOwnerAddress_asB64(), - votesList: jspb.Message.toObjectList(msg.getVotesList(), - proto.protocol.VoteWitnessContract.Vote.toObject, includeInstance), - support: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.VoteWitnessContract} - */ -proto.protocol.VoteWitnessContract.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.VoteWitnessContract; - return proto.protocol.VoteWitnessContract.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.VoteWitnessContract} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.VoteWitnessContract} - */ -proto.protocol.VoteWitnessContract.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOwnerAddress(value); - break; - case 2: - var value = new proto.protocol.VoteWitnessContract.Vote; - reader.readMessage(value,proto.protocol.VoteWitnessContract.Vote.deserializeBinaryFromReader); - msg.addVotes(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSupport(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.VoteWitnessContract.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.VoteWitnessContract.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.VoteWitnessContract} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.VoteWitnessContract.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOwnerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getVotesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.protocol.VoteWitnessContract.Vote.serializeBinaryToWriter - ); - } - f = message.getSupport(); - if (f) { - writer.writeBool( - 3, - f - ); - } -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.protocol.VoteWitnessContract.Vote.prototype.toObject = function(opt_includeInstance) { - return proto.protocol.VoteWitnessContract.Vote.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.protocol.VoteWitnessContract.Vote} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.VoteWitnessContract.Vote.toObject = function(includeInstance, msg) { - var f, obj = { - voteAddress: msg.getVoteAddress_asB64(), - voteCount: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.protocol.VoteWitnessContract.Vote} - */ -proto.protocol.VoteWitnessContract.Vote.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.protocol.VoteWitnessContract.Vote; - return proto.protocol.VoteWitnessContract.Vote.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.protocol.VoteWitnessContract.Vote} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.protocol.VoteWitnessContract.Vote} - */ -proto.protocol.VoteWitnessContract.Vote.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setVoteAddress(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setVoteCount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.protocol.VoteWitnessContract.Vote.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.protocol.VoteWitnessContract.Vote.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.protocol.VoteWitnessContract.Vote} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.protocol.VoteWitnessContract.Vote.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVoteAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getVoteCount(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } -}; - - -/** - * optional bytes vote_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.VoteWitnessContract.Vote.prototype.getVoteAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes vote_address = 1; - * This is a type-conversion wrapper around `getVoteAddress()` - * @return {string} - */ -proto.protocol.VoteWitnessContract.Vote.prototype.getVoteAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getVoteAddress())); -}; - - -/** - * optional bytes vote_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getVoteAddress()` - * @return {!Uint8Array} - */ -proto.protocol.VoteWitnessContract.Vote.prototype.getVoteAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getVoteAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.VoteWitnessContract.Vote} returns this - */ -proto.protocol.VoteWitnessContract.Vote.prototype.setVoteAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int64 vote_count = 2; - * @return {number} - */ -proto.protocol.VoteWitnessContract.Vote.prototype.getVoteCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.protocol.VoteWitnessContract.Vote} returns this - */ -proto.protocol.VoteWitnessContract.Vote.prototype.setVoteCount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bytes owner_address = 1; - * @return {!(string|Uint8Array)} - */ -proto.protocol.VoteWitnessContract.prototype.getOwnerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes owner_address = 1; - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {string} - */ -proto.protocol.VoteWitnessContract.prototype.getOwnerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOwnerAddress())); -}; - - -/** - * optional bytes owner_address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOwnerAddress()` - * @return {!Uint8Array} - */ -proto.protocol.VoteWitnessContract.prototype.getOwnerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOwnerAddress())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.protocol.VoteWitnessContract} returns this - */ -proto.protocol.VoteWitnessContract.prototype.setOwnerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * repeated Vote votes = 2; - * @return {!Array} - */ -proto.protocol.VoteWitnessContract.prototype.getVotesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.protocol.VoteWitnessContract.Vote, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.protocol.VoteWitnessContract} returns this -*/ -proto.protocol.VoteWitnessContract.prototype.setVotesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.protocol.VoteWitnessContract.Vote=} opt_value - * @param {number=} opt_index - * @return {!proto.protocol.VoteWitnessContract.Vote} - */ -proto.protocol.VoteWitnessContract.prototype.addVotes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.protocol.VoteWitnessContract.Vote, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.protocol.VoteWitnessContract} returns this - */ -proto.protocol.VoteWitnessContract.prototype.clearVotesList = function() { - return this.setVotesList([]); -}; - - -/** - * optional bool support = 3; - * @return {boolean} - */ -proto.protocol.VoteWitnessContract.prototype.getSupport = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.protocol.VoteWitnessContract} returns this - */ -proto.protocol.VoteWitnessContract.prototype.setSupport = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - -goog.object.extend(exports, proto.protocol); diff --git a/src/utils/abi.js b/src/utils/abi.js deleted file mode 100644 index 0b71e7e7..00000000 --- a/src/utils/abi.js +++ /dev/null @@ -1,267 +0,0 @@ -import { AbiCoder } from '@ethersproject/abi'; -import TronWeb from 'index'; -import {ADDRESS_PREFIX, ADDRESS_PREFIX_REGEX} from 'utils/address'; - -const abiCoder = new AbiCoder(); - -function _isArray(_array) { - return Array.isArray(_array); -} - -function _addressToHex(value) { - return TronWeb.address.toHex(value).replace(ADDRESS_PREFIX_REGEX, '0x'); -} - -function deepCopy(target) { - if ( - Object.prototype.toString.call(target) !== '[object Object]' && - Object.prototype.toString.call(target) !== '[object Array]' - ) { - return target; - } - const newTarget = _isArray(target) ? [] : {}; - - Object.keys(target).forEach(key => - newTarget[key] = target[key] instanceof Object && !target[key]._isBigNumber ? deepCopy(target[key]) : target[key] - ); - - return newTarget; -} - -export function decodeParams(names, types, output, ignoreMethodHash) { - if (!output || typeof output === 'boolean') { - ignoreMethodHash = output; - output = types; - types = names; - names = []; - } - - if (ignoreMethodHash && output.replace(/^0x/, '').length % 64 === 8) - output = '0x' + output.replace(/^0x/, '').substring(8); - - if (output.replace(/^0x/, '').length % 64) - throw new Error('The encoded string is not valid. Its length must be a multiple of 64.'); - - // workaround for unsupported trcToken type - types = types.map(type => { - if (/trcToken/.test(type)) { - type = type.replace(/trcToken/, 'uint256') - } - return type - }) - - return abiCoder.decode(types, output).reduce((obj, arg, index) => { - if (types[index] == 'address') - arg = ADDRESS_PREFIX + arg.substr(2).toLowerCase(); - - if (names.length) - obj[names[index]] = arg; - else obj.push(arg); - - return obj; - }, names.length ? {} : []); -} - -export function encodeParams(types, values) { - - for (let i = 0; i < types.length; i++) { - if (types[i] === 'address') { - values[i] = TronWeb.address.toHex(values[i]).replace(ADDRESS_PREFIX_REGEX, '0x'); - } - } - - return abiCoder.encode(types, values); -} - -function extractSize (type) { - const size = type.match(/([a-zA-Z0-9])(\[.*\])/); - return size ? size[2] : ''; -} - -function extractArrayDim (type) { - const size = extractSize(type) - return (size.match(/\]\[/g) || []).length + 1; -} - -export function encodeParamsV2ByABI(funABI, args) { - const types = []; - - const buildFullTypeDefinition = (typeDef) => { - if (typeDef && typeDef.type.indexOf('tuple') === 0 && typeDef.components) { - const innerTypes = typeDef.components.map((innerType) => { return buildFullTypeDefinition(innerType) }); - return `tuple(${innerTypes.join(',')})${extractSize(typeDef.type)}`; - } - - if (/trcToken/.test(typeDef.type)) - return typeDef.type.replace(/trcToken/, 'uint256'); - - return typeDef.type; - } - - const convertTypes = (types) => { - for (let i = 0; i < types.length; i++) { - const type = types[i]; - if (/trcToken/.test(type)) - types[i] = type.replace(/trcToken/, 'uint256'); - } - } - - const convertAddresses = addrArr => { - if (Array.isArray(addrArr)) { - addrArr.forEach((addrs, i) => { - addrArr[i] = convertAddresses(addrs); - }); - return addrArr; - } else { - return _addressToHex(addrArr) - } - }; - - const mapTuple = (components, args, dimension) => { - if (dimension > 1) { - if (args.length) { - args.forEach(arg => { - mapTuple(components, arg, dimension - 1); - }); - } - } else { - if (args.length && dimension) { - args.forEach(arg => { - encodeArgs(components, arg); - }); - } - } - }; - - const encodeArgs = (inputs = [], args) => { - if (inputs.length) - inputs.forEach((input, i) => { - const type = input.type; - - if (args[i]) - if (type === 'address') args[i] = _addressToHex(args[i]); - else if (type.match(/^([^\x5b]*)(\x5b|$)/)[0] === 'address[') - convertAddresses(args[i]) - else if (type.indexOf('tuple') === 0) - if (extractSize(type)) { - const dimension = extractArrayDim(type); - mapTuple(input.components, args[i], dimension); - } else encodeArgs(input.components, args[i]); - }); - }; - - if (funABI.inputs && funABI.inputs.length) { - for (let i = 0; i < funABI.inputs.length; i++) { - const type = funABI.inputs[i].type; - // "false" will be converting to `false` and "true" will be working - // fine as abiCoder assume anything in quotes as `true` - if (type === 'bool' && args[i] === 'false') { - args[i] = false; - } - types.push(type.indexOf('tuple') === 0 ? buildFullTypeDefinition(funABI.inputs[i]) : type); - if (args.length < types.length) { - args.push(''); - } - } - } - - encodeArgs(funABI.inputs, args); - convertTypes(types); - - return abiCoder.encode(types, args); -} - -export function decodeParamsV2ByABI(funABI, data) { - const convertTypeNames = (types) => { - for (let i = 0; i < types.length; i++) { - const type = types[i] - if (/^trcToken/.test(type)) - types[i] = type.replace(/^trcToken/, 'uint256') - } - } - - const convertAddresses = addrArr => { - if (Array.isArray(addrArr)) { - addrArr.forEach((addrs, i) => { - addrArr[i] = convertAddresses(addrs); - }); - return addrArr; - } else { - return TronWeb.address.toHex(addrArr) - } - }; - - const mapTuple = (components, args, dimension) => { - if (dimension > 1) { - if (args.length) { - args.forEach(arg => { - mapTuple(components, arg, dimension - 1); - }); - } - } else { - if (args.length && dimension) { - args.forEach(arg => { - decodeResult(components, arg); - }); - } - } - }; - - const buildFullTypeNameDefinition = (typeDef) => { - const name = typeDef.name ? ` ${typeDef.name}` : ''; - if (typeDef && typeDef.type.indexOf('tuple') === 0 && typeDef.components) { - const innerTypes = typeDef.components.map((innerType) => { return buildFullTypeNameDefinition(innerType) }); - return `tuple(${innerTypes.join(',')})${extractSize(typeDef.type)}${name}`; - } - if (/trcToken/.test(typeDef.type)) - return typeDef.type.replace(/trcToken/, 'uint256') + name; - - return typeDef.type + name; - } - - const decodeResult = (outputs = [], result) => { - if (outputs.length) - outputs.forEach((output, i) => { - const {type, name} = output; - - if (result[i]) - if (type === 'address') { - result[i] = TronWeb.address.toHex(result[i]); - if(name) result[name] = TronWeb.address.toHex(result[name]); - } - else if (type.match(/^([^\x5b]*)(\x5b|$)/)[0] === 'address[') { - convertAddresses(result[i]) - if(name) convertAddresses(result[name]) - } - else if (type.indexOf('tuple') === 0) { - if (extractSize(type)) { - const dimension = extractArrayDim(type); - mapTuple(output.components, result[i], dimension); - } else decodeResult(output.components, result[i]); - - if(name) result[name] = result[i]; - } - }); - }; - - // Only decode if there supposed to be fields - if (funABI.outputs && funABI.outputs.length > 0) { - - let outputTypes = []; - for (let i = 0; i < funABI.outputs.length; i++) { - const type = funABI.outputs[i].type; - const name = funABI.outputs[i].name ? ` ${funABI.outputs[i].name}` : ''; - outputTypes.push(type.indexOf('tuple') === 0 ? buildFullTypeNameDefinition(funABI.outputs[i]) : type + name); - } - convertTypeNames(outputTypes); - - if (!data || !data.length) data = new Uint8Array(32 * funABI.outputs.length); // ensuring the data is at least filled by 0 cause `AbiCoder` throws if there's not engouh data - // decode data - const decodeRes = abiCoder.decode(outputTypes, data); - const decodeResCopy = deepCopy(decodeRes); - decodeResult(funABI.outputs, decodeResCopy); - - return decodeResCopy - } - return []; -} \ No newline at end of file diff --git a/src/utils/accounts.js b/src/utils/accounts.js deleted file mode 100644 index 6ec50e56..00000000 --- a/src/utils/accounts.js +++ /dev/null @@ -1,71 +0,0 @@ -import {byteArray2hexStr} from './bytes'; -import { - getBase58CheckAddress, - genPriKey, - getAddressFromPriKey, - getPubKeyFromPriKey, - pkToAddress, -} from './crypto'; -import {ethersWallet, ethersHDNodeWallet, Mnemonic} from './ethersUtils' -import {TRON_BIP39_PATH_INDEX_0} from './address' -import utils from './index'; - -const INVALID_TRON_PATH_ERROR_MSG = 'Invalid tron path provided'; - -export function generateAccount() { - const priKeyBytes = genPriKey(); - const pubKeyBytes = getPubKeyFromPriKey(priKeyBytes); - const addressBytes = getAddressFromPriKey(priKeyBytes); - - const privateKey = byteArray2hexStr(priKeyBytes); - const publicKey = byteArray2hexStr(pubKeyBytes); - - return { - privateKey, - publicKey, - address: { - base58: getBase58CheckAddress(addressBytes), - hex: byteArray2hexStr(addressBytes) - } - } -} - -export function generateRandom(options) { - if(!utils.isObject(options)) { options = {}; } - if(!options.path) { - options.path = TRON_BIP39_PATH_INDEX_0; - } - if(!String(options.path).match(/^m\/44\'\/195\'/)) { - throw new Error(INVALID_TRON_PATH_ERROR_MSG); - } - - const account = ethersWallet.createRandom(options); - - const result = { - mnemonic: account.mnemonic, - privateKey: account.privateKey, - publicKey: account.signingKey.publicKey, - address: pkToAddress(account.privateKey.replace(/^0x/, '')) - } - - return result; -} - -export function generateAccountWithMnemonic(mnemonic, path, wordlist = null) { - if(!path) { - path = TRON_BIP39_PATH_INDEX_0; - } - if(!String(path).match(/^m\/44\'\/195\'/)) { - throw new Error(INVALID_TRON_PATH_ERROR_MSG); - } - const account = ethersHDNodeWallet.fromMnemonic(Mnemonic.fromPhrase(mnemonic, path, wordlist)); - - const result = { - mnemonic: account.mnemonic, - privateKey: account.privateKey, - publicKey: account.signingKey.publicKey, - address: pkToAddress(account.privateKey.replace(/^0x/, '')) - } - - return result; -} \ No newline at end of file diff --git a/src/utils/address.js b/src/utils/address.js deleted file mode 100644 index f7632fb8..00000000 --- a/src/utils/address.js +++ /dev/null @@ -1,7 +0,0 @@ -export const ADDRESS_SIZE = 34; -export const ADDRESS_PREFIX = "41"; -export const ADDRESS_PREFIX_BYTE = 0x41; -export const ADDRESS_PREFIX_REGEX = /^(41)/; - -export const TRON_BIP39_PATH_PREFIX = "m/44'/195'"; -export const TRON_BIP39_PATH_INDEX_0 = TRON_BIP39_PATH_PREFIX + "/0'/0/0"; \ No newline at end of file diff --git a/src/utils/base58.js b/src/utils/base58.js deleted file mode 100644 index e90b40d0..00000000 --- a/src/utils/base58.js +++ /dev/null @@ -1,80 +0,0 @@ -const ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'; -const ALPHABET_MAP = {}; - -for (let i = 0; i < ALPHABET.length; i++) - ALPHABET_MAP[ALPHABET.charAt(i)] = i; - -const BASE = 58; - -export function encode58(buffer) { - if (buffer.length === 0) - return ''; - - let i; - let j; - - const digits = [0]; - - for (i = 0; i < buffer.length; i++) { - for (j = 0; j < digits.length; j++) - digits[j] <<= 8; - - digits[0] += buffer[i]; - let carry = 0; - - for (j = 0; j < digits.length; ++j) { - digits[j] += carry; - carry = (digits[j] / BASE) | 0; - digits[j] %= BASE - } - - while (carry) { - digits.push(carry % BASE); - carry = (carry / BASE) | 0 - } - } - - for (i = 0; buffer[i] === 0 && i < buffer.length - 1; i++) - digits.push(0); - - return digits.reverse().map(digit => ALPHABET[digit]).join(''); -} - -export function decode58(string) { - if (string.length === 0) - return []; - - let i; - let j; - - const bytes = [0]; - - for (i = 0; i < string.length; i++) { - const c = string[i]; - - if (!(c in ALPHABET_MAP)) - throw new Error('Non-base58 character'); - - for (j = 0; j < bytes.length; j++) - bytes[j] *= BASE; - - bytes[0] += ALPHABET_MAP[c]; - let carry = 0; - - for (j = 0; j < bytes.length; ++j) { - bytes[j] += carry; - carry = bytes[j] >> 8; - bytes[j] &= 0xff; - } - - while (carry) { - bytes.push(carry & 0xff); - carry >>= 8; - } - } - - for (i = 0; string[i] === '1' && i < string.length - 1; i++) - bytes.push(0); - - return bytes.reverse(); -} diff --git a/src/utils/base64.js b/src/utils/base64.js deleted file mode 100644 index c69e0bc9..00000000 --- a/src/utils/base64.js +++ /dev/null @@ -1,208 +0,0 @@ -export function Base64() { - this._keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; - - this.encode = input => { - let output = ""; - let chr1; - let chr2; - let chr3; - let enc1; - let enc2; - let enc3; - let enc4; - let i = 0; - - while (i < input.length) { - chr1 = input.charCodeAt(i++); - chr2 = input.charCodeAt(i++); - chr3 = input.charCodeAt(i++); - - enc1 = chr1 >> 2; - enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); - enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); - enc4 = chr3 & 63; - - if (isNaN(chr2)) - enc3 = enc4 = 64; - else if (isNaN(chr3)) - enc4 = 64; - - output = output + - this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) + - this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4); - } - - return output; - } - - this.encodeIgnoreUtf8 = inputBytes => { - let output = ""; - let chr1; - let chr2; - let chr3; - let enc1; - let enc2; - let enc3; - let enc4; - let i = 0; - - while (i < inputBytes.length) { - chr1 = inputBytes[i++]; - chr2 = inputBytes[i++]; - chr3 = inputBytes[i++]; - - enc1 = chr1 >> 2; - enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); - enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); - enc4 = chr3 & 63; - - if (isNaN(chr2)) - enc3 = enc4 = 64; - else if (isNaN(chr3)) - enc4 = 64; - - output = output + - this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) + - this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4); - } - - return output; - } - - this.decode = input => { - let output = ""; - let chr1; - let chr2; - let chr3; - let enc1; - let enc2; - let enc3; - let enc4; - let i = 0; - - input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); - - while (i < input.length) { - enc1 = this._keyStr.indexOf(input.charAt(i++)); - enc2 = this._keyStr.indexOf(input.charAt(i++)); - enc3 = this._keyStr.indexOf(input.charAt(i++)); - enc4 = this._keyStr.indexOf(input.charAt(i++)); - - chr1 = (enc1 << 2) | (enc2 >> 4); - chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); - chr3 = ((enc3 & 3) << 6) | enc4; - - output = output + String.fromCharCode(chr1); - - if (enc3 != 64) - output = output + String.fromCharCode(chr2); - - if (enc4 != 64) - output = output + String.fromCharCode(chr3); - } - - return this._utf8_decode(output); - } - - this.decodeToByteArray = input => { - let output = ""; - let chr1; - let chr2; - let chr3; - let enc1; - let enc2; - let enc3; - let enc4; - let i = 0; - - input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); - - while (i < input.length) { - enc1 = this._keyStr.indexOf(input.charAt(i++)); - enc2 = this._keyStr.indexOf(input.charAt(i++)); - enc3 = this._keyStr.indexOf(input.charAt(i++)); - enc4 = this._keyStr.indexOf(input.charAt(i++)); - - chr1 = (enc1 << 2) | (enc2 >> 4); - chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); - chr3 = ((enc3 & 3) << 6) | enc4; - - output = output + String.fromCharCode(chr1); - - if (enc3 != 64) - output = output + String.fromCharCode(chr2); - - if (enc4 != 64) - output = output + String.fromCharCode(chr3); - } - - return this._out2ByteArray(output); - } - - this._out2ByteArray = utftext => { - const byteArray = new Array(utftext.length); - - let i = 0; - let c = 0; - - while (i < utftext.length) { - c = utftext.charCodeAt(i); - byteArray[i] = c; - i++; - } - - return byteArray; - } - - this._utf8_encode = string => { - string = string.replace(/\r\n/g, "\n"); - let utftext = ""; - - for (let n = 0; n < string.length; n++) { - const c = string.charCodeAt(n); - - if (c < 128) { - utftext += String.fromCharCode(c); - } else if ((c > 127) && (c < 2048)) { - utftext += String.fromCharCode((c >> 6) | 192); - utftext += String.fromCharCode((c & 63) | 128); - } else { - utftext += String.fromCharCode((c >> 12) | 224); - utftext += String.fromCharCode(((c >> 6) & 63) | 128); - utftext += String.fromCharCode((c & 63) | 128); - } - } - - return utftext; - } - - this._utf8_decode = utftext => { - let string = ""; - let i = 0; - let c = 0; - let c2 = 0; - let c3 = 0; - - while (i < utftext.length) { - c = utftext.charCodeAt(i); - - if (c < 128) { - string += String.fromCharCode(c); - i++; - } else if ((c > 191) && (c < 224)) { - c2 = utftext.charCodeAt(i + 1); - string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); - i += 2; - } else { - c2 = utftext.charCodeAt(i + 1); - c3 = utftext.charCodeAt(i + 2); - - string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); - - i += 3; - } - } - - return string; - } -} diff --git a/src/utils/bytes.js b/src/utils/bytes.js deleted file mode 100644 index 40318dd7..00000000 --- a/src/utils/bytes.js +++ /dev/null @@ -1,77 +0,0 @@ -import {Base64} from './base64'; - -export function byte2hexStr(byte) { - if (typeof byte !== 'number') - throw new Error('Input must be a number'); - - if (byte < 0 || byte > 255) - throw new Error('Input must be a byte'); - - const hexByteMap = '0123456789ABCDEF'; - - let str = ''; - str += hexByteMap.charAt(byte >> 4); - str += hexByteMap.charAt(byte & 0x0f); - - return str; -} - -export function bytesToString(arr) { - if (typeof arr === 'string') - return arr; - - let str = ''; - - for (let i = 0; i < arr.length; i++) { - const one = arr[i].toString(2); - const v = one.match(/^1+?(?=0)/); - - if (v && one.length === 8) { - const bytesLength = v[0].length; - let store = arr[i].toString(2).slice(7 - bytesLength); - - for (let st = 1; st < bytesLength; st++) - store += arr[st + i].toString(2).slice(2); - - str += String.fromCharCode(parseInt(store, 2)); - i += bytesLength - 1; - } else { - str += String.fromCharCode(arr[i]); - } - } - - return str; -} - -export function hextoString(hex) { - const arr = hex.replace(/^0x/, '').split(''); - let out = ''; - - for (let i = 0; i < arr.length / 2; i++) { - let tmp = `0x${arr[i * 2]}${arr[i * 2 + 1]}`; - out += String.fromCharCode(tmp); - } - - return out; -} - -export function byteArray2hexStr(byteArray) { - let str = ''; - - for (let i = 0; i < (byteArray.length); i++) - str += byte2hexStr(byteArray[i]); - - return str; -} - -export function base64DecodeFromString(string64) { - return new Base64().decodeToByteArray(string64); -} - -export function base64EncodeToString(bytes) { - const b = new Base64(); - const string64 = b.encodeIgnoreUtf8(bytes); - - return string64 -} - diff --git a/src/utils/code.js b/src/utils/code.js deleted file mode 100644 index 497069b8..00000000 --- a/src/utils/code.js +++ /dev/null @@ -1,215 +0,0 @@ -import { - byte2hexStr, - bytesToString, - hextoString, - byteArray2hexStr, - base64DecodeFromString, - base64EncodeToString -} from './bytes'; - -export function bin2String(array) { - // TODO Do we need this alias? - return bytesToString(array); -} - -export function arrayEquals(array1, array2, strict) { - if (array1.length != array2.length) - return false; - - let i; - - for (i = 0; i < array1.length; i++) { - if (strict) { - if (array1[i] != array2[i]) - return false; - } else if (JSON.stringify(array1[i]) != JSON.stringify(array2[i])) - return false; - } - - return true; -} - -export function stringToBytes(str) { - - if (typeof str !== 'string') - throw new Error('The passed string is not a string') - - const bytes = new Array(); - let len; - let c; - - len = str.length; - - for (let i = 0; i < len; i++) { - c = str.charCodeAt(i); - - if (c >= 0x010000 && c <= 0x10FFFF) { - bytes.push(((c >> 18) & 0x07) | 0xF0); - bytes.push(((c >> 12) & 0x3F) | 0x80); - bytes.push(((c >> 6) & 0x3F) | 0x80); - bytes.push((c & 0x3F) | 0x80); - } else if (c >= 0x000800 && c <= 0x00FFFF) { - bytes.push(((c >> 12) & 0x0F) | 0xE0); - bytes.push(((c >> 6) & 0x3F) | 0x80); - bytes.push((c & 0x3F) | 0x80); - } else if (c >= 0x000080 && c <= 0x0007FF) { - bytes.push(((c >> 6) & 0x1F) | 0xC0); - bytes.push((c & 0x3F) | 0x80); - } else bytes.push(c & 0xFF); - } - - return bytes; -} - -export {byte2hexStr, bytesToString, hextoString, byteArray2hexStr, base64DecodeFromString, base64EncodeToString} - -export function hexChar2byte(c) { - let d; - - if (c >= 'A' && c <= 'F') - d = c.charCodeAt(0) - 'A'.charCodeAt(0) + 10; - else if (c >= 'a' && c <= 'f') - d = c.charCodeAt(0) - 'a'.charCodeAt(0) + 10; - else if (c >= '0' && c <= '9') - d = c.charCodeAt(0) - '0'.charCodeAt(0); - - if (typeof d === 'number') - return d; - else - throw new Error('The passed hex char is not a valid hex char'); -} - -export function isHexChar(c) { - if ((c >= 'A' && c <= 'F') || - (c >= 'a' && c <= 'f') || - (c >= '0' && c <= '9')) { - return 1; - } - - return 0; -} - -// set strict as true: if the length of str is odd, add 0 before the str to make its length as even -export function hexStr2byteArray(str, strict = false) { - if (typeof str !== 'string') - throw new Error('The passed string is not a string') - - let len = str.length; - - if (strict) { - if (len % 2) { - str = `0${str}`; - len++; - } - } - const byteArray = Array(); - let d = 0; - let j = 0; - let k = 0; - - for (let i = 0; i < len; i++) { - const c = str.charAt(i); - - if (isHexChar(c)) { - d <<= 4; - d += hexChar2byte(c); - j++; - - if (0 === (j % 2)) { - byteArray[k++] = d; - d = 0; - } - } else - throw new Error('The passed hex char is not a valid hex string') - } - - return byteArray; -} - -//yyyy-MM-DD HH-mm-ss -export function strToDate(str) { - - if (!/^\d{4}-\d{2}-\d{2}( \d{2}-\d{2}-\d{2}|)/.test(str)) - throw new Error('The passed date string is not valid') - - const tempStrs = str.split(" "); - const dateStrs = tempStrs[0].split("-"); - const year = parseInt(dateStrs[0], 10); - const month = parseInt(dateStrs[1], 10) - 1; - const day = parseInt(dateStrs[2], 10); - - if (tempStrs.length > 1) { - const timeStrs = tempStrs[1].split("-"); - const hour = parseInt(timeStrs[0], 10); - const minute = parseInt(timeStrs[1], 10); - const second = parseInt(timeStrs[2], 10); - - return new Date(year, month, day, hour, minute, second); - } - - return new Date(year, month, day); -} - -export function isNumber(c) { - if (c >= '0' && c <= '9') - return 1; - - return 0; -} - -//return 1: address --- 20Bytes HexString -//return 2: blockNumber ------ Decimal number -//return 3: assetName ------ String -//return other: error -export function getStringType(str) { - if (null == str) - return -1; - - if (typeof (str) != 'string') - return -1; - - if (str.length == 0 || str == "") - return -1; - - let i = 0; - - // TODO Should we return 1 if someone passes a full, 42-chars long address? - // if (str.length == 42 && /^41/.test(str)) { - // for (; i < 40; i++) { - // var c = str.charAt(i+2); - // - // if (!isHexChar(c)) - // break; - // } - // } else - if (str.length == 40) { - for (; i < 40; i++) { - var c = str.charAt(i); - - if (!isHexChar(c)) - break; - } - } - - if (i == 40) - return 1; //40 Hex, Address - - for (i = 0; i < str.length; i++) { - var c = str.charAt(i); - - if (!isNumber(c)) - break; - } - - if (i == str.length) - return 2; // All Decimal number, BlockNumber - - for (i = 0; i < str.length; i++) { - var c = str.charAt(i); - - if (c > ' ') - return 3; // At least one visible character - } - - return -1; -} diff --git a/src/utils/crypto.js b/src/utils/crypto.js deleted file mode 100644 index c0db691e..00000000 --- a/src/utils/crypto.js +++ /dev/null @@ -1,251 +0,0 @@ -import {ADDRESS_PREFIX, ADDRESS_PREFIX_BYTE, ADDRESS_SIZE} from './address'; -import {base64EncodeToString} from './code'; -import {base64DecodeFromString, hexStr2byteArray} from './code'; -import {encode58, decode58} from './base58'; -import {byte2hexStr, byteArray2hexStr} from './bytes'; -import * as secp from '@noble/secp256k1'; -import {keccak256, sha256, SigningKey} from './ethersUtils'; -import {TypedDataEncoder} from './typedData'; - -function normalizePrivateKeyBytes(priKeyBytes) { - return hexStr2byteArray(byteArray2hexStr(priKeyBytes).padStart(64, '0')); -} - -export function getBase58CheckAddress(addressBytes) { - const hash0 = SHA256(addressBytes); - const hash1 = SHA256(hash0); - - let checkSum = hash1.slice(0, 4); - checkSum = addressBytes.concat(checkSum); - - return encode58(checkSum); -} - -export function decodeBase58Address(base58Sting) { - if (typeof (base58Sting) != 'string') - return false; - - if (base58Sting.length <= 4) - return false; - - let address = decode58(base58Sting); - - if (base58Sting.length <= 4) - return false; - - const len = address.length; - const offset = len - 4; - const checkSum = address.slice(offset); - - address = address.slice(0, offset); - - const hash0 = SHA256(address); - const hash1 = SHA256(hash0); - const checkSum1 = hash1.slice(0, 4); - - if (checkSum[0] == checkSum1[0] && checkSum[1] == checkSum1[1] && checkSum[2] == - checkSum1[2] && checkSum[3] == checkSum1[3] - ) { - return address; - } - - throw new Error('Invalid address provided'); -} - -export async function signTransaction(priKeyBytes, transaction) { - if (typeof priKeyBytes === 'string') - priKeyBytes = hexStr2byteArray(priKeyBytes); - - const txID = transaction.txID; - const signature = await ECKeySign(hexStr2byteArray(txID), priKeyBytes); - - if (Array.isArray(transaction.signature)) { - if (!transaction.signature.includes(signature)) - transaction.signature.push(signature); - } else - transaction.signature = [signature]; - return transaction; -} - -export function arrayToBase64String(a) { - return btoa(String.fromCharCode(...a)); -} - -export async function signBytes(privateKey, contents) { - if (typeof privateKey === 'string') - privateKey = hexStr2byteArray(privateKey); - - const hashBytes = SHA256(contents); - const signBytes = await ECKeySign(hashBytes, privateKey); - - return signBytes; -} - -export function _signTypedData(domain, types, value, privateKey) { - const key = `0x${privateKey.replace(/^0x/, '')}`; - const signingKey = new SigningKey(key); - - const messageDigest = TypedDataEncoder.hash(domain, types, value); - const signature = signingKey.sign(messageDigest); - const signatureHex = [ - '0x', - signature.r.substring(2), - signature.s.substring(2), - Number(signature.v).toString(16), - ].join(''); - return signatureHex; -} - -export function getRowBytesFromTransactionBase64(base64Data) { - const bytesDecode = base64DecodeFromString(base64Data); - const transaction = proto.protocol.Transaction.deserializeBinary(bytesDecode); - const raw = transaction.getRawData(); - - return raw.serializeBinary(); -} - -export function genPriKey() { - const priKey = secp.utils.randomPrivateKey(); - let priKeyHex = byteArray2hexStr(priKey); - - priKeyHex = priKeyHex.padStart(64, '0'); - - return hexStr2byteArray(priKeyHex); -} - -export function computeAddress(pubBytes) { - if (pubBytes.length === 65) - pubBytes = pubBytes.slice(1); - - const hash = keccak256(new Uint8Array(pubBytes)).toString().substring(2); - const addressHex = ADDRESS_PREFIX + hash.substring(24); - - return hexStr2byteArray(addressHex); -} - -export function getAddressFromPriKey(priKeyBytes) { - let pubBytes = getPubKeyFromPriKey(priKeyBytes); - return computeAddress(pubBytes); -} - -export function decode58Check(addressStr) { - const decodeCheck = decode58(addressStr); - - if (decodeCheck.length <= 4) - return false; - - const decodeData = decodeCheck.slice(0, decodeCheck.length - 4); - const hash0 = SHA256(decodeData); - const hash1 = SHA256(hash0); - - if (hash1[0] === decodeCheck[decodeData.length] && - hash1[1] === decodeCheck[decodeData.length + 1] && - hash1[2] === decodeCheck[decodeData.length + 2] && - hash1[3] === decodeCheck[decodeData.length + 3]) { - return decodeData; - } - - return false; -} - -export function isAddressValid(base58Str) { - if (typeof (base58Str) !== 'string') - return false; - - if (base58Str.length !== ADDRESS_SIZE) - return false; - - let address = decode58(base58Str); - - if (address.length !== 25) - return false; - - if (address[0] !== ADDRESS_PREFIX_BYTE) - return false; - - const checkSum = address.slice(21); - address = address.slice(0, 21); - - const hash0 = SHA256(address); - const hash1 = SHA256(hash0); - const checkSum1 = hash1.slice(0, 4); - - if (checkSum[0] == checkSum1[0] && checkSum[1] == checkSum1[1] && checkSum[2] == - checkSum1[2] && checkSum[3] == checkSum1[3] - ) { - return true - } - - return false; -} - -export function getBase58CheckAddressFromPriKeyBase64String(priKeyBase64String) { - const priKeyBytes = base64DecodeFromString(priKeyBase64String); - const pubBytes = getPubKeyFromPriKey(priKeyBytes); - const addressBytes = computeAddress(pubBytes); - - return getBase58CheckAddress(addressBytes); -} - -export function getHexStrAddressFromPriKeyBase64String(priKeyBase64String) { - const priKeyBytes = base64DecodeFromString(priKeyBase64String); - const pubBytes = getPubKeyFromPriKey(priKeyBytes); - const addressBytes = computeAddress(pubBytes); - const addressHex = byteArray2hexStr(addressBytes); - - return addressHex; -} - -export function getAddressFromPriKeyBase64String(priKeyBase64String) { - const priKeyBytes = base64DecodeFromString(priKeyBase64String); - const pubBytes = getPubKeyFromPriKey(priKeyBytes); - const addressBytes = computeAddress(pubBytes); - const addressBase64 = base64EncodeToString(addressBytes); - - return addressBase64; -} - -export function getPubKeyFromPriKey(priKeyBytes) { - const pubkey = secp.Point.fromPrivateKey(new Uint8Array(normalizePrivateKeyBytes(priKeyBytes))); - const x = pubkey.x; - const y = pubkey.y; - - let xHex = x.toString(16).padStart(64, '0'); - let yHex = y.toString(16).padStart(64, '0'); - - const pubkeyHex = `04${xHex}${yHex}`; - const pubkeyBytes = hexStr2byteArray(pubkeyHex); - - return pubkeyBytes; -} - -export async function ECKeySign(hashBytes, priKeyBytes) { - const [signature, recovery] = await secp.sign(byteArray2hexStr(hashBytes), byteArray2hexStr(priKeyBytes), { recovered: true, der: false }) - - const r = Buffer.from(signature.slice(0, 32)).toString('hex'); - const s = Buffer.from(signature.slice(32, 64)).toString('hex'); - - const v = recovery + 27; - - return r.padStart(64, '0') + s.padStart(64, '0') + byte2hexStr(v); -} - -export function SHA256(msgBytes) { - const msgHex = byteArray2hexStr(msgBytes); - const hashHex = sha256('0x' + msgHex).replace(/^0x/, '') - return hexStr2byteArray(hashHex); -} - -export function passwordToAddress(password) { - const com_priKeyBytes = base64DecodeFromString(password); - const com_addressBytes = getAddressFromPriKey(com_priKeyBytes); - - return getBase58CheckAddress(com_addressBytes); -} - -export function pkToAddress(privateKey, strict = false) { - const com_priKeyBytes = hexStr2byteArray(privateKey, strict); - const com_addressBytes = getAddressFromPriKey(com_priKeyBytes); - - return getBase58CheckAddress(com_addressBytes); -} diff --git a/src/utils/ethersUtils.js b/src/utils/ethersUtils.js deleted file mode 100644 index eb733059..00000000 --- a/src/utils/ethersUtils.js +++ /dev/null @@ -1,59 +0,0 @@ -import { - keccak256, - sha256, - toUtf8Bytes, - toUtf8String, - recoverAddress, - SigningKey, - AbiCoder, - Signature, - concat, - id, - Mnemonic, - Wordlist, - wordlists, - Wallet as ethersWallet, - HDNodeWallet as ethersHDNodeWallet, - getBytes, - computeHmac, -} from 'ethers'; - -import { Interface } from './interface.js'; - -const splitSignature = (sigBytes) => Signature.from(sigBytes); -const joinSignature = (splitSig) => Signature.from(splitSig).serialized; -const arrayify = (value) => getBytes(value); -const FormatTypes = { - sighash: 'sighash', - minimal: 'minimal', - full: 'full', - json: 'json', -}; -const isValidMnemonic = Mnemonic.isValidMnemonic; - -computeHmac.register((algorithm, key, data) => { - return computeHmac._(algorithm, Buffer.from(key), Buffer.from(data)); -}); - -export { - keccak256, - sha256, - toUtf8Bytes, - toUtf8String, - recoverAddress, - SigningKey, - AbiCoder, - Interface, - FormatTypes, - splitSignature, - joinSignature, - arrayify, - ethersWallet, - ethersHDNodeWallet, - concat, - id, - Mnemonic, - Wordlist, - wordlists, - isValidMnemonic, -}; diff --git a/src/utils/fragments.js b/src/utils/fragments.js deleted file mode 100644 index 13abd6a2..00000000 --- a/src/utils/fragments.js +++ /dev/null @@ -1,1191 +0,0 @@ -/** - * About frgaments... - * - * @_subsection api/abi/abi-coder:Fragments [about-fragments] - */ -import { defineProperties, getBigInt, getNumber, assert, assertPrivate, assertArgument } from "ethers"; -import { id } from "ethers"; -; -// [ "a", "b" ] => { "a": 1, "b": 1 } -function setify(items) { - const result = new Set(); - items.forEach((k) => result.add(k)); - return Object.freeze(result); -} -// Visibility Keywords -const _kwVisib = "constant external internal payable private public pure view"; -const KwVisib = setify(_kwVisib.split(" ")); -const _kwTypes = "constructor error event fallback function receive struct"; -const KwTypes = setify(_kwTypes.split(" ")); -const _kwModifiers = "calldata memory storage payable indexed"; -const KwModifiers = setify(_kwModifiers.split(" ")); -const _kwOther = "tuple returns"; -// All Keywords -const _keywords = [_kwTypes, _kwModifiers, _kwOther, _kwVisib].join(" "); -const Keywords = setify(_keywords.split(" ")); -// Single character tokens -const SimpleTokens = { - "(": "OPEN_PAREN", ")": "CLOSE_PAREN", - "[": "OPEN_BRACKET", "]": "CLOSE_BRACKET", - ",": "COMMA", "@": "AT" -}; -// Parser regexes to consume the next token -const regexWhitespacePrefix = new RegExp("^(\\s*)"); -const regexNumberPrefix = new RegExp("^([0-9]+)"); -const regexIdPrefix = new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"); -// Parser regexs to check validity -const regexId = new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"); -const regexType = new RegExp("^(trcToken|address|bool|bytes([0-9]*)|string|u?int([0-9]*))$"); -class TokenString { - #offset; - #tokens; - get offset() { return this.#offset; } - get length() { return this.#tokens.length - this.#offset; } - constructor(tokens) { - this.#offset = 0; - this.#tokens = tokens.slice(); - } - clone() { return new TokenString(this.#tokens); } - reset() { this.#offset = 0; } - #subTokenString(from = 0, to = 0) { - return new TokenString(this.#tokens.slice(from, to).map((t) => { - return Object.freeze(Object.assign({}, t, { - match: (t.match - from), - linkBack: (t.linkBack - from), - linkNext: (t.linkNext - from), - })); - return t; - })); - } - // Pops and returns the value of the next token, if it is a keyword in allowed; throws if out of tokens - popKeyword(allowed) { - const top = this.peek(); - if (top.type !== "KEYWORD" || !allowed.has(top.text)) { - throw new Error(`expected keyword ${top.text}`); - } - return this.pop().text; - } - // Pops and returns the value of the next token if it is `type`; throws if out of tokens - popType(type) { - if (this.peek().type !== type) { - throw new Error(`expected ${type}; got ${JSON.stringify(this.peek())}`); - } - return this.pop().text; - } - // Pops and returns a "(" TOKENS ")" - popParen() { - const top = this.peek(); - if (top.type !== "OPEN_PAREN") { - throw new Error("bad start"); - } - const result = this.#subTokenString(this.#offset + 1, top.match + 1); - this.#offset = top.match + 1; - return result; - } - // Pops and returns the items within "(" ITEM1 "," ITEM2 "," ... ")" - popParams() { - const top = this.peek(); - if (top.type !== "OPEN_PAREN") { - throw new Error("bad start"); - } - const result = []; - while (this.#offset < top.match - 1) { - const link = this.peek().linkNext; - result.push(this.#subTokenString(this.#offset + 1, link)); - this.#offset = link; - } - this.#offset = top.match + 1; - return result; - } - // Returns the top Token, throwing if out of tokens - peek() { - if (this.#offset >= this.#tokens.length) { - throw new Error("out-of-bounds"); - } - return this.#tokens[this.#offset]; - } - // Returns the next value, if it is a keyword in `allowed` - peekKeyword(allowed) { - const top = this.peekType("KEYWORD"); - return (top != null && allowed.has(top)) ? top : null; - } - // Returns the value of the next token if it is `type` - peekType(type) { - if (this.length === 0) { - return null; - } - const top = this.peek(); - return (top.type === type) ? top.text : null; - } - // Returns the next token; throws if out of tokens - pop() { - const result = this.peek(); - this.#offset++; - return result; - } - toString() { - const tokens = []; - for (let i = this.#offset; i < this.#tokens.length; i++) { - const token = this.#tokens[i]; - tokens.push(`${token.type}:${token.text}`); - } - return ``; - } -} -function lex(text) { - const tokens = []; - const throwError = (message) => { - const token = (offset < text.length) ? JSON.stringify(text[offset]) : "$EOI"; - throw new Error(`invalid token ${token} at ${offset}: ${message}`); - }; - let brackets = []; - let commas = []; - let offset = 0; - while (offset < text.length) { - // Strip off any leading whitespace - let cur = text.substring(offset); - let match = cur.match(regexWhitespacePrefix); - if (match) { - offset += match[1].length; - cur = text.substring(offset); - } - const token = { depth: brackets.length, linkBack: -1, linkNext: -1, match: -1, type: "", text: "", offset, value: -1 }; - tokens.push(token); - let type = (SimpleTokens[cur[0]] || ""); - if (type) { - token.type = type; - token.text = cur[0]; - offset++; - if (type === "OPEN_PAREN") { - brackets.push(tokens.length - 1); - commas.push(tokens.length - 1); - } - else if (type == "CLOSE_PAREN") { - if (brackets.length === 0) { - throwError("no matching open bracket"); - } - token.match = brackets.pop(); - (tokens[token.match]).match = tokens.length - 1; - token.depth--; - token.linkBack = commas.pop(); - (tokens[token.linkBack]).linkNext = tokens.length - 1; - } - else if (type === "COMMA") { - token.linkBack = commas.pop(); - (tokens[token.linkBack]).linkNext = tokens.length - 1; - commas.push(tokens.length - 1); - } - else if (type === "OPEN_BRACKET") { - token.type = "BRACKET"; - } - else if (type === "CLOSE_BRACKET") { - // Remove the CLOSE_BRACKET - let suffix = tokens.pop().text; - if (tokens.length > 0 && tokens[tokens.length - 1].type === "NUMBER") { - const value = tokens.pop().text; - suffix = value + suffix; - (tokens[tokens.length - 1]).value = getNumber(value); - } - if (tokens.length === 0 || tokens[tokens.length - 1].type !== "BRACKET") { - throw new Error("missing opening bracket"); - } - (tokens[tokens.length - 1]).text += suffix; - } - continue; - } - match = cur.match(regexIdPrefix); - if (match) { - token.text = match[1]; - offset += token.text.length; - if (Keywords.has(token.text)) { - token.type = "KEYWORD"; - continue; - } - if (token.text.match(regexType)) { - token.type = "TYPE"; - continue; - } - token.type = "ID"; - continue; - } - match = cur.match(regexNumberPrefix); - if (match) { - token.text = match[1]; - token.type = "NUMBER"; - offset += token.text.length; - continue; - } - throw new Error(`unexpected token ${JSON.stringify(cur[0])} at position ${offset}`); - } - return new TokenString(tokens.map((t) => Object.freeze(t))); -} -// Check only one of `allowed` is in `set` -function allowSingle(set, allowed) { - let included = []; - for (const key in allowed.keys()) { - if (set.has(key)) { - included.push(key); - } - } - if (included.length > 1) { - throw new Error(`conflicting types: ${included.join(", ")}`); - } -} -// Functions to process a Solidity Signature TokenString from left-to-right for... -// ...the name with an optional type, returning the name -function consumeName(type, tokens) { - if (tokens.peekKeyword(KwTypes)) { - const keyword = tokens.pop().text; - if (keyword !== type) { - throw new Error(`expected ${type}, got ${keyword}`); - } - } - return tokens.popType("ID"); -} -// ...all keywords matching allowed, returning the keywords -function consumeKeywords(tokens, allowed) { - const keywords = new Set(); - while (true) { - const keyword = tokens.peekType("KEYWORD"); - if (keyword == null || (allowed && !allowed.has(keyword))) { - break; - } - tokens.pop(); - if (keywords.has(keyword)) { - throw new Error(`duplicate keywords: ${JSON.stringify(keyword)}`); - } - keywords.add(keyword); - } - return Object.freeze(keywords); -} -// ...all visibility keywords, returning the coalesced mutability -function consumeMutability(tokens) { - let modifiers = consumeKeywords(tokens, KwVisib); - // Detect conflicting modifiers - allowSingle(modifiers, setify("constant payable nonpayable".split(" "))); - allowSingle(modifiers, setify("pure view payable nonpayable".split(" "))); - // Process mutability states - if (modifiers.has("view")) { - return "view"; - } - if (modifiers.has("pure")) { - return "pure"; - } - if (modifiers.has("payable")) { - return "payable"; - } - if (modifiers.has("nonpayable")) { - return "nonpayable"; - } - // Process legacy `constant` last - if (modifiers.has("constant")) { - return "view"; - } - return "nonpayable"; -} -// ...a parameter list, returning the ParamType list -function consumeParams(tokens, allowIndexed) { - return tokens.popParams().map((t) => ParamType.from(t, allowIndexed)); -} -// ...a gas limit, returning a BigNumber or null if none -function consumeGas(tokens) { - if (tokens.peekType("AT")) { - tokens.pop(); - if (tokens.peekType("NUMBER")) { - return getBigInt(tokens.pop().text); - } - throw new Error("invalid gas"); - } - return null; -} -function consumeEoi(tokens) { - if (tokens.length) { - throw new Error(`unexpected tokens: ${tokens.toString()}`); - } -} -const regexArrayType = new RegExp(/^(.*)\[([0-9]*)\]$/); -function verifyBasicType(type) { - const match = type.match(regexType); - assertArgument(match, "invalid type", "type", type); - if (type === "uint") { - return "uint256"; - } - if (type === "int") { - return "int256"; - } - if (match[2]) { - // bytesXX - const length = parseInt(match[2]); - assertArgument(length !== 0 && length <= 32, "invalid bytes length", "type", type); - } - else if (match[3]) { - // intXX or uintXX - const size = parseInt(match[3]); - assertArgument(size !== 0 && size <= 256 && (size % 8) === 0, "invalid numeric width", "type", type); - } - return type; -} -// Make the Fragment constructors effectively private -const _guard = {}; -const internal = Symbol.for("_ethers_internal"); -const ParamTypeInternal = "_ParamTypeInternal"; -const ErrorFragmentInternal = "_ErrorInternal"; -const EventFragmentInternal = "_EventInternal"; -const ConstructorFragmentInternal = "_ConstructorInternal"; -const FallbackFragmentInternal = "_FallbackInternal"; -const FunctionFragmentInternal = "_FunctionInternal"; -const StructFragmentInternal = "_StructInternal"; -/** - * Each input and output of a [[Fragment]] is an Array of **PAramType**. - */ -export class ParamType { - /** - * The local name of the parameter (or ``""`` if unbound) - */ - name; - /** - * The fully qualified type (e.g. ``"address"``, ``"tuple(address)"``, - * ``"uint256[3][]"``) - */ - type; - /** - * The base type (e.g. ``"address"``, ``"tuple"``, ``"array"``) - */ - baseType; - /** - * True if the parameters is indexed. - * - * For non-indexable types this is ``null``. - */ - indexed; - /** - * The components for the tuple. - * - * For non-tuple types this is ``null``. - */ - components; - /** - * The array length, or ``-1`` for dynamic-lengthed arrays. - * - * For non-array types this is ``null``. - */ - arrayLength; - /** - * The type of each child in the array. - * - * For non-array types this is ``null``. - */ - arrayChildren; - /** - * @private - */ - constructor(guard, name, type, baseType, indexed, components, arrayLength, arrayChildren) { - assertPrivate(guard, _guard, "ParamType"); - Object.defineProperty(this, internal, { value: ParamTypeInternal }); - if (components) { - components = Object.freeze(components.slice()); - } - if (baseType === "array") { - if (arrayLength == null || arrayChildren == null) { - throw new Error(""); - } - } - else if (arrayLength != null || arrayChildren != null) { - throw new Error(""); - } - if (baseType === "tuple") { - if (components == null) { - // throw new Error(""); - components = Object.freeze([]); - } - } - else if (components != null) { - throw new Error(""); - } - defineProperties(this, { - name, type, baseType, indexed, components, arrayLength, arrayChildren - }); - } - /** - * Return a string representation of this type. - * - * For example, - * - * ``sighash" => "(uint256,address)"`` - * - * ``"minimal" => "tuple(uint256,address) indexed"`` - * - * ``"full" => "tuple(uint256 foo, address bar) indexed baz"`` - */ - format(format) { - if (format == null) { - format = "sighash"; - } - if (format === "json") { - let result = { - type: ((this.baseType === "tuple") ? "tuple" : this.type), - name: (this.name || undefined) - }; - if (typeof (this.indexed) === "boolean") { - result.indexed = this.indexed; - } - if (this.isTuple()) { - result.components = this.components.map((c) => JSON.parse(c.format(format))); - } - return JSON.stringify(result); - } - let result = ""; - // Array - if (this.isArray()) { - result += this.arrayChildren.format(format); - result += `[${(this.arrayLength < 0 ? "" : String(this.arrayLength))}]`; - } - else { - if (this.isTuple()) { - if (format !== "sighash") { - result += this.type; - } - result += "(" + this.components.map((comp) => comp.format(format)).join((format === "full") ? ", " : ",") + ")"; - } - else { - result += this.type; - } - } - if (format !== "sighash") { - if (this.indexed === true) { - result += " indexed"; - } - if (format === "full" && this.name) { - result += " " + this.name; - } - } - return result; - } - /* - * Returns true if %%value%% is an Array type. - * - * This provides a type gaurd ensuring that the - * [[arrayChildren]] and [[arrayLength]] are non-null. - */ - //static isArray(value: any): value is { arrayChildren: ParamType, arrayLength: number } { - // return value && (value.baseType === "array") - //} - /** - * Returns true if %%this%% is an Array type. - * - * This provides a type gaurd ensuring that [[arrayChildren]] - * and [[arrayLength]] are non-null. - */ - isArray() { - return (this.baseType === "array"); - } - /** - * Returns true if %%this%% is a Tuple type. - * - * This provides a type gaurd ensuring that [[components]] - * is non-null. - */ - isTuple() { - return (this.baseType === "tuple"); - } - /** - * Returns true if %%this%% is an Indexable type. - * - * This provides a type gaurd ensuring that [[indexed]] - * is non-null. - */ - isIndexable() { - return (this.indexed != null); - } - /** - * Walks the **ParamType** with %%value%%, calling %%process%% - * on each type, destructing the %%value%% recursively. - */ - walk(value, process) { - if (this.isArray()) { - if (!Array.isArray(value)) { - throw new Error("invalid array value"); - } - if (this.arrayLength !== -1 && value.length !== this.arrayLength) { - throw new Error("array is wrong length"); - } - const _this = this; - return value.map((v) => (_this.arrayChildren.walk(v, process))); - } - if (this.isTuple()) { - if (!Array.isArray(value)) { - throw new Error("invalid tuple value"); - } - if (value.length !== this.components.length) { - throw new Error("array is wrong length"); - } - const _this = this; - return value.map((v, i) => (_this.components[i].walk(v, process))); - } - return process(this.type, value); - } - #walkAsync(promises, value, process, setValue) { - if (this.isArray()) { - if (!Array.isArray(value)) { - throw new Error("invalid array value"); - } - if (this.arrayLength !== -1 && value.length !== this.arrayLength) { - throw new Error("array is wrong length"); - } - const childType = this.arrayChildren; - const result = value.slice(); - result.forEach((value, index) => { - childType.#walkAsync(promises, value, process, (value) => { - result[index] = value; - }); - }); - setValue(result); - return; - } - if (this.isTuple()) { - const components = this.components; - // Convert the object into an array - let result; - if (Array.isArray(value)) { - result = value.slice(); - } - else { - if (value == null || typeof (value) !== "object") { - throw new Error("invalid tuple value"); - } - result = components.map((param) => { - if (!param.name) { - throw new Error("cannot use object value with unnamed components"); - } - if (!(param.name in value)) { - throw new Error(`missing value for component ${param.name}`); - } - return value[param.name]; - }); - } - if (result.length !== this.components.length) { - throw new Error("array is wrong length"); - } - result.forEach((value, index) => { - components[index].#walkAsync(promises, value, process, (value) => { - result[index] = value; - }); - }); - setValue(result); - return; - } - const result = process(this.type, value); - if (result.then) { - promises.push((async function () { setValue(await result); })()); - } - else { - setValue(result); - } - } - /** - * Walks the **ParamType** with %%value%%, asynchronously calling - * %%process%% on each type, destructing the %%value%% recursively. - * - * This can be used to resolve ENS naes by walking and resolving each - * ``"address"`` type. - */ - async walkAsync(value, process) { - const promises = []; - const result = [value]; - this.#walkAsync(promises, value, process, (value) => { - result[0] = value; - }); - if (promises.length) { - await Promise.all(promises); - } - return result[0]; - } - /** - * Creates a new **ParamType** for %%obj%%. - * - * If %%allowIndexed%% then the ``indexed`` keyword is permitted, - * otherwise the ``indexed`` keyword will throw an error. - */ - static from(obj, allowIndexed) { - if (ParamType.isParamType(obj)) { - return obj; - } - if (typeof (obj) === "string") { - return ParamType.from(lex(obj), allowIndexed); - } - else if (obj instanceof TokenString) { - let type = "", baseType = ""; - let comps = null; - if (consumeKeywords(obj, setify(["tuple"])).has("tuple") || obj.peekType("OPEN_PAREN")) { - // Tuple - baseType = "tuple"; - comps = obj.popParams().map((t) => ParamType.from(t)); - type = `tuple(${comps.map((c) => c.format()).join(",")})`; - } - else { - // Normal - type = verifyBasicType(obj.popType("TYPE")); - baseType = type; - } - // Check for Array - let arrayChildren = null; - let arrayLength = null; - while (obj.length && obj.peekType("BRACKET")) { - const bracket = obj.pop(); //arrays[i]; - arrayChildren = new ParamType(_guard, "", type, baseType, null, comps, arrayLength, arrayChildren); - arrayLength = bracket.value; - type += bracket.text; - baseType = "array"; - comps = null; - } - let indexed = null; - const keywords = consumeKeywords(obj, KwModifiers); - if (keywords.has("indexed")) { - if (!allowIndexed) { - throw new Error(""); - } - indexed = true; - } - const name = (obj.peekType("ID") ? obj.pop().text : ""); - if (obj.length) { - throw new Error("leftover tokens"); - } - return new ParamType(_guard, name, type, baseType, indexed, comps, arrayLength, arrayChildren); - } - const name = obj.name; - assertArgument(!name || (typeof (name) === "string" && name.match(regexId)), "invalid name", "obj.name", name); - let indexed = obj.indexed; - if (indexed != null) { - assertArgument(allowIndexed, "parameter cannot be indexed", "obj.indexed", obj.indexed); - indexed = !!indexed; - } - let type = obj.type; - let arrayMatch = type.match(regexArrayType); - if (arrayMatch) { - const arrayLength = parseInt(arrayMatch[2] || "-1"); - const arrayChildren = ParamType.from({ - type: arrayMatch[1], - components: obj.components - }); - return new ParamType(_guard, name || "", type, "array", indexed, null, arrayLength, arrayChildren); - } - if (type === "tuple" || type.startsWith("tuple(" /* fix: ) */) || type.startsWith("(" /* fix: ) */)) { - const comps = (obj.components != null) ? obj.components.map((c) => ParamType.from(c)) : null; - const tuple = new ParamType(_guard, name || "", type, "tuple", indexed, comps, null, null); - // @TODO: use lexer to validate and normalize type - return tuple; - } - type = verifyBasicType(obj.type); - return new ParamType(_guard, name || "", type, type, indexed, null, null, null); - } - /** - * Returns true if %%value%% is a **ParamType**. - */ - static isParamType(value) { - return (value && value[internal] === ParamTypeInternal); - } -} -/** - * An abstract class to represent An individual fragment from a parse ABI. - */ -export class Fragment { - /** - * The type of the fragment. - */ - type; - /** - * The inputs for the fragment. - */ - inputs; - /** - * @private - */ - constructor(guard, type, inputs) { - assertPrivate(guard, _guard, "Fragment"); - inputs = Object.freeze(inputs.slice()); - defineProperties(this, { type, inputs }); - } - /** - * Creates a new **Fragment** for %%obj%%, wich can be any supported - * ABI frgament type. - */ - static from(obj) { - if (typeof (obj) === "string") { - // Try parsing JSON... - try { - Fragment.from(JSON.parse(obj)); - } - catch (e) { } - // ...otherwise, use the human-readable lexer - return Fragment.from(lex(obj)); - } - if (obj instanceof TokenString) { - // Human-readable ABI (already lexed) - const type = obj.peekKeyword(KwTypes); - switch (type) { - case "constructor": return ConstructorFragment.from(obj); - case "error": return ErrorFragment.from(obj); - case "event": return EventFragment.from(obj); - case "fallback": - case "receive": - return FallbackFragment.from(obj); - case "function": return FunctionFragment.from(obj); - case "struct": return StructFragment.from(obj); - } - } - else if (typeof (obj) === "object") { - // JSON ABI - switch (obj.type) { - case "constructor": return ConstructorFragment.from(obj); - case "error": return ErrorFragment.from(obj); - case "event": return EventFragment.from(obj); - case "fallback": - case "receive": - return FallbackFragment.from(obj); - case "function": return FunctionFragment.from(obj); - case "struct": return StructFragment.from(obj); - } - assert(false, `unsupported type: ${obj.type}`, "UNSUPPORTED_OPERATION", { - operation: "Fragment.from" - }); - } - assertArgument(false, "unsupported frgament object", "obj", obj); - } - /** - * Returns true if %%value%% is a [[ConstructorFragment]]. - */ - static isConstructor(value) { - return ConstructorFragment.isFragment(value); - } - /** - * Returns true if %%value%% is an [[ErrorFragment]]. - */ - static isError(value) { - return ErrorFragment.isFragment(value); - } - /** - * Returns true if %%value%% is an [[EventFragment]]. - */ - static isEvent(value) { - return EventFragment.isFragment(value); - } - /** - * Returns true if %%value%% is a [[FunctionFragment]]. - */ - static isFunction(value) { - return FunctionFragment.isFragment(value); - } - /** - * Returns true if %%value%% is a [[StructFragment]]. - */ - static isStruct(value) { - return StructFragment.isFragment(value); - } -} -/** - * An abstract class to represent An individual fragment - * which has a name from a parse ABI. - */ -export class NamedFragment extends Fragment { - /** - * The name of the fragment. - */ - name; - /** - * @private - */ - constructor(guard, type, name, inputs) { - super(guard, type, inputs); - assertArgument(typeof (name) === "string" && name.match(regexId), "invalid identifier", "name", name); - inputs = Object.freeze(inputs.slice()); - defineProperties(this, { name }); - } -} -function joinParams(format, params) { - return "(" + params.map((p) => p.format(format)).join((format === "full") ? ", " : ",") + ")"; -} -/** - * A Fragment which represents a //Custom Error//. - */ -export class ErrorFragment extends NamedFragment { - /** - * @private - */ - constructor(guard, name, inputs) { - super(guard, "error", name, inputs); - Object.defineProperty(this, internal, { value: ErrorFragmentInternal }); - } - /** - * The Custom Error selector. - */ - get selector() { - return id(this.format("sighash")).substring(0, 10); - } - format(format) { - if (format == null) { - format = "sighash"; - } - if (format === "json") { - return JSON.stringify({ - type: "error", - name: this.name, - inputs: this.inputs.map((input) => JSON.parse(input.format(format))), - }); - } - const result = []; - if (format !== "sighash") { - result.push("error"); - } - result.push(this.name + joinParams(format, this.inputs)); - return result.join(" "); - } - static from(obj) { - if (ErrorFragment.isFragment(obj)) { - return obj; - } - if (typeof (obj) === "string") { - return ErrorFragment.from(lex(obj)); - } - else if (obj instanceof TokenString) { - const name = consumeName("error", obj); - const inputs = consumeParams(obj); - consumeEoi(obj); - return new ErrorFragment(_guard, name, inputs); - } - return new ErrorFragment(_guard, obj.name, obj.inputs ? obj.inputs.map(ParamType.from) : []); - } - static isFragment(value) { - return (value && value[internal] === ErrorFragmentInternal); - } -} -/** - * A Fragment which represents an Event. - */ -export class EventFragment extends NamedFragment { - anonymous; - /** - * @private - */ - constructor(guard, name, inputs, anonymous) { - super(guard, "event", name, inputs); - Object.defineProperty(this, internal, { value: EventFragmentInternal }); - defineProperties(this, { anonymous }); - } - /** - * The Event topic hash. - */ - get topicHash() { - return id(this.format("sighash")); - } - format(format) { - if (format == null) { - format = "sighash"; - } - if (format === "json") { - return JSON.stringify({ - type: "event", - anonymous: this.anonymous, - name: this.name, - inputs: this.inputs.map((i) => JSON.parse(i.format(format))) - }); - } - const result = []; - if (format !== "sighash") { - result.push("event"); - } - result.push(this.name + joinParams(format, this.inputs)); - if (format !== "sighash" && this.anonymous) { - result.push("anonymous"); - } - return result.join(" "); - } - static getTopicHash(name, params) { - params = (params || []).map((p) => ParamType.from(p)); - const fragment = new EventFragment(_guard, name, params, false); - return fragment.topicHash; - } - static from(obj) { - if (EventFragment.isFragment(obj)) { - return obj; - } - if (typeof (obj) === "string") { - return EventFragment.from(lex(obj)); - } - else if (obj instanceof TokenString) { - const name = consumeName("event", obj); - const inputs = consumeParams(obj, true); - const anonymous = !!consumeKeywords(obj, setify(["anonymous"])).has("anonymous"); - consumeEoi(obj); - return new EventFragment(_guard, name, inputs, anonymous); - } - return new EventFragment(_guard, obj.name, obj.inputs ? obj.inputs.map((p) => ParamType.from(p, true)) : [], !!obj.anonymous); - } - static isFragment(value) { - return (value && value[internal] === EventFragmentInternal); - } -} -/** - * A Fragment which represents a constructor. - */ -export class ConstructorFragment extends Fragment { - payable; - gas; - /** - * @private - */ - constructor(guard, type, inputs, payable, gas) { - super(guard, type, inputs); - Object.defineProperty(this, internal, { value: ConstructorFragmentInternal }); - defineProperties(this, { payable, gas }); - } - format(format) { - assert(format != null && format !== "sighash", "cannot format a constructor for sighash", "UNSUPPORTED_OPERATION", { operation: "format(sighash)" }); - if (format === "json") { - return JSON.stringify({ - type: "constructor", - stateMutability: (this.payable ? "payable" : "undefined"), - payable: this.payable, - gas: ((this.gas != null) ? this.gas : undefined), - inputs: this.inputs.map((i) => JSON.parse(i.format(format))) - }); - } - const result = [`constructor${joinParams(format, this.inputs)}`]; - result.push((this.payable) ? "payable" : "nonpayable"); - if (this.gas != null) { - result.push(`@${this.gas.toString()}`); - } - return result.join(" "); - } - static from(obj) { - if (ConstructorFragment.isFragment(obj)) { - return obj; - } - if (typeof (obj) === "string") { - return ConstructorFragment.from(lex(obj)); - } - else if (obj instanceof TokenString) { - consumeKeywords(obj, setify(["constructor"])); - const inputs = consumeParams(obj); - const payable = !!consumeKeywords(obj, setify(["payable"])).has("payable"); - const gas = consumeGas(obj); - consumeEoi(obj); - return new ConstructorFragment(_guard, "constructor", inputs, payable, gas); - } - return new ConstructorFragment(_guard, "constructor", obj.inputs ? obj.inputs.map(ParamType.from) : [], !!obj.payable, (obj.gas != null) ? obj.gas : null); - } - static isFragment(value) { - return (value && value[internal] === ConstructorFragmentInternal); - } -} -/** - * A Fragment which represents a method. - */ -export class FallbackFragment extends Fragment { - /** - * If the function can be sent value during invocation. - */ - payable; - constructor(guard, inputs, payable) { - super(guard, "fallback", inputs); - Object.defineProperty(this, internal, { value: FallbackFragmentInternal }); - defineProperties(this, { payable }); - } - format(format) { - const type = ((this.inputs.length === 0) ? "receive" : "fallback"); - if (format === "json") { - const stateMutability = (this.payable ? "payable" : "nonpayable"); - return JSON.stringify({ type, stateMutability }); - } - return `${type}()${this.payable ? " payable" : ""}`; - } - static from(obj) { - if (FallbackFragment.isFragment(obj)) { - return obj; - } - if (typeof (obj) === "string") { - return FallbackFragment.from(lex(obj)); - } - else if (obj instanceof TokenString) { - const errorObj = obj.toString(); - const topIsValid = obj.peekKeyword(setify(["fallback", "receive"])); - assertArgument(topIsValid, "type must be fallback or receive", "obj", errorObj); - const type = obj.popKeyword(setify(["fallback", "receive"])); - // receive() - if (type === "receive") { - const inputs = consumeParams(obj); - assertArgument(inputs.length === 0, `receive cannot have arguments`, "obj.inputs", inputs); - consumeKeywords(obj, setify(["payable"])); - consumeEoi(obj); - return new FallbackFragment(_guard, [], true); - } - // fallback() [payable] - // fallback(bytes) [payable] returns (bytes) - let inputs = consumeParams(obj); - if (inputs.length) { - assertArgument(inputs.length === 1 && inputs[0].type === "bytes", "invalid fallback inputs", "obj.inputs", inputs.map((i) => i.format("minimal")).join(", ")); - } - else { - inputs = [ParamType.from("bytes")]; - } - const mutability = consumeMutability(obj); - assertArgument(mutability === "nonpayable" || mutability === "payable", "fallback cannot be constants", "obj.stateMutability", mutability); - if (consumeKeywords(obj, setify(["returns"])).has("returns")) { - const outputs = consumeParams(obj); - assertArgument(outputs.length === 1 && outputs[0].type === "bytes", "invalid fallback outputs", "obj.outputs", outputs.map((i) => i.format("minimal")).join(", ")); - } - consumeEoi(obj); - return new FallbackFragment(_guard, inputs, mutability === "payable"); - } - if (obj.type === "receive") { - return new FallbackFragment(_guard, [], true); - } - if (obj.type === "fallback") { - const inputs = [ParamType.from("bytes")]; - const payable = (obj.stateMutability === "payable"); - return new FallbackFragment(_guard, inputs, payable); - } - assertArgument(false, "invalid fallback description", "obj", obj); - } - static isFragment(value) { - return (value && value[internal] === FallbackFragmentInternal); - } -} -/** - * A Fragment which represents a method. - */ -export class FunctionFragment extends NamedFragment { - /** - * If the function is constant (e.g. ``pure`` or ``view`` functions). - */ - constant; - /** - * The returned types for the result of calling this function. - */ - outputs; - /** - * The state mutability (e.g. ``payable``, ``nonpayable``, ``view`` - * or ``pure``) - */ - stateMutability; - /** - * If the function can be sent value during invocation. - */ - payable; - /** - * The amount of gas to send when calling this function - */ - gas; - /** - * @private - */ - constructor(guard, name, stateMutability, inputs, outputs, gas) { - super(guard, "function", name, inputs); - Object.defineProperty(this, internal, { value: FunctionFragmentInternal }); - outputs = Object.freeze(outputs.slice()); - const constant = (stateMutability === "view" || stateMutability === "pure"); - const payable = (stateMutability === "payable"); - defineProperties(this, { constant, gas, outputs, payable, stateMutability }); - } - /** - * The Function selector. - */ - get selector() { - return id(this.format("sighash")).substring(0, 10); - } - format(format) { - if (format == null) { - format = "sighash"; - } - if (format === "json") { - return JSON.stringify({ - type: "function", - name: this.name, - constant: this.constant, - stateMutability: ((this.stateMutability !== "nonpayable") ? this.stateMutability : undefined), - payable: this.payable, - gas: ((this.gas != null) ? this.gas : undefined), - inputs: this.inputs.map((i) => JSON.parse(i.format(format))), - outputs: this.outputs.map((o) => JSON.parse(o.format(format))), - }); - } - const result = []; - if (format !== "sighash") { - result.push("function"); - } - result.push(this.name + joinParams(format, this.inputs)); - if (format !== "sighash") { - if (this.stateMutability !== "nonpayable") { - result.push(this.stateMutability); - } - if (this.outputs && this.outputs.length) { - result.push("returns"); - result.push(joinParams(format, this.outputs)); - } - if (this.gas != null) { - result.push(`@${this.gas.toString()}`); - } - } - return result.join(" "); - } - static getSelector(name, params) { - params = (params || []).map((p) => ParamType.from(p)); - const fragment = new FunctionFragment(_guard, name, "view", params, [], null); - return fragment.selector; - } - static from(obj) { - if (FunctionFragment.isFragment(obj)) { - return obj; - } - if (typeof (obj) === "string") { - return FunctionFragment.from(lex(obj)); - } - else if (obj instanceof TokenString) { - const name = consumeName("function", obj); - const inputs = consumeParams(obj); - const mutability = consumeMutability(obj); - let outputs = []; - if (consumeKeywords(obj, setify(["returns"])).has("returns")) { - outputs = consumeParams(obj); - } - const gas = consumeGas(obj); - consumeEoi(obj); - return new FunctionFragment(_guard, name, mutability, inputs, outputs, gas); - } - // @TODO: verifyState for stateMutability - return new FunctionFragment(_guard, obj.name, obj.stateMutability, obj.inputs ? obj.inputs.map(ParamType.from) : [], obj.outputs ? obj.outputs.map(ParamType.from) : [], (obj.gas != null) ? obj.gas : null); - } - static isFragment(value) { - return (value && value[internal] === FunctionFragmentInternal); - } -} -/** - * A Fragment which represents a structure. - */ -export class StructFragment extends NamedFragment { - /** - * @private - */ - constructor(guard, name, inputs) { - super(guard, "struct", name, inputs); - Object.defineProperty(this, internal, { value: StructFragmentInternal }); - } - format() { - throw new Error("@TODO"); - } - static from(obj) { - if (typeof (obj) === "string") { - return StructFragment.from(lex(obj)); - } - else if (obj instanceof TokenString) { - const name = consumeName("struct", obj); - const inputs = consumeParams(obj); - consumeEoi(obj); - return new StructFragment(_guard, name, inputs); - } - return new StructFragment(_guard, obj.name, obj.inputs ? obj.inputs.map(ParamType.from) : []); - } - static isFragment(value) { - return (value && value[internal] === StructFragmentInternal); - } -} -//# sourceMappingURL=fragments.js.map \ No newline at end of file diff --git a/src/utils/help.js b/src/utils/help.js deleted file mode 100644 index 6fbc5d1c..00000000 --- a/src/utils/help.js +++ /dev/null @@ -1,65 +0,0 @@ -import {hexStr2byteArray} from './code'; -import {ADDRESS_PREFIX} from 'utils/address'; -import { - getBase58CheckAddress, - decodeBase58Address, - byteArray2hexStr -} from './crypto'; - -export function hexStringToBase58(sHexString) { - if (sHexString.length < 2 || (sHexString.length & 1) != 0) - return ''; - - const bytes = hexStr2byteArray(sHexString); - return getBase58CheckAddress(bytes); -} - -export function base58ToHexString(sBase58) { - const bytes = decodeBase58Address(sBase58); - return byteArray2hexStr(bytes); -} - -export function hexStringToUtf8(hex) { - const arr = hex.split(""); - let out = ""; - - for (let i = 0; i < arr.length / 2; i++) { - const tmp = `0x${arr[i * 2]}${arr[i * 2 + 1]}`; - const charValue = String.fromCharCode(tmp); - out += charValue - } - - return out -} - -export function stringUtf8tHex(str) { - let val = ""; - - for (let i = 0; i < str.length; i++) { - if (val == "") - val = str.charCodeAt(i).toString(16); - else - val += str.charCodeAt(i).toString(16); - } - - return val -} - -export function address2HexString(sHexAddress) { - if (sHexAddress.length == 42 && sHexAddress.indexOf(ADDRESS_PREFIX) == 0) - return sHexAddress; - - return base58ToHexString(sHexAddress) -} - -export function hexString2Address(sAddress) { - return hexStringToBase58(sAddress) -} - -export function hexString2Utf8(sHexString) { - return hexStringToUtf8(sHexString) -} - -export function stringUtf8toHex(sUtf8) { - return stringUtf8tHex(sUtf8) -} diff --git a/src/utils/index.js b/src/utils/index.js deleted file mode 100644 index cb4ce8e2..00000000 --- a/src/utils/index.js +++ /dev/null @@ -1,160 +0,0 @@ -import * as accounts from './accounts'; -import * as base58 from './base58'; -import * as bytes from './bytes'; -import * as crypto from './crypto'; -import * as code from './code'; -import * as abi from './abi'; -import * as message from './message' -import * as ethersUtils from './ethersUtils'; -import {TypedDataEncoder as _TypedDataEncoder} from './typedData'; -import * as transaction from './transaction'; - -import validator from 'validator'; -import BigNumber from 'bignumber.js'; -import {ADDRESS_PREFIX} from 'utils/address'; - -const utils = { - isValidURL(url) { - if (typeof url !== 'string') - return false; - return validator.isURL(url.toString(), { - protocols: ['http', 'https'], - require_tld: false - }); - }, - - isObject(obj) { - return obj === Object(obj) && Object.prototype.toString.call(obj) !== '[object Array]'; - }, - - isArray(array) { - return Array.isArray(array); - }, - - isJson(string) { - try { - return !!JSON.parse(string); - } catch (ex) { - return false; - } - }, - - isBoolean(bool) { - return typeof bool === 'boolean'; - }, - - isBigNumber(number) { - return number && (number instanceof BigNumber || (number.constructor && number.constructor.name === 'BigNumber')); - }, - - isString(string) { - return typeof string === 'string' || (string && string.constructor && string.constructor.name === 'String'); - }, - - isFunction(obj) { - return typeof obj === 'function'; - }, - - isHex(string) { - return (typeof string === 'string' - && !isNaN(parseInt(string, 16)) - && /^(0x|)[a-fA-F0-9]+$/.test(string)); - }, - - isInteger(number) { - if (number === null) - return false - return Number.isInteger( - Number(number) - ); - }, - - hasProperty(obj, property) { - return Object.prototype.hasOwnProperty.call(obj, property); - }, - - hasProperties(obj, ...properties) { - return properties.length && !properties.map(property => { - return this.hasProperty(obj, property) - }).includes(false); - }, - - mapEvent(event) { - let data = { - block: event.block_number, - timestamp: event.block_timestamp, - contract: event.contract_address, - name: event.event_name, - transaction: event.transaction_id, - result: event.result, - resourceNode: event.resource_Node || (event._unconfirmed ? 'fullNode' : 'solidityNode') - }; - if (event._unconfirmed) { - data.unconfirmed = event._unconfirmed - } - if (event._fingerprint) { - data.fingerprint = event._fingerprint; - } - return data; - }, - - parseEvent(event, {inputs: abi}) { - if (!event.result) - return event; - - if (this.isObject(event.result)) { - for (var i = 0; i < abi.length; i++) { - let obj = abi[i]; - if (obj.type == 'address' && obj.name in event.result) - event.result[obj.name] = ADDRESS_PREFIX + event.result[obj.name].substr(2).toLowerCase(); - } - } else if (this.isArray(event.result)) { - event.result = event.result.reduce((obj, result, index) => { - const { - name, - type - } = abi[index]; - - if (type == 'address') - result = ADDRESS_PREFIX + result.substr(2).toLowerCase(); - - obj[name] = result; - - return obj; - }, {}); - } - - return event; - }, - - padLeft(input, padding, amount) { - let res = input.toString(); - - while (res.length < amount) - res = padding + res; - - return res; - }, - - isNotNullOrUndefined(val) { - return val !== null && typeof val !== 'undefined'; - }, - - async sleep(millis = 1000){ - return new Promise(resolve => setTimeout(resolve, millis)); - } -} - -export default { - ...utils, - code, - accounts, - base58, - bytes, - crypto, - abi, - message, - _TypedDataEncoder, - transaction, - ethersUtils -}; diff --git a/src/utils/interface.js b/src/utils/interface.js deleted file mode 100644 index 3c54250c..00000000 --- a/src/utils/interface.js +++ /dev/null @@ -1,979 +0,0 @@ -/** - * About Interface - * - * @_subsection api/abi:Interfaces [interfaces] - */ -import { keccak256 } from "ethers"; -import { id } from "ethers"; -import { concat, dataSlice, getBigInt, getBytes, getBytesCopy, hexlify, zeroPadValue, isHexString, defineProperties, assertArgument, toBeHex, assert } from "ethers"; -import { AbiCoder } from "ethers"; -import { checkResultErrors, Result } from "ethers"; -import { Typed } from "ethers"; -import { ParamType, Fragment, ConstructorFragment, ErrorFragment, EventFragment, FunctionFragment } from "./fragments"; -export { checkResultErrors, Result }; -export class LogDescription { - fragment; - name; - signature; - topic; - args; - constructor(fragment, topic, args) { - const name = fragment.name, signature = fragment.format(); - defineProperties(this, { - fragment, name, signature, topic, args - }); - } -} -export class TransactionDescription { - fragment; - name; - args; - signature; - selector; - value; - constructor(fragment, selector, args, value) { - const name = fragment.name, signature = fragment.format(); - defineProperties(this, { - fragment, name, args, signature, selector, value - }); - } -} -export class ErrorDescription { - fragment; - name; - args; - signature; - selector; - constructor(fragment, selector, args) { - const name = fragment.name, signature = fragment.format(); - defineProperties(this, { - fragment, name, args, signature, selector - }); - } -} -export class Indexed { - hash; - _isIndexed; - static isIndexed(value) { - return !!(value && value._isIndexed); - } - constructor(hash) { - defineProperties(this, { hash, _isIndexed: true }); - } -} -// https://docs.soliditylang.org/en/v0.8.13/control-structures.html?highlight=panic#panic-via-assert-and-error-via-require -const PanicReasons = { - "0": "generic panic", - "1": "assert(false)", - "17": "arithmetic overflow", - "18": "division or modulo by zero", - "33": "enum overflow", - "34": "invalid encoded storage byte array accessed", - "49": "out-of-bounds array access; popping on an empty array", - "50": "out-of-bounds access of an array or bytesN", - "65": "out of memory", - "81": "uninitialized function", -}; -const BuiltinErrors = { - "0x08c379a0": { - signature: "Error(string)", - name: "Error", - inputs: ["string"], - reason: (message) => { - return `reverted with reason string ${JSON.stringify(message)}`; - } - }, - "0x4e487b71": { - signature: "Panic(uint256)", - name: "Panic", - inputs: ["uint256"], - reason: (code) => { - let reason = "unknown panic code"; - if (code >= 0 && code <= 0xff && PanicReasons[code.toString()]) { - reason = PanicReasons[code.toString()]; - } - return `reverted with panic code 0x${code.toString(16)} (${reason})`; - } - } -}; -/** - * An Interface abstracts many of the low-level details for - * encoding and decoding the data on the blockchain. - * - * An ABI provides information on how to encode data to send to - * a Contract, how to decode the results and events and how to - * interpret revert errors. - * - * The ABI can be specified by [any supported format](InterfaceAbi). - */ -export class Interface { - /** - * All the Contract ABI members (i.e. methods, events, errors, etc). - */ - fragments; - /** - * The Contract constructor. - */ - deploy; - /** - * The Fallback method, if any. - */ - fallback; - /** - * If receiving ether is supported. - */ - receive; - #errors; - #events; - #functions; - // #structs: Map; - #abiCoder; - /** - * Create a new Interface for the %%fragments%%. - */ - constructor(fragments) { - let abi = []; - if (typeof (fragments) === "string") { - abi = JSON.parse(fragments); - } - else { - abi = fragments; - } - this.#functions = new Map(); - this.#errors = new Map(); - this.#events = new Map(); - // this.#structs = new Map(); - const frags = []; - for (const a of abi) { - try { - frags.push(Fragment.from(a)); - } - catch (error) { - console.log("EE", error); - } - } - defineProperties(this, { - fragments: Object.freeze(frags) - }); - let fallback = null; - let receive = false; - this.#abiCoder = this.getAbiCoder(); - // Add all fragments by their signature - this.fragments.forEach((fragment, index) => { - let bucket; - switch (fragment.type) { - case "constructor": - if (this.deploy) { - console.log("duplicate definition - constructor"); - return; - } - //checkNames(fragment, "input", fragment.inputs); - defineProperties(this, { deploy: fragment }); - return; - case "fallback": - if (fragment.inputs.length === 0) { - receive = true; - } - else { - assertArgument(!fallback || fragment.payable !== fallback.payable, "conflicting fallback fragments", `fragments[${index}]`, fragment); - fallback = fragment; - receive = fallback.payable; - } - return; - case "function": - //checkNames(fragment, "input", fragment.inputs); - //checkNames(fragment, "output", (fragment).outputs); - bucket = this.#functions; - break; - case "event": - //checkNames(fragment, "input", fragment.inputs); - bucket = this.#events; - break; - case "error": - bucket = this.#errors; - break; - default: - return; - } - // Two identical entries; ignore it - const signature = fragment.format(); - if (bucket.has(signature)) { - return; - } - bucket.set(signature, fragment); - }); - // If we do not have a constructor add a default - if (!this.deploy) { - defineProperties(this, { - deploy: ConstructorFragment.from("constructor()") - }); - } - defineProperties(this, { fallback, receive }); - } - /** - * Returns the entire Human-Readable ABI, as an array of - * signatures, optionally as %%minimal%% strings, which - * removes parameter names and unneceesary spaces. - */ - format(minimal) { - const format = (minimal ? "minimal" : "full"); - const abi = this.fragments.map((f) => f.format(format)); - return abi; - } - /** - * Return the JSON-encoded ABI. This is the format Solidiy - * returns. - */ - formatJson() { - const abi = this.fragments.map((f) => f.format("json")); - // We need to re-bundle the JSON fragments a bit - return JSON.stringify(abi.map((j) => JSON.parse(j))); - } - /** - * The ABI coder that will be used to encode and decode binary - * data. - */ - getAbiCoder() { - return AbiCoder.defaultAbiCoder(); - } - // Find a function definition by any means necessary (unless it is ambiguous) - #getFunction(key, values, forceUnique) { - // Selector - if (isHexString(key)) { - const selector = key.toLowerCase(); - for (const fragment of this.#functions.values()) { - if (selector === fragment.selector) { - return fragment; - } - } - return null; - } - // It is a bare name, look up the function (will return null if ambiguous) - if (key.indexOf("(") === -1) { - const matching = []; - for (const [name, fragment] of this.#functions) { - if (name.split("(" /* fix:) */)[0] === key) { - matching.push(fragment); - } - } - if (values) { - const lastValue = (values.length > 0) ? values[values.length - 1] : null; - let valueLength = values.length; - let allowOptions = true; - if (Typed.isTyped(lastValue) && lastValue.type === "overrides") { - allowOptions = false; - valueLength--; - } - // Remove all matches that don't have a compatible length. The args - // may contain an overrides, so the match may have n or n - 1 parameters - for (let i = matching.length - 1; i >= 0; i--) { - const inputs = matching[i].inputs.length; - if (inputs !== valueLength && (!allowOptions || inputs !== valueLength - 1)) { - matching.splice(i, 1); - } - } - // Remove all matches that don't match the Typed signature - for (let i = matching.length - 1; i >= 0; i--) { - const inputs = matching[i].inputs; - for (let j = 0; j < values.length; j++) { - // Not a typed value - if (!Typed.isTyped(values[j])) { - continue; - } - // We are past the inputs - if (j >= inputs.length) { - if (values[j].type === "overrides") { - continue; - } - matching.splice(i, 1); - break; - } - // Make sure the value type matches the input type - if (values[j].type !== inputs[j].baseType) { - matching.splice(i, 1); - break; - } - } - } - } - // We found a single matching signature with an overrides, but the - // last value is something that cannot possibly be an options - if (matching.length === 1 && values && values.length !== matching[0].inputs.length) { - const lastArg = values[values.length - 1]; - if (lastArg == null || Array.isArray(lastArg) || typeof (lastArg) !== "object") { - matching.splice(0, 1); - } - } - if (matching.length === 0) { - return null; - } - if (matching.length > 1 && forceUnique) { - const matchStr = matching.map((m) => JSON.stringify(m.format())).join(", "); - assertArgument(false, `ambiguous function description (i.e. matches ${matchStr})`, "key", key); - } - return matching[0]; - } - // Normalize the signature and lookup the function - const result = this.#functions.get(FunctionFragment.from(key).format()); - if (result) { - return result; - } - return null; - } - /** - * Get the function name for %%key%%, which may be a function selector, - * function name or function signature that belongs to the ABI. - */ - getFunctionName(key) { - const fragment = this.#getFunction(key, null, false); - assertArgument(fragment, "no matching function", "key", key); - return fragment.name; - } - /** - * Get the [[FunctionFragment]] for %%key%%, which may be a function - * selector, function name or function signature that belongs to the ABI. - * - * If %%values%% is provided, it will use the Typed API to handle - * ambiguous cases where multiple functions match by name. - * - * If the %%key%% and %%values%% do not refine to a single function in - * the ABI, this will throw. - */ - getFunction(key, values) { - return this.#getFunction(key, values || null, true); - } - /** - * Iterate over all functions, calling %%callback%%, sorted by their name. - */ - forEachFunction(callback) { - const names = Array.from(this.#functions.keys()); - names.sort((a, b) => a.localeCompare(b)); - for (let i = 0; i < names.length; i++) { - const name = names[i]; - callback((this.#functions.get(name)), i); - } - } - // Find an event definition by any means necessary (unless it is ambiguous) - #getEvent(key, values, forceUnique) { - // EventTopic - if (isHexString(key)) { - const eventTopic = key.toLowerCase(); - for (const fragment of this.#events.values()) { - if (eventTopic === fragment.topicHash) { - return fragment; - } - } - return null; - } - // It is a bare name, look up the function (will return null if ambiguous) - if (key.indexOf("(") === -1) { - const matching = []; - for (const [name, fragment] of this.#events) { - if (name.split("(" /* fix:) */)[0] === key) { - matching.push(fragment); - } - } - if (values) { - // Remove all matches that don't have a compatible length. - for (let i = matching.length - 1; i >= 0; i--) { - if (matching[i].inputs.length < values.length) { - matching.splice(i, 1); - } - } - // Remove all matches that don't match the Typed signature - for (let i = matching.length - 1; i >= 0; i--) { - const inputs = matching[i].inputs; - for (let j = 0; j < values.length; j++) { - // Not a typed value - if (!Typed.isTyped(values[j])) { - continue; - } - // Make sure the value type matches the input type - if (values[j].type !== inputs[j].baseType) { - matching.splice(i, 1); - break; - } - } - } - } - if (matching.length === 0) { - return null; - } - if (matching.length > 1 && forceUnique) { - const matchStr = matching.map((m) => JSON.stringify(m.format())).join(", "); - assertArgument(false, `ambiguous event description (i.e. matches ${matchStr})`, "key", key); - } - return matching[0]; - } - // Normalize the signature and lookup the function - const result = this.#events.get(EventFragment.from(key).format()); - if (result) { - return result; - } - return null; - } - /** - * Get the event name for %%key%%, which may be a topic hash, - * event name or event signature that belongs to the ABI. - */ - getEventName(key) { - const fragment = this.#getEvent(key, null, false); - assertArgument(fragment, "no matching event", "key", key); - return fragment.name; - } - /** - * Get the [[EventFragment]] for %%key%%, which may be a topic hash, - * event name or event signature that belongs to the ABI. - * - * If %%values%% is provided, it will use the Typed API to handle - * ambiguous cases where multiple events match by name. - * - * If the %%key%% and %%values%% do not refine to a single event in - * the ABI, this will throw. - */ - getEvent(key, values) { - return this.#getEvent(key, values || null, true); - } - /** - * Iterate over all events, calling %%callback%%, sorted by their name. - */ - forEachEvent(callback) { - const names = Array.from(this.#events.keys()); - names.sort((a, b) => a.localeCompare(b)); - for (let i = 0; i < names.length; i++) { - const name = names[i]; - callback((this.#events.get(name)), i); - } - } - /** - * Get the [[ErrorFragment]] for %%key%%, which may be an error - * selector, error name or error signature that belongs to the ABI. - * - * If %%values%% is provided, it will use the Typed API to handle - * ambiguous cases where multiple errors match by name. - * - * If the %%key%% and %%values%% do not refine to a single error in - * the ABI, this will throw. - */ - getError(key, values) { - if (isHexString(key)) { - const selector = key.toLowerCase(); - if (BuiltinErrors[selector]) { - return ErrorFragment.from(BuiltinErrors[selector].signature); - } - for (const fragment of this.#errors.values()) { - if (selector === fragment.selector) { - return fragment; - } - } - return null; - } - // It is a bare name, look up the function (will return null if ambiguous) - if (key.indexOf("(") === -1) { - const matching = []; - for (const [name, fragment] of this.#errors) { - if (name.split("(" /* fix:) */)[0] === key) { - matching.push(fragment); - } - } - if (matching.length === 0) { - if (key === "Error") { - return ErrorFragment.from("error Error(string)"); - } - if (key === "Panic") { - return ErrorFragment.from("error Panic(uint256)"); - } - return null; - } - else if (matching.length > 1) { - const matchStr = matching.map((m) => JSON.stringify(m.format())).join(", "); - assertArgument(false, `ambiguous error description (i.e. ${matchStr})`, "name", key); - } - return matching[0]; - } - // Normalize the signature and lookup the function - key = ErrorFragment.from(key).format(); - if (key === "Error(string)") { - return ErrorFragment.from("error Error(string)"); - } - if (key === "Panic(uint256)") { - return ErrorFragment.from("error Panic(uint256)"); - } - const result = this.#errors.get(key); - if (result) { - return result; - } - return null; - } - /** - * Iterate over all errors, calling %%callback%%, sorted by their name. - */ - forEachError(callback) { - const names = Array.from(this.#errors.keys()); - names.sort((a, b) => a.localeCompare(b)); - for (let i = 0; i < names.length; i++) { - const name = names[i]; - callback((this.#errors.get(name)), i); - } - } - // Get the 4-byte selector used by Solidity to identify a function - /* -getSelector(fragment: ErrorFragment | FunctionFragment): string { - if (typeof(fragment) === "string") { - const matches: Array = [ ]; - - try { matches.push(this.getFunction(fragment)); } catch (error) { } - try { matches.push(this.getError(fragment)); } catch (_) { } - - if (matches.length === 0) { - logger.throwArgumentError("unknown fragment", "key", fragment); - } else if (matches.length > 1) { - logger.throwArgumentError("ambiguous fragment matches function and error", "key", fragment); - } - - fragment = matches[0]; - } - - return dataSlice(id(fragment.format()), 0, 4); -} - */ - // Get the 32-byte topic hash used by Solidity to identify an event - /* - getEventTopic(fragment: EventFragment): string { - //if (typeof(fragment) === "string") { fragment = this.getEvent(eventFragment); } - return id(fragment.format()); - } - */ - _decodeParams(params, data) { - return this.#abiCoder.decode(params, data); - } - _encodeParams(params, values) { - return this.#abiCoder.encode(params, values); - } - /** - * Encodes a ``tx.data`` object for deploying the Contract with - * the %%values%% as the constructor arguments. - */ - encodeDeploy(values) { - return this._encodeParams(this.deploy.inputs, values || []); - } - /** - * Decodes the result %%data%% (e.g. from an ``eth_call``) for the - * specified error (see [[getError]] for valid values for - * %%key%%). - * - * Most developers should prefer the [[parseCallResult]] method instead, - * which will automatically detect a ``CALL_EXCEPTION`` and throw the - * corresponding error. - */ - decodeErrorResult(fragment, data) { - if (typeof (fragment) === "string") { - const f = this.getError(fragment); - assertArgument(f, "unknown error", "fragment", fragment); - fragment = f; - } - assertArgument(dataSlice(data, 0, 4) === fragment.selector, `data signature does not match error ${fragment.name}.`, "data", data); - return this._decodeParams(fragment.inputs, dataSlice(data, 4)); - } - /** - * Encodes the transaction revert data for a call result that - * reverted from the the Contract with the sepcified %%error%% - * (see [[getError]] for valid values for %%fragment%%) with the %%values%%. - * - * This is generally not used by most developers, unless trying to mock - * a result from a Contract. - */ - encodeErrorResult(fragment, values) { - if (typeof (fragment) === "string") { - const f = this.getError(fragment); - assertArgument(f, "unknown error", "fragment", fragment); - fragment = f; - } - return concat([ - fragment.selector, - this._encodeParams(fragment.inputs, values || []) - ]); - } - /** - * Decodes the %%data%% from a transaction ``tx.data`` for - * the function specified (see [[getFunction]] for valid values - * for %%fragment%%). - * - * Most developers should prefer the [[parseTransaction]] method - * instead, which will automatically detect the fragment. - */ - decodeFunctionData(fragment, data) { - if (typeof (fragment) === "string") { - const f = this.getFunction(fragment); - assertArgument(f, "unknown function", "fragment", fragment); - fragment = f; - } - assertArgument(dataSlice(data, 0, 4) === fragment.selector, `data signature does not match function ${fragment.name}.`, "data", data); - return this._decodeParams(fragment.inputs, dataSlice(data, 4)); - } - /** - * Encodes the ``tx.data`` for a transaction that calls the function - * specified (see [[getFunction]] for valid values for %%fragment%%) with - * the %%values%%. - */ - encodeFunctionData(fragment, values) { - if (typeof (fragment) === "string") { - const f = this.getFunction(fragment); - assertArgument(f, "unknown function", "fragment", fragment); - fragment = f; - } - return concat([ - fragment.selector, - this._encodeParams(fragment.inputs, values || []) - ]); - } - /** - * Decodes the result %%data%% (e.g. from an ``eth_call``) for the - * specified function (see [[getFunction]] for valid values for - * %%key%%). - * - * Most developers should prefer the [[parseCallResult]] method instead, - * which will automatically detect a ``CALL_EXCEPTION`` and throw the - * corresponding error. - */ - decodeFunctionResult(fragment, data) { - if (typeof (fragment) === "string") { - const f = this.getFunction(fragment); - assertArgument(f, "unknown function", "fragment", fragment); - fragment = f; - } - let message = "invalid length for result data"; - const bytes = getBytesCopy(data); - if ((bytes.length % 32) === 0) { - try { - return this.#abiCoder.decode(fragment.outputs, bytes); - } - catch (error) { - message = "could not decode result data"; - } - } - // Call returned data with no error, but the data is junk - assert(false, message, "BAD_DATA", { - value: hexlify(bytes), - info: { method: fragment.name, signature: fragment.format() } - }); - } - makeError(_data, tx) { - const data = getBytes(_data, "data"); - const error = AbiCoder.getBuiltinCallException("call", tx, data); - // Not a built-in error; try finding a custom error - const customPrefix = "execution reverted (unknown custom error)"; - if (error.message.startsWith(customPrefix)) { - const selector = hexlify(data.slice(0, 4)); - const ef = this.getError(selector); - if (ef) { - try { - const args = this.#abiCoder.decode(ef.inputs, data.slice(4)); - error.revert = { - name: ef.name, signature: ef.format(), args - }; - error.reason = error.revert.signature; - error.message = `execution reverted: ${error.reason}`; - } - catch (e) { - error.message = `execution reverted (coult not decode custom error)`; - } - } - } - // Add the invocation, if available - const parsed = this.parseTransaction(tx); - if (parsed) { - error.invocation = { - method: parsed.name, - signature: parsed.signature, - args: parsed.args - }; - } - return error; - } - /** - * Encodes the result data (e.g. from an ``eth_call``) for the - * specified function (see [[getFunction]] for valid values - * for %%fragment%%) with %%values%%. - * - * This is generally not used by most developers, unless trying to mock - * a result from a Contract. - */ - encodeFunctionResult(fragment, values) { - if (typeof (fragment) === "string") { - const f = this.getFunction(fragment); - assertArgument(f, "unknown function", "fragment", fragment); - fragment = f; - } - return hexlify(this.#abiCoder.encode(fragment.outputs, values || [])); - } - /* - spelunk(inputs: Array, values: ReadonlyArray, processfunc: (type: string, value: any) => Promise): Promise> { - const promises: Array> = [ ]; - const process = function(type: ParamType, value: any): any { - if (type.baseType === "array") { - return descend(type.child - } - if (type. === "address") { - } - }; - - const descend = function (inputs: Array, values: ReadonlyArray) { - if (inputs.length !== values.length) { throw new Error("length mismatch"); } - - }; - - const result: Array = [ ]; - values.forEach((value, index) => { - if (value == null) { - topics.push(null); - } else if (param.baseType === "array" || param.baseType === "tuple") { - logger.throwArgumentError("filtering with tuples or arrays not supported", ("contract." + param.name), value); - } else if (Array.isArray(value)) { - topics.push(value.map((value) => encodeTopic(param, value))); - } else { - topics.push(encodeTopic(param, value)); - } - }); - } - */ - // Create the filter for the event with search criteria (e.g. for eth_filterLog) - encodeFilterTopics(fragment, values) { - if (typeof (fragment) === "string") { - const f = this.getEvent(fragment); - assertArgument(f, "unknown event", "eventFragment", fragment); - fragment = f; - } - assert(values.length <= fragment.inputs.length, `too many arguments for ${fragment.format()}`, "UNEXPECTED_ARGUMENT", { count: values.length, expectedCount: fragment.inputs.length }); - const topics = []; - if (!fragment.anonymous) { - topics.push(fragment.topicHash); - } - // @TODO: Use the coders for this; to properly support tuples, etc. - const encodeTopic = (param, value) => { - if (param.type === "string") { - return id(value); - } - else if (param.type === "bytes") { - return keccak256(hexlify(value)); - } - if (param.type === "bool" && typeof (value) === "boolean") { - value = (value ? "0x01" : "0x00"); - } - if (param.type.match(/^u?int/)) { - value = toBeHex(value); - } - // Check addresses are valid - if (param.type === "address") { - this.#abiCoder.encode(["address"], [value]); - } - return zeroPadValue(hexlify(value), 32); - //@TOOD should probably be return toHex(value, 32) - }; - values.forEach((value, index) => { - const param = fragment.inputs[index]; - if (!param.indexed) { - assertArgument(value == null, "cannot filter non-indexed parameters; must be null", ("contract." + param.name), value); - return; - } - if (value == null) { - topics.push(null); - } - else if (param.baseType === "array" || param.baseType === "tuple") { - assertArgument(false, "filtering with tuples or arrays not supported", ("contract." + param.name), value); - } - else if (Array.isArray(value)) { - topics.push(value.map((value) => encodeTopic(param, value))); - } - else { - topics.push(encodeTopic(param, value)); - } - }); - // Trim off trailing nulls - while (topics.length && topics[topics.length - 1] === null) { - topics.pop(); - } - return topics; - } - encodeEventLog(fragment, values) { - if (typeof (fragment) === "string") { - const f = this.getEvent(fragment); - assertArgument(f, "unknown event", "eventFragment", fragment); - fragment = f; - } - const topics = []; - const dataTypes = []; - const dataValues = []; - if (!fragment.anonymous) { - topics.push(fragment.topicHash); - } - assertArgument(values.length === fragment.inputs.length, "event arguments/values mismatch", "values", values); - fragment.inputs.forEach((param, index) => { - const value = values[index]; - if (param.indexed) { - if (param.type === "string") { - topics.push(id(value)); - } - else if (param.type === "bytes") { - topics.push(keccak256(value)); - } - else if (param.baseType === "tuple" || param.baseType === "array") { - // @TODO - throw new Error("not implemented"); - } - else { - topics.push(this.#abiCoder.encode([param.type], [value])); - } - } - else { - dataTypes.push(param); - dataValues.push(value); - } - }); - return { - data: this.#abiCoder.encode(dataTypes, dataValues), - topics: topics - }; - } - // Decode a filter for the event and the search criteria - decodeEventLog(fragment, data, topics) { - if (typeof (fragment) === "string") { - const f = this.getEvent(fragment); - assertArgument(f, "unknown event", "eventFragment", fragment); - fragment = f; - } - if (topics != null && !fragment.anonymous) { - const eventTopic = fragment.topicHash; - assertArgument(isHexString(topics[0], 32) && topics[0].toLowerCase() === eventTopic, "fragment/topic mismatch", "topics[0]", topics[0]); - topics = topics.slice(1); - } - const indexed = []; - const nonIndexed = []; - const dynamic = []; - fragment.inputs.forEach((param, index) => { - if (param.indexed) { - if (param.type === "string" || param.type === "bytes" || param.baseType === "tuple" || param.baseType === "array") { - indexed.push(ParamType.from({ type: "bytes32", name: param.name })); - dynamic.push(true); - } - else { - indexed.push(param); - dynamic.push(false); - } - } - else { - nonIndexed.push(param); - dynamic.push(false); - } - }); - const resultIndexed = (topics != null) ? this.#abiCoder.decode(indexed, concat(topics)) : null; - const resultNonIndexed = this.#abiCoder.decode(nonIndexed, data, true); - //const result: (Array & { [ key: string ]: any }) = [ ]; - const values = []; - const keys = []; - let nonIndexedIndex = 0, indexedIndex = 0; - fragment.inputs.forEach((param, index) => { - let value = null; - if (param.indexed) { - if (resultIndexed == null) { - value = new Indexed(null); - } - else if (dynamic[index]) { - value = new Indexed(resultIndexed[indexedIndex++]); - } - else { - try { - value = resultIndexed[indexedIndex++]; - } - catch (error) { - value = error; - } - } - } - else { - try { - value = resultNonIndexed[nonIndexedIndex++]; - } - catch (error) { - value = error; - } - } - values.push(value); - keys.push(param.name || null); - }); - return Result.fromItems(values, keys); - } - /** - * Parses a transaction, finding the matching function and extracts - * the parameter values along with other useful function details. - * - * If the matching function cannot be found, return null. - */ - parseTransaction(tx) { - const data = getBytes(tx.data, "tx.data"); - const value = getBigInt((tx.value != null) ? tx.value : 0, "tx.value"); - const fragment = this.getFunction(hexlify(data.slice(0, 4))); - if (!fragment) { - return null; - } - const args = this.#abiCoder.decode(fragment.inputs, data.slice(4)); - return new TransactionDescription(fragment, fragment.selector, args, value); - } - parseCallResult(data) { - throw new Error("@TODO"); - } - /** - * Parses a receipt log, finding the matching event and extracts - * the parameter values along with other useful event details. - * - * If the matching event cannot be found, returns null. - */ - parseLog(log) { - const fragment = this.getEvent(log.topics[0]); - if (!fragment || fragment.anonymous) { - return null; - } - // @TODO: If anonymous, and the only method, and the input count matches, should we parse? - // Probably not, because just because it is the only event in the ABI does - // not mean we have the full ABI; maybe just a fragment? - return new LogDescription(fragment, fragment.topicHash, this.decodeEventLog(fragment, log.data, log.topics)); - } - /** - * Parses a revert data, finding the matching error and extracts - * the parameter values along with other useful error details. - * - * If the matching event cannot be found, returns null. - */ - parseError(data) { - const hexData = hexlify(data); - const fragment = this.getError(dataSlice(hexData, 0, 4)); - if (!fragment) { - return null; - } - const args = this.#abiCoder.decode(fragment.inputs, dataSlice(hexData, 4)); - return new ErrorDescription(fragment, fragment.selector, args); - } - /** - * Creates a new [[Interface]] from the ABI %%value%%. - * - * The %%value%% may be provided as an existing [[Interface]] object, - * a JSON-encoded ABI or any Human-Readable ABI format. - */ - static from(value) { - // Already an Interface, which is immutable - if (value instanceof Interface) { - return value; - } - // JSON - if (typeof (value) === "string") { - return new Interface(JSON.parse(value)); - } - // Maybe an interface from an older version, or from a symlinked copy - if (typeof (value.format) === "function") { - return new Interface(value.format("json")); - } - // Array of fragments - return new Interface(value); - } -} -//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/src/utils/message.js b/src/utils/message.js deleted file mode 100644 index b0262102..00000000 --- a/src/utils/message.js +++ /dev/null @@ -1,40 +0,0 @@ -import { keccak256, toUtf8Bytes, concat, recoverAddress, SigningKey, joinSignature } from 'utils/ethersUtils'; -import { ADDRESS_PREFIX } from 'utils/address'; -import { getBase58CheckAddress } from 'utils/crypto'; -import { hexStr2byteArray } from 'utils/code'; - -export const TRON_MESSAGE_PREFIX = "\x19TRON Signed Message:\n"; - -export function hashMessage(message) { - if (typeof(message) === "string") { - message = toUtf8Bytes(message); - } - - return keccak256(concat([ - toUtf8Bytes(TRON_MESSAGE_PREFIX), - toUtf8Bytes(String(message.length)), - message - ])); -} - -export function signMessage(message, privateKey) { - if(!privateKey.match(/^0x/)) { - privateKey = '0x' + privateKey; - } - - const signingKey = new SigningKey(privateKey); - const messageDigest = hashMessage(message); - const signature = signingKey.sign(messageDigest); - - return joinSignature(signature) -} - -export function verifyMessage(message, signature) { - if(!signature.match(/^0x/)) { - signature = '0x' + signature; - } - const recovered = recoverAddress(hashMessage(message), signature); - const base58Address = getBase58CheckAddress(hexStr2byteArray(recovered.replace(/^0x/, ADDRESS_PREFIX))); - - return base58Address; -} diff --git a/src/utils/transaction.js b/src/utils/transaction.js deleted file mode 100644 index 21154618..00000000 --- a/src/utils/transaction.js +++ /dev/null @@ -1,1088 +0,0 @@ -const google_protobuf_any_pb = require('@tronweb3/google-protobuf/google/protobuf/any_pb'); - -const { Transaction, Permission, Key } = require('../protocol/core/Tron_pb'); - -const { - TransferContract, - FreezeBalanceContract, - UnfreezeBalanceContract, - WithdrawBalanceContract, - FreezeBalanceV2Contract, - UnfreezeBalanceV2Contract, - WithdrawExpireUnfreezeContract, - DelegateResourceContract, - UnDelegateResourceContract, -} = require('../protocol/core/contract/balance_contract_pb'); -const { - TransferAssetContract, - ParticipateAssetIssueContract, - AssetIssueContract, - UpdateAssetContract -} = require('../protocol/core/contract/asset_issue_contract_pb'); - -const { - TriggerSmartContract, - ClearABIContract, - UpdateEnergyLimitContract, - UpdateSettingContract, - CreateSmartContract, - SmartContract, -} = require('../protocol/core/contract/smart_contract_pb'); - -const { ResourceCode } = require('../protocol/core/contract/common_pb'); - -const { - WitnessCreateContract, - VoteWitnessContract, -} = require('../protocol/core/contract/witness_contract_pb'); - -const { - UpdateBrokerageContract, -} = require('../protocol/core/contract/storage_contract_pb'); - -const { - AccountCreateContract, - AccountUpdateContract, - SetAccountIdContract, - AccountPermissionUpdateContract, -} = require('../protocol/core/contract/account_contract_pb'); - -const { - ProposalCreateContract, - ProposalDeleteContract, - ProposalApproveContract, -} = require('../protocol/core/contract/proposal_contract_pb'); - -const { - ExchangeCreateContract, - ExchangeInjectContract, - ExchangeWithdrawContract, - ExchangeTransactionContract, -} = require('../protocol/core/contract/exchange_contract_pb'); - -import { byteArray2hexStr } from './bytes'; -import { sha256, keccak256 } from './ethersUtils'; -import TronWeb from '../index'; - -const fromHexString = (hexString) => { - if (!hexString || hexString.length === 0) return new Uint8Array([]); - return new Uint8Array( - TronWeb.address.toHex(hexString).match(/.{1,2}/g).map((byte) => parseInt(byte, 16)) - ); -}; - - -const sha3 = (string, prefix = true) => { - return ( - (prefix ? '0x' : '') + - keccak256(Buffer.from(string, 'utf-8')).toString().substring(2) - ); -}; - -const buildCommonTransaction = ( - message, - contractType, - typeName, - permissionId -) => { - let anyValue = new google_protobuf_any_pb.Any(); - anyValue.pack(message.serializeBinary(), 'protocol.' + typeName); - let contract = new Transaction.Contract(); - contract.setType(contractType); - contract.setParameter(anyValue); - if (permissionId) { - contract.setPermissionId(permissionId); - } - let raw = new Transaction.raw(); - raw.addContract(contract); - let transaction = new Transaction(); - transaction.setRawData(raw); - return transaction; -}; - -// wallet/createtransaction for sendTrx -const buildTransferContract = (value, options) => { - const { to_address, owner_address, amount } = value; - let transferContract = new TransferContract(); - transferContract.setToAddress(fromHexString(to_address)); - transferContract.setOwnerAddress(fromHexString(owner_address)); - transferContract.setAmount(amount); - return buildCommonTransaction( - transferContract, - Transaction.Contract.ContractType.TRANSFERCONTRACT, - 'TransferContract', - options.Permission_id - ); -}; - -// wallet/transferasset for sendToken -const buildTransferAssetContract = (value, options) => { - const { to_address, owner_address, amount, asset_name } = value; - let transferContract = new TransferAssetContract(); - transferContract.setToAddress(fromHexString(to_address)); - transferContract.setOwnerAddress(fromHexString(owner_address)); - transferContract.setAssetName(fromHexString(asset_name.replace(/^0x/, ''))); - transferContract.setAmount(amount); - return buildCommonTransaction( - transferContract, - Transaction.Contract.ContractType.TRANSFERASSETCONTRACT, - 'TransferAssetContract', - options.Permission_id - ); -}; - -// wallet/participateassetissue for purchaseToken -const buildParticipateAssetIssueContract = (value, options) => { - let pbObj = new ParticipateAssetIssueContract(); - pbObj.setToAddress(fromHexString(value.to_address)); - pbObj.setOwnerAddress(fromHexString(value.owner_address)); - pbObj.setAssetName(fromHexString(value.asset_name.replace(/^0x/, ''))); - pbObj.setAmount(value.amount); - - return buildCommonTransaction( - pbObj, - Transaction.Contract.ContractType.PARTICIPATEASSETISSUECONTRACT, - 'ParticipateAssetIssueContract', - options.Permission_id - ); -}; - -const buildTriggerSmartContract = (value, options) => { - let triggerSmartContract = new TriggerSmartContract(); - const { - owner_address, - contract_address, - parameter = '', - function_selector, - call_value, - call_token_value, - token_id, - data, - } = value; - triggerSmartContract.setOwnerAddress(fromHexString(owner_address)); - triggerSmartContract.setContractAddress(fromHexString(contract_address)); - triggerSmartContract.setCallValue(call_value); - if (data) { - triggerSmartContract.setData(fromHexString(data)); - } else if (function_selector) { - const contractData = sha3(function_selector).substring(2, 10) + parameter; - triggerSmartContract.setData(fromHexString(contractData)); - } - - if (token_id) { - triggerSmartContract.setTokenId(token_id); - } - if (call_token_value) { - triggerSmartContract.setCallTokenValue(call_token_value); - } - - return buildCommonTransaction( - triggerSmartContract, - Transaction.Contract.ContractType.TRIGGERSMARTCONTRACT, - 'TriggerSmartContract', - options.Permission_id - ); -}; - -const buildFreezeBalanceContract = (value, options) => { - let freezeBalanceContract = new FreezeBalanceContract(); - const { - owner_address, - frozen_balance, - frozen_duration, - resource, - receiver_address, - } = value; - freezeBalanceContract.setOwnerAddress(fromHexString(owner_address)); - freezeBalanceContract.setFrozenBalance(frozen_balance); - freezeBalanceContract.setFrozenDuration(frozen_duration); - if (resource) { - freezeBalanceContract.setResource(ResourceCode[resource]); - } - if (receiver_address) { - freezeBalanceContract.setReceiverAddress( - fromHexString(receiver_address) - ); - } - - return buildCommonTransaction( - freezeBalanceContract, - Transaction.Contract.ContractType.FREEZEBALANCECONTRACT, - 'FreezeBalanceContract', - options.Permission_id - ); -}; - -const buildUnfreezeBalanceContract = (value, options) => { - let unfreezeBalanceContract = new UnfreezeBalanceContract(); - const { owner_address, resource, receiver_address } = value; - unfreezeBalanceContract.setOwnerAddress(fromHexString(owner_address)); - if (resource) { - unfreezeBalanceContract.setResource(ResourceCode[resource]); - } - if (receiver_address) { - unfreezeBalanceContract.setReceiverAddress( - fromHexString(receiver_address) - ); - } - - return buildCommonTransaction( - unfreezeBalanceContract, - Transaction.Contract.ContractType.UNFREEZEBALANCECONTRACT, - 'UnfreezeBalanceContract', - options.Permission_id - ); -}; - -const buildWithdrawBalanceContract = (value, options) => { - let withdrawbalanceContract = new WithdrawBalanceContract(); - const { owner_address } = value; - withdrawbalanceContract.setOwnerAddress(fromHexString(owner_address)); - - return buildCommonTransaction( - withdrawbalanceContract, - Transaction.Contract.ContractType.WITHDRAWBALANCECONTRACT, - 'WithdrawBalanceContract', - options.Permission_id - ); -}; - -const buildFreezeBalanceV2Contract = (value, options) => { - const freezeBalanceV2Contract = new FreezeBalanceV2Contract(); - const { - owner_address, - frozen_balance, - resource, - } = value; - freezeBalanceV2Contract.setOwnerAddress(fromHexString(owner_address)); - freezeBalanceV2Contract.setFrozenBalance(frozen_balance); - freezeBalanceV2Contract.setResource(ResourceCode[resource]); - - return buildCommonTransaction( - freezeBalanceV2Contract, - Transaction.Contract.ContractType.FREEZEBALANCEV2CONTRACT, - 'FreezeBalanceV2Contract', - options.Permission_id, - ); -}; - -const buildUnfreezeBalanceV2Contract = (value, options) => { - const unfreezeBalanceV2Contract = new UnfreezeBalanceV2Contract(); - const { - owner_address, - unfreeze_balance, - resource, - } = value; - unfreezeBalanceV2Contract.setOwnerAddress(fromHexString(owner_address)); - unfreezeBalanceV2Contract.setUnfreezeBalance(unfreeze_balance); - unfreezeBalanceV2Contract.setResource(ResourceCode[resource]); - - return buildCommonTransaction( - unfreezeBalanceV2Contract, - Transaction.Contract.ContractType.UNFREEZEBALANCEV2CONTRACT, - 'UnfreezeBalanceV2Contract', - options.Permission_id, - ); -}; - -const buildDelegateResourceContract = (value, options) => { - const delegateResourceContract = new DelegateResourceContract(); - const { - owner_address, - receiver_address, - balance, - resource, - lock = false, - } = value; - delegateResourceContract.setOwnerAddress(fromHexString(owner_address)); - delegateResourceContract.setBalance(balance); - delegateResourceContract.setResource(ResourceCode[resource]); - delegateResourceContract.setLock(lock); - delegateResourceContract.setReceiverAddress(fromHexString(receiver_address)); - - return buildCommonTransaction( - delegateResourceContract, - Transaction.Contract.ContractType.DELEGATERESOURCECONTRACT, - 'DelegateResourceContract', - options.Permission_id, - ); -}; - -const buildUnDelegateResourceContract = (value, options) => { - const unDelegateResourceContract = new UnDelegateResourceContract(); - const { - owner_address, - receiver_address, - balance, - resource, - } = value; - unDelegateResourceContract.setOwnerAddress(fromHexString(owner_address)); - unDelegateResourceContract.setBalance(balance); - unDelegateResourceContract.setResource(ResourceCode[resource]); - unDelegateResourceContract.setReceiverAddress(fromHexString(receiver_address)); - - return buildCommonTransaction( - unDelegateResourceContract, - Transaction.Contract.ContractType.UNDELEGATERESOURCECONTRACT, - 'UnDelegateResourceContract', - options.Permission_id, - ); -}; - -const buildWithdrawExpireUnfreezeContract = (value, options) => { - const withdrawExpireUnfreeze = new WithdrawExpireUnfreezeContract(); - const { owner_address } = value; - withdrawExpireUnfreeze.setOwnerAddress(fromHexString(owner_address)); - - return buildCommonTransaction( - withdrawExpireUnfreeze, - Transaction.Contract.ContractType.WITHDRAWEXPIREUNFREEZECONTRACT, - 'WithdrawExpireUnfreezeContract', - options.Permission_id, - ); -}; - -// applyForSR -const buildCreateWitness = (value, options) => { - const createWitnessContract = new WitnessCreateContract(); - const { owner_address, url } = value; - createWitnessContract.setOwnerAddress(fromHexString(owner_address)); - createWitnessContract.setUrl(fromHexString(url.replace(/^0x/, ''))); - return buildCommonTransaction( - createWitnessContract, - Transaction.Contract.ContractType.WITNESSCREATECONTRACT, - 'WitnessCreateContract', - options.Permission_id - ); -}; - -// vote -const buildVoteWitnessAccount = (value, options) => { - let voteWitnessContract = new VoteWitnessContract(); - const { owner_address, votes } = value; - voteWitnessContract.setOwnerAddress(fromHexString(owner_address)); - - votes.forEach((voteItem) => { - let vote = new VoteWitnessContract.Vote(); - const { vote_address, vote_count } = voteItem; - vote.setVoteAddress(fromHexString(vote_address)); - let numberOfVotes = parseInt(vote_count); - vote.setVoteCount(numberOfVotes); - voteWitnessContract.addVotes(vote); - }); - - return buildCommonTransaction( - voteWitnessContract, - Transaction.Contract.ContractType.VOTEWITNESSCONTRACT, - 'VoteWitnessContract', - options.Permission_id - ); -}; - -const buildCreateSmartContract = (value, options) => { - let params = value?.new_contract ? - { - ...{ - owner_address: value.owner_address, - call_token_value: value.call_token_value, - token_id: value.token_id, - }, - ...value.new_contract, - } - : value; - let { - owner_address, - consume_user_resource_percent, - origin_energy_limit, - abi, - bytecode = '', - name: contracName, - parameter = '', - call_value, - call_token_value, - token_id, - origin_address, - } = params; - - let createSmartContract = new CreateSmartContract(); - createSmartContract.setOwnerAddress(fromHexString(owner_address)); - if (token_id) { - createSmartContract.setTokenId(token_id); - } - if (call_token_value) { - createSmartContract.setCallTokenValue(call_token_value); - } - const smartContractBuilder = new SmartContract(); - - if (abi) { - let abiJson; - if (typeof abi === 'string') { - abiJson = JSON.parse(abi); - } else { - abiJson = abi?.entrys || []; // abi could be an empty object if origin abi is `[]`; - } - const abiBuilder = new SmartContract.ABI(); - - const buildEntryParam = (data) => { - const param = new SmartContract.ABI.Entry.Param(); - const { indexed, name, type } = data; - if (indexed === true) { - param.setIndexed(true); - } - param.setName(name); - param.setType(type); - return param; - }; - const entryBuilders = abiJson.map((entry) => { - const { - anonymous, - constant, - name, - inputs, - outputs, - type, - payable, - stateMutability, - } = entry; - const entryBuilder = new SmartContract.ABI.Entry(); - entryBuilder.setAnonymous(anonymous); - entryBuilder.setConstant(constant); - entryBuilder.setName(name); - if (inputs) { - entryBuilder.setInputsList( - inputs.map((input) => buildEntryParam(input)) - ); - } - if (outputs) { - entryBuilder.setOutputsList( - outputs.map((output) => buildEntryParam(output)) - ); - } - if (type) { - entryBuilder.setType( - SmartContract.ABI.Entry.EntryType[type.toUpperCase()] - ); - } - - entryBuilder.setPayable(payable); - if(stateMutability) { - entryBuilder.setStatemutability( - SmartContract.ABI.Entry.StateMutabilityType[ - stateMutability.toUpperCase() - ] - ); - } - - return entryBuilder; - }); - abiBuilder.setEntrysList(entryBuilders); - smartContractBuilder.setAbi(abiBuilder); - } - - - if (call_value) { - smartContractBuilder.setCallValue(call_value); - } - - smartContractBuilder.setConsumeUserResourcePercent( - consume_user_resource_percent - ); - smartContractBuilder.setOriginEnergyLimit(origin_energy_limit); - - if (!origin_address) { - origin_address = owner_address; - } - smartContractBuilder.setOriginAddress(fromHexString(origin_address)); - - if (bytecode) { - const bytecodeParameter = bytecode.replace(/^0x/, '') + parameter.replace(/^0x/, ''); - smartContractBuilder.setBytecode(fromHexString(bytecodeParameter)); - } - - smartContractBuilder.setName(contracName); - - createSmartContract.setNewContract(smartContractBuilder); - - return buildCommonTransaction( - createSmartContract, - Transaction.Contract.ContractType.CREATESMARTCONTRACT, - 'CreateSmartContract', - options.Permission_id - ); -}; - -const buildClearABIContract = (value, options) => { - const { contract_address, owner_address } = value; - const clearABIContract = new ClearABIContract(); - clearABIContract.setOwnerAddress(fromHexString(owner_address)); - clearABIContract.setContractAddress(fromHexString(contract_address)); - - return buildCommonTransaction( - clearABIContract, - Transaction.Contract.ContractType.CLEARABICONTRACT, - 'ClearABIContract', - options.Permission_id - ); -}; - -// updateBrokerage -const buildUpdateBrokerageContract = (value, options) => { - const { brokerage, owner_address } = value; - const updateBrokerageContract = new UpdateBrokerageContract(); - updateBrokerageContract.setOwnerAddress(fromHexString(owner_address)); - updateBrokerageContract.setBrokerage(brokerage); - - return buildCommonTransaction( - updateBrokerageContract, - Transaction.Contract.ContractType.UPDATEBROKERAGECONTRACT, - 'UpdateBrokerageContract', - options.Permission_id - ); -}; - -// createToken -const buildAssetIssueContract = (value, options) => { - const { - owner_address, - name, - abbr, - description, - url, - total_supply, - trx_num, - num, - start_time, - end_time, - precision, - free_asset_net_limit, - public_free_asset_net_limit, - public_free_asset_net_usage = 0, - public_latest_free_net_time = 0, - vote_score = 0, - frozen_supply, - } = value; - let assetIssueContract = new AssetIssueContract(); - assetIssueContract.setOwnerAddress(fromHexString(owner_address)); - if (name) { - assetIssueContract.setName(fromHexString(name.replace(/^0x/, ''))); - } - if (abbr) { - assetIssueContract.setAbbr(fromHexString(abbr.replace(/^0x/, ''))); - } - assetIssueContract.setTotalSupply(total_supply); - assetIssueContract.setNum(num); - assetIssueContract.setEndTime(end_time); - assetIssueContract.setStartTime(start_time); - assetIssueContract.setTrxNum(trx_num); - assetIssueContract.setVoteScore(vote_score); - if (precision) { - assetIssueContract.setPrecision(precision); - } - if (public_latest_free_net_time) { - assetIssueContract.setPublicLatestFreeNetTime( - public_latest_free_net_time - ); - } - if (description) { - assetIssueContract.setDescription( - fromHexString(description.replace(/^0x/, '')) - ); - } - if (url) { - assetIssueContract.setUrl(fromHexString(url.replace(/^0x/, ''))); - } - - assetIssueContract.setPublicFreeAssetNetUsage(public_free_asset_net_usage); - assetIssueContract.setFreeAssetNetLimit(free_asset_net_limit); - assetIssueContract.setPublicFreeAssetNetLimit(public_free_asset_net_limit); - if (frozen_supply) { - let frozenSupplyContract = new AssetIssueContract.FrozenSupply(); - frozenSupplyContract.setFrozenAmount(frozen_supply.length ? frozen_supply[0].frozen_amount : frozen_supply.frozen_amount); - frozenSupplyContract.setFrozenDays(frozen_supply.length ? frozen_supply[0].frozen_days : frozen_supply.frozen_days); - assetIssueContract.addFrozenSupply(frozenSupplyContract); - } - return buildCommonTransaction( - assetIssueContract, - Transaction.Contract.ContractType.ASSETISSUECONTRACT, - 'AssetIssueContract', - options.Permission_id - ); -}; - -//createAccount -const buildAccountCreateContract = (value, options) => { - let accountCreateContract = new AccountCreateContract(); - const { account_address, owner_address } = value; - accountCreateContract.setOwnerAddress(fromHexString(owner_address)); - accountCreateContract.setAccountAddress( - fromHexString(account_address.replace(/^0x/, '')) - ); - return buildCommonTransaction( - accountCreateContract, - Transaction.Contract.ContractType.ACCOUNTCREATECONTRACT, - 'AccountCreateContract', - options.Permission_id - ); -} - -// updateAccount -const buildAccountUpdateContract = (value, options) => { - let accountUpdateContract = new AccountUpdateContract(); - const { account_name, owner_address } = value; - accountUpdateContract.setOwnerAddress(fromHexString(owner_address)); - accountUpdateContract.setAccountName( - fromHexString(account_name.replace(/^0x/, '')) - ); - return buildCommonTransaction( - accountUpdateContract, - Transaction.Contract.ContractType.ACCOUNTUPDATECONTRACT, - 'AccountUpdateContract', - options.Permission_id - ); -}; - -// setAccountId -const buildSetAccountIdContract = (value, options) => { - let setAccountIdContract = new SetAccountIdContract(); - const { account_id, owner_address } = value; - setAccountIdContract.setOwnerAddress(fromHexString(owner_address)); - setAccountIdContract.setAccountId( - fromHexString(account_id.replace(/^0x/, '')) - ); - return buildCommonTransaction( - setAccountIdContract, - Transaction.Contract.ContractType.SETACCOUNTIDCONTRACT, - 'SetAccountIdContract', - options.Permission_id - ); -}; - -const buildProposalCreateContract = (value, options) => { - let proposalCreateContract = new ProposalCreateContract(); - const { owner_address, parameters } = value; - proposalCreateContract.setOwnerAddress(fromHexString(owner_address)); - parameters.forEach((parameter) => { - proposalCreateContract - .getParametersMap() - .set(parameter.key, parameter.value); - }); - return buildCommonTransaction( - proposalCreateContract, - Transaction.Contract.ContractType.PROPOSALCREATECONTRACT, - 'ProposalCreateContract', - options.Permission_id - ); -}; - -const buildProposalDeleteContract = (value, options) => { - let proposalDeleteContract = new ProposalDeleteContract(); - const { owner_address, proposal_id } = value; - proposalDeleteContract.setOwnerAddress(fromHexString(owner_address)); - proposalDeleteContract.setProposalId(proposal_id); - return buildCommonTransaction( - proposalDeleteContract, - Transaction.Contract.ContractType.PROPOSALDELETECONTRACT, - 'ProposalDeleteContract', - options.Permission_id - ); -}; - -const buildVoteProposalContract = (value, options) => { - let proposalVoteContract = new ProposalApproveContract(); - const { owner_address, proposal_id, is_add_approval } = value; - proposalVoteContract.setOwnerAddress(fromHexString(owner_address)); - proposalVoteContract.setProposalId(proposal_id); - proposalVoteContract.setIsAddApproval(is_add_approval); - return buildCommonTransaction( - proposalVoteContract, - Transaction.Contract.ContractType.PROPOSALAPPROVECONTRACT, - 'ProposalApproveContract', - options.Permission_id - ); -}; - -const buildExchangeCreateContract = (value, options) => { - const exchangeCreateContract = new ExchangeCreateContract(); - const { - owner_address, - first_token_id, - first_token_balance, - second_token_id, - second_token_balance, - } = value; - exchangeCreateContract.setOwnerAddress(fromHexString(owner_address)); - exchangeCreateContract.setFirstTokenId( - fromHexString(first_token_id.replace(/^0x/, '')) - ); - exchangeCreateContract.setFirstTokenBalance(first_token_balance); - exchangeCreateContract.setSecondTokenId( - fromHexString(second_token_id.replace(/^0x/, '')) - ); - exchangeCreateContract.setSecondTokenBalance(second_token_balance); - return buildCommonTransaction( - exchangeCreateContract, - Transaction.Contract.ContractType.EXCHANGECREATECONTRACT, - 'ExchangeCreateContract', - options.Permission_id - ); -}; - -const buildExchangeInjectContract = (value, options) => { - const exchangeInjectContract = new ExchangeInjectContract(); - const { owner_address, exchange_id, token_id, quant } = value; - exchangeInjectContract.setOwnerAddress(fromHexString(owner_address)); - exchangeInjectContract.setExchangeId(exchange_id); - exchangeInjectContract.setTokenId( - fromHexString(token_id.replace(/^0x/, '')) - ); - exchangeInjectContract.setQuant(quant); - return buildCommonTransaction( - exchangeInjectContract, - Transaction.Contract.ContractType.EXCHANGEINJECTCONTRACT, - 'ExchangeInjectContract', - options.Permission_id - ); -}; - -const buildExchangeWithdrawContract = (value, options) => { - const exchangeWithdrawContract = new ExchangeWithdrawContract(); - const { owner_address, exchange_id, token_id, quant } = value; - exchangeWithdrawContract.setOwnerAddress(fromHexString(owner_address)); - exchangeWithdrawContract.setExchangeId(exchange_id); - exchangeWithdrawContract.setTokenId( - fromHexString(token_id.replace(/^0x/, '')) - ); - exchangeWithdrawContract.setQuant(quant); - return buildCommonTransaction( - exchangeWithdrawContract, - Transaction.Contract.ContractType.EXCHANGEWITHDRAWCONTRACT, - 'ExchangeWithdrawContract', - options.Permission_id - ); -}; - -const buildExchangeTransactionContract = (value, options) => { - const exchangeTransactionContract = new ExchangeTransactionContract(); - const { owner_address, exchange_id, token_id, quant, expected } = value; - exchangeTransactionContract.setOwnerAddress(fromHexString(owner_address)); - exchangeTransactionContract.setExchangeId(exchange_id); - exchangeTransactionContract.setTokenId( - fromHexString(token_id.replace(/^0x/, '')) - ); - exchangeTransactionContract.setQuant(quant); - exchangeTransactionContract.setExpected(expected); - return buildCommonTransaction( - exchangeTransactionContract, - Transaction.Contract.ContractType.EXCHANGETRANSACTIONCONTRACT, - 'ExchangeTransactionContract', - options.Permission_id - ); -}; - -const buildUpdateSettingContract = (value, options) => { - const updateSettingContract = new UpdateSettingContract(); - const { owner_address, contract_address, consume_user_resource_percent } = - value; - updateSettingContract.setOwnerAddress(fromHexString(owner_address)); - updateSettingContract.setContractAddress(fromHexString(contract_address)); - updateSettingContract.setConsumeUserResourcePercent( - consume_user_resource_percent - ); - return buildCommonTransaction( - updateSettingContract, - Transaction.Contract.ContractType.UPDATESETTINGCONTRACT, - 'UpdateSettingContract', - options.Permission_id - ); -}; - -const buildUpdateEnergyLimitContract = (value, options) => { - const updateEnergyLimitContract = new UpdateEnergyLimitContract(); - const { owner_address, contract_address, origin_energy_limit } = value; - updateEnergyLimitContract.setOwnerAddress(fromHexString(owner_address)); - updateEnergyLimitContract.setContractAddress( - fromHexString(contract_address) - ); - updateEnergyLimitContract.setOriginEnergyLimit(origin_energy_limit); - return buildCommonTransaction( - updateEnergyLimitContract, - Transaction.Contract.ContractType.UPDATEENERGYLIMITCONTRACT, - 'UpdateEnergyLimitContract', - options.Permission_id - ); -}; - -const buildAccountPermissionUpdateContract = (value, options) => { - const accountPermissionUpdateContract = - new AccountPermissionUpdateContract(); - const { owner_address, owner, witness, actives } = value; - accountPermissionUpdateContract.setOwnerAddress( - fromHexString(owner_address) - ); - const getType = type => { - // no type when permission_name is owner - if (isNaN(type)) return type === 'Active' ? 2 : type === 'Witness' ? 1 : 0; - return type; - } - const buildPermission = (data) => { - // no type when permission_name is owner - const permission = new Permission(); - const { - type, - id, - permission_name, - threshold, - parentId, - operations, - keys, - } = data; - permission.setType(getType(type)); - permission.setId(id); - permission.setPermissionName(permission_name); - permission.setThreshold(threshold); - if (parentId) { - permission.setParentId(parentId); - } - if (operations) { - permission.setOperations(fromHexString(operations)); - } - if (keys) { - permission.setKeysList( - keys.map((key) => { - const keyBuilder = new Key(); - keyBuilder.setAddress(fromHexString(key.address)); - keyBuilder.setWeight(key.weight); - return keyBuilder; - }) - ); - } - return permission; - }; - if (owner) { - accountPermissionUpdateContract.setOwner(buildPermission(owner)); - } - if (witness) { - accountPermissionUpdateContract.setWitness(buildPermission(witness)); - } - if (actives) { - if (Array.isArray(actives)) { - accountPermissionUpdateContract.setActivesList( - actives.map(active => buildPermission(active)) - ); - } else { - accountPermissionUpdateContract.setActivesList([ - buildPermission(actives), - ]); - } - } - return buildCommonTransaction( - accountPermissionUpdateContract, - Transaction.Contract.ContractType.ACCOUNTPERMISSIONUPDATECONTRACT, - 'AccountPermissionUpdateContract', - options.Permission_id - ); -}; - -const buildUpdateAssetContract = (value, options) => { - const updateAssetContract = new UpdateAssetContract(); - const { owner_address, description, url, new_limit, new_public_limit } = value; - updateAssetContract.setOwnerAddress(fromHexString(owner_address)); - if (description) { - updateAssetContract.setDescription(fromHexString(description.replace(/^0x/, ''))); - } - if (url) { - updateAssetContract.setUrl(fromHexString(url.replace(/^0x/, ''))); - } - if(new_limit) { - updateAssetContract.setNewLimit(new_limit); - } - if(new_public_limit) { - updateAssetContract.setNewPublicLimit(new_public_limit); - } - return buildCommonTransaction( - updateAssetContract, - Transaction.Contract.ContractType.UPDATEASSETCONTRACT, - 'UpdateAssetContract', - options.Permission_id - ); -} - -const contractJsonToProtobuf = (contract, value, options) => { - switch (contract.type) { - case 'TransferContract': - return buildTransferContract(value, options); - case 'TransferAssetContract': - return buildTransferAssetContract(value, options); - case 'ParticipateAssetIssueContract': - return buildParticipateAssetIssueContract(value, options); - case 'TriggerSmartContract': - return buildTriggerSmartContract(value, options); - case 'FreezeBalanceContract': - return buildFreezeBalanceContract(value, options); - case 'UnfreezeBalanceContract': - return buildUnfreezeBalanceContract(value, options); - case 'WithdrawBalanceContract': - return buildWithdrawBalanceContract(value, options); - case 'FreezeBalanceV2Contract': - return buildFreezeBalanceV2Contract(value, options); - case 'UnfreezeBalanceV2Contract': - return buildUnfreezeBalanceV2Contract(value, options); - case 'DelegateResourceContract': - return buildDelegateResourceContract(value, options); - case 'UnDelegateResourceContract': - return buildUnDelegateResourceContract(value, options); - case 'WithdrawExpireUnfreezeContract': - return buildWithdrawExpireUnfreezeContract(value, options); - case 'WitnessCreateContract': - return buildCreateWitness(value, options); - case 'VoteWitnessContract': - return buildVoteWitnessAccount(value, options); - case 'CreateSmartContract': - return buildCreateSmartContract(value, options); - case 'ClearABIContract': - return buildClearABIContract(value, options); - case 'UpdateBrokerageContract': - return buildUpdateBrokerageContract(value, options); - case 'AssetIssueContract': - return buildAssetIssueContract(value, options); - case 'AccountCreateContract': - return buildAccountCreateContract(value, options); - case 'AccountUpdateContract': - return buildAccountUpdateContract(value, options); - case 'SetAccountIdContract': - return buildSetAccountIdContract(value, options); - case 'ProposalCreateContract': - return buildProposalCreateContract(value, options); - case 'ProposalDeleteContract': - return buildProposalDeleteContract(value, options); - case 'ProposalApproveContract': - return buildVoteProposalContract(value, options); - case 'ExchangeCreateContract': - return buildExchangeCreateContract(value, options); - case 'ExchangeInjectContract': - return buildExchangeInjectContract(value, options); - case 'ExchangeWithdrawContract': - return buildExchangeWithdrawContract(value, options); - case 'ExchangeTransactionContract': - return buildExchangeTransactionContract(value, options); - case 'UpdateSettingContract': - return buildUpdateSettingContract(value, options); - case 'UpdateEnergyLimitContract': - return buildUpdateEnergyLimitContract(value, options); - case 'AccountPermissionUpdateContract': - return buildAccountPermissionUpdateContract(value, options); - case 'UpdateAssetContract': - return buildUpdateAssetContract(value, options); - } -}; - -const txJsonToPb = (transaction) => { - const rawData = transaction['raw_data']; - const contractJson = rawData.contract[0]; - const data = contractJson.parameter.value; - const options = { Permission_id: contractJson.Permission_id }; - const transactionObj = contractJsonToProtobuf(contractJson, data, options); - - const rawDataObj = transactionObj.getRawData(); - rawDataObj.setRefBlockBytes(fromHexString(rawData.ref_block_bytes)); - rawDataObj.setRefBlockHash(fromHexString(rawData.ref_block_hash)); - if (rawData.data) { - rawDataObj.setData(fromHexString(rawData.data)); - } - - if (rawData.fee_limit) { - rawDataObj.setFeeLimit(rawData.fee_limit); - } - - if (rawData.expiration) { - rawDataObj.setExpiration(rawData.expiration); - } - - if (rawData.timestamp) { - rawDataObj.setTimestamp(rawData.timestamp); - } - - transactionObj.setRawData(rawDataObj); - - return transactionObj; -}; - -const txJsonToPbWithArgs = ( - transaction, - args = {}, - options = {} -) => { - const rawData = transaction['raw_data']; - const contractJson = rawData.contract[0]; - - const transactionObj = contractJsonToProtobuf(contractJson, args, { Permission_id: args?.Permission_id }); - - const rawDataObj = transactionObj.getRawData(); - rawDataObj.setRefBlockBytes(fromHexString(rawData.ref_block_bytes)); - rawDataObj.setRefBlockHash(fromHexString(rawData.ref_block_hash)); - // for memo - if (options.data) { - rawDataObj.setData(fromHexString(options.data.replace(/^0x/, ''))); - } - - if (options.fee_limit || args.fee_limit) { - rawDataObj.setFeeLimit(options.fee_limit || args.fee_limit); - } - - if (rawData.expiration) { - rawDataObj.setExpiration(rawData.expiration); - } - - if (rawData.timestamp) { - rawDataObj.setTimestamp(rawData.timestamp); - } - - transactionObj.setRawData(rawDataObj); - - return transactionObj; -}; - -const compareTransaction = (transaction, transactionPb) => { - const rawDataBytes = transactionPb.getRawData().serializeBinary(); - const rawDataHex = byteArray2hexStr(rawDataBytes); - const txID = sha256(rawDataBytes); - return ( - rawDataHex.toLowerCase() === transaction.raw_data_hex.toLowerCase() && - txID.replace(/^0x/, '').toLowerCase() === - transaction.txID.replace(/^0x/, '').toLowerCase() - ); - -}; - -const txPbToRawDataHex = (pb) => { - return byteArray2hexStr(pb.getRawData().serializeBinary()); -}; - -const txCheck = (transaction) => { - const transactionPb = txJsonToPb(transaction); - return compareTransaction(transaction, transactionPb); -}; - -const txCheckWithArgs = (transaction, args, options) => { - const transactionPb = txJsonToPbWithArgs( - transaction, - args, - options - ); - return compareTransaction(transaction, transactionPb); -}; - -const txPbToTxID = (transactionPb) => { - const rawDataBytes = transactionPb.getRawData().serializeBinary(); - const txID = sha256(rawDataBytes); - return txID; -} - -export { - txJsonToPb, - txPbToTxID, - txPbToRawDataHex, - txJsonToPbWithArgs, - txCheckWithArgs, - txCheck, -}; diff --git a/src/utils/typedData.js b/src/utils/typedData.js deleted file mode 100644 index e404f937..00000000 --- a/src/utils/typedData.js +++ /dev/null @@ -1,363 +0,0 @@ -//import { TypedDataDomain, TypedDataField } from "@ethersproject/providerabstract-signer"; -import TronWeb from "../index"; -import { id, keccak256, concat, defineProperties, getBigInt, getBytes, hexlify, mask, toTwos, toBeHex, zeroPadValue, assertArgument } from "ethers"; -import { ADDRESS_PREFIX_REGEX } from './address'; - -function getAddress(address) { - return TronWeb.address.toHex(address).replace(ADDRESS_PREFIX_REGEX, '0x'); -}; -function getTronAddress(address) { - return TronWeb.address.toHex(address); -}; -const padding = new Uint8Array(32); -padding.fill(0); -const BN__1 = BigInt(-1); -const BN_0 = BigInt(0); -const BN_1 = BigInt(1); -const BN_MAX_UINT256 = BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); - -function hexPadRight(value) { - const bytes = getBytes(value); - const padOffset = bytes.length % 32; - if (padOffset) { - return concat([bytes, padding.slice(padOffset)]); - } - return hexlify(bytes); -} -const hexTrue = toBeHex(BN_1, 32); -const hexFalse = toBeHex(BN_0, 32); -const domainFieldTypes = { - name: "string", - version: "string", - chainId: "uint256", - verifyingContract: "address", - salt: "bytes32" -}; -const domainFieldNames = [ - "name", "version", "chainId", "verifyingContract", "salt" -]; -function checkString(key) { - return function (value) { - assertArgument(typeof (value) === "string", `invalid domain value for ${JSON.stringify(key)}`, `domain.${key}`, value); - return value; - }; -} -const domainChecks = { - name: checkString("name"), - version: checkString("version"), - chainId: function (value) { - return getBigInt(value, "domain.chainId"); - }, - verifyingContract: function (value) { - try { - return getTronAddress(value).toLowerCase(); - } - catch (error) { } - assertArgument(false, `invalid domain value "verifyingContract"`, "domain.verifyingContract", value); - }, - salt: function (value) { - const bytes = getBytes(value, "domain.salt"); - assertArgument(bytes.length === 32, `invalid domain value "salt"`, "domain.salt", value); - return hexlify(bytes); - } -}; -function getBaseEncoder(type) { - // intXX and uintXX - { - const match = type.match(/^(u?)int(\d*)$/); - if (match) { - const signed = (match[1] === ""); - const width = parseInt(match[2] || "256"); - assertArgument(width % 8 === 0 && width !== 0 && width <= 256 && (match[2] == null || match[2] === String(width)), "invalid numeric width", "type", type); - const boundsUpper = mask(BN_MAX_UINT256, signed ? (width - 1) : width); - const boundsLower = signed ? ((boundsUpper + BN_1) * BN__1) : BN_0; - return function (_value) { - const value = getBigInt(_value, "value"); - assertArgument(value >= boundsLower && value <= boundsUpper, `value out-of-bounds for ${type}`, "value", value); - if (!signed) return toBeHex(value, 32); - return toBeHex(toTwos(value, 256), 32); - }; - } - } - // bytesXX - { - const match = type.match(/^bytes(\d+)$/); - if (match) { - const width = parseInt(match[1]); - assertArgument(width !== 0 && width <= 32 && match[1] === String(width), "invalid bytes width", "type", type); - return function (value) { - const bytes = getBytes(value); - assertArgument(bytes.length === width, `invalid length for ${type}`, "value", value); - return hexPadRight(value); - }; - } - } - switch (type) { - case "trcToken": return getBaseEncoder('uint256'); - case "address": return function (value) { - return zeroPadValue(getAddress(value), 32); - }; - case "bool": return function (value) { - return ((!value) ? hexFalse : hexTrue); - }; - case "bytes": return function (value) { - return keccak256(value); - }; - case "string": return function (value) { - return id(value); - }; - } - return null; -} -function encodeType(name, fields) { - return `${name}(${fields.map(({ name, type }) => (type + " " + name)).join(",")})`; -} -export class TypedDataEncoder { - primaryType; - #types; - get types() { - return JSON.parse(this.#types); - } - #fullTypes; - #encoderCache; - constructor(types) { - this.#types = JSON.stringify(types); - this.#fullTypes = new Map(); - this.#encoderCache = new Map(); - // Link struct types to their direct child structs - const links = new Map(); - // Link structs to structs which contain them as a child - const parents = new Map(); - // Link all subtypes within a given struct - const subtypes = new Map(); - Object.keys(types).forEach((type) => { - links.set(type, new Set()); - parents.set(type, []); - subtypes.set(type, new Set()); - }); - for (const name in types) { - const uniqueNames = new Set(); - for (const field of types[name]) { - // Check each field has a unique name - assertArgument(!uniqueNames.has(field.name), `duplicate variable name ${JSON.stringify(field.name)} in ${JSON.stringify(name)}`, "types", types); - uniqueNames.add(field.name); - // Get the base type (drop any array specifiers) - const baseType = (field.type.match(/^([^\x5b]*)(\x5b|$)/))[1] || null; - assertArgument(baseType !== name, `circular type reference to ${JSON.stringify(baseType)}`, "types", types); - // Is this a base encoding type? - const encoder = getBaseEncoder(baseType); - if (encoder) { - continue; - } - assertArgument(parents.has(baseType), `unknown type ${JSON.stringify(baseType)}`, "types", types); - // Add linkage - parents.get(baseType).push(name); - links.get(name).add(baseType); - } - } - // Deduce the primary type - const primaryTypes = Array.from(parents.keys()).filter((n) => (parents.get(n).length === 0)); - assertArgument(primaryTypes.length !== 0, "missing primary type", "types", types); - assertArgument(primaryTypes.length === 1, `ambiguous primary types or unused types: ${primaryTypes.map((t) => (JSON.stringify(t))).join(", ")}`, "types", types); - defineProperties(this, { primaryType: primaryTypes[0] }); - // Check for circular type references - function checkCircular(type, found) { - assertArgument(!found.has(type), `circular type reference to ${JSON.stringify(type)}`, "types", types); - found.add(type); - for (const child of links.get(type)) { - if (!parents.has(child)) { - continue; - } - // Recursively check children - checkCircular(child, found); - // Mark all ancestors as having this decendant - for (const subtype of found) { - subtypes.get(subtype).add(child); - } - } - found.delete(type); - } - checkCircular(this.primaryType, new Set()); - // Compute each fully describe type - for (const [name, set] of subtypes) { - const st = Array.from(set); - st.sort(); - this.#fullTypes.set(name, encodeType(name, types[name]) + st.map((t) => encodeType(t, types[t])).join("")); - } - } - getEncoder(type) { - let encoder = this.#encoderCache.get(type); - if (!encoder) { - encoder = this.#getEncoder(type); - this.#encoderCache.set(type, encoder); - } - return encoder; - } - #getEncoder(type) { - // Basic encoder type (address, bool, uint256, etc) - { - const encoder = getBaseEncoder(type); - if (encoder) { - return encoder; - } - } - // Array - const match = type.match(/^(.*)(\x5b(\d*)\x5d)$/); - if (match) { - const subtype = match[1]; - const subEncoder = this.getEncoder(subtype); - return (value) => { - assertArgument(!match[3] || parseInt(match[3]) === value.length, `array length mismatch; expected length ${parseInt(match[3])}`, "value", value); - let result = value.map(subEncoder); - if (this.#fullTypes.has(subtype)) { - result = result.map(keccak256); - } - return keccak256(concat(result)); - }; - } - // Struct - const fields = this.types[type]; - if (fields) { - const encodedType = id(this.#fullTypes.get(type)); - return (value) => { - const values = fields.map(({ name, type }) => { - const result = this.getEncoder(type)(value[name]); - if (this.#fullTypes.has(type)) { - return keccak256(result); - } - return result; - }); - values.unshift(encodedType); - return concat(values); - }; - } - assertArgument(false, `unknown type: ${type}`, "type", type); - } - encodeType(name) { - const result = this.#fullTypes.get(name); - assertArgument(result, `unknown type: ${JSON.stringify(name)}`, "name", name); - return result; - } - encodeData(type, value) { - return this.getEncoder(type)(value); - } - hashStruct(name, value) { - return keccak256(this.encodeData(name, value)); - } - encode(value) { - return this.encodeData(this.primaryType, value); - } - hash(value) { - return this.hashStruct(this.primaryType, value); - } - _visit(type, value, callback) { - // Basic encoder type (address, bool, uint256, etc) - { - const encoder = getBaseEncoder(type); - if (encoder) { - return callback(type, value); - } - } - // Array - const match = type.match(/^(.*)(\x5b(\d*)\x5d)$/); - if (match) { - assertArgument(!match[3] || parseInt(match[3]) === value.length, `array length mismatch; expected length ${parseInt(match[3])}`, "value", value); - return value.map((v) => this._visit(match[1], v, callback)); - } - // Struct - const fields = this.types[type]; - if (fields) { - return fields.reduce((accum, { name, type }) => { - accum[name] = this._visit(type, value[name], callback); - return accum; - }, {}); - } - assertArgument(false, `unknown type: ${type}`, "type", type); - } - visit(value, callback) { - return this._visit(this.primaryType, value, callback); - } - static from(types) { - return new TypedDataEncoder(types); - } - static getPrimaryType(types) { - return TypedDataEncoder.from(types).primaryType; - } - static hashStruct(name, types, value) { - return TypedDataEncoder.from(types).hashStruct(name, value); - } - static hashDomain(domain) { - const domainFields = []; - for (const name in domain) { - if (domain[name] == null) { - continue; - } - const type = domainFieldTypes[name]; - assertArgument(type, `invalid typed-data domain key: ${JSON.stringify(name)}`, "domain", domain); - domainFields.push({ name, type }); - } - domainFields.sort((a, b) => { - return domainFieldNames.indexOf(a.name) - domainFieldNames.indexOf(b.name); - }); - return TypedDataEncoder.hashStruct("EIP712Domain", { EIP712Domain: domainFields }, domain); - } - static encode(domain, types, value) { - return concat([ - "0x1901", - TypedDataEncoder.hashDomain(domain), - TypedDataEncoder.from(types).hash(value) - ]); - } - static hash(domain, types, value) { - return keccak256(TypedDataEncoder.encode(domain, types, value)); - } - static getPayload(domain, types, value) { - // Validate the domain fields - TypedDataEncoder.hashDomain(domain); - // Derive the EIP712Domain Struct reference type - const domainValues = {}; - const domainTypes = []; - domainFieldNames.forEach((name) => { - const value = domain[name]; - if (value == null) { - return; - } - domainValues[name] = domainChecks[name](value); - domainTypes.push({ name, type: domainFieldTypes[name] }); - }); - const encoder = TypedDataEncoder.from(types); - const typesWithDomain = Object.assign({}, types); - assertArgument(typesWithDomain.EIP712Domain == null, "types must not contain EIP712Domain type", "types.EIP712Domain", types); - typesWithDomain.EIP712Domain = domainTypes; - // Validate the data structures and types - encoder.encode(value); - return { - types: typesWithDomain, - domain: domainValues, - primaryType: encoder.primaryType, - message: encoder.visit(value, (type, value) => { - // bytes - if (type.match(/^bytes(\d*)/)) { - return hexlify(getBytes(value)); - } - // uint or int - if (type.match(/^u?int/)) { - return getBigInt(value).toString(); - } - switch (type) { - case "trcToken": - return getBigInt(value).toString(); - case "address": - return value.toLowerCase(); - case "bool": - return !!value; - case "string": - assertArgument(typeof (value) === "string", "invalid string", "value", value); - return value; - } - assertArgument(false, "unsupported type", "type", type); - }) - }; - } -} -//# sourceMappingURL=typed-data.js.map \ No newline at end of file diff --git a/test-git-hash b/test-git-hash deleted file mode 100644 index b2e24627..00000000 --- a/test-git-hash +++ /dev/null @@ -1 +0,0 @@ -Test failed. diff --git a/test-report b/test-report deleted file mode 100644 index d22d4b36..00000000 --- a/test-report +++ /dev/null @@ -1,58 +0,0 @@ - - - TronWeb.lib.event - Trongrid-compatible version - #getEventsByTransactionID -Sleeping for 0.5 seconds... Slept. -Sleeping for 0.5 seconds... Slept. -Sleeping for 0.5 seconds... Slept. -  ✓ should emit an unconfirmed event and get it (1562ms) -  ✓ should emit an event, wait for confirmation and get it (9139ms) - #getEventsByContractAddress -  1) should emit an event and wait for it - #contract.method.watch -  2) should watch for an event -  3) should only watch for an event with given filters - - -  2 passing (11s) - 3 failing - - 1) TronWeb.lib.event - Trongrid-compatible version - #getEventsByContractAddress - should emit an event and wait for it: - Error: the object { - "error": { - "code": 404 - "status": "Not Found" - } -} was thrown, throw an Error :) - at processTicksAndRejections (internal/process/task_queues.js:93:5) - - 2) TronWeb.lib.event - Trongrid-compatible version - #contract.method.watch - should watch for an event: - Error: the object { - "error": { - "code": 404 - "status": "Not Found" - } -} was thrown, throw an Error :) - at processTicksAndRejections (internal/process/task_queues.js:93:5) - - 3) TronWeb.lib.event - Trongrid-compatible version - #contract.method.watch - should only watch for an event with given filters: - Error: the object { - "error": { - "code": 404 - "status": "Not Found" - } -} was thrown, throw an Error :) - at processTicksAndRejections (internal/process/task_queues.js:93:5) - - - diff --git a/test/fixtures/contracts.js b/test/fixtures/contracts.js deleted file mode 100644 index 86c94674..00000000 --- a/test/fixtures/contracts.js +++ /dev/null @@ -1,637 +0,0 @@ -module.exports = { - testRevert: { - /* - pragma solidity ^0.4.18; - contract TestRevert { - address owner; - constructor() public { - } - function setOwner(address addr) public { - require(addr != 0xb6e447d1d576dE6c7f767C32a649F0AD50aE5975, "Address forbidden :-)"); - // TSeFTBYCy3r2kZNYsj86G6Yz6rsmPdYdFs - owner = addr; - } - function getOwner(uint check) public view returns (address) { - require(check == 1, "Wrong check"); - return owner; - } - function getOwner2(uint check) public view returns (address) { - require(check == 1); - return owner; - } - } - */ - contractName: "TestRevert", - abi: [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "constant": false, - "inputs": [ - { - "name": "addr", - "type": "address" - } - ], - "name": "setOwner", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "check", - "type": "uint256" - } - ], - "name": "getOwner", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "check", - "type": "uint256" - } - ], - "name": "getOwner2", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - bytecode: "0x608060405234801561001057600080fd5b5061037d806100206000396000f300608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806313af40351461005c578063877333461461009f578063c41a360a1461010c575b600080fd5b34801561006857600080fd5b5061009d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610179565b005b3480156100ab57600080fd5b506100ca60048036038101908080359060200190929190505050610274565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561011857600080fd5b50610137600480360381019080803590602001909291905050506102ae565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b73b6e447d1d576de6c7f767c32a649f0ad50ae597573ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610231576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f41646472657373206d75737420626520213d203078000000000000000000000081525060200191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600060018214151561028557600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600182141515610328576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f57726f6e6720636865636b00000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690509190505600a165627a7a7230582070775fabe424bfe924ea8b9a9f4863306d35202b9c074f195334273994260ef20029" - }, - testConstant: { - contractName: "testConstantContract", - abi: [ - { - "constant": true, - "inputs": [ - { - "name": "x", - "type": "uint256" - }, - { - "name": "y", - "type": "uint256" - } - ], - "name": "testPure", - "outputs": [ - { - "name": "z", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "pure", - "type": "function" - } - ], - bytecode: "0x608060405234801561001057600080fd5b50d3801561001d57600080fd5b50d2801561002a57600080fd5b5060e5806100396000396000f300608060405260043610603f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806307fb8ea6146044575b600080fd5b348015604f57600080fd5b50d38015605b57600080fd5b50d28015606757600080fd5b50608e600480360381019080803590602001909291908035906020019092919050505060a4565b6040518082815260200191505060405180910390f35b600080600190508284820101915050929150505600a165627a7a72305820ba2dba126dd3285cfaee13187fa53bf7d9bc09517d6afd04cd7d71098a1f90ee0029" - }, - testSetVal: { - "contractName": "SetVal", - "abi": [ - { - "constant": false, - "inputs": [ - { - "name": "_val", - "type": "uint256" - } - ], - "name": "set", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x60806040526000805534801561001457600080fd5b50d3801561002157600080fd5b50d2801561002e57600080fd5b5060e08061003d6000396000f3fe6080604052348015600f57600080fd5b50d38015601b57600080fd5b50d28015602757600080fd5b5060043610605d576000357c01000000000000000000000000000000000000000000000000000000009004806360fe47b1146062575b600080fd5b608b60048036036020811015607657600080fd5b810190808035906020019092919050505060a1565b6040518082815260200191505060405180910390f35b600081600081905550600054905091905056fea165627a7a72305820392f2cf7f1b37873349bf7ce496fb370bc80c6539de204bded6197106c530e700029" - }, - testCustomError: { - "contractName": "CustomError", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "available", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "required", - "type": "uint256" - } - ], - "name": "CustomError", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "num", - "type": "uint256" - } - ], - "name": "test", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "608060405234801561001057600080fd5b50610258806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c806329e99f0714610030575b600080fd5b61004a60048036038101906100459190610107565b61004c565b005b6000600161005b57600261005e565b60015b600161006b57600261006e565b60015b6100789190610170565b60ff1611156100c1578060016040517fa66886d30000000000000000000000000000000000000000000000000000000081526004016100b89291906101f9565b60405180910390fd5b600160008190555050565b600080fd5b6000819050919050565b6100e4816100d1565b81146100ef57600080fd5b50565b600081359050610101816100db565b92915050565b60006020828403121561011d5761011c6100cc565b5b600061012b848285016100f2565b91505092915050565b600060ff82169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061017b82610134565b915061018683610134565b9250828201905060ff81111561019f5761019e610141565b5b92915050565b6101ae816100d1565b82525050565b6000819050919050565b6000819050919050565b60006101e36101de6101d9846101b4565b6101be565b6100d1565b9050919050565b6101f3816101c8565b82525050565b600060408201905061020e60008301856101a5565b61021b60208301846101ea565b939250505056fea26469706673582212202b185bfa2794c0b915ea0c07855db187e645058c720a88c8dc41bcf60da9d72c64736f6c63430008110033" - }, - arrayParam: { - "contractName": "ArrayParam", - "abi": [ - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "address" - } - ], - "name": "balances", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "name": "addresses", - "type": "address[]" - }, - { - "name": "initialBalances", - "type": "uint256[]" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b50d3801561001d57600080fd5b50d2801561002a57600080fd5b506040516102a83803806102a88339810180604052604081101561004d57600080fd5b81019080805164010000000081111561006557600080fd5b8281019050602081018481111561007b57600080fd5b815185602082028301116401000000008211171561009857600080fd5b505092919060200180516401000000008111156100b457600080fd5b828101905060208101848111156100ca57600080fd5b81518560208202830111640100000000821117156100e757600080fd5b5050929190505050600082511115156100ff57600080fd5b8051825114151561010f57600080fd5b60008090505b825181101561019c57818181518110151561012c57fe5b90602001906020020151600080858481518110151561014757fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508080600101915050610115565b50505060fb806101ad6000396000f3fe6080604052348015600f57600080fd5b50d38015601b57600080fd5b50d28015602757600080fd5b5060043610605d576000357c01000000000000000000000000000000000000000000000000000000009004806327e235e3146062575b600080fd5b60a160048036036020811015607657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505060b7565b6040518082815260200191505060405180910390f35b6000602052806000526040600020600091509050548156fea165627a7a723058207d447cc574baeda0c964d154c92f29b2c72be467d5118d30741788a8c03c185d0029" - }, - rawParam: { - /* - pragma solidity ^0.4.18; - contract rawParam { - uint256 public check; - - constructor(uint256 _check) public { - check = _check; - } - - function setCheck(uint256 _check) public { - check = _check; - } - } - */ - contractName: "rawParam", - abi: [ - { - constant: false, - inputs: [ - { - name: "_check", - type: "uint256", - }, - ], - name: "setCheck", - outputs: [], - payable: false, - stateMutability: "nonpayable", - type: "function", - }, - { - constant: true, - inputs: [], - name: "check", - outputs: [ - { - name: "", - type: "uint256", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - ], - bytecode: - "0x608060405234801561001057600080fd5b5060405160208061012583398101806040528101908080519060200190929190505050806000819055505060dc806100496000396000f3006080604052600436106049576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632c948bd214604e578063919840ad146078575b600080fd5b348015605957600080fd5b5060766004803603810190808035906020019092919050505060a0565b005b348015608357600080fd5b50608a60aa565b6040518082815260200191505060405180910390f35b8060008190555050565b600054815600a165627a7a7230582084a638eb1bcab674b68b98bc8407c96a2e186016c5da95ffcf421c1d40d0feb60029", - }, - funcABIV2: { - /* - pragma solidity ^0.4.18; - contract funcABIV2 { - uint256 public check; - - constructor(uint256 _check) public { - check = _check; - } - - function setCheck(uint256 _check) public { - check = _check; - } - } - */ - contractName: "funcABIV2", - abi: [ - { - "inputs": [ - { - "internalType": "uint256", - "name": "_check", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "check", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_check", - "type": "uint256" - } - ], - "name": "setCheck", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - bytecode: - "0x608060405234801561001057600080fd5b5060405160208061012583398101806040528101908080519060200190929190505050806000819055505060dc806100496000396000f3006080604052600436106049576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632c948bd214604e578063919840ad146078575b600080fd5b348015605957600080fd5b5060766004803603810190808035906020019092919050505060a0565b005b348015608357600080fd5b50608a60aa565b6040518082815260200191505060405180910390f35b8060008190555050565b600054815600a165627a7a7230582084a638eb1bcab674b68b98bc8407c96a2e186016c5da95ffcf421c1d40d0feb60029", - }, - funcABIV2_2: { - "bytecode": "0x6060604052341561000f57600080fd5b6102888061001e6000396000f300606060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063f8a8fd6d14610046575b600080fd5b341561005157600080fd5b61005961006f565b6040516100669190610213565b60405180910390f35b61007761015e565b731d39a67ed2fcff49d955aefef526e36995453e87816000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050731a8d6d77ba7102532ce756c64ecbd6d20b36257f816020019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505073cfff478412982dc11d3700747fa1972815853776816040019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505090565b606060405190810160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681525090565b6101cb8161022e565b82525050565b6060820160008201516101e760008501826101c2565b5060208201516101fa60208501826101c2565b50604082015161020d60408501826101c2565b50505050565b600060608201905061022860008301846101d1565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff821690509190505600a265627a7a723058206daa289c202b91f390e524f86617f5aa46ded7b43470b1d039eed33244b373fc6c6578706572696d656e74616cf50037", - "result": "0x0000000000000000000000001d39a67ed2fcff49d955aefef526e36995453e870000000000000000000000001a8d6d77ba7102532ce756c64ecbd6d20b36257f000000000000000000000000cfff478412982dc11d3700747fa1972815853776", - "interface": "[{\"constant\":true,\"inputs\":[],\"name\":\"test\",\"outputs\":[{\"components\":[{\"name\":\"a\",\"type\":\"address\"},{\"name\":\"b\",\"type\":\"address\"},{\"name\":\"c\",\"type\":\"address\"}],\"name\":\"r0\",\"type\":\"tuple\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"}]", - "name": "random-0", - "runtimeBytecode": "0x606060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063f8a8fd6d14610046575b600080fd5b341561005157600080fd5b61005961006f565b6040516100669190610213565b60405180910390f35b61007761015e565b731d39a67ed2fcff49d955aefef526e36995453e87816000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050731a8d6d77ba7102532ce756c64ecbd6d20b36257f816020019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505073cfff478412982dc11d3700747fa1972815853776816040019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505090565b606060405190810160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681525090565b6101cb8161022e565b82525050565b6060820160008201516101e760008501826101c2565b5060208201516101fa60208501826101c2565b50604082015161020d60408501826101c2565b50505050565b600060608201905061022860008301846101d1565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff821690509190505600a265627a7a723058206daa289c202b91f390e524f86617f5aa46ded7b43470b1d039eed33244b373fc6c6578706572696d656e74616cf50037", - "source": "// Test: random-0\n// Comnpiler: 0.4.18+commit.9cf6e910\n// [{\"type\":\"tuple\",\"name\":\"Struct47985BF5FB\",\"struct\":\" struct Struct47985BF5FB {\\n address a;\\n address b;\\n address c;\\n }\\n\",\"value\":[{\"type\":\"address\",\"name\":\"address\",\"value\":\"0x1D39a67eD2fcfF49D955aEfEF526e36995453E87\"},{\"type\":\"address\",\"name\":\"address\",\"value\":\"0x1a8D6D77ba7102532CE756c64EcBd6d20B36257f\"},{\"type\":\"address\",\"name\":\"address\",\"value\":\"0xcFfF478412982dc11d3700747FA1972815853776\"}]}]\n \npragma experimental ABIEncoderV2;\npragma solidity ^0.4.18;\n\ncontract Test {\n struct Struct47985BF5FB {\n address a;\n address b;\n address c;\n }\n\n function test() pure returns (Struct47985BF5FB r0) {\n r0.a = address(0x1D39a67eD2fcfF49D955aEfEF526e36995453E87);\n r0.b = address(0x1a8D6D77ba7102532CE756c64EcBd6d20B36257f);\n r0.c = address(0xcFfF478412982dc11d3700747FA1972815853776);\n }\n}\n", - "types": "[\"tuple(address,address,address)\"]", - "values": "[{\"type\":\"tuple\",\"value\":[{\"type\":\"string\",\"value\":\"0x1D39a67eD2fcfF49D955aEfEF526e36995453E87\"},{\"type\":\"string\",\"value\":\"0x1a8D6D77ba7102532CE756c64EcBd6d20B36257f\"},{\"type\":\"string\",\"value\":\"0xcFfF478412982dc11d3700747FA1972815853776\"}]}]", - "version": "0.4.18+commit.9cf6e910" - }, - funcABIV2_3: { - /* - pragma experimental ABIEncoderV2; - contract Test { - struct Struct47985BF5FB { - address a; - address b; - address c; - } - mapping (uint256 => Struct47985BF5FB) public s; - - function setStruct(Struct47985BF5FB calldata _s) public { - s[0] = Struct47985BF5FB(_s.a,_s.b,_s.c); - } - - function get1() public view returns(Struct47985BF5FB memory s2){ - s2 = s[0]; - - } - */ - contractName: "funcABIV2_3", - abi: [ - { - "inputs": [], - "name": "get1", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "a", - "type": "address" - }, - { - "internalType": "address", - "name": "b", - "type": "address" - }, - { - "internalType": "address", - "name": "c", - "type": "address" - } - ], - "internalType": "struct Test.Struct47985BF5FB", - "name": "s2", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "s", - "outputs": [ - { - "internalType": "address", - "name": "a", - "type": "address" - }, - { - "internalType": "address", - "name": "b", - "type": "address" - }, - { - "internalType": "address", - "name": "c", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "a", - "type": "address" - }, - { - "internalType": "address", - "name": "b", - "type": "address" - }, - { - "internalType": "address", - "name": "c", - "type": "address" - } - ], - "internalType": "struct Test.Struct47985BF5FB", - "name": "_s", - "type": "tuple" - } - ], - "name": "setStruct", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - bytecode: - "0x608060405234801561001057600080fd5b50d3801561001d57600080fd5b50d2801561002a57600080fd5b506106bd8061003a6000396000f3fe608060405234801561001057600080fd5b50d3801561001d57600080fd5b50d2801561002a57600080fd5b506004361061005b5760003560e01c8063054c1a75146100605780630de3848f1461007e57806352efd6851461009a575b600080fd5b6100686100cc565b60405161007591906105d7565b60405180910390f35b610098600480360381019061009391906104e6565b6101f8565b005b6100b460048036038101906100af9190610513565b610378565b6040516100c3939291906105a0565b60405180910390f35b6100d4610402565b6000808081526020019081526020016000206040518060600160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681525050905090565b604051806060016040528082600001602081019061021691906104b9565b73ffffffffffffffffffffffffffffffffffffffff16815260200182602001602081019061024491906104b9565b73ffffffffffffffffffffffffffffffffffffffff16815260200182604001602081019061027291906104b9565b73ffffffffffffffffffffffffffffffffffffffff1681525060008080815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555090505050565b60006020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905083565b6040518060600160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681525090565b60008135905061047481610659565b61047d816105f2565b905092915050565b60006060828403121561049b5761049a61064f565b5b81905092915050565b6000813590506104b381610670565b92915050565b6000602082840312156104cf576104ce610654565b5b60006104dd84828501610465565b91505092915050565b6000606082840312156104fc576104fb610654565b5b600061050a84828501610485565b91505092915050565b60006020828403121561052957610528610654565b5b6000610537848285016104a4565b91505092915050565b610549816105f2565b82525050565b610558816105f2565b82525050565b6060820160008201516105746000850182610540565b5060208201516105876020850182610540565b50604082015161059a6040850182610540565b50505050565b60006060820190506105b5600083018661054f565b6105c2602083018561054f565b6105cf604083018461054f565b949350505050565b60006060820190506105ec600083018461055e565b92915050565b60006105fd82610604565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600074ffffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600080fd5b600080fd5b61066281610624565b811461066d57600080fd5b50565b61067981610645565b811461068457600080fd5b5056fea26474726f6e5822122033b02c1792f1c2b017ea3cc155a5c31bdd6eff931f11f2a9095eb6c3bfc56c9764736f6c63430008060033", - }, - funcABIV2_4: { - /* - pragma experimental ABIEncoderV2; - contract Test { - struct Struct47985BF5FB { - address a; - trcToken b; - address c; - } - mapping (uint256 => Struct47985BF5FB) public s; - - function setStruct(Struct47985BF5FB calldata _s) public { - s[0] = Struct47985BF5FB(_s.a,_s.b,_s.c); - } - - function get() public view returns(Struct47985BF5FB memory s2){ - s2 = s[0]; - } - - } - */ - contractName: "funcABIV2_4", - abi: [ - { - "inputs": [], - "name": "get", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "a", - "type": "address" - }, - { - "internalType": "trcToken", - "name": "b", - "type": "trcToken" - }, - { - "internalType": "address", - "name": "c", - "type": "address" - } - ], - "internalType": "struct Test.Struct47985BF5FB", - "name": "s2", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "s", - "outputs": [ - { - "internalType": "address", - "name": "a", - "type": "address" - }, - { - "internalType": "trcToken", - "name": "b", - "type": "trcToken" - }, - { - "internalType": "address", - "name": "c", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "a", - "type": "address" - }, - { - "internalType": "trcToken", - "name": "b", - "type": "trcToken" - }, - { - "internalType": "address", - "name": "c", - "type": "address" - } - ], - "internalType": "struct Test.Struct47985BF5FB", - "name": "_s", - "type": "tuple" - } - ], - "name": "setStruct", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - bytecode: - "0x608060405234801561001057600080fd5b50d3801561001d57600080fd5b50d2801561002a57600080fd5b506106028061003a6000396000f3fe608060405234801561001057600080fd5b50d3801561001d57600080fd5b50d2801561002a57600080fd5b506004361061005b5760003560e01c806352efd685146100605780635aeccbe6146100925780636d4ce63c146100ae575b600080fd5b61007a60048036038101906100759190610430565b6100cc565b604051610089939291906104db565b60405180910390f35b6100ac60048036038101906100a79190610403565b610136565b005b6100b6610255565b6040516100c39190610512565b60405180910390f35b60006020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905083565b604051806060016040528082600001602081019061015491906103d6565b73ffffffffffffffffffffffffffffffffffffffff1681526020018260200135815260200182604001602081019061018c91906103d6565b73ffffffffffffffffffffffffffffffffffffffff1681525060008080815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555090505050565b61025d610335565b6000808081526020019081526020016000206040518060600160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681525050905090565b6040518060600160405280600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff1681525090565b6000813590506103918161059e565b61039a8161052d565b905092915050565b6000606082840312156103b8576103b7610594565b5b81905092915050565b6000813590506103d0816105b5565b92915050565b6000602082840312156103ec576103eb610599565b5b60006103fa84828501610382565b91505092915050565b60006060828403121561041957610418610599565b5b6000610427848285016103a2565b91505092915050565b60006020828403121561044657610445610599565b5b6000610454848285016103c1565b91505092915050565b6104668161052d565b82525050565b6104758161052d565b82525050565b606082016000820151610491600085018261045d565b5060208201516104a460208501826104bd565b5060408201516104b7604085018261045d565b50505050565b6104c68161053f565b82525050565b6104d58161053f565b82525050565b60006060820190506104f0600083018661046c565b6104fd60208301856104cc565b61050a604083018461046c565b949350505050565b6000606082019050610527600083018461047b565b92915050565b600061053882610549565b9050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600074ffffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600080fd5b600080fd5b6105a781610569565b81146105b257600080fd5b50565b6105be8161058a565b81146105c957600080fd5b5056fea26474726f6e5822122003e6f6fe8adb4a16e48e773436d2d36d3bcf3d16227953199ec68896e85b82b264736f6c63430008060033", - }, - testPayable: { - // // SPDX-License-Identifier: GPL-3.0 - - // pragma solidity >=0.8.2 <0.9.0; - - // /** - // * @title Storage - // * @dev Store & retrieve value in a variable - // * @custom:dev-run-script ./scripts/deploy_with_ethers.ts - // */ - // contract Storage { - - // uint256 number; - - // constructor() payable {} - - // /** - // * @dev Store value in variable - // * @param num value to store - // */ - // function store(uint256 num) public { - // number = num; - // } - - // /** - // * @dev Return value - // * @return value of 'number' - // */ - // function retrieve() public view returns (uint256){ - // return number; - // } - // } - abi: [ - { - "inputs": [], - "stateMutability": "payable", - "type": "constructor" - }, - { - "inputs": [], - "name": "retrieve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "num", - "type": "uint256" - } - ], - "name": "store", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - bytecode: '6080604052610150806100136000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80632e64cec11461003b5780636057361d14610059575b600080fd5b610043610075565b60405161005091906100a1565b60405180910390f35b610073600480360381019061006e91906100ed565b61007e565b005b60008054905090565b8060008190555050565b6000819050919050565b61009b81610088565b82525050565b60006020820190506100b66000830184610092565b92915050565b600080fd5b6100ca81610088565b81146100d557600080fd5b50565b6000813590506100e7816100c1565b92915050565b600060208284031215610103576101026100bc565b5b6000610111848285016100d8565b9150509291505056fea2646970667358221220faba02a38acdad1a1b2748c7129911318b940db9316dc7e2f6e9a565a0276d6d64736f6c63430008120033', - } -} diff --git a/test/helpers/BlockLib.js b/test/helpers/BlockLib.js deleted file mode 100644 index 1b2af3ab..00000000 --- a/test/helpers/BlockLib.js +++ /dev/null @@ -1,32 +0,0 @@ - -const injectPromise = require('injectpromise') - -class BlockLib { - - constructor(tronWeb = false) { - if (!tronWeb) - throw new Error('Expected instances of TronWeb and utils'); - this.tronWeb = tronWeb; - this.injectPromise = injectPromise(this); - } - - async getCurrent(callback = false) { - - if (!callback) - return this.injectPromise(this.getCurrent); - - this.tronWeb.fullNode.request('wallet/getnowblock').then(block => { - block.fromPlugin = true - callback(null, block); - }).catch(err => callback(err)); - } - - pluginInterface() { - return { - requires: '^6.0.0', - fullClass: true - } - } -} - -module.exports = BlockLib diff --git a/test/helpers/GetNowBlock.js b/test/helpers/GetNowBlock.js deleted file mode 100644 index d599ab15..00000000 --- a/test/helpers/GetNowBlock.js +++ /dev/null @@ -1,53 +0,0 @@ - -let someParameter - -class GetNowBlock { - - constructor(tronWeb = false) { - if (!tronWeb) - throw new Error('Expected instance of TronWeb'); - - this.tronWeb = tronWeb; - } - - async someMethod(callback = false) { - - if(!callback) - return this.injectPromise(this.getCurrentBlock); - - this.tronWeb.fullNode.request('wallet/getnowblock').then(block => { - block.fromPlugin = true - callback(null, block); - }).catch(err => callback(err)); - } - - getSomeParameter() { - return someParameter; - } - - pluginInterface(options) { - if (options.someParameter) { - someParameter = options.someParameter - } - return { - requires: '^6.0.0', - components: { - trx: { - // will be overridden - getCurrentBlock: this.someMethod, - - // will be added - getLatestBlock: this.someMethod, - getSomeParameter: this.getSomeParameter, - - // will be skipped - _parseToken: function () {} - - - } - } - } - } -} - -module.exports = GetNowBlock diff --git a/test/helpers/MetaCoin.json b/test/helpers/MetaCoin.json deleted file mode 100644 index 63221a45..00000000 --- a/test/helpers/MetaCoin.json +++ /dev/null @@ -1,2912 +0,0 @@ -{ - "contractName": "MetaCoin", - "abi": [ - { - "inputs": [ - { - "name": "initialBalance", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "_from", - "type": "address" - }, - { - "indexed": false, - "name": "_to", - "type": "address" - }, - { - "indexed": false, - "name": "_value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [ - { - "name": "receiver", - "type": "address" - }, - { - "name": "amount", - "type": "uint256" - } - ], - "name": "sendCoin", - "outputs": [ - { - "name": "sufficient", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "addr", - "type": "address" - } - ], - "name": "getBalanceInEth", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "addr", - "type": "address" - } - ], - "name": "getBalance", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getOwner", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b506040516020806105898339810180604052810190808051906020019092919050505033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550506104c2806100c76000396000f300608060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680637bd703e814610067578063893d20e8146100be57806390b98a1114610115578063f8b2cb4f1461017a575b600080fd5b34801561007357600080fd5b506100a8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506101d1565b6040518082815260200191505060405180910390f35b3480156100ca57600080fd5b506100d3610291565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561012157600080fd5b50610160600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506102bb565b604051808215151515815260200191505060405180910390f35b34801561018657600080fd5b506101bb600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061044e565b6040518082815260200191505060405180910390f35b600073__ConvertLib____________________________6396e4ee3d6101f68461044e565b60026040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b15801561024f57600080fd5b505af4158015610263573d6000803e3d6000fd5b505050506040513d602081101561027957600080fd5b81019080805190602001909291905050509050919050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561030c5760009050610448565b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055507fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef338484604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390a1600190505b92915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490509190505600a165627a7a72305820245dfade5414b95c5522d07e4c004ade79b43d37e2f5a5928f8f1e2b166841f30029", - "deployedBytecode": "0x608060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680637bd703e814610067578063893d20e8146100be57806390b98a1114610115578063f8b2cb4f1461017a575b600080fd5b34801561007357600080fd5b506100a8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506101d1565b6040518082815260200191505060405180910390f35b3480156100ca57600080fd5b506100d3610291565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561012157600080fd5b50610160600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506102bb565b604051808215151515815260200191505060405180910390f35b34801561018657600080fd5b506101bb600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061044e565b6040518082815260200191505060405180910390f35b600073__ConvertLib____________________________6396e4ee3d6101f68461044e565b60026040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b15801561024f57600080fd5b505af4158015610263573d6000803e3d6000fd5b505050506040513d602081101561027957600080fd5b81019080805190602001909291905050509050919050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561030c5760009050610448565b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055507fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef338484604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390a1600190505b92915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490509190505600a165627a7a72305820245dfade5414b95c5522d07e4c004ade79b43d37e2f5a5928f8f1e2b166841f30029", - "sourceMap": "212:804:1:-;;;353:108;8:9:-1;5:2;;;30:1;27;20:12;5:2;353:108:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;406:10;398:5;;:18;;;;;;;;;;;;;;;;;;443:14;420:8;:20;429:10;420:20;;;;;;;;;;;;;;;:37;;;;353:108;212:804;;;;;;", - "deployedSourceMap": "212:804:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;731:117;;8:9:-1;5:2;;;30:1;27;20:12;5:2;731:117:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;943:71;;8:9:-1;5:2;;;30:1;27;20:12;5:2;943:71:1;;;;;;;;;;;;;;;;;;;;;;;;;;;464:264;;8:9:-1;5:2;;;30:1;27;20:12;5:2;464:264:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;851:89;;8:9:-1;5:2;;;30:1;27;20:12;5:2;851:89:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;731:117;790:4;806:10;:18;825:16;836:4;825:10;:16::i;:::-;842:1;806:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;806:38:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;806:38:1;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;806:38:1;;;;;;;;;;;;;;;;799:45;;731:117;;;:::o;943:71::-;983:7;1005:5;;;;;;;;;;;998:12;;943:71;:::o;464:264::-;528:15;576:6;553:8;:20;562:10;553:20;;;;;;;;;;;;;;;;:29;549:47;;;591:5;584:12;;;;549:47;624:6;600:8;:20;609:10;600:20;;;;;;;;;;;;;;;;:30;;;;;;;;;;;656:6;634:8;:18;643:8;634:18;;;;;;;;;;;;;;;;:28;;;;;;;;;;;671:38;680:10;692:8;702:6;671:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;720:4;713:11;;464:264;;;;;:::o;851:89::-;905:4;922:8;:14;931:4;922:14;;;;;;;;;;;;;;;;915:21;;851:89;;;:::o", - "source": "pragma solidity ^0.4.23;\n\nimport \"./ConvertLib.sol\";\n\n// This is just a simple example of a coin-like contract.\n// It is not standards compatible and cannot be expected to talk to other\n// coin/token contracts.\n\ncontract MetaCoin {\n\tmapping (address => uint) balances;\n\n\tevent Transfer(address _from, address _to, uint256 _value);\n\n address owner;\n\n\tconstructor(uint initialBalance) public {\n\t owner = msg.sender;\n\t\tbalances[msg.sender] = initialBalance;\n\t}\n\n\tfunction sendCoin(address receiver, uint amount) public returns(bool sufficient) {\n\t\tif (balances[msg.sender] < amount) return false;\n\t\tbalances[msg.sender] -= amount;\n\t\tbalances[receiver] += amount;\n\t\temit Transfer(msg.sender, receiver, amount);\n\t\treturn true;\n\t}\n\n\tfunction getBalanceInEth(address addr) public view returns(uint){\n\t\treturn ConvertLib.convert(getBalance(addr),2);\n\t}\n\n\tfunction getBalance(address addr) public view returns(uint) {\n\t\treturn balances[addr];\n\t}\n\n\tfunction getOwner() public view returns(address) {\n return owner;\n\t}\n}\n", - "sourcePath": "/Users/sullof/Projects/Tron/tronbox-boxes/metacoin-box/contracts/MetaCoin.sol", - "ast": { - "absolutePath": "/Users/sullof/Projects/Tron/tronbox-boxes/metacoin-box/contracts/MetaCoin.sol", - "exportedSymbols": { - "MetaCoin": [ - 129 - ] - }, - "id": 130, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 18, - "literals": [ - "solidity", - "^", - "0.4", - ".23" - ], - "nodeType": "PragmaDirective", - "src": "0:24:1" - }, - { - "absolutePath": "/Users/sullof/Projects/Tron/tronbox-boxes/metacoin-box/contracts/ConvertLib.sol", - "file": "./ConvertLib.sol", - "id": 19, - "nodeType": "ImportDirective", - "scope": 130, - "sourceUnit": 17, - "src": "26:26:1", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 129, - "linearizedBaseContracts": [ - 129 - ], - "name": "MetaCoin", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 23, - "name": "balances", - "nodeType": "VariableDeclaration", - "scope": 129, - "src": "233:34:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 22, - "keyType": { - "id": 20, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "242:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "233:25:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 21, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "253:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "anonymous": false, - "documentation": null, - "id": 31, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 30, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 25, - "indexed": false, - "name": "_from", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "286:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 24, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "286:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 27, - "indexed": false, - "name": "_to", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "301:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 26, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "301:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 29, - "indexed": false, - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "314:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 28, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "314:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "285:44:1" - }, - "src": "271:59:1" - }, - { - "constant": false, - "id": 33, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 129, - "src": "336:13:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 32, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "336:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "body": { - "id": 50, - "nodeType": "Block", - "src": "393:68:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 41, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 38, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "398:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 39, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 144, - "src": "406:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 40, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "406:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "398:18:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 42, - "nodeType": "ExpressionStatement", - "src": "398:18:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 48, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 43, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "420:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 46, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 44, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 144, - "src": "429:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 45, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "429:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "420:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 47, - "name": "initialBalance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 35, - "src": "443:14:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "420:37:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 49, - "nodeType": "ExpressionStatement", - "src": "420:37:1" - } - ] - }, - "documentation": null, - "id": 51, - "implemented": true, - "isConstructor": true, - "isDeclaredConst": false, - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 36, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 35, - "name": "initialBalance", - "nodeType": "VariableDeclaration", - "scope": 51, - "src": "365:19:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 34, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "365:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "364:21:1" - }, - "payable": false, - "returnParameters": { - "id": 37, - "nodeType": "ParameterList", - "parameters": [], - "src": "393:0:1" - }, - "scope": 129, - "src": "353:108:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 91, - "nodeType": "Block", - "src": "545:183:1", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 65, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 60, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "553:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 63, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 61, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 144, - "src": "562:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 62, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "562:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "553:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 64, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 55, - "src": "576:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "553:29:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 68, - "nodeType": "IfStatement", - "src": "549:47:1", - "trueBody": { - "expression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 66, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "591:5:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 59, - "id": 67, - "nodeType": "Return", - "src": "584:12:1" - } - }, - { - "expression": { - "argumentTypes": null, - "id": 74, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 69, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "600:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 72, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 70, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 144, - "src": "609:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 71, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "609:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "600:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 73, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 55, - "src": "624:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "600:30:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 75, - "nodeType": "ExpressionStatement", - "src": "600:30:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 80, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 76, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "634:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 78, - "indexExpression": { - "argumentTypes": null, - "id": 77, - "name": "receiver", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "643:8:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "634:18:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 79, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 55, - "src": "656:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "634:28:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 81, - "nodeType": "ExpressionStatement", - "src": "634:28:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 83, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 144, - "src": "680:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 84, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "680:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 85, - "name": "receiver", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "692:8:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 86, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 55, - "src": "702:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 82, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31, - "src": "671:8:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 87, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "671:38:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 88, - "nodeType": "EmitStatement", - "src": "666:43:1" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 89, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "720:4:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 59, - "id": 90, - "nodeType": "Return", - "src": "713:11:1" - } - ] - }, - "documentation": null, - "id": 92, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "sendCoin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 56, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 53, - "name": "receiver", - "nodeType": "VariableDeclaration", - "scope": 92, - "src": "482:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 52, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "482:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 55, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 92, - "src": "500:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 54, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "500:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "481:31:1" - }, - "payable": false, - "returnParameters": { - "id": 59, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 58, - "name": "sufficient", - "nodeType": "VariableDeclaration", - "scope": 92, - "src": "528:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 57, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "528:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "527:17:1" - }, - "scope": 129, - "src": "464:264:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 107, - "nodeType": "Block", - "src": "795:53:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 102, - "name": "addr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "836:4:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 101, - "name": "getBalance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 120, - "src": "825:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 103, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "825:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "32", - "id": 104, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "842:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - } - ], - "expression": { - "argumentTypes": null, - "id": 99, - "name": "ConvertLib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16, - "src": "806:10:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ConvertLib_$16_$", - "typeString": "type(library ConvertLib)" - } - }, - "id": 100, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "convert", - "nodeType": "MemberAccess", - "referencedDeclaration": 15, - "src": "806:18:1", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 105, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "806:38:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 98, - "id": 106, - "nodeType": "Return", - "src": "799:45:1" - } - ] - }, - "documentation": null, - "id": 108, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getBalanceInEth", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 95, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 94, - "name": "addr", - "nodeType": "VariableDeclaration", - "scope": 108, - "src": "756:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 93, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "756:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "755:14:1" - }, - "payable": false, - "returnParameters": { - "id": 98, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 97, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 108, - "src": "790:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 96, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "790:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "789:6:1" - }, - "scope": 129, - "src": "731:117:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 119, - "nodeType": "Block", - "src": "911:29:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 115, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "922:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 117, - "indexExpression": { - "argumentTypes": null, - "id": 116, - "name": "addr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 110, - "src": "931:4:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "922:14:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 114, - "id": 118, - "nodeType": "Return", - "src": "915:21:1" - } - ] - }, - "documentation": null, - "id": 120, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getBalance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 111, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 110, - "name": "addr", - "nodeType": "VariableDeclaration", - "scope": 120, - "src": "871:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 109, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "871:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "870:14:1" - }, - "payable": false, - "returnParameters": { - "id": 114, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 113, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 120, - "src": "905:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 112, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "905:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "904:6:1" - }, - "scope": 129, - "src": "851:89:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 127, - "nodeType": "Block", - "src": "992:22:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 125, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "1005:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 124, - "id": 126, - "nodeType": "Return", - "src": "998:12:1" - } - ] - }, - "documentation": null, - "id": 128, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getOwner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 121, - "nodeType": "ParameterList", - "parameters": [], - "src": "960:2:1" - }, - "payable": false, - "returnParameters": { - "id": 124, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 123, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 128, - "src": "983:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 122, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "983:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "982:9:1" - }, - "scope": 129, - "src": "943:71:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 130, - "src": "212:804:1" - } - ], - "src": "0:1017:1" - }, - "legacyAST": { - "absolutePath": "/Users/sullof/Projects/Tron/tronbox-boxes/metacoin-box/contracts/MetaCoin.sol", - "exportedSymbols": { - "MetaCoin": [ - 129 - ] - }, - "id": 130, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 18, - "literals": [ - "solidity", - "^", - "0.4", - ".23" - ], - "nodeType": "PragmaDirective", - "src": "0:24:1" - }, - { - "absolutePath": "/Users/sullof/Projects/Tron/tronbox-boxes/metacoin-box/contracts/ConvertLib.sol", - "file": "./ConvertLib.sol", - "id": 19, - "nodeType": "ImportDirective", - "scope": 130, - "sourceUnit": 17, - "src": "26:26:1", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 129, - "linearizedBaseContracts": [ - 129 - ], - "name": "MetaCoin", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 23, - "name": "balances", - "nodeType": "VariableDeclaration", - "scope": 129, - "src": "233:34:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 22, - "keyType": { - "id": 20, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "242:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "233:25:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 21, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "253:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "anonymous": false, - "documentation": null, - "id": 31, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 30, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 25, - "indexed": false, - "name": "_from", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "286:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 24, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "286:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 27, - "indexed": false, - "name": "_to", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "301:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 26, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "301:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 29, - "indexed": false, - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "314:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 28, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "314:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "285:44:1" - }, - "src": "271:59:1" - }, - { - "constant": false, - "id": 33, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 129, - "src": "336:13:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 32, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "336:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "body": { - "id": 50, - "nodeType": "Block", - "src": "393:68:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 41, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 38, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "398:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 39, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 144, - "src": "406:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 40, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "406:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "398:18:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 42, - "nodeType": "ExpressionStatement", - "src": "398:18:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 48, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 43, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "420:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 46, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 44, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 144, - "src": "429:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 45, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "429:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "420:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 47, - "name": "initialBalance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 35, - "src": "443:14:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "420:37:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 49, - "nodeType": "ExpressionStatement", - "src": "420:37:1" - } - ] - }, - "documentation": null, - "id": 51, - "implemented": true, - "isConstructor": true, - "isDeclaredConst": false, - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 36, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 35, - "name": "initialBalance", - "nodeType": "VariableDeclaration", - "scope": 51, - "src": "365:19:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 34, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "365:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "364:21:1" - }, - "payable": false, - "returnParameters": { - "id": 37, - "nodeType": "ParameterList", - "parameters": [], - "src": "393:0:1" - }, - "scope": 129, - "src": "353:108:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 91, - "nodeType": "Block", - "src": "545:183:1", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 65, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 60, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "553:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 63, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 61, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 144, - "src": "562:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 62, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "562:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "553:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 64, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 55, - "src": "576:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "553:29:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 68, - "nodeType": "IfStatement", - "src": "549:47:1", - "trueBody": { - "expression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 66, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "591:5:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 59, - "id": 67, - "nodeType": "Return", - "src": "584:12:1" - } - }, - { - "expression": { - "argumentTypes": null, - "id": 74, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 69, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "600:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 72, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 70, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 144, - "src": "609:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 71, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "609:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "600:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 73, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 55, - "src": "624:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "600:30:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 75, - "nodeType": "ExpressionStatement", - "src": "600:30:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 80, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 76, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "634:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 78, - "indexExpression": { - "argumentTypes": null, - "id": 77, - "name": "receiver", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "643:8:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "634:18:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 79, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 55, - "src": "656:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "634:28:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 81, - "nodeType": "ExpressionStatement", - "src": "634:28:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 83, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 144, - "src": "680:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 84, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "680:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 85, - "name": "receiver", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "692:8:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 86, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 55, - "src": "702:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 82, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31, - "src": "671:8:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 87, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "671:38:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 88, - "nodeType": "EmitStatement", - "src": "666:43:1" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 89, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "720:4:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 59, - "id": 90, - "nodeType": "Return", - "src": "713:11:1" - } - ] - }, - "documentation": null, - "id": 92, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "sendCoin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 56, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 53, - "name": "receiver", - "nodeType": "VariableDeclaration", - "scope": 92, - "src": "482:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 52, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "482:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 55, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 92, - "src": "500:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 54, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "500:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "481:31:1" - }, - "payable": false, - "returnParameters": { - "id": 59, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 58, - "name": "sufficient", - "nodeType": "VariableDeclaration", - "scope": 92, - "src": "528:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 57, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "528:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "527:17:1" - }, - "scope": 129, - "src": "464:264:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 107, - "nodeType": "Block", - "src": "795:53:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 102, - "name": "addr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "836:4:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 101, - "name": "getBalance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 120, - "src": "825:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 103, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "825:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "32", - "id": 104, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "842:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - } - ], - "expression": { - "argumentTypes": null, - "id": 99, - "name": "ConvertLib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16, - "src": "806:10:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ConvertLib_$16_$", - "typeString": "type(library ConvertLib)" - } - }, - "id": 100, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "convert", - "nodeType": "MemberAccess", - "referencedDeclaration": 15, - "src": "806:18:1", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 105, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "806:38:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 98, - "id": 106, - "nodeType": "Return", - "src": "799:45:1" - } - ] - }, - "documentation": null, - "id": 108, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getBalanceInEth", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 95, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 94, - "name": "addr", - "nodeType": "VariableDeclaration", - "scope": 108, - "src": "756:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 93, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "756:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "755:14:1" - }, - "payable": false, - "returnParameters": { - "id": 98, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 97, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 108, - "src": "790:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 96, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "790:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "789:6:1" - }, - "scope": 129, - "src": "731:117:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 119, - "nodeType": "Block", - "src": "911:29:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 115, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "922:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 117, - "indexExpression": { - "argumentTypes": null, - "id": 116, - "name": "addr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 110, - "src": "931:4:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "922:14:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 114, - "id": 118, - "nodeType": "Return", - "src": "915:21:1" - } - ] - }, - "documentation": null, - "id": 120, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getBalance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 111, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 110, - "name": "addr", - "nodeType": "VariableDeclaration", - "scope": 120, - "src": "871:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 109, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "871:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "870:14:1" - }, - "payable": false, - "returnParameters": { - "id": 114, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 113, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 120, - "src": "905:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 112, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "905:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "904:6:1" - }, - "scope": 129, - "src": "851:89:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 127, - "nodeType": "Block", - "src": "992:22:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 125, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "1005:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 124, - "id": 126, - "nodeType": "Return", - "src": "998:12:1" - } - ] - }, - "documentation": null, - "id": 128, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getOwner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 121, - "nodeType": "ParameterList", - "parameters": [], - "src": "960:2:1" - }, - "payable": false, - "returnParameters": { - "id": 124, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 123, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 128, - "src": "983:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 122, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "983:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "982:9:1" - }, - "scope": 129, - "src": "943:71:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 130, - "src": "212:804:1" - } - ], - "src": "0:1017:1" - }, - "compiler": { - "name": "solc", - "version": "0.4.24-develop.2018.8.28+commit.3ba0cdec.mod.Emscripten.clang" - }, - "networks": { - "9090": { - "events": {}, - "links": { - "ConvertLib": "41f439b3d903e99860074959b900bdea66740770d4" - }, - "address": "4107488e8a0b1fd302d43add7f58e971b1121e25c3" - } - }, - "schemaVersion": "2.0.1", - "updatedAt": "2019-03-07T01:29:41.838Z" -} diff --git a/test/helpers/assertEqualHex.js b/test/helpers/assertEqualHex.js deleted file mode 100644 index dc14c910..00000000 --- a/test/helpers/assertEqualHex.js +++ /dev/null @@ -1,10 +0,0 @@ -const assert = require('chai').assert; -const tronWebBuilder = require('./tronWebBuilder'); - -module.exports = async function (result, string) { - - assert.equal( - result, - tronWebBuilder.getInstance().toHex(string).substring(2) - ) -} diff --git a/test/helpers/assertThrow.js b/test/helpers/assertThrow.js deleted file mode 100644 index 5aa2c197..00000000 --- a/test/helpers/assertThrow.js +++ /dev/null @@ -1,27 +0,0 @@ -const assert = require('chai').assert; - -module.exports = async function (func, expectedError, expectedErrorContains) { - let errMsg; - try { - await func - } catch (err) { - if(typeof err === 'object') { - if(err.message) - errMsg = err.message - else if(err.error) - errMsg = err.error - } - else - errMsg = err - if(expectedError) - assert.equal(errMsg, expectedError); - else if(expectedErrorContains) { - if(!Array.isArray(expectedErrorContains)) { - expectedErrorContains = [expectedErrorContains] - } - for(let expected of expectedErrorContains) { - assert.notEqual(errMsg.indexOf(expected), -1) - } - } - } -} diff --git a/test/helpers/broadcaster.js b/test/helpers/broadcaster.js deleted file mode 100644 index 4e13a91f..00000000 --- a/test/helpers/broadcaster.js +++ /dev/null @@ -1,15 +0,0 @@ -const tronWebBuilder = require('../helpers/tronWebBuilder'); - -module.exports = async function (func, pk, transaction) { - const tronWeb = tronWebBuilder.createInstance(); - if( !transaction) { - transaction = await func; - } - const signedTransaction = await tronWeb.trx.sign(transaction, pk); - const result = { - transaction, - signedTransaction, - receipt: await tronWeb.trx.sendRawTransaction(signedTransaction) - }; - return Promise.resolve(result); -} diff --git a/test/helpers/config.js b/test/helpers/config.js deleted file mode 100644 index 5679a95c..00000000 --- a/test/helpers/config.js +++ /dev/null @@ -1,117 +0,0 @@ -const fullHost = "http://127.0.0.1:" + (process.env.HOST_PORT || 9090) - -module.exports = { - - PRIVATE_KEY: process.env.PRIVATE_KEY, - CONSUME_USER_RESOURCE_PERCENT: 30, - FEE_LIMIT: 100000000, - FULL_NODE_API: fullHost, - SOLIDITY_NODE_API: fullHost, - EVENT_API: fullHost, - NETWORK_ID: "*", - ADDRESS_HEX: '41928c9af0651632157ef27a2cf17ca72c575a4d21', - ADDRESS_BASE58: 'TPL66VK2gCXNCD7EJg9pgJRfqcRazjhUZY', - UPDATED_TEST_TOKEN_OPTIONS: { - description: 'Very useless utility token', - url: 'https://none.example.com', - freeBandwidth: 10, - freeBandwidthLimit: 100 - }, - SIGNED_HEX_TRANSACTION: '0a85010a02380a220830202d4c1473d46640d8edabfea72f5a67080112630a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412320a1541fbbb1a37f9fbc18a3e2b8fd8c0823251cd3b8ee8121541af4852489314e72ffae825238c52d0e1ffff1ead18c0843d70f182cffca72f1241fa301a789dc51714be33b0f298e3f990650bec285ab628ab8ea5f18aeb3466643ca89b604d9df74fa19a11235e0d7ab974322f0097eefe0b7efb38ea9ce4cf6601', - TEST_TRON_GRID_API: 'http://47.252.84.138:29086', - TEST_TRON_HEADER_API_KEY: 'be815f09-e30f-4b98-b84d-0bb41f0708fd', - TEST_TRON_HEADER_API_JWT_KEY: '95057b57-a2bd-4bd5-9337-5b52cb2b3bc2', - TEST_TRON_HEADER_JWT_ID: '2b3b8c99254f48ef90be2dee387fe7b6', - TEST_TRON_HEADER_JWT_PRIVATE_KEY: `-----BEGIN RSA PRIVATE KEY----- -MIIEpQIBAAKCAQEAuU+RD27l1tYdSnjiySnqUjTkuHguJq21+nS+oYIqiwHXLQot -AC9vriP5sOXJ9w1SmWvj5JOmO2qYFxyO+zluW2vfPphXB2jPD0Fv2Cl/Cdef/SCg -UR+KtGjMDudR/xgJcm9nZQ7pXcSi5rBXxQ9oIcLDxyU2wwXkGR9hJyIwqLkaP7nK -Ce5zoE3C26uVikVC2szjjF1I70tXtlHtdhkM8DaZeNhcKc8zV7Ge5hr/9tQIjH4t -RYKa1ldANlcEyzwQPGrsHM5KuurWQSjjLIl6JrPy9mYPbrU51KUcIwuOWPz+UcCX -KZZMFXJNlYiZelYlAIFHRXpgvV7HFqDuLkc30wIDAQABAoIBAQCjAzZVQDXZZiMA -JxVA5qllRXhKOhZHGhpyRw6G3w1zmNvjmAb8Gb6Bjs4QaiPfOw4FPl6L7cKWk+9U -rV+t6diFfYA1/SbZsr4q6mJr4h0J2G+56WB93GRUzbdsCNsdrtRooU1wHcz2Gos+ -qbOb+zCcOkukvLzOlDkSTINXPIFXeXPp3ccvz6a58dwUCpvS5fw50Jl6FBhCaGcv -t4k9dmKa/EUeMVgfZ6lwzMHm7tlp+KubHAvESr+KT+jvk2g/eTosUM+jvp1prFct -TQgEyVeC6beXPgzvRb3Ao7C0w+N9VYwst4LoH9rHrtsROTpKsKvpUA+T2fhN6RaB -GVYQuVEJAoGBAPNWxFDBRvaUO7j0ipQDzEhn1J7jHhq/zofCAv6YqWbFZUiM3Z+4 -WZJIUy6JyKPhg7UPSwlJtwIygO8EzlDIr8cKGh8vxy2cP4KUI/zOZfx8Y19x/vz/ -eEF+0kMz0qIf2JiWnG94nC/JzqQ6IIjHaPYXimz2DfkiTBCiBPoDoh+FAoGBAMLz -4AISOSFlkiJRNbDCTOogbQaX0voYlt3aRBXIGeOgcodI8adjLOGDFDMFUL8Kdxke -l3zhkmBlbHw9+q7a5GDd03i+n5CSZQDMuljAb8lUm36MnV6sGMnlCX2mGQjHdwLI -Kql9NwoK5fNcvwjqQogbTnXLkaIecaUES8eTHp13AoGATEHyv8PyMy/9D1dDXmNa -T46KaUiPlJ5rYMwCGDtLSzOtK/FJOtaQ63DS8JCpWgJAPiuOvlhli8C7+yusZFCg -FWYrDX7xkm+Wz5sRNBaSi2+HzM9ys2J0E0JlLj49UiVcwWThnWVUvP0nTvwQWgzz -7bsu3Dq34k1HPScpHBirY+kCgYEAoSRqJewgMv289AbCZW/FmcThuZBnQHhww8J1 -greaxq9J248syBpO77ykRqP/IVoqJaZGu1/M2Ucci/nDKyMdoP/am7SdOif3uth+ -s3ulKvp3aPwb3DRObRuXY7eWe848Dh2cPeqVQwTNHAKumVThV5WSngV9RE77ytWp -ObbemHMCgYEAmlnWvwed2VkRiHpPV7VcFP7NCz6c+WCgRH9gca//fFLPzxB6dwsz -vvQ4W6Hmeyh9ef/dGQRPKwBp2oiJELouIVybtc2S2wT3DYm2AgYv4RFcH3CB2cIW -Djyb5403LJztsxdExbyQkm++Gg631CZus4xA77wMafGw37IhCE6sTBo= ------END RSA PRIVATE KEY-----`, - - getTokenOptions: () => { - const rnd = Math.random().toString(36).substr(2); - return { - name: `Token${rnd}`, - abbreviation: `T${rnd.substring(2).toUpperCase()}`, - description: 'Useless utility token', - url: `https://example-${rnd}.com/`, - totalSupply: 100000000, - saleEnd: Date.now() + 60000, // 1 minute - frozenAmount: 5, - frozenDuration: 1, - trxRatio: 10, - tokenRatio: 2, - saleStart: Date.now() + 500, - freeBandwidth: 100, - freeBandwidthLimit: 1000 - } - }, - isProposalApproved: async (tronWeb, proposal) => { - let chainParameters = await tronWeb.trx.getChainParameters() - for(let param of chainParameters) { - if(param.key === proposal) { - return param.value - } - } - return false - }, - SUN_NETWORK: process.env.SUN_NETWORK, - SIDE_CHAIN: { - fullNode: 'https://testhttpapi.tronex.io', - solidityNode: 'https://testhttpapi.tronex.io', - eventServer: 'https://testhttpapi.tronex.io', - sideOptions: { - fullNode: 'https://suntest.tronex.io', - solidityNode: 'https://suntest.tronex.io', - eventServer: 'https://suntest.tronex.io', - mainGatewayAddress: 'TFLtPoEtVJBMcj6kZPrQrwEdM3W3shxsBU', - sideGatewayAddress: 'TRDepx5KoQ8oNbFVZ5sogwUxtdYmATDRgX', - sideChainId: '413AF23F37DA0D48234FDD43D89931E98E1144481B' - } - }, - TOKEN_ID: 1000003, - DEPOSIT_FEE: 0, - MAPPING_FEE: 1000000000, - WITHDRAW_FEE: 0, - RETRY_MAPPING_FEE: 1000000000, - RETRY_DEPOSIT_FEE: 0, - RETRY_WITHDRAW_FEE: 0, - NONCE: 35, - - HASH20: 'cd48770186c7f3563cdc630fb4623f9700392f742a51d27877c592ff3c9125af', - CONTRACT_ADDRESS20: 'TQq3EYEiaYr95r6ePRQwycukCEAE4qWkE7', - CONTRACT_ADDRESS20_HEX: '41a2fe67ceadf6e147c440fe556a0a15bd210ec412', - - ADDRESS20_MAPPING: 'TQnwLGKPg7jRCr2QPLaPV349qAkQPgY1kp', - ADDRESS20_MAPPING_HEX: '41a298a5bdf9963ded01e0ba751c9e4d39141bbcdc', - - HASH721: '95c05e26f6afc92972d5ffeb1c24a8c27baaa5556dd5c50a7f297b9017711135', - CONTRACT_ADDRESS721: 'TX8qeDzWJ3ePxwajj18PGbcc7FwV1dhqt3', - CONTRACT_ADDRESS721_HEX: '41e82cf8a78a02e1ba25b9bf4c2ebce0bb7c7189ba', - - ADDRESS721_MAPPING: 'TWU8w6qrqb42x9gt5NRGdzXD6xjgzEvnK1', - ADDRESS721_MAPPING_HEX: '41e0db2ebd7619fc7d4af7d4cd04515c4f77840d45', - TRC721_ID: 1 -} diff --git a/test/helpers/jlog.js b/test/helpers/jlog.js deleted file mode 100644 index 5eb19df6..00000000 --- a/test/helpers/jlog.js +++ /dev/null @@ -1,7 +0,0 @@ -const chalk = require('chalk') - -module.exports = (...x) => { - for(let i = 0; i < x.length; i++) { - console.log(chalk.blue(typeof x[i] === 'object' ? JSON.stringify(x[i], null, 2) : x[i])) - } -} diff --git a/test/helpers/log.js b/test/helpers/log.js deleted file mode 100644 index 00b8aa7b..00000000 --- a/test/helpers/log.js +++ /dev/null @@ -1,14 +0,0 @@ -module.exports = (...x) => { - for(let i = 0; i < x.length; i++) { - let y = x[i] - if(Array.isArray(y)) { - for(let j = 0; j < y.length; j++) { - console.log(j, y[j].valueOf()) - } - } else if(typeof y === 'object') { - console.log(y.valueOf()) - } else { - console.log(y) - } - } -} diff --git a/test/helpers/newAccounts.js b/test/helpers/newAccounts.js deleted file mode 100644 index b2b03ee2..00000000 --- a/test/helpers/newAccounts.js +++ /dev/null @@ -1,9 +0,0 @@ -const tronWebBuilder = require('./tronWebBuilder'); -const tronWeb = tronWebBuilder.createInstance(); - -const amount = process.argv[2] || 10; - -(async function () { - await tronWebBuilder.newTestAccounts(amount) -})() - diff --git a/test/helpers/pollAccountFor.js b/test/helpers/pollAccountFor.js deleted file mode 100644 index d9bdfff3..00000000 --- a/test/helpers/pollAccountFor.js +++ /dev/null @@ -1,30 +0,0 @@ -const _ = require('lodash'); -const wait = require('./wait'); -const tronWebBuilder = require('./tronWebBuilder') - -module.exports = async function pollAccountFor(address, property, value = false, interval = 3, timeout = 10000) { - const tronWeb = tronWebBuilder.createInstance() - let now = Date.now() - while (true) { - if(Date.now() > now + timeout) { - throw new Error('Timeout...'); - } - wait(interval); - let result = await tronWeb.trx.getAccount(address); - if(typeof property === 'string') { - let data = _.get(result, property) - if(data) { - if(value) { - if(data == value) return Promise.resolve(result); - } else { - return Promise.resolve(result); - } - } - } else if(typeof property === 'function') { - if(property(result)) { - return Promise.resolve(result); - } - - } - } -} diff --git a/test/helpers/testUtils.js b/test/helpers/testUtils.js deleted file mode 100644 index af44b7cd..00000000 --- a/test/helpers/testUtils.js +++ /dev/null @@ -1,99 +0,0 @@ -const TronWeb = require('../setup/TronWeb'); -const ethers = require('ethers'); -const { BigNumber } = require('@ethersproject/bignumber'); - -const bnify = BigNumber.from; - -const getValues = (object, named) => { - if (Array.isArray(object)) { - let result = []; - object.forEach(function(object) { - result.push(getValues(object, named)); - }); - return result; - } - - switch (object.type) { - case 'number': - return bnify(object.value); - - case 'boolean': - case 'string': - return object.value; - - case 'buffer': - return TronWeb.utils.ethersUtils.arrayify(object.value); - - case 'tuple': - let result = getValues(object.value, named); - if (named) { - let namedResult = {}; - result.forEach((value, index) => { - namedResult['r' + String(index)] = value; - }); - return namedResult; - } - return result; - - default: - throw new Error('invalid type - ' + object.type); - } -} - -const equals = (actual, expected) => { - // Array (treat recursively) - if (Array.isArray(actual)) { - if (!Array.isArray(expected) || actual.length !== expected.length) { return false; } - for (let i = 0; i < actual.length; i++) { - if (!equals(actual[i], expected[i])) { return false; } - } - return true; - } - - if (typeof(actual) === 'number') { actual = bnify(actual); } - if (typeof(expected) === 'number') { expected = bnify(expected); } - - // BigNumber - if (actual.eq) { - if (typeof(expected) === 'string' && expected.match(/^-?0x[0-9A-Fa-f]*$/)) { - let neg = (expected.substring(0, 1) === '-'); - if (neg) { expected = expected.substring(1); } - expected = bnify(expected); - if (neg) { expected = expected.mul(-1); } - } - if (!actual.eq(expected)) { return false; } - return true; - } - - // Uint8Array - if (expected.buffer) { - if (!ethers.isHexString(actual)) { return false; } - actual = TronWeb.utils.ethersUtils.arrayify(actual); - - if (!actual.buffer || actual.length !== expected.length) { return false; } - for (let i = 0; i < actual.length; i++) { - if (actual[i] !== expected[i]) { return false; } - } - - return true; - } - - // Maybe address? - try { - if (TronWeb.isAddress(actual)) { - let actualAddress = actual; - let expectedAddress = TronWeb.address.toHex(expected); - - return (actualAddress === expectedAddress); - } - } catch (error) { } - - // Something else - return (actual === expected); -} - - -module.exports = { - getValues, - equals -} \ No newline at end of file diff --git a/test/helpers/tronWebBuilder.js b/test/helpers/tronWebBuilder.js deleted file mode 100644 index ee227288..00000000 --- a/test/helpers/tronWebBuilder.js +++ /dev/null @@ -1,78 +0,0 @@ -const chalk = require('chalk') -const TronWeb = require('../setup/TronWeb'); -const jlog = require('./jlog') - -const {FULL_NODE_API, SOLIDITY_NODE_API, EVENT_API, PRIVATE_KEY, SUN_NETWORK, SIDE_CHAIN} = require('./config') - - -const createInstanceSide = (extraOptions = {}, sideExtraOptions = {}) => { - let options = Object.assign({ - fullHost: SIDE_CHAIN.fullNode, - privateKey: PRIVATE_KEY, - }, extraOptions) - let sideOptions = Object.assign({ - fullHost: SIDE_CHAIN.sideOptions.fullNode, - mainGatewayAddress: SIDE_CHAIN.sideOptions.mainGatewayAddress, - sideGatewayAddress: SIDE_CHAIN.sideOptions.sideGatewayAddress, - sideChainId: SIDE_CHAIN.sideOptions.sideChainId - }, sideExtraOptions); - return new TronWeb(options, sideOptions); -} - -const createInstance = (extraOptions = {}, sideExtraOptions = {}) => { - let options = Object.assign({ - fullHost: FULL_NODE_API, - privateKey: PRIVATE_KEY, - }, extraOptions) - return new TronWeb(options); -} - -let instance - -const getInstance = () => { - if (!instance) { - instance = createInstance() - } - return instance -} - -const newTestAccounts = async (amount) => { - const tronWeb = createInstance(); - - console.log(chalk.blue(`Generating ${amount} new accounts...`)) - await tronWeb.fullNode.request('/admin/temporary-accounts-generation?accounts=' + amount); - const lastCreated = await getTestAccounts(-1) - jlog(lastCreated.b58) -} - -const getTestAccounts = async (block) => { - const accounts = { - b58: [], - hex: [], - pks: [] - } - const tronWeb = createInstance(); - const accountsJson = await tronWeb.fullNode.request('/admin/accounts-json'); - const index = typeof block === 'number' - ? (block > -1 && block < accountsJson.more.length ? block : accountsJson.more.length - 1) - : undefined - accounts.pks = typeof block === 'number' - ? accountsJson.more[index].privateKeys - : accountsJson.privateKeys; - for (let i = 0; i < accounts.pks.length; i++) { - let addr = tronWeb.address.fromPrivateKey(accounts.pks[i]); - accounts.b58.push(addr); - accounts.hex.push(tronWeb.address.toHex(addr)); - } - return Promise.resolve(accounts); -} - -module.exports = { - createInstance, - getInstance, - createInstanceSide, - newTestAccounts, - getTestAccounts, - TronWeb -} - diff --git a/test/helpers/txPars.js b/test/helpers/txPars.js deleted file mode 100644 index f1d88771..00000000 --- a/test/helpers/txPars.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function (transaction) { - return transaction.raw_data.contract[0].parameter; -} diff --git a/test/helpers/wait.js b/test/helpers/wait.js deleted file mode 100644 index 65261a87..00000000 --- a/test/helpers/wait.js +++ /dev/null @@ -1,19 +0,0 @@ -function sleep(millis) { - return new Promise(resolve => setTimeout(resolve, millis)); -} -const chalk = require('chalk') - -function log(x) { - if (process.stdout !== undefined) { - process.stdout.write(chalk.yellow(x)); - } else { - console.log(chalk.yellow(x)); // used for karma - } -} - -module.exports = async function (secs) { - secs = secs || 1 - log(`Sleeping for ${secs} second${secs === 1 ? '' : 's'}...`) - await sleep(1000 * (secs || 1)) - log(' Slept.\n') -} diff --git a/test/helpers/waitChainData.js b/test/helpers/waitChainData.js deleted file mode 100644 index 5e5797e0..00000000 --- a/test/helpers/waitChainData.js +++ /dev/null @@ -1,94 +0,0 @@ -const tronWebBuilder = require('./tronWebBuilder'); -const tronWeb = tronWebBuilder.createInstance(); -const wait = require('./wait'); -const chalk = require('chalk'); -const jlog = require('./jlog'); - -function log(x) { - process.stdout.write(chalk.yellow(x)) -} - -module.exports = async function (type, ...params) { - let startTimestamp = Date.now(); - let timeLimit = 5000; - do { - let data; - let isFound = false; - try { - switch (type) { - case 'tx': { - data = await tronWeb.trx.getTransaction(params[0]); - isFound = !!data.txID; - break; - } - case 'account': { - data = await tronWeb.trx.getUnconfirmedAccount(params[0]); - isFound = !!data.address; - break; - } - case 'accountById': { - data = await tronWeb.trx.getUnconfirmedAccountById(params[0]); - isFound = !!data.address; - break; - } - case 'token': { - data = await tronWeb.trx.getTokensIssuedByAddress(params[0]); - isFound = !!Object.keys(data).length; - break; - } - case 'tokenById': { - data = await tronWeb.trx.getTokenFromID(params[0]); - isFound = !!data.name; - break; - } - case 'sendToken': { - data = await tronWeb.trx.getUnconfirmedAccount(params[0]); - isFound = data && data.assetV2 && data.assetV2.length && data.assetV2[0].value !== params[1]; - break; - } - case 'balance': { - data = await tronWeb.trx.getUnconfirmedBalance(params[0]); - isFound = (data !== params[1]); - break; - } - case 'freezeBp': { - data = await tronWeb.trx.getUnconfirmedAccount(params[0]); - isFound = data.frozen && (data.frozen[0].frozen_balance !== params[1]); - break; - } - case 'freezeEnergy': { - data = await tronWeb.trx.getUnconfirmedAccount(params[0]); - isFound = data.account_resource && - data.account_resource.frozen_balance_for_energy && - (data.account_resource.frozen_balance_for_energy.frozen_balance !== params[1]); - break; - } - case 'contract': { - data = await tronWeb.trx.getContract(params[0]); - isFound = !!data.contract_address; - break; - } - case 'exchange': { - data = await tronWeb.trx.getExchangeByID(params[0]); - isFound = !!data.exchange_id; - break; - } - default: - isFound = true; - - } - } catch (e) { - log(e); - await wait(1); - continue; - } - // console.log(...params, 'wait for chain data result: ', isFound, data, type); - if (isFound) - return; - log(`waiting for unconfirmed data,${type}...`); - await wait(1); - - } while (Date.now() - startTimestamp < timeLimit); - - throw new Error('No unconfirmed data found on chain'); -}; diff --git a/test/index.test.js b/test/index.test.js deleted file mode 100644 index 502fb2b7..00000000 --- a/test/index.test.js +++ /dev/null @@ -1,1455 +0,0 @@ -const chai = require('chai'); -const jwt = require('jsonwebtoken'); -const { - ADDRESS_HEX, - ADDRESS_BASE58, - FULL_NODE_API, - SOLIDITY_NODE_API, - EVENT_API, - PRIVATE_KEY, - SIDE_CHAIN, - SUN_NETWORK, - TEST_TRON_GRID_API, - TEST_TRON_HEADER_API_KEY, - TEST_TRON_HEADER_API_JWT_KEY, - TEST_TRON_HEADER_JWT_ID, - TEST_TRON_HEADER_JWT_PRIVATE_KEY - } = require('./helpers/config'); -const tronWebBuilder = require('./helpers/tronWebBuilder'); -const TronWeb = tronWebBuilder.TronWeb; -const log = require('./helpers/log') -const BigNumber = require('bignumber.js'); -const broadcaster = require('./helpers/broadcaster'); -const wait = require('./helpers/wait') - - -const assert = chai.assert; -const HttpProvider = TronWeb.providers.HttpProvider; - -describe('TronWeb Instance', function () { - - describe('#constructor()', function () { - it('should create a full instance', function () { - const tronWeb = tronWebBuilder.createInstance(); - assert.instanceOf(tronWeb, TronWeb); - }); - - it('should create an instance using an options object without private key', function () { - const fullNode = new HttpProvider(FULL_NODE_API); - const solidityNode = new HttpProvider(SOLIDITY_NODE_API); - const eventServer = EVENT_API; - - const tronWeb = new TronWeb({ - fullNode, - solidityNode, - eventServer - }); - - assert.equal(tronWeb.defaultPrivateKey, false); - }); - - it('should create an instance using a full options object', function () { - const fullNode = FULL_NODE_API; - const solidityNode = SOLIDITY_NODE_API; - const eventServer = EVENT_API; - const privateKey = PRIVATE_KEY; - - const tronWeb = new TronWeb({ - fullNode, - solidityNode, - eventServer, - privateKey - }); - - assert.equal(tronWeb.defaultPrivateKey, privateKey); - }); - - it('should create an instance without a private key', function () { - const fullNode = new HttpProvider(FULL_NODE_API); - const solidityNode = new HttpProvider(SOLIDITY_NODE_API); - const eventServer = EVENT_API; - - const tronWeb = new TronWeb( - fullNode, - solidityNode, - eventServer - ); - - assert.equal(tronWeb.defaultPrivateKey, false); - }); - - it('should create an instance without an event server', function () { - const fullNode = new HttpProvider(FULL_NODE_API); - const solidityNode = new HttpProvider(SOLIDITY_NODE_API); - - const tronWeb = new TronWeb( - fullNode, - solidityNode - ); - - assert.equal(tronWeb.eventServer, false); - }); - - it('should reject an invalid full node URL', function () { - const solidityNode = new HttpProvider(SOLIDITY_NODE_API); - - assert.throws(() => new TronWeb( - '$' + FULL_NODE_API, - solidityNode - ), 'Invalid URL provided to HttpProvider'); - }); - - it('should reject an invalid solidity node URL', function () { - const fullNode = new HttpProvider(FULL_NODE_API); - - assert.throws(() => new TronWeb( - fullNode, - '$' + SOLIDITY_NODE_API - ), 'Invalid URL provided to HttpProvider'); - }); - - it('should reject an invalid event server URL', function () { - const fullNode = new HttpProvider(FULL_NODE_API); - const solidityNode = new HttpProvider(SOLIDITY_NODE_API); - - assert.throws(() => new TronWeb( - fullNode, - solidityNode, - '$' + EVENT_API - ), 'Invalid URL provided to HttpProvider'); - }); - - it('should create an instance using an options and sideOptions object without private key', function () { - const fullNode = new HttpProvider(SIDE_CHAIN.fullNode); - const solidityNode = new HttpProvider(SIDE_CHAIN.solidityNode); - const eventServer = SIDE_CHAIN.eventServer; - - const tronWeb = new TronWeb({ - fullNode, - solidityNode, - eventServer - }, SIDE_CHAIN.sideOptions); - - assert.equal(tronWeb.defaultPrivateKey, false); - }); - - it('should create an instance using a full options and a full sideOptions object', function () { - - const {fullNode, solidityNode, eventServer, sideOptions} = SIDE_CHAIN; - const privateKey = PRIVATE_KEY; - const tronWeb = new TronWeb({ - fullNode, - solidityNode, - eventServer, - privateKey - }, sideOptions); - assert.equal(tronWeb.defaultPrivateKey, privateKey); - }); - - it('should create an instance with a full sideOptions without a private key', function () { - const fullNode = new HttpProvider(SIDE_CHAIN.fullNode); - const solidityNode = new HttpProvider(SIDE_CHAIN.solidityNode); - const eventServer = SIDE_CHAIN.eventServer; - - const tronWeb = new TronWeb( - fullNode, - solidityNode, - eventServer, - { - fullNode: SIDE_CHAIN.sideOptions.fullNode, - solidityNode: SIDE_CHAIN.sideOptions.solidityNode, - eventServer: SIDE_CHAIN.sideOptions.eventServer, - mainGatewayAddress: SIDE_CHAIN.sideOptions.mainGatewayAddress, - sideGatewayAddress: SIDE_CHAIN.sideOptions.sideGatewayAddress, - sideChainId: SIDE_CHAIN.sideOptions.sideChainId - } - ); - - assert.equal(tronWeb.defaultPrivateKey, false); - }); - - it('should create an instance with a fullhost in sideOptions without a private key', function () { - const fullNode = new HttpProvider(SIDE_CHAIN.fullNode); - const solidityNode = new HttpProvider(SIDE_CHAIN.solidityNode); - const eventServer = SIDE_CHAIN.eventServer; - - const tronWeb = new TronWeb( - fullNode, - solidityNode, - eventServer, - { - fullHost: SIDE_CHAIN.sideOptions.fullNode, - mainGatewayAddress: SIDE_CHAIN.sideOptions.mainGatewayAddress, - sideGatewayAddress: SIDE_CHAIN.sideOptions.sideGatewayAddress, - sideChainId: SIDE_CHAIN.sideOptions.sideChainId - } - ); - - assert.equal(tronWeb.defaultPrivateKey, false); - }); - - it('should create an instance with a full sideOptions without an event server', function () { - const fullNode = new HttpProvider(SIDE_CHAIN.fullNode); - const solidityNode = new HttpProvider(SIDE_CHAIN.solidityNode); - - const tronWeb = new TronWeb( - fullNode, - solidityNode, - false, - { - fullNode: SIDE_CHAIN.sideOptions.fullNode, - solidityNode: SIDE_CHAIN.sideOptions.solidityNode, - eventServer: SIDE_CHAIN.sideOptions.eventServer, - mainGatewayAddress: SIDE_CHAIN.sideOptions.mainGatewayAddress, - sideGatewayAddress: SIDE_CHAIN.sideOptions.sideGatewayAddress, - sideChainId: SIDE_CHAIN.sideOptions.sideChainId - } - ); - - assert.equal(tronWeb.eventServer, false); - }); - - - it('should create an instance with a full sideOptions without an event server in sideOptions', function () { - const fullNode = new HttpProvider(SIDE_CHAIN.fullNode); - const solidityNode = new HttpProvider(SIDE_CHAIN.solidityNode); - - const tronWeb = new TronWeb( - fullNode, - solidityNode, - false, - { - fullNode: SIDE_CHAIN.sideOptions.fullNode, - solidityNode: SIDE_CHAIN.sideOptions.solidityNode, - mainGatewayAddress: SIDE_CHAIN.sideOptions.mainGatewayAddress, - sideGatewayAddress: SIDE_CHAIN.sideOptions.sideGatewayAddress, - sideChainId: SIDE_CHAIN.sideOptions.sideChainId - } - ); - - assert.equal(tronWeb.eventServer, false); - }); - - it('should reject an invalid full node URL in sideOptions', function () { - const fullNode = new HttpProvider(SIDE_CHAIN.fullNode); - const solidityNode = new HttpProvider(SIDE_CHAIN.solidityNode); - assert.throws(() => new TronWeb( - fullNode, - solidityNode, - false, - { - fullNode: '$' + SIDE_CHAIN.sideOptions.fullNode, - mainGatewayAddress: SIDE_CHAIN.sideOptions.mainGatewayAddress, - sideGatewayAddress: SIDE_CHAIN.sideOptions.sideGatewayAddress, - sideChainId: SIDE_CHAIN.sideOptions.sideChainId - } - ), 'Invalid URL provided to HttpProvider'); - }); - - it('should reject an invalid solidity node URL in sideOptions', function () { - const fullNode = new HttpProvider(SIDE_CHAIN.fullNode); - const solidityNode = new HttpProvider(SIDE_CHAIN.solidityNode); - const eventServer = SIDE_CHAIN.eventServer; - assert.throws(() => new TronWeb( - fullNode, - solidityNode, - eventServer, - { - fullNode: SIDE_CHAIN.sideOptions.fullNode, - solidityNode: '$' + SIDE_CHAIN.sideOptions.solidityNode, - mainGatewayAddress: SIDE_CHAIN.sideOptions.mainGatewayAddress, - sideGatewayAddress: SIDE_CHAIN.sideOptions.sideGatewayAddress, - sideChainId: SIDE_CHAIN.sideOptions.sideChainId - } - ), 'Invalid URL provided to HttpProvider'); - }); - - it('should reject an invalid event server URL in sideOptions ', function () { - - const fullNode = new HttpProvider(SIDE_CHAIN.fullNode); - const solidityNode = new HttpProvider(SIDE_CHAIN.solidityNode); - const eventServer = SIDE_CHAIN.eventServer; - assert.throws(() => new TronWeb( - fullNode, - solidityNode, - eventServer, - { - fullNode: SIDE_CHAIN.sideOptions.fullNode, - solidityNode: SIDE_CHAIN.sideOptions.solidityNode, - eventServer: '$' + SIDE_CHAIN.sideOptions.eventServer, - mainGatewayAddress: SIDE_CHAIN.sideOptions.mainGatewayAddress, - sideGatewayAddress: SIDE_CHAIN.sideOptions.sideGatewayAddress, - sideChainId: SIDE_CHAIN.sideOptions.sideChainId - } - ), 'Invalid URL provided to HttpProvider'); - }); - - }); - - describe('#version()', function () { - it('should verify that the version is available as static and non-static property', function () { - const tronWeb = tronWebBuilder.createInstance(); - - assert.equal(typeof tronWeb.version, 'string'); - assert.equal(typeof TronWeb.version, 'string'); - }); - }); - - - describe('#fullnodeVersion()', function () { - it('should verify that the version of the fullNode is available', function () { - const tronWeb = tronWebBuilder.createInstance(); - // setTimeout(() => console.log(tronWeb.fullnodeVersion), 500) - assert.equal(typeof tronWeb.fullnodeVersion, 'string'); - - }); - }); - - describe('#setDefaultBlock()', function () { - it('should accept a positive integer', function () { - const tronWeb = tronWebBuilder.createInstance(); - - tronWeb.setDefaultBlock(1); - - assert.equal(tronWeb.defaultBlock, 1); - }); - - it('should correct a negative integer', function () { - const tronWeb = tronWebBuilder.createInstance(); - - tronWeb.setDefaultBlock(-2); - - assert.equal(tronWeb.defaultBlock, 2); - }); - - it('should accept 0', function () { - const tronWeb = tronWebBuilder.createInstance(); - - tronWeb.setDefaultBlock(0); - - assert.equal(tronWeb.defaultBlock, 0); - }); - - it('should be able to clear', function () { - const tronWeb = tronWebBuilder.createInstance(); - - tronWeb.setDefaultBlock(); - - assert.equal(tronWeb.defaultBlock, false); - }); - - it('should accept "earliest"', function () { - const tronWeb = tronWebBuilder.createInstance(); - - tronWeb.setDefaultBlock('earliest'); - - assert.equal(tronWeb.defaultBlock, 'earliest'); - }); - - it('should accept "latest"', function () { - const tronWeb = tronWebBuilder.createInstance(); - - tronWeb.setDefaultBlock('latest'); - - assert.equal(tronWeb.defaultBlock, 'latest'); - }); - - it('should reject a decimal', function () { - const tronWeb = tronWebBuilder.createInstance(); - - assert.throws(() => tronWeb.setDefaultBlock(10.2), 'Invalid block ID provided'); - }); - - it('should reject a string', function () { - const tronWeb = tronWebBuilder.createInstance(); - - assert.throws(() => tronWeb.setDefaultBlock('test'), 'Invalid block ID provided'); - }); - }); - - describe('#setPrivateKey()', function () { - it('should accept a private key', function () { - const tronWeb = new TronWeb(FULL_NODE_API, SOLIDITY_NODE_API, EVENT_API); - - tronWeb.setPrivateKey(PRIVATE_KEY); - - assert.equal(tronWeb.defaultPrivateKey, PRIVATE_KEY); - }); - - it('should set the appropriate address for the private key', function () { - const tronWeb = new TronWeb(FULL_NODE_API, SOLIDITY_NODE_API, EVENT_API); - - tronWeb.setPrivateKey(PRIVATE_KEY); - - assert.equal(tronWeb.defaultAddress.hex, ADDRESS_HEX); - assert.equal(tronWeb.defaultAddress.base58, ADDRESS_BASE58); - }); - - it('should reject an invalid private key', function () { - const tronWeb = new TronWeb(FULL_NODE_API, SOLIDITY_NODE_API, EVENT_API); - - assert.throws(() => tronWeb.setPrivateKey('test'), 'Invalid private key provided'); - }); - - it('should emit a privateKeyChanged event', function (done) { - this.timeout(1000); - - const tronWeb = tronWebBuilder.createInstance(); - - tronWeb.on('privateKeyChanged', privateKey => { - done( - assert.equal(privateKey, PRIVATE_KEY) - ); - }); - - tronWeb.setPrivateKey(PRIVATE_KEY); - }); - }); - - describe('#setAddress()', function () { - it('should accept a hex address', function () { - const tronWeb = tronWebBuilder.createInstance(); - - tronWeb.setAddress(ADDRESS_HEX); - - assert.equal(tronWeb.defaultAddress.hex, ADDRESS_HEX); - assert.equal(tronWeb.defaultAddress.base58, ADDRESS_BASE58); - }); - - it('should accept a base58 address', function () { - const tronWeb = tronWebBuilder.createInstance(); - - tronWeb.setAddress(ADDRESS_BASE58); - - assert.equal(tronWeb.defaultAddress.hex, ADDRESS_HEX); - assert.equal(tronWeb.defaultAddress.base58, ADDRESS_BASE58); - }); - - it('should reset the private key if the address doesn\'t match', function () { - const tronWeb = tronWebBuilder.createInstance(); - - assert.equal(tronWeb.defaultPrivateKey, PRIVATE_KEY); - - tronWeb.setAddress( - ADDRESS_HEX.substr(0, ADDRESS_HEX.length - 1) + '8' - ); - - assert.equal(tronWeb.defaultPrivateKey, false); - assert.equal(tronWeb.defaultAddress.hex, '41928c9af0651632157ef27a2cf17ca72c575a4d28'); - assert.equal(tronWeb.defaultAddress.base58, 'TPL66VK2gCXNCD7EJg9pgJRfqcRbnn4zcp'); - }); - - it('should not reset the private key if the address matches', function () { - const tronWeb = tronWebBuilder.createInstance(); - - tronWeb.setAddress(ADDRESS_BASE58); - - assert.equal(tronWeb.defaultPrivateKey, PRIVATE_KEY); - }); - - it('should emit an addressChanged event', function (done) { - this.timeout(1000); - - const tronWeb = tronWebBuilder.createInstance(); - - tronWeb.on('addressChanged', ({hex, base58}) => { - done( - assert.equal(hex, ADDRESS_HEX) && - assert.equal(base58, ADDRESS_BASE58) - ); - }); - - tronWeb.setAddress(ADDRESS_BASE58); - }); - }); - - describe('#isValidProvider()', function () { - it('should accept a valid provider', function () { - const tronWeb = tronWebBuilder.createInstance(); - const provider = new HttpProvider(FULL_NODE_API); - - assert.equal(tronWeb.isValidProvider(provider), true); - }); - - it('should accept an invalid provider', function () { - const tronWeb = tronWebBuilder.createInstance(); - - assert.equal(tronWeb.isValidProvider('test'), false); - }); - }); - - describe('#setFullNode()', function () { - it('should accept a HttpProvider instance', function () { - const tronWeb = tronWebBuilder.createInstance(); - const provider = new HttpProvider(FULL_NODE_API); - - tronWeb.setFullNode(provider); - - assert.equal(tronWeb.fullNode, provider); - }); - - it('should accept a valid URL string', function () { - const tronWeb = tronWebBuilder.createInstance(); - const provider = FULL_NODE_API; - - tronWeb.setFullNode(provider); - - assert.equal(tronWeb.fullNode.host, provider); - }); - - it('should reject a non-string', function () { - assert.throws(() => { - tronWebBuilder.createInstance().setFullNode(true) - }, 'Invalid full node provided'); - }); - - it('should reject an invalid URL string', function () { - assert.throws(() => { - tronWebBuilder.createInstance().setFullNode('example.') - }, 'Invalid URL provided to HttpProvider'); - }); - }); - - describe('#setSolidityNode()', function () { - it('should accept a HttpProvider instance', function () { - const tronWeb = tronWebBuilder.createInstance(); - const provider = new HttpProvider(SOLIDITY_NODE_API); - - tronWeb.setSolidityNode(provider); - - assert.equal(tronWeb.solidityNode, provider); - }); - - it('should accept a valid URL string', function () { - const tronWeb = tronWebBuilder.createInstance(); - const provider = SOLIDITY_NODE_API; - - tronWeb.setSolidityNode(provider); - - assert.equal(tronWeb.solidityNode.host, provider); - }); - - it('should reject a non-string', function () { - assert.throws(() => { - tronWebBuilder.createInstance().setSolidityNode(true) - }, 'Invalid solidity node provided'); - }); - - it('should reject an invalid URL string', function () { - assert.throws(() => { - tronWebBuilder.createInstance().setSolidityNode('_localhost') - }, 'Invalid URL provided to HttpProvider'); - }); - }); - - describe('#setEventServer()', function () { - it('should accept a valid URL string', function () { - const tronWeb = tronWebBuilder.createInstance(); - const eventServer = EVENT_API; - - tronWeb.setEventServer(eventServer); - - assert.equal(tronWeb.eventServer.host, eventServer); - }); - - it('should reset the event server property', function () { - const tronWeb = tronWebBuilder.createInstance(); - - tronWeb.setEventServer(false); - - assert.equal(tronWeb.eventServer, false); - }); - - it('should reject an invalid URL string', function () { - const tronWeb = tronWebBuilder.createInstance(); - - assert.throws(() => { - tronWeb.setEventServer('test%20') - }, 'Invalid URL provided to HttpProvider'); - }); - - it('should reject an invalid URL parameter', function () { - const tronWeb = tronWebBuilder.createInstance(); - - assert.throws(() => { - tronWeb.setEventServer({}) - }, 'Invalid event server provided'); - }); - }); - - describe('#currentProviders()', function () { - it('should return the current providers', function () { - const tronWeb = tronWebBuilder.createInstance(); - const providers = tronWeb.currentProviders(); - - const tronWebSide = tronWebBuilder.createInstanceSide(); - const providersSide = tronWebSide.currentProviders(); - - assert.equal(providers.fullNode.host, FULL_NODE_API); - assert.equal(providers.solidityNode.host, SOLIDITY_NODE_API); - assert.equal(providers.eventServer.host, EVENT_API); - - assert.equal(providersSide.fullNode.host, SIDE_CHAIN.fullNode); - assert.equal(providersSide.solidityNode.host, SIDE_CHAIN.solidityNode); - assert.equal(providersSide.eventServer.host, SIDE_CHAIN.eventServer); - }); - }); - - describe('#currentProvider()', function () { - it('should return the current providers', function () { - const tronWeb = tronWebBuilder.createInstance(); - const providers = tronWeb.currentProvider(); - - const tronWebSide = tronWebBuilder.createInstanceSide(); - const providersSide = tronWebSide.currentProviders(); - - assert.equal(providers.fullNode.host, FULL_NODE_API); - assert.equal(providers.solidityNode.host, SOLIDITY_NODE_API); - assert.equal(providers.eventServer.host, EVENT_API); - - assert.equal(providersSide.fullNode.host, SIDE_CHAIN.fullNode); - assert.equal(providersSide.solidityNode.host, SIDE_CHAIN.solidityNode); - assert.equal(providersSide.eventServer.host, SIDE_CHAIN.eventServer); - }); - }); - - describe('#sha3()', function () { - it('should match web3 sha function', function () { - const input = 'casa'; - const expected = '0xc4388c0eaeca8d8b4f48786df8517bc8ca379e8cf9566af774448e46e816657d'; - - assert.equal(TronWeb.sha3(input), expected); - }); - }); - - describe('#toHex()', function () { - it('should convert a boolean to hex', function () { - let input = true; - let expected = '0x1'; - assert.equal(TronWeb.toHex(input), expected); - - input = false; - expected = '0x0'; - assert.equal(TronWeb.toHex(input), expected); - }); - - it('should convert a BigNumber to hex', function () { - let input = BigNumber('123456.7e-3'); - let expected = '0x7b.74ea4a8c154c985f06f7'; - assert.equal(TronWeb.toHex(input), expected); - - input = new BigNumber(89273674656); - expected = '0x14c9202ba0'; - assert.equal(TronWeb.toHex(input), expected); - - input = BigNumber('23e89'); - expected = '0x1210c23ede2d38fed455e938516db71cfaf3ec4a1c8f3fa92f98a60000000000000000000000'; - assert.equal(TronWeb.toHex(input), expected); - }); - - it('should convert an object to an hex string', function () { - let input = {address: 'TTRjVyHu1Lv3DjBPTgzCwsjCvsQaHKQcmN'}; - let expected = '0x7b2261646472657373223a225454526a56794875314c7633446a425054677a4377736a4376735161484b51636d4e227d'; - assert.equal(TronWeb.toHex(input), expected); - - input = [1, 2, 3]; - expected = '0x5b312c322c335d'; - assert.equal(TronWeb.toHex(input), expected); - }); - - it('should convert a string to hex', function () { - let input = 'salamon'; - let expected = '0x73616c616d6f6e'; - assert.equal(TronWeb.toHex(input), expected); - input = ''; - expected = '0x'; - assert.equal(TronWeb.toHex(input), expected); - input = ' '; - expected = '0x20'; - assert.equal(TronWeb.toHex(input), expected); - }); - - it('should leave an hex string as is', function () { - let input = '0x73616c616d6f6e'; - let expected = '0x73616c616d6f6e'; - assert.equal(TronWeb.toHex(input), expected); - }); - - it('should convert a number to an hex string', function () { - let input = 24354; - let expected = '0x5f22'; - assert.equal(TronWeb.toHex(input), expected); - - input = -423e-2; - expected = '-0x4.3ae147ae147ae147ae14'; - assert.equal(TronWeb.toHex(input), expected); - }); - - it('should throw an error if the value is not convertible', function () { - - assert.throws(() => { - TronWeb.toHex(TronWeb) - }, 'The passed value is not convertible to a hex string'); - }); - - }); - - describe("#toUtf8", function () { - - it("should convert an hex string to utf8", function () { - - let input = '0x73616c616d6f6e'; - let expected = 'salamon'; - assert.equal(TronWeb.toUtf8(input), expected); - - }); - - it("should convert an hex string to utf8", function () { - - let input = '0xe69cbae6a2b0e58f8ae8a18ce4b89ae8aebee5a487'; - let expected = '机械及行业设备'; - assert.equal(TronWeb.toUtf8(input), expected); - - }); - - it('should throw an error if the string is not a valid hex string in strict mode', function () { - let input = 'salamon'; - - assert.throws(() => { - TronWeb.toUtf8(input, true) - }, 'The passed value is not a valid hex string'); - }); - - }); - - describe("#fromUtf8", function () { - - it("should convert an utf-8 string to hex", function () { - - let input = 'salamon'; - let expected = '0x73616c616d6f6e'; - assert.equal(TronWeb.fromUtf8(input), expected); - - input = '机械及行业设备'; - expected = '0xe69cbae6a2b0e58f8ae8a18ce4b89ae8aebee5a487'; - assert.equal(TronWeb.fromUtf8(input), expected); - - }); - - it('should throw an error if the utf-8 string is not a string', function () { - assert.throws(() => { - TronWeb.fromUtf8([]) - }, 'The passed value is not a valid utf-8 string'); - }); - - }); - - describe("#toAscii", function () { - - it("should convert a hex string to ascii", function () { - - let input = '0x73616c616d6f6e'; - let expected = 'salamon'; - assert.equal(TronWeb.toAscii(input), expected); - - input = '0xe69cbae6a2b0e58f8ae8a18ce4b89ae8aebee5a487'; - expected = '机械及行业设备'; - // 'f\u001c:f"0e\u000f\nh!\fd8\u001ah.>e$\u0007'; - assert.equal(TronWeb.toAscii(input), expected); - }); - - it('should throw an error if the string is not a valid hex string', function () { - let input = 'salamon'; - assert.throws(() => { - TronWeb.toAscii(input) - }, 'The passed value is not a valid hex string'); - }); - - }); - - describe("#fromAscii", function () { - - it("should convert an ascii string to hex", function () { - - let input = 'salamon'; - let expected = '0x73616c616d6f6e'; - assert.equal(TronWeb.fromAscii(input), expected); - - input = '机械及行业设备'; - expected = '0xe69cbae6a2b0e58f8ae8a18ce4b89ae8aebee5a487'; - assert.equal(TronWeb.fromAscii(input), expected); - }); - - it('should throw an error if the utf-8 string is not a string', function () { - let result; - assert.throws(() => { - TronWeb.fromAscii([]) - }, 'The passed value is not a valid utf-8 string'); - }); - - }); - - describe("#toBigNumber", function () { - - it("should convert a hex string to a bignumber", function () { - - let input = '0x73616c61'; - let expected = 1935764577; - assert.equal(TronWeb.toBigNumber(input).toNumber(), expected); - - - }); - - it("should convert a number to a bignumber", function () { - - let input = 1935764577; - let expected = 1935764577; - - assert.equal(TronWeb.toBigNumber(input).c[0], expected); - }); - - it("should convert a number string to a bignumber", function () { - - let input = '89384775883766237763193576457709388576373'; - let expected = [8938477588376, 62377631935764, 57709388576373]; - - assert.equal(TronWeb.toBigNumber(input).c[0], expected[0]); - assert.equal(TronWeb.toBigNumber(input).c[1], expected[1]); - assert.equal(TronWeb.toBigNumber(input).c[2], expected[2]); - }); - }); - - describe("#toDecimal", function () { - - it("should convert a hex string to a number", function () { - - let input = '0x73616c61'; - let expected = 1935764577; - assert.equal(TronWeb.toDecimal(input), expected); - }); - - it("should convert a number to a bignumber", function () { - - let input = 1935764577; - let expected = 1935764577; - - assert.equal(TronWeb.toDecimal(input), expected); - }); - - it("should convert a number string to a bignumber", function () { - - let input = '89384775883766237763193576457709388576373'; - let expected = 8.938477588376623e+40; - - assert.equal(TronWeb.toDecimal(input), expected); - }); - }); - - describe("#fromDecimal", function () { - - it("should convert a number to an hex string to a number", function () { - - let input = 1935764577; - let expected = '0x73616c61'; - assert.equal(TronWeb.fromDecimal(input), expected); - }); - - it("should convert a negative number to an hex string to a number", function () { - - let input = -1935764577; - let expected = '-0x73616c61'; - assert.equal(TronWeb.fromDecimal(input), expected); - }); - }); - - - describe("#toSun", function () { - - it("should convert some trx to sun", function () { - - let input = 324; - let expected = 324e6; - assert.equal(TronWeb.toSun(input), expected); - }); - }); - - - describe("#fromSun", function () { - it("should convert a negative number to an hex string to a number", function () { - - let input = 3245e6; - let expected = 3245; - assert.equal(TronWeb.fromSun(input), expected); - }); - }); - - describe("#isAddress", function () { - it("should verify that a string is a valid base58 address", function () { - - let input = 'TYPG8VeuoVAh2hP7Vfw6ww7vK98nvXXXUG'; - assert.equal(TronWeb.isAddress(input), true); - }); - - it("should verify that a string is an invalid base58 address", function () { - - let input = 'TYPG8VeuoVAh2hP7Vfw6ww7vK98nvXXXUs'; - assert.equal(TronWeb.isAddress(input), false); - - input = 'TYPG8VeuoVAh2hP7Vfw6ww7vK98nvXXXUG89'; - assert.equal(TronWeb.isAddress(input), false); - - input = 'aYPG8VeuoVAh2hP7Vfw6ww7vK98nvXXXUG'; - assert.equal(TronWeb.isAddress(input), false); - }); - - it("should verify that a string is a valid hex address", function () { - - let input = '4165cfbd57fa4f20687b2c33f84c4f9017e5895d49'; - assert.equal(TronWeb.isAddress(input), true); - }); - - it("should verify that a string is an invalid base58 address", function () { - - let input = '0x65cfbd57fa4f20687b2c33f84c4f9017e5895d49'; - assert.equal(TronWeb.isAddress(input), false); - - input = '4165cfbd57fa4f20687b2c33f84c4f9017e589'; - assert.equal(TronWeb.isAddress(input), false); - - input = '4165cfbd57fa4f20687b2c33f84c4f9017e5895d4998'; - assert.equal(TronWeb.isAddress(input), false); - }); - }); - - describe("#createAccount", function () { - it("should create a new account", async function () { - const tronWeb = tronWebBuilder.createInstance(); - - const newAccount = await TronWeb.createAccount(); - assert.equal(newAccount.privateKey.length, 64); - assert.equal(newAccount.publicKey.length, 130); - let address = tronWeb.address.fromPrivateKey(newAccount.privateKey); - assert.equal(address, newAccount.address.base58); - address = tronWeb.address.fromPrivateKey(newAccount.privateKey, true); - assert.equal(address, newAccount.address.base58); - // TODO The new accounts returns an uppercase address, while everywhere else we handle lowercase addresses. Maybe we should make it consistent and let createAccount returning a lowercase address - assert.equal(tronWeb.address.toHex(address), newAccount.address.hex.toLowerCase()); - }); - }); - - - describe("#createRandom", function () { - it("should create a random mnemonic and the zero index account", async function () { - const tronWeb = tronWebBuilder.createInstance(); - - const newAccount = await tronWeb.createRandom(); - assert.equal(newAccount.privateKey.substring(2).length, 64); - assert.equal(newAccount.publicKey.substring(2).length, 130); - let address = tronWeb.address.fromPrivateKey(newAccount.privateKey.substring(2)); - assert.equal(address, newAccount.address); - address = tronWeb.address.fromPrivateKey(newAccount.privateKey.substring(2), true); - assert.equal(address, newAccount.address); - assert.equal(tronWeb.address.toHex(address), tronWeb.address.toHex(newAccount.address)); - }); - }); - - describe("#fromMnemonic", function () { - it("should generate the zero index account of the passed mnemonic phrase", async function () { - const tronWeb = tronWebBuilder.createInstance(); - - const accountCreated = await tronWeb.createRandom() - - const newAccount = await tronWeb.fromMnemonic(accountCreated.mnemonic.phrase); - - assert.equal(newAccount.privateKey.substring(2).length, 64); - assert.equal(newAccount.publicKey.substring(2).length, 130); - let address = tronWeb.address.fromPrivateKey(newAccount.privateKey.substring(2)); - assert.equal(address, newAccount.address); - address = tronWeb.address.fromPrivateKey(newAccount.privateKey.substring(2), true); - assert.equal(address, newAccount.address); - assert.equal(tronWeb.address.toHex(address), tronWeb.address.toHex(newAccount.address)); - }); - }); - - - describe("#isConnected", function () { - it("should verify that tronWeb is connected to nodes and event server", async function () { - - this.timeout(10000) - - const tronWeb = tronWebBuilder.createInstance(); - const isConnected = await tronWeb.isConnected(); - assert.isTrue(isConnected.fullNode); - assert.isTrue(isConnected.solidityNode); - if (!SUN_NETWORK) { // As https://testhttpapi.tronex.io/healthcheck is 404 - assert.isTrue(isConnected.eventServer); - } - - }); - }); - - describe("#getEventsByTransactionID", async function () { - - let accounts - let tronWeb - let contractAddress - let contract - - before(async function () { - tronWeb = tronWebBuilder.createInstance(); - accounts = await tronWebBuilder.getTestAccounts(-1); - - const result = await broadcaster(tronWeb.transactionBuilder.createSmartContract({ - abi: [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_sender", - "type": "address" - }, - { - "indexed": false, - "name": "_receiver", - "type": "address" - }, - { - "indexed": false, - "name": "_amount", - "type": "uint256" - } - ], - "name": "SomeEvent", - "type": "event" - }, - { - "constant": false, - "inputs": [ - { - "name": "_receiver", - "type": "address" - }, - { - "name": "_someAmount", - "type": "uint256" - } - ], - "name": "emitNow", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - bytecode: "0x608060405234801561001057600080fd5b50610145806100206000396000f300608060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063bed7111f14610046575b600080fd5b34801561005257600080fd5b50610091600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610093565b005b3373ffffffffffffffffffffffffffffffffffffffff167f9f08738e168c835bbaf7483705fb1c0a04a1a3258dd9687f14d430948e04e3298383604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a250505600a165627a7a7230582033629e2b0bba53f7b5c49769e7e360f2803ae85ac80e69dd61c7bb48f9f401f30029" - }, accounts.hex[0]), accounts.pks[0]) - - contractAddress = result.receipt.transaction.contract_address - contract = await tronWeb.contract().at(contractAddress) - - }); - - - it('should emit an unconfirmed event and get it', async function () { - - this.timeout(60000) - tronWeb.setPrivateKey(accounts.pks[1]) - let txId = await contract.emitNow(accounts.hex[2], 2000).send({ - from: accounts.hex[1] - }) - let events - while (true) { - events = await tronWeb.getEventByTransactionID(txId) - if (events.length) { - break - } - await wait(0.5) - } - - assert.equal(events[0].result._receiver.substring(2), accounts.hex[2].substring(2)) - assert.equal(events[0].result._sender.substring(2), accounts.hex[1].substring(2)) - assert.equal(events[0].resourceNode, 'fullNode') - - }) - - }); - - describe("#getEventResult", async function () { - - let accounts - let tronWeb - let contractAddress - let contract - let eventLength = 0 - - before(async function () { - tronWeb = tronWebBuilder.createInstance(); - accounts = await tronWebBuilder.getTestAccounts(-1); - - const result = await broadcaster(tronWeb.transactionBuilder.createSmartContract({ - abi: [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_sender", - "type": "address" - }, - { - "indexed": false, - "name": "_receiver", - "type": "address" - }, - { - "indexed": false, - "name": "_amount", - "type": "uint256" - } - ], - "name": "SomeEvent", - "type": "event" - }, - { - "constant": false, - "inputs": [ - { - "name": "_receiver", - "type": "address" - }, - { - "name": "_someAmount", - "type": "uint256" - } - ], - "name": "emitNow", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - bytecode: "0x608060405234801561001057600080fd5b50610145806100206000396000f300608060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063bed7111f14610046575b600080fd5b34801561005257600080fd5b50610091600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610093565b005b3373ffffffffffffffffffffffffffffffffffffffff167f9f08738e168c835bbaf7483705fb1c0a04a1a3258dd9687f14d430948e04e3298383604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a250505600a165627a7a7230582033629e2b0bba53f7b5c49769e7e360f2803ae85ac80e69dd61c7bb48f9f401f30029" - }, accounts.hex[0]), accounts.pks[0]) - - contractAddress = result.receipt.transaction.contract_address - contract = await tronWeb.contract().at(contractAddress) - - }); - - it('should emit an event and wait for it', async function () { - - this.timeout(60000) - tronWeb.setPrivateKey(accounts.pks[3]) - await contract.emitNow(accounts.hex[4], 4000).send({ - from: accounts.hex[3] - }) - eventLength++ - let events - while (true) { - events = await tronWeb.getEventResult(contractAddress, { - eventName: 'SomeEvent', - sort: 'block_timestamp' - }) - if (events.length === eventLength) { - break - } - await wait(0.5) - } - - const event = events[events.length - 1] - - assert.equal(event.result._receiver.substring(2), accounts.hex[4].substring(2)) - assert.equal(event.result._sender.substring(2), accounts.hex[3].substring(2)) - assert.equal(event.resourceNode, 'fullNode') - }) - - }); - -}); - -describe("#testTronGrid", function () { - // Temporary stop testing api key because test server is closed - return - - describe("#testTronGridApiKey", function () { - it("should add the parameter TRON-PRO-API-KEY=Key to the header of the request", async function () { - const tronWeb = tronWebBuilder.createInstance({ - fullHost: TEST_TRON_GRID_API, - headers: { "TRON-PRO-API-KEY": TEST_TRON_HEADER_API_KEY }, - }); - - assert.equal( - tronWeb.fullNode.headers["TRON-PRO-API-KEY"], - TEST_TRON_HEADER_API_KEY - ); - assert.equal( - tronWeb.eventServer.headers["TRON-PRO-API-KEY"], - TEST_TRON_HEADER_API_KEY - ); - - const account = await tronWeb.trx.getAccount(); - assert.equal(typeof account, "object"); - - const tx = await tronWeb.event.getEventsByContractAddress( - tronWeb.defaultAddress.base58 - ); - assert.equal(typeof tx, "object"); - }); - - it("should add the parameter TRON-PRO-API-KEY=Key to the header of the event request", async function () { - const tronWeb = tronWebBuilder.createInstance({ - fullHost: TEST_TRON_GRID_API, - headers: { "TRON-PRO-API-KEY": TEST_TRON_HEADER_API_KEY }, - eventHeaders: { "TRON-PRO-API-KEY": TEST_TRON_HEADER_API_KEY }, - }); - - assert.equal( - tronWeb.fullNode.headers["TRON-PRO-API-KEY"], - TEST_TRON_HEADER_API_KEY - ); - assert.equal( - tronWeb.eventServer.headers["TRON-PRO-API-KEY"], - TEST_TRON_HEADER_API_KEY - ); - - const account = await tronWeb.trx.getAccount(); - assert.equal(typeof account, "object"); - - const tx = await tronWeb.event.getEventsByContractAddress( - tronWeb.defaultAddress.base58 - ); - assert.equal(typeof tx, "object"); - }); - - it("should set the parameter TRON-PRO-API-KEY=Key to the header of the request", async function () { - const tronWeb = tronWebBuilder.createInstance({ - fullHost: TEST_TRON_GRID_API, - }); - tronWeb.setHeader({ "TRON-PRO-API-KEY": TEST_TRON_HEADER_API_KEY }); - - assert.equal( - tronWeb.fullNode.headers["TRON-PRO-API-KEY"], - TEST_TRON_HEADER_API_KEY - ); - assert.equal( - tronWeb.eventServer.headers["TRON-PRO-API-KEY"], - TEST_TRON_HEADER_API_KEY - ); - - const account = await tronWeb.trx.getAccount(); - assert.equal(typeof account, "object"); - - const tx = await tronWeb.event.getEventsByContractAddress( - tronWeb.defaultAddress.base58 - ); - assert.equal(typeof tx, "object"); - }); - - it("should set the parameter TRON-PRO-API-KEY=Key to the header of the fullNode request", async function () { - const tronWeb = tronWebBuilder.createInstance({ - fullHost: TEST_TRON_GRID_API, - }); - tronWeb.setFullNodeHeader({ - "TRON-PRO-API-KEY": TEST_TRON_HEADER_API_KEY, - }); - - assert.equal( - tronWeb.fullNode.headers["TRON-PRO-API-KEY"], - TEST_TRON_HEADER_API_KEY - ); - assert.equal( - tronWeb.eventServer.headers["TRON-PRO-API-KEY"], - undefined - ); - - const account = await tronWeb.trx.getAccount(); - assert.equal(typeof account, "object"); - - try { - await tronWeb.event.getEventsByContractAddress( - tronWeb.defaultAddress.base58 - ); - } catch (error) { - assert.equal(error.statusCode, 401); - } - }); - - it("should set the parameter TRON-PRO-API-KEY=Key to the header of the event request", async function () { - const tronWeb = tronWebBuilder.createInstance({ - fullHost: TEST_TRON_GRID_API, - }); - tronWeb.setEventHeader({ - "TRON-PRO-API-KEY": TEST_TRON_HEADER_API_KEY, - }); - - assert.equal( - tronWeb.fullNode.headers["TRON-PRO-API-KEY"], - undefined - ); - assert.equal( - tronWeb.eventServer.headers["TRON-PRO-API-KEY"], - TEST_TRON_HEADER_API_KEY - ); - - try { - await tronWeb.trx.getAccount(); - } catch (error) { - assert.equal(error.response.status, 401); - } - - const tx = await tronWeb.event.getEventsByContractAddress( - tronWeb.defaultAddress.base58 - ); - assert.equal(typeof tx, "object"); - }); - - it("should set the valid key to the header of the request", async function () { - const FAKE_KEY = "ABCEDF"; - const tronWeb = tronWebBuilder.createInstance({ - fullHost: TEST_TRON_GRID_API, - headers: { "TRON-PRO-API-KEY": FAKE_KEY }, - }); - - assert.equal( - tronWeb.fullNode.headers["TRON-PRO-API-KEY"], - FAKE_KEY - ); - assert.equal( - tronWeb.eventServer.headers["TRON-PRO-API-KEY"], - FAKE_KEY - ); - - try { - await tronWeb.trx.getAccount(); - } catch (error) { - assert.equal(error.response.status, 401); - } - - try { - await tronWeb.event.getEventsByContractAddress( - tronWeb.defaultAddress.base58 - ); - } catch (error) { - assert.equal(error.statusCode, 401); - } - }); - - it("should set the valid key to the header of the fullnode request", async function () { - const FAKE_KEY = "ABCEDF"; - const tronWeb = tronWebBuilder.createInstance({ - fullHost: TEST_TRON_GRID_API, - headers: { "TRON-PRO-API-KEY": FAKE_KEY }, - eventHeaders: { "TRON-PRO-API-KEY": TEST_TRON_HEADER_API_KEY }, - }); - - assert.equal( - tronWeb.fullNode.headers["TRON-PRO-API-KEY"], - FAKE_KEY - ); - assert.equal( - tronWeb.eventServer.headers["TRON-PRO-API-KEY"], - TEST_TRON_HEADER_API_KEY - ); - - try { - await tronWeb.trx.getAccount(); - } catch (error) { - assert.equal(error.response.status, 401); - } - - const tx = await tronWeb.event.getEventsByContractAddress( - tronWeb.defaultAddress.base58 - ); - assert.equal(typeof tx, "object"); - }); - - it("should set the valid key to the header of the event request", async function () { - const FAKE_KEY = "ABCEDF"; - const tronWeb = tronWebBuilder.createInstance({ - fullHost: TEST_TRON_GRID_API, - headers: { "TRON-PRO-API-KEY": TEST_TRON_HEADER_API_KEY }, - eventHeaders: { "TRON-PRO-API-KEY": FAKE_KEY }, - }); - - assert.equal( - tronWeb.fullNode.headers["TRON-PRO-API-KEY"], - TEST_TRON_HEADER_API_KEY - ); - assert.equal( - tronWeb.eventServer.headers["TRON-PRO-API-KEY"], - FAKE_KEY - ); - - const account = await tronWeb.trx.getAccount(); - assert.equal(typeof account, "object"); - - try { - await tronWeb.event.getEventsByContractAddress( - tronWeb.defaultAddress.base58 - ); - } catch (error) { - assert.equal(error.statusCode, 401); - } - }); - }); - - describe("#testTronGridJwtKey", function () { - it("should add the parameter Authorization=Key to the header of the request", async function () { - const token = jwt.sign( - { aud: "trongrid.io" }, - TEST_TRON_HEADER_JWT_PRIVATE_KEY, - { - header: { - alg: "RS256", - typ: "JWT", - kid: TEST_TRON_HEADER_JWT_ID, - }, - } - ); - - const tronWeb = tronWebBuilder.createInstance({ - fullHost: TEST_TRON_GRID_API, - headers: { - "TRON-PRO-API-KEY": TEST_TRON_HEADER_API_JWT_KEY, - Authorization: `Bearer ${token}`, - }, - }); - - const account = await tronWeb.trx.getAccount(); - assert.equal(typeof account, "object"); - }); - - it("should the valid exp to the payload of the sign", async function () { - const token = jwt.sign( - { - exp: 0, - aud: "trongrid.io", - }, - TEST_TRON_HEADER_JWT_PRIVATE_KEY, - { - header: { - alg: "RS256", - typ: "JWT", - kid: TEST_TRON_HEADER_JWT_ID, - }, - } - ); - - const tronWeb = tronWebBuilder.createInstance({ - fullHost: TEST_TRON_GRID_API, - headers: { - "TRON-PRO-API-KEY": TEST_TRON_HEADER_API_JWT_KEY, - Authorization: `Bearer ${token}`, - }, - }); - - try { - await tronWeb.trx.getAccount(); - } catch (error) { - assert.equal(error.response.status, 401); - } - }); - }); -}); diff --git a/test/lib/contract/index.test.js b/test/lib/contract/index.test.js deleted file mode 100644 index 0be55582..00000000 --- a/test/lib/contract/index.test.js +++ /dev/null @@ -1,48 +0,0 @@ -const chai = require('chai'); -const assert = chai.assert; -const wait = require('../../helpers/wait'); -const assertThrow = require('../../helpers/assertThrow'); -const broadcaster = require('../../helpers/broadcaster'); -const _ = require('lodash'); -const tronWebBuilder = require('../../helpers/tronWebBuilder'); -const TronWeb = tronWebBuilder.TronWeb; - -const testCustomError = require('../../fixtures/contracts').testCustomError; - -describe('#contract.index', function () { - - let accounts; - let tronWeb; - let emptyAccount; - - before(async function () { - tronWeb = tronWebBuilder.createInstance(); - // ALERT this works only with Tron Quickstart: - accounts = await tronWebBuilder.getTestAccounts(-1); - emptyAccount = await TronWeb.createAccount(); - }); - - describe('#customError', function () { - let customError; - - before(async function () { - const tx = await broadcaster(tronWeb.transactionBuilder.createSmartContract({ - abi: testCustomError.abi, - bytecode: testCustomError.bytecode - }, accounts.b58[0]), accounts.pks[0]); - customError = await tronWeb.contract(testCustomError.abi, tx.transaction.contract_address); - }) - - it('should revert with custom error', async () => { - const txid = await customError.test(111).send(); - await wait(10); - const data = await tronWeb.trx.getTransactionInfo(txid); - const errorData = data.contractResult; - const expectedErrorData = - TronWeb.sha3('CustomError(uint256,uint256)', false).slice(0, 8) + - '000000000000000000000000000000000000000000000000000000000000006f' + // 111 - '0000000000000000000000000000000000000000000000000000000000000001'; // 1 - assert.equal(errorData, expectedErrorData); - }) - }) -}); diff --git a/test/lib/contract/method.test.js b/test/lib/contract/method.test.js deleted file mode 100644 index 4fd59de6..00000000 --- a/test/lib/contract/method.test.js +++ /dev/null @@ -1,99 +0,0 @@ -const chai = require('chai'); -const assert = chai.assert; -const wait = require('../../helpers/wait'); -const assertThrow = require('../../helpers/assertThrow'); -const broadcaster = require('../../helpers/broadcaster'); -const _ = require('lodash'); -const tronWebBuilder = require('../../helpers/tronWebBuilder'); -const TronWeb = tronWebBuilder.TronWeb; - -const testRevertContract = require('../../fixtures/contracts').testRevert; -const testSetValContract = require('../../fixtures/contracts').testSetVal; - -describe('#contract.method', function () { - - let accounts; - let tronWeb; - let emptyAccount; - - before(async function () { - tronWeb = tronWebBuilder.createInstance(); - // ALERT this works only with Tron Quickstart: - accounts = await tronWebBuilder.getTestAccounts(-1); - emptyAccount = await TronWeb.createAccount(); - }); - - describe('#send()', function () { - - let testRevert - let testSetVal - - before(async function () { - const tx = await broadcaster(tronWeb.transactionBuilder.createSmartContract({ - abi: testRevertContract.abi, - bytecode: testRevertContract.bytecode - }, accounts.b58[0]), accounts.pks[0]) - testRevert = await tronWeb.contract().at(tx.transaction.contract_address) - - const tx2 = await broadcaster(tronWeb.transactionBuilder.createSmartContract({ - abi: testSetValContract.abi, - bytecode: testSetValContract.bytecode - }, accounts.b58[0]), accounts.pks[0]) - testSetVal = await tronWeb.contract().at(tx2.transaction.contract_address) - }) - - it("should set accounts[2] as the owner and check it with getOwner(1)", async function () { - await testRevert.setOwner(accounts.b58[2]).send() - assert.equal(await testRevert.getOwner(1).call(), accounts.hex[2]) - }) - - it("should revert if trying to set TSeFTBYCy3r2kZNYsj86G6Yz6rsmPdYdFs as the owner", async function () { - this.timeout(30000) - await assertThrow(testRevert.setOwner('TSeFTBYCy3r2kZNYsj86G6Yz6rsmPdYdFs').send({shouldPollResponse: true}), - null, - 'REVERT' - ) - }); - - it("should set the val to 123", async function () { - this.timeout(30000) - let result = await testSetVal.set(123).send({ - shouldPollResponse: true, - keepTxID: true - }) - assert.equal(result[0].length, 64) - assert.equal(Number(result[1]), 123) - }); - - }); - - describe('#call()', function () { - - let testRevert - - before(async function () { - const tx = await broadcaster(tronWeb.transactionBuilder.createSmartContract({ - abi: testRevertContract.abi, - bytecode: testRevertContract.bytecode - }, accounts.b58[0]), accounts.pks[0]) - testRevert = await tronWeb.contract().at(tx.transaction.contract_address) - await testRevert.setOwner(accounts.b58[2]).send() - }) - - it("should getOwner(1) and get accounts[2]", async function () { - assert.equal(await testRevert.getOwner(1).call(), accounts.hex[2]) - }) - - it("should revert if call getOwner(2)", async function () { - await assertThrow(testRevert.getOwner(2).call() - ) - }) - - it("should revert if call getOwner2()", async function () { - await assertThrow(testRevert.getOwner2(2).call() - ) - }) - - }); - -}); diff --git a/test/lib/event.test.js b/test/lib/event.test.js deleted file mode 100644 index e30d963e..00000000 --- a/test/lib/event.test.js +++ /dev/null @@ -1,214 +0,0 @@ -const chai = require('chai'); -const {FULL_NODE_API} = require('../helpers/config'); -const assertThrow = require('../helpers/assertThrow'); -const tronWebBuilder = require('../helpers/tronWebBuilder'); -const TronWeb = tronWebBuilder.TronWeb; -const jlog = require('../helpers/jlog') -const broadcaster = require('../helpers/broadcaster'); -const wait = require('../helpers/wait') - -const assert = chai.assert; - -describe('TronWeb.lib.event', async function () { - - let accounts - let tronWeb - let contractAddress - let contract - let eventLength = 0 - - before(async function () { - tronWeb = tronWebBuilder.createInstance(); - accounts = await tronWebBuilder.getTestAccounts(-1); - - const result = await broadcaster(tronWeb.transactionBuilder.createSmartContract({ - abi: [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_sender", - "type": "address" - }, - { - "indexed": false, - "name": "_receiver", - "type": "address" - }, - { - "indexed": false, - "name": "_amount", - "type": "uint256" - } - ], - "name": "SomeEvent", - "type": "event" - }, - { - "constant": false, - "inputs": [ - { - "name": "_receiver", - "type": "address" - }, - { - "name": "_someAmount", - "type": "uint256" - } - ], - "name": "emitNow", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - bytecode: "0x608060405234801561001057600080fd5b50610145806100206000396000f300608060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063bed7111f14610046575b600080fd5b34801561005257600080fd5b50610091600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610093565b005b3373ffffffffffffffffffffffffffffffffffffffff167f9f08738e168c835bbaf7483705fb1c0a04a1a3258dd9687f14d430948e04e3298383604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a250505600a165627a7a7230582033629e2b0bba53f7b5c49769e7e360f2803ae85ac80e69dd61c7bb48f9f401f30029" - }, accounts.hex[0]), accounts.pks[0]) - - contractAddress = result.receipt.transaction.contract_address - contract = await tronWeb.contract().at(contractAddress) - - }); - - describe('#constructor()', function () { - - it('should have been set a full instance in tronWeb', function () { - - assert.instanceOf(tronWeb.event, TronWeb.Event); - }); - - }); - - describe("#getEventsByTransactionID", async function () { - - - it('should emit an unconfirmed event and get it', async function () { - - this.timeout(60000) - tronWeb.setPrivateKey(accounts.pks[1]) - let txId = await contract.emitNow(accounts.hex[2], 2000).send({ - from: accounts.hex[1] - }) - eventLength++ - let events - while(true) { - events = await tronWeb.event.getEventsByTransactionID(txId) - if (events.length) { - break - } - await wait(0.5) - } - - assert.equal(events[0].result._receiver.substring(2), accounts.hex[2].substring(2)) - assert.equal(events[0].result._sender.substring(2), accounts.hex[1].substring(2)) - assert.equal(events[0].resourceNode, 'fullNode') - - }) - - it('should emit an event, wait for confirmation and get it', async function () { - - this.timeout(60000) - tronWeb.setPrivateKey(accounts.pks[1]) - let output = await contract.emitNow(accounts.hex[2], 2000).send({ - from: accounts.hex[1], - shouldPollResponse: true, - rawResponse: true - }) - eventLength++ - - let txId = output.id - let events - while(true) { - events = await tronWeb.event.getEventsByTransactionID(txId) - if (events.length) { - break - } - await wait(0.5) - } - - assert.equal(events[0].result._receiver.substring(2), accounts.hex[2].substring(2)) - assert.equal(events[0].result._sender.substring(2), accounts.hex[1].substring(2)) - assert.equal(events[0].resourceNode, 'solidityNode') - - }) - - }); - - describe("#getEventsByContractAddress", async function () { - - it('should emit an event and wait for it', async function () { - - this.timeout(60000) - tronWeb.setPrivateKey(accounts.pks[3]) - await contract.emitNow(accounts.hex[4], 4000).send({ - from: accounts.hex[3] - }) - eventLength++ - let events - while(true) { - events = await tronWeb.event.getEventsByContractAddress(contractAddress, { - eventName: 'SomeEvent', - sort: 'block_timestamp' - }) - if (events.length === eventLength) { - break - } - await wait(0.5) - } - - const event = events[events.length - 1] - - assert.equal(event.result._receiver.substring(2), accounts.hex[4].substring(2)) - assert.equal(event.result._sender.substring(2), accounts.hex[3].substring(2)) - assert.equal(event.resourceNode, 'fullNode') - - }) - - }); - - describe('#contract.method.watch', async function () { - - it('should watch for an event', async function () { - - this.timeout(20000) - tronWeb.setPrivateKey(accounts.pks[3]) - - let watchTest = await contract.SomeEvent().watch((err, res) => { - if(res) { - assert.equal(res.result._sender, accounts.hex[3]) - assert.equal(res.result._receiver, accounts.hex[4]) - assert.equal(res.result._amount, 4000) - - watchTest.stop() // Calls stop on itself when successful - } - }) - - contract.emitNow(accounts.hex[4], 4000).send({ - from: accounts.hex[3] - }) - - }) - - it('should only watch for an event with given filters', async function () { - - this.timeout(20000) - tronWeb.setPrivateKey(accounts.pks[3]) - - let watchTest = await contract.SomeEvent().watch({filters: {"_amount": "4000"}}, (err, res) => { - if(res) { - assert.equal(res.result._sender, accounts.hex[3]) - assert.equal(res.result._receiver, accounts.hex[4]) - assert.equal(res.result._amount, 4000) - - watchTest.stop() // Calls stop on itself when successful - } - }) - - contract.emitNow(accounts.hex[4], 4000).send({ - from: accounts.hex[3] - }) - }) - }) -}); diff --git a/test/lib/plugin.test.js b/test/lib/plugin.test.js deleted file mode 100644 index 81d917a1..00000000 --- a/test/lib/plugin.test.js +++ /dev/null @@ -1,91 +0,0 @@ -const chai = require('chai'); -const {FULL_NODE_API} = require('../helpers/config'); -const assertThrow = require('../helpers/assertThrow'); -const tronWebBuilder = require('../helpers/tronWebBuilder'); -const TronWeb = tronWebBuilder.TronWeb; -const GetNowBlock = require('../helpers/GetNowBlock'); -const BlockLib = require('../helpers/BlockLib'); -const jlog = require('../helpers/jlog') - -const assert = chai.assert; - -describe('TronWeb.lib.plugin', async function () { - - let tronWeb; - - before(async function () { - tronWeb = tronWebBuilder.createInstance(); - }); - - describe('#constructor()', function () { - - it('should have been set a full instance in tronWeb', function () { - - assert.instanceOf(tronWeb.plugin, TronWeb.Plugin); - }); - - }); - - describe("#plug GetNowBlock into tronWeb.trx", async function () { - - it('should register the plugin GetNowBlock', async function () { - - const someParameter = 'someValue' - - let result = tronWeb.plugin.register(GetNowBlock, { - someParameter - }) - assert.isTrue(result.skipped.includes('_parseToken')) - assert.isTrue(result.plugged.includes('getCurrentBlock')) - assert.isTrue(result.plugged.includes('getLatestBlock')) - - result = await tronWeb.trx.getCurrentBlock() - assert.isTrue(result.fromPlugin) - assert.equal(result.blockID.length, 64) - assert.isTrue(/^00000/.test(result.blockID)) - - result = await tronWeb.trx.getSomeParameter() - assert.equal(result, someParameter) - - }) - - }); - - describe("#plug BlockLib into tronWeb at first level", async function () { - - it('should register the plugin and call a method using a promise', async function () { - - let result = tronWeb.plugin.register(BlockLib) - assert.equal(result.libs[0], 'BlockLib') - result = await tronWeb.blockLib.getCurrent() - assert.isTrue(result.fromPlugin) - assert.equal(result.blockID.length, 64) - assert.isTrue(/^00000/.test(result.blockID)) - - }) - - it('should register and call a method using callbacks', async function () { - - tronWeb.plugin.register(BlockLib) - return new Promise(resolve => { - tronWeb.blockLib.getCurrent((err, result) => { - assert.isTrue(result.fromPlugin) - assert.equal(result.blockID.length, 64) - assert.isTrue(/^00000/.test(result.blockID)) - resolve() - }) - }) - }) - - it('should not register if tronWeb is instantiated with the disablePlugins option', async function () { - - let tronWeb2 = tronWebBuilder.createInstance({disablePlugins: true}); - let result = tronWeb2.plugin.register(BlockLib); - assert.isTrue(typeof result.error === 'string'); - - }) - - - }); - -}); diff --git a/test/lib/providers.test.js b/test/lib/providers.test.js deleted file mode 100644 index bf724998..00000000 --- a/test/lib/providers.test.js +++ /dev/null @@ -1,87 +0,0 @@ -const chai = require('chai'); -const {FULL_NODE_API} = require('../helpers/config'); -const assertThrow = require('../helpers/assertThrow'); -const tronWebBuilder = require('../helpers/tronWebBuilder'); -const TronWeb = tronWebBuilder.TronWeb; - -const assert = chai.assert; - -describe('TronWeb.lib.providers', async function () { - - - describe('#constructor()', function () { - - it('should create a full instance', function () { - let provider = new TronWeb.providers.HttpProvider(FULL_NODE_API); - assert.instanceOf(provider, TronWeb.providers.HttpProvider); - - provider = new TronWeb.providers.HttpProvider - ('www.exaple.com'); - assert.instanceOf(provider, TronWeb.providers.HttpProvider); - }); - - it('should throw if the host is not valid', function () { - const tronWeb = tronWebBuilder.createInstance(); - - assert.throws(() => new TronWeb.providers.HttpProvider( - '$' + FULL_NODE_API - ), 'Invalid URL provided to HttpProvider'); - - assert.throws(() => new TronWeb.providers.HttpProvider( - '_localhost' - ), 'Invalid URL provided to HttpProvider'); - - assert.throws(() => new TronWeb.providers.HttpProvider( - [FULL_NODE_API] - ), 'Invalid URL provided to HttpProvider'); - - }); - - }); - - describe('#setStatusPage()', function () { - - it('should set a status page', function () { - const provider = new TronWeb.providers.HttpProvider(FULL_NODE_API); - const statusPage = '/status'; - provider.setStatusPage(statusPage); - assert.equal(provider.statusPage, statusPage); - }); - }); - - describe('#isConnected()', function () { - - it('should verify if the provider is connected', async function () { - const provider = new TronWeb.providers.HttpProvider(FULL_NODE_API); - assert.isTrue(await provider.isConnected('/wallet/getnowblock')); - - }); - - - it('should return false if the url is not one of the expected provider', async function () { - const provider = new TronWeb.providers.HttpProvider('https://google.com'); - assert.isFalse(await provider.isConnected('/wallet/getnowblock')); - }); - }); - - describe('#request()', function () { - - it('should request a route', async function () { - const provider = new TronWeb.providers.HttpProvider(FULL_NODE_API); - const result = await provider.request('/wallet/getnowblock'); - assert.equal(result.blockID.length, 64); - }); - - it('should throw if the route is missed or returns an error', async function () { - const provider = new TronWeb.providers.HttpProvider(FULL_NODE_API); - - await assertThrow(provider.request('/wallet/some-fun'), - 'Request failed with status code 404'); - - }); - - - }); - - -}); diff --git a/test/lib/sidechain.test.js b/test/lib/sidechain.test.js deleted file mode 100644 index 942f9854..00000000 --- a/test/lib/sidechain.test.js +++ /dev/null @@ -1,574 +0,0 @@ -const chai = require('chai'); -const assert = chai.assert; - -const assertThrow = require('../helpers/assertThrow'); -const tronWebBuilder = require('../helpers/tronWebBuilder'); -const wait = require('../helpers/wait'); -const { PRIVATE_KEY, - CONSUME_USER_RESOURCE_PERCENT, - DEPOSIT_FEE, - WITHDRAW_FEE, - MAPPING_FEE, - FEE_LIMIT, - TOKEN_ID, - CONTRACT_ADDRESS20, - CONTRACT_ADDRESS721, - ADDRESS20_MAPPING, - ADDRESS721_MAPPING, - HASH20, - HASH721, - RETRY_MAPPING_FEE, - RETRY_DEPOSIT_FEE, - RETRY_WITHDRAW_FEE, - TRC721_ID, - NONCE, - SIDE_CHAIN } = require('../helpers/config'); - -describe("TronWeb.sidechain", function () { - describe('#deposit', function () { - describe('#depositTrx()', function () { - const tronWeb = tronWebBuilder.createInstanceSide(); - it('deposit trx from main chain to side chain', async function () { - const callValue = 10000000; - const txID = await tronWeb.sidechain.depositTrx(callValue, DEPOSIT_FEE, FEE_LIMIT); - assert.equal(txID.length, 64); - }); - - it('depositTrx with the defined private key', async function () { - const callValue = 10000000; - const options = {}; - const txID = await tronWeb.sidechain.depositTrx(callValue, DEPOSIT_FEE, FEE_LIMIT, options, PRIVATE_KEY); - assert.equal(txID.length, 64); - }); - - it('depositTrx with permissionId in options object', async function () { - const callValue = 10000000; - const options = { permissionId: 0 }; - const txID = await tronWeb.sidechain.depositTrx(callValue, DEPOSIT_FEE, FEE_LIMIT, options); - assert.equal(txID.length, 64); - }); - - it('depositTrx with permissionId in options object and the defined private key', async function () { - const callValue = 10000000; - const options = { permissionId: 0 }; - const txID = await tronWeb.sidechain.depositTrx(callValue, DEPOSIT_FEE, FEE_LIMIT, options, PRIVATE_KEY); - assert.equal(txID.length, 64); - }); - - it('should throw if an invalid trx number is passed', async function () { - await assertThrow( - tronWeb.sidechain.depositTrx(1000.01, DEPOSIT_FEE, FEE_LIMIT), - 'Invalid callValue provided' - ); - }); - - it('should throw if an invalid fee limit is passed', async function () { - await assertThrow( - tronWeb.sidechain.depositTrx(10000, DEPOSIT_FEE, 0), - 'Invalid feeLimit provided' - ); - }); - - it('should check the balance of mainchain and sidechain after depositTrx', async function() { - const callValue = 10000000; - const dataBefore = await tronWeb.sidechain.sidechain.trx.getAccount(); - const balanceBefore = dataBefore.balance; - const txID = await tronWeb.sidechain.depositTrx(callValue, DEPOSIT_FEE, FEE_LIMIT); - assert.equal(txID.length, 64); - await wait(90); - const dataAfter = await tronWeb.sidechain.sidechain.trx.getAccount(); - const balanceAfter = dataAfter.balance; - assert.equal(balanceBefore + callValue, balanceAfter); - }); - }); - - describe('#depositTrc10()', function () { - const tronWeb = tronWebBuilder.createInstanceSide(); - it('deposit trc10 from main chain to side chain', async function () { - const tokenValue = 10; - const txID = await tronWeb.sidechain.depositTrc10(TOKEN_ID, tokenValue, DEPOSIT_FEE, FEE_LIMIT); - assert.equal(txID.length, 64); - }); - - it('depositTrc10 with the defined private key', async function () { - const tokenValue = 10; - const options = {}; - const txID = await tronWeb.sidechain.depositTrc10(TOKEN_ID, tokenValue, DEPOSIT_FEE, FEE_LIMIT, options, PRIVATE_KEY); - assert.equal(txID.length, 64); - }); - - it('depositTrc10 with permissionId in options object', async function () { - const tokenValue = 10; - const options = { permissionId: 0 }; - const txID = await tronWeb.sidechain.depositTrc10(TOKEN_ID, tokenValue, DEPOSIT_FEE, FEE_LIMIT, options); - assert.equal(txID.length, 64); - }); - - it('depositTrc10 with permissionId in options object and the defined private key', async function () { - const tokenValue = 10; - const options = { permissionId: 0 }; - const txID = await tronWeb.sidechain.depositTrc10(TOKEN_ID, tokenValue, DEPOSIT_FEE, FEE_LIMIT, options, PRIVATE_KEY); - assert.equal(txID.length, 64); - }); - - it('should throw if an invalid token id is passed', async function () { - const tokenId = -10; - await assertThrow( - tronWeb.sidechain.depositTrc10(tokenId, 100, DEPOSIT_FEE, FEE_LIMIT), - 'Invalid tokenId provided' - ) - }); - - it('should throw if an invalid token value is passed', async function () { - const tokenValue = 100.01; - await assertThrow( - tronWeb.sidechain.depositTrc10(TOKEN_ID, tokenValue, DEPOSIT_FEE, 1000000), - 'Invalid tokenValue provided' - ); - }); - - it('should throw if an invalid fee limit is passed', async function () { - const feeLimit = -1 - await assertThrow( - tronWeb.sidechain.depositTrc10(TOKEN_ID, 100, DEPOSIT_FEE, feeLimit), - 'Invalid feeLimit provided' - ); - }); - - it('should check the TRC10 balance of mainchain and sidechain after depositTrc10', async function() { - const tokenValue = 10; - const dataBefore = await tronWeb.sidechain.sidechain.trx.getAccount(); - const balanceBefore = dataBefore.assetV2.filter((item)=> item.key == TOKEN_ID)[0].value; - const txID = await tronWeb.sidechain.depositTrc10(TOKEN_ID, tokenValue, DEPOSIT_FEE, FEE_LIMIT); - assert.equal(txID.length, 64); - await wait(80); - const dataAfter = await tronWeb.sidechain.sidechain.trx.getAccount(); - const balanceAfter = dataAfter.assetV2.filter((item)=> item.key == TOKEN_ID)[0].value;; - assert.equal(balanceBefore + tokenValue, balanceAfter); - }); - }); - - describe('#depositTrc20', function () { - const tronWeb = tronWebBuilder.createInstanceSide(); - it('deposit trc20 from main chain to side chain', async function () { - const num = 100; - const txID = await tronWeb.sidechain.depositTrc20(num, DEPOSIT_FEE, FEE_LIMIT, CONTRACT_ADDRESS20); - assert.equal(txID.length, 64); - }); - - it('depositTrc20 with the defined private key', async function () { - const num = 100; - const options = {}; - const txID = await tronWeb.sidechain.depositTrc20(num, DEPOSIT_FEE, FEE_LIMIT, CONTRACT_ADDRESS20, options, PRIVATE_KEY); - assert.equal(txID.length, 64); - }); - - it('depositTrc20 with permissionId in options object', async function () { - const num = 100; - const options = { permissionId: 0 }; - const txID = await tronWeb.sidechain.depositTrc20(num, DEPOSIT_FEE, FEE_LIMIT, CONTRACT_ADDRESS20, options); - assert.equal(txID.length, 64); - }); - - it('depositTrc20 with permissionId in options object and the defined private key', async function () { - const num = 100; - const options = { permissionId: 0 }; - const txID = await tronWeb.sidechain.depositTrc20(num, DEPOSIT_FEE, FEE_LIMIT, CONTRACT_ADDRESS20, options, PRIVATE_KEY); - assert.equal(txID.length, 64); - }); - - it('should throw if an invalid num is passed', async function () { - const num = 100.01; - await assertThrow( - tronWeb.sidechain.depositTrc20(num, DEPOSIT_FEE, FEE_LIMIT, CONTRACT_ADDRESS20), - 'Invalid num provided' - ); - }); - - it('should throw if an invalid fee limit is passed', async function () { - const num = 100; - const feeLimit = -1; - await assertThrow( - tronWeb.sidechain.depositTrc20(num, DEPOSIT_FEE, feeLimit, CONTRACT_ADDRESS20), - 'Invalid feeLimit provided' - ); - }); - - it('should throw if an invalid contract address is passed', async function () { - await assertThrow( - tronWeb.sidechain.depositTrc20(100, DEPOSIT_FEE, FEE_LIMIT, 'aaaaaaaaaa'), - 'Invalid contractAddress address provided' - ); - }); - - it('should check the trc20 balance after depositTrc20', async function () { - const num = 100; - const options = {}; - // only mapping once - // can check the mapping contract address in sidechain via call mainToSideContractMap(address) of mainchain gateway - // const mappingResult = await tronWeb.sidechain.mappingTrc20(HASH20, MAPPING_FEE, FEE_LIMIT, options); - // check the trc20 balance of mainchain before deposit - const contractInstance = await tronWeb.contract().at(CONTRACT_ADDRESS20); - const address = tronWeb.address.fromPrivateKey(PRIVATE_KEY); - const dataBefore = await contractInstance.balanceOf(address).call(); - const balanceBefore = parseInt(dataBefore._hex, 16); - - // approve trc20 - // const approveResult = await tronWeb.sidechain.approveTrc20(100000, FEE_LIMIT, CONTRACT_ADDRESS20); - - const txID = await tronWeb.sidechain.depositTrc20(num, DEPOSIT_FEE, FEE_LIMIT, CONTRACT_ADDRESS20); - await wait(80); - const dataAfter = await contractInstance.balanceOf(address).call(); - const balanceAfter = parseInt(dataAfter._hex, 16); - - assert.equal(balanceBefore + num, balanceAfter); - }); - - }); - - describe('#depositTrc721', function () { - const tronWeb = tronWebBuilder.createInstanceSide(); - it('deposit trc721 from main chain to side chain', async function () { - const txID = await tronWeb.sidechain.depositTrc721(TRC721_ID, DEPOSIT_FEE, FEE_LIMIT, CONTRACT_ADDRESS721); - assert.equal(txID.length, 64); - }); - - it('should check the trc20 balance after depositTrc721', async function () { - const num = 100; - const options = {}; - // only mapping once - // can check the mapping contract address in sidechain via call mainToSideContractMap(address) of mainchain gateway - // const mappingResult = await tronWeb.sidechain.mappingTrc20(HASH20, MAPPING_FEE, FEE_LIMIT, options); - // check the trc20 balance of mainchain before deposit - const contractInstance = await tronWeb.contract().at(CONTRACT_ADDRESS20); - const address = tronWeb.address.fromPrivateKey(PRIVATE_KEY); - const dataBefore = await contractInstance.balanceOf(address).call(); - const balanceBefore = parseInt(dataBefore._hex, 16); - - // approve trc20 - // const approveResult = await tronWeb.sidechain.approveTrc20(100000, FEE_LIMIT, CONTRACT_ADDRESS20); - - const txID = await tronWeb.sidechain.depositTrc721(TRC721_ID, DEPOSIT_FEE, FEE_LIMIT, CONTRACT_ADDRESS721); - await wait(80); - const dataAfter = await contractInstance.balanceOf(address).call(); - const balanceAfter = parseInt(dataAfter._hex, 16); - - assert.equal(balanceBefore + num, balanceAfter); - }); - }); - }); - - describe('#mappingTrc', function () { - const tronWeb = tronWebBuilder.createInstanceSide(); - it('mappingTrc20', async function () { - const txID = await tronWeb.sidechain.mappingTrc20(HASH20, MAPPING_FEE, FEE_LIMIT); - assert.equal(txID.length, 64); - }); - - it('mappingTrc20 with the defined private key', async function () { - const options = {}; - const txID = await tronWeb.sidechain.mappingTrc20(HASH20, MAPPING_FEE, FEE_LIMIT, options, PRIVATE_KEY); - assert.equal(txID.length, 64); - }); - - it('mappingTrc20 with permissionId in options object', async function () { - const options = { permissionId: 0 }; - const txID = await tronWeb.sidechain.mappingTrc20(HASH20, MAPPING_FEE, FEE_LIMIT, options); - assert.equal(txID.length, 64); - }); - - it('mappingTrc20 with permissionId in options object and the defined private key', async function () { - const options = { permissionId: 0 }; - const txID = await tronWeb.sidechain.mappingTrc20(HASH20, MAPPING_FEE, FEE_LIMIT, options, PRIVATE_KEY); - assert.equal(txID.length, 64); - }); - - it('should throw if an invalid trxHash', async function () { - const trxHash = ''; - await assertThrow( - tronWeb.sidechain.mappingTrc20(trxHash, MAPPING_FEE, FEE_LIMIT), - 'Invalid trxHash provided' - ); - }); - - it('should throw if an invalid fee limit is passed', async function () { - const feeLimit = -1; - await assertThrow( - tronWeb.sidechain.mappingTrc20(HASH20, MAPPING_FEE, feeLimit), - 'Invalid feeLimit provided' - ); - }); - - it('check the transaction result after mapping TRC20', async function () { - const mappingResult = await tronWeb.sidechain.mappingTrc20(HASH20, MAPPING_FEE, FEE_LIMIT); - while(true) { - let checkResult = await tronWeb.trx.getTransactionInfo(mappingResult); - if (checkResult && checkResult.result) { - break; - } - } - }); - - it('should get the mapping address after mappingTrc20', async function() { - const sideGatawayInstance = await tronWeb.sidechain.sidechain.contract().at(SIDE_CHAIN.sideOptions.sideGatewayAddress); - const result = await sideGatawayInstance.mainToSideContractMap(CONTRACT_ADDRESS20).call(); - assert.isTrue(tronWeb.isAddress(result)); - }); - - it('mappingTrc721', async function () { - const txID = await tronWeb.sidechain.mappingTrc721(HASH721, MAPPING_FEE, FEE_LIMIT); - assert.equal(txID.length, 64); - }); - - it('check the transaction result after mapping TRC721', async function () { - const mappingResult = await tronWeb.sidechain.mappingTrc721(HASH721, MAPPING_FEE, FEE_LIMIT); - while(true) { - let checkResult = await tronWeb.trx.getTransactionInfo(mappingResult); - if (checkResult && checkResult.result) { - break; - } - } - }); - - it('should get the mapping address after mappingTrc721', async function() { - const sideGatawayInstance = await tronWeb.sidechain.sidechain.contract().at(SIDE_CHAIN.sideOptions.sideGatewayAddress); - const result = await sideGatawayInstance.mainToSideContractMap(CONTRACT_ADDRESS721).call(); - assert.isTrue(tronWeb.isAddress(result)); - }); - }); - - describe('#withdraw', function () { - describe('#withdrawTrx()', function () { - const tronWeb = tronWebBuilder.createInstanceSide(); - it('withdraw trx from side chain to main chain', async function () { - const txID = await tronWeb.sidechain.withdrawTrx(10000000, WITHDRAW_FEE, 10000000); - assert.equal(txID.length, 64); - }); - - it('withdrawTrx with the defined private key', async function () { - const callValue = 10000000; - const options = {}; - const txID = await tronWeb.sidechain.withdrawTrx(callValue, WITHDRAW_FEE, FEE_LIMIT, options, PRIVATE_KEY); - assert.equal(txID.length, 64); - }); - - it('withdrawTrx with permissionId in options object', async function () { - const callValue = 10000000; - const options = { permissionId: 0 }; - const txID = await tronWeb.sidechain.withdrawTrx(callValue, WITHDRAW_FEE, FEE_LIMIT, options); - assert.equal(txID.length, 64); - }); - - it('withdrawTrx with permissionId in options object and the defined private key', async function () { - const callValue = 10000000; - const options = { permissionId: 0 }; - const txID = await tronWeb.sidechain.withdrawTrx(callValue, WITHDRAW_FEE, FEE_LIMIT, options, PRIVATE_KEY); - assert.equal(txID.length, 64); - }); - - it('should throw if an invalid trx number is passed', async function () { - await assertThrow( - tronWeb.sidechain.withdrawTrx(1000.01, WITHDRAW_FEE, FEE_LIMIT), - 'Invalid callValue provided' - ); - }); - - it('should throw if an invalid fee limit is passed', async function () { - await assertThrow( - tronWeb.sidechain.withdrawTrx(10000, WITHDRAW_FEE, 0), - 'Invalid feeLimit provided' - ); - }); - - it('should check the balance of mainchain and sidechain after withdrawTrx', async function() { - const callValue = 10000000; - const dataBefore = await tronWeb.trx.getAccount(); - const balanceBefore = dataBefore.balance; - const txID = await tronWeb.sidechain.withdrawTrx(callValue, WITHDRAW_FEE, FEE_LIMIT); - await wait(90); - const dataAfter = await tronWeb.trx.getAccount(); - const balanceAfter = dataAfter.balance; - assert.equal(balanceBefore + callValue, balanceAfter); - }); - }); - - describe('#withdrawTrc10()', function () { - const tronWeb = tronWebBuilder.createInstanceSide(); - it('withdraw trc10 from side chain to main chain', async function () { - const tokenValue = 10; - const txID = await tronWeb.sidechain.withdrawTrc10(TOKEN_ID, tokenValue, WITHDRAW_FEE, FEE_LIMIT); - assert.equal(txID.length, 64); - }); - - it('withdrawTrc10 with the defined private key', async function () { - const tokenValue = 10; - const options = {}; - const txID = await tronWeb.sidechain.withdrawTrc10(TOKEN_ID, tokenValue, WITHDRAW_FEE, FEE_LIMIT, options, PRIVATE_KEY); - assert.equal(txID.length, 64); - }); - - it('withdrawTrc10 with permissionId in options object', async function () { - const tokenValue = 10; - const options = { permissionId: 0 }; - const txID = await tronWeb.sidechain.withdrawTrc10(TOKEN_ID, tokenValue, WITHDRAW_FEE, FEE_LIMIT, options); - assert.equal(txID.length, 64); - }); - - it('withdrawTrc10 with permissionId in options object and the defined private key', async function () { - const tokenValue = 10; - const options = { permissionId: 0 }; - const txID = await tronWeb.sidechain.withdrawTrc10(TOKEN_ID, tokenValue, WITHDRAW_FEE, FEE_LIMIT, options, PRIVATE_KEY); - assert.equal(txID.length, 64); - }); - - it('should throw if an invalid token id is passed', async function () { - const tokenId = -10; - await assertThrow( - tronWeb.sidechain.withdrawTrc10(tokenId, 100, WITHDRAW_FEE, 1000000), - 'Invalid tokenId provided' - ) - }); - - it('should throw if an invalid token value is passed', async function () { - const tokenValue = 10.01; - await assertThrow( - tronWeb.sidechain.withdrawTrc10(TOKEN_ID, tokenValue, WITHDRAW_FEE, FEE_LIMIT), - 'Invalid tokenValue provided' - ); - }); - - it('should throw if an invalid fee limit is passed', async function () { - const feeLimit = -1; - await assertThrow( - tronWeb.sidechain.withdrawTrc10(TOKEN_ID, 100, WITHDRAW_FEE, feeLimit), - 'Invalid feeLimit provided' - ); - }); - - it('should check the TRC10 balance of mainchain and sidechain after withdrawTrc10', async function() { - const tokenValue = 10; - const dataBefore = await tronWeb.trx.getAccount(); - const balanceBefore = dataBefore.assetV2.filter((item)=> item.key == TOKEN_ID)[0].value; - const txID = await tronWeb.sidechain.withdrawTrc10(TOKEN_ID, tokenValue, DEPOSIT_FEE, FEE_LIMIT); - assert.equal(txID.length, 64); - await wait(90); - const dataAfter = await tronWeb.trx.getAccount(); - const balanceAfter = dataAfter.assetV2.filter((item)=> item.key == TOKEN_ID)[0].value;; - assert.equal(balanceBefore + tokenValue, balanceAfter); - }); - }); - - describe('#withdrawTrc', function () { - describe('#withdrawTrc20', function () { - const tronWeb = tronWebBuilder.createInstanceSide(); - it('withdraw trc20 from side chain to main chain', async function () { - const num = 10; - const txID = await tronWeb.sidechain.withdrawTrc20(num, WITHDRAW_FEE, FEE_LIMIT, ADDRESS20_MAPPING); - assert.equal(txID.length, 64); - }); - - it('withdrawTrc20 with the defined private key', async function () { - const num = 10; - const options = {}; - const txID = await tronWeb.sidechain.withdrawTrc20(num, WITHDRAW_FEE, FEE_LIMIT, ADDRESS20_MAPPING, options, PRIVATE_KEY); - assert.equal(txID.length, 64); - }); - - it('withdrawTrc20 with permissionId in options object', async function () { - const num = 10; - const options = { permissionId: 0 }; - const txID = await tronWeb.sidechain.withdrawTrc20(num, WITHDRAW_FEE, FEE_LIMIT, ADDRESS20_MAPPING, options); - assert.equal(txID.length, 64); - }); - - it('withdrawTrc20 with permissionId in options object and the defined private key', async function () { - const num = 10; - const options = { permissionId: 0 }; - const txID = await tronWeb.sidechain.withdrawTrc20(num, WITHDRAW_FEE, FEE_LIMIT, ADDRESS20_MAPPING, options, PRIVATE_KEY); - assert.equal(txID.length, 64); - }); - - it('should throw if an invalid num is passed', async function () { - const num = 10.01; - await assertThrow( - tronWeb.sidechain.withdrawTrc20(num, WITHDRAW_FEE, FEE_LIMIT, ADDRESS20_MAPPING), - 'Invalid numOrId provided' - ); - }); - - it('should throw if an invalid fee limit is passed', async function () { - const feeLimit = 100000000000; - const num = 10; - const options = { permissionId: 0 }; - const txID = await tronWeb.sidechain.withdrawTrc20(num, WITHDRAW_FEE, FEE_LIMIT, ADDRESS20_MAPPING, options, PRIVATE_KEY); - assert.equal(txID.length, 64); - // await assertThrow( - // tronWeb.sidechain.withdrawTrc20(100, WITHDRAW_FEE, feeLimit, ADDRESS20_MAPPING), - // 'Invalid feeLimit provided' - // ); - }); - - it('should throw if an invalid contract address is passed', async function () { - await assertThrow( - tronWeb.sidechain.withdrawTrc20(100, WITHDRAW_FEE, FEE_LIMIT, 'aaaaaaaaaa'), - 'Invalid contractAddress address provided' - ); - }); - - it('should check the trc20 balance after withdrawTrc20', async function () { - const num = 10; - const contractInstance = await tronWeb.contract().at(CONTRACT_ADDRESS20); - const address = tronWeb.address.fromPrivateKey(PRIVATE_KEY); - const dataBefore = await contractInstance.balanceOf(address).call(); - const balanceBefore = parseInt(dataBefore._hex, 16); - const txID = await tronWeb.sidechain.withdrawTrc20(num, WITHDRAW_FEE, FEE_LIMIT, ADDRESS20_MAPPING); - - await wait(80); - - const dataAfter = await contractInstance.balanceOf(address).call(); - const balanceAfter = parseInt(dataAfter._hex, 16); - - assert.equal(balanceBefore + num, balanceAfter); - }); - }); - - describe('#withdrawTrc721', async function () { - const tronWeb = tronWebBuilder.createInstanceSide(); - it('withdraw trc721 from side chain to main chain', async function () { - const txID = await tronWeb.sidechain.withdrawTrc721(TRC721_ID, WITHDRAW_FEE, FEE_LIMIT, ADDRESS20_MAPPING); - assert.equal(txID.length, 64); - }); - }); - }); - }); - - describe('#injectFund', function() { - it('excute injectFund', async function() { - const tronWeb = tronWebBuilder.createInstanceSide(); - const txID = await tronWeb.sidechain.injectFund(1000000, FEE_LIMIT); - assert.equal(txID.length, 64); - }); - }); - - - describe('#retry', function() { - it('retry mapping', async function() { - const tronWeb = tronWebBuilder.createInstanceSide(); - const txID = await tronWeb.sidechain.retryMapping(NONCE, RETRY_MAPPING_FEE, FEE_LIMIT); - assert.equal(txID.length, 64); - }); - - it('retry deposit', async function() { - const tronWeb = tronWebBuilder.createInstanceSide(); - const txID = await tronWeb.sidechain.retryDeposit(NONCE, RETRY_DEPOSIT_FEE, FEE_LIMIT); - assert.equal(txID.length, 64); - }); - - it('retry withdraw', async function() { - const tronWeb = tronWebBuilder.createInstanceSide(); - const txID = await tronWeb.sidechain.retryWithdraw(NONCE, RETRY_WITHDRAW_FEE, FEE_LIMIT); - assert.equal(txID.length, 64); - }); - }); - -}) diff --git a/test/lib/transactionBuilder.test.js b/test/lib/transactionBuilder.test.js deleted file mode 100644 index a7c9e9ef..00000000 --- a/test/lib/transactionBuilder.test.js +++ /dev/null @@ -1,3361 +0,0 @@ -const chai = require('chai'); -const assert = chai.assert; -const txPars = require('../helpers/txPars'); -const jlog = require('../helpers/jlog'); -const assertThrow = require('../helpers/assertThrow'); -const wait = require('../helpers/wait'); -const broadcaster = require('../helpers/broadcaster'); -const pollAccountFor = require('../helpers/pollAccountFor'); -const _ = require('lodash'); -const tronWebBuilder = require('../helpers/tronWebBuilder'); -const assertEqualHex = require('../helpers/assertEqualHex'); -const { testRevert, testConstant, arrayParam, rawParam, funcABIV2, funcABIV2_2, funcABIV2_3, funcABIV2_4, testSetVal, testPayable } = require('../fixtures/contracts'); -const waitChainData = require('../helpers/waitChainData'); -const { equals, getValues } = require('../helpers/testUtils'); - -const TronWeb = tronWebBuilder.TronWeb; -const { - ADDRESS_HEX, - ADDRESS_BASE58, - UPDATED_TEST_TOKEN_OPTIONS, - PRIVATE_KEY, - getTokenOptions, - isProposalApproved -} = require('../helpers/config'); - -describe('TronWeb.transactionBuilder', function () { - - let accounts; - let tronWeb; - let emptyAccount; - let isAllowSameTokenNameApproved - - before(async function () { - tronWeb = tronWebBuilder.createInstance(); - // ALERT this works only with Tron Quickstart: - accounts = await tronWebBuilder.getTestAccounts(-1); - emptyAccount = await TronWeb.createAccount(); - isAllowSameTokenNameApproved = await isProposalApproved(tronWeb, 'getAllowSameTokenName') - }); - - describe('#constructor()', function () { - - it('should have been set a full instance in tronWeb', function () { - - assert.instanceOf(tronWeb.transactionBuilder, TronWeb.TransactionBuilder); - }); - - }); - - describe('#sendTrx()', function () { - - it(`should send 0.00001 trx from default address to accounts[1]`, async function () { - const params = [ - [accounts.b58[1], 10, {permissionId: 2}], - [accounts.b58[1], 10] - ]; - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.sendTrx(...param); - - const parameter = txPars(transaction); - - assert.equal(transaction.txID.length, 64); - assert.equal(parameter.value.amount, 10); - assert.equal(parameter.value.owner_address, ADDRESS_HEX); - assert.equal(parameter.value.to_address, accounts.hex[1]); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.TransferContract'); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, param[2] ? param[2]['permissionId'] : 0); - } - }); - - it(`should send 10 trx from default address to accounts[1] and broadcast`, async function () { - const params = [ - [accounts.b58[1], 10] - ]; - for (let param of params) { - const res = await broadcaster(tronWeb.transactionBuilder.sendTrx(...param)); - assert.isTrue(res.receipt.result); - } - }); - - it(`should send 0.00001 trx from accounts[0] to accounts[1]`, async function () { - const params = [ - [accounts.b58[1], 10, accounts.b58[0], {permissionId: 2}], - [accounts.b58[1], 10, accounts.b58[0]] - ]; - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.sendTrx(...param); - const parameter = txPars(transaction); - - assert.equal(transaction.txID.length, 64); - assert.equal(parameter.value.amount, 10); - assert.equal(parameter.value.owner_address, accounts.hex[0]); - assert.equal(parameter.value.to_address, accounts.hex[1]); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.TransferContract'); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, param[3] ? param[3]['permissionId'] : 0); - } - - }); - - it('should throw if an invalid address is passed', async function () { - - await assertThrow( - tronWeb.transactionBuilder.sendTrx('40f0b27e3d16060a5b0e8e995120e00', 10), - 'Invalid recipient address provided' - ); - - }); - - it('should throw if an invalid amount is passed', async function () { - - await assertThrow( - tronWeb.transactionBuilder.sendTrx(accounts.hex[2], -10), - 'Invalid amount provided' - ); - - }); - - it('should throw if an invalid origin address is passed', async function () { - - await assertThrow( - tronWeb.transactionBuilder.sendTrx(accounts.hex[3], 10, '40f0b27e3d16060a5b0e8e995120e00'), - 'Invalid origin address provided' - ); - - }); - - - it('should throw if trying to transfer to itself', async function () { - - await assertThrow( - tronWeb.transactionBuilder.sendTrx(accounts.hex[3], 10, accounts.hex[3]), - 'Cannot transfer TRX to the same account' - ); - - }); - - it('should throw if trying to transfer from an account with not enough funds', async function () { - - await assertThrow( - tronWeb.transactionBuilder.sendTrx(accounts.hex[3], 10, emptyAccount.address.base58), - null, - 'ContractValidateException' - ); - - }); - }); - - describe('#createToken()', function () { - - // This test passes only the first time because, in order to test updateToken, we broadcast the token creation - - it(`should allow accounts[2] to create a TestToken`, async function () { - - const options = getTokenOptions(); - for (let i = 0; i < 2; i++) { - if (i === 1) options.permissionId = 2; - const transaction = await tronWeb.transactionBuilder.createToken(options, accounts.b58[2]); - const parameter = txPars(transaction); - assert.equal(transaction.txID.length, 64); - assert.equal(parameter.value.total_supply, options.totalSupply); - await assertEqualHex(parameter.value.abbr, options.abbreviation); - assert.equal(parameter.value.owner_address, accounts.hex[2]); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.AssetIssueContract'); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, options.permissionId || 0); - - } - }); - - it(`should allow accounts[2] to create a TestToken and broadcast`, async function () { - - const options = getTokenOptions(); - const transaction = tronWeb.transactionBuilder.createToken(options, accounts.b58[2]); - const res = await broadcaster(transaction, accounts.pks[2]); - assert.isTrue(res.receipt.result); - }); - - it(`should allow accounts[8] to create a TestToken with voteScore and precision`, async function () { - if (isAllowSameTokenNameApproved) { - - const options = getTokenOptions(); - options.voteScore = 5; - options.precision = 4; - - for (let i = 0; i < 2; i++) { - if (i === 1) options.permissionId = 2; - const transaction = await tronWeb.transactionBuilder.createToken(options, accounts.b58[8 + i]); - - const parameter = txPars(transaction); - assert.equal(transaction.txID.length, 64); - assert.equal(parameter.value.vote_score, options.voteScore); - assert.equal(parameter.value.precision, options.precision); - assert.equal(parameter.value.total_supply, options.totalSupply); - await assertEqualHex(parameter.value.abbr, options.abbreviation); - assert.equal(parameter.value.owner_address, accounts.hex[8 + i]); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.AssetIssueContract'); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, options.permissionId || 0); - - await broadcaster(null, accounts.pks[8 + i], transaction) - - const tokenList = await tronWeb.trx.getTokensIssuedByAddress(accounts.b58[8 + i]) - const tokenID = tokenList[options.name].id - const token = await tronWeb.trx.getTokenByID(tokenID) - - assert.equal(token.vote_score, options.voteScore); - assert.equal(token.precision, options.precision); - } - - } else { - this.skip() - } - }); - - it(`should create a TestToken passing any number as a string`, async function () { - const options = getTokenOptions(); - options.totalSupply = '100' - options.frozenAmount = '5' - options.frozenDuration = '2' - options.saleEnd = options.saleEnd.toString() - for (let i = 0; i < 2; i++) { - if (i === 1) options.permissionId = 2; - const transaction = await tronWeb.transactionBuilder.createToken(options, accounts.b58[46]); - const parameter = txPars(transaction); - await assertEqualHex(parameter.value.abbr, options.abbreviation); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, options.permissionId || 0); - } - }); - - it(`should create a TestToken passing with precision is zero`, async function () { - const options = getTokenOptions(); - options.precision = 0 - for (let i = 0; i < 2; i++) { - if (i === 1) options.permissionId = 2; - const transaction = await tronWeb.transactionBuilder.createToken(options, accounts.b58[47]); - const parameter = txPars(transaction); - await assertEqualHex(parameter.value.abbr, options.abbreviation); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, options.permissionId || 0); - } - }); - - it(`should create a TestToken without freezing anything in 3.6.0`, async function () { - if (tronWeb.fullnodeSatisfies('^3.6.0')) { - const options = getTokenOptions(); - options.totalSupply = '100' - options.frozenAmount = '0' - options.frozenDuration = '0' - options.saleEnd = options.saleEnd.toString() - for (let i = 0; i < 2; i++) { - if (i === 1) options.permissionId = 2; - const transaction = await tronWeb.transactionBuilder.createToken(options); - const parameter = txPars(transaction); - await assertEqualHex(parameter.value.abbr, options.abbreviation); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, options.permissionId || 0); - } - } else { - this.skip() - } - }); - - - it('should throw if an invalid name is passed', async function () { - - const options = getTokenOptions(); - options.name = 123; - - await assertThrow( - tronWeb.transactionBuilder.createToken(options), - 'Invalid token name provided' - ); - - }); - - it('should throw if an invalid abbrevation is passed', async function () { - - const options = getTokenOptions(); - options.abbreviation = 123; - - await assertThrow( - tronWeb.transactionBuilder.createToken(options), - 'Invalid token abbreviation provided' - ); - - }); - - it('should throw if an invalid supply amount is passed', async function () { - - const options = getTokenOptions(); - options.totalSupply = []; - - await assertThrow( - tronWeb.transactionBuilder.createToken(options), - 'Supply amount must be a positive integer' - ); - - }); - - it('should throw if TRX ratio is not a positive integer', async function () { - - const options = getTokenOptions(); - options.trxRatio = {}; - - await assertThrow( - tronWeb.transactionBuilder.createToken(options), - 'TRX ratio must be a positive integer' - ); - - }); - - it('should throw if token ratio is not a positive integer', async function () { - - const options = getTokenOptions(); - options.tokenRatio = 'tokenRatio'; - - await assertThrow( - tronWeb.transactionBuilder.createToken(options), - 'Token ratio must be a positive integer' - ); - - }); - - it('should throw if sale start is invalid', async function () { - - const options = getTokenOptions(); - options.saleStart = Date.now() - 1; - - await assertThrow( - tronWeb.transactionBuilder.createToken(options), - 'Invalid sale start timestamp provided' - ); - - options.saleStart = 'something'; - - await assertThrow( - tronWeb.transactionBuilder.createToken(options), - 'Invalid sale start timestamp provided' - ); - - }); - - it('should throw if sale end is invalid', async function () { - - const options = getTokenOptions(); - options.saleEnd = Date.now() - 1000; - - await assertThrow( - tronWeb.transactionBuilder.createToken(options), - 'Invalid sale end timestamp provided' - ); - - options.saleEnd = 'something'; - - await assertThrow( - tronWeb.transactionBuilder.createToken(options), - 'Invalid sale end timestamp provided' - ); - - }); - - it('should throw if an invalid description is passed', async function () { - - const options = getTokenOptions(); - options.description = 123; - - await assertThrow( - tronWeb.transactionBuilder.createToken(options), - 'Invalid token description provided' - ); - - options.description = ''; - - // should allow empty description - await tronWeb.transactionBuilder.createToken(options); - assert.isTrue(true); - - }); - - it('should throw if an invalid url is passed', async function () { - - const options = getTokenOptions(); - options.url = 123; - - await assertThrow( - tronWeb.transactionBuilder.createToken(options), - 'Invalid token url provided' - ); - - options.url = ''; - - await assertThrow( - tronWeb.transactionBuilder.createToken(options), - 'Invalid token url provided' - ); - - options.url = '//www.example.com'; - - await assertThrow( - tronWeb.transactionBuilder.createToken(options), - 'Invalid token url provided' - ); - - options.url = 'https://www.example.com/#' + 'a'.repeat(256); - await assertThrow( - tronWeb.transactionBuilder.createToken(options), - 'Invalid token url provided' - ); - - }); - - it('should throw if freeBandwidth is invalid', async function () { - - const options = getTokenOptions(); - options.freeBandwidth = -1; - - await assertThrow( - tronWeb.transactionBuilder.createToken(options), - 'Invalid Free bandwidth amount provided' - ); - - options.freeBandwidth = 'something'; - - await assertThrow( - tronWeb.transactionBuilder.createToken(options), - 'Invalid Free bandwidth amount provided' - ); - - // freeBandwidth is optional - delete options.freeBandwidth; - await tronWeb.transactionBuilder.createToken(options); - assert.isTrue(true); - - }); - - it('should throw if freeBandwidthLimit is invalid', async function () { - const options = getTokenOptions(); - - options.freeBandwidth = 10; - delete options.freeBandwidthLimit; - - await assertThrow( - tronWeb.transactionBuilder.createToken(options, accounts.b58[48]), - 'Invalid Free bandwidth limit provided' - ); - - options.freeBandwidthLimit = 'something'; - - await assertThrow( - tronWeb.transactionBuilder.createToken(options), - 'Invalid Free bandwidth limit provided' - ); - - // freeBandwidthLimit is optional - delete options.freeBandwidthLimit; - await tronWeb.transactionBuilder.createToken(options); - assert.isTrue(true); - - }); - - it('should throw if frozen supply is invalid', async function () { - - const options = getTokenOptions(); - options.frozenAmount = -1; - - await assertThrow( - tronWeb.transactionBuilder.createToken(options), - 'Invalid Frozen supply provided' - ); - - options.frozenAmount = 'something'; - - await assertThrow( - tronWeb.transactionBuilder.createToken(options), - 'Invalid Frozen supply provided' - ); - }); - - it('should throw if frozen duration is invalid', async function () { - const options = getTokenOptions(); - - options.frozenDuration = 'something'; - - await assertThrow( - tronWeb.transactionBuilder.createToken(options), - 'Invalid Frozen duration provided' - ); - - }); - - it('should throw if the issuer address is invalid', async function () { - - const options = getTokenOptions(); - - await assertThrow( - tronWeb.transactionBuilder.createToken(options, '0xzzzww'), - 'Invalid issuer address provided' - ); - - }); - - describe('#createAsset()', function () { - - // This test passes only the first time because, in order to test updateToken, we broadcast the token creation - - it(`should allow accounts[2] to create a TestToken`, async function () { - const options = getTokenOptions(); - const transaction = await tronWeb.transactionBuilder.createAsset(options, accounts.b58[2]); - const parameter = txPars(transaction); - assert.equal(transaction.txID.length, 64); - assert.equal(parameter.value.total_supply, options.totalSupply); - await assertEqualHex(parameter.value.abbr, options.abbreviation); - assert.equal(parameter.value.owner_address, accounts.hex[2]); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.AssetIssueContract'); - }); - }); - - }); - - describe('#createAccount()', function () { - it('should create an account by account[3]', async function () { - const inactiveAccount = await tronWeb.createAccount(); - const inactiveAccountAddress = inactiveAccount.address.base58; - const params = [ - [inactiveAccountAddress, accounts.b58[3], {permissionId: 2}], - [inactiveAccountAddress, accounts.b58[3]], - ]; - - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.createAccount(...param); - const parameter = txPars(transaction); - assert.equal(transaction.txID.length, 64); - assert.equal(parameter.value.owner_address, accounts.hex[3]); - assert.equal(parameter.value.account_address, tronWeb.address.toHex(inactiveAccountAddress).toLowerCase()); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.AccountCreateContract'); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, param[2] ? param[2]['permissionId'] : 0); - } - }); - - - it('should throw if an invalid accountAddress is passed', async function () { - - await assertThrow( - tronWeb.transactionBuilder.createAccount(123, accounts.b58[4]), - 'Invalid account address provided' - ); - - }); - - it('should throw if the issuer address is invalid', async function () { - - await assertThrow( - tronWeb.transactionBuilder.createAccount(accounts.b58[4], '0xzzzww'), - 'Invalid origin address provided' - ); - - }); - }); - - describe('#updateAccount()', function () { - - it(`should update accounts[3]`, async function () { - const newName = 'New name' - const params = [ - [newName, accounts.b58[3], {permissionId: 2}], - [newName, accounts.b58[3]] - ]; - - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.updateAccount(...param); - const parameter = txPars(transaction); - - assert.equal(transaction.txID.length, 64); - await assertEqualHex(parameter.value.account_name, newName); - assert.equal(parameter.value.owner_address, accounts.hex[3]); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.AccountUpdateContract'); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, param[2] ? param[2]['permissionId'] : 0); - } - }); - - it(`should update accounts[3] and broadcast`, async function () { - const newName = 'New name' - const param = [newName, accounts.b58[3]]; - - const transaction = tronWeb.transactionBuilder.updateAccount(...param); - const res = await broadcaster(transaction, accounts.pks[3]) - assert.isTrue(res.receipt.result); - }); - - it('should throw if an invalid name is passed', async function () { - - await assertThrow( - tronWeb.transactionBuilder.updateAccount(123, accounts.b58[4]), - 'Invalid Name provided' - ); - - }); - - it('should throw if the issuer address is invalid', async function () { - - await assertThrow( - tronWeb.transactionBuilder.updateAccount('New name', '0xzzzww'), - 'Invalid origin address provided' - ); - - }); - - }); - - describe('#setAccountId()', function () { - - it(`should set account id accounts[4]`, async function () { - const params = [ - [TronWeb.toHex('abcabc110'), accounts.b58[4], {permissionId: 2}], - [TronWeb.toHex('testtest'), accounts.b58[4]], - ] - - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.setAccountId(...param); - const parameter = txPars(transaction); - assert.equal(transaction.txID.length, 64); - assert.equal(parameter.value.account_id, param[0].slice(2)); - assert.equal(parameter.value.owner_address, accounts.hex[4]); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.SetAccountIdContract'); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, param[2] ? param[2]['permissionId'] : 0); - } - - }); - - it(`should set account id accounts[4] and broadcast`, async function () { - const param = [TronWeb.toHex('testtest'), accounts.b58[4]]; - - const transaction = tronWeb.transactionBuilder.setAccountId(...param); - const res = await broadcaster(transaction, accounts.pks[4]) - assert.isTrue(res.receipt.result); - }); - - it('should throw invalid account id error', async function () { - - // account id length should be between 8 and 32 - const ids = ['', '12', '616161616262626231313131313131313131313131313131313131313131313131313131313131'] - for (let id of ids) { - await assertThrow( - tronWeb.transactionBuilder.setAccountId(id, accounts.b58[4]), - 'Invalid accountId provided' - ); - } - - }); - - it('should throw invalid owner address error', async function () { - - await assertThrow( - tronWeb.transactionBuilder.setAccountId(TronWeb.toHex('testtest001'), '0xzzzww'), - 'Invalid origin address provided' - ); - - }); - - }); - - describe('#updateToken()', function () { - - let tokenOptions - let tokenID - - before(async function () { - - this.timeout(10000) - - tokenOptions = getTokenOptions(); - await broadcaster(tronWeb.transactionBuilder.createToken(tokenOptions, accounts.b58[2]), accounts.pks[2]) - - let tokenList - while (!tokenList) { - tokenList = await tronWeb.trx.getTokensIssuedByAddress(accounts.b58[2]) - } - if (isAllowSameTokenNameApproved) { - tokenID = tokenList[tokenOptions.name].id - } else { - tokenID = tokenList[tokenOptions.name].name - } - }); - - it(`should allow accounts[2] to update a TestToken`, async function () { - for (let i = 0; i < 2; i++) { - if (i === 1) UPDATED_TEST_TOKEN_OPTIONS.permissionId = 2; - const transaction = await tronWeb.transactionBuilder.updateToken(UPDATED_TEST_TOKEN_OPTIONS, accounts.b58[2]); - const parameter = txPars(transaction); - assert.equal(transaction.txID.length, 64); - await assertEqualHex(parameter.value.description, UPDATED_TEST_TOKEN_OPTIONS.description); - await assertEqualHex(parameter.value.url, UPDATED_TEST_TOKEN_OPTIONS.url); - assert.equal(parameter.value.owner_address, accounts.hex[2]); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.UpdateAssetContract'); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, UPDATED_TEST_TOKEN_OPTIONS.permissionId || 0); - } - }); - - it(`should allow accounts[2] to update a TestToken and broadcast`, async function () { - const transaction = tronWeb.transactionBuilder.updateToken(UPDATED_TEST_TOKEN_OPTIONS, accounts.b58[2]); - const res = await broadcaster(transaction, accounts.pks[2]) - assert.isTrue(res.receipt.result); - }); - - it('should throw if an invalid description is passed', async function () { - - const options = _.clone(UPDATED_TEST_TOKEN_OPTIONS); - options.description = 123; - - await assertThrow( - tronWeb.transactionBuilder.updateToken(options, accounts.hex[2]), - 'Invalid token description provided' - ); - - // should allow description to be empty - options.description = ''; - await tronWeb.transactionBuilder.updateToken(options, accounts.hex[2]); - assert.isTrue(true); - - }); - - - it('should throw if an invalid url is passed', async function () { - - const options = _.clone(UPDATED_TEST_TOKEN_OPTIONS); - options.url = 123; - - await assertThrow( - tronWeb.transactionBuilder.updateToken(options, accounts.hex[2]), - 'Invalid token url provided' - ); - - options.url = ''; - - await assertThrow( - tronWeb.transactionBuilder.updateToken(options, accounts.hex[2]), - 'Invalid token url provided' - ); - - options.url = '//www.example.com'; - - await assertThrow( - tronWeb.transactionBuilder.updateToken(options, accounts.hex[2]), - 'Invalid token url provided' - ); - - options.url = 'https://www.example.com/#' + 'a'.repeat(256); - await assertThrow( - tronWeb.transactionBuilder.updateToken(options, accounts.hex[2]), - 'Invalid token url provided' - ); - }); - - it('should throw if freeBandwidth is invalid', async function () { - - const options = _.clone(UPDATED_TEST_TOKEN_OPTIONS); - options.freeBandwidth = -1; - - await assertThrow( - tronWeb.transactionBuilder.updateToken(options, accounts.hex[2]), - 'Free bandwidth amount must be a positive integer' - ); - - options.freeBandwidth = 'something'; - - await assertThrow( - tronWeb.transactionBuilder.updateToken(options, accounts.hex[2]), - 'Free bandwidth amount must be a positive integer' - ); - - }); - - it('should throw if freeBandwidthLimit is invalid', async function () { - const options = _.clone(UPDATED_TEST_TOKEN_OPTIONS); - - options.freeBandwidth = 10; - delete options.freeBandwidthLimit; - - await assertThrow( - tronWeb.transactionBuilder.updateToken(options, accounts.hex[2]), - 'Free bandwidth limit must be a positive integer' - ); - - options.freeBandwidthLimit = 'something'; - - await assertThrow( - tronWeb.transactionBuilder.updateToken(options, accounts.hex[2]), - 'Free bandwidth limit must be a positive integer' - ); - - }); - - it('should throw if the issuer address is invalid', async function () { - - await assertThrow( - tronWeb.transactionBuilder.updateToken(UPDATED_TEST_TOKEN_OPTIONS, '0xzzzww'), - 'Invalid issuer address provided' - ); - - }); - - describe('#updateAsset()', async function () { - it(`should allow accounts[2] to update a TestToken`, async function () { - const transaction = await tronWeb.transactionBuilder.updateAsset(UPDATED_TEST_TOKEN_OPTIONS, accounts.b58[2]); - const parameter = txPars(transaction); - assert.equal(transaction.txID.length, 64); - await assertEqualHex(parameter.value.description, UPDATED_TEST_TOKEN_OPTIONS.description); - await assertEqualHex(parameter.value.url, UPDATED_TEST_TOKEN_OPTIONS.url); - assert.equal(parameter.value.owner_address, accounts.hex[2]); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.UpdateAssetContract'); - }); - }); - - }); - - describe('#purchaseToken()', function () { - - let tokenOptions - let tokenID - - before(async function () { - - this.timeout(10000) - - tokenOptions = getTokenOptions(); - - await broadcaster(tronWeb.transactionBuilder.createToken(tokenOptions, accounts.b58[5]), accounts.pks[5]) - - let tokenList - while (!tokenList) { - tokenList = await tronWeb.trx.getTokensIssuedByAddress(accounts.b58[5]) - } - if (isAllowSameTokenNameApproved) { - tokenID = tokenList[tokenOptions.name].id - } else { - tokenID = tokenList[tokenOptions.name].name - } - assert.equal(tokenList[tokenOptions.name].abbr, tokenOptions.abbreviation) - }); - - it('should verify that the asset has been created', async function () { - - let token - if (isAllowSameTokenNameApproved) { - token = await tronWeb.trx.getTokenByID(tokenID) - assert.equal(token.id, tokenID) - } else { - token = await tronWeb.trx.getTokenFromID(tokenID) - } - assert.equal(token.name, tokenOptions.name) - }) - - it(`should allow accounts[2] to purchase a token created by accounts[5]`, async function () { - this.timeout(20000) - - const params = [ - [accounts.b58[5], tokenID, 20, accounts.b58[2], {permissionId: 2}], - [accounts.b58[5], tokenID, 20, accounts.b58[2]] - ]; - - for (let param of params) { - await wait(4) - - const transaction = await tronWeb.transactionBuilder.purchaseToken(...param); - const parameter = txPars(transaction); - assert.equal(transaction.txID.length, 64); - assert.equal(parameter.value.amount, 20); - assert.equal(parameter.value.owner_address, accounts.hex[2]); - assert.equal(parameter.value.to_address, accounts.hex[5]); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.ParticipateAssetIssueContract'); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, param[4] ? param[4]['permissionId'] : 0); - } - }); - - it(`should allow accounts[2] to purchase a token created by accounts[5] and broadcast`, async function () { - await wait(60) - const param = [accounts.b58[5], tokenID, 20, accounts.b58[2]]; - const transaction = tronWeb.transactionBuilder.purchaseToken(...param); - - const res = await broadcaster(transaction, accounts.pks[2]); - console.log(res, tokenID) - assert.isTrue(res.receipt.result); - }); - - it("should throw if issuerAddress is invalid", async function () { - - await assertThrow( - tronWeb.transactionBuilder.purchaseToken('sasdsadasfa', tokenID, 20, accounts.b58[2]), - 'Invalid issuer address provided' - ) - - }); - - it("should throw if issuerAddress is not the right one", async function () { - await assertThrow( - tronWeb.transactionBuilder.purchaseToken(accounts.b58[4], tokenID, 20, accounts.b58[2]), - null, - 'The asset is not issued by' - ) - }); - - it("should throw if the token Id is invalid", async function () { - - await assertThrow( - tronWeb.transactionBuilder.purchaseToken(accounts.b58[5], 123432, 20, accounts.b58[2]), - 'Invalid token ID provided' - ) - }); - - it("should throw if token does not exist", async function () { - - await assertThrow( - tronWeb.transactionBuilder.purchaseToken(accounts.b58[5], '1110000', 20, accounts.b58[2]), - null, - 'No asset named ' - ) - - }); - - it("should throw if buyer address is invalid", async function () { - - await assertThrow( - tronWeb.transactionBuilder.purchaseToken(accounts.b58[5], tokenID, 20, 'sasdadasdas'), - 'Invalid buyer address provided' - ) - - }); - - it("should throw if amount is invalid", async function () { - - await assertThrow( - tronWeb.transactionBuilder.purchaseToken(accounts.b58[5], tokenID, -3, accounts.b58[2]), - 'Invalid amount provided' - ) - - await assertThrow( - tronWeb.transactionBuilder.purchaseToken(accounts.b58[5], tokenID, "some-amount", accounts.b58[2]), - 'Invalid amount provided' - ) - }); - }); - - describe('#sendToken()', function () { - - let tokenOptions - let tokenID - - before(async function () { - - this.timeout(30000) - - tokenOptions = getTokenOptions(); - - await broadcaster(tronWeb.transactionBuilder.createToken(tokenOptions, accounts.b58[6]), accounts.pks[6]) - - let tokenList - while (!tokenList) { - tokenList = await tronWeb.trx.getTokensIssuedByAddress(accounts.b58[6]) - } - - if (isAllowSameTokenNameApproved) { - tokenID = tokenList[tokenOptions.name].id - } else { - tokenID = tokenList[tokenOptions.name].name - } - - }); - - it('should verify that the asset has been created', async function () { - - let token - if (isAllowSameTokenNameApproved) { - token = await tronWeb.trx.getTokenByID(tokenID) - assert.equal(token.id, tokenID) - } else { - token = await tronWeb.trx.getTokenFromID(tokenID) - } - assert.equal(token.name, tokenOptions.name) - }) - - it("should allow accounts [7] to send a token to accounts[1]", async function () { - - this.timeout(20000) - - const params = [ - [accounts.b58[1], 5, tokenID, accounts.b58[7], {permissionId: 2}], - [accounts.b58[1], 5, tokenID, accounts.b58[7]] - ]; - - for (let param of params) { - await wait(4) - - await broadcaster(tronWeb.transactionBuilder.purchaseToken(accounts.b58[6], tokenID, 50, accounts.b58[7]), accounts.pks[7]) - - await wait(1) - - const transaction = await tronWeb.transactionBuilder.sendToken(...param) - - const parameter = txPars(transaction) - - assert.equal(parameter.value.amount, 5) - assert.equal(parameter.value.owner_address, accounts.hex[7]); - assert.equal(parameter.value.to_address, accounts.hex[1]); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, param[4] ? param[4]['permissionId'] : 0); - - } - }); - - it("should allow accounts [6] to send a token to accounts[1]", async function () { - - const params = [ - [accounts.b58[1], 5, tokenID, accounts.b58[6], {permissionId: 2}], - [accounts.b58[1], 5, tokenID, accounts.b58[6]] - ]; - - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.sendToken(...param) - - const parameter = txPars(transaction); - - assert.equal(parameter.value.amount, 5) - assert.equal(parameter.value.owner_address, accounts.hex[6]); - assert.equal(parameter.value.to_address, accounts.hex[1]); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, param[4] ? param[4]['permissionId'] : 0); - } - - }); - - it("should allow accounts [6] to send a token to accounts[1] and broadcast", async function () { - await wait(5); - const param = [accounts.b58[1], 5, tokenID, accounts.b58[6]]; - const transaction = tronWeb.transactionBuilder.sendToken(...param) - const res = await broadcaster(transaction, accounts.pks[6]); - console.log(res) - assert.isTrue(res.receipt.result) - - }); - - it("should throw if recipient address is invalid", async function () { - - await assertThrow( - tronWeb.transactionBuilder.sendToken('sadasfdfsgdfgssa', 5, tokenID, accounts.b58[7]), - 'Invalid recipient address provided' - ) - - }); - - it("should throw if the token Id is invalid", async function () { - - await assertThrow( - tronWeb.transactionBuilder.sendToken(accounts.b58[1], 5, 143234, accounts.b58[7]), - 'Invalid token ID provided' - ) - }); - - it("should throw if origin address is invalid", async function () { - - await assertThrow( - tronWeb.transactionBuilder.sendToken(accounts.b58[1], 5, tokenID, 213253453453), - 'Invalid origin address provided' - ) - - }); - - it("should throw if amount is invalid", async function () { - - await assertThrow( - tronWeb.transactionBuilder.sendToken(accounts.b58[1], -5, tokenID, accounts.b58[7]), - 'Invalid amount provided' - ) - - await assertThrow( - tronWeb.transactionBuilder.sendToken(accounts.b58[1], 'amount', tokenID, accounts.b58[7]), - 'Invalid amount provided' - ) - }); - }); - - describe("#createProposal", async function () { - - let parameters = [{"key": 0, "value": 100000}, {"key": 1, "value": 2}] - - it('should allow the SR account to create a new proposal as a single object', async function () { - - const inputs = [ - [parameters[0], ADDRESS_BASE58, {permissionId: 2}], - [parameters[0], ADDRESS_BASE58] - ]; - for (let input of inputs) { - const transaction = await tronWeb.transactionBuilder.createProposal(...input) - - const parameter = txPars(transaction); - - assert.equal(parameter.value.owner_address, ADDRESS_HEX); - assert.equal(parameter.value.parameters[0].value, parameters[0].value); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.ProposalCreateContract'); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, input[2] ? input[2]['permissionId'] : 0); - } - - }) - - it('should allow the SR account to create a new proposal as an array of objects', async function () { - - const inputs = [ - [parameters, ADDRESS_BASE58, {permissionId: 2}], - [parameters, ADDRESS_BASE58] - ]; - - for (let input of inputs) { - const transaction = await tronWeb.transactionBuilder.createProposal(...input) - - const parameter = txPars(transaction); - - assert.equal(parameter.value.owner_address, ADDRESS_HEX); - assert.equal(parameter.value.parameters[0].value, parameters[0].value); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.ProposalCreateContract'); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, input[2] ? input[2]['permissionId'] : 0); - } - - }) - - it('should allow the SR account to create a new proposal as an array of objects and broadcast', async function () { - - const input = [parameters, ADDRESS_BASE58]; - const transaction = tronWeb.transactionBuilder.createProposal(...input) - const res = await broadcaster(transaction); - assert.isTrue(res.receipt.result); - }) - - it("should throw if issuer address is invalid", async function () { - - await assertThrow( - tronWeb.transactionBuilder.createProposal(parameters, 'sadasdsffdgdf'), - 'Invalid issuer address provided' - ) - - }); - - it("should throw if the issuer address is not an SR", async function () { - - await assertThrow( - tronWeb.transactionBuilder.createProposal(parameters, accounts.b58[0]), - null, - `Witness[${accounts.hex[0]}] not exists` - ) - - }); - - // TODO Complete throws - - }); - - describe("#deleteProposal", async function () { - - - let proposals; - - before(async function () { - - this.timeout(20000) - - let parameters = [{"key": 0, "value": 100000}, {"key": 1, "value": 2}] - - await broadcaster(tronWeb.transactionBuilder.createProposal(parameters, ADDRESS_BASE58), PRIVATE_KEY) - - proposals = await tronWeb.trx.listProposals(); - - }) - - it('should allow the SR to delete its own proposal', async function () { - - const params = [ - [proposals[0].proposal_id, {permissionId: 2}], - [proposals[0].proposal_id] - ]; - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.deleteProposal(...param) - const parameter = txPars(transaction); - - assert.equal(parameter.value.owner_address, ADDRESS_HEX); - assert.equal(parameter.value.proposal_id, proposals[0].proposal_id); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.ProposalDeleteContract'); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, param[1] ? param[1]['permissionId'] : 0); - } - }) - - it('should allow the SR to delete its own proposal and broadcast', async function () { - - const param = [proposals[0].proposal_id]; - const transaction = tronWeb.transactionBuilder.deleteProposal(...param); - const res = await broadcaster(transaction); - assert.isTrue(res.receipt.result); - }) - - it('should throw trying to cancel an already canceled proposal', async function () { - - await broadcaster(await tronWeb.transactionBuilder.deleteProposal(proposals[0].proposal_id)); - - await assertThrow( - tronWeb.transactionBuilder.deleteProposal(proposals[0].proposal_id), - null, - `Proposal[${proposals[0].proposal_id}] canceled`); - - }) - - // TODO add invalid params throws - - }); - - describe.skip("#applyForSR", async function () { - - let url = 'https://xtron.network'; - - it('should allow accounts[0] to apply for SR', async function () { - - const transaction = await tronWeb.transactionBuilder.applyForSR(accounts.b58[20], url); - const parameter = txPars(transaction); - - assert.equal(parameter.value.owner_address, accounts.hex[20]); - await assertEqualHex(parameter.value.url, url); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.WitnessCreateContract'); - }); - - it('should allow accounts[0] to apply for SR and broadcast', async function () { - - const transaction = tronWeb.transactionBuilder.applyForSR(accounts.b58[20], url); - const res = await broadcaster(transaction, accounts.pks[20]); - assert.isTrue(res.receipt.result); - }); - - // TODO add invalid params throws - it('should throw Invalid url provided error', async function () { - assertThrow( - tronWeb.transactionBuilder.applyForSR(accounts.b58[20], url + '#' + 'abc'.repeat(Math.ceil(256 / 3))), - 'Invalid url provided', - ); - }); - }); - - describe("#freezeBalance", async function () { - - it('should allows accounts[1] to freeze its balance', async function () { - const params = [ - [100e6, 3, 'BANDWIDTH', accounts.b58[1], {permissionId: 2}], - [100e6, 3, 'BANDWIDTH', accounts.b58[1]] - ]; - - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.freezeBalance(...param) - - const parameter = txPars(transaction); - // jlog(parameter) - assert.equal(parameter.value.owner_address, accounts.hex[1]); - assert.equal(parameter.value.frozen_balance, 100e6); - assert.equal(parameter.value.frozen_duration, 3); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.FreezeBalanceContract'); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, param[4] ? param[4]['permissionId'] : 0); - } - }) - - // TODO add invalid params throws - - }); - - describe.skip("#unfreezeBalance", async function () { - - // TODO this is not fully testable because the minimum time before unfreezing is 3 days - async function freezeBandWith() { - const transaction = await tronWeb.transactionBuilder.freezeBalance(100e6, 3, 'BANDWIDTH', accounts.b58[1]); - await broadcaster(transaction, accounts.pks[1]); - while (true) { - const tx = await tronWeb.trx.getTransactionInfo(transaction.txID); - if (Object.keys(tx).length === 0) { - await wait(3); - continue; - } else { - break; - } - } - }; - - it('should unfreeze balance', async function () { - const params = [ - ['BANDWIDTH', accounts.b58[1], { permissionId: 2 }], - ['BANDWIDTH', accounts.b58[1]] - ]; - - for (let param of params) { - await freezeBandWith(); - const transaction = await tronWeb.transactionBuilder.unfreezeBalance(...param) - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - } - }) - - }); - - describe.skip('#withdrawBalance', function () { - - // this is not fully testable because the minimum time before withdrawBlockRewards is 1 days - // witnessAccount does not have any reward - - it(`should withdraw balance`, async function () { - const params = [ - [accounts.b58[1], { permissionId: 2 }], - [accounts.b58[1]] - ]; - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.withdrawBlockRewards( - ...param - ); - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - - } - }); - }); - - describe("#freezeBalanceV2", async function () { - it('should allows accounts[1] to freeze its balance by freezeBalanceV2', async function () { - const params = [ - [500e6, 'BANDWIDTH', accounts.b58[1], {permissionId: 2}], - [500e6, 'BANDWIDTH', accounts.b58[1]] - ]; - - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.freezeBalanceV2(...param); - await broadcaster(null, accounts.pks[1], transaction); - - const parameter = txPars(transaction); - // jlog(parameter) - assert.equal(parameter.value.owner_address, accounts.hex[1]); - assert.equal(parameter.value.frozen_balance, 500e6); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.FreezeBalanceV2Contract'); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, param[3] ? param[3]['permissionId'] : 0); - } - }) - - it('should throw if owner address is invalid', async function () { - const params = [ - [100e6, 'BANDWIDTH', 'ddssddd', {permissionId: 2}], - [100e6, 'BANDWIDTH', 'ddssddd'] - ]; - - for (let param of params) { - await assertThrow(tronWeb.transactionBuilder.freezeBalanceV2(...param)) - } - }) - - it('should throw if frozen balance is invalid', async function () { - const params = [ - ['-100', 'BANDWIDTH', accounts.b58[1], {permissionId: 2}], - ['-100', 'BANDWIDTH', accounts.b58[1]] - ]; - - for (let param of params) { - await assertThrow(tronWeb.transactionBuilder.freezeBalanceV2(...param)) - } - }) - - it('should throw if resource is invalid', async function () { - const params = [ - ['-100', 'aabbccdd', accounts.b58[1], {permissionId: 2}], - ['-100', 'aabbccdd', accounts.b58[1]] - ]; - - for (let param of params) { - await assertThrow(tronWeb.transactionBuilder.freezeBalanceV2(...param)) - } - }) - - it('should allows accounts[1] to freeze its balance by freezeBalanceV2', async function () { - const params = [ - [500e6, 'ENERGY', accounts.b58[1], {permissionId: 2}], - [500e6, 'ENERGY', accounts.b58[1]] - ]; - - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.freezeBalanceV2(...param); - await broadcaster(null, accounts.pks[1], transaction); - - const parameter = txPars(transaction); - // jlog(parameter) - assert.equal(parameter.value.owner_address, accounts.hex[1]); - assert.equal(parameter.value.frozen_balance, 500e6); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.FreezeBalanceV2Contract'); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, param[3] ? param[3]['permissionId'] : 0); - } - }) - - it('should throw if owner address is invalid', async function () { - const params = [ - [100e6, 'ENERGY', 'ddssddd', {permissionId: 2}], - [100e6, 'ENERGY', 'ddssddd'] - ]; - - for (let param of params) { - await assertThrow(tronWeb.transactionBuilder.freezeBalanceV2(...param)) - } - }) - - it('should throw if frozen balance is invalid', async function () { - const params = [ - ['-100', 'ENERGY', accounts.b58[1], {permissionId: 2}], - ['-100', 'ENERGY', accounts.b58[1]] - ]; - - for (let param of params) { - await assertThrow(tronWeb.transactionBuilder.freezeBalanceV2(...param)) - } - }) - }); - - describe("#unfreezeBalanceV2", async function () { - it('should allows accounts[1] to unfreeze its balance', async function () { - const params = [ - [100e6, 'BANDWIDTH', accounts.b58[1], {permissionId: 2}], - [100e6, 'BANDWIDTH', accounts.b58[1]] - ]; - - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.unfreezeBalanceV2(...param) - await broadcaster(null, accounts.pks[1], transaction); - - const parameter = txPars(transaction); - // jlog(parameter) - assert.equal(parameter.value.owner_address, accounts.hex[1]); - assert.equal(parameter.value.unfreeze_balance, 100e6); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.UnfreezeBalanceV2Contract'); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, param[3] ? param[3]['permissionId'] : 0); - } - }) - - it('should throw if owner address is invalid', async function () { - const params = [ - [100e6, 'BANDWIDTH', 'ddssddd', {permissionId: 2}], - [100e6, 'BANDWIDTH', 'ddssddd'] - ]; - - for (let param of params) { - await assertThrow(tronWeb.transactionBuilder.unfreezeBalanceV2(...param)) - } - }) - - it('should throw if frozen balance is invalid', async function () { - const params = [ - ['-100', 'BANDWIDTH', accounts.b58[1], {permissionId: 2}], - ['-100', 'BANDWIDTH', accounts.b58[1]] - ]; - - for (let param of params) { - await assertThrow(tronWeb.transactionBuilder.unfreezeBalanceV2(...param)) - } - }) - - it('should throw if resource is invalid', async function () { - const params = [ - [100e6, 'aabbccdd', accounts.b58[1], {permissionId: 2}], - [100e6, 'aabbccdd', accounts.b58[1]] - ]; - - for (let param of params) { - await assertThrow(tronWeb.transactionBuilder.unfreezeBalanceV2(...param)) - } - }) - - it('should allows accounts[1] to unfreeze its balance', async function () { - const params = [ - [100e6, 'ENERGY', accounts.b58[1], {permissionId: 2}], - [100e6, 'ENERGY', accounts.b58[1]] - ]; - - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.unfreezeBalanceV2(...param) - await broadcaster(null, accounts.pks[1], transaction); - - const parameter = txPars(transaction); - // jlog(parameter) - assert.equal(parameter.value.owner_address, accounts.hex[1]); - assert.equal(parameter.value.unfreeze_balance, 100e6); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.UnfreezeBalanceV2Contract'); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, param[3] ? param[3]['permissionId'] : 0); - } - }) - - it('should throw if owner address is invalid', async function () { - const params = [ - [100e6, 'ENERGY', 'ddssddd', {permissionId: 2}], - [100e6, 'ENERGY', 'ddssddd'] - ]; - - for (let param of params) { - await assertThrow(tronWeb.transactionBuilder.unfreezeBalanceV2(...param)) - } - }) - - it('should throw if frozen balance is invalid', async function () { - const params = [ - ['-100', 'ENERGY', accounts.b58[1], {permissionId: 2}], - ['-100', 'ENERGY', accounts.b58[1]] - ]; - - for (let param of params) { - await assertThrow(tronWeb.transactionBuilder.unfreezeBalanceV2(...param)) - } - }) - }); - - describe("#delegateResource", async function () { - before(async () => { - const transaction = await tronWeb.transactionBuilder.freezeBalanceV2(500e6, 'BANDWIDTH'); - await broadcaster(null, PRIVATE_KEY, transaction); - - const transaction2 = await tronWeb.transactionBuilder.freezeBalanceV2(500e6, 'ENERGY'); - await broadcaster(null, PRIVATE_KEY, transaction2); - }); - - it('should allows accounts[1] to delegate its resource', async function () { - const params = [ - [100e6, accounts.b58[7], 'BANDWIDTH', accounts.b58[1], {permissionId: 2}], - [100e6, accounts.b58[7], 'BANDWIDTH', accounts.b58[1]] - ]; - - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.delegateResource(...param) - await broadcaster(null, accounts.pks[1], transaction); - - const parameter = txPars(transaction); - // jlog(parameter) - assert.equal(parameter.value.owner_address, accounts.hex[1]); - assert.equal(parameter.value.receiver_address, accounts.hex[7]); - assert.equal(parameter.value.balance, 100e6); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.DelegateResourceContract'); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, param[4] ? param[4]['permissionId'] : 0); - } - }) - - it('should throw if owner address is invalid', async function () { - const params = [ - [100e6, accounts.b58[7], 'BANDWIDTH', 'ddssddd', {permissionId: 2}], - [100e6, accounts.b58[7], 'BANDWIDTH', 'ddssddd'] - ]; - - for (let param of params) { - await assertThrow( - tronWeb.transactionBuilder.delegateResource(...param), - 'Invalid origin address provided' - ) - } - }) - - it('should throw if frozen balance is invalid', async function () { - const params = [ - ['-100', accounts.b58[7], 'BANDWIDTH', accounts.b58[1], {permissionId: 2}], - ['-100', accounts.b58[7], 'BANDWIDTH', accounts.b58[1]] - ]; - - for (let param of params) { - await assertThrow( - tronWeb.transactionBuilder.delegateResource(...param), - 'Invalid amount provided' - ) - } - }) - - it('should throw if resource is invalid', async function () { - const params = [ - [100e6, accounts.b58[7], 'aabbccdd', accounts.b58[1], {permissionId: 2}], - [100e6, accounts.b58[7], 'aabbccdd', accounts.b58[1]] - ]; - - for (let param of params) { - await assertThrow( - tronWeb.transactionBuilder.delegateResource(...param), - 'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"' - ) - } - }) - - it('should throw if receiver address is invalid', async function () { - const params = [ - [100e6, 'adskjkkk', 'BANDWIDTH', accounts.b58[1], {permissionId: 2}], - [100e6, 'adskjkkk', 'BANDWIDTH', accounts.b58[1]] - ]; - - for (let param of params) { - await assertThrow( - tronWeb.transactionBuilder.delegateResource(...param), - 'Invalid receiver address provided' - ) - } - }) - - it('should throw if receiver address is the same as from address', async function () { - const params = [ - [100e6, accounts.b58[1], 'BANDWIDTH', accounts.b58[1], {permissionId: 2}], - [100e6, accounts.b58[1], 'BANDWIDTH', accounts.b58[1]], - ]; - - for (let param of params) { - await assertThrow( - tronWeb.transactionBuilder.delegateResource(...param), - 'Receiver address must not be the same as owner address' - ) - } - }) - - it('should allow accounts[1] to delegate its resource if lock is true', async function () { - const params = [ - [100e6, accounts.b58[7], 'BANDWIDTH', accounts.b58[1], true, {permissionId: 2}], - [100e6, accounts.b58[7], 'BANDWIDTH', accounts.b58[1], true] - ]; - - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.delegateResource(...param) - - const parameter = txPars(transaction); - // jlog(parameter) - assert.equal(parameter.value.owner_address, accounts.hex[1]); - assert.equal(parameter.value.receiver_address, accounts.hex[7]); - assert.equal(parameter.value.balance, 100e6); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.DelegateResourceContract'); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, param[5] ? param[5]['permissionId'] : 0); - } - }) - - it('should allow defaultAdress to delegate its resource if from address is omitted', async function () { - const params = [ - [100e6, accounts.b58[7], 'BANDWIDTH', {permissionId: 2}], - [100e6, accounts.b58[7], 'BANDWIDTH'] - ]; - - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.delegateResource(...param) - - const parameter = txPars(transaction); - // jlog(parameter) - assert.equal(parameter.value.owner_address, tronWeb.defaultAddress.hex); - assert.equal(parameter.value.receiver_address, accounts.hex[7]); - assert.equal(parameter.value.balance, 100e6); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.DelegateResourceContract'); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, param[3] ? param[3]['permissionId'] : 0); - } - }) - - it('should allow defaultAdress to delegate its resource if resource is omitted', async function () { - const params = [ - [100e6, accounts.b58[7], {permissionId: 2}], - [100e6, accounts.b58[7]] - ]; - - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.delegateResource(...param) - - const parameter = txPars(transaction); - // jlog(parameter) - assert.equal(parameter.value.owner_address, tronWeb.defaultAddress.hex); - assert.equal(parameter.value.receiver_address, accounts.hex[7]); - assert.equal(parameter.value.balance, 100e6); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.DelegateResourceContract'); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, param[2] ? param[2]['permissionId'] : 0); - } - }) - - it('should allow accounts[1] to delegate its resource', async function () { - const params = [ - [100e6, accounts.b58[7], 'ENERGY', accounts.b58[1], {permissionId: 2}], - [100e6, accounts.b58[7], 'ENERGY', accounts.b58[1]] - ]; - - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.delegateResource(...param) - await broadcaster(null, accounts.pks[1], transaction); - - const parameter = txPars(transaction); - // jlog(parameter) - assert.equal(parameter.value.owner_address, accounts.hex[1]); - assert.equal(parameter.value.receiver_address, accounts.hex[7]); - assert.equal(parameter.value.balance, 100e6); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.DelegateResourceContract'); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, param[4] ? param[4]['permissionId'] : 0); - } - }) - - it('should throw if owner address is invalid', async function () { - const params = [ - [100e6, accounts.b58[7], 'ENERGY', 'ddssddd', {permissionId: 2}], - [100e6, accounts.b58[7], 'ENERGY', 'ddssddd'] - ]; - - for (let param of params) { - await assertThrow( - tronWeb.transactionBuilder.delegateResource(...param), - 'Invalid origin address provided' - ) - } - }) - - it('should throw if frozen balance is invalid', async function () { - const params = [ - ['-100', accounts.b58[7], 'ENERGY', accounts.b58[1], {permissionId: 2}], - ['-100', accounts.b58[7], 'ENERGY', accounts.b58[1]] - ]; - - for (let param of params) { - await assertThrow( - tronWeb.transactionBuilder.delegateResource(...param), - 'Invalid amount provided' - ) - } - }) - - it('should throw if receiver address is invalid', async function () { - const params = [ - [100e6, 'adskjkkk', 'ENERGY', accounts.b58[1], {permissionId: 2}], - [100e6, 'adskjkkk', 'ENERGY', accounts.b58[1]] - ]; - - for (let param of params) { - await assertThrow( - tronWeb.transactionBuilder.delegateResource(...param), - 'Invalid receiver address provided' - ) - } - }) - - it('should throw if receiver address is the same as from address', async function () { - const params = [ - [100e6, accounts.b58[1], 'ENERGY', accounts.b58[1], {permissionId: 2}], - [100e6, accounts.b58[1], 'ENERGY', accounts.b58[1]] - ]; - - for (let param of params) { - await assertThrow( - tronWeb.transactionBuilder.delegateResource(...param), - 'Receiver address must not be the same as owner address' - ) - } - }) - - it('should allow accounts[1] to delegate its resource if lock is true', async function () { - const params = [ - [100e6, accounts.b58[7], 'ENERGY', accounts.b58[1], true, {permissionId: 2}], - [100e6, accounts.b58[7], 'ENERGY', accounts.b58[1], true] - ]; - - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.delegateResource(...param) - - const parameter = txPars(transaction); - // jlog(parameter) - assert.equal(parameter.value.owner_address, accounts.hex[1]); - assert.equal(parameter.value.receiver_address, accounts.hex[7]); - assert.equal(parameter.value.balance, 100e6); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.DelegateResourceContract'); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, param[5] ? param[5]['permissionId'] : 0); - } - }) - - it('should allow defaultAdress to delegate its resource if from address is omitted', async function () { - const params = [ - [100e6, accounts.b58[7], 'ENERGY', {permissionId: 2}], - [100e6, accounts.b58[7], 'ENERGY'] - ]; - - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.delegateResource(...param) - - const parameter = txPars(transaction); - // jlog(parameter) - assert.equal(parameter.value.owner_address, tronWeb.defaultAddress.hex); - assert.equal(parameter.value.receiver_address, accounts.hex[7]); - assert.equal(parameter.value.balance, 100e6); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.DelegateResourceContract'); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, param[3] ? param[3]['permissionId'] : 0); - } - }) - }); - - describe("#undelegateResource", async function () { - before(async () => { - const transaction = await tronWeb.transactionBuilder.delegateResource(100e6, accounts.b58[7], 'BANDWIDTH'); - await broadcaster(null, PRIVATE_KEY, transaction); - const transaction2 = await tronWeb.transactionBuilder.delegateResource(100e6, accounts.b58[7], 'ENERGY'); - await broadcaster(null, PRIVATE_KEY, transaction2); - }); - it('should allows accounts[1] to undelegate its resource', async function () { - const params = [ - [100e6, accounts.b58[7], 'BANDWIDTH', accounts.b58[1], {permissionId: 2}], - [100e6, accounts.b58[7], 'BANDWIDTH', accounts.b58[1]] - ]; - - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.undelegateResource(...param) - await broadcaster(null, accounts.pks[1], transaction); - - const parameter = txPars(transaction); - // jlog(parameter) - assert.equal(parameter.value.owner_address, accounts.hex[1]); - assert.equal(parameter.value.receiver_address, accounts.hex[7]); - assert.equal(parameter.value.balance, 100e6); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.UnDelegateResourceContract'); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, param[4] ? param[4]['permissionId'] : 0); - } - }) - - it('should throw if owner address is invalid', async function () { - const params = [ - [100e6, accounts.b58[7], 'BANDWIDTH', 'ddssddd', {permissionId: 2}], - [100e6, accounts.b58[7], 'BANDWIDTH', 'ddssddd'] - ]; - - for (let param of params) { - await assertThrow( - tronWeb.transactionBuilder.undelegateResource(...param), - 'Invalid origin address provided' - ) - } - }) - - it('should throw if frozen balance is invalid', async function () { - const params = [ - ['-100', accounts.b58[7], 'BANDWIDTH', accounts.b58[1], {permissionId: 2}], - ['-100', accounts.b58[7], 'BANDWIDTH', accounts.b58[1]] - ]; - - for (let param of params) { - await assertThrow( - tronWeb.transactionBuilder.undelegateResource(...param), - 'Invalid amount provided' - ) - } - }) - - it('should throw if resource is invalid', async function () { - const params = [ - [100e6, accounts.b58[7], 'aabbccdd', accounts.b58[1], {permissionId: 2}], - [100e6, accounts.b58[7], 'aabbccdd', accounts.b58[1]] - ]; - - for (let param of params) { - await assertThrow( - tronWeb.transactionBuilder.undelegateResource(...param), - 'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"' - ) - } - }) - - it('should throw if receiver address is invalid', async function () { - const params = [ - [100e6, 'adskjkkk', 'BANDWIDTH', accounts.b58[1], {permissionId: 2}], - [100e6, 'adskjkkk', 'BANDWIDTH', accounts.b58[1]] - ]; - - for (let param of params) { - await assertThrow( - tronWeb.transactionBuilder.undelegateResource(...param), - 'Invalid receiver address provided' - ) - } - }) - - it('should throw if receiver address is the same as from address', async function () { - const params = [ - [100e6, accounts.b58[1], 'BANDWIDTH', accounts.b58[1], {permissionId: 2}], - [100e6, accounts.b58[1], 'BANDWIDTH', accounts.b58[1]], - ]; - - for (let param of params) { - await assertThrow( - tronWeb.transactionBuilder.undelegateResource(...param), - 'Receiver address must not be the same as owner address' - ) - } - }) - - it('should allow defaultAdress to undelegate its resource if from address is omitted', async function () { - const params = [ - [100e6, accounts.b58[7], 'BANDWIDTH', {permissionId: 2}], - [100e6, accounts.b58[7], 'BANDWIDTH'] - ]; - - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.undelegateResource(...param) - - const parameter = txPars(transaction); - // jlog(parameter) - assert.equal(parameter.value.owner_address, tronWeb.defaultAddress.hex); - assert.equal(parameter.value.receiver_address, accounts.hex[7]); - assert.equal(parameter.value.balance, 100e6); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.UnDelegateResourceContract'); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, param[3] ? param[3]['permissionId'] : 0); - } - }) - - it('should allow defaultAdress to undelegate its resource if resource is omitted', async function () { - const params = [ - [100e6, accounts.b58[7], {permissionId: 2}], - [100e6, accounts.b58[7]] - ]; - - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.undelegateResource(...param) - - const parameter = txPars(transaction); - // jlog(parameter) - assert.equal(parameter.value.owner_address, tronWeb.defaultAddress.hex); - assert.equal(parameter.value.receiver_address, accounts.hex[7]); - assert.equal(parameter.value.balance, 100e6); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.UnDelegateResourceContract'); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, param[2] ? param[2]['permissionId'] : 0); - } - }) - - it('should allows accounts[1] to undelegate its resource', async function () { - const params = [ - [100e6, accounts.b58[7], 'ENERGY', accounts.b58[1], {permissionId: 2}], - [100e6, accounts.b58[7], 'ENERGY', accounts.b58[1]] - ]; - - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.undelegateResource(...param) - await broadcaster(null, accounts.pks[1], transaction); - - const parameter = txPars(transaction); - // jlog(parameter) - assert.equal(parameter.value.owner_address, accounts.hex[1]); - assert.equal(parameter.value.receiver_address, accounts.hex[7]); - assert.equal(parameter.value.balance, 100e6); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.UnDelegateResourceContract'); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, param[4] ? param[4]['permissionId'] : 0); - } - }) - - it('should throw if owner address is invalid', async function () { - const params = [ - [100e6, accounts.b58[7], 'ENERGY', 'ddssddd', {permissionId: 2}], - [100e6, accounts.b58[7], 'ENERGY', 'ddssddd'] - ]; - - for (let param of params) { - await assertThrow( - tronWeb.transactionBuilder.undelegateResource(...param), - 'Invalid origin address provided' - ) - } - }) - - it('should throw if frozen balance is invalid', async function () { - const params = [ - ['-100', accounts.b58[7], 'ENERGY', accounts.b58[1], {permissionId: 2}], - ['-100', accounts.b58[7], 'ENERGY', accounts.b58[1]] - ]; - - for (let param of params) { - await assertThrow( - tronWeb.transactionBuilder.undelegateResource(...param), - 'Invalid amount provided' - ) - } - }) - - it('should throw if receiver address is invalid', async function () { - const params = [ - [100e6, 'adskjkkk', 'ENERGY', accounts.b58[1], {permissionId: 2}], - [100e6, 'adskjkkk', 'ENERGY', accounts.b58[1]] - ]; - - for (let param of params) { - await assertThrow( - tronWeb.transactionBuilder.undelegateResource(...param), - 'Invalid receiver address provided' - ) - } - }) - - it('should throw if receiver address is the same as from address', async function () { - const params = [ - [100e6, accounts.b58[1], 'ENERGY', accounts.b58[1], {permissionId: 2}], - [100e6, accounts.b58[1], 'ENERGY', accounts.b58[1]], - ]; - - for (let param of params) { - await assertThrow( - tronWeb.transactionBuilder.undelegateResource(...param), - 'Receiver address must not be the same as owner address' - ) - } - }) - - it('should allow defaultAdress to undelegate its resource if from address is omitted', async function () { - const params = [ - [100e6, accounts.b58[7], 'ENERGY', {permissionId: 2}], - [100e6, accounts.b58[7], 'ENERGY'] - ]; - - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.undelegateResource(...param) - - const parameter = txPars(transaction); - // jlog(parameter) - assert.equal(parameter.value.owner_address, tronWeb.defaultAddress.hex); - assert.equal(parameter.value.receiver_address, accounts.hex[7]); - assert.equal(parameter.value.balance, 100e6); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.UnDelegateResourceContract'); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, param[3] ? param[3]['permissionId'] : 0); - } - }) - }); - - describe("#withdrawExpireUnfreeze", async function () { - const idx = 1; - - before(async () => { - const transaction2 = await tronWeb.transactionBuilder.freezeBalanceV2(100e6, 'BANDWIDTH', accounts.hex[idx]); - await broadcaster(null, accounts.pks[idx], transaction2); - await waitChainData('tx', transaction2.txID); - const transaction = await tronWeb.transactionBuilder.unfreezeBalanceV2(10e6, 'BANDWIDTH', accounts.hex[idx]); - await broadcaster(null, accounts.pks[idx], transaction); - await waitChainData('tx', transaction.txID); - - const transaction3 = await tronWeb.transactionBuilder.freezeBalanceV2(100e6, 'ENERGY', accounts.hex[idx]); - await broadcaster(null, accounts.pks[idx], transaction3); - await waitChainData('tx', transaction3.txID); - const transaction4 = await tronWeb.transactionBuilder.unfreezeBalanceV2(10e6, 'ENERGY', accounts.hex[idx]); - await broadcaster(null, accounts.pks[idx], transaction4); - await waitChainData('tx', transaction4.txID); - await wait(65); - }) - it('should allows accounts[1] to withdraw its undelegated resource', async function () { - const params = [ - [accounts.b58[1], {permissionId: 2}], - [accounts.b58[1]] - ]; - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.withdrawExpireUnfreeze(...param) - - const parameter = txPars(transaction); - // jlog(parameter) - assert.equal(parameter.value.owner_address, accounts.hex[1]); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.WithdrawExpireUnfreezeContract'); - assert.equal(transaction.raw_data.contract[0].Permission_id || 0, param[1] ? param[1]['permissionId'] : 0); - } - }) - - it('should throw if owner address is invalid', async function () { - const params = [ - ['ddssddd', {permissionId: 2}], - ['ddssddd'] - ]; - - for (let param of params) { - await assertThrow(tronWeb.transactionBuilder.withdrawExpireUnfreeze(...param)) - } - }) - }); - - describe.skip("#vote", async function () { - // this is not testable because on Tron Quickstart (like on Shasta) it is not possible to vote - - let url = 'https://xtron.network'; - // let witnesses; - - - before(async function () { - - await broadcaster(tronWeb.transactionBuilder.applyForSR(accounts.b58[0], url), accounts.pks[0]) - await broadcaster(tronWeb.transactionBuilder.freezeBalance(100e6, 3, 'BANDWIDTH', accounts.b58[1]), accounts.pks[1]) - }) - - - it('should allows accounts[1] to vote for accounts[0] as SR', async function () { - let votes = {} - votes[accounts.hex[0]] = 5 - - const transaction = await tronWeb.transactionBuilder.vote(votes, accounts.b58[1]) - const parameter = txPars(transaction); - - assert.equal(parameter.value.owner_address, accounts.hex[1]); - assert.equal(parameter.value.votes[0].vote_address, accounts.hex[0]); - assert.equal(parameter.value.votes[0].vote_count, 5); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.VoteWitnessContract'); - }) - - }); - - describe("#createSmartContract", async function () { - - it('should create a smart contract with default parameters', async function () { - - const options = { - abi: testRevert.abi, - bytecode: testRevert.bytecode, - feeLimit: 8e7 - }; - for (let i = 0; i < 2; i++) { - if (i === 1) options.permissionId = 2; - const tx = await tronWeb.transactionBuilder.createSmartContract(options) - assert.equal(tx.raw_data.contract[0].parameter.value.new_contract.consume_user_resource_percent, 100); - assert.equal(tx.raw_data.contract[0].parameter.value.new_contract.origin_energy_limit, 1e7); - assert.equal(tx.raw_data.fee_limit, 8e7); - assert.equal(tx.raw_data.contract[0].Permission_id || 0, options.permissionId || 0); - } - }); - - it('should create a smart contract with array parameters', async function () { - this.timeout(20000); - const bals = [1000, 2000, 3000, 4000]; - const options = { - abi: arrayParam.abi, - bytecode: arrayParam.bytecode, - permissionId: 2, - parameters: [ - [accounts.hex[25], accounts.hex[26], accounts.hex[27], accounts.hex[28]], - [bals[0], bals[1], bals[2], bals[3]] - ] - }; - const transaction = await tronWeb.transactionBuilder.createSmartContract(options, accounts.hex[0]); - await broadcaster(null, accounts.pks[0], transaction); - while (true) { - const tx = await tronWeb.trx.getTransactionInfo(transaction.txID); - if (Object.keys(tx).length === 0) { - await wait(3); - continue; - } else { - break; - } - } - const deployed = await tronWeb.contract().at(transaction.contract_address); - for (let j = 25; j <= 28; j++) { - let bal = await deployed.balances(accounts.hex[j]).call(); - bal = bal.toNumber(); - assert.equal(bal, bals[j - 25]); - } - }); - - it('should create a smart contract and verify the parameters', async function () { - - const options = { - abi: testRevert.abi, - bytecode: testRevert.bytecode, - userFeePercentage: 30, - originEnergyLimit: 9e6, - feeLimit: 9e8 - }; - for (let i = 0; i < 2; i++) { - if (i === 1) options.permissionId = 2; - const tx = await tronWeb.transactionBuilder.createSmartContract(options) - assert.equal(tx.raw_data.contract[0].parameter.value.new_contract.consume_user_resource_percent, 30); - assert.equal(tx.raw_data.contract[0].parameter.value.new_contract.origin_energy_limit, 9e6); - assert.equal(tx.raw_data.fee_limit, 9e8); - assert.equal(tx.raw_data.contract[0].Permission_id || 0, options.permissionId || 0); - } - }); - - it('should allow default account to create a payable contract with callvalue == 0', async function () { - const options = { - abi: testPayable.abi, - bytecode: testPayable.bytecode, - callValue: 0, - }; - const tx = await tronWeb.transactionBuilder.createSmartContract(options); - assert.equal(tx.raw_data.contract[0].parameter.value.new_contract.consume_user_resource_percent, 100); - assert.equal(tx.raw_data.contract[0].parameter.value.new_contract.origin_energy_limit, 1e7); - assert.equal(tx.raw_data.contract[0].Permission_id || 0, options.permissionId || 0); - }) - }); - - describe("#triggerConstantContract", async function () { - - let transaction; - let contractAddress; - before(async function () { - this.timeout(20000); - - transaction = await tronWeb.transactionBuilder.createSmartContract({ - abi: testConstant.abi, - bytecode: testConstant.bytecode - }, accounts.hex[6]); - await broadcaster(null, accounts.pks[6], transaction); - while (true) { - const tx = await tronWeb.trx.getTransactionInfo(transaction.txID); - if (Object.keys(tx).length === 0) { - await wait(3); - continue; - } else { - break; - } - } - contractAddress = transaction.contract_address; - }) - - it('should trigger constant contract successfully', async function () { - this.timeout(20000); - - const issuerAddress = accounts.hex[6]; - const functionSelector = 'testPure(uint256,uint256)'; - const parameter = [ - {type: 'uint256', value: 1}, - {type: 'uint256', value: 2} - ] - const options = {}; - - for (let i = 0; i < 2; i++) { - if (i === 1) options.permissionId = 2; - transaction = await tronWeb.transactionBuilder.triggerConstantContract(contractAddress, functionSelector, options, - parameter, issuerAddress); - assert.isTrue(transaction.result.result && - transaction.transaction.raw_data.contract[0].parameter.type_url === 'type.googleapis.com/protocol.TriggerSmartContract'); - assert.equal(transaction.constant_result, '0000000000000000000000000000000000000000000000000000000000000004'); - transaction = await broadcaster(null, accounts.pks[6], transaction.transaction); - assert.isTrue(transaction.receipt.result) - assert.equal(transaction.transaction.raw_data.contract[0].Permission_id || 0, options.permissionId || 0); - } - }); - - it('should trigger constant contract with triggerSmartContract successfully', async function () { - this.timeout(20000); - - const issuerAddress = accounts.hex[6]; - const functionSelector = 'testPure(uint256,uint256)'; - const parameter = [ - {type: 'uint256', value: 1}, - {type: 'uint256', value: 2} - ] - const options = {}; - - for (let i = 0; i < 2; i++) { - if (i === 1) options.permissionId = 2; - transaction = await tronWeb.transactionBuilder.triggerSmartContract(contractAddress, functionSelector, options, - parameter, issuerAddress); - assert.isTrue(transaction.result.result && - transaction.transaction.raw_data.contract[0].parameter.type_url === 'type.googleapis.com/protocol.TriggerSmartContract'); - assert.equal(transaction.constant_result, '0000000000000000000000000000000000000000000000000000000000000004'); - transaction = await broadcaster(null, accounts.pks[6], transaction.transaction); - assert.isTrue(transaction.receipt.result) - assert.equal(transaction.transaction.raw_data.contract[0].Permission_id || 0, options.permissionId || 0); - } - }); - }); - - describe("#triggerComfirmedConstantContract", async function () { - - let transaction; - before(async function () { - this.timeout(20000); - - transaction = await tronWeb.transactionBuilder.createSmartContract({ - abi: testConstant.abi, - bytecode: testConstant.bytecode - }, accounts.hex[6]); - await broadcaster(null, accounts.pks[6], transaction); - while (true) { - const tx = await tronWeb.trx.getTransactionInfo(transaction.txID); - if (Object.keys(tx).length === 0) { - await wait(3); - continue; - } else { - break; - } - } - }) - - it('should trigger confirmed constant contract successfully', async function () { - this.timeout(20000); - - const contractAddress = transaction.contract_address; - const issuerAddress = accounts.hex[6]; - const functionSelector = 'testPure(uint256,uint256)'; - const parameter = [ - {type: 'uint256', value: 1}, - {type: 'uint256', value: 2} - ] - const options = {}; - - for (let i = 0; i < 2; i++) { - if (i === 1) options.permissionId = 2; - transaction = await tronWeb.transactionBuilder.triggerConfirmedConstantContract(contractAddress, functionSelector, options, - parameter, issuerAddress); - assert.isTrue(transaction.result.result && - transaction.transaction.raw_data.contract[0].parameter.type_url === 'type.googleapis.com/protocol.TriggerSmartContract'); - assert.equal(transaction.constant_result, '0000000000000000000000000000000000000000000000000000000000000004'); - transaction = await broadcaster(null, accounts.pks[6], transaction.transaction); - assert.isTrue(transaction.receipt.result) - assert.equal(transaction.transaction.raw_data.contract[0].Permission_id || 0, options.permissionId || 0); - } - }); - }); - - describe("#clearabi", async function () { - - let transactions = []; - let contracts = []; - before(async function () { - this.timeout(20000); - - transactions.push(await tronWeb.transactionBuilder.createSmartContract({ - abi: testConstant.abi, - bytecode: testConstant.bytecode - }, accounts.hex[7])); - transactions.push(await tronWeb.transactionBuilder.createSmartContract({ - abi: testConstant.abi, - bytecode: testConstant.bytecode - }, accounts.hex[7])); - transactions.forEach(async (tx) => { - contracts.push(await broadcaster(null, accounts.pks[7], tx)); - }); - - while (true) { - const tx1 = await tronWeb.trx.getTransactionInfo(transactions[0].txID); - const tx2 = await tronWeb.trx.getTransactionInfo(transactions[1].txID); - if (Object.keys(tx1).length === 0 || Object.keys(tx2).length === 0) { - await wait(3); - continue; - } else { - break; - } - } - }) - - it('should clear contract abi', async function () { - this.timeout(10000); - - const params = [ - [transactions[0], accounts.hex[7], {permissionId: 2}], - [transactions[1], accounts.hex[7]], - ]; - for (const param of params) { - const contractAddress = param[0].contract_address; - const ownerAddress = param[1]; - - // verify contract abi before - const contract = await tronWeb.trx.getContract(contractAddress); - assert.isTrue(Object.keys(contract.abi).length > 0) - - // clear abi - const transaction = await tronWeb.transactionBuilder.clearABI(contractAddress, ownerAddress, param[2]); - const parameter = txPars(transaction); - assert.isTrue(!transaction.visible && - transaction.raw_data.contract[0].parameter.type_url === 'type.googleapis.com/protocol.ClearABIContract'); - assert.equal(transaction.txID.length, 64); - assert.equal(parameter.value.contract_address, tronWeb.address.toHex(contractAddress)); - assert.equal(parameter.value.owner_address, tronWeb.address.toHex(ownerAddress)); - assert.equal(transaction.raw_data.contract[0].Permission_id, param[2]?.permissionId); - - if (param.length === 2) { - const res = await broadcaster(null, accounts.pks[7], transaction); - assert.isTrue(res.receipt.result); - - let contract; - // verify contract abi after - while (true) { - contract = await tronWeb.trx.getContract(contractAddress); - if (Object.keys(contract.abi).length > 0) { - await wait(3); - continue; - } else { - break; - } - } - assert.isTrue(Object.keys(contract.abi).length === 0); - } - } - }); - - it('should throw Invalid contract address provided', async function () { - await assertThrow( - tronWeb.transactionBuilder.clearABI(null, accounts.hex[1]), - 'Invalid contract address provided' - ); - }); - - it('should throw Invalid owner address provided', async function () { - await assertThrow( - tronWeb.transactionBuilder.clearABI(transactions[0].contract_address, null), - 'Invalid owner address provided' - ); - }); - }); - - describe("#updateBrokerage", async function () { - - before(async function () { - await broadcaster(tronWeb.transactionBuilder.sendTrx(accounts.b58[1], 10000e6), PRIVATE_KEY); - await broadcaster(tronWeb.transactionBuilder.applyForSR(accounts.b58[1], 'abc.tron.network'), accounts.pks[1]) - }) - - it('should update sr brokerage successfully', async function () { - const params = [ - [10, accounts.hex[1], {permissionId: 2}], - [20, accounts.hex[1]], - ]; - for (const param of params) { - const transaction = await tronWeb.transactionBuilder.updateBrokerage(...param); - const parameter = txPars(transaction); - assert.equal(transaction.txID.length, 64); - assert.equal(parameter.value.brokerage, param[0]); - assert.equal(parameter.value.owner_address, param[1]); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.UpdateBrokerageContract'); - assert.equal(transaction.raw_data.contract[0].Permission_id, param[2]?.permissionId); - } - }); - - it('should throw invalid brokerage provided error', async function () { - await assertThrow( - tronWeb.transactionBuilder.updateBrokerage(null, accounts.hex[1]), - 'Invalid brokerage provided' - ); - }); - - it('should throw brokerage must be an integer between 0 and 100 error', async function () { - let brokerages = [-1, 101] - for (let brokerage of brokerages) { - await assertThrow( - tronWeb.transactionBuilder.updateBrokerage(brokerage, accounts.hex[1]), - 'Brokerage must be an integer between 0 and 100' - ); - } - }); - - it('should throw invalid owner address provided error', async function () { - await assertThrow( - tronWeb.transactionBuilder.updateBrokerage(10, 'abcd'), - 'Invalid owner address provided' - ); - }); - - }); - - describe("#withdrawBlockRewards", async function () { - }); - - describe("#triggerSmartContract", async function () { - - let transaction; - before(async function () { - this.timeout(20000); - - transaction = await tronWeb.transactionBuilder.createSmartContract({ - abi: testConstant.abi, - bytecode: testConstant.bytecode - }, accounts.hex[6]); - await broadcaster(null, accounts.pks[6], transaction); - while (true) { - const tx = await tronWeb.trx.getTransactionInfo(transaction.txID); - if (Object.keys(tx).length === 0) { - await wait(3); - continue; - } else { - break; - } - } - }) - - it('should trigger smart contract successfully', async function () { - this.timeout(20000); - - const contractAddress = transaction.contract_address; - const issuerAddress = accounts.hex[6]; - const functionSelector = 'testPure(uint256,uint256)'; - const parameter = [ - {type: 'uint256', value: 1}, - {type: 'uint256', value: 2} - ] - const options = { - _isConstant: true, - }; - - for (let i = 0; i < 2; i++) { - if (i === 1) options.permissionId = 2; - transaction = await tronWeb.transactionBuilder.triggerSmartContract(contractAddress, functionSelector, options, - parameter, issuerAddress); - assert.isTrue(transaction.result.result && - transaction.transaction.raw_data.contract[0].parameter.type_url === 'type.googleapis.com/protocol.TriggerSmartContract'); - assert.equal(transaction.constant_result, '0000000000000000000000000000000000000000000000000000000000000004'); - transaction = await broadcaster(null, accounts.pks[6], transaction.transaction); - assert.isTrue(transaction.receipt.result) - assert.equal(transaction.transaction.raw_data.contract[0].Permission_id || 0, options.permissionId || 0); - } - }); - - }); - - describe("#createTokenExchange", async function () { - - const idxS = 12; - const idxE = 14; - const toIdx1 = 5; - const toIdx2 = 6; - let tokenNames = []; - - before(async function () { - this.timeout(20000); - - // create token - for (let i = idxS; i < idxE; i++) { - const options = getTokenOptions(); - const transaction = await tronWeb.transactionBuilder.createToken(options, accounts.hex[i]); - await broadcaster(null, accounts.pks[i], transaction); - await waitChainData('token', accounts.hex[i]); - const token = await tronWeb.trx.getTokensIssuedByAddress(accounts.hex[i]); - await waitChainData('tokenById', token[Object.keys(token)[0]]['id']); - await broadcaster(null, accounts.pks[i], await tronWeb.transactionBuilder.sendToken( - accounts.hex[toIdx1], - 10e4, - token[Object.keys(token)[0]]['id'], - token[Object.keys(token)[0]]['owner_address'] - )); - await waitChainData('sendToken', accounts.hex[toIdx1], 0); - await broadcaster(null, accounts.pks[i], await tronWeb.transactionBuilder.sendToken( - accounts.hex[toIdx2], - 10e4, - token[Object.keys(token)[0]]['id'], - token[Object.keys(token)[0]]['owner_address'] - )); - await waitChainData('sendToken', accounts.hex[toIdx2], 0); - tokenNames.push(token[Object.keys(token)[0]]['id']); - } - - }); - - it('should create token exchange', async function () { - let transaction = await tronWeb.transactionBuilder.createTokenExchange(tokenNames[0], 10e3, tokenNames[1], 10e3, accounts.hex[toIdx1]); - let parameter = txPars(transaction); - - assert.equal(transaction.txID.length, 64); - assert.equal(TronWeb.toUtf8(parameter.value.first_token_id), tokenNames[0]); - assert.equal(TronWeb.toUtf8(parameter.value.second_token_id), tokenNames[1]); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.ExchangeCreateContract'); - assert.isUndefined(transaction.raw_data.contract[0].Permission_id); - - transaction = await tronWeb.transactionBuilder.createTokenExchange(tokenNames[0], 10e3, tokenNames[1], 10e3, accounts.hex[toIdx1], {permissionId: 2}); - parameter = txPars(transaction); - - assert.equal(transaction.txID.length, 64); - assert.equal(TronWeb.toUtf8(parameter.value.first_token_id), tokenNames[0]); - assert.equal(TronWeb.toUtf8(parameter.value.second_token_id), tokenNames[1]); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.ExchangeCreateContract'); - assert.equal(transaction.raw_data.contract[0].Permission_id, 2); - }); - - }); - - describe("#createTRXExchange", async function () { - }); - - describe("#injectExchangeTokens", async function () { - const idxS = 14; - const idxE = 16; - let tokenNames = []; - let exchangeId = ''; - - before(async function () { - this.timeout(20000); - - // create token - for (let i = idxS; i < idxE; i++) { - const options = getTokenOptions(); - const transaction = await tronWeb.transactionBuilder.createToken(options, accounts.hex[i]); - await broadcaster(null, accounts.pks[i], transaction); - await waitChainData('token', accounts.hex[i]); - const token = await tronWeb.trx.getTokensIssuedByAddress(accounts.hex[i]); - await waitChainData('tokenById', token[Object.keys(token)[0]]['id']); - await broadcaster(null, accounts.pks[i], await tronWeb.transactionBuilder.sendToken( - tronWeb.defaultAddress.hex, - 10e4, - token[Object.keys(token)[0]]['id'], - token[Object.keys(token)[0]]['owner_address'] - )); - tokenNames.push(token[Object.keys(token)[0]]['id']); - } - const transaction = await tronWeb.transactionBuilder.createTokenExchange(tokenNames[1], 10, tokenNames[0], 10); - await broadcaster(null, PRIVATE_KEY, transaction); - let receipt = await tronWeb.trx.getTransactionInfo(transaction.txID); - while (!Object.keys(receipt).length) { - await wait(5); - receipt = await tronWeb.trx.getTransactionInfo(transaction.txID); - } - exchangeId = receipt.exchange_id; - }); - it(`should inject exchange tokens`, async function () { - const params = [ - [exchangeId, tokenNames[0], 10, { permissionId: 2 }], - [exchangeId, tokenNames[0], 10] - ]; - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.injectExchangeTokens( - ...param - ); - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - } - }); - }); - - describe("#withdrawExchangeTokens", async function () { - const idxS = 0; - const idxE = 2; - let tokenNames = []; - let exchangeId = ''; - - before(async function () { - this.timeout(20000); - - // create token - for (let i = idxS; i < idxE; i++) { - const options = getTokenOptions(); - const transaction = await tronWeb.transactionBuilder.createToken(options, accounts.hex[i]); - await broadcaster(null, accounts.pks[i], transaction); - await waitChainData('token', accounts.hex[i]); - const token = await tronWeb.trx.getTokensIssuedByAddress(accounts.hex[i]); - await waitChainData('tokenById', token[Object.keys(token)[0]]['id']); - await broadcaster(null, accounts.pks[i], await tronWeb.transactionBuilder.sendToken( - tronWeb.defaultAddress.hex, - 10e4, - token[Object.keys(token)[0]]['id'], - token[Object.keys(token)[0]]['owner_address'] - )); - tokenNames.push(token[Object.keys(token)[0]]['id']); - } - const transaction = await tronWeb.transactionBuilder.createTokenExchange(tokenNames[1], 10, tokenNames[0], 10); - await broadcaster(transaction); - let receipt = await tronWeb.trx.getTransactionInfo(transaction.txID); - while (!Object.keys(receipt).length) { - await wait(5); - receipt = await tronWeb.trx.getTransactionInfo(transaction.txID); - } - exchangeId = receipt.exchange_id; - - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult2, false); - - }); - it(`should withdraw exchange tokens`, async function () { - const params = [ - [exchangeId, tokenNames[0], 10, { permissionId: 2 }], - [exchangeId, tokenNames[0], 10] - ]; - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.withdrawExchangeTokens( - ...param - ); - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - } - }); - }); - - describe("#tradeExchangeTokens", async function () { - const idxS = 31; - const idxE = 33; - let tokenNames = []; - let exchangeId = ''; - - before(async function () { - this.timeout(20000); - - // create token - for (let i = idxS; i < idxE; i++) { - const options = getTokenOptions(); - const transaction = await tronWeb.transactionBuilder.createToken(options, accounts.hex[i]); - await broadcaster(null, accounts.pks[i], transaction); - await waitChainData('token', accounts.hex[i]); - const token = await tronWeb.trx.getTokensIssuedByAddress(accounts.hex[i]); - await waitChainData('tokenById', token[Object.keys(token)[0]]['id']); - await broadcaster(null, accounts.pks[i], await tronWeb.transactionBuilder.sendToken( - tronWeb.defaultAddress.hex, - 10e4, - token[Object.keys(token)[0]]['id'], - token[Object.keys(token)[0]]['owner_address'] - )); - tokenNames.push(token[Object.keys(token)[0]]['id']); - } - const transaction = await tronWeb.transactionBuilder.createTokenExchange(tokenNames[1], 10, tokenNames[0], 10); - await broadcaster(transaction); - let receipt = await tronWeb.trx.getTransactionInfo(transaction.txID); - while (!Object.keys(receipt).length) { - await wait(5); - receipt = await tronWeb.trx.getTransactionInfo(transaction.txID); - } - exchangeId = receipt.exchange_id; - }); - it(`should trade exchange tokens`, async function () { - const params = [ - [exchangeId, tokenNames[0], 10, 5, { permissionId: 2 }], - [exchangeId, tokenNames[0], 10, 5] - ]; - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.tradeExchangeTokens( - ...param - ); - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult2, false); - - transaction.txID = transaction.txID + '00' - const authResult3 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult3, false); - } - }); - }); - - describe("#updateSetting", function () { - let transaction; - before(async function () { - this.timeout(20000); - - transaction = await tronWeb.transactionBuilder.createSmartContract({ - abi: testConstant.abi, - bytecode: testConstant.bytecode - }, accounts.hex[3]); - await broadcaster(null, accounts.pks[3], transaction); - while (true) { - const tx = await tronWeb.trx.getTransactionInfo(transaction.txID); - if (Object.keys(tx).length === 0) { - await wait(3); - continue; - } else { - break; - } - } - }) - it(`should update setting`, async function () { - const params = [ - [transaction.contract_address, 10, accounts.b58[3], { permissionId: 2 }], - [transaction.contract_address, 20, accounts.b58[3]] - ]; - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.updateSetting( - ...param - ); - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - } - }); - }); - - describe("#updateEnergyLimit", function () { - let transaction; - before(async function () { - this.timeout(20000); - - transaction = await tronWeb.transactionBuilder.createSmartContract({ - abi: testConstant.abi, - bytecode: testConstant.bytecode - }, accounts.hex[3]); - await broadcaster(null, accounts.pks[3], transaction); - while (true) { - const tx = await tronWeb.trx.getTransactionInfo(transaction.txID); - if (Object.keys(tx).length === 0) { - await wait(3); - continue; - } else { - break; - } - } - }) - it(`should update energy limit`, async function () { - const params = [ - [transaction.contract_address, 10e6, accounts.b58[3], { permissionId: 2 }], - [transaction.contract_address, 10e6, accounts.b58[3]] - ]; - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.updateEnergyLimit( - ...param - ); - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - } - }); - }); - - describe("#accountPermissionUpdate", function () { - before(async () => { - await broadcaster(tronWeb.transactionBuilder.sendTrx(accounts.b58[6], 10000e6), PRIVATE_KEY); - const transaction = await tronWeb.transactionBuilder.applyForSR(accounts.b58[6], 'url.tron.network'); - await broadcaster(transaction, accounts.pks[6]); - while (true) { - const tx = await tronWeb.trx.getTransactionInfo(transaction.txID); - if (Object.keys(tx).length === 0) { - await wait(3); - continue; - } else { - break; - } - } - }); - it(`should update account permissions`, async function () { - const permissionData = { - "owner": { - "type": 0, - "keys": [ - { - "address": accounts.hex[6], - "weight": 1 - } - ], - "threshold": 1, - "permission_name": "owner" - }, - "witness": { - "keys": [ - { - "address": accounts.hex[6], - "weight": 1 - } - ], - "threshold": 1, - "id": 1, - "type": 1, - "permission_name": "witness" - }, - "owner_address": accounts.hex[6], - "actives": [ - { - "operations": "7fff1fc0033e0000000000000000000000000000000000000000000000000000", - "keys": [ - { - "address": accounts.hex[6], - "weight": 1 - } - ], - "threshold": 1, - "id": 2, - "type": 2, - "permission_name": "active" - } - ] - }; - const params = [ - [accounts.hex[6], permissionData.owner, permissionData.witness, permissionData.actives, {permissionId: 2}], - [accounts.hex[6], permissionData.owner, permissionData.witness, permissionData.actives], - ]; - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.updateAccountPermissions( - ...param - ); - const parameter = txPars(transaction); - assert.equal(transaction.txID.length, 64); - assert.equal(parameter.value.owner_address, param[0]); - // assert.deepEqual(parameter.value.owner, param[1]); - // assert.deepEqual(parameter.value.witness, param[2]); - // assert.deepEqual(parameter.value.actives, param[3]); - assert.equal(parameter.type_url, 'type.googleapis.com/protocol.AccountPermissionUpdateContract'); - assert.equal(transaction.raw_data.contract[0].Permission_id, param[4]?.permissionId); - } - }); - }); - - describe("Alter existent transactions", async function () { - - describe('#newTxID', async function () { - it('should keep txID unchanged when txLocal is true', async function () { - const receiver = accounts.b58[42] - const sender = accounts.hex[43] - const transaction = await tronWeb.transactionBuilder.sendTrx(receiver, 10, sender); - const previousId = transaction.txID; - const transactionLater = await tronWeb.transactionBuilder.newTxID(transaction, { txLocal: true }); - assert.equal(previousId, transactionLater.txID); - }) - - it('should keep txID unchanged when txLocal is unset', async function () { - const receiver = accounts.b58[42] - const sender = accounts.hex[43] - const transaction = await tronWeb.transactionBuilder.sendTrx(receiver, 10, sender); - const previousId = transaction.txID; - const transactionLater = await tronWeb.transactionBuilder.newTxID(transaction); - assert.equal(previousId, transactionLater.txID); - }) - }) - - describe("#extendExpiration", async function () { - - it('should extend the expiration', async function () { - - const receiver = accounts.b58[42] - const sender = accounts.hex[43] - const privateKey = accounts.pks[43] - const balance = await tronWeb.trx.getUnconfirmedBalance(sender); - - let transaction = await tronWeb.transactionBuilder.sendTrx(receiver, 10, sender); - const previousId = transaction.txID; - transaction = await tronWeb.transactionBuilder.extendExpiration(transaction, 3600); - await broadcaster(null, privateKey, transaction); - - assert.notEqual(transaction.txID, previousId) - assert.equal(balance - await tronWeb.trx.getUnconfirmedBalance(sender), 10); - - }); - - it('should extend the expiration when txLocal is ture', async function () { - await wait(3); - const receiver = accounts.b58[42] - const sender = accounts.hex[43] - const privateKey = accounts.pks[43] - const balance = await tronWeb.trx.getUnconfirmedBalance(sender); - - let transaction = await tronWeb.transactionBuilder.sendTrx(receiver, 10, sender); - const previousId = transaction.txID; - transaction = await tronWeb.transactionBuilder.extendExpiration(transaction, 3600, { txLocal: true }); - await broadcaster(null, privateKey, transaction); - - assert.notEqual(transaction.txID, previousId) - assert.equal(balance - await tronWeb.trx.getUnconfirmedBalance(sender), 10); - - }); - - }); - - describe("#addUpdateData", async function () { - - it('should add a data field', async function () { - - this.timeout(20000) - - const receiver = accounts.b58[44] - const sender = accounts.hex[45] - const privateKey = accounts.pks[45] - const balance = await tronWeb.trx.getUnconfirmedBalance(sender); - - let transaction = await tronWeb.transactionBuilder.sendTrx(receiver, 10, sender); - const data = "Sending money to Bill."; - transaction = await tronWeb.transactionBuilder.addUpdateData(transaction, data); - const id = transaction.txID; - await broadcaster(null, privateKey, transaction); - await waitChainData('tx', id); - assert.equal(balance - await tronWeb.trx.getUnconfirmedBalance(sender), 10 + 1e6); // change chain data at a cost of 1e6 - const unconfirmedTx = await tronWeb.trx.getTransaction(id) - assert.equal(tronWeb.toUtf8(unconfirmedTx.raw_data.data), data); - - }); - - it('should add a data field when txLocal is true', async function () { - - this.timeout(20000) - await wait(3); - const receiver = accounts.b58[44] - const sender = accounts.hex[45] - const privateKey = accounts.pks[45] - const balance = await tronWeb.trx.getUnconfirmedBalance(sender); - - let transaction = await tronWeb.transactionBuilder.sendTrx(receiver, 10, sender); - const data = "Sending money to Bill."; - transaction = await tronWeb.transactionBuilder.addUpdateData(transaction, data, {txLocal: true}); - const id = transaction.txID; - await broadcaster(null, privateKey, transaction); - await waitChainData('tx', id); - assert.equal(balance - await tronWeb.trx.getUnconfirmedBalance(sender), 10 + 1e6); // change chain data at a cost of 1e6 - const unconfirmedTx = await tronWeb.trx.getTransaction(id) - assert.equal(tronWeb.toUtf8(unconfirmedTx.raw_data.data), data); - - }); - - }); - - describe("#alterTransaction", async function () { - - // before(async function() { - // await wait(4); - // }) - - it('should alter the transaction adding a data field', async function () { - - const receiver = accounts.b58[40] - const sender = accounts.hex[41] - const privateKey = accounts.pks[41] - // const balance = await tronWeb.trx.getUnconfirmedBalance(sender); - - let transaction = await tronWeb.transactionBuilder.sendTrx(receiver, 10, sender); - const previousId = transaction.txID; - const data = "Sending money to Bill."; - transaction = await tronWeb.transactionBuilder.alterTransaction(transaction, {data}); - const id = transaction.txID; - assert.notEqual(id, previousId) - await broadcaster(null, privateKey, transaction); - await waitChainData('tx', id); - const unconfirmedTx = await tronWeb.trx.getTransaction(id) - assert.equal(tronWeb.toUtf8(unconfirmedTx.raw_data.data), data); - - }); - - it('should alter the transaction adding a data field when txLocal is true', async function () { - - const receiver = accounts.b58[40] - const sender = accounts.hex[41] - const privateKey = accounts.pks[41] - // const balance = await tronWeb.trx.getUnconfirmedBalance(sender); - - let transaction = await tronWeb.transactionBuilder.sendTrx(receiver, 10, sender); - const previousId = transaction.txID; - const data = "Sending money to Bill."; - transaction = await tronWeb.transactionBuilder.alterTransaction(transaction, {data, txLocal: true}); - const id = transaction.txID; - assert.notEqual(id, previousId) - await broadcaster(null, privateKey, transaction); - await waitChainData('tx', id); - const unconfirmedTx = await tronWeb.trx.getTransaction(id) - assert.equal(tronWeb.toUtf8(unconfirmedTx.raw_data.data), data); - - }); - - }); - }); - - describe("#triggerSmartContractWithRawParam", async function () { - - let transaction; - let issuerAddress; - let issuerPk; - - before(async () => { - issuerAddress = accounts.hex[0]; - issuerPk = accounts.pks[0]; - transaction = await tronWeb.transactionBuilder.createSmartContract( - { - abi: rawParam.abi, - bytecode: rawParam.bytecode, - rawParameter: - "0x0000000000000000000000000000000000000000000000000000000000000001", - }, - issuerAddress - ); - await broadcaster(null, issuerPk, transaction); - while (true) { - const tx = await tronWeb.trx.getTransactionInfo( - transaction.txID - ); - if (Object.keys(tx).length === 0) { - await wait(3); - continue; - } else { - break; - } - } - }) - - it('should trigger a smart contract with rawParameter', async function () { - const deployed = await tronWeb - .contract() - .at(transaction.contract_address); - let check = await deployed.check().call(); - assert.equal(check, 1); - - const setTransaction = await tronWeb.transactionBuilder.triggerSmartContract( - transaction.contract_address, - "setCheck(uint256)", - { - rawParameter: - "0x0000000000000000000000000000000000000000000000000000000000000002", - }, - [], - issuerAddress - ); - await broadcaster(null, issuerPk, setTransaction.transaction); - - check = await deployed.check().call(); - assert.equal(check, 2); - }); - - it('should trigger a smart contract locally with rawParameter', async function () { - const deployed = await tronWeb - .contract() - .at(transaction.contract_address); - - const setTransaction = await tronWeb.transactionBuilder.triggerSmartContract( - transaction.contract_address, - "setCheck(uint256)", - { - rawParameter: - "0x0000000000000000000000000000000000000000000000000000000000000003", - txLocal: true, - }, - [], - issuerAddress - ); - await broadcaster(null, issuerPk, setTransaction.transaction); - - check = await deployed.check().call(); - assert.equal(check, 3); - }); - }); - - describe("#triggerSmartContractWithFuncABIV2 (V1 input)", async function () { - - it('should create or trigger a smart contract with funcABIV2 (V1 input)', async function () { - const issuerAddress = accounts.hex[0]; - const issuerPk = accounts.pks[0]; - - const transaction = await tronWeb.transactionBuilder.createSmartContract( - { - abi: funcABIV2.abi, - bytecode: funcABIV2.bytecode, - funcABIV2: funcABIV2.abi[0], - parametersV2: [1] - }, - issuerAddress - ); - await broadcaster(null, issuerPk, transaction); - while (true) { - const tx = await tronWeb.trx.getTransactionInfo( - transaction.txID - ); - if (Object.keys(tx).length === 0) { - await wait(3); - continue; - } else { - break; - } - } - - const deployed = await tronWeb - .contract() - .at(transaction.contract_address); - let check = await deployed.check().call(); - assert.ok(check.eq(1)); - - /* test send method */ - const sendTxId = await deployed.setCheck(8).send({}, issuerPk); - while (true) { - const tx = await tronWeb.trx.getTransactionInfo( - sendTxId - ); - if (Object.keys(tx).length === 0) { - await wait(3); - continue; - } else { - break; - } - } - let check1 = await deployed.check().call(); - assert.ok(check1.eq(8)); - - /* test triggersmartcontract */ - const setTransaction = await tronWeb.transactionBuilder.triggerSmartContract( - transaction.contract_address, - "setCheck(uint256)", - { - funcABIV2: funcABIV2.abi[2], - parametersV2: [ - 16 - ] - }, - [], - issuerAddress - ); - await broadcaster(null, issuerPk, setTransaction.transaction); - - check = await deployed.check().call(); - assert.ok(check.eq(16)); - - const setTransaction2 = await tronWeb.transactionBuilder.triggerSmartContract( - transaction.contract_address, - "setCheck(uint256)", - { - funcABIV2: funcABIV2.abi[2], - parametersV2: [ - 15 - ], - txLocal: true, - }, - [], - issuerAddress - ); - await broadcaster(null, issuerPk, setTransaction2.transaction); - - check = await deployed.check().call(); - assert.ok(check.eq(15)); - }); - }); - - describe("#triggerSmartContractWithFuncABIV2 (V2 input)", async function () { - - it('should create or trigger a smart contract with funcABIV2 (V2 input)', async function () { - let coder = tronWeb.utils.abi; - const issuerAddress = accounts.hex[0]; - const issuerPk = accounts.pks[0]; - const abi = JSON.parse(funcABIV2_2.interface); - const bytecode = funcABIV2_2.bytecode; - const outputValues = getValues(JSON.parse(funcABIV2_2.values)) - const transaction = await tronWeb.transactionBuilder.createSmartContract( - { - abi, - bytecode, - }, - issuerAddress - ); - await broadcaster(null, issuerPk, transaction); - while (true) { - const tx = await tronWeb.trx.getTransactionInfo( - transaction.txID - ); - if (Object.keys(tx).length === 0) { - await wait(3); - continue; - } else { - break; - } - } - - const deployed = await tronWeb - .contract(abi, transaction.contract_address) - let check = await deployed.test().call(); - - assert.ok(equals(check[0], outputValues[0])); - }); - - it('should create or trigger a smart contract with funcABIV2 (V2 input test send )', async function () { - const issuerAddress = accounts.hex[0]; - const issuerPk = accounts.pks[0]; - - const transaction = await tronWeb.transactionBuilder.createSmartContract( - { - abi: funcABIV2_3.abi, - bytecode: funcABIV2_3.bytecode, - }, - issuerAddress - ); - await broadcaster(null, issuerPk, transaction); - while (true) { - const tx = await tronWeb.trx.getTransactionInfo( - transaction.txID - ); - if (Object.keys(tx).length === 0) { - await wait(3); - continue; - } else { - break; - } - } - - const deployed = await tronWeb - .contract(funcABIV2_3.abi, transaction.contract_address) - let txID = await deployed.setStruct(['TPL66VK2gCXNCD7EJg9pgJRfqcRazjhUZY','TPL66VK2gCXNCD7EJg9pgJRfqcRazjhUZY','TPL66VK2gCXNCD7EJg9pgJRfqcRazjhUZY']).send(); - while (true) { - const tx = await tronWeb.trx.getTransactionInfo(txID); - if (Object.keys(tx).length === 0) { - await wait(3); - continue; - } else { - break; - } - } - - let check = await deployed.s(0).call(); - assert.ok(equals(check, ['TPL66VK2gCXNCD7EJg9pgJRfqcRazjhUZY','TPL66VK2gCXNCD7EJg9pgJRfqcRazjhUZY','TPL66VK2gCXNCD7EJg9pgJRfqcRazjhUZY'])); - }); - - it('should create or trigger a smart contract with funcABIV2 (V2 input trcToken )', async function () { - const issuerAddress = accounts.hex[0]; - const issuerPk = accounts.pks[0]; - - const transaction = await tronWeb.transactionBuilder.createSmartContract( - { - abi: funcABIV2_4.abi, - bytecode: funcABIV2_4.bytecode, - }, - issuerAddress - ); - await broadcaster(null, issuerPk, transaction); - while (true) { - const tx = await tronWeb.trx.getTransactionInfo( - transaction.txID - ); - if (Object.keys(tx).length === 0) { - await wait(3); - continue; - } else { - break; - } - } - - const deployed = await tronWeb - .contract(funcABIV2_4.abi, transaction.contract_address); - let txID = await deployed.setStruct(['TPL66VK2gCXNCD7EJg9pgJRfqcRazjhUZY', 1000100, 'TPL66VK2gCXNCD7EJg9pgJRfqcRazjhUZY']).send(); - while (true) { - const tx = await tronWeb.trx.getTransactionInfo(txID); - if (Object.keys(tx).length === 0) { - await wait(3); - continue; - } else { - break; - } - } - - let check = await deployed.s(0).call(); - assert.ok(equals(check, ['TPL66VK2gCXNCD7EJg9pgJRfqcRazjhUZY', 1000100, 'TPL66VK2gCXNCD7EJg9pgJRfqcRazjhUZY'])); - }); - }); - - describe("#estimateEnergy", async function () { - - let transaction; - before(async function () { - this.timeout(20000); - transaction = await tronWeb.transactionBuilder.createSmartContract({ - abi: testSetVal.abi, - bytecode: testSetVal.bytecode - }, accounts.hex[5]); - await broadcaster(null, accounts.pks[5], transaction); - while (true) { - const tx = await tronWeb.trx.getTransactionInfo(transaction.txID); - if (Object.keys(tx).length === 0) { - await wait(3); - continue; - } else { - break; - } - } - }) - - it('should estimate energy successfully', async function () { - this.timeout(20000); - const contractAddress = transaction.contract_address; - const issuerAddress = accounts.hex[5]; - const functionSelector = 'set(uint256)'; - const parameter = [ - {type: 'uint256', value: 1} - ] - const options = {estimateEnery: true}; - - for (let i = 0; i < 2; i++) { - if (i === 1) options.permissionId = 2; - const result = await tronWeb.transactionBuilder.estimateEnergy(contractAddress, functionSelector, options, - parameter, issuerAddress); - assert.isTrue(result.result.result); - assert.isDefined(result.energy_required); - assert.isNumber(result.energy_required); - } - }); - - it('should estimate confirmed energy successfully', async function () { - this.timeout(20000); - const contractAddress = transaction.contract_address; - const issuerAddress = accounts.hex[5]; - const functionSelector = 'set(uint256)'; - const parameter = [ - {type: 'uint256', value: 2} - ] - const options = {estimateEnery: true, confirmed: true}; - - for (let i = 0; i < 2; i++) { - if (i === 1) options.permissionId = 2; - const result = await tronWeb.transactionBuilder.estimateEnergy(contractAddress, functionSelector, options, - parameter, issuerAddress); - assert.isTrue(result.result.result); - assert.isDefined(result.energy_required); - assert.isNumber(result.energy_required); - } - }); - }); -}); diff --git a/test/lib/trx.test.js b/test/lib/trx.test.js deleted file mode 100644 index 9a8ba8ce..00000000 --- a/test/lib/trx.test.js +++ /dev/null @@ -1,2264 +0,0 @@ -const chai = require('chai'); -const assert = chai.assert; -const txPars = require('../helpers/txPars'); -const jlog = require('../helpers/jlog'); -const assertThrow = require('../helpers/assertThrow'); -const wait = require('../helpers/wait'); -const broadcaster = require('../helpers/broadcaster'); -const pollAccountFor = require('../helpers/pollAccountFor'); -const _ = require('lodash'); -const tronWebBuilder = require('../helpers/tronWebBuilder'); -const assertEqualHex = require('../helpers/assertEqualHex'); -const TronWeb = tronWebBuilder.TronWeb; -const waitChainData = require('../helpers/waitChainData'); -const tests = require('../testcases/src/sign-message').tests; -const { - ADDRESS_BASE58, - PRIVATE_KEY, - getTokenOptions, - SIGNED_HEX_TRANSACTION, - FULL_NODE_API -} = require('../helpers/config'); -const testRevertContract = require('../fixtures/contracts').testRevert; - -describe('TronWeb.trx', function () { - - let accounts; - let tronWeb; - let emptyAccount; - - before(async function () { - tronWeb = tronWebBuilder.createInstance(); - // ALERT this works only with Tron Quickstart: - accounts = await tronWebBuilder.getTestAccounts(-1); - emptyAccount = await TronWeb.createAccount(); - }); - - - // Contrstuctor Test - describe('#constructor()', function () { - - it('should have been set a full instance in tronWeb', function () { - assert.instanceOf(tronWeb.trx, TronWeb.Trx); - }); - - }); - - - // Account Test - describe('#Account Test', function () { - - describe("#getAccount", async function () { - - const idx = 10; - - it('should get account by hex or base58 address', async function () { - const addressType = ['hex', 'b58']; - let account; - for (let type of addressType) { - account = await tronWeb.trx.getAccount(accounts[type][idx]); - assert.equal(account.address, accounts.hex[idx]); - } - }); - - it('should throw address is not valid error', async function () { - await assertThrow( - tronWeb.trx.getAccount('notAnAddress'), - 'Invalid address provided' - ); - }); - - }); - - - describe("#getAccountById", async function () { - - const idx = 11; - let accountId; - - before(async function(){ - this.timeout(10000); - accountId = TronWeb.toHex(`testtest${Math.ceil(Math.random()*100)}`); - const transaction = await tronWeb.transactionBuilder.setAccountId(accountId, accounts.hex[idx]); - await broadcaster(null, accounts.pks[idx], transaction); - }); - - it('should get confirmed account by id', async function () { - this.timeout(20000); - while (true) { - const account = await tronWeb.trx.getAccountById(accountId); - if (Object.keys(account).length === 0) { - await wait(3); - continue; - } else { - assert.equal(account.account_id, accountId.slice(2)); - break; - } - } - }); - - it('should throw accountId is not valid error', async function () { - const ids = ['', '12', '616161616262626231313131313131313131313131313131313131313131313131313131313131']; - for (let id of ids) { - await assertThrow( - tronWeb.trx.getAccountById(id), - 'Invalid accountId provided' - ); - } - }); - - }); - - - describe("#getAccountResources", async function () { - - const idx = 10; - - it('should get account resource by hex or base58 address', async function () { - const addressType = ['hex', 'b58']; - let accountResource; - for (let type of addressType) { - accountResource = await tronWeb.trx.getAccountResources(accounts[type][idx]); - assert.isDefined(accountResource.freeNetLimit); - assert.isDefined(accountResource.TotalEnergyLimit); - } - }); - - it('should throw address is not valid error', async function () { - await assertThrow( - tronWeb.trx.getAccountResources('notAnAddress'), - 'Invalid address provided' - ); - }); - - }); - - describe("#getDelegatedResourceV2", async function () { - - const idx = 10; - - before(async function(){ - const transaction2 = await tronWeb.transactionBuilder.freezeBalanceV2(100e6, 'BANDWIDTH', accounts.hex[idx]); - await broadcaster(null, accounts.pks[idx], transaction2); - const transaction = await tronWeb.transactionBuilder.delegateResource(10e6, accounts.hex[idx + 1], 'BANDWIDTH', accounts.hex[idx]); - await broadcaster(null, accounts.pks[idx], transaction); - await wait(10); - }); - - it('should get the resource delegation information', async function () { - const addressType = ['hex', 'b58']; - let delegationInfo; - for (let type of addressType) { - delegationInfo = await tronWeb.trx.getDelegatedResourceV2(accounts[type][idx], accounts[type][idx + 1]); - assert.isDefined(delegationInfo.delegatedResource); - } - }); - - it('should get the resource delegation information when confirmed is true', async function () { - const delegationInfo = await tronWeb.trx.getDelegatedResourceV2(accounts['hex'][idx], accounts['hex'][idx + 1], { confirmed: true }); - assert.isDefined(delegationInfo.delegatedResource); - }); - - it('should get the resource delegation information when confirmed is false', async function () { - const delegationInfo = await tronWeb.trx.getDelegatedResourceV2(accounts['hex'][idx], accounts['hex'][idx + 1], { confirmed: false }); - assert.isDefined(delegationInfo.delegatedResource); - }); - - it('should not throw error when fromAddress and toAddress are omitted', async function () { - const delegationInfo = await tronWeb.trx.getDelegatedResourceV2(); - }); - - it('should not throw error when toAddress is omitted', async function () { - const delegationInfo = await tronWeb.trx.getDelegatedResourceV2(accounts['hex'][idx]); - }); - - it('should not throw error when options is omitted', function (done) { - tronWeb.trx.getDelegatedResourceV2(accounts['hex'][idx], accounts['hex'][idx + 1], done); - }); - - it('should throw origin address is not valid error', async function () { - await assertThrow( - tronWeb.trx.getDelegatedResourceV2('notAnAddress'), - 'Invalid address provided' - ); - }); - - it('should throw receiver address is not valid error', async function () { - await assertThrow( - tronWeb.trx.getDelegatedResourceV2(accounts.hex[idx], 'notAnAddress'), - 'Invalid address provided' - ); - }); - - }); - - describe("#getDelegatedResourceAccountIndexV2", async function () { - - const idx = 10; - - before(async function(){ - const transaction2 = await tronWeb.transactionBuilder.freezeBalanceV2(100e6, 'BANDWIDTH'); - await broadcaster(null, PRIVATE_KEY, transaction2); - const transaction = await tronWeb.transactionBuilder.delegateResource(10e6, accounts.hex[idx], 'BANDWIDTH', tronWeb.defaultAddress.hex); - await broadcaster(null, PRIVATE_KEY, transaction); - await wait(10); // wait for solidity - }); - - it('should get the resource delegation account information', async function () { - const addressType = ['hex', 'b58']; - let delegationInfo; - for (let type of addressType) { - delegationInfo = await tronWeb.trx.getDelegatedResourceAccountIndexV2(accounts[type][idx]); - assert.isDefined(delegationInfo.account); - assert.isArray(delegationInfo.toAccounts); - } - }); - - it('should get the resource delegation account information when options is omitted', function (done) { - tronWeb.trx.getDelegatedResourceAccountIndexV2(accounts.hex[idx], (err, delegationInfo) => { - if (err) return done(err); - assert.isDefined(delegationInfo.account); - assert.isArray(delegationInfo.toAccounts); - done(); - }); - }); - - it('should get the resource delegation account information when confirmed is true', async function () { - const delegationInfo = await tronWeb.trx.getDelegatedResourceAccountIndexV2(accounts['hex'][idx], { confirmed: true }); - assert.isDefined(delegationInfo.account); - assert.isArray(delegationInfo.toAccounts); - }); - - it('should get the resource delegation account information when confirmed is false', async function () { - const delegationInfo = await tronWeb.trx.getDelegatedResourceAccountIndexV2(accounts['hex'][idx], { confirmed: false }); - assert.isDefined(delegationInfo.account); - assert.isArray(delegationInfo.toAccounts); - }); - - it('should get the resource delegation account information when origin address is omitted', async function () { - const delegationInfo = await tronWeb.trx.getDelegatedResourceAccountIndexV2(); - assert.isDefined(delegationInfo.account); - assert.isArray(delegationInfo.toAccounts); - }); - - it('should throw address is not valid error', async function () { - await assertThrow( - tronWeb.trx.getDelegatedResourceAccountIndexV2('notAnAddress'), - 'Invalid address provided' - ); - }); - - }); - - describe("#getCanDelegatedMaxSize", async function () { - - const idx = 10; - - before(async function(){ - const transaction2 = await tronWeb.transactionBuilder.freezeBalanceV2(10e6, 'ENERGY', accounts.hex[idx]); - await broadcaster(null, accounts.pks[idx], transaction2); - await wait(60); // wait for solidity - }); - - it('should get the max resource can delegate', async function () { - const addressType = ['hex', 'b58']; - for (let type of addressType) { - const { max_size } = await tronWeb.trx.getCanDelegatedMaxSize(accounts[type][idx], 'ENERGY'); - assert.isNumber(max_size); - } - }); - - it('should get the max resource can delegate when options is omitted', function (done) { - tronWeb.trx.getCanDelegatedMaxSize(accounts.hex[idx], 'ENERGY', (err, { max_size }) => { - if (err) return done(err); - assert.isNumber(max_size); - done(); - }); - }); - - it('should get the max resource can delegate when confirmed is true', async function () { - const { max_size } = await tronWeb.trx.getCanDelegatedMaxSize(accounts['hex'][idx], 'ENERGY', { confirmed: true }); - assert.isNumber(max_size); - }); - - it('should get the max resource can delegate when confirmed is false', async function () { - const { max_size } = await tronWeb.trx.getCanDelegatedMaxSize(accounts['hex'][idx], 'ENERGY', { confirmed: false }); - assert.isNumber(max_size); - }); - - it('should get the max resource can delegate when resource type is omitted', async function () { - const { max_size } = await tronWeb.trx.getCanDelegatedMaxSize(accounts['hex'][idx]); - assert.isNumber(max_size); - }); - - it('should get the max resource can delegate when address and resource type are omitted', async function () { - const { max_size } = await tronWeb.trx.getCanDelegatedMaxSize(); - assert.isNumber(max_size); - }); - - it('should throw address is not valid error', async function () { - await assertThrow( - tronWeb.trx.getCanDelegatedMaxSize('notAnAddress'), - 'Invalid address provided' - ); - }); - - it('should throw resource type is not valid error', async function () { - await assertThrow( - tronWeb.trx.getCanDelegatedMaxSize(accounts.hex[idx], 2), - 'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"' - ); - }); - }); - - describe("#getAvailableUnfreezeCount", async function () { - - const idx = 10; - - it('should get the times user can do UnFreezeBalanceV2', async function () { - const addressType = ['hex', 'b58']; - for (let type of addressType) { - const { count } = await tronWeb.trx.getAvailableUnfreezeCount(accounts[type][idx]); - assert.isNumber(count); - } - }); - - it('should get the times user can do UnFreezeBalanceV2 when options is omitted', function (done) { - tronWeb.trx.getAvailableUnfreezeCount(accounts.hex[idx], (err, { count }) => { - if (err) return done(err); - assert.isNumber(count); - done(); - }); - }); - - it('should get the times user can do UnFreezeBalanceV2 when confirmed is true', async function () { - const { count } = await tronWeb.trx.getAvailableUnfreezeCount(accounts['hex'][idx], { confirmed: true }); - assert.isNumber(count); - }); - - it('should get the times user can do UnFreezeBalanceV2 when confirmed is false', async function () { - const { count } = await tronWeb.trx.getAvailableUnfreezeCount(accounts['hex'][idx], { confirmed: false }); - assert.isNumber(count); - }); - - it('should get the times user can do UnFreezeBalanceV2 when address is omitted', async function () { - const { count } = await tronWeb.trx.getAvailableUnfreezeCount(); - assert.isNumber(count); - }); - - it('should throw address is not valid error', async function () { - await assertThrow( - tronWeb.trx.getAvailableUnfreezeCount('notAnAddress'), - 'Invalid address provided' - ); - }); - - }); - - describe("#getCanWithdrawUnfreezeAmount", async function () { - - const idx = 11; - - before(async function(){ - const transaction2 = await tronWeb.transactionBuilder.freezeBalanceV2(100e6, 'ENERGY', accounts.hex[idx]); - await broadcaster(null, accounts.pks[idx], transaction2); - const transaction = await tronWeb.transactionBuilder.unfreezeBalanceV2(10e6, 'ENERGY', accounts.hex[idx], accounts.hex[idx + 1]); - await broadcaster(null, accounts.pks[idx], transaction); - - const transaction3 = await tronWeb.transactionBuilder.freezeBalanceV2(100e6, 'ENERGY'); - await broadcaster(null, PRIVATE_KEY, transaction3); - const transaction4 = await tronWeb.transactionBuilder.unfreezeBalanceV2(10e6, 'ENERGY', tronWeb.defaultAddress.hex, accounts.hex[idx + 1]); - await broadcaster(null, PRIVATE_KEY, transaction4); - await wait(65); - }); - - it('should get the amount of a widrawUnfreeze operation', async function () { - const addressType = ['hex', 'b58']; - for (let type of addressType) { - const { amount } = await tronWeb.trx.getCanWithdrawUnfreezeAmount(accounts[type][idx], Date.now()); - assert.isNumber(amount); - } - }); - - it('should get the amount of a widrawUnfreeze operation when options is omitted', function (done) { - tronWeb.trx.getCanWithdrawUnfreezeAmount(accounts.hex[idx], Date.now(), (err, { amount }) => { - if (err) return done(err); - assert.isNumber(amount); - done(); - }); - }); - - it('should get the amount of a widrawUnfreeze operation when confirmed is true', async function () { - const { amount } = await tronWeb.trx.getCanWithdrawUnfreezeAmount(accounts['hex'][idx], Date.now(), { confirmed: true }); - assert.isNumber(amount); - }); - - it('should get the amount of a widrawUnfreeze operation when confirmed is false', async function () { - const { amount } = await tronWeb.trx.getCanWithdrawUnfreezeAmount(accounts['hex'][idx], Date.now(), { confirmed: false }); - assert.isNumber(amount); - }); - - it('should get the amount of a widrawUnfreeze operation when address and timestamp are omitted', async function () { - const { amount } = await tronWeb.trx.getCanWithdrawUnfreezeAmount(); - assert.isNumber(amount); - }); - - it('should throw address is not valid error', async function () { - await assertThrow( - tronWeb.trx.getCanWithdrawUnfreezeAmount('notAnAddress', Date.now()), - 'Invalid address provided' - ); - }); - - it('should throw timestamp is not valid error', async function () { - await assertThrow( - tronWeb.trx.getCanWithdrawUnfreezeAmount(accounts.hex[idx], -1), - 'Invalid timestamp provided' - ); - }); - - }); - - describe("#getBalance", async function () { - - const idx = 10; - - it('should get balance by hex or base58 address', async function () { - const addressType = ['hex', 'b58']; - let balance; - for (let type of addressType) { - balance = await tronWeb.trx.getBalance(accounts[type][idx]); - assert.isTrue(balance >= 0); - } - }); - - }); - - - describe("#getBandwidth", async function () { - - const idx = 10; - - it('should get bandwith by hex or base58 address', async function () { - const addressType = ['hex', 'b58']; - let bp; - for (let type of addressType) { - bp = await tronWeb.trx.getBandwidth(accounts[type][idx]); - assert.isTrue(bp >= 0); - } - }); - - }); - - - describe("#getUnconfirmedAccount", async function () { - - const idx = 11; - let toHex; - - before(async function(){ - this.timeout(10000); - - const account = await tronWeb.createAccount(); - toHex = account.address.hex; - const transaction = await tronWeb.transactionBuilder.sendTrx(account.address.hex, 10e5, accounts.hex[idx]); - await broadcaster(null, accounts.pks[idx], transaction); - await waitChainData('account', account.address.hex); - }); - - it('should get unconfirmed account by address', async function () { - const account = await tronWeb.trx.getUnconfirmedAccount(toHex); - assert.equal(account.address, toHex.toLowerCase()); - }); - - it('should throw address is not valid error', async function () { - await assertThrow( - tronWeb.trx.getUnconfirmedAccount('notAnAddress'), - 'Invalid address provided' - ); - }); - - }); - - - describe("#geUnconfirmedAccountById", async function () { - - const idx = 10; - - let accountId; - - before(async function(){ - this.timeout(10000); - accountId = TronWeb.toHex(`testtest${Math.ceil(Math.random()*100)}`); - const transaction = await tronWeb.transactionBuilder.setAccountId(accountId, accounts.hex[idx]); - await broadcaster(null, accounts.pks[idx], transaction); - await waitChainData('accountById', accountId); - }); - - it('should get unconfirmed account by id', async function () { - - const account = await tronWeb.trx.getUnconfirmedAccountById(accountId); - assert.equal(account.account_id, accountId.slice(2)); - }); - - it('should throw accountId is not valid error', async function () { - const ids = ['', '12', '616161616262626231313131313131313131313131313131313131313131313131313131313131']; - for (let id of ids) { - await assertThrow( - tronWeb.trx.getUnconfirmedAccountById(id), - 'Invalid accountId provided' - ); - } - }); - - }); - - - describe("#getUnconfirmedBalance", async function () { - - const idx = 12; - let toHex; - - before(async function(){ - this.timeout(10000); - - const account = await tronWeb.createAccount(); - toHex = account.address.hex; - const transaction = await tronWeb.transactionBuilder.sendTrx(account.address.hex, 10e5, accounts.hex[idx]); - await broadcaster(null, accounts.pks[idx], transaction); - await waitChainData('account', account.address.hex); - }); - - it('should get unconfirmed balance by account address', async function () { - const balance = await tronWeb.trx.getUnconfirmedBalance(toHex); - assert.equal(balance, 10e5); - }); - - }); - - - describe("#updateAccount", async function () { - - const idx = 13; - - it('should update account name', async function () { - const accountName = Math.random().toString(36).substr(2); - await tronWeb.trx.updateAccount(accountName, { privateKey: accounts.pks[idx], address: accounts.hex[idx] }); - const account = await tronWeb.trx.getUnconfirmedAccount(accounts.hex[idx]); - assert.equal(tronWeb.toUtf8(account.account_name), accountName); - }); - - it('should throw name must be a string error', async function () { - await assertThrow( - tronWeb.trx.updateAccount({}), - 'Name must be a string' - ); - }); - - }); - - }); - - - // Signature Test - describe('#Sign Test', function () { - - describe("#sign", async function () { - - const idx = 14; - let transaction; - - beforeEach(async function() { - transaction = await tronWeb.transactionBuilder.freezeBalance(10e5, 3, 'BANDWIDTH', accounts.b58[idx]); - }); - - it('should sign a transaction', async function () { - const signedTransaction = await tronWeb.trx.sign(transaction, accounts.pks[idx]); - assert.equal(signedTransaction.txID, transaction.txID); - assert.equal(signedTransaction.signature.length, 1); - }); - - it('should throw transaction not valid error', async function () { - await assertThrow( - tronWeb.trx.sign(undefined, accounts.pks[idx]), - 'Invalid transaction provided' - ); - }); - - it('should throw transaction is already signed error', async function () { - const signedTransaction = await tronWeb.trx.sign(transaction, accounts.pks[idx]); - await assertThrow( - tronWeb.trx.sign(signedTransaction, accounts.pks[idx]), - 'Transaction is already signed' - ); - }); - - it('should throw private key does not match address error', async function () { - await assertThrow( - tronWeb.trx.sign(transaction, accounts.pks[idx]), - 'Private key does not match address in transaction' - ); - }); - - it('should throw Invalid transaction', async function () { - transaction.raw_data_hex += '00'; - await assertThrow( - tronWeb.trx.sign(transaction, accounts.pks[idx]), - 'Invalid transaction' - ); - }); - }); - - - describe("#signMessage", async function () { - - const idx = 14; - - it('should sign a hex string message', async function () { - const hexMsg = '0xe66f4c8f323229131006ad3e4a2ca65dfdf339f0'; - const signedMsg = await tronWeb.trx.sign(hexMsg, accounts.pks[idx]); - assert.isTrue(signedMsg.startsWith('0x')); - }); - - it('should throw expected hex message input error', async function () { - const hexMsg = 'e66f4c8f323229131006ad3e4a2ca65dfdf339f0'; - await assertThrow( - tronWeb.trx.sign(hexMsg, accounts.pks[idx]), - 'Private key does not match address in transaction' - ); - }); - - }); - - - describe("#verifyMessage", async function () { - - const idx = 14; - let hexMsg; - let signedMsg; - - before(async function() { - hexMsg = '0xe66f4c8f323229131006ad3e4a2ca65dfdf339f0'; - signedMsg = await tronWeb.trx.sign(hexMsg, accounts.pks[idx], null, false); - }); - - it('should verify signature of signed string message', async function () { - const result = await tronWeb.trx.verifyMessage(hexMsg, signedMsg, accounts.hex[idx], null); - assert.isTrue(result); - }); - - it('should throw expected hex message input error', async function () { - await assertThrow( - tronWeb.trx.verifyMessage('e66f4c8f323229131006ad3e4a2ca65dfdf339f0', signedMsg, accounts.hex[idx], null), - 'Expected hex message input' - ); - }); - - it('should throw signature does not match error', async function () { - const fakeSig = '0xafd220c015fd38ffcd34455ddf4f11d20549d9565f558dd84b508c37854727887879d62e675a285c0caf' + - 'a34ea7814b0ae5b74835bdfb612205deb8b97d7c24811c'; - await assertThrow( - tronWeb.trx.verifyMessage(hexMsg, fakeSig, accounts.hex[idx], null), - 'Signature does not match' - ); - }); - }); - - - describe("#signTypedData", async function () { - - // All properties on a domain are optional - const domain = { - name: 'TrcToken Test', - version: '1', - chainId: '0xd698d4192c56cb6be724a558448e2684802de4d6cd8690dc', - verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', - }; - - // The named list of all type definitions - const types = { - FromPerson: [ - { name: 'name', type: 'string' }, - { name: 'wallet', type: 'address' }, - { name: 'trcTokenId', type: 'trcToken' }, - ], - ToPerson: [ - { name: 'name', type: 'string' }, - { name: 'wallet', type: 'address' }, - { name: 'trcTokenArr', type: 'trcToken[]' }, - ], - Mail: [ - { name: 'from', type: 'FromPerson' }, - { name: 'to', type: 'ToPerson' }, - { name: 'contents', type: 'string' }, - { name: 'tAddr', type: 'address[]' }, - { name: 'trcTokenId', type: 'trcToken' }, - { name: 'trcTokenArr', type: 'trcToken[]' }, - ], - }; - - // The data to sign - const value = { - from: { - name: 'Cow', - wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', - trcTokenId: '1002000', - }, - to: { - name: 'Bob', - wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', - trcTokenArr: ['1002000', '1002000'], - }, - contents: 'Hello, Bob!', - tAddr: ['0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB'], - trcTokenId: '1002000', - trcTokenArr: ['1002000', '1002000'], - }; - - it('should sign typed data', async function () { - const signature = await tronWeb.trx._signTypedData(domain, types, value); - const result = await tronWeb.trx.verifyTypedData(domain, types, value, signature); - - // assert.equal(signature, '0xb98a61f301a383be6b078fa602ebdd76294302e6bab51cd4bcb3e4f241e7cae662ac21b2e95d8db637fa5db9dd38f2e7d1236e8f2ed3ee1d0e80bac641578f191c'); - assert.isTrue(result); - - tronWeb.trx._signTypedData(domain, types, value, (err, signature) => { - tronWeb.trx.verifyTypedData(domain, types, value, signature, (err, result) => { - assert.isTrue(signature.startsWith('0x')); - assert.isTrue(result); - } - ); - }); - }); - - it('should sign typed data with private key', function () { - const idx = 14; - - const signature = TronWeb.Trx._signTypedData(domain, types, value, accounts.pks[idx]); - - const tDomain = { - ...domain, - verifyingContract: 'TUe6BwpA7sVTDKaJQoia7FWZpC9sK8WM2t', - }; - const tValue = { - ...value, - from: { - ...value.from, - wallet: 'TUg28KYvCXWW81EqMUeZvCZmZw2BChk1HQ', - }, - to: { - ...value.to, - wallet: 'TT5rFsXYCrnzdE2q1WdR9F2SuVY59A4hoM', - }, - tAddr: [ - 'TT5rFsXYCrnzdE2q1WdR9F2SuVY59A4hoM', - 'TT5rFsXYCrnzdE2q1WdR9F2SuVY59A4hoM', - ], - }; - const tSignature = TronWeb.Trx._signTypedData( - tDomain, - types, - tValue, - accounts.pks[idx] - ); - - const result = TronWeb.Trx.verifyTypedData(domain, types, value, signature, accounts.b58[idx]); - - assert.isTrue(signature.startsWith('0x')); - assert.equal(tSignature, signature) - assert.isTrue(result); - }); - - it('should throw signature does not match error', function () { - const idx = 14; - - try { - const signature = TronWeb.Trx._signTypedData(domain, types, value, accounts.pks[idx - 1]); - TronWeb.Trx.verifyTypedData(domain, types, value, signature, accounts.b58[idx]); - } catch (error) { - assert.equal(error, 'Signature does not match') - console.log(error) - } - }); - - }); - - - describe("#multiSignTransaction", async function () { - - const ownerIdx = 15; - const idxS = 15; - const idxE = 18; - const threshold = 3; - - before(async function() { - this.timeout(10000); - // update account permission - let ownerAddress = accounts.hex[ownerIdx]; - let ownerPk = accounts.pks[ownerIdx]; - let ownerPermission = { type: 0, permission_name: 'owner' }; - ownerPermission.threshold = threshold; - ownerPermission.keys = []; - let activePermission = { type: 2, permission_name: 'active0' }; - activePermission.threshold = threshold; - activePermission.operations = '7fff1fc0033ec107000000000000000000000000000000000000000000000000'; - activePermission.keys = []; - - for (let i = idxS; i < idxE; i++) { - let address = accounts.hex[i]; - let weight = 1; - ownerPermission.keys.push({ address: address, weight: weight }); - activePermission.keys.push({ address: address, weight: weight }); - } - - const updateTransaction = await tronWeb.transactionBuilder.updateAccountPermissions( - ownerAddress, - ownerPermission, - null, - [activePermission] - ); - assert.isTrue(updateTransaction.txID && updateTransaction.txID.length === 64); - - // broadcast update transaction - const signedUpdateTransaction = await tronWeb.trx.sign(updateTransaction, ownerPk, null, false); - await tronWeb.trx.broadcast(signedUpdateTransaction); - - await wait(3); - }); - - it('should multi-sign a transaction by owner permission', async function () { - - const transaction = await tronWeb.transactionBuilder.freezeBalanceV2(10e5, 'BANDWIDTH', accounts.b58[ownerIdx]); - let signedTransaction = transaction; - for (let i = idxS; i < idxE; i++) { - signedTransaction = await tronWeb.trx.multiSign(signedTransaction, accounts.pks[i], 0); - } - - assert.equal(signedTransaction.signature.length, 3); - - // broadcast multi-sign transaction - const result = await tronWeb.trx.broadcast(signedTransaction); - assert.isTrue(result.result); - await waitChainData('tx', result.transaction.txID); - await wait(10); - - }); - - it('should multi-sign a transaction by owner permission (permission id inside tx)', async function () { - - const transaction = await tronWeb.transactionBuilder.freezeBalanceV2(10e5, 'BANDWIDTH', accounts.b58[ownerIdx], {permissionId: 0}); - let signedTransaction = transaction; - for (let i = idxS; i < idxE; i++) { - signedTransaction = await tronWeb.trx.multiSign(signedTransaction, accounts.pks[i]); - } - - assert.equal(signedTransaction.signature.length, 3); - - // broadcast multi-sign transaction - const result = await tronWeb.trx.broadcast(signedTransaction); - assert.isTrue(result.result); - await waitChainData('tx', result.transaction.txID); - await wait(10); - - }); - - it('should verify weight after multi-sign by owner permission', async function () { - - // create transaction and do multi-sign - const transaction = await tronWeb.transactionBuilder.freezeBalanceV2(10e5, 'BANDWIDTH', accounts.b58[ownerIdx]); - - // sign and verify sign weight - let signedTransaction = transaction; - let signWeight; - for (let i = idxS; i < idxE; i++) { - signedTransaction = await tronWeb.trx.multiSign(signedTransaction, accounts.pks[i], 0); - signWeight = await tronWeb.trx.getSignWeight(signedTransaction); - if (i < idxE - 1) { - assert.equal(signWeight.result.code, 'NOT_ENOUGH_PERMISSION'); - } - assert.equal(signWeight.approved_list.length, i - idxS + 1); - } - - // get approved list - const approvedList = await tronWeb.trx.getApprovedList(signedTransaction); - assert.isTrue(approvedList.approved_list.length === threshold); - - // broadcast multi-sign transaction - const result = await tronWeb.trx.broadcast(signedTransaction); - assert.isTrue(result.result); - await waitChainData('tx', result.transaction.txID); - await wait(10); - - }); - - it('should verify weight after multi-sign by owner permission (permission id inside tx)', async function () { - - // create transaction and do multi-sign - const transaction = await tronWeb.transactionBuilder.freezeBalanceV2(10e5, 'BANDWIDTH', accounts.b58[ownerIdx], {permissionId: 0}); - - // sign and verify sign weight - let signedTransaction = transaction; - let signWeight; - for (let i = idxS; i < idxE; i++) { - signedTransaction = await tronWeb.trx.multiSign(signedTransaction, accounts.pks[i]); - signWeight = await tronWeb.trx.getSignWeight(signedTransaction); - if (i < idxE - 1) { - assert.equal(signWeight.result.code, 'NOT_ENOUGH_PERMISSION'); - } - assert.equal(signWeight.approved_list.length, i - idxS + 1); - } - - // get approved list - const approvedList = await tronWeb.trx.getApprovedList(signedTransaction); - assert.isTrue(approvedList.approved_list.length === threshold); - - // broadcast multi-sign transaction - const result = await tronWeb.trx.broadcast(signedTransaction); - assert.isTrue(result.result); - - }); - - it('should multi-sign a transaction with no permission error by owner permission', async function () { - - const transaction = await tronWeb.transactionBuilder.freezeBalance(10e5, 3, 'BANDWIDTH', accounts.b58[ownerIdx]); - try { - await tronWeb.trx.multiSign(transaction, (accounts.pks[ownerIdx] + '123'), 2); - } catch (e) { - assert.isTrue(e.indexOf('has no permission to sign') != -1); - } - - }); - - it('should multi-sign duplicated a transaction by owner permission', async function () { - - const transaction = await tronWeb.transactionBuilder.freezeBalance(10e5, 3, 'BANDWIDTH', accounts.b58[ownerIdx]); - try { - let signedTransaction = await tronWeb.trx.multiSign(transaction, accounts.pks[ownerIdx], 0); - await tronWeb.trx.multiSign(signedTransaction, accounts.pks[ownerIdx], 0); - } catch (e) { - assert.isTrue(e.indexOf('already sign transaction') != -1); - } - - }); - - it('should multi-sign a transaction by active permission', async function () { - - const transaction = await tronWeb.transactionBuilder.freezeBalanceV2(10e5, 'BANDWIDTH', accounts.b58[ownerIdx]); - let signedTransaction = transaction; - for (let i = idxS; i < idxE; i++) { - signedTransaction = await tronWeb.trx.multiSign(signedTransaction, accounts.pks[i], 2); - } - - assert.equal(signedTransaction.signature.length, 3); - - // broadcast multi-sign transaction - const result = await tronWeb.trx.broadcast(signedTransaction); - assert.isTrue(result.result); - await waitChainData('tx', result.transaction.txID); - await wait(10); - - }); - - it('should multi-sign a transaction by active permission (permission id inside tx)', async function () { - - const transaction = await tronWeb.transactionBuilder.freezeBalanceV2(10e5, 'BANDWIDTH', accounts.b58[ownerIdx], {permissionId: 2}); - let signedTransaction = transaction; - for (let i = idxS; i < idxE; i++) { - signedTransaction = await tronWeb.trx.multiSign(signedTransaction, accounts.pks[i]); - } - - assert.equal(signedTransaction.signature.length, 3); - - // broadcast multi-sign transaction - const result = await tronWeb.trx.broadcast(signedTransaction); - assert.isTrue(result.result); - await waitChainData('tx', result.transaction.txID); - await wait(10); - - }); - - it('should verify weight after multi-sign by active permission', async function () { - - // create transaction and do multi-sign - const transaction = await tronWeb.transactionBuilder.freezeBalanceV2(10e5, 'BANDWIDTH', accounts.b58[ownerIdx]); - - // sign and verify sign weight - let signedTransaction = transaction; - let signWeight; - for (let i = idxS; i < idxE; i++) { - signedTransaction = await tronWeb.trx.multiSign(signedTransaction, accounts.pks[i], 2); - signWeight = await tronWeb.trx.getSignWeight(signedTransaction, 2); - if (i < idxE - 1) { - assert.equal(signWeight.result.code, 'NOT_ENOUGH_PERMISSION'); - } - assert.equal(signWeight.approved_list.length, i - idxS + 1); - } - - // get approved list - const approvedList = await tronWeb.trx.getApprovedList(signedTransaction); - assert.isTrue(approvedList.approved_list.length === threshold); - - // broadcast multi-sign transaction - const result = await tronWeb.trx.broadcast(signedTransaction); - assert.isTrue(result.result); - await waitChainData('tx', result.transaction.txID); - await wait(10); - - }); - - it('should verify weight after multi-sign by active permission (permission id inside tx)', async function () { - - // create transaction and do multi-sign - const transaction = await tronWeb.transactionBuilder.freezeBalanceV2(10e5, 'BANDWIDTH', accounts.b58[ownerIdx], {permissionId: 2}); - - // sign and verify sign weight - let signedTransaction = transaction; - let signWeight; - for (let i = idxS; i < idxE; i++) { - signedTransaction = await tronWeb.trx.multiSign(signedTransaction, accounts.pks[i]); - signWeight = await tronWeb.trx.getSignWeight(signedTransaction); - if (i < idxE - 1) { - assert.equal(signWeight.result.code, 'NOT_ENOUGH_PERMISSION'); - } - assert.equal(signWeight.approved_list.length, i - idxS + 1); - } - - // get approved list - const approvedList = await tronWeb.trx.getApprovedList(signedTransaction); - assert.isTrue(approvedList.approved_list.length === threshold); - - // broadcast multi-sign transaction - const result = await tronWeb.trx.broadcast(signedTransaction); - assert.isTrue(result.result); - - }); - - it('should multi-sign a transaction with no permission error by active permission', async function () { - - const transaction = await tronWeb.transactionBuilder.freezeBalance(10e5, 3, 'BANDWIDTH', accounts.b58[ownerIdx]); - try { - await tronWeb.trx.multiSign(transaction, (accounts.pks[ownerIdx] + '123'), 2); - } catch (e) { - assert.isTrue(e.indexOf('has no permission to sign') != -1); - } - - }); - - it('should multi-sign duplicated a transaction by active permission', async function () { - - const transaction = await tronWeb.transactionBuilder.freezeBalance(10e5, 3, 'BANDWIDTH', accounts.b58[ownerIdx]); - try { - let signedTransaction = await tronWeb.trx.multiSign(transaction, accounts.pks[ownerIdx], 2); - await tronWeb.trx.multiSign(signedTransaction, accounts.pks[ownerIdx], 2); - } catch (e) { - assert.isTrue(e.indexOf('already sign transaction') != -1); - } - - }); - - it('should multi-sign a transaction with permission error by both owner and active permission', async function () { - - try { - const transaction = await tronWeb.transactionBuilder.freezeBalance(10e5, 3, 'BANDWIDTH', accounts.b58[ownerIdx]); - let signedTransaction = await tronWeb.trx.multiSign(transaction, accounts.pks[ownerIdx], 0); - await tronWeb.trx.multiSign(signedTransaction, accounts.pks[ownerIdx], 2); - } catch (e) { - assert.isTrue(e.indexOf('not contained of permission') != -1); - } - - }); - - it('should multi-sign a transaction with wrong permission id error', async function () { - - try { - const transaction = await tronWeb.transactionBuilder.freezeBalance(10e5, 3, 'BANDWIDTH', accounts.b58[ownerIdx]); - await tronWeb.trx.multiSign(transaction, accounts.pks[ownerIdx], 1); - } catch (e) { - assert.isTrue(e.indexOf('permission isn\'t exit') != -1 || e.indexOf('Permission for this, does not exist!') != -1); - } - - }); - - }); - - }); - - - // Block Test - describe('#Block Test', function () { - - describe("#getBlock", async function () { - - it('should get earliest or latest block', async function () { - let earliestParentHash = '957dc2d350daecc7bb6a38f3938ebde0a0c1cedafe15f0edae4256a2907449f6'; - const blockType = ['earliest', 'latest']; - let block; - for (let type of blockType) { - block = await tronWeb.trx.getBlock(type); - if (type === 'earliest') { - assert.equal(earliestParentHash, block.block_header.raw_data.parentHash); - } - if (type === 'latest') { - assert.isNumber(block.block_header.raw_data.number); - } - } - }); - - it('should throw no block identifier provided error', async function () { - await assertThrow( - tronWeb.trx.getBlock(false), - 'No block identifier provided' - ); - }); - - it('should throw block not found error', async function () { - await assertThrow( - tronWeb.trx.getBlock(10e10), - 'Block not found' - ); - }); - - it('should throw invalid block number provided error', async function () { - await assertThrow( - tronWeb.trx.getBlock(-1), - 'Invalid block number provided' - ); - }); - - }); - - - describe("#getBlockByHash", async function () { - - it('should get block by block hash (id)', async function () { - const block = await tronWeb.trx.getBlock('latest'); - const blockByHash = await tronWeb.trx.getBlockByHash(block.blockID); - assert.equal(block.blockID, blockByHash.blockID); - }); - - }); - - - describe("#getBlockByNumber", async function () { - - it('should get block by block number', async function () { - const block = await tronWeb.trx.getBlock('latest'); - const blockByNumber = await tronWeb.trx.getBlockByNumber(block.block_header.raw_data.number); - assert.equal(block.blockID, blockByNumber.blockID); - }); - - }); - - - describe("#getBlockRange", async function () { - - it('should get block by range', async function () { - const blocks = await tronWeb.trx.getBlockRange(0, 5); - assert.equal(blocks.length, 6); - }); - - it('should get invalid start or end error by range', async function () { - const ranges = [[-1, 5, 'start'], [1, -5, 'end']]; - for (let range of ranges) { - await assertThrow( - tronWeb.trx.getBlockRange(range[0], range[1]), - `Invalid ${range[2]} of range provided` - ); - } - }); - - }); - - - describe("#getBlockTransactionCount", async function () { - - it('should get transaction count by block number, \'latest\' or \'earliest\'', async function () { - const blockType = [1, 'latest', 'earliest']; - for (let type of blockType) { - const count = await tronWeb.trx.getBlockTransactionCount(type); - assert.isNumber(count); - } - }); - - }); - - - describe("#getCurrentBlock", async function () { - - it('should get current block', async function () { - const block = await tronWeb.trx.getCurrentBlock(); - assert.isNumber(block.block_header.raw_data.number); - }); - - }); - - }); - - - // Transaction Test - describe('#Transaction Test', function () { - - describe("#send", async function () { - - const fromIdx = 19; - const toIdx = 20; - - it('should send trx', async function () { - this.timeout(10000); - - const balanceBefore = await tronWeb.trx.getUnconfirmedBalance(accounts.hex[toIdx]); - await tronWeb.trx.send(accounts.hex[toIdx], 10e5, { privateKey: accounts.pks[fromIdx], address: accounts.hex[fromIdx] }); - await waitChainData('balance', accounts.hex[toIdx], balanceBefore); - const balanceAfter = await tronWeb.trx.getUnconfirmedBalance(accounts.hex[toIdx]); - assert.equal(balanceAfter - balanceBefore, 10e5); - }); - - it('should throw invalid recipient provided error', async function () { - await assertThrow( - tronWeb.trx.send('notValidAddress', 10e5, { privateKey: accounts.pks[fromIdx] }), - 'Invalid recipient provided' - ); - }); - - it('should throw invalid amount provided error', async function () { - await assertThrow( - tronWeb.trx.send(accounts.hex[toIdx], -1, { privateKey: accounts.pks[fromIdx] }), - 'Invalid amount provided' - ); - }); - - }); - - - describe("#sendTransaction", async function () { - - const fromIdx = 21; - const toIdx = 22; - - it('should send trx', async function () { - this.timeout(10000); - - const balanceBefore = await tronWeb.trx.getUnconfirmedBalance(accounts.hex[toIdx]); - await tronWeb.trx.sendTransaction(accounts.hex[toIdx], 10e5, { privateKey: accounts.pks[fromIdx] }); - await waitChainData('balance', accounts.hex[toIdx], balanceBefore); - const balanceAfter = await tronWeb.trx.getUnconfirmedBalance(accounts.hex[toIdx]); - assert.equal(balanceAfter - balanceBefore, 10e5); - }); - - it('should throw invalid recipient provided error', async function () { - await assertThrow( - tronWeb.trx.sendTransaction('notValidAddress', 10e5, { privateKey: accounts.pks[fromIdx] }), - 'Invalid recipient provided' - ); - }); - - it('should throw invalid amount provided error', async function () { - await assertThrow( - tronWeb.trx.sendTransaction(accounts.hex[toIdx], -1, { privateKey: accounts.pks[fromIdx] }), - 'Invalid amount provided' - ); - }); - - }); - - - describe("#sendTrx", async function () { - - const fromIdx = 23; - const toIdx = 24; - - it('should send trx', async function () { - this.timeout(10000); - - const balanceBefore = await tronWeb.trx.getUnconfirmedBalance(accounts.hex[toIdx]); - await tronWeb.trx.sendTrx(accounts.hex[toIdx], 10e5, { privateKey: accounts.pks[fromIdx], address: accounts.hex[fromIdx] }); - await waitChainData('balance', accounts.hex[toIdx], balanceBefore); - const balanceAfter = await tronWeb.trx.getUnconfirmedBalance(accounts.hex[toIdx]); - assert.equal(balanceAfter - balanceBefore, 10e5); - }); - - it('should throw invalid recipient provided error', async function () { - await assertThrow( - tronWeb.trx.sendTrx('notValidAddress', 10e5, { privateKey: accounts.pks[fromIdx] }), - 'Invalid recipient provided' - ); - }); - - it('should throw invalid amount provided error', async function () { - await assertThrow( - tronWeb.trx.sendTrx(accounts.hex[18], -1, { privateKey: accounts.pks[fromIdx] }), - 'Invalid amount provided' - ); - }); - - }); - - - describe("#freezeBalance", async function () { - - const idx = 25; - // const receiverIdx = 26; - - it('should freeze balance for energy or bandwidth', async function () { - this.timeout(20000); - - let accountBefore = await tronWeb.trx.getAccount(accounts.hex[idx]); - await tronWeb.trx.freezeBalance(10e5, 3, 'BANDWIDTH', { privateKey: accounts.pks[idx], address: accounts.hex[idx] }); - await waitChainData('freezeBp', accounts.hex[idx], 0); - let accountAfter = await tronWeb.trx.getUnconfirmedAccount(accounts.hex[idx]); - assert.equal((!accountBefore.frozen ? 0: accountBefore.frozen[0].frozen_balance) + 10e5, accountAfter.frozen[0].frozen_balance); - - accountBefore = accountAfter; - await tronWeb.trx.freezeBalance(10e5, 3, 'ENERGY', { privateKey: accounts.pks[idx], address: accounts.hex[idx] }); - await waitChainData('freezeEnergy', accounts.hex[idx], 0); - accountAfter = await tronWeb.trx.getUnconfirmedAccount(accounts.hex[idx]); - assert.equal( - (!accountBefore.account_resource || - !accountBefore.account_resource.frozen_balance_for_energy - ? 0 - : accountBefore.account_resource.frozen_balance_for_energy.frozen_balance) + 10e5, - accountAfter.account_resource.frozen_balance_for_energy.frozen_balance - ); - }); - - it('should throw invalid resource provided: expected "BANDWIDTH" or "ENERGY" error', async function () { - await assertThrow( - tronWeb.trx.freezeBalance(10e8, 3, 'GAS', { privateKey: accounts.pks[idx], address: accounts.hex[idx] }), - 'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"' - ); - }); - - it('should throw invalid amount provided error', async function () { - await assertThrow( - tronWeb.trx.freezeBalance(-10, 3, 'BANDWIDTH', { privateKey: accounts.pks[idx], address: accounts.hex[idx] }), - 'Invalid amount provided' - ); - }); - - it('should throw invalid duration provided, minimum of 3 days error', async function () { - await assertThrow( - tronWeb.trx.freezeBalance(10e8, 2, 'BANDWIDTH', { privateKey: accounts.pks[idx], address: accounts.hex[idx] }), - 'Invalid duration provided, minimum of 3 days' - ); - }); - }); - - - // skip since duration too long - /** - describe.skip("#unfreezeBalance", async function () { - - before(async function(){ - await tronWeb.trx.freezeBalance(10e5, 3, 'BANDWIDTH', {}, accounts.b58[15]); - await tronWeb.trx.freezeBalance(10e5, 3, 'ENERGY', {}, accounts.b58[15]); - }); - - it('should unfreeze balance', async function () { - let accountBefore = await tronWeb.trx.getUnconfirmedAccount(ADDRESS_HEX); - await tronWeb.trx.unfreezeBalance('BANDWIDTH', {}, accounts.b58[15]); - let accountAfter = await tronWeb.trx.getUnconfirmedAccount(ADDRESS_HEX); - assert.equal(accountBefore.frozen[0].frozen_balance - 10e5, accountAfter.frozen[0].frozen_balance); - - accountBefore = accountAfter; - await tronWeb.trx.unfreezeBalance('ENERGY', {}, accounts.b58[15]); - accountAfter = await tronWeb.trx.getUnconfirmedAccount(ADDRESS_HEX); - assert.equal( - accountBefore.account_resource.frozen_balance_for_energy.frozen_balance - 10e5, - accountAfter.account_resource.frozen_balance_for_energy.frozen_balance - ); - }); - - it('should throw invalid resource provided: expected "BANDWIDTH" or "ENERGY" error', async function () { - await assertThrow( - tronWeb.trx.unfreezeBalance(10e8, 3, 'GAS', {}, accounts.b58[15]), - 'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"' - ); - }); - - }); - */ - - describe("#broadcast", async function () { - - const idx = 26; - let transaction; - let signedTransaction; - - before(async function () { - transaction = await tronWeb.transactionBuilder.freezeBalanceV2(10e5, 'BANDWIDTH', accounts.b58[idx]); - signedTransaction = await tronWeb.trx.sign(transaction, accounts.pks[idx]); - }); - - it('should broadcast a transaction', async function () { - this.timeout(20000); - const result = await tronWeb.trx.broadcast(signedTransaction); - assert.isTrue(result.result); - assert.equal(result.transaction.signature[0], signedTransaction.signature[0]); - }); - - it('should throw invalid transaction provided error', async function () { - await assertThrow( - tronWeb.trx.broadcast(false), - 'Invalid transaction provided' - ); - }); - - it('should throw invalid options provided error', async function () { - await assertThrow( - tronWeb.trx.broadcast(signedTransaction, false), - 'Invalid options provided' - ); - }); - - it('should throw transaction is not signed error', async function () { - await assertThrow( - tronWeb.trx.broadcast(transaction), - 'Transaction is not signed' - ); - }); - }); - - describe("#broadcastHex", async function () { - - it('should broadcast a hex transaction', async function () { - const result = await tronWeb.trx.broadcastHex(SIGNED_HEX_TRANSACTION); - assert.isTrue(result.result); - }); - - it('should throw invalid hex transaction provided error', async function () { - await assertThrow( - tronWeb.trx.broadcastHex(false), - 'Invalid hex transaction provided' - ); - }); - - it('should throw invalid options provided error', async function () { - await assertThrow( - tronWeb.trx.broadcastHex(SIGNED_HEX_TRANSACTION, false), - 'Invalid options provided' - ); - }); - }); - - describe("#getTransaction", async function () { - - const idx = 26; - let transaction; - - before(async function(){ - this.timeout(10000); - - transaction = await broadcaster(tronWeb.transactionBuilder.freezeBalanceV2(10e5, 'BANDWIDTH', accounts.hex[idx]), accounts.pks[idx]); - transaction = transaction.transaction; - await waitChainData('tx', transaction.txID); - }); - - it('should get transaction by id', async function () { - const tx = await tronWeb.trx.getTransaction(transaction.txID); - assert.equal(tx.txID, transaction.txID); - }); - - it('should throw transaction not found error', async function () { - await assertThrow( - tronWeb.trx.getTransaction('a8813981b1737d9caf7d51b200760a16c9cdbc826fa8de102386af898048cbe5'), - 'Transaction not found' - ); - }); - - }); - - - describe("#getTransactionFromBlock", async function () { - - const idx = 26; - let transaction; - let currBlockNum; - - before(async function(){ - this.timeout(10000); - // await wait(5); // wait for new clear block generated - transaction = await tronWeb.trx.freezeBalance(10e5, 3, 'BANDWIDTH', { privateKey: accounts.pks[idx], address: accounts.hex[idx] }); - transaction = transaction.transaction; - const currBlock = await tronWeb.trx.getBlock('latest'); - currBlockNum = currBlock.block_header.raw_data.number; - }); - - it('should get transaction from block', async function () { - this.timeout(10000); - for (let i = currBlockNum; i < currBlockNum + 3;) { - try { - const tx = await tronWeb.trx.getTransactionFromBlock(i, 0); - // assert.equal(tx.txID, transaction.txID); - assert.isDefined(tx.txID); - break; - } catch (e) { - if (e === 'Transaction not found in block') { - i++; - continue; - } else if (e === 'Block not found') { - await wait(3); - continue; - } else { - throw new Error(e); - break; - } - } - } - }); - - it('should throw transaction not found error by transaction from block', async function () { - await assertThrow( - tronWeb.trx.getTransactionFromBlock(currBlockNum - 1, 0), - 'Transaction not found in block' - ); - }); - - it('should throw block not found error by transaction from block', async function () { - await assertThrow( - tronWeb.trx.getTransactionFromBlock(currBlockNum + 50, 0), - 'Block not found' - ); - }); - - it('should throw invalid index error by transaction from block', async function () { - await assertThrow( - tronWeb.trx.getTransactionFromBlock(currBlockNum, -1), - 'Transaction not found in block' - ); - }); - - }); - - - describe("#getTransactionInfo (Confirmed)", async function () { - - const idx = 26; - let transaction; - - before(async function(){ - transaction = await broadcaster(tronWeb.transactionBuilder.freezeBalanceV2(10e5, 'BANDWIDTH', accounts.hex[idx]), accounts.pks[idx]); - transaction = transaction.transaction; - }); - - it('should get transaction info by id', async function () { - this.timeout(20000); - while (true) { - const tx = await tronWeb.trx.getTransactionInfo(transaction.txID); - if (Object.keys(tx).length === 0) { - await wait(3); - continue; - } else { - assert.equal(tx.id, transaction.txID); - break; - } - } - }); - - }); - - - describe("#geUnconfirmedTransactionInfo", async function () { - - const idx = 25; - let transaction; - - before(async function(){ - transaction = await broadcaster(tronWeb.transactionBuilder.freezeBalanceV2(10e5, 'BANDWIDTH', accounts.hex[idx]), accounts.pks[idx]); - transaction = transaction.transaction; - await waitChainData('tx', transaction.txID); - }); - - it('should get unconfirmed transaction by id', async function () { - this.timeout(10000) - await wait(3) - const tx = await tronWeb.trx.getUnconfirmedTransactionInfo(transaction.txID); - assert.equal(tx.id, transaction.txID); - }); - - it('should throw transaction not found error', async function () { - await assertThrow( - tronWeb.trx.getUnconfirmedTransactionInfo('a8813981b1737d9caf7d51b200760a16c9cdbc826fa8de102386af898048cbe5'), - 'Transaction not found' - ); - }); - - }); - - - describe("#getConfirmedTransaction", async function () { - - const idx = 26; - let transaction; - - before(async function(){ - transaction = await broadcaster(tronWeb.transactionBuilder.freezeBalanceV2(10e5, 'BANDWIDTH', accounts.hex[idx]), accounts.pks[idx]); - }); - - it('should get confirmed transaction by tx id', async function () { - this.timeout(20000); - while (true) { - try { - const tx = await tronWeb.trx.getConfirmedTransaction(transaction.transaction.txID); - assert.equal(tx.txID, transaction.transaction.txID); - break; - } catch (e) { - if (e === 'Transaction not found') { - await wait(3); - continue; - } else { - throw new Error(e); - break; - } - } - } - }); - - }); - - }); - - - // TRC 10 Token Test - describe('#Token Test', function () { - - describe("#sendAsset", async function () { - - let token; - const fromIdx = 27; - const toIdx = 28; - - before(async function(){ - this.timeout(10000); - - const options = getTokenOptions(); - const transaction = await tronWeb.transactionBuilder.createToken(options, accounts.hex[fromIdx]); - await broadcaster(null, accounts.pks[fromIdx], transaction); - await waitChainData('token', accounts.hex[fromIdx]); - token = await tronWeb.trx.getTokensIssuedByAddress(accounts.hex[fromIdx]); - }); - - it('should send trx by to address and verify account balance', async function () { - this.timeout(20000); - - const assetBefore = (await tronWeb.trx.getUnconfirmedAccount(accounts.hex[toIdx])).assetV2; - await waitChainData('tokenById', token[Object.keys(token)[0]]['id']); - await tronWeb.trx.sendAsset( - accounts.hex[toIdx], - 10e4, - token[Object.keys(token)[0]]['id'], - { privateKey: accounts.pks[fromIdx], address: accounts.hex[fromIdx] } - ); - - await waitChainData('sendToken', accounts.hex[toIdx], !assetBefore ? 0 : assetBefore[0].value); - const assetAfter = (await tronWeb.trx.getUnconfirmedAccount(accounts.hex[toIdx])).assetV2; - assert.equal(!assetBefore ? 0 : assetBefore[0].value, assetAfter[0].value - 10e4); - }); - - it('should throw invalid recipient provided error', async function () { - await assertThrow( - tronWeb.trx.sendAsset( - 'notValidAddress', - 10e4, - token[Object.keys(token)[0]]['id'], - { privateKey: accounts.pks[fromIdx], address: accounts.hex[fromIdx] } - ), - 'Invalid recipient provided' - ); - }); - - it('should throw invalid amount provided error', async function () { - await assertThrow( - tronWeb.trx.sendAsset( - accounts.hex[toIdx], - -10, - token[Object.keys(token)[0]]['id'], - { privateKey: accounts.pks[fromIdx], address: accounts.hex[fromIdx] } - ), - 'Invalid amount provided' - ); - }); - - it('should throw invalid token ID provided error', async function () { - await assertThrow( - tronWeb.trx.sendAsset( - accounts.hex[toIdx], - 10e4, - {}, - { privateKey: accounts.pks[fromIdx], address: accounts.hex[fromIdx] } - ), - 'Invalid token ID provided' - ); - }); - - it('should throw cannot transfer tokens to the same account provided error', async function () { - await assertThrow( - tronWeb.trx.sendAsset( - accounts.hex[fromIdx], - 10e4, - token[Object.keys(token)[0]]['id'], - { privateKey: accounts.pks[fromIdx], address: accounts.hex[fromIdx] } - ), - 'Cannot transfer tokens to the same account' - ); - }); - - }); - - - describe("#sendToken", async function () { - - let token; - const fromIdx = 29; - const toIdx = 30; - - before(async function(){ - this.timeout(10000); - - const options = getTokenOptions(); - const transaction = await tronWeb.transactionBuilder.createToken(options, accounts.hex[fromIdx]); - await broadcaster(null, accounts.pks[fromIdx], transaction); - await waitChainData('token', accounts.hex[fromIdx]); - token = await tronWeb.trx.getTokensIssuedByAddress(accounts.hex[fromIdx]); - }); - - it('should send trx by to address and verify account balance', async function () { - this.timeout(10000); - - const assetBefore = (await tronWeb.trx.getUnconfirmedAccount(accounts.hex[toIdx])).assetV2; - // transfer from account 10 to 11 - await tronWeb.trx.sendToken( - accounts.hex[toIdx], - 10e4, - token[Object.keys(token)[0]]['id'], - { privateKey: accounts.pks[fromIdx], address: accounts.hex[fromIdx] } - ); - await waitChainData('sendToken', accounts.hex[toIdx], !assetBefore ? 0 : assetBefore[0].value); - const assetAfter = (await tronWeb.trx.getUnconfirmedAccount(accounts.hex[toIdx])).assetV2; - - assert.equal(!assetBefore ? 0 : assetBefore[0].value, assetAfter[0].value - 10e4); - }); - - it('should throw invalid recipient provided error', async function () { - await assertThrow( - tronWeb.trx.sendToken( - 'notValidAddress', - 10e4, - token[Object.keys(token)[0]]['id'], - { privateKey: accounts.pks[fromIdx], address: accounts.hex[fromIdx] } - ), - 'Invalid recipient provided' - ); - }); - - it('should throw invalid amount provided error', async function () { - await assertThrow( - tronWeb.trx.sendToken( - accounts.hex[toIdx], - -10, - token[Object.keys(token)[0]]['id'], - { privateKey: accounts.pks[fromIdx], address: accounts.hex[fromIdx] } - ), - 'Invalid amount provided' - ); - }); - - it('should throw invalid token ID provided error', async function () { - await assertThrow( - tronWeb.trx.sendAsset( - accounts.hex[toIdx], - 10e4, - {}, - { privateKey: accounts.pks[fromIdx], address: accounts.hex[fromIdx] } - ), - 'Invalid token ID provided' - ); - }); - - it('should throw cannot transfer tokens to the same account provided error', async function () { - await assertThrow( - tronWeb.trx.sendAsset( - accounts.hex[fromIdx], - 10e4, - token[Object.keys(token)[0]]['id'], - { privateKey: accounts.pks[fromIdx], address: accounts.hex[fromIdx] } - ), - 'Cannot transfer tokens to the same account' - ); - }); - - }); - - - describe("#getTokenFromID", async function () { - - const idx = 26; - - before(async function(){ - this.timeout(10000); - - const options = getTokenOptions(); - const transaction = await tronWeb.transactionBuilder.createToken(options, accounts.hex[idx]); - await broadcaster(null, accounts.pks[idx], transaction); - await waitChainData('token', accounts.hex[idx]); - }); - - it('should get token by name', async function () { - const tokens = await tronWeb.trx.listTokens(5, 0); - for (let token of tokens) { - const tk = await tronWeb.trx.getTokenFromID(token.id); - assert.equal(tk.id, token.id); - } - }); - - it('should throw invalid token ID provided error', async function () { - await assertThrow( - tronWeb.trx.getTokenFromID({}), - 'Invalid token ID provided' - ); - }); - - it('should throw token does not exist error', async function () { - await assertThrow( - tronWeb.trx.getTokenFromID(1234565), - 'Token does not exist' - ); - }); - - }); - - - describe("#getTokensIssuedByAddress", async function () { - - const idx = 49; - - before(async function(){ - this.timeout(10000); - - const options = getTokenOptions(); - const transaction = await tronWeb.transactionBuilder.createToken(options, accounts.hex[idx]); - await broadcaster(null, accounts.pks[idx], transaction); - await waitChainData('token', accounts.hex[idx]); - }); - - it('should get token by issued address', async function () { - const tokens = await tronWeb.trx.listTokens(5, 0); - for (let token of tokens) { - const tk = await tronWeb.trx.getTokensIssuedByAddress(token.owner_address); - assert.equal(tk[Object.keys(tk)[0]]['id'], token.id); - } - }); - - it('should throw invalid address provided error', async function () { - await assertThrow( - tronWeb.trx.getTokensIssuedByAddress('abcdefghijklmn'), - 'Invalid address provided' - ); - }); - - }); - - - describe("#listTokens", async function () { - - it('should list all tokens by limit', async function () { - const tokens = await tronWeb.trx.listTokens(10, 0); - assert.isArray(tokens); - for (let token of tokens) { - assert.isDefined(token.id); - } - }); - - it('should throw invalid limit provided error', async function () { - await assertThrow( - tronWeb.trx.listTokens(-1, 0), - 'Invalid limit provided' - ); - }); - - it('should throw invalid offset provided error', async function () { - await assertThrow( - tronWeb.trx.listTokens(5, -1), - 'Invalid offset provided' - ); - }); - - }); - - - describe("#parseToken", async function () { - - it('should list all tokens by limit', async function () { - const tokens = await tronWeb.trx.listTokens(10, 0); - for (let token of tokens) { - const cloneToken = JSON.parse(JSON.stringify(token)); - token.name = tronWeb.fromUtf8(token.name); - token.abbr = tronWeb.fromUtf8(token.abbr); - token.description = token.description && tronWeb.fromUtf8(token.description); - token.url = tronWeb.fromUtf8(token.url); - - const tk = tronWeb.trx._parseToken(token); - assert.equal(tk.name, cloneToken.name); - assert.equal(tk.abbr, cloneToken.abbr); - assert.equal(tk.description, cloneToken.description); - assert.equal(tk.url, cloneToken.url); - } - }); - - }); - - }); - - - // Exchange Test - describe('#Exchange Test', function () { - - describe("#listExchanges", async function () { - - const idxS = 33; - const idxE = 35; - const toIdx = 35; - - before(async function(){ - this.timeout(20000); - - let tokenNames = []; - - // create token - for (let i = idxS; i < idxE; i++) { - const options = getTokenOptions(); - const transaction = await tronWeb.transactionBuilder.createToken(options, accounts.hex[i]); - await broadcaster(null, accounts.pks[i], transaction); - await waitChainData('token', accounts.hex[i]); - const token = await tronWeb.trx.getTokensIssuedByAddress(accounts.hex[i]); - await waitChainData('tokenById', token[Object.keys(token)[0]]['id']); - await broadcaster(null, accounts.pks[i], await tronWeb.transactionBuilder.sendToken( - accounts.hex[toIdx], - 10e4, - token[Object.keys(token)[0]]['id'], - token[Object.keys(token)[0]]['owner_address'] - )); - await waitChainData('sendToken', accounts.hex[toIdx], 0); - tokenNames.push(token[Object.keys(token)[0]]['id']); - } - await broadcaster( - null, - accounts.pks[toIdx], - await tronWeb.transactionBuilder.createTokenExchange(tokenNames[0], 10e3, tokenNames[1], 10e3, accounts.hex[toIdx]) - ); - - }); - - it('should get exchange by id', async function () { - const exchanges = await tronWeb.trx.listExchanges(); - assert.isArray(exchanges); - for (let exchange of exchanges) { - assert.isDefined(exchange.exchange_id); - } - }); - - }); - - - describe("#listExchangesPaginated", async function () { - - const idxS = 36; - const idxE = 38; - const toIdx = 38; - - before(async function(){ - this.timeout(20000); - - let tokenNames = []; - - // create token - for (let i = idxS; i < idxE; i++) { - const options = getTokenOptions(); - const transaction = await tronWeb.transactionBuilder.createToken(options, accounts.hex[i]); - await broadcaster(null, accounts.pks[i], transaction); - await waitChainData('token', accounts.hex[i]); - const token = await tronWeb.trx.getTokensIssuedByAddress(accounts.hex[i]); - await waitChainData('tokenById', token[Object.keys(token)[0]]['id']); - await broadcaster(null, accounts.pks[i], await tronWeb.transactionBuilder.sendToken( - accounts.hex[toIdx], - 10e4, - token[Object.keys(token)[0]]['id'], - token[Object.keys(token)[0]]['owner_address'] - )); - await waitChainData('sendToken', accounts.hex[toIdx], 0); - tokenNames.push(token[Object.keys(token)[0]]['id']); - } - - await broadcaster( - null, - accounts.pks[toIdx], - await tronWeb.transactionBuilder.createTokenExchange(tokenNames[0], 10e3, tokenNames[1], 10e3, accounts.hex[toIdx]) - ); - - }); - - it('should get exchange by id', async function () { - const exchanges = await tronWeb.trx.listExchangesPaginated(10, 0); - assert.isArray(exchanges); - assert.isTrue(exchanges.length > 0); - for (let exchange of exchanges) { - assert.isDefined(exchange.exchange_id); - } - }); - - }); - - - describe("#getExchangeByID", async function () { - - const idxS = 39; - const idxE = 41; - const toIdx = 41; - let exchanges; - - before(async function(){ - this.timeout(20000); - - let tokenNames = []; - - // create token - for (let i = idxS; i < idxE; i++) { - const options = getTokenOptions(); - await broadcaster(null, accounts.pks[i], await tronWeb.transactionBuilder.createToken(options, accounts.hex[i])); - await waitChainData('token', accounts.hex[i]); - const token = await tronWeb.trx.getTokensIssuedByAddress(accounts.hex[i]); - await waitChainData('tokenById', token[Object.keys(token)[0]]['id']); - await broadcaster(null, accounts.pks[i], await tronWeb.transactionBuilder.sendToken( - accounts.hex[toIdx], - 10e4, - token[Object.keys(token)[0]]['id'], - token[Object.keys(token)[0]]['owner_address'] - )); - await waitChainData('sendToken', accounts.hex[toIdx], 0); - tokenNames.push(token[Object.keys(token)[0]]['id']); - } - - await broadcaster( - null, - accounts.pks[toIdx], - await tronWeb.transactionBuilder.createTokenExchange(tokenNames[0], 10e3, tokenNames[1], 10e3, accounts.hex[toIdx]) - ); - - exchanges = await tronWeb.trx.listExchanges(); - }); - - it('should get exchange by id', async function () { - for (let exchange of exchanges) { - const ex = await tronWeb.trx.getExchangeByID(exchange.exchange_id); - assert.equal(ex.exchange_id, exchange.exchange_id); - } - }); - - }); - - }); - - - // Proposal Test - describe("#Proposal Test", async function () { - - describe("#getChainParameters", async function () { - - it('should get proposal list', async function () { - const params = await tronWeb.trx.getChainParameters(); - assert.isArray(params); - assert.isDefined(params[0].key); - }); - - }); - - - describe("#getProposal", async function () { - - let proposals; - - before(async function(){ - // create proposal - let parameters = [{"key": 0, "value": 100000}, {"key": 1, "value": 2}] - await broadcaster( - null, - PRIVATE_KEY, - await tronWeb.transactionBuilder.createProposal(parameters[0], ADDRESS_BASE58) - ); - - proposals = await tronWeb.trx.listProposals(); - }); - - it('should get proposal by id', async function () { - for (let proposal of proposals) { - const ps = await tronWeb.trx.getProposal(proposal.proposal_id); - assert.equal(ps.proposal_id, proposal.proposal_id); - } - }); - - it('should throw invalid proposalID provided error', async function () { - await assertThrow( - tronWeb.trx.getProposal(-1), - 'Invalid proposalID provided' - ); - }); - - }); - - - describe("#listProposals", async function () { - - before(async function(){ - // create proposal - for (let i = 0; i < 5; i++) { - let parameters = [{"key": i + 1, "value": 100000}, {"key": i + 2, "value": 2}] - await broadcaster( - null, - PRIVATE_KEY, - await tronWeb.transactionBuilder.createProposal(parameters[0], ADDRESS_BASE58) - ); - } - }); - - it('should list seeds node', async function () { - const proposals = await tronWeb.trx.listProposals(); - for (let proposal of proposals) { - assert.isDefined(proposal.proposal_id); - assert.isDefined(proposal.proposer_address); - } - }); - - }); - - }); - - - // Contract Test - describe("#getContract", async function () { - - const idx = 42; - let transaction; - - before(async function(){ - this.timeout(10000); - - transaction = await tronWeb.transactionBuilder.createSmartContract({ - abi: testRevertContract.abi, - bytecode: testRevertContract.bytecode - }, accounts.hex[idx]); - await broadcaster(null, accounts.pks[idx], transaction); - await waitChainData('contract', transaction.contract_address) - }); - - it('should get contract by contract address', async function () { - const contract = await tronWeb.trx.getContract(transaction.contract_address); - assert.equal(contract.contract_address, transaction.contract_address); - }); - - it('should throw invalid contract address provided error', async function () { - await assertThrow( - tronWeb.trx.getContract('notAddress'), - 'Invalid contract address provided' - ); - }); - - it('should throw contract does not exist error', async function () { - await assertThrow( - tronWeb.trx.getContract('417cbcc41052b59584d1ac9fc1ce39106533aa1d40'), - 'Contract does not exist' - ); - }); - - }); - - - // Node Test - describe("#listNodes", async function () { - - it('should list seeds node', async function () { - const nodes = await tronWeb.trx.listNodes(); - assert.isArray(nodes); - }); - - }); - - - // SR Test - describe("#listSuperRepresentatives", async function () { - - it('should list super representatives', async function () { - const srs = await tronWeb.trx.listSuperRepresentatives(); - assert.isArray(srs); - - for (let sr of srs) { - assert.isDefined(sr.address); - assert.isDefined(sr.voteCount); - assert.isDefined(sr.latestBlockNum); - } - }); - - }); - - - describe("#timeUntilNextVoteCycle", async function () { - - it('should get time util next vote cycle', async function () { - const num = await tronWeb.trx.timeUntilNextVoteCycle(); - assert.isNumber(num); - }); - - }); - - describe("#getReward", async function () { - it('should get the reward', async function () { - let reward = await tronWeb.trx.getReward(accounts.b58[0]); - assert.equal(reward, 0) - - }); - }); - - describe("#getUnconfirmedReward", async function () { - it('should get the reward', async function () { - let reward = await tronWeb.trx.getUnconfirmedReward(accounts.b58[0]); - assert.equal(reward, 0) - - }); - }); - - describe("#getBrokerage", async function () { - it('should get the brokerage', async function () { - - let brokerage = await tronWeb.trx.getBrokerage(accounts[0]); - assert.equal(brokerage, 20) - - }); - }); - - describe("#getUnconfirmedBrokerage", async function () { - it('should get the brokerage', async function () { - - let brokerage = await tronWeb.trx.getUnconfirmedBrokerage(accounts[0]); - assert.equal(brokerage, 20) - - }); - }); - - describe("#signMessageV2", async function() { - tests.forEach(function(test) { - it('signs a message "' + test.name + '"', async function () { - const tronWeb = new TronWeb({ fullHost: FULL_NODE_API }, test.privateKey) - const signature = await tronWeb.trx.signMessageV2(test.message); - assert.equal(signature, test.signature, 'computes message signature'); - }); - }); - }); - - describe("#verifyMessageV2", async function() { - tests.forEach(function(test) { - it('signs a message "' + test.name + '"', async function () { - const tronWeb = new TronWeb({ fullHost: FULL_NODE_API }, test.privateKey) - const address = await tronWeb.trx.verifyMessageV2(test.message, test.signature); - assert.equal(address, test.address, 'verifies message signature'); - }); - }); - }); -}); diff --git a/test/setup/browser.js b/test/setup/browser.js deleted file mode 100644 index 1fd3e54a..00000000 --- a/test/setup/browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../../src').default; diff --git a/test/setup/node.js b/test/setup/node.js deleted file mode 100644 index 63fbbb8e..00000000 --- a/test/setup/node.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../../dist/TronWeb.node'); diff --git a/test/testcases/contract-interface-abi2.json.gz b/test/testcases/contract-interface-abi2.json.gz deleted file mode 100644 index 41aa01f1..00000000 Binary files a/test/testcases/contract-interface-abi2.json.gz and /dev/null differ diff --git a/test/testcases/contract-interface.json.gz b/test/testcases/contract-interface.json.gz deleted file mode 100644 index cd669279..00000000 Binary files a/test/testcases/contract-interface.json.gz and /dev/null differ diff --git a/test/testcases/eip712.json.gz b/test/testcases/eip712.json.gz deleted file mode 100644 index 1e385a1b..00000000 Binary files a/test/testcases/eip712.json.gz and /dev/null differ diff --git a/test/testcases/src/disk-utils.js b/test/testcases/src/disk-utils.js deleted file mode 100644 index 1df75f2d..00000000 --- a/test/testcases/src/disk-utils.js +++ /dev/null @@ -1,41 +0,0 @@ -const fs = require('fs'); -const path = require('path'); -const zlib = require('zlib'); - -function saveTests(tag, data) { - let filename = path.resolve(__dirname, '../', tag + '.json.gz'); - - fs.writeFileSync(filename, zlib.gzipSync(JSON.stringify(data, undefined, ' ') + '\n')); - - console.log('Save testcase: ' + filename); -} - -function loadTests(tag) { - let filename = path.resolve(__dirname, '../', tag + '.json.gz'); - return JSON.parse(zlib.gunzipSync(fs.readFileSync(filename)).toString()); -} - -function loadTestsJSON(tag) { - let filename = path.resolve(__dirname, '../', tag + '.json'); - return JSON.parse(fs.readFileSync(filename).toString()); -} - -function loadData(filename) { - return fs.readFileSync(path.resolve(__dirname, filename)); -} - -function saveJson(tag, data) { - let filename = path.resolve(__dirname, '../', tag + '.json'); - - fs.writeFileSync(filename, JSON.stringify(data, undefined, ' ')); - - console.log('Save testcase: ' + filename); -} - -module.exports = { - saveTests, - loadTests, - loadData, - saveJson, - loadTestsJSON -} \ No newline at end of file diff --git a/test/testcases/src/sign-message.js b/test/testcases/src/sign-message.js deleted file mode 100644 index 884d63c5..00000000 --- a/test/testcases/src/sign-message.js +++ /dev/null @@ -1,35 +0,0 @@ -const tronWebBuilder = require('../../helpers/tronWebBuilder'); -const TronWeb = tronWebBuilder.TronWeb; - -const tests = [ - // message is string - { - address: 'TMVQGm1qAQYVdetCeGRRkTWYYrLXuHK2HC', - name: 'string("hello world")', - message: 'hello world', - messageHash: '0xcf02daeb2bea196ed5692322a66ed50080ce74ff8cb711199f1b04f3c13bc10d', - privateKey: '0000000000000000000000000000000000000000000000000000000000000001', - signature: '0x0dc0b53d525e0103a6013061cf18e60cf158809149f2b8994a545af65a7004cb1eeaff560e801ab51b28df5d42549aa024c2aa7e9d34de1e01294b9afb5e6c7e1c' - }, - // message starts with 0x, and wanted to be treated as bytes, use TronWeb.utils.ethersUtils.arrayify to deal with the message first - { - address: 'TVEZYjZyemfJoLUdGtzsM2ua1HAnbsNgAF', - name: 'bytes(0x47173285...4cb01fad)', - message: TronWeb.utils.ethersUtils.arrayify('0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad'), - messageHash: '0x66733cf31ee3f133db9561efdca3d65ba930bdf57fb1af3b6cc0ba4966ecc882', - privateKey: '51d1d6047622bca92272d36b297799ecc152dc2ef91b229debf84fc41e8c73ee', - signature: '0xdc3ffce3ffa792a3c76b9ea6909f715ffed0386bb9be0d1ece2d80bde37c368028eed4c9a6fd9608407b224050db7c648a8a7668a7582893efcb2c19d3327b811b' - }, - { - address: 'TBzEvowPVErmNWVegYMQcurDF3jgHU4VME', - name: 'zero-prefixed signature', - message: TronWeb.utils.ethersUtils.arrayify(TronWeb.utils.ethersUtils.id('0x7f23b5eed5bc7e89f267f339561b2697faab234a2')), - messageHash: '0xc6bb689ca3663d132c07540d31f46e03b0e4291d990c77083c136a234f079455', - privateKey: '59f40af46420081988724249fb743e7597c8ddc1cbbc0738b96ceb1dbb149373', - signature: '0x4a32ec6cfd034304f6fb45767d98a2414a9ab439a829b60e756c79f7e3c0f4ed0d1f76d88839a4425146084a6ef3703a2a692fdacc76c80c269268f6ba6df38b1c' - } -]; - -module.exports = { - tests -} diff --git a/test/utils/abi.test.js b/test/utils/abi.test.js deleted file mode 100644 index 37ea3da9..00000000 --- a/test/utils/abi.test.js +++ /dev/null @@ -1,220 +0,0 @@ - -const chai = require('chai'); -const {ADDRESS_HEX, ADDRESS_BASE58} = require('../helpers/config'); -const tronWebBuilder = require('../helpers/tronWebBuilder'); -const testUtils = require('../helpers/testUtils'); -const { loadTests } = require('../testcases/src/disk-utils'); -const ethers = require('ethers'); -const assert = chai.assert; - -const { equals, getValues } = testUtils; - -describe('TronWeb.utils.abi', function () { - - describe('#decodeParams()', function () { - it('should decode abi coded params passing types and output', function () { - - const tronWeb = tronWebBuilder.createInstance(); - const types = ['string', 'string', 'uint8', 'bytes32', 'uint256']; - const output = '0x00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000012dc03b7993bad736ad595eb9e3ba51877ac17ecc31d2355f8f270125b9427ece700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011506920446179204e30306220546f6b656e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035049450000000000000000000000000000000000000000000000000000000000'; - - const expected = [ - 'Pi Day N00b Token', - 'PIE', - 18, - '0xdc03b7993bad736ad595eb9e3ba51877ac17ecc31d2355f8f270125b9427ece7', - 0 - ]; - - - const result = tronWeb.utils.abi.decodeParams(types, output); - - for(let i = 0; i < expected.length; i++) { - assert.equal(result[i], expected[i]); - } - }); - - it('should decode abi coded params passing names, types and output', function () { - - const tronWeb = tronWebBuilder.createInstance(); - const names = ['Token', 'Graph', 'Qty', 'Bytes', 'Total']; - const types = ['string', 'string', 'uint8', 'bytes32', 'uint256']; - const output = '0x00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000012dc03b7993bad736ad595eb9e3ba51877ac17ecc31d2355f8f270125b9427ece700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011506920446179204e30306220546f6b656e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035049450000000000000000000000000000000000000000000000000000000000'; - - const expected = { - Token: 'Pi Day N00b Token', - Graph: 'PIE', - Qty: 18, - Bytes: '0xdc03b7993bad736ad595eb9e3ba51877ac17ecc31d2355f8f270125b9427ece7', - Total: 0 - }; - - const result = tronWeb.utils.abi.decodeParams(names, types, output); - for(let i in expected) { - assert.equal(result[i], expected[i]); - } - }); - - it('should throw if the string does not start with 0x', function () { - - const tronWeb = tronWebBuilder.createInstance(); - const types = ['string', 'string', 'uint8', 'bytes32', 'uint256']; - const output = - '00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000012dc03b7993bad736ad595eb9e3ba51877ac17ecc31d2355f8f270125b9427ece700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011506920446179204e30306220546f6b656e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035049450000000000000000000000000000000000000000000000000000000000'; - assert.throws(() => { - tronWeb.utils.abi.decodeParams(types, output) - }, 'invalid arrayify value'); - }); - - it('should throw if the output format is wrong', function () { - - const tronWeb = tronWebBuilder.createInstance(); - const types = ['string', 'string', 'uint8', 'bytes32', 'uint256']; - const output = '0x00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000012dc03b7993bad736ad595eb9e3ba51877ac17ecc31d2355f8f270125b9427ece700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011506920446179204e30306220546f6b656e0000000000000000000000000000005049450000000000000000000000000000000000000000000000000000000000'; - - assert.throws(() => { - tronWeb.utils.abi.decodeParams(types, output) - }, 'overflow'); - }); - - it('should throw if the output is invalid', function () { - - const tronWeb = tronWebBuilder.createInstance(); - const types = ['string']; - const output = '0x6630f88f000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000046173646600000000000000000000000000000000000000000000000000000000'; - - assert.throws(() => { - tronWeb.utils.abi.decodeParams(types, output) - }, 'The encoded string is not valid. Its length must be a multiple of 64.'); - }); - - it('should decode if the output is prefixed with the method hash', function () { - - const tronWeb = tronWebBuilder.createInstance(); - const types = ['string']; - const output = '0x6630f88f000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000046173646600000000000000000000000000000000000000000000000000000000'; - - const result = tronWeb.utils.abi.decodeParams(types, output, true) - assert.equal(result, 'asdf') - }); - }); - - describe('#encodeParams()', function () { - it('should encode abi coded params passing types and values', function () { - - const tronWeb = tronWebBuilder.createInstance(); - const types = ['string', 'string', 'uint8', 'bytes32', 'uint256']; - const values = [ - 'Pi Day N00b Token', - 'PIE', - 18, - '0xdc03b7993bad736ad595eb9e3ba51877ac17ecc31d2355f8f270125b9427ece7', - 0 - ]; - - const expected = '0x00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000012dc03b7993bad736ad595eb9e3ba51877ac17ecc31d2355f8f270125b9427ece700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011506920446179204e30306220546f6b656e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035049450000000000000000000000000000000000000000000000000000000000'; - - - const result = tronWeb.utils.abi.encodeParams(types, values); - - for(let i = 0; i < expected.length; i++) { - assert.equal(result[i], expected[i]); - } - }); - - it('should encode abi coded params passing addresses in hex and base58 mode', function () { - - const tronWeb = tronWebBuilder.createInstance(); - const types = ['string', 'address', 'address']; - const values = [ - 'Onwer', - ADDRESS_HEX, - ADDRESS_BASE58 - ]; - - const expected = '0x0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000928c9af0651632157ef27a2cf17ca72c575a4d21000000000000000000000000928c9af0651632157ef27a2cf17ca72c575a4d2100000000000000000000000000000000000000000000000000000000000000054f6e776572000000000000000000000000000000000000000000000000000000'; - const result = tronWeb.utils.abi.encodeParams(types, values); - - for(let i = 0; i < expected.length; i++) { - assert.equal(result[i], expected[i]); - } - }); - }); - - describe('#encodeParamsV2ByABI()-(v1 input)', function() { - const tronWeb = tronWebBuilder.createInstance(); - let coder = tronWeb.utils.abi; - - let tests = loadTests('contract-interface'); - tests.forEach((test) => { - let { normalizedValues, result, interface } = test; - const funcABI = JSON.parse(interface); - const inputValues = getValues(JSON.parse(normalizedValues)) - funcABI[0].inputs = funcABI[0].outputs; - let title = test.name + ' => (' + test.types + ') = (' + test.normalizedValues + ')'; - it(('encodes parameters - ' + test.name + ' - ' + test.types), function() { - this.timeout(120000); - const encoded = coder.encodeParamsV2ByABI(funcABI[0], inputValues); - assert.equal(encoded, result, 'encoded data - ' + title); - - }); - }); - }); - - describe('#encodeParamsV2ByABI()-(v2 input)', function() { - const tronWeb = tronWebBuilder.createInstance(); - let coder = tronWeb.utils.abi; - - let tests = loadTests('contract-interface-abi2'); - tests.forEach((test) => { - let { values, result, interface } = test; - const funcABI = JSON.parse(interface); - const inputValues = getValues(JSON.parse(values)); - funcABI[0].inputs = funcABI[0].outputs; - let title = test.name + ' => (' + test.types + ') = (' + test.normalizedValues + ')'; - it(('encodes parameters - ' + test.name + ' - ' + test.types), function() { - this.timeout(120000); - const encoded = coder.encodeParamsV2ByABI(funcABI[0], inputValues); - assert.equal(encoded, result, 'encoded data - ' + title); - - }); - }); - }); - - describe('#decodeParamsV2ByABI()-(v1 output)', function() { - const tronWeb = tronWebBuilder.createInstance(); - let coder = tronWeb.utils.abi; - - let tests = loadTests('contract-interface'); - tests.forEach((test) => { - let { normalizedValues, result, interface } = test; - const funcABI = JSON.parse(interface); - const outputValues = getValues(JSON.parse(normalizedValues)) - let title = test.name + ' => (' + test.types + ') = (' + test.normalizedValues + ')'; - it(('decodes parameters - ' + test.name + ' - ' + test.types), function() { - this.timeout(120000); - const decoded = coder.decodeParamsV2ByABI(funcABI[0], result); - assert.ok(equals(decoded, outputValues), 'decoded data - ' + title); - }); - }); - }); - - describe('#decodeParamsV2ByABI()-(v2 output)', function() { - const tronWeb = tronWebBuilder.createInstance(); - let coder = tronWeb.utils.abi; - - let tests = loadTests('contract-interface-abi2'); - tests.forEach((test) => { - let { values, result, interface } = test; - const funcABI = JSON.parse(interface); - const outputValues = getValues(JSON.parse(values)) - let title = test.name + ' => (' + test.types + ') = (' + test.normalizedValues + ')'; - it(('decodes parameters - ' + test.name + ' - ' + test.types), function() { - this.timeout(120000); - const decoded = coder.decodeParamsV2ByABI(funcABI[0], result); - assert.ok(equals(decoded, outputValues), 'decoded data - ' + title); - }); - }); - }); -}); - diff --git a/test/utils/accounts.test.js b/test/utils/accounts.test.js deleted file mode 100644 index 1176de92..00000000 --- a/test/utils/accounts.test.js +++ /dev/null @@ -1,167 +0,0 @@ -const chai = require('chai'); -const {ADDRESS_HEX, ADDRESS_BASE58} = require('../helpers/config'); -const tronWebBuilder = require('../helpers/tronWebBuilder'); -const assertThrow = require('../helpers/assertThrow'); - -const assert = chai.assert; - -describe('TronWeb.utils.accounts', function () { - - describe('#generateAccount()', function () { - - it("should generate a new account", async function () { - const tronWeb = tronWebBuilder.createInstance(); - - const newAccount = await tronWeb.utils.accounts.generateAccount(); - assert.equal(newAccount.privateKey.length, 64); - assert.equal(newAccount.publicKey.length, 130); - let address = tronWeb.address.fromPrivateKey(newAccount.privateKey); - assert.equal(address, newAccount.address.base58); - - assert.equal(tronWeb.address.toHex(address), newAccount.address.hex.toLowerCase()); - }); - }); - - describe('#generateRandom()', function () { - describe('should generate a mnemonic phrase and an account', function () { - it("should generate an account of the zero index when options param is not passed", async function () { - const tronWeb = tronWebBuilder.createInstance(); - - const newAccount = await tronWeb.utils.accounts.generateRandom(); - assert.equal(newAccount.privateKey.substring(2).length, 64); - assert.equal(newAccount.publicKey.substring(2).length, 130); - assert.isTrue(tronWeb.utils.ethersUtils.isValidMnemonic(newAccount.mnemonic.phrase)); - let address = tronWeb.address.fromPrivateKey(newAccount.privateKey.replace(/^0x/, '')); - assert.equal(address, newAccount.address); - assert.equal(tronWeb.address.toHex(address), tronWeb.address.toHex(newAccount.address)); - }); - - it("should generate an account when options param is zero", async function () { - const tronWeb = tronWebBuilder.createInstance(); - const options = 0; - const newAccount = await tronWeb.utils.accounts.generateRandom(options); - assert.equal(newAccount.privateKey.substring(2).length, 64); - assert.equal(newAccount.publicKey.substring(2).length, 130); - assert.isTrue(tronWeb.utils.ethersUtils.isValidMnemonic(newAccount.mnemonic.phrase)); - let address = tronWeb.address.fromPrivateKey(newAccount.privateKey.replace(/^0x/, '')); - assert.equal(address, newAccount.address); - assert.equal(tronWeb.address.toHex(address), tronWeb.address.toHex(newAccount.address)); - }); - - it("should generate an account when options param is a positive interger", async function () { - const tronWeb = tronWebBuilder.createInstance(); - const options = 12; - const newAccount = await tronWeb.utils.accounts.generateRandom(options); - assert.equal(newAccount.privateKey.substring(2).length, 64); - assert.equal(newAccount.publicKey.substring(2).length, 130); - assert.isTrue(tronWeb.utils.ethersUtils.isValidMnemonic(newAccount.mnemonic.phrase)); - let address = tronWeb.address.fromPrivateKey(newAccount.privateKey.replace(/^0x/, '')); - assert.equal(address, newAccount.address); - assert.equal(tronWeb.address.toHex(address), tronWeb.address.toHex(newAccount.address)); - }); - - it("should generate an account when options param is an empty object", async function () { - const tronWeb = tronWebBuilder.createInstance(); - const options = {}; - const newAccount = await tronWeb.utils.accounts.generateRandom(options); - assert.equal(newAccount.privateKey.substring(2).length, 64); - assert.equal(newAccount.publicKey.substring(2).length, 130); - assert.isTrue(tronWeb.utils.ethersUtils.isValidMnemonic(newAccount.mnemonic.phrase)); - let address = tronWeb.address.fromPrivateKey(newAccount.privateKey.replace(/^0x/, '')); - assert.equal(address, newAccount.address); - assert.equal(tronWeb.address.toHex(address), tronWeb.address.toHex(newAccount.address)); - }); - - it("should generate an account of the given path when options param has a valid bip39 tron path", async function () { - const tronWeb = tronWebBuilder.createInstance(); - const options = { path: "m/44'/195'/0'/0/0" }; - const newAccount = await tronWeb.utils.accounts.generateRandom(options); - assert.equal(newAccount.privateKey.substring(2).length, 64); - assert.equal(newAccount.publicKey.substring(2).length, 130); - assert.isTrue(tronWeb.utils.ethersUtils.isValidMnemonic(newAccount.mnemonic.phrase)); - let address = tronWeb.address.fromPrivateKey(newAccount.privateKey.replace(/^0x/, '')); - assert.equal(address, newAccount.address); - assert.equal(tronWeb.address.toHex(address), tronWeb.address.toHex(newAccount.address)); - }); - - it("should throw when options param has a bip39 path of an another chain", async function () { - const tronWeb = tronWebBuilder.createInstance(); - const options = { path: "m/44'/60'/0'/0/0" }; - - await assertThrow( - () => tronWeb.utils.accounts.generateRandom(options), - 'Invalid tron path provided' - ); - }); - - it("should throw when options param has an invalid bip39 path", async function () { - const tronWeb = tronWebBuilder.createInstance(); - const options = { path: 12 }; - - await assertThrow( - () => tronWeb.utils.accounts.generateRandom(options), - 'Invalid tron path provided' - ); - }); - }); - }); - - describe('#generateAccountWithMnemonic()', function () { - describe('should generate an account of the given mnemonic phrase', function () { - it("should generate an account when passed a normal mnemonic pharase", async function () { - const tronWeb = tronWebBuilder.createInstance(); - - const accountCreated = await tronWeb.utils.accounts.generateRandom() - - const newAccount = await tronWeb.utils.accounts.generateAccountWithMnemonic(accountCreated.mnemonic.phrase); - assert.equal(newAccount.privateKey.substring(2).length, 64); - assert.equal(newAccount.publicKey.substring(2).length, 130); - let address = tronWeb.address.fromPrivateKey(newAccount.privateKey.replace(/^0x/, '')); - assert.equal(address, newAccount.address); - assert.equal(tronWeb.address.toHex(address), tronWeb.address.toHex(newAccount.address)); - }); - - it("should generate an account when path is passed", async function () { - const tronWeb = tronWebBuilder.createInstance(); - - const accountCreated = await tronWeb.utils.accounts.generateRandom(); - - const path = "m/44'/195'/0'/0/1"; - - const newAccount = await tronWeb.utils.accounts.generateAccountWithMnemonic(accountCreated.mnemonic.phrase, path); - assert.equal(newAccount.privateKey.substring(2).length, 64); - assert.equal(newAccount.publicKey.substring(2).length, 130); - let address = tronWeb.address.fromPrivateKey(newAccount.privateKey.replace(/^0x/, '')); - assert.equal(address, newAccount.address); - assert.equal(tronWeb.address.toHex(address), tronWeb.address.toHex(newAccount.address)); - }); - - it("should throw when path is an invalid bip39 pth", async function () { - const tronWeb = tronWebBuilder.createInstance(); - - const accountCreated = await tronWeb.utils.accounts.generateRandom(); - - const path = 11; - - await assertThrow( - () => tronWeb.utils.accounts.generateAccountWithMnemonic(accountCreated.mnemonic.phrase, path), - 'Invalid tron path provided' - ); - }); - - it("should generate an account when path is an invalid bip39 tron path", async function () { - const tronWeb = tronWebBuilder.createInstance(); - - const accountCreated = await tronWeb.utils.accounts.generateRandom(); - - const path = "m/44'/60'/0'/0/1"; - - await assertThrow( - () => tronWeb.utils.accounts.generateAccountWithMnemonic(accountCreated.mnemonic.phrase, path), - 'Invalid tron path provided' - ); - }); - }); - }); - -}); diff --git a/test/utils/base58.test.js b/test/utils/base58.test.js deleted file mode 100644 index 34a71a35..00000000 --- a/test/utils/base58.test.js +++ /dev/null @@ -1,69 +0,0 @@ -const chai = require('chai'); -const tronWebBuilder = require('../helpers/tronWebBuilder'); - -const assert = chai.assert; - -describe('TronWeb.utils.base58', function () { - - describe('#encode58()', function () { - - it("should encode a buffer in base58 string", async function () { - const tronWeb = tronWebBuilder.createInstance(); - - let input = Buffer.from('0xbf7e698', 'utf-8'); - let expected = 'cnTsZgYWJRAw'; - - assert.equal(tronWeb.utils.base58.encode58(input), expected); - - input = [30, 78, 62, 66, 37, 65, 36, 39, 38]; - expected = 'PNfgHhpd9fqF'; - - assert.equal(tronWeb.utils.base58.encode58(input), expected); - - input = '0xbf7e698'; - expected = 'BLw3T83'; - - assert.equal(tronWeb.utils.base58.encode58(input), expected); - - input = '12354345'; - expected = '3toVqjxtiu2q'; - - assert.equal(tronWeb.utils.base58.encode58(input), expected); - }); - - - it("should return '' or '1' if passing something different from a buffer", async function () { - // TODO. Is this what we want? - const tronWeb = tronWebBuilder.createInstance(); - - assert.equal(tronWeb.utils.base58.encode58([]), ''); - assert.equal(tronWeb.utils.base58.encode58('some string'), ''); - assert.equal(tronWeb.utils.base58.encode58({key: 1}), '1'); - }); - }); - - describe('#decode58()', function () { - - it("should decode a base58 string in a buffer", async function () { - const tronWeb = tronWebBuilder.createInstance(); - - const input = 'cnTsZgYWJRAw'; - const expected = Buffer.from('0xbf7e698', 'utf-8'); - - const decoded = tronWeb.utils.base58.decode58(input) - - assert.equal(Buffer.compare(expected, Buffer.from(decoded, 'utf-8')), 0); - - }); - - - it("should return [] or [0] if passing something '' or '1'", async function () { - // TODO. As above. Is this what we want? - const tronWeb = tronWebBuilder.createInstance(); - - assert.equal(JSON.stringify(tronWeb.utils.base58.decode58('')), "[]"); - assert.equal(JSON.stringify(tronWeb.utils.base58.decode58('1')), "[0]"); - }); - }); - -}); diff --git a/test/utils/bytes.test.js b/test/utils/bytes.test.js deleted file mode 100644 index 0d3b7990..00000000 --- a/test/utils/bytes.test.js +++ /dev/null @@ -1,115 +0,0 @@ -const chai = require('chai'); -const tronWebBuilder = require('../helpers/tronWebBuilder'); - -const assert = chai.assert; - -describe('TronWeb.utils.bytes', function () { - - describe('#byte2hexStr()', function () { - - it("should convert a byte to a hex string", async function () { - const tronWeb = tronWebBuilder.createInstance(); - - assert.equal(tronWeb.utils.bytes.byte2hexStr(21), '15'); - assert.equal(tronWeb.utils.bytes.byte2hexStr(33), '21'); - assert.equal(tronWeb.utils.bytes.byte2hexStr(78), '4E'); - assert.equal(tronWeb.utils.bytes.byte2hexStr(156), '9C'); - assert.equal(tronWeb.utils.bytes.byte2hexStr(200), 'C8'); - - }); - - it("should throw if something else than a byte is passed as input", async function () { - const tronWeb = tronWebBuilder.createInstance(); - - assert.throws(() => { - tronWeb.utils.bytes.byte2hexStr('15') - }, 'Input must be a number'); - - assert.throws(() => { - tronWeb.utils.bytes.byte2hexStr(-15) - }, 'Input must be a byte'); - - assert.throws(() => { - tronWeb.utils.bytes.byte2hexStr(1455) - }, 'Input must be a byte'); - - }); - }); - - describe('#bytesToString()', function () { - - it("should convert an array of bytes to a hex string", async function () { - const tronWeb = tronWebBuilder.createInstance(); - - assert.equal(tronWeb.utils.bytes.bytesToString([78, 112, 87, 69, 99, 65]), 'NpWEcA'); - - assert.equal(tronWeb.utils.bytes.bytesToString([1178, 2112, 1087, 969]), 'Қࡀпω'); - - }); - - it("should return the input if the input is a string", async function () { - const tronWeb = tronWebBuilder.createInstance(); - - assert.equal(tronWeb.utils.bytes.bytesToString('NpWEcA'), 'NpWEcA'); - - assert.equal(tronWeb.utils.bytes.bytesToString('Қࡀпω'), 'Қࡀпω'); - }); - }); - - - describe('#hextoString()', function () { - - it("should convert an hex string to a utf-8 string", async function () { - const tronWeb = tronWebBuilder.createInstance(); - - assert.equal(tronWeb.utils.bytes.hextoString('af43ed56aa77'), '¯CíVªw'); - assert.equal(tronWeb.utils.bytes.hextoString('0xaf43'), '¯C'); - assert.equal(tronWeb.utils.bytes.hextoString('49206C6F7665206461726B20636F6D6564696573'), 'I love dark comedies'); - - }); - }); - - describe('#byteArray2hexStr()', function () { - - it("should convert an array of bytes to a hex string", async function () { - const tronWeb = tronWebBuilder.createInstance(); - - assert.equal(tronWeb.utils.bytes.byteArray2hexStr([73, 32, 108, 111, 118, 101, 32, 100, 97, 114, 107, 32, 99, 111, 109, 101, 100, 105, 101, 115]), '49206C6F7665206461726B20636F6D6564696573'); - - }); - - it("should throw if the array of bytes is not valid", async function () { - const tronWeb = tronWebBuilder.createInstance(); - - assert.throws(() => { - tronWeb.utils.bytes.byteArray2hexStr([73, -32, 108]) - }, 'Input must be a byte'); - }); - }); - - - describe('#base64EncodeToString()', function () { - it("should encode a bytes array to a base64 string", async function () { - const tronWeb = tronWebBuilder.createInstance(); - - let result = tronWeb.utils.bytes.base64EncodeToString([73, 32, 108, 111, 118, 101, 32, 100, 97, 114, 107, 32, 99, 111, 109, 101, 100, 105, 101, 115] - ); - - assert.equal(result, 'SSBsb3ZlIGRhcmsgY29tZWRpZXM='); - }); - }); - - describe('#base64DecodeFromString()', function () { - it("should decode a base64 string", async function () { - const tronWeb = tronWebBuilder.createInstance(); - - let result = tronWeb.utils.bytes.base64DecodeFromString('SSBsb3ZlIGRhcmsgY29tZWRpZXM='); - - let string = tronWeb.utils.bytes.bytesToString(result); - assert.equal(string, 'I love dark comedies'); - - }); - - }); - -}); diff --git a/test/utils/code.test.js b/test/utils/code.test.js deleted file mode 100644 index 55b0a08d..00000000 --- a/test/utils/code.test.js +++ /dev/null @@ -1,191 +0,0 @@ -const chai = require('chai'); -const tronWebBuilder = require('../helpers/tronWebBuilder'); - -const assert = chai.assert; - -describe('TronWeb.utils.code', function () { - - describe('#bin2String()', function () { - - it("should convert a byte to a hex string", async function () { - const tronWeb = tronWebBuilder.createInstance(); - - assert.equal(tronWeb.utils.code.bin2String([78, 112, 87, 69, 99, 65]), 'NpWEcA'); - }); - }); - - describe('#arrayEquals()', function () { - - it("should compare two arrays to see if they are equal", async function () { - const tronWeb = tronWebBuilder.createInstance(); - - const a = [78, 112, 87, 69, 99, 65]; - const b = [78, 112, 69, 99, 65]; - const c = [78, 112, 69, 99, 65]; - const d = [78, 'casa', {a: 1}, 99, [65, 2]]; - const e = [78, 'casa', {a: 1}, 99, [65, 2]]; - - assert.isTrue(tronWeb.utils.code.arrayEquals(a, a)); - assert.isTrue(tronWeb.utils.code.arrayEquals(b, c)); - assert.isTrue(tronWeb.utils.code.arrayEquals(d, e)); - - assert.isFalse(tronWeb.utils.code.arrayEquals(a, b)); - assert.isFalse(tronWeb.utils.code.arrayEquals(d, e, true)); - - }); - }); - - describe('#stringToBytes()', function () { - - it("should convert a string to an array of bytes", async function () { - const tronWeb = tronWebBuilder.createInstance(); - - const a = 'Қࡀпω'; - - assert.isTrue(tronWeb.utils.code.arrayEquals(tronWeb.utils.code.stringToBytes('Қࡀпω'), [210, 154, 224, 161, 128, 208, 191, 207, 137], true)); - - // TODO We have something wrong, in fact this should be the reverse of the command above: - assert.equal(tronWeb.utils.bytes.bytesToString([1178, 2112, 1087, 969]), 'Қࡀпω'); - - }); - - it("should throw if something else than a string is passed as input", async function () { - const tronWeb = tronWebBuilder.createInstance(); - - assert.throws(() => { - tronWeb.utils.code.stringToBytes([210, 154, 224, 161, 128, 208, 191, 207, 137]) - }, 'The passed string is not a string'); - - assert.throws(() => { - tronWeb.utils.code.stringToBytes(356253) - }, 'The passed string is not a string'); - - }); - }); - - describe('#hexChar2byte()', function () { - - it("should convert an hex char to a byte", async function () { - const tronWeb = tronWebBuilder.createInstance(); - - assert.equal(tronWeb.utils.code.hexChar2byte('0'), 0); - assert.equal(tronWeb.utils.code.hexChar2byte('D'), 13); - assert.equal(tronWeb.utils.code.hexChar2byte('d'), 13); - assert.equal(tronWeb.utils.code.hexChar2byte('7'), 7); - - }); - - it("should throw if something else than a string is passed as input", async function () { - const tronWeb = tronWebBuilder.createInstance(); - - assert.throws(() => { - tronWeb.utils.code.hexChar2byte(12) - }, 'The passed hex char is not a valid hex char'); - - assert.throws(() => { - tronWeb.utils.code.hexChar2byte('Z') - }, 'The passed hex char is not a valid hex char'); - - }); - }); - - describe('#isHexChar()', function () { - - it("should verify that an hex char is a valid hex char", async function () { - const tronWeb = tronWebBuilder.createInstance(); - - assert.equal(tronWeb.utils.code.isHexChar('0'), 1); - assert.equal(tronWeb.utils.code.isHexChar('e'), 1); - assert.equal(tronWeb.utils.code.isHexChar('D'), 1); - - assert.equal(tronWeb.utils.code.isHexChar('Z'), 0); - assert.equal(tronWeb.utils.code.isHexChar(66), 0); - }); - }); - - describe('#hexStr2byteArray()', function () { - - it("should verify that an hex char is a valid hex char", async function () { - const tronWeb = tronWebBuilder.createInstance(); - - assert.isTrue(tronWeb.utils.code.arrayEquals(tronWeb.utils.code.hexStr2byteArray('49206C6F7665206461726B20636F6D6564696573'), [73, 32, 108, 111, 118, 101, 32, 100, 97, 114, 107, 32, 99, 111, 109, 101, 100, 105, 101, 115])); - - }); - - it("should throw if we pass an invalid hex string", async function () { - const tronWeb = tronWebBuilder.createInstance(); - - assert.throws(() => { - tronWeb.utils.code.hexStr2byteArray('ZASSyue') - }, 'The passed hex char is not a valid hex string'); - - assert.throws(() => { - tronWeb.utils.code.hexStr2byteArray(123) - }, 'The passed string is not a string'); - - }); - }); - - describe('#strToDate()', function () { - - it("should verify that an hex char is a valid hex char", async function () { - const tronWeb = tronWebBuilder.createInstance(); - - let input = '2018-09-23 13-45-03'; - let regex = RegExp('Sep 23 2018 13:45:03') - assert.isTrue(regex.test(tronWeb.utils.code.strToDate(input).toString())); - - input = '2018-09-23'; - regex = RegExp('Sep 23 2018 00:00:00') - assert.isTrue(regex.test(tronWeb.utils.code.strToDate(input).toString())); - - }); - - it("should throw if we pass an invalid hex string", async function () { - const tronWeb = tronWebBuilder.createInstance(); - - assert.throws(() => { - tronWeb.utils.code.strToDate('2018-02-') - }, 'The passed date string is not valid'); - - assert.throws(() => { - tronWeb.utils.code.strToDate(123) - }, 'The passed date string is not valid'); - - assert.throws(() => { - tronWeb.utils.code.strToDate('2018-0212') - }, 'The passed date string is not valid'); - - assert.throws(() => { - tronWeb.utils.code.strToDate('90-22-21') - }, 'The passed date string is not valid'); - }); - }); - - describe('#isNumber()', function () { - - it("should verify that an numeric char is a number", async function () { - const tronWeb = tronWebBuilder.createInstance(); - - assert.equal(tronWeb.utils.code.isNumber('0'), 1); - assert.equal(tronWeb.utils.code.isHexChar('Z'), 0); - }); - }); - - describe('#getStringType()', function () { - - it("should return the type of a string", async function () { - const tronWeb = tronWebBuilder.createInstance(); - - assert.equal(tronWeb.utils.code.getStringType('bf7e69851988c80e5484e52f4f6aca99479458b6'), 1); - - // TODO Should the next test return 1? - assert.equal(tronWeb.utils.code.getStringType('4136b9c3690c3be15a4ad697965b1e5e088ae131f2'), 3); - - assert.equal(tronWeb.utils.code.getStringType('3534'), 2); - assert.equal(tronWeb.utils.code.getStringType('ERC20Token'), 3); - - assert.equal(tronWeb.utils.code.getStringType(3.45), -1); - }); - }); -}); diff --git a/test/utils/index.test.js b/test/utils/index.test.js deleted file mode 100644 index 244d763f..00000000 --- a/test/utils/index.test.js +++ /dev/null @@ -1,263 +0,0 @@ -const chai = require('chai'); -const tronWebBuilder = require('../helpers/tronWebBuilder'); -const TronWeb = tronWebBuilder.TronWeb; -const BigNumber = require('bignumber.js'); - -const assert = chai.assert; - -describe('TronWeb.utils', function () { - - describe("#isValidURL()", function () { - - it('should verify good urls', function () { - - const tronWeb = tronWebBuilder.createInstance(); - - assert.isTrue(tronWeb.utils.isValidURL('https://some.example.com:9090/casa?qe=3')) - assert.isTrue(tronWeb.utils.isValidURL('www.example.com/welcome')) - - assert.isTrue(tronWeb.utils.isValidURL('http:/some.example.com')) - - assert.isFalse(tronWeb.utils.isValidURL(['http://example.com'])) - - }) - - }); - - describe("#isArray()", function () { - - it('should verify that a value is an array', function () { - const tronWeb = tronWebBuilder.createInstance(); - - assert.isTrue(tronWeb.utils.isArray([])); - assert.isTrue(tronWeb.utils.isArray([[2], {a: 3}])); - - assert.isFalse(tronWeb.utils.isArray({})); - assert.isFalse(tronWeb.utils.isArray("Array")); - - }) - - }); - - - describe("#isJson()", function () { - - it('should verify that a value is a JSON string', function () { - const tronWeb = tronWebBuilder.createInstance(); - - assert.isTrue(tronWeb.utils.isJson('[]')); - assert.isTrue(tronWeb.utils.isJson('{"key":"value"}')); - assert.isTrue(tronWeb.utils.isJson('"json"')); - - assert.isFalse(tronWeb.utils.isJson({})); - assert.isFalse(tronWeb.utils.isJson("json")); - - }) - - }); - - describe("#isBoolean()", function () { - - it('should verify that a value is a JSON string', function () { - const tronWeb = tronWebBuilder.createInstance(); - - assert.isTrue(tronWeb.utils.isBoolean(true)); - assert.isTrue(tronWeb.utils.isBoolean('a' == [])); - - assert.isFalse(tronWeb.utils.isBoolean({})); - assert.isFalse(tronWeb.utils.isBoolean("json")); - - }) - - }); - - describe("#isBigNumber()", function () { - - it('should verify that a value is a JSON string', function () { - const tronWeb = tronWebBuilder.createInstance(); - - const bigNumber = BigNumber('1234565432123456778765434456777') - - assert.isTrue(tronWeb.utils.isBigNumber(bigNumber)); - - assert.isFalse(tronWeb.utils.isBigNumber('0x09e80f665949b63b39f3850127eb29b55267306b69e2104c41c882e076524a1c')); - assert.isFalse(tronWeb.utils.isBigNumber({})); - assert.isFalse(tronWeb.utils.isBigNumber("json")); - - }) - - }); - - - describe("#isString()", function () { - - it('should verify that a valyue is a string', function () { - const tronWeb = tronWebBuilder.createInstance(); - - assert.isTrue(tronWeb.utils.isString('str')); - assert.isTrue(tronWeb.utils.isString(13..toString())); - - assert.isFalse(tronWeb.utils.isString(2)); - - }) - - }); - - describe("#isFunction()", function () { - - it('should verify that a value is a function', function () { - const tronWeb = tronWebBuilder.createInstance(); - - assert.isTrue(tronWeb.utils.isFunction(new Function())); - assert.isTrue(tronWeb.utils.isFunction(() => { - })); - assert.isTrue(tronWeb.utils.isFunction(tronWeb.utils.isFunction)); - - assert.isFalse(tronWeb.utils.isFunction({function: new Function})); - - }) - - }); - - describe('#isHex()', function () { - it('should verify that a string is an hex string', function () { - - const tronWeb = tronWebBuilder.createInstance(); - - let input = '0x1'; - let expected = true; - assert.equal(tronWeb.utils.isHex(input), expected); - - input = '0x0'; - expected = true; - assert.equal(tronWeb.utils.isHex(input), expected); - - input = '0x73616c616d6f6e'; - expected = true; - assert.equal(tronWeb.utils.isHex(input), expected); - - input = '73616c616d6f'; - expected = true; - assert.equal(tronWeb.utils.isHex(input), expected); - - input = '0x73616c616d6fsz'; - expected = false; - assert.equal(tronWeb.utils.isHex(input), expected); - - input = 'x898989'; - expected = false; - assert.equal(tronWeb.utils.isHex(input), expected); - - }); - - }); - - describe("#isInteger()", function () { - - it('should verify that a value is an integer', function () { - const tronWeb = tronWebBuilder.createInstance(); - - assert.isTrue(tronWeb.utils.isInteger(2345434)); - assert.isTrue(tronWeb.utils.isInteger(-234e4)); - - assert.isFalse(tronWeb.utils.isInteger(3.4)); - assert.isFalse(tronWeb.utils.isInteger('integer')); - - }) - - }); - - describe("#hasProperty()", function () { - - it('should verify that an object has a specific property', function () { - const tronWeb = tronWebBuilder.createInstance(); - - assert.isTrue(tronWeb.utils.hasProperty({p: 2}, 'p')); - assert.isFalse(tronWeb.utils.hasProperty([{p: 2}], 'p')); - - assert.isFalse(tronWeb.utils.hasProperty({a: 2}, 'p')); - - }) - - }); - - describe("#hasProperties()", function () { - - it('should verify that an object has some specific properties', function () { - const tronWeb = tronWebBuilder.createInstance(); - - assert.isTrue(tronWeb.utils.hasProperties({p: 2, s: 2}, 'p', 's')); - - assert.isFalse(tronWeb.utils.hasProperties({p: 2, s: 2}, 'p', 'q')); - - }) - - }); - - - describe("#mapEvent()", function () { - - it('should map an event result', function () { - const tronWeb = tronWebBuilder.createInstance(); - - const event = { - block_number: 'blockNumber', - block_timestamp: 'blockTimestamp', - contract_address: 'contractAddress', - event_name: 'eventName', - transaction_id: 'transactionId', - result: 'result', - resource_Node: 'resourceNode' - } - - const expected = { - block: 'blockNumber', - timestamp: 'blockTimestamp', - contract: 'contractAddress', - name: 'eventName', - transaction: 'transactionId', - result: 'result', - resourceNode: 'resourceNode' - } - - const mapped = tronWeb.utils.mapEvent(event) - for(let key in mapped) { - assert.equal(mapped[key], expected[key]) - } - - }) - - }); - - describe('#parseEvent', function () { - // TODO - }); - - describe("#padLeft()", function () { - - it('should return the pad left of a string', function () { - const tronWeb = tronWebBuilder.createInstance(); - - assert.equal(tronWeb.utils.padLeft('09e80f', '0', 12), '00000009e80f'); - // assert.equal(tronWeb.utils.padLeft(new Function, '0', 32), '0000000function anonymous() {\n\n}'); - assert.equal(tronWeb.utils.padLeft(3.4e3, '0', 12), '000000003400'); - - }) - - }); - - describe("#ethersUtils()", function () { - - it('should import sha256 from ethers and has a string', function () { - const tronWeb = tronWebBuilder.createInstance(); - - const string = '0x' + Buffer.from('some string').toString('hex'); - const hash = tronWeb.utils.ethersUtils.sha256(string); - - assert.equal(hash, '0x61d034473102d7dac305902770471fd50f4c5b26f6831a56dd90b5184b3c30fc'); - - }) - - }); - -}); diff --git a/test/utils/message.test.js b/test/utils/message.test.js deleted file mode 100644 index 029cfe30..00000000 --- a/test/utils/message.test.js +++ /dev/null @@ -1,41 +0,0 @@ -const chai = require('chai'); -const tronWebBuilder = require('../helpers/tronWebBuilder'); -const TronWeb = tronWebBuilder.TronWeb; - -const assert = chai.assert; - -const messageCases = require('../testcases/src/sign-message'); -const tests = messageCases.tests; - -describe('TronWeb.utils.message', function () { - - describe('#hashMessage()', function () { - - tests.forEach(function(test) { - it(('hashes a message "' + test.name + '"'), function() { - let hash = TronWeb.utils.message.hashMessage(test.message); - assert.equal(hash, test.messageHash, 'calculates message hash'); - }); - }); - }); - - describe('#signMessage()', function () { - - tests.forEach(function(test) { - it('signs a message "' + test.name + '"', function () { - const signature = TronWeb.utils.message.signMessage(test.message, test.privateKey); - assert.equal(signature, test.signature, 'computes message signature'); - }); - }); - }); - - describe('#verifyMessage()', function () { - - tests.forEach(function(test) { - it('verify a message "' + test.name + '"', function () { - const address = TronWeb.utils.message.verifyMessage(test.message, test.signature); - assert.equal(address, test.address, 'verifies message signature'); - }); - }); - }); -}); diff --git a/test/utils/transaction.test.js b/test/utils/transaction.test.js deleted file mode 100644 index 2f336281..00000000 --- a/test/utils/transaction.test.js +++ /dev/null @@ -1,3072 +0,0 @@ -const chai = require('chai'); -const tronWebBuilder = require('../helpers/tronWebBuilder'); -const TronWeb = tronWebBuilder.TronWeb; -const broadcaster = require('../helpers/broadcaster'); -const wait = require('../helpers/wait'); -const waitChainData = require('../helpers/waitChainData'); -const { testRevert, testConstant } = require('../fixtures/contracts'); -const AbiCoder = TronWeb.utils.ethersUtils.AbiCoder; -const assert = chai.assert; - -const { - ADDRESS_BASE58, - PRIVATE_KEY, - getTokenOptions, - isProposalApproved, - UPDATED_TEST_TOKEN_OPTIONS -} = require('../helpers/config'); - -describe('TronWeb.utils.transaction', function () { - let accounts; - let tronWeb; - let isAllowSameTokenNameApproved - - before(async function () { - tronWeb = tronWebBuilder.createInstance(); - // ALERT this works only with Tron Quickstart: - accounts = await tronWebBuilder.getTestAccounts(-1); - accounts = { - b58: accounts.b58.slice(50), - hex: accounts.hex.slice(50), - pks: accounts.pks.slice(50), - } - isAllowSameTokenNameApproved = await isProposalApproved(tronWeb, 'getAllowSameTokenName') - }); - - describe('#txCheck', function () { - - const commonAssertPb = (transaction) => { - const transactionPb = TronWeb.utils.transaction.txJsonToPb(transaction); - const rawDataBytes = transactionPb.getRawData().serializeBinary(); - const txID = TronWeb.utils.ethersUtils.sha256(rawDataBytes); - - assert.equal(txID.replace(/^0x/, ''), transaction.txID); - }; - - describe('#case TransferContract', function () { - let params - before(() => { - params = [ - [accounts.b58[1], 10, { permissionId: 2 }], - [accounts.b58[1], 10] - ]; - }) - it(`it should return true`, async function () { - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.sendTrx( - ...param - ); - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - commonAssertPb(transaction); - - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult2, false); - - transaction.txID = transaction.txID + '00'; - const authResult3 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult3, false); - - transaction.raw_data.ref_block_bytes = transaction.raw_data.ref_block_bytes + '00'; - const tampResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(tampResult, false); - } - }); - }); - - describe('#case TransferAssetContract', function () { - - let tokenOptions - let tokenID - - before(async function () { - - this.timeout(30000) - - tokenOptions = getTokenOptions(); - await broadcaster(tronWeb.transactionBuilder.sendTrx(accounts.b58[3], 100e6), PRIVATE_KEY); - await broadcaster(tronWeb.transactionBuilder.createToken(tokenOptions, accounts.b58[3]), accounts.pks[3]) - - let tokenList - await waitChainData('token', accounts.b58[3]); - tokenList = await tronWeb.trx.getTokensIssuedByAddress(accounts.b58[3]); - if (isAllowSameTokenNameApproved) { - tokenID = tokenList[tokenOptions.name].id - } else { - tokenID = tokenList[tokenOptions.name].name - } - - }); - - it(`it should return true`, async function () { - const params = [ - [accounts.b58[1], 5, tokenID, accounts.b58[3], { permissionId: 2 }], - [accounts.b58[1], 5, tokenID, accounts.b58[3]] - ]; - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.sendToken( - ...param - ); - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - commonAssertPb(transaction); - - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult2, false); - - transaction.txID = transaction.txID + '00' - const authResult3 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult3, false); - - transaction.raw_data.ref_block_hash = transaction.raw_data.ref_block_hash + '00'; - const tampResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(tampResult, false); - } - }); - }); - - describe('#case ParticipateAssetIssueContract', function () { - - let tokenOptions - let tokenID - - before(async function () { - tokenOptions = getTokenOptions(); - tokenOptions.saleEnd += 60 * 60 * 1000; - await broadcaster(tronWeb.transactionBuilder.createToken(tokenOptions, accounts.b58[2]), accounts.pks[2]) - let tokenList = await tronWeb.trx.getTokensIssuedByAddress(accounts.b58[2]) - if (isAllowSameTokenNameApproved) { - tokenID = tokenList[tokenOptions.name].id - } else { - tokenID = tokenList[tokenOptions.name].name - } - assert.equal(tokenList[tokenOptions.name].abbr, tokenOptions.abbreviation) - params = [ - [accounts.b58[2], tokenID, 20, accounts.b58[0], { permissionId: 2 }], - [accounts.b58[2], tokenID, 20, accounts.b58[0]] - ]; - - await wait(4); - }); - - it(`it should return true`, async function () { - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.purchaseToken( - ...param - ); - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - commonAssertPb(transaction); - - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult2, false); - - transaction.txID = transaction.txID + '00' - const authResult3 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult3, false); - - transaction.raw_data.ref_block_bytes = transaction.raw_data.ref_block_bytes + '00'; - const tampResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(tampResult, false); - } - }); - }); - - describe('#case TriggerSmartContract', function () { - - let transaction; - before(async function () { - this.timeout(20000); - - transaction = await tronWeb.transactionBuilder.createSmartContract({ - abi: testConstant.abi, - bytecode: testConstant.bytecode - }, accounts.hex[1]); - await broadcaster(null, accounts.pks[1], transaction); - while (true) { - const tx = await tronWeb.trx.getTransactionInfo(transaction.txID); - if (Object.keys(tx).length === 0) { - await wait(3); - continue; - } else { - break; - } - } - }) - - it('should trigger smart contract successfully', async function () { - this.timeout(20000); - - const contractAddress = transaction.contract_address; - const issuerAddress = accounts.hex[1]; - let functionSelector = 'testPure(uint256,uint256)'; - const parameter = [ - { type: 'uint256', value: 1 }, - { type: 'uint256', value: 2 } - ] - const options = {}; - - for (let i = 0; i < 2; i++) { - if (i === 1) options.permissionId = 2; - transaction = await tronWeb.transactionBuilder.triggerSmartContract( - contractAddress, - functionSelector, - options, - parameter, - issuerAddress, - ); - - const authResult = - TronWeb.utils.transaction.txCheck(transaction.transaction); - assert.equal(authResult, true); - commonAssertPb(transaction.transaction); - - transaction.transaction.raw_data_hex = transaction.transaction.raw_data_hex + '00'; - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction.transaction); - assert.equal(authResult2, false); - - transaction.transaction.txID = transaction.transaction.txID + '00' - const authResult3 = - TronWeb.utils.transaction.txCheck(transaction.transaction); - assert.equal(authResult3, false); - - transaction.transaction.raw_data.expiration = transaction.transaction.raw_data.expiration + '00'; - const tampResult = - TronWeb.utils.transaction.txCheck(transaction.transaction); - assert.equal(tampResult, false); - } - }); - - }); - - describe('#case FreezeBalanceContract', function () { - - it('it should return true', async function () { - const params = [ - [100e6, 3, 'BANDWIDTH', accounts.b58[1], { permissionId: 2 }], - [100e6, 3, 'BANDWIDTH', accounts.b58[1]] - ]; - - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.freezeBalance(...param); - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - commonAssertPb(transaction); - - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult2, false); - - transaction.txID = transaction.txID + '00' - const authResult3 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult3, false); - - transaction.raw_data.timestamp = transaction.raw_data.timestamp + '00'; - const tampResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(tampResult, false); - } - }) - - }); - - describe.skip('#case UnfreezeBalanceContract', function () { - // this is not fully testable because the minimum time before unfreezing is 3 days - async function freezeBandWith() { - const transaction = await tronWeb.transactionBuilder.freezeBalance(100e6, 3, 'BANDWIDTH', accounts.b58[1]); - await broadcaster(transaction, accounts.pks[1]); - while (true) { - const tx = await tronWeb.trx.getTransactionInfo(transaction.txID); - if (Object.keys(tx).length === 0) { - await wait(3); - continue; - } else { - break; - } - } - }; - - it('it should return true', async function () { - const params = [ - ['BANDWIDTH', accounts.b58[1], { permissionId: 2 }], - ['BANDWIDTH', accounts.b58[1]] - ]; - - for (let param of params) { - await freezeBandWith(); - const transaction = await tronWeb.transactionBuilder.unfreezeBalance(...param) - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - commonAssertPb(transaction); - - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult2, false); - - transaction.txID = transaction.txID + '00' - const authResult3 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult3, false); - } - }) - - }); - - describe.skip('#case WithdrawBalanceContract', function () { - - // this is not fully testable because the minimum time before withdrawBlockRewards is 1 days - // witnessAccount does not have any reward - - before(async () => { - await broadcaster(tronWeb.transactionBuilder.sendTrx(accounts.b58[1], 10000e6), PRIVATE_KEY); - const transaction = await tronWeb.transactionBuilder.applyForSR(accounts.b58[1], 'url.tron.network'); - await broadcaster(transaction, accounts.pks[1]); - while (true) { - const tx = await tronWeb.trx.getTransactionInfo(transaction.txID); - if (Object.keys(tx).length === 0) { - await wait(3); - continue; - } else { - break; - } - } - }); - - it(`it should return true`, async function () { - const params = [ - [accounts.b58[1], { permissionId: 2 }], - [accounts.b58[1]] - ]; - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.withdrawBlockRewards( - ...param - ); - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - commonAssertPb(transaction); - - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult2, false); - - transaction.txID = transaction.txID + '00' - const authResult3 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult3, false); - } - }); - }); - - describe('#case FreezeBalanceV2Contract', function () { - let params = []; - - before(async () => { - params = [ - [10e7, 'BANDWIDTH', accounts.b58[1], { permissionId: 2 }], - [10e7, 'BANDWIDTH', accounts.b58[1]] - ]; - }); - - it('should return true', async function () { - for (const param of params) { - const transaction = await tronWeb.transactionBuilder.freezeBalanceV2(...param); - - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult2, false); - - transaction.txID = transaction.txID + '00' - const authResult3 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult3, false); - } - }); - }); - - describe('#case UnfreezeBalanceV2Contract', function () { - let params = []; - - before(async () => { - params = [ - [10e6, 'BANDWIDTH', accounts.b58[1]], - [10e6, 'BANDWIDTH', accounts.b58[1], { permissionId: 2 }], - ]; - }); - - it('should return true', async function () { - for (const param of params) { - const freezeTx = await tronWeb.transactionBuilder.freezeBalanceV2(...param); - await broadcaster(null, accounts.pks[1], freezeTx); - await waitChainData('tx', freezeTx.txID); - const transaction = await tronWeb.transactionBuilder.unfreezeBalanceV2(...param); - - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult2, false); - - transaction.txID = transaction.txID + '00' - const authResult3 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult3, false); - } - }); - }); - - describe('#case DelegateResourceContract', function () { - let params = []; - - before(async () => { - params = [ - [10e6, accounts.b58[2], 'BANDWIDTH', accounts.b58[1], false, { permissionId: 2 }], - [10e6, accounts.b58[2], 'BANDWIDTH', accounts.b58[1], false] - ]; - const freezeTx = await tronWeb.transactionBuilder.freezeBalanceV2(10e8, 'BANDWIDTH', accounts.b58[1]); - await broadcaster(null, accounts.pks[1], freezeTx); - await waitChainData('tx', freezeTx.txID); - }); - - it('should return true', async function () { - for (const param of params) { - const transaction = await tronWeb.transactionBuilder.delegateResource(...param); - - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult2, false); - - transaction.txID = transaction.txID + '00' - const authResult3 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult3, false); - } - }); - }); - - describe('#case UnDelegateResourceContract', function () { - let params = []; - - before(async () => { - params = [ - [10e6, accounts.b58[2], 'BANDWIDTH', accounts.b58[1], { permissionId: 2 }], - [10e6, accounts.b58[2], 'BANDWIDTH', accounts.b58[1]] - ]; - }); - - it('should return true', async function () { - for (const param of params) { - const delegateTx = await tronWeb.transactionBuilder.delegateResource(...param); - await broadcaster(null, accounts.pks[1], delegateTx); - await waitChainData('tx', delegateTx.txID); - - const transaction = await tronWeb.transactionBuilder.undelegateResource(...param); - - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult2, false); - - transaction.txID = transaction.txID + '00' - const authResult3 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult3, false); - } - }); - }); - - describe('#case WithdrawExpireUnfreezeContract', function () { - let params = []; - - before(async () => { - params = [ - [accounts.b58[1], { permissionId: 2 }], - [accounts.b58[1]] - ]; - const freezeTx = await tronWeb.transactionBuilder.freezeBalanceV2(10e6, 'BANDWIDTH', ...params[1]); - await broadcaster(null, accounts.pks[1], freezeTx); - await waitChainData('tx', freezeTx.txID); - const unfreezeTx = await tronWeb.transactionBuilder.unfreezeBalanceV2(10e6, 'BANDWIDTH', ...params[1]); - await broadcaster(null, accounts.pks[1], unfreezeTx); - await waitChainData('tx', unfreezeTx.txID); - await wait(65); // freeze timeout in 60s in dev docker - }); - - it('should return true', async function () { - for (const param of params) { - const transaction = await tronWeb.transactionBuilder.withdrawExpireUnfreeze(...param); - - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult2, false); - - transaction.txID = transaction.txID + '00' - const authResult3 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult3, false); - } - }); - }); - - describe("#case WitnessCreateContract", async function () { - - let url = 'https://xtron.network'; - - it('should allow accounts[1] to apply for SR, it should return true', async function () { - - const params = [ - [accounts.b58[1], url, { permissionId: 2 }], - [accounts.b58[1], url] - ]; - - for (let param of params) { - const sendTrxTransaction = await tronWeb.transactionBuilder.sendTrx(accounts.b58[1], 11000e6); - await broadcaster(sendTrxTransaction, PRIVATE_KEY); - const transaction = await tronWeb.transactionBuilder.applyForSR(...param); - - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - commonAssertPb(transaction); - - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult2, false); - - transaction.txID = transaction.txID + '00' - const authResult3 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult3, false); - - transaction.raw_data.ref_block_hash = transaction.raw_data.ref_block_hash + '00'; - const tampResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(tampResult, false); - } - }); - - }); - - describe('#case VoteWitnessContract', function () { - - let url = 'https://xtron.network'; - - before(async function () { - - await broadcaster(tronWeb.transactionBuilder.sendTrx(accounts.b58[0], 10000e6), PRIVATE_KEY); - await broadcaster(tronWeb.transactionBuilder.applyForSR(accounts.b58[0], url), accounts.pks[0]) - await broadcaster(tronWeb.transactionBuilder.freezeBalanceV2(100e6, 'BANDWIDTH', accounts.b58[1]), accounts.pks[1]) - }) - - it('should allows accounts.b58[1] to vote for accounts[0] as SR, it should return true', async function () { - const list = [ - [ - { - [accounts.hex[0]]: 5, - }, - ], - [ - { - [accounts.hex[0]]: 5, - }, - 2, - ] - ] - for (const [votes, Permission_id] of list) { - const transaction = await tronWeb.transactionBuilder.vote( - votes, - accounts.b58[1], - { permissionId: Permission_id } - ); - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - commonAssertPb(transaction); - - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult2, false); - - transaction.txID = transaction.txID + '00' - const authResult3 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult3, false); - - transaction.raw_data.ref_block_bytes = transaction.raw_data.ref_block_bytes + '00'; - const tampResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(tampResult, false); - } - - }) - - }); - - describe("#case CreateSmartContract", function () { - it('should create a smart contract with default parameters, it should return true', async function () { - - const options = { - abi: testRevert.abi, - bytecode: testRevert.bytecode, - feeLimit: 8e7 - }; - for (let i = 0; i < 2; i++) { - if (i === 1) options.permissionId = 2; - const transaction = await tronWeb.transactionBuilder.createSmartContract(options) - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - commonAssertPb(transaction); - - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult2, false); - - transaction.txID = transaction.txID + '00' - const authResult3 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult3, false); - - transaction.raw_data.expiration = transaction.raw_data.expiration + '00'; - const tampResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(tampResult, false); - } - }); - }); - - describe("#case ClearABIContract", function () { - - let transaction; - let contract; - before(async function () { - this.timeout(20000); - - transaction = await tronWeb.transactionBuilder.createSmartContract({ - abi: testConstant.abi, - bytecode: testConstant.bytecode - }, accounts.hex[3]); - await broadcaster(null, accounts.pks[3], transaction); - await waitChainData('tx', transaction.txID); - }) - - it('should clear contract abi, it should return true', async function () { - this.timeout(10000); - - const contractAddress = transaction.contract_address; - const ownerAddress = accounts.hex[3]; - - const params = [ - // [contractAddress, ownerAddress, { permissionId: 2 }], // Not supported temporarily - [contractAddress, ownerAddress] - ]; - - for (let param of params) { - // verify contract abi before - contract = await tronWeb.trx.getContract(contractAddress); - assert.isTrue(Object.keys(contract.abi).length > 0) - - // clear abi - transaction = await tronWeb.transactionBuilder.clearABI(...param); - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - commonAssertPb(transaction); - - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult2, false); - - transaction.txID = transaction.txID + '00' - const authResult3 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult3, false); - - transaction.raw_data.timestamp = transaction.raw_data.timestamp + '00'; - const tampResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(tampResult, false); - } - - }); - }); - - describe("#case UpdateBrokerageContract", async function () { - before(async () => { - await broadcaster(tronWeb.transactionBuilder.sendTrx(accounts.b58[1], 10000e6), PRIVATE_KEY); - const transaction = await tronWeb.transactionBuilder.applyForSR(accounts.b58[1], 'url.tron.network'); - await broadcaster(transaction, accounts.pks[1]); - while (true) { - const tx = await tronWeb.trx.getTransactionInfo(transaction.txID); - if (Object.keys(tx).length === 0) { - await wait(3); - continue; - } else { - break; - } - } - }); - it('should auth sr brokerage successful', async function () { - let params = [ - // [10, accounts.hex[1], { permissionId: 2 }], // No suppored for multiSign - [10, accounts.hex[1]] - ]; - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.updateBrokerage(...param); - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - commonAssertPb(transaction); - - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult2, false); - - transaction.txID = transaction.txID + '00' - const authResult3 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult3, false); - - transaction.raw_data.ref_block_bytes = transaction.raw_data.ref_block_bytes + '00'; - const tampResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(tampResult, false); - } - }); - }); - - describe("#case AssetIssueContract", function () { - it(`should allow accounts[2] to create a TestToken`, async function () { - - const options = getTokenOptions(); - const createrAccountIdx = 4; - for (let i = 0; i < 2; i++) { - if (i === 1) options.permissionId = 2; - const transaction = await tronWeb.transactionBuilder.createToken(options, accounts.b58[createrAccountIdx]); - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - commonAssertPb(transaction); - - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult2, false); - - transaction.txID = transaction.txID + '00' - const authResult3 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult3, false); - - transaction.raw_data.ref_block_bytes = transaction.raw_data.ref_block_bytes + '00'; - const tampResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(tampResult, false); - } - }); - }); - - describe("#case UpdateAssetContract", function () { - let tokenOptions - let tokenID - - before(async function () { - - this.timeout(10000) - - tokenOptions = getTokenOptions(); - await broadcaster(tronWeb.transactionBuilder.createToken(tokenOptions, accounts.b58[3]), accounts.pks[3]) - - let tokenList - while (!tokenList) { - tokenList = await tronWeb.trx.getTokensIssuedByAddress(accounts.b58[3]) - } - if (isAllowSameTokenNameApproved) { - tokenID = tokenList[tokenOptions.name].id - } else { - tokenID = tokenList[tokenOptions.name].name - } - }); - - it(`should allow accounts[3] to update a TestToken`, async function () { - for (let i = 0; i < 2; i++) { - if (i === 1) UPDATED_TEST_TOKEN_OPTIONS.permissionId = 2; - const transaction = await tronWeb.transactionBuilder.updateToken(UPDATED_TEST_TOKEN_OPTIONS, accounts.b58[3]); - const authResult = TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - commonAssertPb(transaction); - - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult2, false); - - transaction.txID = transaction.txID + '00' - const authResult3 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult3, false); - - transaction.raw_data.ref_block_bytes = transaction.raw_data.ref_block_bytes + '00'; - const tampResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(tampResult, false); - } - }); - - }); - - describe("#case AccountCreateContract", function () { - it(`should create accounts[3]`, async function () { - const newAccount = await TronWeb.createAccount(); - const params = [ - [newAccount.address.base58, accounts.b58[3], { permissionId: 2 }], - [newAccount.address.base58, accounts.b58[3]] - ]; - - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.createAccount(...param); - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - commonAssertPb(transaction); - - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult2, false); - - transaction.txID = transaction.txID + '00' - const authResult3 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult3, false); - - transaction.raw_data.ref_block_hash = transaction.raw_data.ref_block_hash + '00'; - const tampResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(tampResult, false); - } - }); - }); - - describe("#case AccountUpdateContract", function () { - it(`should update accounts[3]`, async function () { - const newName = 'New name' - const params = [ - [newName, accounts.b58[3], { permissionId: 2 }], - [newName, accounts.b58[3]] - ]; - - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.updateAccount(...param); - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - commonAssertPb(transaction); - - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult2, false); - - transaction.txID = transaction.txID + '00' - const authResult3 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult3, false); - - transaction.raw_data.ref_block_hash = transaction.raw_data.ref_block_hash + '00'; - const tampResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(tampResult, false); - } - }); - }); - - describe("#case SetAccountIdContract", function () { - it(`should set account id accounts[3]`, async function () { - - for (let i = 0; i < 2; i++) { - let accountId = TronWeb.toHex('abcabc110'); - let param = [accountId, accounts.b58[3]] - if (i === 1) { - accountId = TronWeb.toHex('testtest'); - param = [accountId, accounts.b58[3], { permissionId: 2 }] - } - const transaction = await tronWeb.transactionBuilder.setAccountId(param[0]); - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - commonAssertPb(transaction); - - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult2, false); - - transaction.txID = transaction.txID + '00' - const authResult3 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult3, false); - - transaction.raw_data.ref_block_hash = transaction.raw_data.ref_block_hash + '00'; - const tampResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(tampResult, false); - } - - }); - }); - - describe("#case ProposalCreateContract", function () { - let parameters = [{ "key": 0, "value": 100000 }, { "key": 1, "value": 2 }] - before(async () => { - await broadcaster(tronWeb.transactionBuilder.sendTrx(accounts.b58[3], 10000e6), PRIVATE_KEY); - const transaction = await tronWeb.transactionBuilder.applyForSR(accounts.b58[3], 'url.tron.network'); - await broadcaster(transaction, accounts.pks[3]); - await waitChainData('tx', transaction.txID); - }); - - it('should allow the SR account to create a new proposal as a single object', async function () { - - const inputs = [ - [parameters[0], accounts.b58[3], { permissionId: 2 }], - [parameters[0], accounts.b58[3]] - ]; - for (let input of inputs) { - const transaction = await tronWeb.transactionBuilder.createProposal(...input) - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - commonAssertPb(transaction); - - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult2, false); - - transaction.txID = transaction.txID + '00' - const authResult3 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult3, false); - - transaction.raw_data.ref_block_bytes = transaction.raw_data.ref_block_bytes + '00'; - const tampResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(tampResult, false); - } - - }) - }); - - describe("#case ProposalDeleteContract", function () { - let proposals; - - before(async function () { - // comments below should be uncomment when first run - // const transaction = await tronWeb.transactionBuilder.applyForSR(ADDRESS_BASE58, 'url.tron.network'); - // await broadcaster(transaction, PRIVATE_KEY); - // await waitChainData('tx', transaction.txID); - - let parameters = [{ "key": 0, "value": 100000 }, { "key": 1, "value": 2 }] - - await broadcaster(tronWeb.transactionBuilder.createProposal(parameters, ADDRESS_BASE58), PRIVATE_KEY) - - proposals = await tronWeb.trx.listProposals(); - }) - - it('should allow the SR to delete its own proposal', async function () { - - const params = [ - [proposals[0].proposal_id, { permissionId: 2 }], - [proposals[0].proposal_id] - ]; - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.deleteProposal(...param) - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - commonAssertPb(transaction); - - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult2, false); - - transaction.txID = transaction.txID + '00' - const authResult3 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult3, false); - - transaction.raw_data.ref_block_bytes = transaction.raw_data.ref_block_bytes + '00'; - const tampResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(tampResult, false); - } - - }); - }); - - describe("#case ProposalApproveContract", function () { - let proposals; - - before(async function () { - - this.timeout(20000) - - const sendTrxTransaction = await tronWeb.transactionBuilder.sendTrx(accounts.b58[5], 10000e6); - await broadcaster(sendTrxTransaction, PRIVATE_KEY); - waitChainData('tx', sendTrxTransaction.txID); - const applyForSrTransaction = await tronWeb.transactionBuilder.applyForSR(accounts.b58[5], 'url.tron.network'); - await broadcaster(applyForSrTransaction, accounts.pks[5]); - waitChainData('tx', applyForSrTransaction.txID); - let parameters = [{ "key": 0, "value": 100000 }, { "key": 1, "value": 2 }] - - await broadcaster(tronWeb.transactionBuilder.createProposal(parameters, ADDRESS_BASE58), PRIVATE_KEY) - - proposals = await tronWeb.trx.listProposals(); - - }) - - it('should allow vote proposal', async function () { - - const params = [ - [proposals[0].proposal_id, true, accounts.b58[5], { permissionId: 2 }], - [proposals[0].proposal_id, true, accounts.b58[5]] - ]; - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.voteProposal(...param) - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - commonAssertPb(transaction); - - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult2, false); - - transaction.txID = transaction.txID + '00' - const authResult3 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult3, false); - - transaction.raw_data.ref_block_bytes = transaction.raw_data.ref_block_bytes + '00'; - const tampResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(tampResult, false); - } - - }) - }); - - describe("#case ExchangeCreateContract", function () { - const idxS = 4; - const idxE = 6; - const toIdx1 = 2; - const toIdx2 = 1; - let tokenNames = []; - - before(async function () { - this.timeout(20000); - - // create token - for (let i = idxS; i < idxE; i++) { - const options = getTokenOptions(); - const transaction = await tronWeb.transactionBuilder.createToken(options, accounts.hex[i]); - await broadcaster(null, accounts.pks[i], transaction); - await waitChainData('token', accounts.hex[i]); - const token = await tronWeb.trx.getTokensIssuedByAddress(accounts.hex[i]); - await waitChainData('tokenById', token[Object.keys(token)[0]]['id']); - await broadcaster(null, accounts.pks[i], await tronWeb.transactionBuilder.sendToken( - accounts.hex[toIdx1], - 10e4, - token[Object.keys(token)[0]]['id'], - token[Object.keys(token)[0]]['owner_address'] - )); - await waitChainData('sendToken', accounts.hex[toIdx1], 0); - await broadcaster(null, accounts.pks[i], await tronWeb.transactionBuilder.sendToken( - accounts.hex[toIdx2], - 10e4, - token[Object.keys(token)[0]]['id'], - token[Object.keys(token)[0]]['owner_address'] - )); - await waitChainData('sendToken', accounts.hex[toIdx2], 0); - tokenNames.push(token[Object.keys(token)[0]]['id']); - } - - }); - - it('should create token exchange', async function () { - let transaction = await tronWeb.transactionBuilder.createTokenExchange(tokenNames[0], 10e3, tokenNames[1], 10e3, accounts.hex[toIdx1]); - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - commonAssertPb(transaction); - - transaction = await tronWeb.transactionBuilder.createTokenExchange(tokenNames[0], 10e3, tokenNames[1], 10e3, accounts.hex[toIdx1], { permissionId: 2 }); - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult2, true); - commonAssertPb(transaction); - - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const authResult3 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult3, false); - - transaction.txID = transaction.txID + '00' - const authResult4 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult4, false); - - transaction.raw_data.ref_block_hash = transaction.raw_data.ref_block_hash + '00'; - const tampResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(tampResult, false); - }); - }); - - describe("#case ExchangeInjectContract", function () { - const idxS = 6; - const idxE = 8; - let tokenNames = []; - let exchangeId = ''; - - before(async function () { - this.timeout(20000); - - // create token - for (let i = idxS; i < idxE; i++) { - const options = getTokenOptions(); - const transaction = await tronWeb.transactionBuilder.createToken(options, accounts.hex[i]); - await broadcaster(null, accounts.pks[i], transaction); - await waitChainData('token', accounts.hex[i]); - const token = await tronWeb.trx.getTokensIssuedByAddress(accounts.hex[i]); - await waitChainData('tokenById', token[Object.keys(token)[0]]['id']); - await broadcaster(null, accounts.pks[i], await tronWeb.transactionBuilder.sendToken( - tronWeb.defaultAddress.hex, - 10e4, - token[Object.keys(token)[0]]['id'], - token[Object.keys(token)[0]]['owner_address'] - )); - tokenNames.push(token[Object.keys(token)[0]]['id']); - } - const transaction = await tronWeb.transactionBuilder.createTokenExchange(tokenNames[1], 10, tokenNames[0], 10); - await broadcaster(null, PRIVATE_KEY, transaction); - let receipt = await tronWeb.trx.getTransactionInfo(transaction.txID); - while (!Object.keys(receipt).length) { - await wait(5); - receipt = await tronWeb.trx.getTransactionInfo(transaction.txID); - } - exchangeId = receipt.exchange_id; - }); - it(`it should return true`, async function () { - const params = [ - [exchangeId, tokenNames[0], 10, { permissionId: 2 }], - [exchangeId, tokenNames[0], 10] - ]; - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.injectExchangeTokens( - ...param - ); - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - commonAssertPb(transaction); - - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult2, false); - - transaction.txID = transaction.txID + '00' - const authResult3 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult3, false); - - transaction.raw_data.ref_block_hash = transaction.raw_data.ref_block_hash + '00'; - const tampResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(tampResult, false); - } - }); - }); - - describe("#case ExchangeWithdrawContract", function () { - const idxS = 0; - const idxE = 2; - let tokenNames = []; - let exchangeId = ''; - - before(async function () { - this.timeout(20000); - - // create token - for (let i = idxS; i < idxE; i++) { - const options = getTokenOptions(); - const transaction = await tronWeb.transactionBuilder.createToken(options, accounts.hex[i]); - await broadcaster(null, accounts.pks[i], transaction); - await waitChainData('token', accounts.hex[i]); - const token = await tronWeb.trx.getTokensIssuedByAddress(accounts.hex[i]); - await waitChainData('tokenById', token[Object.keys(token)[0]]['id']); - await broadcaster(null, accounts.pks[i], await tronWeb.transactionBuilder.sendToken( - tronWeb.defaultAddress.hex, - 10e4, - token[Object.keys(token)[0]]['id'], - token[Object.keys(token)[0]]['owner_address'] - )); - tokenNames.push(token[Object.keys(token)[0]]['id']); - } - const transaction = await tronWeb.transactionBuilder.createTokenExchange(tokenNames[1], 10, tokenNames[0], 10); - await broadcaster(transaction); - let receipt = await tronWeb.trx.getTransactionInfo(transaction.txID); - while (!Object.keys(receipt).length) { - await wait(5); - receipt = await tronWeb.trx.getTransactionInfo(transaction.txID); - } - exchangeId = receipt.exchange_id; - - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult2, false); - - }); - it(`it should return true`, async function () { - const params = [ - [exchangeId, tokenNames[0], 10, { permissionId: 2 }], - [exchangeId, tokenNames[0], 10] - ]; - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.withdrawExchangeTokens( - ...param - ); - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - commonAssertPb(transaction); - - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult2, false); - - transaction.txID = transaction.txID + '00' - const authResult3 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult3, false); - - transaction.raw_data.ref_block_bytes = transaction.raw_data.ref_block_bytes + '00'; - const tampResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(tampResult, false); - } - }); - }); - - describe("#case ExchangeTransactionContract", function () { - const idxS = 8; - const idxE = 10; - let tokenNames = []; - let exchangeId = ''; - - before(async function () { - this.timeout(20000); - - // create token - for (let i = idxS; i < idxE; i++) { - const options = getTokenOptions(); - const transaction = await tronWeb.transactionBuilder.createToken(options, accounts.hex[i]); - await broadcaster(null, accounts.pks[i], transaction); - await waitChainData('token', accounts.hex[i]); - const token = await tronWeb.trx.getTokensIssuedByAddress(accounts.hex[i]); - await waitChainData('tokenById', token[Object.keys(token)[0]]['id']); - await broadcaster(null, accounts.pks[i], await tronWeb.transactionBuilder.sendToken( - tronWeb.defaultAddress.hex, - 10e4, - token[Object.keys(token)[0]]['id'], - token[Object.keys(token)[0]]['owner_address'] - )); - tokenNames.push(token[Object.keys(token)[0]]['id']); - } - const transaction = await tronWeb.transactionBuilder.createTokenExchange(tokenNames[1], 10, tokenNames[0], 10); - await broadcaster(transaction); - let receipt = await tronWeb.trx.getTransactionInfo(transaction.txID); - while (!Object.keys(receipt).length) { - await wait(5); - receipt = await tronWeb.trx.getTransactionInfo(transaction.txID); - } - exchangeId = receipt.exchange_id; - }); - it(`it should return true`, async function () { - const params = [ - [exchangeId, tokenNames[0], 10, 5, { permissionId: 2 }], - [exchangeId, tokenNames[0], 10, 5] - ]; - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.tradeExchangeTokens( - ...param - ); - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - commonAssertPb(transaction); - - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult2, false); - - transaction.txID = transaction.txID + '00' - const authResult3 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult3, false); - - transaction.raw_data.ref_block_bytes = transaction.raw_data.ref_block_bytes + '00'; - const tampResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(tampResult, false); - } - }); - }); - - describe("#case UpdateSettingContract", function () { - let transaction; - before(async function () { - this.timeout(20000); - - transaction = await tronWeb.transactionBuilder.createSmartContract({ - abi: testConstant.abi, - bytecode: testConstant.bytecode - }, accounts.hex[3]); - await broadcaster(null, accounts.pks[3], transaction); - while (true) { - const tx = await tronWeb.trx.getTransactionInfo(transaction.txID); - if (Object.keys(tx).length === 0) { - await wait(3); - continue; - } else { - break; - } - } - }) - it(`it should return true`, async function () { - const params = [ - [transaction.contract_address, 10, accounts.b58[3], { permissionId: 2 }], - [transaction.contract_address, 20, accounts.b58[3]] - ]; - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.updateSetting( - ...param - ); - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - commonAssertPb(transaction); - - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult2, false); - - transaction.txID = transaction.txID + '00' - const authResult3 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult3, false); - - transaction.raw_data.ref_block_bytes = transaction.raw_data.ref_block_bytes + '00'; - const tampResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(tampResult, false); - } - }); - }); - - describe("#case UpdateEnergyLimitContract", function () { - let transaction; - before(async function () { - this.timeout(20000); - - transaction = await tronWeb.transactionBuilder.createSmartContract({ - abi: testConstant.abi, - bytecode: testConstant.bytecode - }, accounts.hex[3]); - await broadcaster(null, accounts.pks[3], transaction); - while (true) { - const tx = await tronWeb.trx.getTransactionInfo(transaction.txID); - if (Object.keys(tx).length === 0) { - await wait(3); - continue; - } else { - break; - } - } - }) - it(`it should return true`, async function () { - const params = [ - [transaction.contract_address, 10e6, accounts.b58[3], { permissionId: 2 }], - [transaction.contract_address, 10e6, accounts.b58[3]] - ]; - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.updateEnergyLimit( - ...param - ); - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - commonAssertPb(transaction); - - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult2, false); - - transaction.txID = transaction.txID + '00' - const authResult3 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult3, false); - - transaction.raw_data.ref_block_bytes = transaction.raw_data.ref_block_bytes + '00'; - const tampResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(tampResult, false); - } - }); - }); - - describe("#case AccountPermissionUpdateContract", function () { - before(async () => { - await broadcaster(tronWeb.transactionBuilder.sendTrx(accounts.b58[6], 10000e6), PRIVATE_KEY); - const transaction = await tronWeb.transactionBuilder.applyForSR(accounts.b58[6], 'url.tron.network'); - await broadcaster(transaction, accounts.pks[6]); - while (true) { - const tx = await tronWeb.trx.getTransactionInfo(transaction.txID); - if (Object.keys(tx).length === 0) { - await wait(3); - continue; - } else { - break; - } - } - }); - it(`it should return true`, async function () { - const permissionData = { - "owner": { - "type": 0, - "keys": [ - { - "address": accounts.hex[6], - "weight": 1 - } - ], - "threshold": 1, - "permission_name": "owner" - }, - "witness": { - "keys": [ - { - "address": accounts.hex[6], - "weight": 1 - } - ], - "threshold": 1, - "id": 1, - "type": 1, - "permission_name": "witness" - }, - "owner_address": accounts.hex[6], - "actives": [ - { - "operations": "7fff1fc0033e0000000000000000000000000000000000000000000000000000", - "keys": [ - { - "address": accounts.hex[6], - "weight": 1 - } - ], - "threshold": 1, - "id": 2, - "type": 2, - "permission_name": "active" - } - ] - }; - const params = [ - [accounts.hex[6], permissionData.owner, permissionData.witness, permissionData.actives] // No suppored for multiSign - ]; - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.updateAccountPermissions( - ...param - ); - const authResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult, true); - commonAssertPb(transaction); - - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const authResult2 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult2, false); - - transaction.txID = transaction.txID + '00' - const authResult3 = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(authResult3, false); - - transaction.raw_data.timestamp = transaction.raw_data.timestamp + '00'; - const tampResult = - TronWeb.utils.transaction.txCheck(transaction); - assert.equal(tampResult, false); - } - }); - }); - - }); - - describe('#txCheckWithArgs', function () { - - const commonAssertFalse = (methodName, generateData, params) => { - it(`it should return false when transaction data is tampered`, async function () { - for (const param of params) { - const transaction = await tronWeb.transactionBuilder[methodName]( - ...param - ); - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const data = generateData(param); - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, data, param[3] || {}); - assert.equal(authResult, false); - } - }); - it(`it should return false when txID is tampered`, async function () { - for (const param of params) { - const transaction = await tronWeb.transactionBuilder[methodName]( - ...param - ); - transaction.txID = transaction.txID + '00'; - const data = generateData(param); - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, data, param[3] || {}); - assert.equal(authResult, false); - } - }); - }; - - const commonAssertPbWithArgs = (transaction, args, options) => { - const transactionPb = TronWeb.utils.transaction.txJsonToPbWithArgs(transaction, args, options); - const rawDataBytes = transactionPb.getRawData().serializeBinary(); - const txID = TronWeb.utils.ethersUtils.sha256(rawDataBytes); - - assert.equal(txID.replace(/^0x/, ''), transaction.txID); - }; - - describe('#case TransferContract', function () { - const params = []; - const generateData = (param) => { - return { - to_address: TronWeb.address.toHex(param[0]), - owner_address: tronWeb.defaultAddress.hex, - amount: param[1], - Permission_id: param[2]?.permissionId, - }; - } - before(() => { - params.push([accounts.b58[1], 10, { permissionId: 2 }]); - params.push([accounts.b58[1], 10]); - }) - it(`it should return true`, async function () { - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.sendTrx( - ...param - ); - const data = generateData(param); - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, data, param[3] || {}); - assert.equal(authResult, true); - commonAssertPbWithArgs(transaction, data, param[3] || {}); - } - }); - commonAssertFalse('sendTrx', generateData, params); - }); - - describe('#case TransferAssetContract', function () { - - let tokenOptions - let tokenID - const params = []; - - const generateData = (param) => { - return { - to_address: tronWeb.address.toHex(param[0]), - owner_address: tronWeb.address.toHex(param[3]), - asset_name: tronWeb.fromUtf8(param[2]), - amount: parseInt(param[1]), - Permission_id: param[4]?.permissionId, - }; - }; - - before(async function () { - - tokenOptions = getTokenOptions(); - - await broadcaster(tronWeb.transactionBuilder.createToken(tokenOptions, accounts.b58[13]), accounts.pks[13]) - - let tokenList - await waitChainData('token', accounts.b58[13]); - tokenList = await tronWeb.trx.getTokensIssuedByAddress(accounts.b58[13]); - if (isAllowSameTokenNameApproved) { - tokenID = tokenList[tokenOptions.name].id - } else { - tokenID = tokenList[tokenOptions.name].name - } - - params.push(...[ - [accounts.b58[1], 5, tokenID, accounts.b58[13], { permissionId: 2 }], - [accounts.b58[1], 5, tokenID, accounts.b58[13]] - ]); - }); - - it(`it should return true`, async function () { - - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.sendToken( - ...param - ); - const data = generateData(param); - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, data); - assert.equal(authResult, true); - commonAssertPbWithArgs(transaction, data); - } - }); - - commonAssertFalse('sendToken', generateData, params); - }); - - describe('#case ParticipateAssetIssueContract', function () { - - let tokenOptions - let tokenID - const params = []; - - const generateData = (param) => { - return { - to_address: tronWeb.address.toHex(param[0]), - owner_address: tronWeb.address.toHex(param[3]), - asset_name: tronWeb.fromUtf8(param[1]), - amount: parseInt(param[2]), - Permission_id: param[4]?.permissionId, - }; - }; - - before(async function () { - tokenOptions = getTokenOptions(); - tokenOptions.saleEnd += 60 * 60 * 1000; - await broadcaster(tronWeb.transactionBuilder.createToken(tokenOptions, accounts.b58[12]), accounts.pks[12]) - await waitChainData('token', accounts.b58[12]); - let tokenList = await tronWeb.trx.getTokensIssuedByAddress(accounts.b58[12]); - if (isAllowSameTokenNameApproved) { - tokenID = tokenList[tokenOptions.name].id - } else { - tokenID = tokenList[tokenOptions.name].name - } - assert.equal(tokenList[tokenOptions.name].abbr, tokenOptions.abbreviation) - params.push(...[ - [accounts.b58[12], tokenID, 20, accounts.b58[0], { permissionId: 2 }], - [accounts.b58[12], tokenID, 20, accounts.b58[0]] - ]); - await wait(4); - }); - - it(`it should return true`, async function () { - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.purchaseToken( - ...param - ); - const data = generateData(param); - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, data); - assert.equal(authResult, true); - commonAssertPbWithArgs(transaction, data); - } - }); - commonAssertFalse('purchaseToken', generateData, params); - }); - - describe('#case TriggerSmartContract', function () { - - let transaction; - const params = []; - - const generateData = (param) => { - const args = { - contract_address: tronWeb.address.toHex(param[0]), - owner_address: param[4], - }; - - let parameters = param[3]; - const abiCoder = new AbiCoder(); - let types = []; - const values = []; - for (let i = 0; i < parameters.length; i++) { - let {type, value} = parameters[i]; - if (type === 'address') - value = tronWeb.address.toHex(value).replace(/^0x/, ''); - else if (type.match(/^([^\x5b]*)(\x5b|$)/)[0] === 'address[') - value = value.map(v => tronWeb.address.toHex(v).replace(/^0x/, '')); - - types.push(type); - values.push(value); - } - parameters = abiCoder.encode(types, values).replace(/^0x/, ''); - args.function_selector = param[1].replace('/\s+/g', ''); - args.parameter = parameters; - args.Permission_id = param[2].permissionId; - args.call_value = 0; - args.fee_limit = tronWeb.feeLimit; - return args; - }; - - before(async function () { - transaction = await tronWeb.transactionBuilder.createSmartContract({ - abi: testConstant.abi, - bytecode: testConstant.bytecode - }, accounts.hex[1]); - await broadcaster(null, accounts.pks[1], transaction); - await waitChainData('tx', transaction.txID); - - params.push(...[ - [ - transaction.contract_address, - 'testPure(uint256,uint256)', - {}, - [ - { type: 'uint256', value: 1 }, - { type: 'uint256', value: 2 } - ], - accounts.hex[1], - ], - [ - transaction.contract_address, - 'testPure(uint256,uint256)', - { - permissionId: 2, - }, - [ - { type: 'uint256', value: 1 }, - { type: 'uint256', value: 2 } - ], - accounts.hex[1], - ] - ]); - }) - - it('should trigger smart contract successfully', async function () { - for (const param of params) { - transaction = await tronWeb.transactionBuilder.triggerSmartContract( - ...param - ); - const args = generateData(param); - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction.transaction, args); - assert.equal(authResult, true); - commonAssertPbWithArgs(transaction.transaction, args); - } - }); - - it(`it should return false when transaction data is tampered`, async function () { - for (const param of params) { - const { transaction } = await tronWeb.transactionBuilder['triggerSmartContract']( - ...param - ); - transaction.raw_data_hex = transaction.raw_data_hex + '00'; - const data = generateData(param); - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, data, param[3] || {}); - assert.equal(authResult, false); - } - }); - - it(`it should return false when txID is tampered`, async function () { - for (const param of params) { - const { transaction } = await tronWeb.transactionBuilder['triggerSmartContract']( - ...param - ); - transaction.txID = transaction.txID + '00'; - const data = generateData(param); - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, data, param[3] || {}); - assert.equal(authResult, false); - } - }); - }); - - describe('#case FreezeBalanceContract', function () { - const params = []; - const generateData = (param) => { - return { - owner_address: tronWeb.address.toHex(param[3]), - frozen_balance: parseInt(param[0]), - frozen_duration: parseInt(param[1]), - resource: param[2], - Permission_id: param[4]?.permissionId, - }; - }; - - before(() => { - params.push(...[ - [100e6, 3, 'BANDWIDTH', accounts.b58[1], { permissionId: 2 }], - [100e6, 3, 'BANDWIDTH', accounts.b58[1]] - ]); - }) - - it('it should return true', async function () { - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.freezeBalance(...param); - const data = generateData(param); - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, data); - assert.equal(authResult, true); - commonAssertPbWithArgs(transaction, data); - } - }); - commonAssertFalse('freezeBalance', generateData, params); - }); - - describe.skip('#case UnfreezeBalanceContract', function () { - - async function freezeBandWith() { - const transaction = await tronWeb.transactionBuilder.freezeBalance(100e6, 3, 'BANDWIDTH', accounts.b58[1]); - await broadcaster(transaction, accounts.pks[1]); - await waitChainData('tx', transaction.txID); - }; - - it('it should return true', async function () { - const params = [ - ['BANDWIDTH', accounts.b58[1], { permissionId: 2 }], - ['BANDWIDTH', accounts.b58[1]] - ]; - - for (let param of params) { - await freezeBandWith(); - const transaction = await tronWeb.transactionBuilder.unfreezeBalance(...param) - const data = { - owner_address: tronWeb.address.toHex(param[1]), - resource: param[0], - Permission_id: param[2]?.permissionId, - } - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, data); - assert.equal(authResult, true); - commonAssertPbWithArgs(transaction, data); - } - }) - - }); - - describe.skip('#case WithdrawBalanceContract', function () { - - // todo, need check, new case for withdrawBlockRewards - - // before, todo - - it(`it should return true`, async function () { - const params = [ - [accounts.b58[1], { permissionId: 2 }], - [accounts.b58[1]] - ]; - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.withdrawBlockRewards( - ...param - ); - const data = { - owner_address: tronWeb.address.toHex(param[0]), - Permission_id: param[1]?.permissionId, - }; - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, data); - assert.equal(authResult, true); - commonAssertPbWithArgs(transaction, data); - } - }); - }); - - describe('#case FreezeBalanceV2Contract', function () { - const params = []; - - const generateData = (param) => { - return { - frozen_balance: parseInt(param[0]), - resource: param[1], - owner_address: tronWeb.address.toHex(param[2]), - Permission_id: param[3]?.permissionId, - }; - }; - - before(async () => { - params.push(...[ - [10e7, 'BANDWIDTH', accounts.b58[1], { permissionId: 2 }], - [10e7, 'BANDWIDTH', accounts.b58[1]] - ]); - }); - - it('should return true', async function () { - for (const param of params) { - const transaction = await tronWeb.transactionBuilder.freezeBalanceV2(...param); - const data = generateData(param); - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, data); - assert.equal(authResult, true); - commonAssertPbWithArgs(transaction, data); - } - }); - commonAssertFalse('freezeBalanceV2', generateData, params); - }); - - describe('#case UnfreezeBalanceV2Contract', function () { - const params = []; - - const generateData = (param) => { - return { - unfreeze_balance: param[0], - resource: param[1], - owner_address: tronWeb.address.toHex(param[2]), - Permission_id: param[3]?.permissionId, - }; - }; - - before(async () => { - params.push(...[ - [10e6, 'BANDWIDTH', accounts.b58[1]], - [10e6, 'BANDWIDTH', accounts.b58[1], { permissionId: 2 }], - ]); - }); - - it('should return true', async function () { - for (const param of params) { - const freezeTx = await tronWeb.transactionBuilder.freezeBalanceV2(...param); - await broadcaster(null, accounts.pks[1], freezeTx); - await waitChainData('tx', freezeTx.txID); - const transaction = await tronWeb.transactionBuilder.unfreezeBalanceV2(...param); - const data = generateData(param); - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, data); - assert.equal(authResult, true); - commonAssertPbWithArgs(transaction, data); - } - }); - commonAssertFalse('unfreezeBalanceV2', generateData, params); - }); - - describe('#case DelegateResourceContract', function () { - const params = []; - - const generateData = (param) => { - return { - balance: parseInt(param[0]), - resource: param[2], - owner_address: tronWeb.address.toHex(param[3]), - receiver_address: tronWeb.address.toHex(param[1]), - lock: param[4], - Permission_id: param[5]?.permissionId, - }; - }; - - before(async () => { - params.push(...[ - [10e6, accounts.b58[2], 'BANDWIDTH', accounts.b58[1], false, { permissionId: 2 }], - [10e6, accounts.b58[2], 'BANDWIDTH', accounts.b58[1], false] - ]); - const freezeTx = await tronWeb.transactionBuilder.freezeBalanceV2(10e8, 'BANDWIDTH', accounts.b58[1]); - await broadcaster(null, accounts.pks[1], freezeTx); - await waitChainData('tx', freezeTx.txID); - }); - - it('should return true', async function () { - for (const param of params) { - const transaction = await tronWeb.transactionBuilder.delegateResource(...param); - const data = generateData(param); - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, data); - assert.equal(authResult, true); - commonAssertPbWithArgs(transaction, data); - } - }); - commonAssertFalse('delegateResource', generateData, params); - }); - - describe('#case UnDelegateResourceContract', function () { - const params = []; - - const generateData = (param) => { - return { - balance: parseInt(param[0]), - resource: param[2], - owner_address: tronWeb.address.toHex(param[3]), - receiver_address: tronWeb.address.toHex(param[1]), - Permission_id: param[4]?.permissionId, - }; - }; - - before(async () => { - params.push(...[ - [10e6, accounts.b58[2], 'BANDWIDTH', accounts.b58[1], { permissionId: 2 }], - [10e6, accounts.b58[2], 'BANDWIDTH', accounts.b58[1]] - ]); - }); - - it('should return true', async function () { - for (const param of params) { - const delegateTx = await tronWeb.transactionBuilder.delegateResource(...param); - await broadcaster(null, accounts.pks[1], delegateTx); - await waitChainData('tx', delegateTx.txID); - const transaction = await tronWeb.transactionBuilder.undelegateResource(...param); - const data = generateData(param); - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, data); - assert.equal(authResult, true); - commonAssertPbWithArgs(transaction, data); - } - }); - commonAssertFalse('undelegateResource', generateData, params); - }); - - describe('#case WithdrawExpireUnfreezeContract', function () { - const params = []; - - const generateData = (param) => { - return { - owner_address: tronWeb.address.toHex(param[0]), - Permission_id: param[1]?.permissionId, - }; - }; - - before(async () => { - params.push([accounts.b58[1], { permissionId: 2 }]); - params.push([accounts.b58[1]]); - const freezeTx = await tronWeb.transactionBuilder.freezeBalanceV2(10e6, 'BANDWIDTH', ...params[1]); - await broadcaster(null, accounts.pks[1], freezeTx); - await waitChainData('tx', freezeTx.txID); - const unfreezeTx = await tronWeb.transactionBuilder.unfreezeBalanceV2(10e6, 'BANDWIDTH', ...params[1]); - await broadcaster(null, accounts.pks[1], unfreezeTx); - await waitChainData('tx', unfreezeTx.txID); - await wait(65); // freeze timeout in 60s in dev docker - }); - - it('should return true', async function () { - for (const param of params) { - const transaction = await tronWeb.transactionBuilder.withdrawExpireUnfreeze(...param); - const data = generateData(param); - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, data); - assert.equal(authResult, true); - commonAssertPbWithArgs(transaction, data); - } - }); - commonAssertFalse('withdrawExpireUnfreeze', generateData, params); - }); - - describe("#case WitnessCreateContract", async function () { - - let url = 'https://xtron.network'; - const params = []; - - const generateData = (param) => { - return { - owner_address: tronWeb.address.toHex(param[0]), - url: tronWeb.fromUtf8(param[1]), - Permission_id: param[2]?.permissionId, - }; - }; - - before(() => { - params.push(...[ - [accounts.b58[13], url, { permissionId: 2 }], - [accounts.b58[13], url], - ]); - }); - - it('should allow accounts[1] to apply for SR, it should return true', async function () { - for (const param of params) { - const sendTrxTransaction = tronWeb.transactionBuilder.sendTrx(param[0], 11000e6); - await broadcaster(sendTrxTransaction, PRIVATE_KEY); - const transaction = await tronWeb.transactionBuilder.applyForSR(...param); - const data = generateData(param); - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, data); - assert.equal(authResult, true); - commonAssertPbWithArgs(transaction, data); - } - }); - commonAssertFalse('applyForSR', generateData, params); - }); - - describe('#case VoteWitnessContract', function () { - - let url = 'https://xtron.network'; - const params = []; - const generateData = (param) => { - return { - owner_address: tronWeb.address.toHex(accounts.b58[1]), - votes: Object.entries(param[0]).map(([address, voteCount]) => { - return { - vote_address: TronWeb.address.toHex(address), - vote_count: parseInt(voteCount), - }; - }), - Permission_id: param[2]?.permissionId, - }; - }; - - before(async function () { - params.push(...[ - [ - { - [accounts.hex[12]]: 5, - }, - accounts.b58[1], - ], - [ - { - [accounts.hex[12]]: 5, - }, - accounts.b58[1], - 2, - ] - ]); - await broadcaster(tronWeb.transactionBuilder.sendTrx(accounts.b58[12], 10000e6), PRIVATE_KEY); - await broadcaster(tronWeb.transactionBuilder.applyForSR(accounts.b58[12], url), accounts.pks[12]) - await broadcaster(tronWeb.transactionBuilder.freezeBalanceV2(100e6, 'BANDWIDTH', accounts.b58[1]), accounts.pks[1]) - }) - - it('should allows accounts.b58[1] to vote for accounts[12] as SR, it should return true', async function () { - for (const param of params) { - const transaction = await tronWeb.transactionBuilder.vote( - ...param - ); - const data = generateData(param); - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, data); - assert.equal(authResult, true); - commonAssertPbWithArgs(transaction, data); - } - - }); - commonAssertFalse('vote', generateData, params); - }); - - describe("#case CreateSmartContract", function () { - it('should create a smart contract with default parameters, it should return true', async function () { - - const options = { - abi: testRevert.abi, - bytecode: testRevert.bytecode, - feeLimit: 8e7 - }; - for (let i = 0; i < 2; i++) { - if (i === 1) options.permissionId = 2; - const transaction = await tronWeb.transactionBuilder.createSmartContract(options) - const args = { - owner_address: tronWeb.defaultAddress.hex, - fee_limit: parseInt(options.feeLimit), - call_value: 0, - consume_user_resource_percent: 100, - origin_energy_limit: 10_000_000, - abi: JSON.stringify(options.abi), - bytecode: options.bytecode, - parameter: '', - name: '', - Permission_id: options.permissionId, - }; - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, args, options); - assert.equal(authResult, true); - commonAssertPbWithArgs(transaction, args, options); - } - }); - }); - - describe("#case ClearABIContract", function () { - - let transaction; - let contract; - const params = []; - - before(async function () { - transaction = await tronWeb.transactionBuilder.createSmartContract({ - abi: testConstant.abi, - bytecode: testConstant.bytecode - }, accounts.hex[3]); - await broadcaster(null, accounts.pks[3], transaction); - await waitChainData('tx', transaction.txID); - params.push(...[ - // [transaction.contract_address, accounts.hex[3], { permissionId: 2 }], - [transaction.contract_address, accounts.hex[3]], - ]) - }) - - it('should clear contract abi, it should return true', async function () { - const contractAddress = transaction.contract_address; - // verify contract abi before - contract = await tronWeb.trx.getContract(contractAddress); - assert.isTrue(Object.keys(contract.abi).length > 0) - - for (const param of params) { - // clear abi - transaction = await tronWeb.transactionBuilder.clearABI(...param); - const data = { - contract_address: tronWeb.address.toHex(param[0]), - owner_address: param[1], - Permission_id: param[2]?.permissionId, - }; - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, data); - assert.equal(authResult, true); - commonAssertPbWithArgs(transaction, data); - } - }); - }); - - describe("#case UpdateBrokerageContract", async function () { - before(async () => { - await broadcaster(tronWeb.transactionBuilder.sendTrx(accounts.b58[13], 10000e6), PRIVATE_KEY); - const transaction = await tronWeb.transactionBuilder.applyForSR(accounts.b58[13], 'url.tron.network'); - await broadcaster(transaction, accounts.pks[13]); - await waitChainData('tx', transaction.txID); - }); - it('should auth sr brokerage successful', async function () { - const transaction = await tronWeb.transactionBuilder.updateBrokerage(10, accounts.hex[13]); - const data = { - brokerage: 10, - owner_address: accounts.hex[13], - }; - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, data); - assert.equal(authResult, true); - commonAssertPbWithArgs(transaction, data); - }); - }); - - describe("#case AssetIssueContract", function () { - it(`should allow accounts[2] to create a TestToken`, async function () { - - const options = getTokenOptions(); - const createrAccountIdx = 11; - for (let i = 0; i < 2; i++) { - if (i === 1) options.permissionId = 2; - const transaction = await tronWeb.transactionBuilder.createToken(options, accounts.b58[createrAccountIdx]); - const { - name = false, - abbreviation = false, - description = false, - url = false, - totalSupply = 0, - trxRatio = 1, // How much TRX will `tokenRatio` cost? - tokenRatio = 1, // How many tokens will `trxRatio` afford? - saleStart = Date.now(), - saleEnd = false, - freeBandwidth = 0, // The creator's "donated" bandwidth for use by token holders - freeBandwidthLimit = 0, // Out of `totalFreeBandwidth`, the amount each token holder get - frozenAmount = 0, - frozenDuration = 0, - // for now there is no default for the following values - } = options; - const data = { - owner_address: accounts.hex[createrAccountIdx], - name: tronWeb.fromUtf8(name), - abbr: tronWeb.fromUtf8(abbreviation), - description: tronWeb.fromUtf8(description), - url: tronWeb.fromUtf8(url), - total_supply: parseInt(totalSupply), - trx_num: parseInt(trxRatio), - num: parseInt(tokenRatio), - start_time: parseInt(saleStart), - end_time: parseInt(saleEnd), - free_asset_net_limit: parseInt(freeBandwidth), - public_free_asset_net_limit: parseInt(freeBandwidthLimit), - frozen_supply: { - frozen_amount: parseInt(frozenAmount), - frozen_days: parseInt(frozenDuration) - }, - Permission_id: options.permissionId, - } - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, data, options); - assert.equal(authResult, true); - commonAssertPbWithArgs(transaction, data, options); - - } - }); - }); - - describe("#case AccountCreateContract", function () { - const params = []; - const generateData = (param) => { - return { - account_address: tronWeb.address.toHex(param[0]), - owner_address: tronWeb.address.toHex(param[1]), - Permission_id: param[2]?.permissionId - }; - }; - - it(`should create a new account`, async function () { - const newAccount = await TronWeb.createAccount(); - params.push(...[ - [newAccount.address.base58, accounts.b58[3], { permissionId: 2 }], - [newAccount.address.base58, accounts.b58[3]] - ]); - - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.createAccount(...param); - const data = generateData(param); - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, data); - assert.equal(authResult, true); - commonAssertPbWithArgs(transaction, data); - } - }); - commonAssertFalse('createAccount', generateData, params); - }); - - describe("#case AccountUpdateContract", function () { - const params = []; - const generateData = (param) => { - return { - account_name: tronWeb.fromUtf8(param[0]), - owner_address: tronWeb.address.toHex(param[1]), - Permission_id: param[2]?.permissionId - }; - }; - - it(`should update accounts[3]`, async function () { - const newName = 'New name' - params.push(...[ - [newName, accounts.b58[3], { permissionId: 2 }], - [newName, accounts.b58[3]] - ]); - - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.updateAccount(...param); - const data = generateData(param); - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, data); - assert.equal(authResult, true); - commonAssertPbWithArgs(transaction, data); - } - }); - commonAssertFalse('updateAccount', generateData, params); - }); - - describe("#case SetAccountIdContract", function () { - it(`should set account id accounts[3]`, async function () { - - const ids = ['abcabc110', 'testtest', 'jackieshen110']; - - for (let id of ids) { - let accountId = TronWeb.toHex(id); - const transaction = await tronWeb.transactionBuilder.setAccountId(accountId, accounts.b58[3]); - const data = { - account_id: accountId, - owner_address: accounts.hex[3], - }; - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, data); - assert.equal(authResult, true); - commonAssertPbWithArgs(transaction, data); - } - - }); - }); - - describe("#case ProposalCreateContract", function () { - let parameters = [{ "key": 0, "value": 100000 }, { "key": 1, "value": 2 }] - const params = []; - const generateData = (input) => { - return { - owner_address: tronWeb.address.toHex(input[1]), - parameters: [input[0]], - Permission_id: input[2]?.permissionId, - }; - }; - - before(async () => { - params.push(...[ - [parameters[0], accounts.b58[14], { permissionId: 2 }], - [parameters[0], accounts.b58[14]] - ]); - await broadcaster(tronWeb.transactionBuilder.sendTrx(accounts.b58[14], 10000e6), PRIVATE_KEY); - const transaction = await tronWeb.transactionBuilder.applyForSR(accounts.b58[14], 'url.tron.network'); - await broadcaster(transaction, accounts.pks[14]); - await waitChainData('tx', transaction.txID); - }); - - it('should allow the SR account to create a new proposal as a single object', async function () { - - for (let input of params) { - const transaction = await tronWeb.transactionBuilder.createProposal(...input) - const data = generateData(input); - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, data); - assert.equal(authResult, true); - commonAssertPbWithArgs(transaction, data); - } - - }); - commonAssertFalse('createProposal', generateData, params); - }); - - describe("#case ProposalDeleteContract", function () { - let proposals; - const params = []; - - const generateData = (param) => { - return { - owner_address: tronWeb.address.toHex(ADDRESS_BASE58), - proposal_id: param[0], - Permission_id: param[1]?.permissionId, - }; - }; - - before(async function () { - // comments below should be uncomment when first run - // const transaction = await tronWeb.transactionBuilder.applyForSR(ADDRESS_BASE58, 'url.tron.network'); - // await broadcaster(transaction, PRIVATE_KEY); - // await waitChainData('tx', transaction.txID); - - let parameters = [{ "key": 0, "value": 100000 }, { "key": 1, "value": 2 }] - - await broadcaster(tronWeb.transactionBuilder.createProposal(parameters, ADDRESS_BASE58), PRIVATE_KEY) - - proposals = await tronWeb.trx.listProposals(); - - params.push(...[ - [proposals[0].proposal_id, { permissionId: 2 }], - [proposals[0].proposal_id] - ]); - }) - - it('should allow the SR to delete its own proposal', async function () { - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.deleteProposal(...param) - const data = generateData(param); - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, data); - assert.equal(authResult, true); - commonAssertPbWithArgs(transaction, data); - } - - }); - commonAssertFalse('deleteProposal', generateData, params); - }); - - describe("#case ProposalApproveContract", function () { - let proposals; - const params = []; - - const generateData = (param) => { - return { - owner_address: tronWeb.address.toHex(param[2]), - proposal_id: parseInt(param[0]), - is_add_approval: param[1], - Permission_id: param[3]?.permissionId, - }; - }; - - before(async function () { - - this.timeout(20000) - - const sendTrxTransaction = await tronWeb.transactionBuilder.sendTrx(accounts.b58[16], 10000e6); - await broadcaster(sendTrxTransaction, PRIVATE_KEY); - waitChainData('tx', sendTrxTransaction.txID); - const applyForSrTransaction = await tronWeb.transactionBuilder.applyForSR(accounts.b58[16], 'url.tron.network'); - await broadcaster(applyForSrTransaction, accounts.pks[16]); - waitChainData('tx', applyForSrTransaction.txID); - let parameters = [{ "key": 0, "value": 100000 }, { "key": 1, "value": 2 }] - - await broadcaster(tronWeb.transactionBuilder.createProposal(parameters, ADDRESS_BASE58), PRIVATE_KEY) - - proposals = await tronWeb.trx.listProposals(); - - params.push(...[ - [proposals[0].proposal_id, true, accounts.b58[16], { permissionId: 2 }], - [proposals[0].proposal_id, true, accounts.b58[16]] - ]); - }) - - it('should allow the SR to delete its own proposal', async function () { - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.voteProposal(...param) - const data = generateData(param); - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, data); - assert.equal(authResult, true); - commonAssertPbWithArgs(transaction, data); - } - - }); - commonAssertFalse('voteProposal', generateData, params); - - }); - - describe("#case ExchangeCreateContract", function () { - const idxS = 18; - const idxE = 20; - const toIdx1 = 2; - const toIdx2 = 1; - let tokenNames = []; - - before(async function () { - this.timeout(20000); - - // create token - for (let i = idxS; i < idxE; i++) { - const options = getTokenOptions(); - const transaction = await tronWeb.transactionBuilder.createToken(options, accounts.hex[i]); - await broadcaster(null, accounts.pks[i], transaction); - await waitChainData('token', accounts.hex[i]); - const token = await tronWeb.trx.getTokensIssuedByAddress(accounts.hex[i]); - await waitChainData('tokenById', token[Object.keys(token)[0]]['id']); - await broadcaster(null, accounts.pks[i], await tronWeb.transactionBuilder.sendToken( - accounts.hex[toIdx1], - 10e4, - token[Object.keys(token)[0]]['id'], - token[Object.keys(token)[0]]['owner_address'] - )); - await waitChainData('sendToken', accounts.hex[toIdx1], 0); - await broadcaster(null, accounts.pks[i], await tronWeb.transactionBuilder.sendToken( - accounts.hex[toIdx2], - 10e4, - token[Object.keys(token)[0]]['id'], - token[Object.keys(token)[0]]['owner_address'] - )); - await waitChainData('sendToken', accounts.hex[toIdx2], 0); - tokenNames.push(token[Object.keys(token)[0]]['id']); - } - - }); - - it('should create token exchange', async function () { - let transaction = await tronWeb.transactionBuilder.createTokenExchange(tokenNames[0], 10e3, tokenNames[1], 10e3, accounts.hex[toIdx1]); - let data = { - owner_address: accounts.hex[toIdx1], - first_token_id: tronWeb.fromUtf8(tokenNames[0]), - first_token_balance: 10e3, - second_token_id: tronWeb.fromUtf8(tokenNames[1]), - second_token_balance: 10e3 - }; - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, data); - assert.equal(authResult, true); - commonAssertPbWithArgs(transaction, data); - - transaction = await tronWeb.transactionBuilder.createTokenExchange(tokenNames[0], 10e3, tokenNames[1], 10e3, accounts.hex[toIdx1], { permissionId: 2 }); - data = { - owner_address: accounts.hex[toIdx1], - first_token_id: tronWeb.fromUtf8(tokenNames[0]), - first_token_balance: 10e3, - second_token_id: tronWeb.fromUtf8(tokenNames[1]), - second_token_balance: 10e3, - Permission_id: 2, - }; - const authResult2 = - TronWeb.utils.transaction.txCheckWithArgs(transaction, data); - assert.equal(authResult2, true); - commonAssertPbWithArgs(transaction, data); - }); - }); - - describe("#case ExchangeInjectContract", function () { - const idxS = 20; - const idxE = 22; - let tokenNames = []; - let exchangeId = ''; - const params = []; - - const generateData = (param) => { - return { - owner_address: tronWeb.defaultAddress.hex, - exchange_id: parseInt(param[0]), - token_id: tronWeb.fromUtf8(param[1]), - quant: parseInt(param[2]), - Permission_id: param[3]?.permissionId, - }; - }; - - before(async function () { - this.timeout(20000); - - // create token - for (let i = idxS; i < idxE; i++) { - const options = getTokenOptions(); - const transaction = await tronWeb.transactionBuilder.createToken(options, accounts.hex[i]); - await broadcaster(null, accounts.pks[i], transaction); - await waitChainData('token', accounts.hex[i]); - const token = await tronWeb.trx.getTokensIssuedByAddress(accounts.hex[i]); - await waitChainData('tokenById', token[Object.keys(token)[0]]['id']); - await broadcaster(null, accounts.pks[i], await tronWeb.transactionBuilder.sendToken( - tronWeb.defaultAddress.hex, - 10e4, - token[Object.keys(token)[0]]['id'], - token[Object.keys(token)[0]]['owner_address'] - )); - tokenNames.push(token[Object.keys(token)[0]]['id']); - } - const transaction = await tronWeb.transactionBuilder.createTokenExchange(tokenNames[1], 10, tokenNames[0], 10); - await broadcaster(null, PRIVATE_KEY, transaction); - let receipt = await tronWeb.trx.getTransactionInfo(transaction.txID); - while (!Object.keys(receipt).length) { - await wait(5); - receipt = await tronWeb.trx.getTransactionInfo(transaction.txID); - } - exchangeId = receipt.exchange_id; - params.push(...[ - [exchangeId, tokenNames[0], 10, { permissionId: 2 }], - [exchangeId, tokenNames[0], 10] - ]); - }); - // todo, need check, new case for injectExchangeTokens - it(`it should return true`, async function () { - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.injectExchangeTokens( - ...param - ); - const data = generateData(param); - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, data); - assert.equal(authResult, true); - commonAssertPbWithArgs(transaction, data); - } - }); - commonAssertFalse('injectExchangeTokens', generateData, params); - }); - - describe("#case ExchangeWithdrawContract", function () { - const idxS = 22; - const idxE = 24; - let tokenNames = []; - let exchangeId = ''; - const params = []; - - const generateData = (param) => { - return { - owner_address: tronWeb.defaultAddress.hex, - exchange_id: parseInt(param[0]), - token_id: tronWeb.fromUtf8(param[1]), - quant: parseInt(param[2]), - Permission_id: param[3]?.permissionId, - }; - }; - - before(async function () { - this.timeout(20000); - - // create token - for (let i = idxS; i < idxE; i++) { - const options = getTokenOptions(); - const transaction = await tronWeb.transactionBuilder.createToken(options, accounts.hex[i]); - await broadcaster(null, accounts.pks[i], transaction); - await waitChainData('token', accounts.hex[i]); - const token = await tronWeb.trx.getTokensIssuedByAddress(accounts.hex[i]); - await waitChainData('tokenById', token[Object.keys(token)[0]]['id']); - await broadcaster(null, accounts.pks[i], await tronWeb.transactionBuilder.sendToken( - tronWeb.defaultAddress.hex, - 10e4, - token[Object.keys(token)[0]]['id'], - token[Object.keys(token)[0]]['owner_address'] - )); - tokenNames.push(token[Object.keys(token)[0]]['id']); - } - const transaction = await tronWeb.transactionBuilder.createTokenExchange(tokenNames[1], 10, tokenNames[0], 10); - await broadcaster(transaction); - let receipt = await tronWeb.trx.getTransactionInfo(transaction.txID); - while (!Object.keys(receipt).length) { - await wait(5); - receipt = await tronWeb.trx.getTransactionInfo(transaction.txID); - } - exchangeId = receipt.exchange_id; - params.push(...[ - [exchangeId, tokenNames[0], 10, { permissionId: 2 }], - [exchangeId, tokenNames[0], 10] - ]); - }); - it(`it should return true`, async function () { - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.withdrawExchangeTokens( - ...param - ); - const data = generateData(param); - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, data); - assert.equal(authResult, true); - commonAssertPbWithArgs(transaction, data); - } - }); - commonAssertFalse('withdrawExchangeTokens', generateData, params); - }); - - describe("#case ExchangeTransactionContract", function () { - const idxS = 24; - const idxE = 26; - let tokenNames = []; - let exchangeId = ''; - const params = []; - - const generateData = (param) => { - return { - owner_address: tronWeb.defaultAddress.hex, - exchange_id: parseInt(param[0]), - token_id: tronWeb.fromUtf8(param[1]), - quant: parseInt(param[2]), - expected: param[3], - Permission_id: param[4]?.permissionId, - }; - }; - - before(async function () { - this.timeout(20000); - - // create token - for (let i = idxS; i < idxE; i++) { - const options = getTokenOptions(); - const transaction = await tronWeb.transactionBuilder.createToken(options, accounts.hex[i]); - await broadcaster(null, accounts.pks[i], transaction); - await waitChainData('token', accounts.hex[i]); - const token = await tronWeb.trx.getTokensIssuedByAddress(accounts.hex[i]); - await waitChainData('tokenById', token[Object.keys(token)[0]]['id']); - await broadcaster(null, accounts.pks[i], await tronWeb.transactionBuilder.sendToken( - tronWeb.defaultAddress.hex, - 10e4, - token[Object.keys(token)[0]]['id'], - token[Object.keys(token)[0]]['owner_address'] - )); - tokenNames.push(token[Object.keys(token)[0]]['id']); - } - const transaction = await tronWeb.transactionBuilder.createTokenExchange(tokenNames[1], 10, tokenNames[0], 10); - await broadcaster(transaction); - let receipt = await tronWeb.trx.getTransactionInfo(transaction.txID); - while (!Object.keys(receipt).length) { - await wait(5); - receipt = await tronWeb.trx.getTransactionInfo(transaction.txID); - } - exchangeId = receipt.exchange_id; - params.push(...[ - [exchangeId, tokenNames[0], 10, 5, { permissionId: 2 }], - [exchangeId, tokenNames[0], 10, 5] - ]); - }); - // todo, need check, new case for tradeExchangeTokens - it(`it should return true`, async function () { - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.tradeExchangeTokens( - ...param - ); - const data = generateData(param); - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, data); - assert.equal(authResult, true); - commonAssertPbWithArgs(transaction, data); - } - }); - commonAssertFalse('tradeExchangeTokens', generateData, params); - }); - - describe("#case UpdateSettingContract", function () { - let transaction; - let contract; - const params = []; - - const generateData = (param) => { - return { - owner_address: tronWeb.address.toHex(param[2]), - contract_address: tronWeb.address.toHex(param[0]), - consume_user_resource_percent: param[1], - Permission_id: param[3]?.permissionId, - }; - }; - - before(async function () { - transaction = await tronWeb.transactionBuilder.createSmartContract({ - abi: testConstant.abi, - bytecode: testConstant.bytecode - }, accounts.hex[3]); - await broadcaster(null, accounts.pks[3], transaction); - await waitChainData('tx', transaction.txID); - params.push(...[ - [transaction.contract_address, 10, accounts.b58[3], { permissionId: 2 }], - [transaction.contract_address, 20, accounts.b58[3]] - ]); - }) - // todo, need check, new case for updateSetting - it(`it should return true`, async function () { - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.updateSetting( - ...param - ); - const data = generateData(param); - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, data); - assert.equal(authResult, true); - commonAssertPbWithArgs(transaction, data); - } - }); - commonAssertFalse('updateSetting', generateData, params); - }); - - describe("#case UpdateEnergyLimitContract", function () { - let transaction; - let contract; - const params = []; - - const generateData = (param) => { - return { - owner_address: tronWeb.address.toHex(param[2]), - contract_address: tronWeb.address.toHex(param[0]), - origin_energy_limit: param[1], - Permission_id: param[3]?.permissionId - }; - }; - - before(async function () { - this.timeout(20000); - - transaction = await tronWeb.transactionBuilder.createSmartContract({ - abi: testConstant.abi, - bytecode: testConstant.bytecode - }, accounts.hex[3]); - await broadcaster(null, accounts.pks[3], transaction); - await waitChainData('tx', transaction.txID); - params.push(...[ - [transaction.contract_address, 10e6, accounts.b58[3], { permissionId: 2 }], - [transaction.contract_address, 10e6, accounts.b58[3]] - ]); - }) - // todo, need check, new case for updateEnergyLimit - it(`it should return true`, async function () { - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.updateEnergyLimit( - ...param - ); - const data = generateData(param); - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, data); - assert.equal(authResult, true); - commonAssertPbWithArgs(transaction, data); - } - }); - commonAssertFalse('updateEnergyLimit', generateData, params); - }); - - describe("#case AccountPermissionUpdateContract", function () { - before(async () => { - await broadcaster(tronWeb.transactionBuilder.sendTrx(accounts.b58[17], 10000e6), PRIVATE_KEY); - const transaction = await tronWeb.transactionBuilder.applyForSR(accounts.b58[17], 'url.tron.network'); - await broadcaster(transaction, accounts.pks[17]); - await waitChainData('tx', transaction.txID); - }); - it(`it should return true`, async function () { - const permissionData = { - "owner": { - "type": 0, - "keys": [ - { - "address": accounts.hex[17], - "weight": 1 - } - ], - "threshold": 1, - "permission_name": "owner" - }, - "witness": { - "keys": [ - { - "address": accounts.hex[17], - "weight": 1 - } - ], - "threshold": 1, - "id": 1, - "type": 1, - "permission_name": "witness" - }, - "owner_address": accounts.hex[17], - "actives": [ - { - "operations": "7fff1fc0033e0000000000000000000000000000000000000000000000000000", - "keys": [ - { - "address": accounts.hex[17], - "weight": 1 - } - ], - "threshold": 1, - "id": 2, - "type": 2, - "permission_name": "active" - } - ] - }; - const params = [ - [accounts.hex[17], permissionData.owner, permissionData.witness, permissionData.actives] - ]; - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.updateAccountPermissions( - ...param - ); - const data = { - owner_address: param[0], - owner: param[1], - witness: param[2], - actives: param[3][0], - Permission_id: param[4]?.permissionId, - }; - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, data); - assert.equal(authResult, true); - commonAssertPbWithArgs(transaction, data); - } - }); - }); - - describe('#case commonOptions', function () { - it('should include feeLimit and auth true', async function () { - const data = { - abi: testRevert.abi, - bytecode: testRevert.bytecode, - feeLimit: 8e7 - }; - for (let i = 0; i < 2; i++) { - if (i === 1) data.permissionId = 2; - const transaction = await tronWeb.transactionBuilder.createSmartContract(data) - const args = { - owner_address: tronWeb.defaultAddress.hex, - call_value: 0, - consume_user_resource_percent: 100, - origin_energy_limit: 10_000_000, - abi: JSON.stringify(data.abi), - bytecode: data.bytecode, - parameter: '', - name: '', - Permission_id: data.permissionId, - }; - const options = { - fee_limit: data.feeLimit, - }; - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction, args, options); - assert.equal(authResult, true); - commonAssertPbWithArgs(transaction, args, options); - } - }); - it('should include data and auth true', async function () { - const params = [ - [accounts.b58[1], 10] - ]; - const generateData = (param) => { - return { - to_address: TronWeb.address.toHex(param[0]), - owner_address: tronWeb.defaultAddress.hex, - amount: param[1], - Permission_id: param[2]?.permissionId, - }; - }; - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.sendTrx( - ...param - ); - const data = generateData(param); - const options = { - data: tronWeb.toHex('111'), - }; - const transaction2 = await tronWeb.transactionBuilder.addUpdateData( - transaction, - options.data, - 'hex', - ); - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction2, data, options); - assert.equal(authResult, true); - commonAssertPbWithArgs(transaction2, data, options); - } - }); - it('should include expiration and auth true', async function () { - const params = [ - [accounts.b58[1], 10] - ]; - const generateData = (param) => { - return { - to_address: TronWeb.address.toHex(param[0]), - owner_address: tronWeb.defaultAddress.hex, - amount: param[1], - Permission_id: param[2]?.permissionId, - }; - }; - for (let param of params) { - const transaction = await tronWeb.transactionBuilder.sendTrx( - ...param - ); - const data = generateData(param); - const options = { - expiration: 60 * 60 * 1000 * 24 * 100, - }; - const transaction2 = await tronWeb.transactionBuilder.extendExpiration( - transaction, - options.expiration / 1000, - ); - const authResult = - TronWeb.utils.transaction.txCheckWithArgs(transaction2, data, options); - assert.equal(authResult, true); - commonAssertPbWithArgs(transaction2, data, options); - } - }); - }); - }); -}); \ No newline at end of file diff --git a/test/utils/typedData.test.js b/test/utils/typedData.test.js deleted file mode 100644 index 8474b37f..00000000 --- a/test/utils/typedData.test.js +++ /dev/null @@ -1,130 +0,0 @@ -const chai = require('chai'); -const tronWebBuilder = require('../helpers/tronWebBuilder'); -const { loadTests } = require('../testcases/src/disk-utils'); -const assert = chai.assert; - -describe('TronWeb.utils.typedData', function () { - describe('#EIP-712', function () { - const TronWeb = tronWebBuilder.TronWeb; - const tests = loadTests('eip712'); - tests.forEach((test) => { - it(`encoding ${test.name}`, function () { - const encoder = TronWeb.utils._TypedDataEncoder.from(test.types); - assert.equal( - encoder.primaryType, - test.primaryType, - 'instance.primaryType' - ); - assert.equal( - encoder.encode(test.data), - test.encoded, - 'instance.encode()' - ); - assert.equal( - TronWeb.utils._TypedDataEncoder.getPrimaryType(test.types), - test.primaryType, - 'getPrimaryType' - ); - assert.equal( - TronWeb.utils._TypedDataEncoder.hash( - test.domain, - test.types, - test.data - ), - test.digest, - 'digest' - ); - }); - }); - }); - - describe('#EIP-712 with trcToken', function () { - // https://nile.tronscan.io/#/contract/TRHsc32MH4CLJf9VMhMjW6M9VgyvN85ku3/code - const TronWeb = tronWebBuilder.TronWeb; - - const domain = { - name: 'TrcToken Test', - version: '1', - chainId: '0xd698d4192c56cb6be724a558448e2684802de4d6cd8690dc', - verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', - }; - - const types = { - FromPerson: [ - { name: 'name', type: 'string' }, - { name: 'wallet', type: 'address' }, - { name: 'trcTokenId', type: 'trcToken' }, - ], - ToPerson: [ - { name: 'name', type: 'string' }, - { name: 'wallet', type: 'address' }, - { name: 'trcTokenArr', type: 'trcToken[]' }, - ], - Mail: [ - { name: 'from', type: 'FromPerson' }, - { name: 'to', type: 'ToPerson' }, - { name: 'contents', type: 'string' }, - { name: 'tAddr', type: 'address[]' }, - { name: 'trcTokenId', type: 'trcToken' }, - { name: 'trcTokenArr', type: 'trcToken[]' }, - ], - }; - - const value = { - from: { - name: 'Cow', - wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', - trcTokenId: '1002000', - }, - to: { - name: 'Bob', - wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', - trcTokenArr: ['1002000', '1002000'], - }, - contents: 'Hello, Bob!', - tAddr: [ - '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', - '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', - ], - trcTokenId: '1002000', - trcTokenArr: ['1002000', '1002000'], - }; - - it('should be the correct hash domain', function () { - assert.equal( - TronWeb.utils._TypedDataEncoder.hashDomain(domain), - '0x23ce0ffcd4ff9a13936b4f1210884749acd9373a333dd7faa43f4045bb3aa1f7' - ); - }); - - it('should be the correct hash struct', function () { - assert.equal( - TronWeb.utils._TypedDataEncoder.hashStruct( - 'FromPerson', - types, - value.from - ), - '0x73b79ecc2530586800050c46ee7361ed28c013dfa3d062ed216295cbd5e6a55d' - ); - assert.equal( - TronWeb.utils._TypedDataEncoder.hashStruct( - 'ToPerson', - types, - value.to - ), - '0xf49c4819cbb0a7fbab3d7223830bbd2a2121cadb3139a59acd0c7fe2ac3a9ce9' - ); - assert.equal( - TronWeb.utils._TypedDataEncoder.hashStruct('Mail', types, value), - '0xf2f2a76e94f3c517b1e4c263854df0ef926aa17919b880a15d0ccf3ea121573c' - ); - }); - - it('should be the correct hash', function () { - assert.equal( - TronWeb.utils._TypedDataEncoder.hash(domain, types, value), - '0x15a2ddfbd93ad048b6c1391659543b5e0dd5799cde747e219cbb07c2c3badd09' - ); - }); - }); -}); diff --git a/tsconfig.base.json b/tsconfig.base.json new file mode 100644 index 00000000..0d6f23d1 --- /dev/null +++ b/tsconfig.base.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "declaration": false, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "importHelpers": true, + "lib": ["es2020", "es5"], + "moduleResolution": "node", + "noEmitOnError": true, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noUnusedLocals": true, + "preserveSymlinks": true, + "preserveWatchOutput": true, + "pretty": false, + "rootDir": "./", + "strict": true, + "sourceMap": true, + "target": "es2022" + }, + "exclude": ["src/protocol/**/*"], + "include": ["src/**/*", "test/**/*"] +} diff --git a/tsconfig.cjs.json b/tsconfig.cjs.json new file mode 100644 index 00000000..4e08e6d0 --- /dev/null +++ b/tsconfig.cjs.json @@ -0,0 +1,9 @@ +{ + "exclude": [], + "extends": "./tsconfig.base.json", + "compilerOptions": { + "declaration": true, + "module": "commonjs", + "outDir": "./lib/commonjs" + } +} diff --git a/tsconfig.esm.json b/tsconfig.esm.json new file mode 100644 index 00000000..b57e34ea --- /dev/null +++ b/tsconfig.esm.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "module": "es2020", + "outDir": "./lib/esm" + } +} diff --git a/tsconfig.types.json b/tsconfig.types.json new file mode 100644 index 00000000..a64baf0d --- /dev/null +++ b/tsconfig.types.json @@ -0,0 +1,10 @@ +{ + "exclude": ["test"], + "extends": "./tsconfig.base.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "declarationDir": "./lib/types", + "emitDeclarationOnly": true + } +} diff --git a/webpack.base.config.js b/webpack.base.config.js new file mode 100644 index 00000000..e97b3c05 --- /dev/null +++ b/webpack.base.config.js @@ -0,0 +1,38 @@ +const path = require('path'); + +const basePlugins = [ + ['@babel/plugin-proposal-private-methods', { loose: true }], + ['@babel/plugin-proposal-private-property-in-object', { loose: true }], + ['@babel/plugin-proposal-class-properties', { loose: true }], + '@babel/plugin-proposal-numeric-separator', + '@babel/plugin-transform-runtime', + '@babel/plugin-proposal-object-rest-spread', +]; + +const mode = process.env.NODE_ENV || 'production'; + +const baseConfig = { + entry: path.resolve(__dirname, 'src', 'index.ts'), + resolve: { + extensions: ['.ts', '.js', '.cjs'], + modules: ['node_modules', path.resolve(__dirname, 'src')], + fallback: { + 'querystring-es3': require.resolve('querystring-es3'), + events: require.resolve('events/'), + }, + }, + devtool: 'source-map', + mode, +}; + +nodePlugins = [...basePlugins]; + +if (mode === 'development') { + nodePlugins.push('source-map-support'); +} + +module.exports = { + basePlugins, + baseConfig, + nodePlugins, +}; diff --git a/webpack.config.js b/webpack.config.js index e582feb6..82d4b026 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,64 +1,11 @@ const path = require('path'); const externals = require('webpack-node-externals'); -const basePlugins = [ - ["@babel/plugin-proposal-private-methods", { "loose": true }], - ["@babel/plugin-proposal-private-property-in-object", { "loose": true }], - ["@babel/plugin-proposal-class-properties", { "loose": true }], - '@babel/plugin-proposal-numeric-separator', - '@babel/plugin-transform-runtime', - '@babel/plugin-proposal-object-rest-spread' -]; - -const mode = process.env.NODE_ENV || 'production' - -const baseConfig = { - entry: path.resolve(__dirname, 'src', 'index.js'), - module: { - rules: [ - { - test: /\.js$/, - exclude: /(node_modules\/(?!ethers)|bower_components)/, - use: { - loader: 'babel-loader', - options: { - presets: [ - ['@babel/preset-env', { - targets: { - browsers: [ - '>0.25%', - 'not dead' - ] - } - }] - ], - plugins: basePlugins, - } - } - } - ] - }, - resolve: { - modules: [ - 'node_modules', - path.resolve(__dirname, 'src') - ], - fallback: { - 'querystring-es3': require.resolve("querystring-es3"), - 'events': require.resolve("events/") - }, - }, - devtool: 'source-map', - mode -}; - -nodePlugins = [ - ...basePlugins -] - -if (mode === 'development') { - nodePlugins.push('source-map-support') -} +const { + baseConfig, + nodePlugins, + basePlugins, +} = require('./webpack.base.config'); module.exports = [ { @@ -67,7 +14,7 @@ module.exports = [ path: path.resolve(__dirname, 'dist'), filename: 'TronWeb.node.js', libraryTarget: 'commonjs2', - libraryExport: 'default' + libraryExport: 'default', }, module: { rules: [ @@ -78,31 +25,69 @@ module.exports = [ loader: 'babel-loader', options: { presets: [ - ['@babel/preset-env', { - targets: { - node: 6 + [ + '@babel/preset-env', + { + targets: { + node: 6, + }, + forceAllTransforms: true, }, - forceAllTransforms: true - }] + ], ], - plugins: nodePlugins - } - } - } - ] + plugins: nodePlugins, + }, + }, + }, + ], }, - externals: [ externals({ allowlist: ['ethers'] }) ], - target: 'node' + externals: [externals({ allowlist: ['ethers'] })], + target: 'node', }, { ...baseConfig, + module: { + rules: [ + { + test: /\.js$/, + exclude: /(node_modules\/(?!ethers)|bower_components)/, + use: { + loader: 'babel-loader', + options: { + presets: [ + [ + '@babel/preset-env', + { + targets: { + browsers: ['>0.25%', 'not dead'], + }, + }, + ], + ], + plugins: basePlugins, + }, + }, + }, + { + test: /\.ts$/, + loader: 'ts-loader', + options: { + configFile: path.resolve( + __dirname, + 'tsconfig.cjs.json' + ), + }, + exclude: ['/node_modules/', '/test/'], + }, + ], + }, output: { path: path.resolve(__dirname, 'dist'), filename: 'TronWeb.js', library: 'TronWeb', libraryTarget: 'umd', libraryExport: 'default', - umdNamedDefine: true + umdNamedDefine: true, }, - } -]; \ No newline at end of file + }, +];