@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,11 +1,11 @@
|
|
1
|
-
import { mod as
|
2
|
-
import * as
|
3
|
-
import { bytesToNumberBE as _, bitMask as
|
4
|
-
import { wNAF as
|
1
|
+
import { mod as lt, getMinHashLength as ht, mapHashToField as mt, invert as pt } from "./modular.js";
|
2
|
+
import * as yt from "./utils.js";
|
3
|
+
import { bytesToNumberBE as _, bitMask as wt, concatBytes as rt, validateObject as ft, ensureBytes as Y, hexToBytes as at, createHmacDrbg as Et, isBytes as tt, bytesToHex as nt, numberToBytesBE as ct } from "./utils.js";
|
4
|
+
import { wNAF as gt, validateBasic as dt } from "./curve.js";
|
5
5
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
6
|
-
function
|
7
|
-
const n =
|
8
|
-
|
6
|
+
function bt(B) {
|
7
|
+
const n = dt(B);
|
8
|
+
ft(n, {
|
9
9
|
a: "field",
|
10
10
|
b: "field"
|
11
11
|
}, {
|
@@ -26,7 +26,7 @@ function Et(B) {
|
|
26
26
|
}
|
27
27
|
return Object.freeze({ ...n });
|
28
28
|
}
|
29
|
-
const { bytesToNumberBE:
|
29
|
+
const { bytesToNumberBE: Bt, hexToBytes: vt } = yt, k = {
|
30
30
|
// asn.1 DER encoding utils
|
31
31
|
Err: class extends Error {
|
32
32
|
constructor(n = "") {
|
@@ -44,58 +44,58 @@ const { bytesToNumberBE: gt, hexToBytes: bt } = mt, k = {
|
|
44
44
|
throw new n("Invalid signature integer: negative");
|
45
45
|
if (v[0] === 0 && !(v[1] & 128))
|
46
46
|
throw new n("Invalid signature integer: unnecessary leading zero");
|
47
|
-
return { d:
|
47
|
+
return { d: Bt(v), l: B.subarray(t + 2) };
|
48
48
|
},
|
49
49
|
toSig(B) {
|
50
|
-
const { Err: n } = k, t = typeof B == "string" ?
|
51
|
-
if (!(t
|
50
|
+
const { Err: n } = k, t = typeof B == "string" ? vt(B) : B;
|
51
|
+
if (!tt(t))
|
52
52
|
throw new Error("ui8a expected");
|
53
53
|
let v = t.length;
|
54
54
|
if (v < 2 || t[0] != 48)
|
55
55
|
throw new n("Invalid signature tag");
|
56
56
|
if (t[1] !== v - 2)
|
57
57
|
throw new n("Invalid signature: incorrect length");
|
58
|
-
const { d: A, l: O } = k._parseInt(t.subarray(2)), { d:
|
58
|
+
const { d: A, l: O } = k._parseInt(t.subarray(2)), { d: C, l: S } = k._parseInt(O);
|
59
59
|
if (S.length)
|
60
60
|
throw new n("Invalid signature: left bytes after parsing");
|
61
|
-
return { r: A, s:
|
61
|
+
return { r: A, s: C };
|
62
62
|
},
|
63
63
|
hexFromSig(B) {
|
64
64
|
const n = (x) => Number.parseInt(x[0], 16) & 8 ? "00" + x : x, t = (x) => {
|
65
|
-
const
|
66
|
-
return
|
67
|
-
}, v = n(t(B.s)), A = n(t(B.r)), O = v.length / 2,
|
68
|
-
return `30${t(
|
65
|
+
const F = x.toString(16);
|
66
|
+
return F.length & 1 ? `0${F}` : F;
|
67
|
+
}, v = n(t(B.s)), A = n(t(B.r)), O = v.length / 2, C = A.length / 2, S = t(O), H = t(C);
|
68
|
+
return `30${t(C + O + 4)}02${H}${A}02${S}${v}`;
|
69
69
|
}
|
70
|
-
},
|
70
|
+
}, L = BigInt(0), z = BigInt(1);
|
71
71
|
BigInt(2);
|
72
|
-
const
|
72
|
+
const ut = BigInt(3);
|
73
73
|
BigInt(4);
|
74
|
-
function
|
75
|
-
const n =
|
76
|
-
const s =
|
77
|
-
return
|
74
|
+
function xt(B) {
|
75
|
+
const n = bt(B), { Fp: t } = n, v = n.toBytes || ((m, r, i) => {
|
76
|
+
const s = r.toAffine();
|
77
|
+
return rt(Uint8Array.from([4]), t.toBytes(s.x), t.toBytes(s.y));
|
78
78
|
}), A = n.fromBytes || ((m) => {
|
79
|
-
const
|
79
|
+
const r = m.subarray(1), i = t.fromBytes(r.subarray(0, t.BYTES)), s = t.fromBytes(r.subarray(t.BYTES, 2 * t.BYTES));
|
80
80
|
return { x: i, y: s };
|
81
81
|
});
|
82
82
|
function O(m) {
|
83
|
-
const { a:
|
84
|
-
return t.add(t.add(u, t.mul(m,
|
83
|
+
const { a: r, b: i } = n, s = t.sqr(m), u = t.mul(s, m);
|
84
|
+
return t.add(t.add(u, t.mul(m, r)), i);
|
85
85
|
}
|
86
86
|
if (!t.eql(t.sqr(n.Gy), O(n.Gx)))
|
87
87
|
throw new Error("bad generator point: equation left != right");
|
88
|
-
function
|
89
|
-
return typeof m == "bigint" &&
|
88
|
+
function C(m) {
|
89
|
+
return typeof m == "bigint" && L < m && m < n.n;
|
90
90
|
}
|
91
91
|
function S(m) {
|
92
|
-
if (!
|
92
|
+
if (!C(m))
|
93
93
|
throw new Error("Expected valid bigint: 0 < bigint < curve.n");
|
94
94
|
}
|
95
|
-
function
|
96
|
-
const { allowedPrivateKeyLengths:
|
97
|
-
if (
|
98
|
-
if (m
|
95
|
+
function H(m) {
|
96
|
+
const { allowedPrivateKeyLengths: r, nByteLength: i, wrapPrivateKey: s, n: u } = n;
|
97
|
+
if (r && typeof m != "bigint") {
|
98
|
+
if (tt(m) && (m = nt(m)), typeof m != "string" || !r.includes(m.length))
|
99
99
|
throw new Error("Invalid key");
|
100
100
|
m = m.padStart(i * 2, "0");
|
101
101
|
}
|
@@ -105,16 +105,16 @@ function Bt(B) {
|
|
105
105
|
} catch {
|
106
106
|
throw new Error(`private key must be ${i} bytes, hex or bigint, not ${typeof m}`);
|
107
107
|
}
|
108
|
-
return s && (f =
|
108
|
+
return s && (f = lt(f, u)), S(f), f;
|
109
109
|
}
|
110
110
|
const x = /* @__PURE__ */ new Map();
|
111
|
-
function
|
112
|
-
if (!(m instanceof
|
111
|
+
function F(m) {
|
112
|
+
if (!(m instanceof p))
|
113
113
|
throw new Error("ProjectivePoint expected");
|
114
114
|
}
|
115
|
-
class
|
116
|
-
constructor(
|
117
|
-
if (this.px =
|
115
|
+
class p {
|
116
|
+
constructor(r, i, s) {
|
117
|
+
if (this.px = r, this.py = i, this.pz = s, r == null || !t.isValid(r))
|
118
118
|
throw new Error("x required");
|
119
119
|
if (i == null || !t.isValid(i))
|
120
120
|
throw new Error("y required");
|
@@ -123,14 +123,14 @@ function Bt(B) {
|
|
123
123
|
}
|
124
124
|
// Does not validate if the point is on-curve.
|
125
125
|
// Use fromHex instead, or call assertValidity() later.
|
126
|
-
static fromAffine(
|
127
|
-
const { x: i, y: s } =
|
128
|
-
if (!
|
126
|
+
static fromAffine(r) {
|
127
|
+
const { x: i, y: s } = r || {};
|
128
|
+
if (!r || !t.isValid(i) || !t.isValid(s))
|
129
129
|
throw new Error("invalid affine point");
|
130
|
-
if (
|
130
|
+
if (r instanceof p)
|
131
131
|
throw new Error("projective point not allowed");
|
132
132
|
const u = (f) => t.eql(f, t.ZERO);
|
133
|
-
return u(i) && u(s) ?
|
133
|
+
return u(i) && u(s) ? p.ZERO : new p(i, s, t.ONE);
|
134
134
|
}
|
135
135
|
get x() {
|
136
136
|
return this.toAffine().x;
|
@@ -144,95 +144,95 @@ function Bt(B) {
|
|
144
144
|
* so this improves performance massively.
|
145
145
|
* Optimization: converts a list of projective points to a list of identical points with Z=1.
|
146
146
|
*/
|
147
|
-
static normalizeZ(
|
148
|
-
const i = t.invertBatch(
|
149
|
-
return
|
147
|
+
static normalizeZ(r) {
|
148
|
+
const i = t.invertBatch(r.map((s) => s.pz));
|
149
|
+
return r.map((s, u) => s.toAffine(i[u])).map(p.fromAffine);
|
150
150
|
}
|
151
151
|
/**
|
152
152
|
* Converts hash string or Uint8Array to Point.
|
153
153
|
* @param hex short/long ECDSA hex
|
154
154
|
*/
|
155
|
-
static fromHex(
|
156
|
-
const i =
|
155
|
+
static fromHex(r) {
|
156
|
+
const i = p.fromAffine(A(Y("pointHex", r)));
|
157
157
|
return i.assertValidity(), i;
|
158
158
|
}
|
159
159
|
// Multiplies generator point by privateKey.
|
160
|
-
static fromPrivateKey(
|
161
|
-
return
|
160
|
+
static fromPrivateKey(r) {
|
161
|
+
return p.BASE.multiply(H(r));
|
162
162
|
}
|
163
163
|
// "Private method", don't use it directly
|
164
|
-
_setWindowSize(
|
165
|
-
this._WINDOW_SIZE =
|
164
|
+
_setWindowSize(r) {
|
165
|
+
this._WINDOW_SIZE = r, x.delete(this);
|
166
166
|
}
|
167
167
|
// A point on curve is valid if it conforms to equation.
|
168
168
|
assertValidity() {
|
169
169
|
if (this.is0()) {
|
170
|
-
if (n.allowInfinityPoint)
|
170
|
+
if (n.allowInfinityPoint && !t.is0(this.py))
|
171
171
|
return;
|
172
172
|
throw new Error("bad point: ZERO");
|
173
173
|
}
|
174
|
-
const { x:
|
175
|
-
if (!t.isValid(
|
174
|
+
const { x: r, y: i } = this.toAffine();
|
175
|
+
if (!t.isValid(r) || !t.isValid(i))
|
176
176
|
throw new Error("bad point: x or y not FE");
|
177
|
-
const s = t.sqr(i), u = O(
|
177
|
+
const s = t.sqr(i), u = O(r);
|
178
178
|
if (!t.eql(s, u))
|
179
179
|
throw new Error("bad point: equation left != right");
|
180
180
|
if (!this.isTorsionFree())
|
181
181
|
throw new Error("bad point: not in prime-order subgroup");
|
182
182
|
}
|
183
183
|
hasEvenY() {
|
184
|
-
const { y:
|
184
|
+
const { y: r } = this.toAffine();
|
185
185
|
if (t.isOdd)
|
186
|
-
return !t.isOdd(
|
186
|
+
return !t.isOdd(r);
|
187
187
|
throw new Error("Field doesn't support isOdd");
|
188
188
|
}
|
189
189
|
/**
|
190
190
|
* Compare one point to another.
|
191
191
|
*/
|
192
|
-
equals(
|
193
|
-
|
194
|
-
const { px: i, py: s, pz: u } = this, { px: f, py: E, pz: h } =
|
192
|
+
equals(r) {
|
193
|
+
F(r);
|
194
|
+
const { px: i, py: s, pz: u } = this, { px: f, py: E, pz: h } = r, a = t.eql(t.mul(i, h), t.mul(f, u)), c = t.eql(t.mul(s, h), t.mul(E, u));
|
195
195
|
return a && c;
|
196
196
|
}
|
197
197
|
/**
|
198
198
|
* Flips point to one corresponding to (x, -y) in Affine coordinates.
|
199
199
|
*/
|
200
200
|
negate() {
|
201
|
-
return new
|
201
|
+
return new p(this.px, t.neg(this.py), this.pz);
|
202
202
|
}
|
203
203
|
// Renes-Costello-Batina exception-free doubling formula.
|
204
204
|
// There is 30% faster Jacobian formula, but it is not complete.
|
205
205
|
// https://eprint.iacr.org/2015/1060, algorithm 3
|
206
206
|
// Cost: 8M + 3S + 3*a + 2*b3 + 15add.
|
207
207
|
double() {
|
208
|
-
const { a:
|
209
|
-
let h = t.ZERO, a = t.ZERO, c = t.ZERO, d = t.mul(u, u), q = t.mul(f, f), b = t.mul(E, E),
|
210
|
-
return
|
208
|
+
const { a: r, b: i } = n, s = t.mul(i, ut), { px: u, py: f, pz: E } = this;
|
209
|
+
let h = t.ZERO, a = t.ZERO, c = t.ZERO, d = t.mul(u, u), q = t.mul(f, f), b = t.mul(E, E), y = t.mul(u, f);
|
210
|
+
return y = t.add(y, y), c = t.mul(u, E), c = t.add(c, c), h = t.mul(r, c), a = t.mul(s, b), a = t.add(h, a), h = t.sub(q, a), a = t.add(q, a), a = t.mul(h, a), h = t.mul(y, h), c = t.mul(s, c), b = t.mul(r, b), y = t.sub(d, b), y = t.mul(r, y), y = t.add(y, c), c = t.add(d, d), d = t.add(c, d), d = t.add(d, b), d = t.mul(d, y), a = t.add(a, d), b = t.mul(f, E), b = t.add(b, b), d = t.mul(b, y), h = t.sub(h, d), c = t.mul(b, q), c = t.add(c, c), c = t.add(c, c), new p(h, a, c);
|
211
211
|
}
|
212
212
|
// Renes-Costello-Batina exception-free addition formula.
|
213
213
|
// There is 30% faster Jacobian formula, but it is not complete.
|
214
214
|
// https://eprint.iacr.org/2015/1060, algorithm 1
|
215
215
|
// Cost: 12M + 0S + 3*a + 3*b3 + 23add.
|
216
|
-
add(
|
217
|
-
|
218
|
-
const { px: i, py: s, pz: u } = this, { px: f, py: E, pz: h } =
|
216
|
+
add(r) {
|
217
|
+
F(r);
|
218
|
+
const { px: i, py: s, pz: u } = this, { px: f, py: E, pz: h } = r;
|
219
219
|
let a = t.ZERO, c = t.ZERO, d = t.ZERO;
|
220
|
-
const q = n.a, b = t.mul(n.b,
|
221
|
-
let
|
222
|
-
|
220
|
+
const q = n.a, b = t.mul(n.b, ut);
|
221
|
+
let y = t.mul(i, f), T = t.mul(s, E), Z = t.mul(u, h), U = t.add(i, s), e = t.add(f, E);
|
222
|
+
U = t.mul(U, e), e = t.add(y, T), U = t.sub(U, e), e = t.add(i, u);
|
223
223
|
let o = t.add(f, h);
|
224
|
-
return
|
224
|
+
return e = t.mul(e, o), o = t.add(y, Z), e = t.sub(e, o), o = t.add(s, u), a = t.add(E, h), o = t.mul(o, a), a = t.add(T, Z), o = t.sub(o, a), d = t.mul(q, e), a = t.mul(b, Z), d = t.add(a, d), a = t.sub(T, d), d = t.add(T, d), c = t.mul(a, d), T = t.add(y, y), T = t.add(T, y), Z = t.mul(q, Z), e = t.mul(b, e), T = t.add(T, Z), Z = t.sub(y, Z), Z = t.mul(q, Z), e = t.add(e, Z), y = t.mul(T, e), c = t.add(c, y), y = t.mul(o, e), a = t.mul(U, a), a = t.sub(a, y), y = t.mul(U, T), d = t.mul(o, d), d = t.add(d, y), new p(a, c, d);
|
225
225
|
}
|
226
|
-
subtract(
|
227
|
-
return this.add(
|
226
|
+
subtract(r) {
|
227
|
+
return this.add(r.negate());
|
228
228
|
}
|
229
229
|
is0() {
|
230
|
-
return this.equals(
|
230
|
+
return this.equals(p.ZERO);
|
231
231
|
}
|
232
|
-
wNAF(
|
233
|
-
return P.wNAFCached(this, x,
|
232
|
+
wNAF(r) {
|
233
|
+
return P.wNAFCached(this, x, r, (i) => {
|
234
234
|
const s = t.invertBatch(i.map((u) => u.pz));
|
235
|
-
return i.map((u, f) => u.toAffine(s[f])).map(
|
235
|
+
return i.map((u, f) => u.toAffine(s[f])).map(p.fromAffine);
|
236
236
|
});
|
237
237
|
}
|
238
238
|
/**
|
@@ -240,19 +240,19 @@ function Bt(B) {
|
|
240
240
|
* It's faster, but should only be used when you don't care about
|
241
241
|
* an exposed private key e.g. sig verification, which works over *public* keys.
|
242
242
|
*/
|
243
|
-
multiplyUnsafe(
|
244
|
-
const i =
|
245
|
-
if (
|
243
|
+
multiplyUnsafe(r) {
|
244
|
+
const i = p.ZERO;
|
245
|
+
if (r === L)
|
246
246
|
return i;
|
247
|
-
if (S(
|
247
|
+
if (S(r), r === z)
|
248
248
|
return this;
|
249
249
|
const { endo: s } = n;
|
250
250
|
if (!s)
|
251
|
-
return P.unsafeLadder(this,
|
252
|
-
let { k1neg: u, k1: f, k2neg: E, k2: h } = s.splitScalar(
|
253
|
-
for (; f >
|
251
|
+
return P.unsafeLadder(this, r);
|
252
|
+
let { k1neg: u, k1: f, k2neg: E, k2: h } = s.splitScalar(r), a = i, c = i, d = this;
|
253
|
+
for (; f > L || h > L; )
|
254
254
|
f & z && (a = a.add(d)), h & z && (c = c.add(d)), d = d.double(), f >>= z, h >>= z;
|
255
|
-
return u && (a = a.negate()), E && (c = c.negate()), c = new
|
255
|
+
return u && (a = a.negate()), E && (c = c.negate()), c = new p(t.mul(c.px, s.beta), c.py, c.pz), a.add(c);
|
256
256
|
}
|
257
257
|
/**
|
258
258
|
* Constant time multiplication.
|
@@ -263,19 +263,19 @@ function Bt(B) {
|
|
263
263
|
* @param scalar by which the point would be multiplied
|
264
264
|
* @returns New point
|
265
265
|
*/
|
266
|
-
multiply(
|
267
|
-
S(
|
268
|
-
let i =
|
266
|
+
multiply(r) {
|
267
|
+
S(r);
|
268
|
+
let i = r, s, u;
|
269
269
|
const { endo: f } = n;
|
270
270
|
if (f) {
|
271
271
|
const { k1neg: E, k1: h, k2neg: a, k2: c } = f.splitScalar(i);
|
272
|
-
let { p: d, f: q } = this.wNAF(h), { p: b, f:
|
273
|
-
d = P.constTimeNegate(E, d), b = P.constTimeNegate(a, b), b = new
|
272
|
+
let { p: d, f: q } = this.wNAF(h), { p: b, f: y } = this.wNAF(c);
|
273
|
+
d = P.constTimeNegate(E, d), b = P.constTimeNegate(a, b), b = new p(t.mul(b.px, f.beta), b.py, b.pz), s = d.add(b), u = q.add(y);
|
274
274
|
} else {
|
275
275
|
const { p: E, f: h } = this.wNAF(i);
|
276
276
|
s = E, u = h;
|
277
277
|
}
|
278
|
-
return
|
278
|
+
return p.normalizeZ([s, u])[0];
|
279
279
|
}
|
280
280
|
/**
|
281
281
|
* Efficiently calculate `aP + bQ`. Unsafe, can expose private key, if used incorrectly.
|
@@ -283,17 +283,17 @@ function Bt(B) {
|
|
283
283
|
* The trick could be useful if both P and Q are not G (not in our case).
|
284
284
|
* @returns non-zero affine point
|
285
285
|
*/
|
286
|
-
multiplyAndAddUnsafe(
|
287
|
-
const u =
|
286
|
+
multiplyAndAddUnsafe(r, i, s) {
|
287
|
+
const u = p.BASE, f = (h, a) => a === L || a === z || !h.equals(u) ? h.multiplyUnsafe(a) : h.multiply(a), E = f(this, i).add(f(r, s));
|
288
288
|
return E.is0() ? void 0 : E;
|
289
289
|
}
|
290
290
|
// Converts Projective point to affine (x, y) coordinates.
|
291
291
|
// Can accept precomputed Z^-1 - for example, from invertBatch.
|
292
292
|
// (x, y, z) ∋ (x=x/z, y=y/z)
|
293
|
-
toAffine(
|
293
|
+
toAffine(r) {
|
294
294
|
const { px: i, py: s, pz: u } = this, f = this.is0();
|
295
|
-
|
296
|
-
const E = t.mul(i,
|
295
|
+
r == null && (r = f ? t.ONE : t.inv(u));
|
296
|
+
const E = t.mul(i, r), h = t.mul(s, r), a = t.mul(u, r);
|
297
297
|
if (f)
|
298
298
|
return { x: t.ZERO, y: t.ZERO };
|
299
299
|
if (!t.eql(a, t.ONE))
|
@@ -301,37 +301,37 @@ function Bt(B) {
|
|
301
301
|
return { x: E, y: h };
|
302
302
|
}
|
303
303
|
isTorsionFree() {
|
304
|
-
const { h:
|
305
|
-
if (
|
304
|
+
const { h: r, isTorsionFree: i } = n;
|
305
|
+
if (r === z)
|
306
306
|
return !0;
|
307
307
|
if (i)
|
308
|
-
return i(
|
308
|
+
return i(p, this);
|
309
309
|
throw new Error("isTorsionFree() has not been declared for the elliptic curve");
|
310
310
|
}
|
311
311
|
clearCofactor() {
|
312
|
-
const { h:
|
313
|
-
return
|
312
|
+
const { h: r, clearCofactor: i } = n;
|
313
|
+
return r === z ? this : i ? i(p, this) : this.multiplyUnsafe(n.h);
|
314
314
|
}
|
315
|
-
toRawBytes(
|
316
|
-
return this.assertValidity(), v(
|
315
|
+
toRawBytes(r = !0) {
|
316
|
+
return this.assertValidity(), v(p, this, r);
|
317
317
|
}
|
318
|
-
toHex(
|
319
|
-
return nt(this.toRawBytes(
|
318
|
+
toHex(r = !0) {
|
319
|
+
return nt(this.toRawBytes(r));
|
320
320
|
}
|
321
321
|
}
|
322
|
-
|
323
|
-
const W = n.nBitLength, P =
|
322
|
+
p.BASE = new p(n.Gx, n.Gy, t.ONE), p.ZERO = new p(t.ZERO, t.ONE, t.ZERO);
|
323
|
+
const W = n.nBitLength, P = gt(p, n.endo ? Math.ceil(W / 2) : W);
|
324
324
|
return {
|
325
325
|
CURVE: n,
|
326
|
-
ProjectivePoint:
|
327
|
-
normPrivateKeyToScalar:
|
326
|
+
ProjectivePoint: p,
|
327
|
+
normPrivateKeyToScalar: H,
|
328
328
|
weierstrassEquation: O,
|
329
|
-
isWithinCurveOrder:
|
329
|
+
isWithinCurveOrder: C
|
330
330
|
};
|
331
331
|
}
|
332
|
-
function
|
333
|
-
const n =
|
334
|
-
return
|
332
|
+
function St(B) {
|
333
|
+
const n = dt(B);
|
334
|
+
return ft(n, {
|
335
335
|
hash: "hash",
|
336
336
|
hmac: "function",
|
337
337
|
randomBytes: "function"
|
@@ -341,30 +341,30 @@ function vt(B) {
|
|
341
341
|
lowS: "boolean"
|
342
342
|
}), Object.freeze({ lowS: !0, ...n });
|
343
343
|
}
|
344
|
-
function
|
345
|
-
const n =
|
346
|
-
function
|
347
|
-
return
|
344
|
+
function Zt(B) {
|
345
|
+
const n = St(B), { Fp: t, n: v } = n, A = t.BYTES + 1, O = 2 * t.BYTES + 1;
|
346
|
+
function C(e) {
|
347
|
+
return L < e && e < t.ORDER;
|
348
348
|
}
|
349
|
-
function S(
|
350
|
-
return
|
349
|
+
function S(e) {
|
350
|
+
return lt(e, v);
|
351
351
|
}
|
352
|
-
function
|
353
|
-
return
|
352
|
+
function H(e) {
|
353
|
+
return pt(e, v);
|
354
354
|
}
|
355
|
-
const { ProjectivePoint: x, normPrivateKeyToScalar:
|
355
|
+
const { ProjectivePoint: x, normPrivateKeyToScalar: F, weierstrassEquation: p, isWithinCurveOrder: W } = xt({
|
356
356
|
...n,
|
357
|
-
toBytes(
|
358
|
-
const g = o.toAffine(), w = t.toBytes(g.x), R =
|
357
|
+
toBytes(e, o, l) {
|
358
|
+
const g = o.toAffine(), w = t.toBytes(g.x), R = rt;
|
359
359
|
return l ? R(Uint8Array.from([o.hasEvenY() ? 2 : 3]), w) : R(Uint8Array.from([4]), w, t.toBytes(g.y));
|
360
360
|
},
|
361
|
-
fromBytes(
|
362
|
-
const o =
|
361
|
+
fromBytes(e) {
|
362
|
+
const o = e.length, l = e[0], g = e.subarray(1);
|
363
363
|
if (o === A && (l === 2 || l === 3)) {
|
364
364
|
const w = _(g);
|
365
|
-
if (!
|
365
|
+
if (!C(w))
|
366
366
|
throw new Error("Point is not on curve");
|
367
|
-
const R =
|
367
|
+
const R = p(w);
|
368
368
|
let I = t.sqrt(R);
|
369
369
|
const N = (I & z) === z;
|
370
370
|
return (l & 1) === 1 !== N && (I = t.neg(I)), { x: w, y: I };
|
@@ -374,15 +374,15 @@ function Ot(B) {
|
|
374
374
|
} else
|
375
375
|
throw new Error(`Point of length ${o} was invalid. Expected ${A} compressed bytes or ${O} uncompressed bytes`);
|
376
376
|
}
|
377
|
-
}), P = (
|
378
|
-
function m(
|
377
|
+
}), P = (e) => nt(ct(e, n.nByteLength));
|
378
|
+
function m(e) {
|
379
379
|
const o = v >> z;
|
380
|
-
return
|
380
|
+
return e > o;
|
381
381
|
}
|
382
|
-
function e
|
383
|
-
return m(
|
382
|
+
function r(e) {
|
383
|
+
return m(e) ? S(-e) : e;
|
384
384
|
}
|
385
|
-
const i = (
|
385
|
+
const i = (e, o, l) => _(e.slice(o, l));
|
386
386
|
class s {
|
387
387
|
constructor(o, l, g) {
|
388
388
|
this.r = o, this.s = l, this.recovery = g, this.assertValidity();
|
@@ -414,7 +414,7 @@ function Ot(B) {
|
|
414
414
|
const I = w === 2 || w === 3 ? l + n.n : l;
|
415
415
|
if (I >= t.ORDER)
|
416
416
|
throw new Error("recovery id 2 or 3 invalid");
|
417
|
-
const N = w & 1 ? "03" : "02", D = x.fromHex(N + P(I)), K =
|
417
|
+
const N = w & 1 ? "03" : "02", D = x.fromHex(N + P(I)), K = H(I), X = S(-R * K), J = S(g * K), $ = x.BASE.multiplyAndAddUnsafe(D, X, J);
|
418
418
|
if (!$)
|
419
419
|
throw new Error("point at infinify");
|
420
420
|
return $.assertValidity(), $;
|
@@ -442,21 +442,21 @@ function Ot(B) {
|
|
442
442
|
}
|
443
443
|
}
|
444
444
|
const u = {
|
445
|
-
isValidPrivateKey(
|
445
|
+
isValidPrivateKey(e) {
|
446
446
|
try {
|
447
|
-
return
|
447
|
+
return F(e), !0;
|
448
448
|
} catch {
|
449
449
|
return !1;
|
450
450
|
}
|
451
451
|
},
|
452
|
-
normPrivateKeyToScalar:
|
452
|
+
normPrivateKeyToScalar: F,
|
453
453
|
/**
|
454
|
-
* Produces cryptographically secure private key from random of size
|
455
|
-
*
|
454
|
+
* Produces cryptographically secure private key from random of size
|
455
|
+
* (groupLen + ceil(groupLen / 2)) with modulo bias being negligible.
|
456
456
|
*/
|
457
457
|
randomPrivateKey: () => {
|
458
|
-
const
|
459
|
-
return
|
458
|
+
const e = ht(n.n);
|
459
|
+
return mt(n.randomBytes(e), n.n);
|
460
460
|
},
|
461
461
|
/**
|
462
462
|
* Creates precompute table for an arbitrary EC point. Makes point "cached".
|
@@ -466,79 +466,79 @@ function Ot(B) {
|
|
466
466
|
* const fast = utils.precompute(8, ProjectivePoint.fromHex(someonesPubKey));
|
467
467
|
* fast.multiply(privKey); // much faster ECDH now
|
468
468
|
*/
|
469
|
-
precompute(
|
470
|
-
return o._setWindowSize(
|
469
|
+
precompute(e = 8, o = x.BASE) {
|
470
|
+
return o._setWindowSize(e), o.multiply(BigInt(3)), o;
|
471
471
|
}
|
472
472
|
};
|
473
|
-
function f(
|
474
|
-
return x.fromPrivateKey(
|
473
|
+
function f(e, o = !0) {
|
474
|
+
return x.fromPrivateKey(e).toRawBytes(o);
|
475
475
|
}
|
476
|
-
function E(
|
477
|
-
const o =
|
478
|
-
return o ? g === A || g === O : l ? g === 2 * A || g === 2 * O :
|
476
|
+
function E(e) {
|
477
|
+
const o = tt(e), l = typeof e == "string", g = (o || l) && e.length;
|
478
|
+
return o ? g === A || g === O : l ? g === 2 * A || g === 2 * O : e instanceof x;
|
479
479
|
}
|
480
|
-
function h(
|
481
|
-
if (E(
|
480
|
+
function h(e, o, l = !0) {
|
481
|
+
if (E(e))
|
482
482
|
throw new Error("first arg must be private key");
|
483
483
|
if (!E(o))
|
484
484
|
throw new Error("second arg must be public key");
|
485
|
-
return x.fromHex(o).multiply(
|
485
|
+
return x.fromHex(o).multiply(F(e)).toRawBytes(l);
|
486
486
|
}
|
487
|
-
const a = n.bits2int || function(
|
488
|
-
const o = _(
|
487
|
+
const a = n.bits2int || function(e) {
|
488
|
+
const o = _(e), l = e.length * 8 - n.nBitLength;
|
489
489
|
return l > 0 ? o >> BigInt(l) : o;
|
490
|
-
}, c = n.bits2int_modN || function(
|
491
|
-
return S(a(
|
492
|
-
}, d =
|
493
|
-
function q(
|
494
|
-
if (typeof
|
490
|
+
}, c = n.bits2int_modN || function(e) {
|
491
|
+
return S(a(e));
|
492
|
+
}, d = wt(n.nBitLength);
|
493
|
+
function q(e) {
|
494
|
+
if (typeof e != "bigint")
|
495
495
|
throw new Error("bigint expected");
|
496
|
-
if (!(
|
496
|
+
if (!(L <= e && e < d))
|
497
497
|
throw new Error(`bigint expected < 2^${n.nBitLength}`);
|
498
|
-
return
|
498
|
+
return ct(e, n.nByteLength);
|
499
499
|
}
|
500
|
-
function b(
|
500
|
+
function b(e, o, l = y) {
|
501
501
|
if (["recovered", "canonical"].some((j) => j in l))
|
502
502
|
throw new Error("sign() legacy options not supported");
|
503
503
|
const { hash: g, randomBytes: w } = n;
|
504
504
|
let { lowS: R, prehash: I, extraEntropy: N } = l;
|
505
|
-
R == null && (R = !0),
|
506
|
-
const D = c(
|
505
|
+
R == null && (R = !0), e = Y("msgHash", e), I && (e = Y("prehashed msgHash", g(e)));
|
506
|
+
const D = c(e), K = F(o), X = [q(K), q(D)];
|
507
507
|
if (N != null) {
|
508
508
|
const j = N === !0 ? w(t.BYTES) : N;
|
509
|
-
X.push(Y("extraEntropy", j
|
509
|
+
X.push(Y("extraEntropy", j));
|
510
510
|
}
|
511
|
-
const J =
|
512
|
-
function
|
511
|
+
const J = rt(...X), $ = D;
|
512
|
+
function et(j) {
|
513
513
|
const G = a(j);
|
514
514
|
if (!W(G))
|
515
515
|
return;
|
516
|
-
const ot =
|
517
|
-
if (V ===
|
516
|
+
const ot = H(G), M = x.BASE.multiply(G).toAffine(), V = S(M.x);
|
517
|
+
if (V === L)
|
518
518
|
return;
|
519
519
|
const Q = S(ot * S($ + V * K));
|
520
|
-
if (Q ===
|
520
|
+
if (Q === L)
|
521
521
|
return;
|
522
522
|
let st = (M.x === V ? 0 : 2) | Number(M.y & z), it = Q;
|
523
|
-
return R && m(Q) && (it =
|
523
|
+
return R && m(Q) && (it = r(Q), st ^= 1), new s(V, it, st);
|
524
524
|
}
|
525
|
-
return { seed: J, k2sig:
|
525
|
+
return { seed: J, k2sig: et };
|
526
526
|
}
|
527
|
-
const
|
528
|
-
function Z(
|
529
|
-
const { seed: g, k2sig: w } = b(
|
530
|
-
return
|
527
|
+
const y = { lowS: n.lowS, prehash: !1 }, T = { lowS: n.lowS, prehash: !1 };
|
528
|
+
function Z(e, o, l = y) {
|
529
|
+
const { seed: g, k2sig: w } = b(e, o, l), R = n;
|
530
|
+
return Et(R.hash.outputLen, R.nByteLength, R.hmac)(g, w);
|
531
531
|
}
|
532
532
|
x.BASE._setWindowSize(8);
|
533
|
-
function
|
533
|
+
function U(e, o, l, g = T) {
|
534
534
|
var M;
|
535
|
-
const w =
|
535
|
+
const w = e;
|
536
536
|
if (o = Y("msgHash", o), l = Y("publicKey", l), "strict" in g)
|
537
537
|
throw new Error("options.strict was renamed to lowS");
|
538
538
|
const { lowS: R, prehash: I } = g;
|
539
539
|
let N, D;
|
540
540
|
try {
|
541
|
-
if (typeof w == "string" || w
|
541
|
+
if (typeof w == "string" || tt(w))
|
542
542
|
try {
|
543
543
|
N = s.fromDER(w);
|
544
544
|
} catch (V) {
|
@@ -560,7 +560,7 @@ function Ot(B) {
|
|
560
560
|
if (R && N.hasHighS())
|
561
561
|
return !1;
|
562
562
|
I && (o = n.hash(o));
|
563
|
-
const { r: K, s: X } = N, J = c(o), $ =
|
563
|
+
const { r: K, s: X } = N, J = c(o), $ = H(X), et = S(J * $), j = S(K * $), G = (M = x.BASE.multiplyAndAddUnsafe(D, et, j)) == null ? void 0 : M.toAffine();
|
564
564
|
return G ? S(G.x) === K : !1;
|
565
565
|
}
|
566
566
|
return {
|
@@ -568,7 +568,7 @@ function Ot(B) {
|
|
568
568
|
getPublicKey: f,
|
569
569
|
getSharedSecret: h,
|
570
570
|
sign: Z,
|
571
|
-
verify:
|
571
|
+
verify: U,
|
572
572
|
ProjectivePoint: x,
|
573
573
|
Signature: s,
|
574
574
|
utils: u
|
@@ -576,6 +576,6 @@ function Ot(B) {
|
|
576
576
|
}
|
577
577
|
export {
|
578
578
|
k as DER,
|
579
|
-
|
580
|
-
|
579
|
+
Zt as weierstrass,
|
580
|
+
xt as weierstrassPoints
|
581
581
|
};
|