@ozdao/prometheus-framework 0.2.31 → 0.2.33
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/main.css +1 -1
- package/dist/node_modules/@adraffy/ens-normalize/dist/index.cjs +1 -1
- package/dist/node_modules/@adraffy/ens-normalize/dist/index.js +222 -218
- package/dist/node_modules/@noble/curves/esm/abstract/modular.cjs +1 -1
- package/dist/node_modules/@noble/curves/esm/abstract/modular.js +102 -91
- package/dist/node_modules/@noble/curves/esm/abstract/utils.cjs +1 -1
- package/dist/node_modules/@noble/curves/esm/abstract/utils.js +138 -115
- package/dist/node_modules/@noble/curves/esm/abstract/weierstrass.cjs +1 -1
- package/dist/node_modules/@noble/curves/esm/abstract/weierstrass.js +185 -185
- package/dist/node_modules/@noble/curves/esm/secp256k1.cjs +1 -1
- package/dist/node_modules/@noble/curves/esm/secp256k1.js +11 -8
- package/dist/node_modules/@noble/hashes/esm/_assert.cjs +1 -1
- package/dist/node_modules/@noble/hashes/esm/_assert.js +29 -33
- package/dist/node_modules/@noble/hashes/esm/_sha2.cjs +1 -1
- package/dist/node_modules/@noble/hashes/esm/_sha2.js +15 -15
- package/dist/node_modules/@noble/hashes/esm/_u64.cjs +1 -1
- package/dist/node_modules/@noble/hashes/esm/_u64.js +38 -20
- package/dist/node_modules/@noble/hashes/esm/hmac.cjs +1 -1
- package/dist/node_modules/@noble/hashes/esm/hmac.js +20 -20
- package/dist/node_modules/@noble/hashes/esm/pbkdf2.cjs +1 -1
- package/dist/node_modules/@noble/hashes/esm/pbkdf2.js +20 -20
- package/dist/node_modules/@noble/hashes/esm/scrypt.cjs +1 -1
- package/dist/node_modules/@noble/hashes/esm/scrypt.js +41 -41
- package/dist/node_modules/@noble/hashes/esm/sha256.cjs +1 -1
- package/dist/node_modules/@noble/hashes/esm/sha256.js +23 -29
- package/dist/node_modules/@noble/hashes/esm/sha3.cjs +1 -1
- package/dist/node_modules/@noble/hashes/esm/sha3.js +44 -55
- package/dist/node_modules/@noble/hashes/esm/sha512.cjs +1 -1
- package/dist/node_modules/@noble/hashes/esm/sha512.js +23 -41
- package/dist/node_modules/@noble/hashes/esm/utils.cjs +1 -1
- package/dist/node_modules/@noble/hashes/esm/utils.js +37 -33
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework.es.cjs +20 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework.es.js +3974 -0
- package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.cjs +1 -0
- package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +1202 -0
- package/dist/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.cjs +1 -0
- package/dist/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js +97 -0
- package/dist/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.cjs +1 -0
- package/dist/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +37 -0
- package/dist/node_modules/embla-carousel-vue/esm/embla-carousel-vue.esm.cjs +1 -0
- package/dist/node_modules/embla-carousel-vue/esm/embla-carousel-vue.esm.js +22 -0
- package/dist/node_modules/ethereum-cryptography/esm/utils.cjs +1 -1
- package/dist/node_modules/ethereum-cryptography/esm/utils.js +1 -4
- package/dist/node_modules/js-cookie/dist/js.cookie.cjs +1 -0
- package/dist/node_modules/js-cookie/dist/js.cookie.js +74 -0
- package/dist/node_modules/vue3-carousel/dist/carousel.es.cjs +4 -4
- package/dist/node_modules/vue3-carousel/dist/carousel.es.js +340 -244
- package/dist/node_modules/web3/lib/esm/abi.cjs +1 -1
- package/dist/node_modules/web3/lib/esm/abi.js +5 -10
- package/dist/node_modules/web3/lib/esm/accounts.cjs +1 -1
- package/dist/node_modules/web3/lib/esm/accounts.js +27 -24
- package/dist/node_modules/web3/lib/esm/version.cjs +1 -1
- package/dist/node_modules/web3/lib/esm/version.js +1 -1
- package/dist/node_modules/web3/lib/esm/web3.cjs +1 -1
- package/dist/node_modules/web3/lib/esm/web3.js +53 -57
- package/dist/node_modules/web3-core/lib/esm/utils.cjs +1 -1
- package/dist/node_modules/web3-core/lib/esm/utils.js +3 -4
- package/dist/node_modules/web3-core/lib/esm/web3_config.cjs +1 -1
- package/dist/node_modules/web3-core/lib/esm/web3_config.js +22 -19
- package/dist/node_modules/web3-core/lib/esm/web3_context.cjs +1 -1
- package/dist/node_modules/web3-core/lib/esm/web3_context.js +72 -57
- package/dist/node_modules/web3-core/lib/esm/web3_request_manager.cjs +1 -1
- package/dist/node_modules/web3-core/lib/esm/web3_request_manager.js +53 -61
- package/dist/node_modules/web3-errors/lib/esm/errors/account_errors.js +8 -8
- package/dist/node_modules/web3-eth/lib/esm/rpc_method_wrappers.cjs +1 -1
- package/dist/node_modules/web3-eth/lib/esm/rpc_method_wrappers.js +1 -1
- package/dist/node_modules/web3-eth/lib/esm/utils/get_revert_reason.cjs +1 -1
- package/dist/node_modules/web3-eth/lib/esm/utils/get_revert_reason.js +42 -42
- package/dist/node_modules/web3-eth/lib/esm/utils/prepare_transaction_for_signing.cjs +1 -1
- package/dist/node_modules/web3-eth/lib/esm/utils/prepare_transaction_for_signing.js +19 -19
- package/dist/node_modules/web3-eth/lib/esm/utils/send_tx_helper.cjs +1 -1
- package/dist/node_modules/web3-eth/lib/esm/utils/send_tx_helper.js +29 -29
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_polling.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_polling.js +51 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_subscription.cjs +1 -1
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_subscription.js +1 -1
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_for_confirmations.cjs +1 -1
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_for_confirmations.js +1 -1
- package/dist/node_modules/web3-eth/lib/esm/web3_eth.js +132 -47
- package/dist/node_modules/web3-eth-abi/lib/esm/api/functions_api.cjs +1 -1
- package/dist/node_modules/web3-eth-abi/lib/esm/api/functions_api.js +21 -15
- package/dist/node_modules/web3-eth-abi/lib/esm/api/parameters_api.cjs +1 -1
- package/dist/node_modules/web3-eth-abi/lib/esm/api/parameters_api.js +15 -13
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/bytes.cjs +1 -1
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/bytes.js +1 -1
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/index.cjs +1 -1
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/index.js +61 -53
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/encode.cjs +1 -1
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/encode.js +36 -9
- package/dist/node_modules/web3-eth-accounts/lib/esm/account.cjs +2 -2
- package/dist/node_modules/web3-eth-accounts/lib/esm/account.js +107 -103
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/utils.cjs +1 -1
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/utils.js +135 -133
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/baseTransaction.cjs +1 -1
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/baseTransaction.js +47 -31
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/transactionFactory.cjs +1 -1
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/transactionFactory.js +18 -17
- package/dist/node_modules/web3-eth-contract/lib/esm/contract.cjs +1 -1
- package/dist/node_modules/web3-eth-contract/lib/esm/contract.js +113 -111
- package/dist/node_modules/web3-eth-contract/lib/esm/encoding.cjs +1 -1
- package/dist/node_modules/web3-eth-contract/lib/esm/encoding.js +27 -27
- package/dist/node_modules/web3-eth-contract/lib/esm/utils.cjs +1 -1
- package/dist/node_modules/web3-eth-contract/lib/esm/utils.js +28 -40
- package/dist/node_modules/web3-utils/lib/esm/chunk_response_parser.cjs +1 -1
- package/dist/node_modules/web3-utils/lib/esm/chunk_response_parser.js +10 -10
- package/dist/node_modules/web3-utils/lib/esm/converters.cjs +1 -1
- package/dist/node_modules/web3-utils/lib/esm/converters.js +78 -75
- package/dist/node_modules/web3-utils/lib/esm/formatter.cjs +1 -1
- package/dist/node_modules/web3-utils/lib/esm/formatter.js +8 -8
- package/dist/node_modules/web3-utils/lib/esm/hash.cjs +1 -1
- package/dist/node_modules/web3-utils/lib/esm/hash.js +44 -43
- package/dist/node_modules/web3-utils/lib/esm/index.cjs +1 -1
- package/dist/node_modules/web3-utils/lib/esm/index.js +64 -62
- package/dist/node_modules/web3-utils/lib/esm/socket_provider.cjs +1 -1
- package/dist/node_modules/web3-utils/lib/esm/socket_provider.js +78 -40
- package/dist/node_modules/web3-utils/lib/esm/uint8array.cjs +1 -1
- package/dist/node_modules/web3-utils/lib/esm/uint8array.js +16 -11
- package/dist/node_modules/web3-utils/lib/esm/validation.cjs +1 -1
- package/dist/node_modules/web3-utils/lib/esm/validation.js +45 -33
- package/dist/node_modules/web3-validator/lib/esm/utils.cjs +1 -1
- package/dist/node_modules/web3-validator/lib/esm/utils.js +127 -104
- package/dist/node_modules/web3-validator/lib/esm/validation/address.cjs +1 -1
- package/dist/node_modules/web3-validator/lib/esm/validation/address.js +12 -11
- package/dist/node_modules/web3-validator/lib/esm/validation/bytes.cjs +1 -1
- package/dist/node_modules/web3-validator/lib/esm/validation/bytes.js +17 -13
- package/dist/prometheus-framework/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.cjs +1 -1
- package/dist/prometheus-framework/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +7 -9
- package/dist/prometheus-framework/node_modules/@babel/runtime/helpers/esm/toPrimitive.cjs +1 -1
- package/dist/prometheus-framework/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +8 -8
- package/dist/prometheus-framework/node_modules/@babel/runtime/helpers/esm/toPropertyKey.cjs +1 -1
- package/dist/prometheus-framework/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +3 -3
- package/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.cjs +1 -1
- package/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.js +52 -52
- package/dist/prometheus-framework/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs +1 -1
- package/dist/prometheus-framework/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js +2501 -2482
- package/dist/prometheus-framework/node_modules/axios/lib/core/Axios.cjs +2 -1
- package/dist/prometheus-framework/node_modules/axios/lib/core/Axios.js +75 -61
- package/dist/prometheus-framework/node_modules/axios/lib/defaults/index.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/defaults/index.js +33 -33
- package/dist/prometheus-framework/node_modules/axios/lib/env/data.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/env/data.js +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/combineURLs.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/combineURLs.js +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/formDataToJSON.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/formDataToJSON.js +4 -2
- package/dist/prometheus-framework/node_modules/bignumber.js/bignumber.cjs +1 -0
- package/dist/prometheus-framework/node_modules/bignumber.js/bignumber.js +701 -0
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.cjs +1 -1
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js +14 -7
- package/dist/prometheus-framework/node_modules/libphonenumber-js/metadata.min.json.cjs +1 -1
- package/dist/prometheus-framework/node_modules/libphonenumber-js/metadata.min.json.js +1 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue.js +2 -80
- package/dist/prometheus-framework/src/components/Address/Address.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue2.js +80 -2
- package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/Block/Block.vue.js +62 -0
- package/dist/prometheus-framework/src/components/Breadcrumbs/Breadcrumbs.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Breadcrumbs/Breadcrumbs.vue2.js +15 -15
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js +51 -40
- package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.js +21 -21
- package/dist/prometheus-framework/src/components/Chips/Chips.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Chips/Chips.vue.js +9 -7
- package/dist/prometheus-framework/src/components/DatePicker/DatePicker.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/DatePicker/DatePicker.vue.js +12 -13
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +2 -49
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +49 -2
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.js +53 -36
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +117 -0
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +48 -40
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +1 -2
- package/dist/prometheus-framework/src/components/Loader/Loader.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Loader/Loader.vue2.js +20 -10
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +2 -98
- package/dist/prometheus-framework/src/components/Magnifier/Magnifier.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Magnifier/Magnifier.vue.js +2 -2
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +25 -27
- package/dist/prometheus-framework/src/components/Radio/Radio.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/Radio/Radio.vue.js +55 -0
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +55 -40
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.js +5 -5
- package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +45 -0
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +4 -0
- package/dist/prometheus-framework/src/components/Upload/Upload.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Upload/Upload.vue.js +2 -73
- package/dist/prometheus-framework/src/components/Upload/Upload.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Upload/Upload.vue2.js +73 -2
- package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.js +3 -3
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +94 -33
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +12 -12
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +69 -61
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +26 -27
- package/dist/prometheus-framework/src/modules/auth/localization/EnterCode.json.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/localization/EnterCode.json.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/localization/EnterPassword.json.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/localization/EnterPassword.json.js +7 -7
- package/dist/prometheus-framework/src/modules/auth/localization/ResetPassword.json.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/localization/ResetPassword.json.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/localization/SignIn.json.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/localization/SignIn.json.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/localization/SignUp.json.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/localization/SignUp.json.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/auth.js +30 -30
- package/dist/prometheus-framework/src/modules/auth/store/invites.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/invites.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/twofa.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/twofa.js +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/layouts/Backoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/layouts/Backoffice.vue.js +9 -9
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +90 -47
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js +166 -133
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +86 -68
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +105 -41
- package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.js +16 -16
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +51 -42
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +14 -14
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue2.js +2 -2
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +108 -94
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js +19 -19
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +11 -11
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue2.js +2 -2
- package/dist/prometheus-framework/src/modules/community/components/sections/JoinUs.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/JoinUs.vue.js +40 -29
- package/dist/prometheus-framework/src/modules/community/store/blogposts.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/store/blogposts.js +10 -9
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +27 -16
- package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.js +21 -21
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +4 -3
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +31 -28
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Video.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Video.vue.js +48 -0
- package/dist/prometheus-framework/src/modules/constructor/components/elements/VideoPlayer.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/constructor/components/elements/VideoPlayer.vue.js +33 -0
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Youtube.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Youtube.vue.js +13 -0
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +106 -85
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +31 -34
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +8 -8
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/router/events.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/router/events.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.js +13 -6
- package/dist/prometheus-framework/src/modules/globals/store/globals.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/store/globals.js +50 -22
- package/dist/prometheus-framework/src/modules/icons/entities/IconCommunity.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/entities/IconCommunity.vue.js +13 -13
- package/dist/prometheus-framework/src/modules/icons/entities/IconEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/entities/IconEvents.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/icons/entities/IconGroups.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/entities/IconGroups.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/icons/entities/IconPrice.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconPrice.vue.js +21 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconShopcart.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconShopcart.vue.js +21 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconTime.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconTime.vue.js +21 -0
- package/dist/prometheus-framework/src/modules/icons/icons.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/icons.client.js +38 -34
- package/dist/prometheus-framework/src/modules/icons/labels/LabelAppStore.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/labels/LabelAppStore.vue.js +9 -9
- package/dist/prometheus-framework/src/modules/icons/labels/LabelGooglePlay.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/labels/LabelGooglePlay.vue.js +7 -7
- package/dist/prometheus-framework/src/modules/icons/navigation/IconAdd.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/navigation/IconAdd.vue.js +30 -0
- package/dist/prometheus-framework/src/modules/icons/navigation/IconChevronRight.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/navigation/IconChevronRight.vue.js +12 -12
- package/dist/prometheus-framework/src/modules/icons/navigation/IconDelete.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/navigation/IconDelete.vue.js +27 -0
- package/dist/prometheus-framework/src/modules/icons/navigation/IconMinus.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/navigation/IconMinus.vue.js +29 -0
- package/dist/prometheus-framework/src/modules/icons/navigation/IconUpload.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/navigation/IconUpload.vue.js +33 -0
- package/dist/prometheus-framework/src/modules/icons/placeholders/PlaceholderImage.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/placeholders/PlaceholderImage.vue.js +21 -0
- package/dist/prometheus-framework/src/modules/icons/placeholders/PlaceholderOrganizationPic.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/placeholders/PlaceholderOrganizationPic.vue.js +28 -0
- package/dist/prometheus-framework/src/modules/icons/placeholders/PlaceholderUserpic.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/placeholders/PlaceholderUserpic.vue.js +21 -20
- package/dist/prometheus-framework/src/modules/icons/socials/instagram.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/socials/instagram.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/icons/socials/line.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/socials/line.vue.js +6 -6
- package/dist/prometheus-framework/src/modules/icons/socials/reddit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/socials/reddit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/icons/socials/telegram.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/socials/telegram.vue.js +7 -7
- package/dist/prometheus-framework/src/modules/icons/socials/twitter.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/socials/twitter.vue.js +6 -6
- package/dist/prometheus-framework/src/modules/icons/socials/youtube.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/socials/youtube.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.js +48 -35
- package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.cjs +1 -0
- package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.js +63 -0
- package/dist/prometheus-framework/src/modules/middlewares/client/auth.validation.cjs +1 -1
- package/dist/prometheus-framework/src/modules/middlewares/client/auth.validation.js +6 -8
- package/dist/prometheus-framework/src/modules/middlewares/client/states.validation.cjs +1 -1
- package/dist/prometheus-framework/src/modules/middlewares/client/states.validation.js +5 -7
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/MenuItem.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/MenuItem.vue.js +16 -22
- package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrder.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrder.vue.js +4 -0
- package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrderItem.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrderItem.vue.js +61 -88
- package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +104 -193
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +29 -31
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.js +129 -0
- package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/orders.js +45 -36
- package/dist/prometheus-framework/src/modules/orders/store/shopcart.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/shopcart.js +27 -26
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +6 -6
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +85 -79
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/Rating.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/Rating.vue.js +10 -10
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/Socials.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/Socials.vue.js +29 -23
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +55 -169
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +48 -59
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +173 -94
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +27 -20
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +43 -33
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +67 -63
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.js +28 -30
- package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/router/members.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/members.router.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.js +9 -6
- package/dist/prometheus-framework/src/modules/organizations/router/products.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/products.router.js +69 -20
- package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/departments.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/invites.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/invites.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/organizations.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/organizations.js +38 -38
- package/dist/prometheus-framework/src/modules/payments/components/pages/Payments.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/payments/components/pages/Payments.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue.js +39 -44
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +73 -44
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +25 -54
- package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.js +39 -39
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +12 -12
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +4 -0
- package/dist/prometheus-framework/src/modules/products/components/elements/Price.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/elements/Price.vue.js +18 -11
- package/dist/prometheus-framework/src/modules/products/components/elements/THC.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/elements/THC.vue.js +24 -24
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +140 -0
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue2.js +4 -0
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +27 -23
- package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.js +24 -25
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +246 -102
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +28 -24
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.js +23 -24
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +56 -7
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +82 -65
- package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.js +71 -54
- package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue2.js +4 -0
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +60 -86
- package/dist/prometheus-framework/src/modules/products/store/leftovers.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/store/leftovers.js +29 -37
- package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.js +32 -29
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +43 -107
- package/dist/prometheus-framework/src/modules/spots/store/spots.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/store/spots.js +46 -40
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +89 -94
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +30 -30
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/router/users.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/router/users.js +2 -2
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +80 -71
- package/dist/prometheus-framework/src/modules/wallet/store/wallet.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/store/wallet.js +29 -0
- package/dist/prometheus-framework.cjs.js +21 -21
- package/dist/prometheus-framework.es.js +1037 -1023
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/Countdown/Countdown.vue +75 -0
- package/src/components/EditImages/EditImages.vue +10 -2
- package/src/components/Upload/Upload.vue +32 -6
- package/src/components/UploadImage/UploadImage.vue +12 -8
- package/src/components/UploadImageMultiple/UploadImageMultiple.vue +4 -2
- package/src/modules/events/components/pages/EditEvent.vue +288 -1
- package/src/modules/events/components/pages/Event.vue +125 -46
- package/src/modules/events/components/sections/HeroEvent.vue +161 -0
- package/src/modules/events/components/sections/SectionLineup.vue +42 -0
- package/src/modules/events/components/sections/SectionMainGuest.vue +104 -0
- package/src/modules/events/components/sections/SectionPreviousEvents.vue +119 -0
- package/src/modules/events/components/sections/SectionSpecialGuests.vue +47 -0
- package/src/modules/events/controllers/events.controller.js +1 -0
- package/src/modules/events/controllers/utils/queryProcessor.js +2 -0
- package/src/modules/events/models/event.model.js +28 -0
- package/src/modules/events/store/events.js +4 -0
- package/src/modules/files/controllers/files.controller.js +3 -0
- package/src/modules/files/middlewares/server/middlewareBusboy.js +115 -100
- package/src/modules/files/routes/files.routes.js +3 -4
- package/src/modules/globals/globals.server.js +0 -1
- package/src/modules/orders/components/blocks/CardOrder.vue +5 -5
- package/src/modules/orders/components/blocks/StatusHistory.vue +84 -0
- package/src/modules/orders/components/pages/Order.vue +11 -54
- package/src/modules/orders/components/pages/Orders.vue +0 -4
- package/src/modules/orders/controllers/orders.controller.js +17 -9
- package/src/modules/orders/models/order.model.js +19 -0
- package/src/modules/orders/routes/orders.routes.js +4 -1
- package/src/modules/products/components/sections/FilterProducts.vue +9 -10
- package/src/modules/wallet/components/pages/Wallet.vue +2 -3
@@ -1,47 +1,62 @@
|
|
1
|
-
import { ExistingPluginNamespaceError as
|
1
|
+
import { ExistingPluginNamespaceError as v } from "../../../web3-errors/lib/esm/errors/generic_errors.js";
|
2
2
|
import "../../../web3-errors/lib/esm/errors/rpc_errors.js";
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
3
|
+
import "../../../web3-eth-accounts/lib/esm/wallet.js";
|
4
|
+
import "../../../web3-eth-accounts/lib/esm/account.js";
|
5
|
+
import "../../../crc-32/crc32.js";
|
6
|
+
import "../../../web3-eth-accounts/lib/esm/common/types.js";
|
7
|
+
import "../../../web3-validator/lib/esm/formats.js";
|
8
|
+
import "../../../web3-validator/lib/esm/default_validator.js";
|
9
|
+
import "../../../web3-types/lib/esm/data_format_types.js";
|
10
|
+
import "../../../web3-types/lib/esm/eth_types.js";
|
11
|
+
import "../../../web3-types/lib/esm/web3_base_provider.js";
|
12
|
+
import "../../../web3-eth-accounts/lib/esm/tx/constants.js";
|
13
|
+
import "../../../web3-eth-accounts/lib/esm/common/enums.js";
|
14
|
+
import "../../../web3-eth-accounts/lib/esm/tx/eip1559Transaction.js";
|
15
|
+
import "../../../web3-eth-accounts/lib/esm/tx/eip2930Transaction.js";
|
16
|
+
import "../../../@ethereumjs/rlp/dist/index.js";
|
17
|
+
import "../../../web3-eth-accounts/lib/esm/tx/types.js";
|
18
|
+
import { isSupportedProvider as f } from "./utils.js";
|
19
|
+
import { Web3BatchRequest as M } from "./web3_batch_request.js";
|
20
|
+
import { Web3Config as _, Web3ConfigEvent as d } from "./web3_config.js";
|
21
|
+
import { Web3RequestManager as p } from "./web3_request_manager.js";
|
6
22
|
import { Web3SubscriptionManager as l } from "./web3_subscription_manager.js";
|
7
|
-
import { Web3BatchRequest as _ } from "./web3_batch_request.js";
|
8
23
|
import { isNullish as b } from "../../../web3-utils/lib/esm/validation.js";
|
9
|
-
var w = globalThis && globalThis.__awaiter || function(
|
24
|
+
var w = globalThis && globalThis.__awaiter || function(m, r, e, i) {
|
10
25
|
function s(t) {
|
11
|
-
return t instanceof
|
12
|
-
|
26
|
+
return t instanceof e ? t : new e(function(o) {
|
27
|
+
o(t);
|
13
28
|
});
|
14
29
|
}
|
15
|
-
return new (
|
16
|
-
function u(
|
30
|
+
return new (e || (e = Promise))(function(t, o) {
|
31
|
+
function u(n) {
|
17
32
|
try {
|
18
|
-
a(i.next(
|
19
|
-
} catch (
|
20
|
-
|
33
|
+
a(i.next(n));
|
34
|
+
} catch (h) {
|
35
|
+
o(h);
|
21
36
|
}
|
22
37
|
}
|
23
|
-
function c(
|
38
|
+
function c(n) {
|
24
39
|
try {
|
25
|
-
a(i.throw(
|
26
|
-
} catch (
|
27
|
-
|
40
|
+
a(i.throw(n));
|
41
|
+
} catch (h) {
|
42
|
+
o(h);
|
28
43
|
}
|
29
44
|
}
|
30
|
-
function a(
|
31
|
-
|
45
|
+
function a(n) {
|
46
|
+
n.done ? t(n.value) : s(n.value).then(u, c);
|
32
47
|
}
|
33
|
-
a((i = i.apply(
|
48
|
+
a((i = i.apply(m, r || [])).next());
|
34
49
|
});
|
35
50
|
};
|
36
|
-
class
|
37
|
-
constructor(
|
38
|
-
var
|
39
|
-
if (super(), this.providers =
|
40
|
-
this._requestManager = new
|
51
|
+
class g extends _ {
|
52
|
+
constructor(r) {
|
53
|
+
var e;
|
54
|
+
if (super(), this.providers = p.providers, b(r) || typeof r == "string" && r.trim() !== "" || f(r)) {
|
55
|
+
this._requestManager = new p(r), this._subscriptionManager = new l(this._requestManager, {});
|
41
56
|
return;
|
42
57
|
}
|
43
|
-
const { config: i, provider: s, requestManager: t, subscriptionManager:
|
44
|
-
this.setConfig(i ?? {}), this._requestManager = t ?? new
|
58
|
+
const { config: i, provider: s, requestManager: t, subscriptionManager: o, registeredSubscriptions: u, accountProvider: c, wallet: a } = r;
|
59
|
+
this.setConfig(i ?? {}), this._requestManager = t ?? new p(s, (e = i == null ? void 0 : i.enableExperimentalFeatures) === null || e === void 0 ? void 0 : e.useSubscriptionWhenCheckingBlockTimeout), o ? this._subscriptionManager = o : this._subscriptionManager = new l(this.requestManager, u ?? {}), c && (this._accountProvider = c), a && (this._wallet = a);
|
45
60
|
}
|
46
61
|
get requestManager() {
|
47
62
|
return this._requestManager;
|
@@ -59,17 +74,17 @@ class d extends M {
|
|
59
74
|
return this._accountProvider;
|
60
75
|
}
|
61
76
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
62
|
-
static fromContextObject(...
|
63
|
-
return new this(...
|
77
|
+
static fromContextObject(...r) {
|
78
|
+
return new this(...r.reverse());
|
64
79
|
}
|
65
80
|
getContextObject() {
|
66
|
-
var
|
81
|
+
var r;
|
67
82
|
return {
|
68
83
|
config: this.config,
|
69
84
|
provider: this.provider,
|
70
85
|
requestManager: this.requestManager,
|
71
86
|
subscriptionManager: this.subscriptionManager,
|
72
|
-
registeredSubscriptions: (
|
87
|
+
registeredSubscriptions: (r = this.subscriptionManager) === null || r === void 0 ? void 0 : r.registeredSubscriptions,
|
73
88
|
providers: this.providers,
|
74
89
|
wallet: this.wallet,
|
75
90
|
accountProvider: this.accountProvider
|
@@ -80,28 +95,28 @@ class d extends M {
|
|
80
95
|
* and link it to current context. This can be used to initiate a global context object
|
81
96
|
* and then use it to create new objects of any type extended by `Web3Context`.
|
82
97
|
*/
|
83
|
-
use(
|
84
|
-
const i = new
|
85
|
-
return this.on(
|
98
|
+
use(r, ...e) {
|
99
|
+
const i = new r(...e, this.getContextObject());
|
100
|
+
return this.on(d.CONFIG_CHANGE, (s) => {
|
86
101
|
i.setConfig({ [s.name]: s.newValue });
|
87
102
|
}), i;
|
88
103
|
}
|
89
104
|
/**
|
90
105
|
* Link current context to another context.
|
91
106
|
*/
|
92
|
-
link(
|
93
|
-
this.setConfig(
|
94
|
-
this.setConfig({ [
|
107
|
+
link(r) {
|
108
|
+
this.setConfig(r.config), this._requestManager = r.requestManager, this.provider = r.provider, this._subscriptionManager = r.subscriptionManager, this._wallet = r.wallet, this._accountProvider = r._accountProvider, r.on(d.CONFIG_CHANGE, (e) => {
|
109
|
+
this.setConfig({ [e.name]: e.newValue });
|
95
110
|
});
|
96
111
|
}
|
97
112
|
// eslint-disable-next-line no-use-before-define
|
98
|
-
registerPlugin(
|
99
|
-
if (this[
|
100
|
-
throw new
|
101
|
-
const
|
102
|
-
[
|
113
|
+
registerPlugin(r) {
|
114
|
+
if (this[r.pluginNamespace] !== void 0)
|
115
|
+
throw new v(r.pluginNamespace);
|
116
|
+
const e = {
|
117
|
+
[r.pluginNamespace]: r
|
103
118
|
};
|
104
|
-
r
|
119
|
+
e[r.pluginNamespace].link(this), Object.assign(this, e);
|
105
120
|
}
|
106
121
|
/**
|
107
122
|
* Will return the current provider.
|
@@ -139,8 +154,8 @@ class d extends M {
|
|
139
154
|
* }
|
140
155
|
* ```
|
141
156
|
*/
|
142
|
-
set provider(
|
143
|
-
this.requestManager.setProvider(
|
157
|
+
set provider(r) {
|
158
|
+
this.requestManager.setProvider(r);
|
144
159
|
}
|
145
160
|
/**
|
146
161
|
* Will return the current provider. (The same as `provider`)
|
@@ -177,8 +192,8 @@ class d extends M {
|
|
177
192
|
* }
|
178
193
|
* ```
|
179
194
|
*/
|
180
|
-
set currentProvider(
|
181
|
-
this.requestManager.setProvider(
|
195
|
+
set currentProvider(r) {
|
196
|
+
this.requestManager.setProvider(r);
|
182
197
|
}
|
183
198
|
/**
|
184
199
|
* Will return the givenProvider if available.
|
@@ -187,7 +202,7 @@ class d extends M {
|
|
187
202
|
*/
|
188
203
|
// eslint-disable-next-line class-methods-use-this
|
189
204
|
get givenProvider() {
|
190
|
-
return
|
205
|
+
return g.givenProvider;
|
191
206
|
}
|
192
207
|
/**
|
193
208
|
* Will set the provider.
|
@@ -195,33 +210,33 @@ class d extends M {
|
|
195
210
|
* @param provider - {@link SupportedProviders} The provider to set
|
196
211
|
* @returns Returns true if the provider was set
|
197
212
|
*/
|
198
|
-
setProvider(
|
199
|
-
return this.provider =
|
213
|
+
setProvider(r) {
|
214
|
+
return this.provider = r, !0;
|
200
215
|
}
|
201
216
|
/**
|
202
217
|
* Will return the {@link Web3BatchRequest} constructor.
|
203
218
|
*/
|
204
219
|
get BatchRequest() {
|
205
|
-
return
|
220
|
+
return M.bind(void 0, this._requestManager);
|
206
221
|
}
|
207
222
|
/**
|
208
223
|
* This method allows extending the web3 modules.
|
209
224
|
* Note: This method is only for backward compatibility, and It is recommended to use Web3 v4 Plugin feature for extending web3.js functionality if you are developing some thing new.
|
210
225
|
*/
|
211
|
-
extend(
|
212
|
-
var
|
213
|
-
return
|
226
|
+
extend(r) {
|
227
|
+
var e;
|
228
|
+
return r.property && !this[r.property] && (this[r.property] = {}), (e = r.methods) === null || e === void 0 || e.forEach((i) => {
|
214
229
|
const s = (...t) => w(this, void 0, void 0, function* () {
|
215
230
|
return this.requestManager.send({
|
216
231
|
method: i.call,
|
217
232
|
params: t
|
218
233
|
});
|
219
234
|
});
|
220
|
-
|
235
|
+
r.property ? this[r.property][i.name] = s : this[i.name] = s;
|
221
236
|
}), this;
|
222
237
|
}
|
223
238
|
}
|
224
|
-
|
239
|
+
g.providers = p.providers;
|
225
240
|
export {
|
226
|
-
|
241
|
+
g as Web3Context
|
227
242
|
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("../../../web3-errors/lib/esm/errors/contract_errors.cjs"),E=require("../../../web3-errors/lib/esm/errors/provider_errors.cjs"),R=require("../../../web3-errors/lib/esm/errors/response_errors.cjs"),_=require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs"),g=require("../../../web3-providers-http/lib/esm/index.cjs"),b=require("../../../web3-providers-ws/lib/esm/index.cjs"),a=require("./utils.cjs"),W=require("./web3_event_emitter.cjs"),m=require("../../../web3-utils/lib/esm/promise_helpers.cjs"),i=require("../../../web3-utils/lib/esm/json_rpc.cjs"),l=require("../../../web3-utils/lib/esm/validation.cjs");var w=globalThis&&globalThis.__awaiter||function(d,r,e,t){function s(o){return o instanceof e?o:new e(function(n){n(o)})}return new(e||(e=Promise))(function(o,n){function h(u){try{c(t.next(u))}catch(p){n(p)}}function f(u){try{c(t.throw(u))}catch(p){n(p)}}function c(u){u.done?o(u.value):s(u.value).then(h,f)}c((t=t.apply(d,r||[])).next())})};exports.Web3RequestManagerEvent=void 0;(function(d){d.PROVIDER_CHANGED="PROVIDER_CHANGED",d.BEFORE_PROVIDER_CHANGE="BEFORE_PROVIDER_CHANGE"})(exports.Web3RequestManagerEvent||(exports.Web3RequestManagerEvent={}));const P={HttpProvider:g.default,WebsocketProvider:b.default};class v extends W.Web3EventEmitter{constructor(r,e){super(),l.isNullish(r)||this.setProvider(r),this.useRpcCallSpecification=e}static get providers(){return P}get provider(){return this._provider}get providers(){return P}setProvider(r){let e;if(r&&typeof r=="string"&&this.providers)if(/^http(s)?:\/\//i.test(r))e=new this.providers.HttpProvider(r);else if(/^ws(s)?:\/\//i.test(r))e=new this.providers.WebsocketProvider(r);else throw new E.ProviderError(`Can't autodetect provider for "${r}"`);else l.isNullish(r)?e=void 0:e=r;return this.emit(exports.Web3RequestManagerEvent.BEFORE_PROVIDER_CHANGE,this._provider),this._provider=e,this.emit(exports.Web3RequestManagerEvent.PROVIDER_CHANGED,this._provider),!0}send(r){return w(this,void 0,void 0,function*(){const e=yield this._sendRequest(r);if(i.isResponseWithResult(e))return e.result;throw new R.ResponseError(e)})}sendBatch(r){return w(this,void 0,void 0,function*(){return yield this._sendRequest(r)})}_sendRequest(r){return w(this,void 0,void 0,function*(){const{provider:e}=this;if(l.isNullish(e))throw new E.ProviderError("Provider not available. Use `.setProvider` or `.provider=` to initialize the provider.");const t=i.isBatchRequest(r)?i.toBatchPayload(r):i.toPayload(r);if(a.isWeb3Provider(e)){let s;try{s=yield e.request(t)}catch(o){s=o}return this._processJsonRpcResponse(t,s,{legacy:!1,error:!1})}if(a.isEIP1193Provider(e))return e.request(t).then(s=>this._processJsonRpcResponse(t,s,{legacy:!0,error:!1})).catch(s=>this._processJsonRpcResponse(t,s,{legacy:!0,error:!0}));if(a.isLegacyRequestProvider(e))return new Promise((s,o)=>{const n=c=>o(this._processJsonRpcResponse(t,c,{legacy:!0,error:!0})),h=c=>s(this._processJsonRpcResponse(t,c,{legacy:!0,error:!1})),f=e.request(t,(c,u)=>c?n(c):h(u));m.isPromise(f)&&f.then(h).catch(n)});if(a.isLegacySendProvider(e))return new Promise((s,o)=>{e.send(t,(n,h)=>{if(n)return o(this._processJsonRpcResponse(t,n,{legacy:!0,error:!0}));if(l.isNullish(h))throw new R.ResponseError("",'Got a "nullish" response from provider.');return s(this._processJsonRpcResponse(t,h,{legacy:!0,error:!1}))})});if(a.isLegacySendAsyncProvider(e))return e.sendAsync(t).then(s=>this._processJsonRpcResponse(t,s,{legacy:!0,error:!1})).catch(s=>this._processJsonRpcResponse(t,s,{legacy:!0,error:!0}));throw new E.ProviderError("Provider does not have a request or send method to use.")})}_processJsonRpcResponse(r,e,{legacy:t,error:s}){if(l.isNullish(e))return this._buildResponse(r,null,s);if(i.isResponseWithError(e)){if(this.useRpcCallSpecification&&i.isResponseRpcError(e)){const o=e;if(_.rpcErrorsMap.get(o.error.code)){const n=_.rpcErrorsMap.get(o.error.code).error;throw new n(o)}else throw new _.RpcError(o)}else if(!v._isReverted(e))throw new R.InvalidResponseError(e,r)}if(i.isResponseWithResult(e))return e;if(e instanceof Error)throw v._isReverted(e),e;if(!t&&i.isBatchRequest(r)&&i.isBatchResponse(e)||t&&!s&&i.isBatchRequest(r))return e;if(t&&s&&i.isBatchRequest(r))throw e;if(t&&!i.isResponseWithError(e)&&!i.isResponseWithResult(e))return this._buildResponse(r,e,s);throw i.isBatchRequest(r)&&!Array.isArray(e)?new R.ResponseError(e,"Got normal response for a batch request."):!i.isBatchRequest(r)&&Array.isArray(e)?new R.ResponseError(e,"Got batch response for a normal request."):(i.isResponseWithError(e)||i.isResponseWithResult(e))&&!i.isBatchRequest(r)&&e.id&&r.id!==e.id?new R.InvalidResponseError(e):new R.ResponseError(e,"Invalid response")}static _isReverted(r){let e;if(i.isResponseWithError(r)?e=r.error:r instanceof Error&&(e=r),e!=null&&e.message.includes("revert"))throw new q.ContractExecutionError(e);return!1}_buildResponse(r,e,t){const s={jsonrpc:"2.0",id:i.isBatchRequest(r)?r[0].id:"id"in r?r.id:null};return t?Object.assign(Object.assign({},s),{error:e}):Object.assign(Object.assign({},s),{result:e})}}exports.Web3RequestManager=v;
|
@@ -1,57 +1,49 @@
|
|
1
1
|
import { ContractExecutionError as y } from "../../../web3-errors/lib/esm/errors/contract_errors.js";
|
2
|
-
import { ProviderError as
|
2
|
+
import { ProviderError as m } from "../../../web3-errors/lib/esm/errors/provider_errors.js";
|
3
3
|
import { ResponseError as h, InvalidResponseError as P } from "../../../web3-errors/lib/esm/errors/response_errors.js";
|
4
|
-
import { rpcErrorsMap as g, RpcError as
|
5
|
-
import
|
4
|
+
import { rpcErrorsMap as g, RpcError as O } from "../../../web3-errors/lib/esm/errors/rpc_errors.js";
|
5
|
+
import A from "../../../web3-providers-http/lib/esm/index.js";
|
6
6
|
import C from "../../../web3-providers-ws/lib/esm/index.js";
|
7
|
-
import {
|
8
|
-
import { Web3EventEmitter as
|
9
|
-
import { isPromise as
|
10
|
-
import { isResponseWithResult as
|
7
|
+
import { isWeb3Provider as J, isEIP1193Provider as D, isLegacyRequestProvider as G, isLegacySendProvider as H, isLegacySendAsyncProvider as I } from "./utils.js";
|
8
|
+
import { Web3EventEmitter as q } from "./web3_event_emitter.js";
|
9
|
+
import { isPromise as W } from "../../../web3-utils/lib/esm/promise_helpers.js";
|
10
|
+
import { isResponseWithResult as a, isBatchRequest as u, toBatchPayload as B, toPayload as N, isResponseWithError as p, isResponseRpcError as j, isBatchResponse as V } from "../../../web3-utils/lib/esm/json_rpc.js";
|
11
11
|
import { isNullish as d } from "../../../web3-utils/lib/esm/validation.js";
|
12
|
-
var
|
12
|
+
var E = globalThis && globalThis.__awaiter || function(R, e, r, t) {
|
13
13
|
function i(s) {
|
14
14
|
return s instanceof r ? s : new r(function(o) {
|
15
15
|
o(s);
|
16
16
|
});
|
17
17
|
}
|
18
18
|
return new (r || (r = Promise))(function(s, o) {
|
19
|
-
function
|
19
|
+
function f(c) {
|
20
20
|
try {
|
21
|
-
n(t.next(
|
22
|
-
} catch (
|
23
|
-
o(
|
21
|
+
n(t.next(c));
|
22
|
+
} catch (w) {
|
23
|
+
o(w);
|
24
24
|
}
|
25
25
|
}
|
26
|
-
function l(
|
26
|
+
function l(c) {
|
27
27
|
try {
|
28
|
-
n(t.throw(
|
29
|
-
} catch (
|
30
|
-
o(
|
28
|
+
n(t.throw(c));
|
29
|
+
} catch (w) {
|
30
|
+
o(w);
|
31
31
|
}
|
32
32
|
}
|
33
|
-
function n(
|
34
|
-
|
33
|
+
function n(c) {
|
34
|
+
c.done ? s(c.value) : i(c.value).then(f, l);
|
35
35
|
}
|
36
|
-
n((t = t.apply(
|
36
|
+
n((t = t.apply(R, e || [])).next());
|
37
37
|
});
|
38
38
|
}, v;
|
39
|
-
(function(
|
40
|
-
|
39
|
+
(function(R) {
|
40
|
+
R.PROVIDER_CHANGED = "PROVIDER_CHANGED", R.BEFORE_PROVIDER_CHANGE = "BEFORE_PROVIDER_CHANGE";
|
41
41
|
})(v || (v = {}));
|
42
42
|
const b = {
|
43
|
-
HttpProvider:
|
43
|
+
HttpProvider: A,
|
44
44
|
WebsocketProvider: C
|
45
|
-
}, O = (c) => {
|
46
|
-
var e;
|
47
|
-
if (Array.isArray(c.params)) {
|
48
|
-
const r = c.params[0];
|
49
|
-
if (r.input && !r.data)
|
50
|
-
return Object.assign(Object.assign({}, c), { params: [Object.assign(Object.assign({}, r), { data: (e = r.data) !== null && e !== void 0 ? e : r.input })] });
|
51
|
-
}
|
52
|
-
return c;
|
53
45
|
};
|
54
|
-
class
|
46
|
+
class _ extends q {
|
55
47
|
constructor(e, r) {
|
56
48
|
super(), d(e) || this.setProvider(e), this.useRpcCallSpecification = r;
|
57
49
|
}
|
@@ -89,7 +81,7 @@ class E extends W {
|
|
89
81
|
else if (/^ws(s)?:\/\//i.test(e))
|
90
82
|
r = new this.providers.WebsocketProvider(e);
|
91
83
|
else
|
92
|
-
throw new
|
84
|
+
throw new m(`Can't autodetect provider for "${e}"`);
|
93
85
|
else
|
94
86
|
d(e) ? r = void 0 : r = e;
|
95
87
|
return this.emit(v.BEFORE_PROVIDER_CHANGE, this._provider), this._provider = r, this.emit(v.PROVIDER_CHANGED, this._provider), !0;
|
@@ -104,9 +96,9 @@ class E extends W {
|
|
104
96
|
* in the response, will throw an error
|
105
97
|
*/
|
106
98
|
send(e) {
|
107
|
-
return
|
99
|
+
return E(this, void 0, void 0, function* () {
|
108
100
|
const r = yield this._sendRequest(e);
|
109
|
-
if (
|
101
|
+
if (a(r))
|
110
102
|
return r.result;
|
111
103
|
throw new h(r);
|
112
104
|
});
|
@@ -117,17 +109,17 @@ class E extends W {
|
|
117
109
|
* @param request {@link JsonRpcBatchRequest} The batch request to send
|
118
110
|
*/
|
119
111
|
sendBatch(e) {
|
120
|
-
return
|
112
|
+
return E(this, void 0, void 0, function* () {
|
121
113
|
return yield this._sendRequest(e);
|
122
114
|
});
|
123
115
|
}
|
124
116
|
_sendRequest(e) {
|
125
|
-
return
|
117
|
+
return E(this, void 0, void 0, function* () {
|
126
118
|
const { provider: r } = this;
|
127
119
|
if (d(r))
|
128
|
-
throw new
|
129
|
-
|
130
|
-
if (J(r)
|
120
|
+
throw new m("Provider not available. Use `.setProvider` or `.provider=` to initialize the provider.");
|
121
|
+
const t = u(e) ? B(e) : N(e);
|
122
|
+
if (J(r)) {
|
131
123
|
let i;
|
132
124
|
try {
|
133
125
|
i = yield r.request(t);
|
@@ -136,48 +128,48 @@ class E extends W {
|
|
136
128
|
}
|
137
129
|
return this._processJsonRpcResponse(t, i, { legacy: !1, error: !1 });
|
138
130
|
}
|
139
|
-
if (
|
131
|
+
if (D(r))
|
140
132
|
return r.request(t).then((i) => this._processJsonRpcResponse(t, i, {
|
141
133
|
legacy: !0,
|
142
134
|
error: !1
|
143
135
|
})).catch((i) => this._processJsonRpcResponse(t, i, { legacy: !0, error: !0 }));
|
144
|
-
if (
|
136
|
+
if (G(r))
|
145
137
|
return new Promise((i, s) => {
|
146
138
|
const o = (n) => s(this._processJsonRpcResponse(t, n, {
|
147
139
|
legacy: !0,
|
148
140
|
error: !0
|
149
|
-
})),
|
141
|
+
})), f = (n) => i(this._processJsonRpcResponse(t, n, {
|
150
142
|
legacy: !0,
|
151
143
|
error: !1
|
152
144
|
})), l = r.request(
|
153
145
|
t,
|
154
146
|
// a callback that is expected to be called after getting the response:
|
155
|
-
(n,
|
147
|
+
(n, c) => n ? o(n) : f(c)
|
156
148
|
);
|
157
|
-
|
149
|
+
W(l) && l.then(f).catch(o);
|
158
150
|
});
|
159
|
-
if (
|
151
|
+
if (H(r))
|
160
152
|
return new Promise((i, s) => {
|
161
|
-
r.send(t, (o,
|
153
|
+
r.send(t, (o, f) => {
|
162
154
|
if (o)
|
163
155
|
return s(this._processJsonRpcResponse(t, o, {
|
164
156
|
legacy: !0,
|
165
157
|
error: !0
|
166
158
|
}));
|
167
|
-
if (d(
|
159
|
+
if (d(f))
|
168
160
|
throw new h("", 'Got a "nullish" response from provider.');
|
169
|
-
return i(this._processJsonRpcResponse(t,
|
161
|
+
return i(this._processJsonRpcResponse(t, f, {
|
170
162
|
legacy: !0,
|
171
163
|
error: !1
|
172
164
|
}));
|
173
165
|
});
|
174
166
|
});
|
175
|
-
if (
|
167
|
+
if (I(r))
|
176
168
|
return r.sendAsync(t).then((i) => this._processJsonRpcResponse(t, i, { legacy: !0, error: !1 })).catch((i) => this._processJsonRpcResponse(t, i, {
|
177
169
|
legacy: !0,
|
178
170
|
error: !0
|
179
171
|
}));
|
180
|
-
throw new
|
172
|
+
throw new m("Provider does not have a request or send method to use.");
|
181
173
|
});
|
182
174
|
}
|
183
175
|
// eslint-disable-next-line class-methods-use-this
|
@@ -191,27 +183,27 @@ class E extends W {
|
|
191
183
|
i
|
192
184
|
);
|
193
185
|
if (p(r)) {
|
194
|
-
if (this.useRpcCallSpecification &&
|
186
|
+
if (this.useRpcCallSpecification && j(r)) {
|
195
187
|
const s = r;
|
196
188
|
if (g.get(s.error.code)) {
|
197
189
|
const o = g.get(s.error.code).error;
|
198
190
|
throw new o(s);
|
199
191
|
} else
|
200
|
-
throw new
|
201
|
-
} else if (!
|
192
|
+
throw new O(s);
|
193
|
+
} else if (!_._isReverted(r))
|
202
194
|
throw new P(r, e);
|
203
195
|
}
|
204
|
-
if (
|
196
|
+
if (a(r))
|
205
197
|
return r;
|
206
198
|
if (r instanceof Error)
|
207
|
-
throw
|
208
|
-
if (!t &&
|
199
|
+
throw _._isReverted(r), r;
|
200
|
+
if (!t && u(e) && V(r) || t && !i && u(e))
|
209
201
|
return r;
|
210
|
-
if (t && i &&
|
202
|
+
if (t && i && u(e))
|
211
203
|
throw r;
|
212
|
-
if (t && !p(r) && !
|
204
|
+
if (t && !p(r) && !a(r))
|
213
205
|
return this._buildResponse(e, r, i);
|
214
|
-
throw
|
206
|
+
throw u(e) && !Array.isArray(r) ? new h(r, "Got normal response for a batch request.") : !u(e) && Array.isArray(r) ? new h(r, "Got batch response for a normal request.") : (p(r) || a(r)) && !u(e) && r.id && e.id !== r.id ? new P(r) : new h(r, "Invalid response");
|
215
207
|
}
|
216
208
|
static _isReverted(e) {
|
217
209
|
let r;
|
@@ -225,7 +217,7 @@ class E extends W {
|
|
225
217
|
const i = {
|
226
218
|
jsonrpc: "2.0",
|
227
219
|
// eslint-disable-next-line no-nested-ternary
|
228
|
-
id:
|
220
|
+
id: u(e) ? e[0].id : "id" in e ? e.id : (
|
229
221
|
// Have to use the null here explicitly
|
230
222
|
// eslint-disable-next-line no-null/no-null
|
231
223
|
null
|
@@ -235,6 +227,6 @@ class E extends W {
|
|
235
227
|
}
|
236
228
|
}
|
237
229
|
export {
|
238
|
-
|
230
|
+
_ as Web3RequestManager,
|
239
231
|
v as Web3RequestManagerEvent
|
240
232
|
};
|
@@ -1,23 +1,23 @@
|
|
1
|
-
import {
|
1
|
+
import { ERR_PRIVATE_KEY_LENGTH as t, ERR_INVALID_PRIVATE_KEY as o, ERR_INVALID_SIGNATURE as i, ERR_UNSUPPORTED_KDF as n, ERR_INVALID_PASSWORD as c, ERR_IV_LENGTH as a, ERR_PBKDF2_ITERATIONS as d, ERR_KEY_DERIVATION_FAIL as E, ERR_KEY_VERSION_UNSUPPORTED as R } from "../error_codes.js";
|
2
2
|
import { BaseWeb3Error as r } from "../web3_error_base.js";
|
3
3
|
class _ extends r {
|
4
4
|
constructor() {
|
5
|
-
super("Private key must be 32 bytes."), this.code =
|
5
|
+
super("Private key must be 32 bytes."), this.code = t;
|
6
6
|
}
|
7
7
|
}
|
8
8
|
class l extends r {
|
9
9
|
constructor() {
|
10
|
-
super("Invalid Private Key, Not a valid string or uint8Array"), this.code =
|
10
|
+
super("Invalid Private Key, Not a valid string or uint8Array"), this.code = o;
|
11
11
|
}
|
12
12
|
}
|
13
13
|
class p extends r {
|
14
14
|
constructor(e) {
|
15
|
-
super(`"${e}"`), this.code =
|
15
|
+
super(`"${e}"`), this.code = i;
|
16
16
|
}
|
17
17
|
}
|
18
18
|
class v extends r {
|
19
19
|
constructor() {
|
20
|
-
super("Invalid key derivation function"), this.code =
|
20
|
+
super("Invalid key derivation function"), this.code = n;
|
21
21
|
}
|
22
22
|
}
|
23
23
|
class P extends r {
|
@@ -32,17 +32,17 @@ class y extends r {
|
|
32
32
|
}
|
33
33
|
class K extends r {
|
34
34
|
constructor() {
|
35
|
-
super("Password cannot be empty"), this.code =
|
35
|
+
super("Password cannot be empty"), this.code = c;
|
36
36
|
}
|
37
37
|
}
|
38
38
|
class h extends r {
|
39
39
|
constructor() {
|
40
|
-
super("Initialization vector must be 16 bytes"), this.code =
|
40
|
+
super("Initialization vector must be 16 bytes"), this.code = a;
|
41
41
|
}
|
42
42
|
}
|
43
43
|
class N extends r {
|
44
44
|
constructor() {
|
45
|
-
super("c > 1000, pbkdf2 is less secure with less iterations"), this.code =
|
45
|
+
super("c > 1000, pbkdf2 is less secure with less iterations"), this.code = d;
|
46
46
|
}
|
47
47
|
}
|
48
48
|
export {
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../../../web3-types/lib/esm/data_format_types.cjs");require("../../../web3-types/lib/esm/eth_types.cjs");require("../../../web3-types/lib/esm/web3_base_provider.cjs");require("../../../web3-core/lib/esm/web3_config.cjs");require("../../../web3-core/lib/esm/web3_request_manager.cjs");require("../../../web3-core/lib/esm/web3_subscription_manager.cjs");require("../../../web3-core/lib/esm/web3_subscriptions.cjs");require("../../../web3-core/lib/esm/web3_context.cjs");require("../../../web3-core/lib/esm/web3_batch_request.cjs");const P=require("../../../web3-errors/lib/esm/errors/signature_errors.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");require("../../../web3-eth-iban/lib/esm/iban.cjs");require("../../../web3-validator/lib/esm/formats.cjs");const N=require("../../../web3-validator/lib/esm/validation/string.cjs");require("../../../web3-validator/lib/esm/default_validator.cjs");const T=require("../../../web3-validator/lib/esm/validation/block.cjs"),p=require("../../../web3-validator/lib/esm/validation/bytes.cjs"),_=require("../../../web3-validator/lib/esm/validation/object.cjs"),H=require("../../../web3-core/lib/esm/web3_promi_event.cjs");require("../../../web3-eth-accounts/lib/esm/wallet.cjs");require("../../../web3-eth-accounts/lib/esm/account.cjs");require("../../../crc-32/crc32.cjs");require("../../../web3-eth-accounts/lib/esm/common/types.cjs");require("../../../web3-eth-accounts/lib/esm/tx/constants.cjs");require("../../../web3-eth-accounts/lib/esm/common/enums.cjs");require("../../../web3-eth-accounts/lib/esm/tx/eip1559Transaction.cjs");require("../../../web3-eth-accounts/lib/esm/tx/eip2930Transaction.cjs");require("../../../@ethereumjs/rlp/dist/index.cjs");require("../../../web3-eth-accounts/lib/esm/tx/types.cjs");const U=require("../../../web3-eth-accounts/lib/esm/tx/transactionFactory.cjs"),c=require("../../../web3-rpc-methods/lib/esm/eth_rpc_methods.cjs");require("../../../web3-rpc-methods/lib/esm/net_rpc_methods.cjs");require("../../../web3-rpc-methods/lib/esm/personal_rpc_methods.cjs");const b=require("./utils/decode_signed_transaction.cjs"),A=require("./schemas.cjs"),M=require("./utils/transaction_builder.cjs"),y=require("./utils/format_transaction.cjs"),I=require("./utils/try_send_transaction.cjs"),O=require("./utils/wait_for_transaction_receipt.cjs"),j=require("./constants.cjs"),E=require("./utils/send_tx_helper.cjs"),a=require("../../../web3-utils/lib/esm/formatter.cjs"),F=require("../../../web3-utils/lib/esm/converters.cjs");var f=globalThis&&globalThis.__awaiter||function(t,r,e,n){function o(i){return i instanceof e?i:new e(function(d){d(i)})}return new(e||(e=Promise))(function(i,d){function u(l){try{g(n.next(l))}catch(h){d(h)}}function m(l){try{g(n.throw(l))}catch(h){d(h)}}function g(l){l.done?i(l.value):o(l.value).then(u,m)}g((n=n.apply(t,r||[])).next())})},L=globalThis&&globalThis.__rest||function(t,r){var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&r.indexOf(n)<0&&(e[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(e[n[o]]=t[n[o]]);return e};const G=t=>f(void 0,void 0,void 0,function*(){return c.getSyncing(t.requestManager)});function W(t,r){return f(this,void 0,void 0,function*(){const e=yield c.getHashRate(t.requestManager);return a.format({format:"uint"},e,r)})}function z(t,r){return f(this,void 0,void 0,function*(){const e=yield c.getGasPrice(t.requestManager);return a.format({format:"uint"},e,r)})}function J(t,r){return f(this,void 0,void 0,function*(){const e=yield c.getBlockNumber(t.requestManager);return a.format({format:"uint"},e,r)})}function K(t,r,e=t.defaultBlock,n){return f(this,void 0,void 0,function*(){const o=T.isBlockTag(e)?e:a.format({format:"uint"},e,s.ETH_DATA_FORMAT),i=yield c.getBalance(t.requestManager,r,o);return a.format({format:"uint"},i,n)})}function Q(t,r,e,n=t.defaultBlock,o){return f(this,void 0,void 0,function*(){const i=a.format({format:"uint"},e,s.ETH_DATA_FORMAT),d=T.isBlockTag(n)?n:a.format({format:"uint"},n,s.ETH_DATA_FORMAT),u=yield c.getStorageAt(t.requestManager,r,i,d);return a.format({format:"bytes"},u,o)})}function V(t,r,e=t.defaultBlock,n){return f(this,void 0,void 0,function*(){const o=T.isBlockTag(e)?e:a.format({format:"uint"},e,s.ETH_DATA_FORMAT),i=yield c.getCode(t.requestManager,r,o);return a.format({format:"bytes"},i,n)})}function X(t,r=t.defaultBlock,e=!1,n){return f(this,void 0,void 0,function*(){let o;if(p.isBytes(r)){const i=a.format({format:"bytes32"},r,s.ETH_DATA_FORMAT);o=yield c.getBlockByHash(t.requestManager,i,e)}else{const i=T.isBlockTag(r)?r:a.format({format:"uint"},r,s.ETH_DATA_FORMAT);o=yield c.getBlockByNumber(t.requestManager,i,e)}return a.format(A.blockSchema,o,n)})}function Y(t,r=t.defaultBlock,e){return f(this,void 0,void 0,function*(){let n;if(p.isBytes(r)){const o=a.format({format:"bytes32"},r,s.ETH_DATA_FORMAT);n=yield c.getBlockTransactionCountByHash(t.requestManager,o)}else{const o=T.isBlockTag(r)?r:a.format({format:"uint"},r,s.ETH_DATA_FORMAT);n=yield c.getBlockTransactionCountByNumber(t.requestManager,o)}return a.format({format:"uint"},n,e)})}function Z(t,r=t.defaultBlock,e){return f(this,void 0,void 0,function*(){let n;if(p.isBytes(r)){const o=a.format({format:"bytes32"},r,s.ETH_DATA_FORMAT);n=yield c.getUncleCountByBlockHash(t.requestManager,o)}else{const o=T.isBlockTag(r)?r:a.format({format:"uint"},r,s.ETH_DATA_FORMAT);n=yield c.getUncleCountByBlockNumber(t.requestManager,o)}return a.format({format:"uint"},n,e)})}function w(t,r=t.defaultBlock,e,n){return f(this,void 0,void 0,function*(){const o=a.format({format:"uint"},e,s.ETH_DATA_FORMAT);let i;if(p.isBytes(r)){const d=a.format({format:"bytes32"},r,s.ETH_DATA_FORMAT);i=yield c.getUncleByBlockHashAndIndex(t.requestManager,d,o)}else{const d=T.isBlockTag(r)?r:a.format({format:"uint"},r,s.ETH_DATA_FORMAT);i=yield c.getUncleByBlockNumberAndIndex(t.requestManager,d,o)}return a.format(A.blockSchema,i,n)})}function x(t,r,e){return f(this,void 0,void 0,function*(){const n=a.format({format:"bytes32"},r,s.DEFAULT_RETURN_FORMAT),o=yield c.getTransactionByHash(t.requestManager,n);return _.isNullish(o)?o:y.formatTransaction(o,e,{fillInputAndData:!0})})}function C(t,r){return f(this,void 0,void 0,function*(){return(yield c.getPendingTransactions(t.requestManager)).map(n=>y.formatTransaction(n,r,{fillInputAndData:!0}))})}function $(t,r=t.defaultBlock,e,n){return f(this,void 0,void 0,function*(){const o=a.format({format:"uint"},e,s.ETH_DATA_FORMAT);let i;if(p.isBytes(r)){const d=a.format({format:"bytes32"},r,s.ETH_DATA_FORMAT);i=yield c.getTransactionByBlockHashAndIndex(t.requestManager,d,o)}else{const d=T.isBlockTag(r)?r:a.format({format:"uint"},r,s.ETH_DATA_FORMAT);i=yield c.getTransactionByBlockNumberAndIndex(t.requestManager,d,o)}return _.isNullish(i)?i:y.formatTransaction(i,n,{fillInputAndData:!0})})}function tt(t,r,e){return f(this,void 0,void 0,function*(){const n=a.format({format:"bytes32"},r,s.DEFAULT_RETURN_FORMAT),o=yield c.getTransactionReceipt(t.requestManager,n);return _.isNullish(o)?o:a.format(A.transactionReceiptSchema,o,e)})}function et(t,r,e=t.defaultBlock,n){return f(this,void 0,void 0,function*(){const o=T.isBlockTag(e)?e:a.format({format:"uint"},e,s.ETH_DATA_FORMAT),i=yield c.getTransactionCount(t.requestManager,r,o);return a.format({format:"uint"},i,n)})}function rt(t,r,e,n={checkRevertBeforeSending:!0}){const o=new H.Web3PromiEvent((i,d)=>{setImmediate(()=>{f(this,void 0,void 0,function*(){const u=new E.SendTxHelper({web3Context:t,promiEvent:o,options:n,returnFormat:e});let m=y.formatTransaction(Object.assign(Object.assign({},r),{from:M.getTransactionFromOrToAttr("from",t,r),to:M.getTransactionFromOrToAttr("to",t,r)}),s.ETH_DATA_FORMAT);try{m=yield u.populateGasPrice({transaction:r,transactionFormatted:m}),yield u.checkRevertBeforeSending(m),u.emitSending(m);let g;t.wallet&&!_.isNullish(m.from)&&(g=t.wallet.get(m.from));const l=yield u.signAndSend({wallet:g,tx:m}),h=a.format({format:"bytes32"},l,e);u.emitSent(m),u.emitTransactionHash(h);const R=yield O.waitForTransactionReceipt(t,l,e),v=u.getReceiptWithEvents(a.format(A.transactionReceiptSchema,R,e));u.emitReceipt(v),i(yield u.handleResolve({receipt:v,tx:m})),u.emitConfirmation({receipt:v,transactionHash:l})}catch(g){d(yield u.handleError({error:g,tx:m}))}})})});return o}function nt(t,r,e,n={checkRevertBeforeSending:!0}){const o=new H.Web3PromiEvent((i,d)=>{setImmediate(()=>{f(this,void 0,void 0,function*(){const u=new E.SendTxHelper({web3Context:t,promiEvent:o,options:n,returnFormat:e}),m=a.format({format:"bytes"},r,s.ETH_DATA_FORMAT),g=U.TransactionFactory.fromSerializedData(F.bytesToUint8Array(F.hexToBytes(m))),l=Object.assign(Object.assign({},g.toJSON()),{from:g.getSenderAddress().toString()});try{const{v:h,r:R,s:v}=l,S=L(l,["v","r","s"]);yield u.checkRevertBeforeSending(S),u.emitSending(m);const q=yield I.trySendTransaction(t,()=>f(this,void 0,void 0,function*(){return c.sendRawTransaction(t.requestManager,m)}));u.emitSent(m);const D=a.format({format:"bytes32"},q,e);u.emitTransactionHash(D);const k=yield O.waitForTransactionReceipt(t,q,e),B=u.getReceiptWithEvents(a.format(A.transactionReceiptSchema,k,e));u.emitReceipt(B),i(yield u.handleResolve({receipt:B,tx:l})),u.emitConfirmation({receipt:B,transactionHash:q})}catch(h){d(yield u.handleError({error:h,tx:l}))}})})});return o}function ot(t,r,e,n){var o;return f(this,void 0,void 0,function*(){const i=a.format({format:"bytes"},r,s.DEFAULT_RETURN_FORMAT);if(!((o=t.wallet)===null||o===void 0)&&o.get(e)){const m=t.wallet.get(e).sign(i);return a.format(A.SignatureObjectSchema,m,n)}if(typeof e=="number")throw new P.SignatureError(r,'RPC method "eth_sign" does not support index signatures');const d=yield c.sign(t.requestManager,e,i);return a.format({format:"bytes"},d,n)})}function at(t,r,e){return f(this,void 0,void 0,function*(){const n=yield c.signTransaction(t.requestManager,y.formatTransaction(r,s.ETH_DATA_FORMAT));return N.isString(n)?b.decodeSignedTransaction(n,e,{fillInputAndData:!0}):{raw:a.format({format:"bytes"},n.raw,e),tx:y.formatTransaction(n.tx,e,{fillInputAndData:!0})}})}function it(t,r,e=t.defaultBlock,n){return f(this,void 0,void 0,function*(){const o=T.isBlockTag(e)?e:a.format({format:"uint"},e,s.ETH_DATA_FORMAT),i=yield c.call(t.requestManager,y.formatTransaction(r,s.ETH_DATA_FORMAT),o);return a.format({format:"bytes"},i,n)})}function st(t,r,e=t.defaultBlock,n){return f(this,void 0,void 0,function*(){const o=y.formatTransaction(r,s.ETH_DATA_FORMAT),i=T.isBlockTag(e)?e:a.format({format:"uint"},e,s.ETH_DATA_FORMAT),d=yield c.estimateGas(t.requestManager,o,i);return a.format({format:"uint"},d,n)})}function ct(t,r,e){return f(this,void 0,void 0,function*(){let{toBlock:n,fromBlock:o}=r;_.isNullish(n)||(typeof n=="number"||typeof n=="bigint")&&(n=F.numberToHex(n)),_.isNullish(o)||(typeof o=="number"||typeof o=="bigint")&&(o=F.numberToHex(o));const i=Object.assign(Object.assign({},r),{fromBlock:o,toBlock:n});return(yield c.getLogs(t.requestManager,i)).map(m=>typeof m=="string"?m:a.format(A.logSchema,m,e))})}function ut(t,r){return f(this,void 0,void 0,function*(){const e=yield c.getChainId(t.requestManager);return a.format({format:"uint"},e,r)})}function ft(t,r,e,n=t.defaultBlock,o){return f(this,void 0,void 0,function*(){const i=e.map(m=>a.format({format:"bytes"},m,s.ETH_DATA_FORMAT)),d=T.isBlockTag(n)?n:a.format({format:"uint"},n,s.ETH_DATA_FORMAT),u=yield c.getProof(t.requestManager,r,i,d);return a.format(A.accountSchema,u,o)})}function dt(t,r,e=t.defaultBlock,n,o){return f(this,void 0,void 0,function*(){const i=a.format({format:"uint"},r,s.ETH_DATA_FORMAT),d=T.isBlockTag(e)?e:a.format({format:"uint"},e,s.ETH_DATA_FORMAT),u=a.format({type:"array",items:{format:"uint"}},n,j.NUMBER_DATA_FORMAT),m=yield c.getFeeHistory(t.requestManager,i,d,u);return a.format(A.feeHistorySchema,m,o)})}function mt(t,r,e=t.defaultBlock,n){return f(this,void 0,void 0,function*(){const o=T.isBlockTag(e)?e:a.format({format:"uint"},e,s.ETH_DATA_FORMAT),i=yield c.createAccessList(t.requestManager,y.formatTransaction(r,s.ETH_DATA_FORMAT),o);return a.format(A.accessListResultSchema,i,n)})}function lt(t,r,e,n,o){return f(this,void 0,void 0,function*(){const i=yield c.signTypedData(t.requestManager,r,e,n);return a.format({format:"bytes"},i,o)})}exports.call=it;exports.createAccessList=mt;exports.estimateGas=st;exports.getBalance=K;exports.getBlock=X;exports.getBlockNumber=J;exports.getBlockTransactionCount=Y;exports.getBlockUncleCount=Z;exports.getChainId=ut;exports.getCode=V;exports.getFeeHistory=dt;exports.getGasPrice=z;exports.getHashRate=W;exports.getLogs=ct;exports.getPendingTransactions=C;exports.getProof=ft;exports.getStorageAt=Q;exports.getTransaction=x;exports.getTransactionCount=et;exports.getTransactionFromBlock=$;exports.getTransactionReceipt=tt;exports.getUncle=w;exports.isSyncing=G;exports.sendSignedTransaction=nt;exports.sendTransaction=rt;exports.sign=ot;exports.signTransaction=at;exports.signTypedData=lt;
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../../../web3-types/lib/esm/data_format_types.cjs");require("../../../web3-types/lib/esm/eth_types.cjs");require("../../../web3-types/lib/esm/web3_base_provider.cjs");require("../../../web3-core/lib/esm/web3_config.cjs");require("../../../web3-core/lib/esm/web3_request_manager.cjs");require("../../../web3-core/lib/esm/web3_subscription_manager.cjs");require("../../../web3-core/lib/esm/web3_subscriptions.cjs");require("../../../web3-core/lib/esm/web3_context.cjs");require("../../../web3-core/lib/esm/web3_batch_request.cjs");const P=require("../../../web3-errors/lib/esm/errors/signature_errors.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");require("../../../web3-eth-iban/lib/esm/iban.cjs");require("../../../web3-validator/lib/esm/formats.cjs");const N=require("../../../web3-validator/lib/esm/validation/string.cjs");require("../../../web3-validator/lib/esm/default_validator.cjs");const p=require("../../../web3-validator/lib/esm/validation/bytes.cjs"),T=require("../../../web3-validator/lib/esm/validation/block.cjs"),_=require("../../../web3-validator/lib/esm/validation/object.cjs"),H=require("../../../web3-core/lib/esm/web3_promi_event.cjs");require("../../../web3-eth-accounts/lib/esm/wallet.cjs");require("../../../web3-eth-accounts/lib/esm/account.cjs");require("../../../crc-32/crc32.cjs");require("../../../web3-eth-accounts/lib/esm/common/types.cjs");require("../../../web3-eth-accounts/lib/esm/tx/constants.cjs");require("../../../web3-eth-accounts/lib/esm/common/enums.cjs");require("../../../web3-eth-accounts/lib/esm/tx/eip1559Transaction.cjs");require("../../../web3-eth-accounts/lib/esm/tx/eip2930Transaction.cjs");require("../../../@ethereumjs/rlp/dist/index.cjs");require("../../../web3-eth-accounts/lib/esm/tx/types.cjs");const U=require("../../../web3-eth-accounts/lib/esm/tx/transactionFactory.cjs"),c=require("../../../web3-rpc-methods/lib/esm/eth_rpc_methods.cjs");require("../../../web3-rpc-methods/lib/esm/net_rpc_methods.cjs");require("../../../web3-rpc-methods/lib/esm/personal_rpc_methods.cjs");const b=require("./utils/decode_signed_transaction.cjs"),A=require("./schemas.cjs"),M=require("./utils/transaction_builder.cjs"),y=require("./utils/format_transaction.cjs"),I=require("./utils/try_send_transaction.cjs"),O=require("./utils/wait_for_transaction_receipt.cjs"),j=require("./constants.cjs"),E=require("./utils/send_tx_helper.cjs"),a=require("../../../web3-utils/lib/esm/formatter.cjs"),F=require("../../../web3-utils/lib/esm/converters.cjs");var f=globalThis&&globalThis.__awaiter||function(t,r,e,n){function o(i){return i instanceof e?i:new e(function(d){d(i)})}return new(e||(e=Promise))(function(i,d){function u(l){try{g(n.next(l))}catch(h){d(h)}}function m(l){try{g(n.throw(l))}catch(h){d(h)}}function g(l){l.done?i(l.value):o(l.value).then(u,m)}g((n=n.apply(t,r||[])).next())})},L=globalThis&&globalThis.__rest||function(t,r){var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&r.indexOf(n)<0&&(e[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(e[n[o]]=t[n[o]]);return e};const G=t=>f(void 0,void 0,void 0,function*(){return c.getSyncing(t.requestManager)});function W(t,r){return f(this,void 0,void 0,function*(){const e=yield c.getHashRate(t.requestManager);return a.format({format:"uint"},e,r)})}function z(t,r){return f(this,void 0,void 0,function*(){const e=yield c.getGasPrice(t.requestManager);return a.format({format:"uint"},e,r)})}function J(t,r){return f(this,void 0,void 0,function*(){const e=yield c.getBlockNumber(t.requestManager);return a.format({format:"uint"},e,r)})}function K(t,r,e=t.defaultBlock,n){return f(this,void 0,void 0,function*(){const o=T.isBlockTag(e)?e:a.format({format:"uint"},e,s.ETH_DATA_FORMAT),i=yield c.getBalance(t.requestManager,r,o);return a.format({format:"uint"},i,n)})}function Q(t,r,e,n=t.defaultBlock,o){return f(this,void 0,void 0,function*(){const i=a.format({format:"uint"},e,s.ETH_DATA_FORMAT),d=T.isBlockTag(n)?n:a.format({format:"uint"},n,s.ETH_DATA_FORMAT),u=yield c.getStorageAt(t.requestManager,r,i,d);return a.format({format:"bytes"},u,o)})}function V(t,r,e=t.defaultBlock,n){return f(this,void 0,void 0,function*(){const o=T.isBlockTag(e)?e:a.format({format:"uint"},e,s.ETH_DATA_FORMAT),i=yield c.getCode(t.requestManager,r,o);return a.format({format:"bytes"},i,n)})}function X(t,r=t.defaultBlock,e=!1,n){return f(this,void 0,void 0,function*(){let o;if(p.isBytes(r)){const i=a.format({format:"bytes32"},r,s.ETH_DATA_FORMAT);o=yield c.getBlockByHash(t.requestManager,i,e)}else{const i=T.isBlockTag(r)?r:a.format({format:"uint"},r,s.ETH_DATA_FORMAT);o=yield c.getBlockByNumber(t.requestManager,i,e)}return a.format(A.blockSchema,o,n)})}function Y(t,r=t.defaultBlock,e){return f(this,void 0,void 0,function*(){let n;if(p.isBytes(r)){const o=a.format({format:"bytes32"},r,s.ETH_DATA_FORMAT);n=yield c.getBlockTransactionCountByHash(t.requestManager,o)}else{const o=T.isBlockTag(r)?r:a.format({format:"uint"},r,s.ETH_DATA_FORMAT);n=yield c.getBlockTransactionCountByNumber(t.requestManager,o)}return a.format({format:"uint"},n,e)})}function Z(t,r=t.defaultBlock,e){return f(this,void 0,void 0,function*(){let n;if(p.isBytes(r)){const o=a.format({format:"bytes32"},r,s.ETH_DATA_FORMAT);n=yield c.getUncleCountByBlockHash(t.requestManager,o)}else{const o=T.isBlockTag(r)?r:a.format({format:"uint"},r,s.ETH_DATA_FORMAT);n=yield c.getUncleCountByBlockNumber(t.requestManager,o)}return a.format({format:"uint"},n,e)})}function w(t,r=t.defaultBlock,e,n){return f(this,void 0,void 0,function*(){const o=a.format({format:"uint"},e,s.ETH_DATA_FORMAT);let i;if(p.isBytes(r)){const d=a.format({format:"bytes32"},r,s.ETH_DATA_FORMAT);i=yield c.getUncleByBlockHashAndIndex(t.requestManager,d,o)}else{const d=T.isBlockTag(r)?r:a.format({format:"uint"},r,s.ETH_DATA_FORMAT);i=yield c.getUncleByBlockNumberAndIndex(t.requestManager,d,o)}return a.format(A.blockSchema,i,n)})}function x(t,r,e){return f(this,void 0,void 0,function*(){const n=a.format({format:"bytes32"},r,s.DEFAULT_RETURN_FORMAT),o=yield c.getTransactionByHash(t.requestManager,n);return _.isNullish(o)?o:y.formatTransaction(o,e,{fillInputAndData:!0})})}function C(t,r){return f(this,void 0,void 0,function*(){return(yield c.getPendingTransactions(t.requestManager)).map(n=>y.formatTransaction(n,r,{fillInputAndData:!0}))})}function $(t,r=t.defaultBlock,e,n){return f(this,void 0,void 0,function*(){const o=a.format({format:"uint"},e,s.ETH_DATA_FORMAT);let i;if(p.isBytes(r)){const d=a.format({format:"bytes32"},r,s.ETH_DATA_FORMAT);i=yield c.getTransactionByBlockHashAndIndex(t.requestManager,d,o)}else{const d=T.isBlockTag(r)?r:a.format({format:"uint"},r,s.ETH_DATA_FORMAT);i=yield c.getTransactionByBlockNumberAndIndex(t.requestManager,d,o)}return _.isNullish(i)?i:y.formatTransaction(i,n,{fillInputAndData:!0})})}function tt(t,r,e){return f(this,void 0,void 0,function*(){const n=a.format({format:"bytes32"},r,s.DEFAULT_RETURN_FORMAT),o=yield c.getTransactionReceipt(t.requestManager,n);return _.isNullish(o)?o:a.format(A.transactionReceiptSchema,o,e)})}function et(t,r,e=t.defaultBlock,n){return f(this,void 0,void 0,function*(){const o=T.isBlockTag(e)?e:a.format({format:"uint"},e,s.ETH_DATA_FORMAT),i=yield c.getTransactionCount(t.requestManager,r,o);return a.format({format:"uint"},i,n)})}function rt(t,r,e,n={checkRevertBeforeSending:!0}){const o=new H.Web3PromiEvent((i,d)=>{setImmediate(()=>{f(this,void 0,void 0,function*(){const u=new E.SendTxHelper({web3Context:t,promiEvent:o,options:n,returnFormat:e});let m=y.formatTransaction(Object.assign(Object.assign({},r),{from:M.getTransactionFromOrToAttr("from",t,r),to:M.getTransactionFromOrToAttr("to",t,r)}),s.ETH_DATA_FORMAT);try{m=yield u.populateGasPrice({transaction:r,transactionFormatted:m}),yield u.checkRevertBeforeSending(m),u.emitSending(m);let g;t.wallet&&!_.isNullish(m.from)&&(g=t.wallet.get(m.from));const l=yield u.signAndSend({wallet:g,tx:m}),h=a.format({format:"bytes32"},l,e);u.emitSent(m),u.emitTransactionHash(h);const R=yield O.waitForTransactionReceipt(t,l,e),v=u.getReceiptWithEvents(a.format(A.transactionReceiptSchema,R,e));u.emitReceipt(v),i(yield u.handleResolve({receipt:v,tx:m})),u.emitConfirmation({receipt:v,transactionHash:l})}catch(g){d(yield u.handleError({error:g,tx:m}))}})})});return o}function nt(t,r,e,n={checkRevertBeforeSending:!0}){const o=new H.Web3PromiEvent((i,d)=>{setImmediate(()=>{f(this,void 0,void 0,function*(){const u=new E.SendTxHelper({web3Context:t,promiEvent:o,options:n,returnFormat:e}),m=a.format({format:"bytes"},r,s.ETH_DATA_FORMAT),g=U.TransactionFactory.fromSerializedData(F.bytesToUint8Array(F.hexToBytes(m))),l=Object.assign(Object.assign({},g.toJSON()),{from:g.getSenderAddress().toString()});try{const{v:h,r:R,s:v}=l,S=L(l,["v","r","s"]);yield u.checkRevertBeforeSending(S),u.emitSending(m);const q=yield I.trySendTransaction(t,()=>f(this,void 0,void 0,function*(){return c.sendRawTransaction(t.requestManager,m)}));u.emitSent(m);const D=a.format({format:"bytes32"},q,e);u.emitTransactionHash(D);const k=yield O.waitForTransactionReceipt(t,q,e),B=u.getReceiptWithEvents(a.format(A.transactionReceiptSchema,k,e));u.emitReceipt(B),i(yield u.handleResolve({receipt:B,tx:l})),u.emitConfirmation({receipt:B,transactionHash:q})}catch(h){d(yield u.handleError({error:h,tx:l}))}})})});return o}function ot(t,r,e,n){var o;return f(this,void 0,void 0,function*(){const i=a.format({format:"bytes"},r,s.DEFAULT_RETURN_FORMAT);if(!((o=t.wallet)===null||o===void 0)&&o.get(e)){const m=t.wallet.get(e).sign(i);return a.format(A.SignatureObjectSchema,m,n)}if(typeof e=="number")throw new P.SignatureError(r,'RPC method "eth_sign" does not support index signatures');const d=yield c.sign(t.requestManager,e,i);return a.format({format:"bytes"},d,n)})}function at(t,r,e){return f(this,void 0,void 0,function*(){const n=yield c.signTransaction(t.requestManager,y.formatTransaction(r,s.ETH_DATA_FORMAT));return N.isString(n)?b.decodeSignedTransaction(n,e,{fillInputAndData:!0}):{raw:a.format({format:"bytes"},n.raw,e),tx:y.formatTransaction(n.tx,e,{fillInputAndData:!0})}})}function it(t,r,e=t.defaultBlock,n){return f(this,void 0,void 0,function*(){const o=T.isBlockTag(e)?e:a.format({format:"uint"},e,s.ETH_DATA_FORMAT),i=yield c.call(t.requestManager,y.formatTransaction(r,s.ETH_DATA_FORMAT),o);return a.format({format:"bytes"},i,n)})}function st(t,r,e=t.defaultBlock,n){return f(this,void 0,void 0,function*(){const o=y.formatTransaction(r,s.ETH_DATA_FORMAT),i=T.isBlockTag(e)?e:a.format({format:"uint"},e,s.ETH_DATA_FORMAT),d=yield c.estimateGas(t.requestManager,o,i);return a.format({format:"uint"},d,n)})}function ct(t,r,e){return f(this,void 0,void 0,function*(){let{toBlock:n,fromBlock:o}=r;_.isNullish(n)||(typeof n=="number"||typeof n=="bigint")&&(n=F.numberToHex(n)),_.isNullish(o)||(typeof o=="number"||typeof o=="bigint")&&(o=F.numberToHex(o));const i=Object.assign(Object.assign({},r),{fromBlock:o,toBlock:n});return(yield c.getLogs(t.requestManager,i)).map(m=>typeof m=="string"?m:a.format(A.logSchema,m,e))})}function ut(t,r){return f(this,void 0,void 0,function*(){const e=yield c.getChainId(t.requestManager);return a.format({format:"uint"},e,r)})}function ft(t,r,e,n=t.defaultBlock,o){return f(this,void 0,void 0,function*(){const i=e.map(m=>a.format({format:"bytes"},m,s.ETH_DATA_FORMAT)),d=T.isBlockTag(n)?n:a.format({format:"uint"},n,s.ETH_DATA_FORMAT),u=yield c.getProof(t.requestManager,r,i,d);return a.format(A.accountSchema,u,o)})}function dt(t,r,e=t.defaultBlock,n,o){return f(this,void 0,void 0,function*(){const i=a.format({format:"uint"},r,s.ETH_DATA_FORMAT),d=T.isBlockTag(e)?e:a.format({format:"uint"},e,s.ETH_DATA_FORMAT),u=a.format({type:"array",items:{format:"uint"}},n,j.NUMBER_DATA_FORMAT),m=yield c.getFeeHistory(t.requestManager,i,d,u);return a.format(A.feeHistorySchema,m,o)})}function mt(t,r,e=t.defaultBlock,n){return f(this,void 0,void 0,function*(){const o=T.isBlockTag(e)?e:a.format({format:"uint"},e,s.ETH_DATA_FORMAT),i=yield c.createAccessList(t.requestManager,y.formatTransaction(r,s.ETH_DATA_FORMAT),o);return a.format(A.accessListResultSchema,i,n)})}function lt(t,r,e,n,o){return f(this,void 0,void 0,function*(){const i=yield c.signTypedData(t.requestManager,r,e,n);return a.format({format:"bytes"},i,o)})}exports.call=it;exports.createAccessList=mt;exports.estimateGas=st;exports.getBalance=K;exports.getBlock=X;exports.getBlockNumber=J;exports.getBlockTransactionCount=Y;exports.getBlockUncleCount=Z;exports.getChainId=ut;exports.getCode=V;exports.getFeeHistory=dt;exports.getGasPrice=z;exports.getHashRate=W;exports.getLogs=ct;exports.getPendingTransactions=C;exports.getProof=ft;exports.getStorageAt=Q;exports.getTransaction=x;exports.getTransactionCount=et;exports.getTransactionFromBlock=$;exports.getTransactionReceipt=tt;exports.getUncle=w;exports.isSyncing=G;exports.sendSignedTransaction=nt;exports.sendTransaction=rt;exports.sign=ot;exports.signTransaction=at;exports.signTypedData=lt;
|
@@ -13,8 +13,8 @@ import "../../../web3-eth-iban/lib/esm/iban.js";
|
|
13
13
|
import "../../../web3-validator/lib/esm/formats.js";
|
14
14
|
import { isString as D } from "../../../web3-validator/lib/esm/validation/string.js";
|
15
15
|
import "../../../web3-validator/lib/esm/default_validator.js";
|
16
|
-
import { isBlockTag as l } from "../../../web3-validator/lib/esm/validation/block.js";
|
17
16
|
import { isBytes as v } from "../../../web3-validator/lib/esm/validation/bytes.js";
|
17
|
+
import { isBlockTag as l } from "../../../web3-validator/lib/esm/validation/block.js";
|
18
18
|
import { isNullish as h } from "../../../web3-validator/lib/esm/validation/object.js";
|
19
19
|
import { Web3PromiEvent as A } from "../../../web3-core/lib/esm/web3_promi_event.js";
|
20
20
|
import "../../../web3-eth-accounts/lib/esm/wallet.js";
|