@ozdao/prometheus-framework 0.1.66 → 0.1.68
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/_virtual/_commonjsHelpers.cjs +1 -1
- package/dist/_virtual/_commonjsHelpers.js +5 -3
- package/dist/_virtual/browser-ponyfill.cjs +1 -0
- package/dist/_virtual/browser-ponyfill.js +4 -0
- package/dist/_virtual/crc32.cjs +1 -0
- package/dist/_virtual/crc32.js +4 -0
- package/dist/_virtual/events.cjs +1 -0
- package/dist/_virtual/events.js +4 -0
- package/dist/_virtual/index.cjs +1 -0
- package/dist/_virtual/index.js +4 -0
- package/dist/node_modules/@adraffy/ens-normalize/dist/index.cjs +1 -0
- package/dist/node_modules/@adraffy/ens-normalize/dist/index.js +557 -0
- package/dist/node_modules/@ethereumjs/rlp/dist/index.cjs +1 -0
- package/dist/node_modules/@ethereumjs/rlp/dist/index.js +164 -0
- package/dist/node_modules/@noble/curves/esm/_shortw_utils.cjs +1 -0
- package/dist/node_modules/@noble/curves/esm/_shortw_utils.js +19 -0
- package/dist/node_modules/@noble/curves/esm/abstract/curve.cjs +1 -0
- package/dist/node_modules/@noble/curves/esm/abstract/curve.js +88 -0
- package/dist/node_modules/@noble/curves/esm/abstract/modular.cjs +1 -0
- package/dist/node_modules/@noble/curves/esm/abstract/modular.js +210 -0
- package/dist/node_modules/@noble/curves/esm/abstract/utils.cjs +1 -0
- package/dist/node_modules/@noble/curves/esm/abstract/utils.js +178 -0
- package/dist/node_modules/@noble/curves/esm/abstract/weierstrass.cjs +1 -0
- package/dist/node_modules/@noble/curves/esm/abstract/weierstrass.js +581 -0
- package/dist/node_modules/@noble/curves/esm/secp256k1.cjs +1 -0
- package/dist/node_modules/@noble/curves/esm/secp256k1.js +47 -0
- package/dist/node_modules/@noble/hashes/esm/_assert.cjs +1 -0
- package/dist/node_modules/@noble/hashes/esm/_assert.js +48 -0
- package/dist/node_modules/@noble/hashes/esm/_sha2.cjs +1 -0
- package/dist/node_modules/@noble/hashes/esm/_sha2.js +61 -0
- package/dist/node_modules/@noble/hashes/esm/_u64.cjs +1 -0
- package/dist/node_modules/@noble/hashes/esm/_u64.js +48 -0
- package/dist/node_modules/@noble/hashes/esm/crypto.cjs +1 -0
- package/dist/node_modules/@noble/hashes/esm/crypto.js +4 -0
- package/dist/node_modules/@noble/hashes/esm/hmac.cjs +1 -0
- package/dist/node_modules/@noble/hashes/esm/hmac.js +43 -0
- package/dist/node_modules/@noble/hashes/esm/pbkdf2.cjs +1 -0
- package/dist/node_modules/@noble/hashes/esm/pbkdf2.js +32 -0
- package/dist/node_modules/@noble/hashes/esm/scrypt.cjs +1 -0
- package/dist/node_modules/@noble/hashes/esm/scrypt.js +73 -0
- package/dist/node_modules/@noble/hashes/esm/sha256.cjs +1 -0
- package/dist/node_modules/@noble/hashes/esm/sha256.js +120 -0
- package/dist/node_modules/@noble/hashes/esm/sha3.cjs +1 -0
- package/dist/node_modules/@noble/hashes/esm/sha3.js +118 -0
- package/dist/node_modules/@noble/hashes/esm/sha512.cjs +1 -0
- package/dist/node_modules/@noble/hashes/esm/sha512.js +144 -0
- package/dist/node_modules/@noble/hashes/esm/utils.cjs +1 -0
- package/dist/node_modules/@noble/hashes/esm/utils.js +64 -0
- package/dist/node_modules/abitype/dist/chunk-NHABU752.cjs +1 -0
- package/dist/node_modules/abitype/dist/chunk-NHABU752.js +4 -0
- package/dist/node_modules/abitype/dist/chunk-WP7KDV47.cjs +1 -0
- package/dist/node_modules/abitype/dist/chunk-WP7KDV47.js +11 -0
- package/dist/node_modules/abitype/dist/index.cjs +2 -0
- package/dist/node_modules/abitype/dist/index.js +299 -0
- package/dist/node_modules/crc-32/crc32.cjs +1 -0
- package/dist/node_modules/crc-32/crc32.js +51 -0
- package/dist/node_modules/cross-fetch/dist/browser-ponyfill.cjs +2 -0
- package/dist/node_modules/cross-fetch/dist/browser-ponyfill.js +320 -0
- package/dist/node_modules/ethereum-cryptography/esm/aes.cjs +1 -0
- package/dist/node_modules/ethereum-cryptography/esm/aes.js +61 -0
- package/dist/node_modules/ethereum-cryptography/esm/keccak.cjs +1 -0
- package/dist/node_modules/ethereum-cryptography/esm/keccak.js +9 -0
- package/dist/node_modules/ethereum-cryptography/esm/pbkdf2.cjs +1 -0
- package/dist/node_modules/ethereum-cryptography/esm/pbkdf2.js +15 -0
- package/dist/node_modules/ethereum-cryptography/esm/random.cjs +1 -0
- package/dist/node_modules/ethereum-cryptography/esm/random.js +7 -0
- package/dist/node_modules/ethereum-cryptography/esm/scrypt.cjs +1 -0
- package/dist/node_modules/ethereum-cryptography/esm/scrypt.js +8 -0
- package/dist/node_modules/ethereum-cryptography/esm/secp256k1.cjs +1 -0
- package/dist/node_modules/ethereum-cryptography/esm/secp256k1.js +4 -0
- package/dist/node_modules/ethereum-cryptography/esm/utils.cjs +1 -0
- package/dist/node_modules/ethereum-cryptography/esm/utils.js +35 -0
- package/dist/node_modules/events/events.cjs +1 -0
- package/dist/node_modules/events/events.js +229 -0
- package/dist/node_modules/isomorphic-ws/browser.cjs +1 -0
- package/dist/node_modules/isomorphic-ws/browser.js +6 -0
- package/dist/node_modules/setimmediate/setImmediate.cjs +1 -0
- package/dist/node_modules/setimmediate/setImmediate.js +99 -0
- package/dist/node_modules/web3/lib/esm/abi.cjs +1 -0
- package/dist/node_modules/web3/lib/esm/abi.js +24 -0
- package/dist/node_modules/web3/lib/esm/accounts.cjs +1 -0
- package/dist/node_modules/web3/lib/esm/accounts.js +101 -0
- package/dist/node_modules/web3/lib/esm/index.cjs +1 -0
- package/dist/node_modules/web3/lib/esm/index.js +76 -0
- package/dist/node_modules/web3/lib/esm/version.cjs +1 -0
- package/dist/node_modules/web3/lib/esm/version.js +4 -0
- package/dist/node_modules/web3/lib/esm/web3.cjs +1 -0
- package/dist/node_modules/web3/lib/esm/web3.js +89 -0
- package/dist/node_modules/web3-core/lib/esm/utils.cjs +1 -0
- package/dist/node_modules/web3-core/lib/esm/utils.js +14 -0
- package/dist/node_modules/web3-core/lib/esm/web3_batch_request.cjs +1 -0
- package/dist/node_modules/web3-core/lib/esm/web3_batch_request.js +83 -0
- package/dist/node_modules/web3-core/lib/esm/web3_config.cjs +1 -0
- package/dist/node_modules/web3-core/lib/esm/web3_config.js +343 -0
- package/dist/node_modules/web3-core/lib/esm/web3_context.cjs +1 -0
- package/dist/node_modules/web3-core/lib/esm/web3_context.js +227 -0
- package/dist/node_modules/web3-core/lib/esm/web3_event_emitter.cjs +1 -0
- package/dist/node_modules/web3-core/lib/esm/web3_event_emitter.js +39 -0
- package/dist/node_modules/web3-core/lib/esm/web3_promi_event.cjs +1 -0
- package/dist/node_modules/web3-core/lib/esm/web3_promi_event.js +58 -0
- package/dist/node_modules/web3-core/lib/esm/web3_request_manager.cjs +1 -0
- package/dist/node_modules/web3-core/lib/esm/web3_request_manager.js +240 -0
- package/dist/node_modules/web3-core/lib/esm/web3_subscription_manager.cjs +1 -0
- package/dist/node_modules/web3-core/lib/esm/web3_subscription_manager.js +155 -0
- package/dist/node_modules/web3-core/lib/esm/web3_subscriptions.cjs +1 -0
- package/dist/node_modules/web3-core/lib/esm/web3_subscriptions.js +111 -0
- package/dist/node_modules/web3-errors/lib/esm/error_codes.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/error_codes.js +106 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/account_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/account_errors.js +58 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/connection_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/connection_errors.js +37 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/contract_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/contract_errors.js +49 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/core_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/core_errors.js +16 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/ens_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/ens_errors.js +16 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/generic_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/generic_errors.js +49 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/provider_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/provider_errors.js +28 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/response_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/response_errors.js +30 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/rpc_error_messages.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/rpc_error_messages.js +161 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/rpc_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/rpc_errors.js +129 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/schema_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/schema_errors.js +13 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/signature_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/signature_errors.js +10 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/transaction_errors.cjs +5 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/transaction_errors.js +256 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/utils_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/utils_errors.js +76 -0
- package/dist/node_modules/web3-errors/lib/esm/web3_error_base.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/web3_error_base.js +28 -0
- package/dist/node_modules/web3-eth/lib/esm/constants.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/constants.js +14 -0
- package/dist/node_modules/web3-eth/lib/esm/rpc_method_wrappers.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/rpc_method_wrappers.js +413 -0
- package/dist/node_modules/web3-eth/lib/esm/schemas.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/schemas.js +570 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/decode_signed_transaction.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/decode_signed_transaction.js +31 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/decoding.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/decoding.js +34 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/detect_transaction_type.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/detect_transaction_type.js +90 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/format_transaction.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/format_transaction.js +30 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/get_revert_reason.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/get_revert_reason.js +77 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/get_transaction_error.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/get_transaction_error.js +50 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/get_transaction_gas_pricing.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/get_transaction_gas_pricing.js +79 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/prepare_transaction_for_signing.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/prepare_transaction_for_signing.js +102 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/reject_if_block_timeout.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/reject_if_block_timeout.js +109 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/send_tx_helper.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/send_tx_helper.js +143 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/transaction_builder.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/transaction_builder.js +131 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/try_send_transaction.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/try_send_transaction.js +52 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/wait_for_transaction_receipt.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/wait_for_transaction_receipt.js +61 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_pooling.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_pooling.js +51 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_subscription.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_subscription.js +77 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_for_confirmations.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_for_confirmations.js +42 -0
- package/dist/node_modules/web3-eth/lib/esm/validation.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/validation.js +111 -0
- package/dist/node_modules/web3-eth/lib/esm/web3_eth.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/web3_eth.js +1512 -0
- package/dist/node_modules/web3-eth/lib/esm/web3_subscriptions.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/web3_subscriptions.js +65 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/api/errors_api.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/api/errors_api.js +13 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/api/events_api.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/api/events_api.js +13 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/api/functions_api.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/api/functions_api.js +20 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/api/logs_api.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/api/logs_api.js +14 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/api/parameters_api.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/api/parameters_api.js +22 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/address.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/address.js +47 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/array.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/array.js +72 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/bool.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/bool.js +37 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/bytes.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/bytes.js +66 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/index.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/index.js +59 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/number.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/number.js +85 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/numbersLimits.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/numbersLimits.js +15 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/string.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/string.js +22 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/tuple.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/tuple.js +77 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/utils.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/utils.js +15 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/decode.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/decode.js +16 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/encode.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/encode.js +23 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/utils.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/utils.js +58 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/decode_contract_error_data.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/decode_contract_error_data.js +18 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/utils.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/utils.js +39 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/account.cjs +2 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/account.js +219 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/chains/goerli.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/chains/goerli.js +99 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/chains/mainnet.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/chains/mainnet.js +115 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/chains/sepolia.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/chains/sepolia.js +102 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/common.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/common.js +741 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/1153.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/1153.js +25 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/1559.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/1559.js +29 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2315.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2315.js +28 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2537.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2537.js +181 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2565.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2565.js +20 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2718.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2718.js +14 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2929.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2929.js +87 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2930.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2930.js +24 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3198.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3198.js +20 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3529.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3529.js +29 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3540.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3540.js +16 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3541.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3541.js +15 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3554.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3554.js +20 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3607.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3607.js +16 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3651.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3651.js +16 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3670.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3670.js +16 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3675.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3675.js +16 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3855.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3855.js +21 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3860.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3860.js +26 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/4345.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/4345.js +20 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/4399.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/4399.js +16 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/5133.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/5133.js +20 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/index.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/index.js +49 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/enums.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/enums.js +27 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/arrowGlacier.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/arrowGlacier.js +14 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/berlin.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/berlin.js +10 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/byzantium.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/byzantium.js +59 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/chainstart.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/chainstart.js +441 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/constantinople.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/constantinople.js +71 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/dao.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/dao.js +13 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/grayGlacier.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/grayGlacier.js +14 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/homestead.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/homestead.js +18 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/index.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/index.js +39 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/istanbul.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/istanbul.js +90 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/london.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/london.js +10 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/merge.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/merge.js +15 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/mergeForkIdTransition.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/mergeForkIdTransition.js +10 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/muirGlacier.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/muirGlacier.js +18 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/petersburg.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/petersburg.js +42 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/shanghai.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/shanghai.js +10 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/spuriousDragon.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/spuriousDragon.js +23 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/tangerineWhistle.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/tangerineWhistle.js +46 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/types.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/types.js +7 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/utils.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/utils.js +277 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/schemas.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/schemas.js +25 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/address.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/address.js +57 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/baseTransaction.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/baseTransaction.js +272 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/constants.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/constants.js +11 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/eip1559Transaction.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/eip1559Transaction.js +285 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/eip2930Transaction.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/eip2930Transaction.js +268 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/legacyTransaction.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/legacyTransaction.js +256 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/transactionFactory.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/transactionFactory.js +89 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/types.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/types.js +18 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/utils.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/utils.js +80 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/wallet.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/wallet.js +361 -0
- package/dist/node_modules/web3-eth-contract/lib/esm/contract.cjs +1 -0
- package/dist/node_modules/web3-eth-contract/lib/esm/contract.js +510 -0
- package/dist/node_modules/web3-eth-contract/lib/esm/encoding.cjs +1 -0
- package/dist/node_modules/web3-eth-contract/lib/esm/encoding.js +80 -0
- package/dist/node_modules/web3-eth-contract/lib/esm/index.cjs +1 -0
- package/dist/node_modules/web3-eth-contract/lib/esm/index.js +27 -0
- package/dist/node_modules/web3-eth-contract/lib/esm/log_subscription.cjs +1 -0
- package/dist/node_modules/web3-eth-contract/lib/esm/log_subscription.js +36 -0
- package/dist/node_modules/web3-eth-contract/lib/esm/utils.cjs +1 -0
- package/dist/node_modules/web3-eth-contract/lib/esm/utils.js +90 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/abi/ens/ENSRegistry.cjs +1 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/abi/ens/ENSRegistry.js +168 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/abi/ens/PublicResolver.cjs +1 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/abi/ens/PublicResolver.js +578 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/config.cjs +1 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/config.js +27 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/ens.cjs +1 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/ens.js +241 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/registry.cjs +1 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/registry.js +105 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/resolver.cjs +1 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/resolver.js +95 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/utils.cjs +1 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/utils.js +19 -0
- package/dist/node_modules/web3-eth-iban/lib/esm/iban.cjs +1 -0
- package/dist/node_modules/web3-eth-iban/lib/esm/iban.js +283 -0
- package/dist/node_modules/web3-eth-personal/lib/esm/personal.cjs +1 -0
- package/dist/node_modules/web3-eth-personal/lib/esm/personal.js +265 -0
- package/dist/node_modules/web3-eth-personal/lib/esm/rpc_method_wrappers.cjs +1 -0
- package/dist/node_modules/web3-eth-personal/lib/esm/rpc_method_wrappers.js +93 -0
- package/dist/node_modules/web3-net/lib/esm/net.cjs +1 -0
- package/dist/node_modules/web3-net/lib/esm/net.js +97 -0
- package/dist/node_modules/web3-net/lib/esm/rpc_method_wrappers.cjs +1 -0
- package/dist/node_modules/web3-net/lib/esm/rpc_method_wrappers.js +51 -0
- package/dist/node_modules/web3-providers-http/lib/esm/index.cjs +1 -0
- package/dist/node_modules/web3-providers-http/lib/esm/index.js +98 -0
- package/dist/node_modules/web3-providers-ws/lib/esm/index.cjs +1 -0
- package/dist/node_modules/web3-providers-ws/lib/esm/index.js +70 -0
- package/dist/node_modules/web3-rpc-methods/lib/esm/eth_rpc_methods.cjs +1 -0
- package/dist/node_modules/web3-rpc-methods/lib/esm/eth_rpc_methods.js +407 -0
- package/dist/node_modules/web3-rpc-methods/lib/esm/net_rpc_methods.cjs +1 -0
- package/dist/node_modules/web3-rpc-methods/lib/esm/net_rpc_methods.js +56 -0
- package/dist/node_modules/web3-rpc-methods/lib/esm/personal_rpc_methods.cjs +1 -0
- package/dist/node_modules/web3-rpc-methods/lib/esm/personal_rpc_methods.js +84 -0
- package/dist/node_modules/web3-types/lib/esm/data_format_types.cjs +1 -0
- package/dist/node_modules/web3-types/lib/esm/data_format_types.js +15 -0
- package/dist/node_modules/web3-types/lib/esm/eth_types.cjs +1 -0
- package/dist/node_modules/web3-types/lib/esm/eth_types.js +12 -0
- package/dist/node_modules/web3-types/lib/esm/primitives_types.cjs +1 -0
- package/dist/node_modules/web3-types/lib/esm/primitives_types.js +4 -0
- package/dist/node_modules/web3-types/lib/esm/web3_base_provider.cjs +1 -0
- package/dist/node_modules/web3-types/lib/esm/web3_base_provider.js +89 -0
- package/dist/node_modules/web3-types/lib/esm/web3_base_wallet.cjs +1 -0
- package/dist/node_modules/web3-types/lib/esm/web3_base_wallet.js +8 -0
- package/dist/node_modules/web3-utils/lib/esm/chunk_response_parser.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/chunk_response_parser.js +37 -0
- package/dist/node_modules/web3-utils/lib/esm/converters.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/converters.js +177 -0
- package/dist/node_modules/web3-utils/lib/esm/event_emitter.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/event_emitter.js +91 -0
- package/dist/node_modules/web3-utils/lib/esm/formatter.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/formatter.js +134 -0
- package/dist/node_modules/web3-utils/lib/esm/hash.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/hash.js +107 -0
- package/dist/node_modules/web3-utils/lib/esm/index.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/index.js +107 -0
- package/dist/node_modules/web3-utils/lib/esm/json_rpc.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/json_rpc.js +41 -0
- package/dist/node_modules/web3-utils/lib/esm/objects.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/objects.js +20 -0
- package/dist/node_modules/web3-utils/lib/esm/promise_helpers.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/promise_helpers.js +104 -0
- package/dist/node_modules/web3-utils/lib/esm/random.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/random.js +7 -0
- package/dist/node_modules/web3-utils/lib/esm/socket_provider.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/socket_provider.js +195 -0
- package/dist/node_modules/web3-utils/lib/esm/string_manipulation.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/string_manipulation.js +48 -0
- package/dist/node_modules/web3-utils/lib/esm/uint8array.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/uint8array.js +21 -0
- package/dist/node_modules/web3-utils/lib/esm/uuid.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/uuid.js +17 -0
- package/dist/node_modules/web3-utils/lib/esm/validation.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/validation.js +50 -0
- package/dist/node_modules/web3-utils/lib/esm/web3_deferred_promise.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/web3_deferred_promise.js +114 -0
- package/dist/node_modules/web3-utils/lib/esm/web3_eip1193_provider.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/web3_eip1193_provider.js +86 -0
- package/dist/node_modules/web3-validator/lib/esm/constants.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/constants.js +4 -0
- package/dist/node_modules/web3-validator/lib/esm/default_validator.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/default_validator.js +5 -0
- package/dist/node_modules/web3-validator/lib/esm/errors.cjs +3 -0
- package/dist/node_modules/web3-validator/lib/esm/errors.js +17 -0
- package/dist/node_modules/web3-validator/lib/esm/formats.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/formats.js +31 -0
- package/dist/node_modules/web3-validator/lib/esm/utils.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/utils.js +178 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/abi.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/abi.js +4 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/address.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/address.js +22 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/block.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/block.js +10 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/bloom.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/bloom.js +29 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/boolean.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/boolean.js +5 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/bytes.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/bytes.js +27 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/filter.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/filter.js +26 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/numbers.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/numbers.js +52 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/object.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/object.js +13 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/string.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/string.js +23 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/topic.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/topic.js +6 -0
- package/dist/node_modules/web3-validator/lib/esm/validator.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validator.js +84 -0
- package/dist/node_modules/web3-validator/lib/esm/web3_validator.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/web3_validator.js +31 -0
- package/dist/node_modules/zod/lib/index.cjs +1 -0
- package/dist/node_modules/zod/lib/index.js +2854 -0
- package/dist/prometheus-framework/node_modules/axios/lib/adapters/adapters.cjs +3 -0
- package/dist/prometheus-framework/node_modules/axios/lib/adapters/adapters.js +51 -0
- package/dist/prometheus-framework/node_modules/axios/lib/adapters/xhr.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/adapters/xhr.js +105 -79
- package/dist/prometheus-framework/node_modules/axios/lib/axios.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/axios.js +41 -35
- package/dist/prometheus-framework/node_modules/axios/lib/cancel/CancelToken.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/cancel/CancelToken.js +57 -44
- package/dist/prometheus-framework/node_modules/axios/lib/cancel/CanceledError.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/cancel/CanceledError.js +8 -15
- package/dist/prometheus-framework/node_modules/axios/lib/cancel/isCancel.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/cancel/isCancel.js +3 -6
- package/dist/prometheus-framework/node_modules/axios/lib/core/Axios.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/core/Axios.js +101 -72
- package/dist/prometheus-framework/node_modules/axios/lib/core/AxiosError.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/core/AxiosError.js +19 -19
- package/dist/prometheus-framework/node_modules/axios/lib/core/AxiosHeaders.cjs +2 -0
- package/dist/prometheus-framework/node_modules/axios/lib/core/AxiosHeaders.js +165 -0
- package/dist/prometheus-framework/node_modules/axios/lib/core/InterceptorManager.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/core/InterceptorManager.js +56 -22
- package/dist/prometheus-framework/node_modules/axios/lib/core/buildFullPath.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/core/buildFullPath.js +6 -6
- package/dist/prometheus-framework/node_modules/axios/lib/core/dispatchRequest.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/core/dispatchRequest.js +23 -38
- package/dist/prometheus-framework/node_modules/axios/lib/core/mergeConfig.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/core/mergeConfig.js +62 -58
- package/dist/prometheus-framework/node_modules/axios/lib/core/settle.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/core/settle.js +11 -18
- package/dist/prometheus-framework/node_modules/axios/lib/core/transformData.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/core/transformData.js +11 -9
- package/dist/prometheus-framework/node_modules/axios/lib/defaults/index.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/defaults/index.js +49 -48
- package/dist/prometheus-framework/node_modules/axios/lib/defaults/transitional.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/defaults/transitional.js +2 -2
- package/dist/prometheus-framework/node_modules/axios/lib/env/data.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/env/data.js +2 -7
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/AxiosURLSearchParams.cjs +1 -0
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +33 -0
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/HttpStatusCode.cjs +1 -0
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/HttpStatusCode.js +72 -0
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/bind.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/bind.js +4 -6
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/buildURL.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/buildURL.js +13 -24
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/combineURLs.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/combineURLs.js +4 -4
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/cookies.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/cookies.js +30 -40
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/formDataToJSON.cjs +1 -0
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/formDataToJSON.js +30 -0
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/isAbsoluteURL.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/isAbsoluteURL.js +3 -3
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/isAxiosError.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/isAxiosError.js +4 -11
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/isURLSameOrigin.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/isURLSameOrigin.js +34 -39
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/null.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/null.js +2 -5
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/parseHeaders.cjs +2 -2
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/parseHeaders.js +28 -38
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/parseProtocol.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/parseProtocol.js +4 -7
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/speedometer.cjs +1 -0
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/speedometer.js +19 -0
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/spread.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/spread.js +5 -8
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/toFormData.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/toFormData.js +79 -32
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/toURLEncodedForm.cjs +1 -0
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/toURLEncodedForm.js +13 -0
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/validator.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/validator.js +33 -31
- package/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/Blob.cjs +1 -0
- package/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/Blob.js +4 -0
- package/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/FormData.cjs +1 -0
- package/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/FormData.js +4 -0
- package/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/URLSearchParams.cjs +1 -0
- package/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +5 -0
- package/dist/prometheus-framework/node_modules/axios/lib/platform/browser/index.cjs +1 -0
- package/dist/prometheus-framework/node_modules/axios/lib/platform/browser/index.js +15 -0
- package/dist/prometheus-framework/node_modules/axios/lib/platform/common/utils.cjs +1 -0
- package/dist/prometheus-framework/node_modules/axios/lib/platform/common/utils.js +7 -0
- package/dist/prometheus-framework/node_modules/axios/lib/platform/index.cjs +1 -0
- package/dist/prometheus-framework/node_modules/axios/lib/platform/index.js +9 -0
- package/dist/prometheus-framework/node_modules/axios/lib/utils.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/utils.js +212 -140
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +2 -72
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +72 -2
- package/dist/prometheus-framework/src/components/Upload/Upload.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Upload/Upload.vue.js +1 -1
- package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.js +1 -1
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
- 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 +67 -65
- package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/auth.js +1 -1
- 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/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/community/store/blogposts.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/store/blogposts.js +1 -1
- package/dist/prometheus-framework/src/modules/community/store/reactions.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/store/reactions.js +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Image.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Image.vue.js +6 -7
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/store/events.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/store/events.js +1 -1
- package/dist/prometheus-framework/src/modules/events/store/tickets.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/store/tickets.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/store/gallery.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/store/gallery.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/orders.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- 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 +1 -1
- 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/memberships.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/memberships.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 +1 -1
- 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 +30 -61
- 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 +20 -21
- 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 +28 -33
- 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 +1 -1
- 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 +1 -1
- 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 +6 -41
- package/dist/prometheus-framework/src/modules/products/store/categories.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/store/categories.js +1 -1
- package/dist/prometheus-framework/src/modules/products/store/leftovers.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/store/leftovers.js +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.js +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/reports/store/reports.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/store/reports.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/store/spots.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/store/spots.js +1 -1
- package/dist/prometheus-framework/src/modules/users/store/users.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/store/users.js +1 -1
- 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 +75 -33
- package/dist/prometheus-framework.cjs.js +29 -30
- package/dist/prometheus-framework.es.js +3953 -3225
- package/dist/style.css +1 -1
- package/package.json +3 -2
- package/src/modules/auth/components/pages/SignIn.vue +2 -2
- package/src/modules/payments/components/pages/Payments.vue +32 -34
- package/src/modules/products/components/blocks/CardLeftover.vue +1 -2
- package/src/modules/products/components/blocks/CardProduct.vue +1 -17
- package/src/modules/products/components/sections/EditProductInfo.vue +3 -5
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("./modular.cjs"),m=require("./utils.cjs"),et=require("./curve.cjs");/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function at(v){const n=et.validateBasic(v);m.validateObject(n,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:t,Fp:x,a:O}=n;if(t){if(!x.eql(O,x.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof t!="object"||typeof t.beta!="bigint"||typeof t.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...n})}const{bytesToNumberBE:ct,hexToBytes:ut}=m,$={Err:class extends Error{constructor(n=""){super(n)}},_parseInt(v){const{Err:n}=$;if(v.length<2||v[0]!==2)throw new n("Invalid signature integer tag");const t=v[1],x=v.subarray(2,t+2);if(!t||x.length!==t)throw new n("Invalid signature integer: wrong length");if(x[0]&128)throw new n("Invalid signature integer: negative");if(x[0]===0&&!(x[1]&128))throw new n("Invalid signature integer: unnecessary leading zero");return{d:ct(x),l:v.subarray(t+2)}},toSig(v){const{Err:n}=$,t=typeof v=="string"?ut(v):v;if(!(t instanceof Uint8Array))throw new Error("ui8a expected");let x=t.length;if(x<2||t[0]!=48)throw new n("Invalid signature tag");if(t[1]!==x-2)throw new n("Invalid signature: incorrect length");const{d:O,l:T}=$._parseInt(t.subarray(2)),{d:F,l:R}=$._parseInt(T);if(R.length)throw new n("Invalid signature: left bytes after parsing");return{r:O,s:F}},hexFromSig(v){const n=S=>Number.parseInt(S[0],16)&8?"00"+S:S,t=S=>{const V=S.toString(16);return V.length&1?`0${V}`:V},x=n(t(v.s)),O=n(t(v.r)),T=x.length/2,F=O.length/2,R=t(T),C=t(F);return`30${t(F+T+4)}02${C}${O}02${R}${x}`}},P=BigInt(0),U=BigInt(1);BigInt(2);const ot=BigInt(3);BigInt(4);function it(v){const n=at(v),{Fp:t}=n,x=n.toBytes||((y,r,i)=>{const o=r.toAffine();return m.concatBytes(Uint8Array.from([4]),t.toBytes(o.x),t.toBytes(o.y))}),O=n.fromBytes||(y=>{const r=y.subarray(1),i=t.fromBytes(r.subarray(0,t.BYTES)),o=t.fromBytes(r.subarray(t.BYTES,2*t.BYTES));return{x:i,y:o}});function T(y){const{a:r,b:i}=n,o=t.sqr(y),u=t.mul(o,y);return t.add(t.add(u,t.mul(y,r)),i)}if(!t.eql(t.sqr(n.Gy),T(n.Gx)))throw new Error("bad generator point: equation left != right");function F(y){return typeof y=="bigint"&&P<y&&y<n.n}function R(y){if(!F(y))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function C(y){const{allowedPrivateKeyLengths:r,nByteLength:i,wrapPrivateKey:o,n:u}=n;if(r&&typeof y!="bigint"){if(y instanceof Uint8Array&&(y=m.bytesToHex(y)),typeof y!="string"||!r.includes(y.length))throw new Error("Invalid key");y=y.padStart(i*2,"0")}let f;try{f=typeof y=="bigint"?y:m.bytesToNumberBE(m.ensureBytes("private key",y,i))}catch{throw new Error(`private key must be ${i} bytes, hex or bigint, not ${typeof y}`)}return o&&(f=_.mod(f,u)),R(f),f}const S=new Map;function V(y){if(!(y instanceof w))throw new Error("ProjectivePoint expected")}class w{constructor(r,i,o){if(this.px=r,this.py=i,this.pz=o,r==null||!t.isValid(r))throw new Error("x required");if(i==null||!t.isValid(i))throw new Error("y required");if(o==null||!t.isValid(o))throw new Error("z required")}static fromAffine(r){const{x:i,y:o}=r||{};if(!r||!t.isValid(i)||!t.isValid(o))throw new Error("invalid affine point");if(r instanceof w)throw new Error("projective point not allowed");const u=f=>t.eql(f,t.ZERO);return u(i)&&u(o)?w.ZERO:new w(i,o,t.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(r){const i=t.invertBatch(r.map(o=>o.pz));return r.map((o,u)=>o.toAffine(i[u])).map(w.fromAffine)}static fromHex(r){const i=w.fromAffine(O(m.ensureBytes("pointHex",r)));return i.assertValidity(),i}static fromPrivateKey(r){return w.BASE.multiply(C(r))}_setWindowSize(r){this._WINDOW_SIZE=r,S.delete(this)}assertValidity(){if(this.is0()){if(n.allowInfinityPoint)return;throw new Error("bad point: ZERO")}const{x:r,y:i}=this.toAffine();if(!t.isValid(r)||!t.isValid(i))throw new Error("bad point: x or y not FE");const o=t.sqr(i),u=T(r);if(!t.eql(o,u))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:r}=this.toAffine();if(t.isOdd)return!t.isOdd(r);throw new Error("Field doesn't support isOdd")}equals(r){V(r);const{px:i,py:o,pz:u}=this,{px:f,py:g,pz:h}=r,a=t.eql(t.mul(i,h),t.mul(f,u)),c=t.eql(t.mul(o,h),t.mul(g,u));return a&&c}negate(){return new w(this.px,t.neg(this.py),this.pz)}double(){const{a:r,b:i}=n,o=t.mul(i,ot),{px:u,py:f,pz:g}=this;let h=t.ZERO,a=t.ZERO,c=t.ZERO,d=t.mul(u,u),z=t.mul(f,f),B=t.mul(g,g),p=t.mul(u,f);return p=t.add(p,p),c=t.mul(u,g),c=t.add(c,c),h=t.mul(r,c),a=t.mul(o,B),a=t.add(h,a),h=t.sub(z,a),a=t.add(z,a),a=t.mul(h,a),h=t.mul(p,h),c=t.mul(o,c),B=t.mul(r,B),p=t.sub(d,B),p=t.mul(r,p),p=t.add(p,c),c=t.add(d,d),d=t.add(c,d),d=t.add(d,B),d=t.mul(d,p),a=t.add(a,d),B=t.mul(f,g),B=t.add(B,B),d=t.mul(B,p),h=t.sub(h,d),c=t.mul(B,z),c=t.add(c,c),c=t.add(c,c),new w(h,a,c)}add(r){V(r);const{px:i,py:o,pz:u}=this,{px:f,py:g,pz:h}=r;let a=t.ZERO,c=t.ZERO,d=t.ZERO;const z=n.a,B=t.mul(n.b,ot);let p=t.mul(i,f),N=t.mul(o,g),Z=t.mul(u,h),H=t.add(i,o),e=t.add(f,g);H=t.mul(H,e),e=t.add(p,N),H=t.sub(H,e),e=t.add(i,u);let s=t.add(f,h);return e=t.mul(e,s),s=t.add(p,Z),e=t.sub(e,s),s=t.add(o,u),a=t.add(g,h),s=t.mul(s,a),a=t.add(N,Z),s=t.sub(s,a),d=t.mul(z,e),a=t.mul(B,Z),d=t.add(a,d),a=t.sub(N,d),d=t.add(N,d),c=t.mul(a,d),N=t.add(p,p),N=t.add(N,p),Z=t.mul(z,Z),e=t.mul(B,e),N=t.add(N,Z),Z=t.sub(p,Z),Z=t.mul(z,Z),e=t.add(e,Z),p=t.mul(N,e),c=t.add(c,p),p=t.mul(s,e),a=t.mul(H,a),a=t.sub(a,p),p=t.mul(H,N),d=t.mul(s,d),d=t.add(d,p),new w(a,c,d)}subtract(r){return this.add(r.negate())}is0(){return this.equals(w.ZERO)}wNAF(r){return L.wNAFCached(this,S,r,i=>{const o=t.invertBatch(i.map(u=>u.pz));return i.map((u,f)=>u.toAffine(o[f])).map(w.fromAffine)})}multiplyUnsafe(r){const i=w.ZERO;if(r===P)return i;if(R(r),r===U)return this;const{endo:o}=n;if(!o)return L.unsafeLadder(this,r);let{k1neg:u,k1:f,k2neg:g,k2:h}=o.splitScalar(r),a=i,c=i,d=this;for(;f>P||h>P;)f&U&&(a=a.add(d)),h&U&&(c=c.add(d)),d=d.double(),f>>=U,h>>=U;return u&&(a=a.negate()),g&&(c=c.negate()),c=new w(t.mul(c.px,o.beta),c.py,c.pz),a.add(c)}multiply(r){R(r);let i=r,o,u;const{endo:f}=n;if(f){const{k1neg:g,k1:h,k2neg:a,k2:c}=f.splitScalar(i);let{p:d,f:z}=this.wNAF(h),{p:B,f:p}=this.wNAF(c);d=L.constTimeNegate(g,d),B=L.constTimeNegate(a,B),B=new w(t.mul(B.px,f.beta),B.py,B.pz),o=d.add(B),u=z.add(p)}else{const{p:g,f:h}=this.wNAF(i);o=g,u=h}return w.normalizeZ([o,u])[0]}multiplyAndAddUnsafe(r,i,o){const u=w.BASE,f=(h,a)=>a===P||a===U||!h.equals(u)?h.multiplyUnsafe(a):h.multiply(a),g=f(this,i).add(f(r,o));return g.is0()?void 0:g}toAffine(r){const{px:i,py:o,pz:u}=this,f=this.is0();r==null&&(r=f?t.ONE:t.inv(u));const g=t.mul(i,r),h=t.mul(o,r),a=t.mul(u,r);if(f)return{x:t.ZERO,y:t.ZERO};if(!t.eql(a,t.ONE))throw new Error("invZ was invalid");return{x:g,y:h}}isTorsionFree(){const{h:r,isTorsionFree:i}=n;if(r===U)return!0;if(i)return i(w,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:r,clearCofactor:i}=n;return r===U?this:i?i(w,this):this.multiplyUnsafe(n.h)}toRawBytes(r=!0){return this.assertValidity(),x(w,this,r)}toHex(r=!0){return m.bytesToHex(this.toRawBytes(r))}}w.BASE=new w(n.Gx,n.Gy,t.ONE),w.ZERO=new w(t.ZERO,t.ONE,t.ZERO);const W=n.nBitLength,L=et.wNAF(w,n.endo?Math.ceil(W/2):W);return{CURVE:n,ProjectivePoint:w,normPrivateKeyToScalar:C,weierstrassEquation:T,isWithinCurveOrder:F}}function lt(v){const n=et.validateBasic(v);return m.validateObject(n,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...n})}function ft(v){const n=lt(v),{Fp:t,n:x}=n,O=t.BYTES+1,T=2*t.BYTES+1;function F(e){return P<e&&e<t.ORDER}function R(e){return _.mod(e,x)}function C(e){return _.invert(e,x)}const{ProjectivePoint:S,normPrivateKeyToScalar:V,weierstrassEquation:w,isWithinCurveOrder:W}=it({...n,toBytes(e,s,l){const b=s.toAffine(),E=t.toBytes(b.x),A=m.concatBytes;return l?A(Uint8Array.from([s.hasEvenY()?2:3]),E):A(Uint8Array.from([4]),E,t.toBytes(b.y))},fromBytes(e){const s=e.length,l=e[0],b=e.subarray(1);if(s===O&&(l===2||l===3)){const E=m.bytesToNumberBE(b);if(!F(E))throw new Error("Point is not on curve");const A=w(E);let I=t.sqrt(A);const q=(I&U)===U;return(l&1)===1!==q&&(I=t.neg(I)),{x:E,y:I}}else if(s===T&&l===4){const E=t.fromBytes(b.subarray(0,t.BYTES)),A=t.fromBytes(b.subarray(t.BYTES,2*t.BYTES));return{x:E,y:A}}else throw new Error(`Point of length ${s} was invalid. Expected ${O} compressed bytes or ${T} uncompressed bytes`)}}),L=e=>m.bytesToHex(m.numberToBytesBE(e,n.nByteLength));function y(e){const s=x>>U;return e>s}function r(e){return y(e)?R(-e):e}const i=(e,s,l)=>m.bytesToNumberBE(e.slice(s,l));class o{constructor(s,l,b){this.r=s,this.s=l,this.recovery=b,this.assertValidity()}static fromCompact(s){const l=n.nByteLength;return s=m.ensureBytes("compactSignature",s,l*2),new o(i(s,0,l),i(s,l,2*l))}static fromDER(s){const{r:l,s:b}=$.toSig(m.ensureBytes("DER",s));return new o(l,b)}assertValidity(){if(!W(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!W(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(s){return new o(this.r,this.s,s)}recoverPublicKey(s){const{r:l,s:b,recovery:E}=this,A=c(m.ensureBytes("msgHash",s));if(E==null||![0,1,2,3].includes(E))throw new Error("recovery id invalid");const I=E===2||E===3?l+n.n:l;if(I>=t.ORDER)throw new Error("recovery id 2 or 3 invalid");const q=E&1?"03":"02",D=S.fromHex(q+L(I)),j=C(I),X=R(-A*j),J=R(b*j),K=S.BASE.multiplyAndAddUnsafe(D,X,J);if(!K)throw new Error("point at infinify");return K.assertValidity(),K}hasHighS(){return y(this.s)}normalizeS(){return this.hasHighS()?new o(this.r,R(-this.s),this.recovery):this}toDERRawBytes(){return m.hexToBytes(this.toDERHex())}toDERHex(){return $.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return m.hexToBytes(this.toCompactHex())}toCompactHex(){return L(this.r)+L(this.s)}}const u={isValidPrivateKey(e){try{return V(e),!0}catch{return!1}},normPrivateKeyToScalar:V,randomPrivateKey:()=>{const e=n.randomBytes(t.BYTES+8),s=_.hashToPrivateScalar(e,x);return m.numberToBytesBE(s,n.nByteLength)},precompute(e=8,s=S.BASE){return s._setWindowSize(e),s.multiply(BigInt(3)),s}};function f(e,s=!0){return S.fromPrivateKey(e).toRawBytes(s)}function g(e){const s=e instanceof Uint8Array,l=typeof e=="string",b=(s||l)&&e.length;return s?b===O||b===T:l?b===2*O||b===2*T:e instanceof S}function h(e,s,l=!0){if(g(e))throw new Error("first arg must be private key");if(!g(s))throw new Error("second arg must be public key");return S.fromHex(s).multiply(V(e)).toRawBytes(l)}const a=n.bits2int||function(e){const s=m.bytesToNumberBE(e),l=e.length*8-n.nBitLength;return l>0?s>>BigInt(l):s},c=n.bits2int_modN||function(e){return R(a(e))},d=m.bitMask(n.nBitLength);function z(e){if(typeof e!="bigint")throw new Error("bigint expected");if(!(P<=e&&e<d))throw new Error(`bigint expected < 2^${n.nBitLength}`);return m.numberToBytesBE(e,n.nByteLength)}function B(e,s,l=p){if(["recovered","canonical"].some(k=>k in l))throw new Error("sign() legacy options not supported");const{hash:b,randomBytes:E}=n;let{lowS:A,prehash:I,extraEntropy:q}=l;A==null&&(A=!0),e=m.ensureBytes("msgHash",e),I&&(e=m.ensureBytes("prehashed msgHash",b(e)));const D=c(e),j=V(s),X=[z(j),z(D)];if(q!=null){const k=q===!0?E(t.BYTES):q;X.push(m.ensureBytes("extraEntropy",k,t.BYTES))}const J=m.concatBytes(...X),K=D;function tt(k){const G=a(k);if(!W(G))return;const rt=C(G),M=S.BASE.multiply(G).toAffine(),Y=R(M.x);if(Y===P)return;const Q=R(rt*R(K+Y*j));if(Q===P)return;let nt=(M.x===Y?0:2)|Number(M.y&U),st=Q;return A&&y(Q)&&(st=r(Q),nt^=1),new o(Y,st,nt)}return{seed:J,k2sig:tt}}const p={lowS:n.lowS,prehash:!1},N={lowS:n.lowS,prehash:!1};function Z(e,s,l=p){const{seed:b,k2sig:E}=B(e,s,l),A=n;return m.createHmacDrbg(A.hash.outputLen,A.nByteLength,A.hmac)(b,E)}S.BASE._setWindowSize(8);function H(e,s,l,b=N){var M;const E=e;if(s=m.ensureBytes("msgHash",s),l=m.ensureBytes("publicKey",l),"strict"in b)throw new Error("options.strict was renamed to lowS");const{lowS:A,prehash:I}=b;let q,D;try{if(typeof E=="string"||E instanceof Uint8Array)try{q=o.fromDER(E)}catch(Y){if(!(Y instanceof $.Err))throw Y;q=o.fromCompact(E)}else if(typeof E=="object"&&typeof E.r=="bigint"&&typeof E.s=="bigint"){const{r:Y,s:Q}=E;q=new o(Y,Q)}else throw new Error("PARSE");D=S.fromHex(l)}catch(Y){if(Y.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(A&&q.hasHighS())return!1;I&&(s=n.hash(s));const{r:j,s:X}=q,J=c(s),K=C(X),tt=R(J*K),k=R(j*K),G=(M=S.BASE.multiplyAndAddUnsafe(D,tt,k))==null?void 0:M.toAffine();return G?R(G.x)===j:!1}return{CURVE:n,getPublicKey:f,getSharedSecret:h,sign:Z,verify:H,ProjectivePoint:S,Signature:o,utils:u}}exports.DER=$;exports.weierstrass=ft;exports.weierstrassPoints=it;
|
@@ -0,0 +1,581 @@
|
|
1
|
+
import { mod as ut, hashToPrivateScalar as dt, invert as ht } from "./modular.js";
|
2
|
+
import * as mt from "./utils.js";
|
3
|
+
import { bytesToNumberBE as _, bitMask as yt, concatBytes as et, validateObject as lt, ensureBytes as Y, hexToBytes as at, numberToBytesBE as rt, createHmacDrbg as pt, bytesToHex as nt } from "./utils.js";
|
4
|
+
import { wNAF as wt, validateBasic as ft } from "./curve.js";
|
5
|
+
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
6
|
+
function Et(B) {
|
7
|
+
const n = ft(B);
|
8
|
+
lt(n, {
|
9
|
+
a: "field",
|
10
|
+
b: "field"
|
11
|
+
}, {
|
12
|
+
allowedPrivateKeyLengths: "array",
|
13
|
+
wrapPrivateKey: "boolean",
|
14
|
+
isTorsionFree: "function",
|
15
|
+
clearCofactor: "function",
|
16
|
+
allowInfinityPoint: "boolean",
|
17
|
+
fromBytes: "function",
|
18
|
+
toBytes: "function"
|
19
|
+
});
|
20
|
+
const { endo: t, Fp: v, a: A } = n;
|
21
|
+
if (t) {
|
22
|
+
if (!v.eql(A, v.ZERO))
|
23
|
+
throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");
|
24
|
+
if (typeof t != "object" || typeof t.beta != "bigint" || typeof t.splitScalar != "function")
|
25
|
+
throw new Error("Expected endomorphism with beta: bigint and splitScalar: function");
|
26
|
+
}
|
27
|
+
return Object.freeze({ ...n });
|
28
|
+
}
|
29
|
+
const { bytesToNumberBE: gt, hexToBytes: bt } = mt, k = {
|
30
|
+
// asn.1 DER encoding utils
|
31
|
+
Err: class extends Error {
|
32
|
+
constructor(n = "") {
|
33
|
+
super(n);
|
34
|
+
}
|
35
|
+
},
|
36
|
+
_parseInt(B) {
|
37
|
+
const { Err: n } = k;
|
38
|
+
if (B.length < 2 || B[0] !== 2)
|
39
|
+
throw new n("Invalid signature integer tag");
|
40
|
+
const t = B[1], v = B.subarray(2, t + 2);
|
41
|
+
if (!t || v.length !== t)
|
42
|
+
throw new n("Invalid signature integer: wrong length");
|
43
|
+
if (v[0] & 128)
|
44
|
+
throw new n("Invalid signature integer: negative");
|
45
|
+
if (v[0] === 0 && !(v[1] & 128))
|
46
|
+
throw new n("Invalid signature integer: unnecessary leading zero");
|
47
|
+
return { d: gt(v), l: B.subarray(t + 2) };
|
48
|
+
},
|
49
|
+
toSig(B) {
|
50
|
+
const { Err: n } = k, t = typeof B == "string" ? bt(B) : B;
|
51
|
+
if (!(t instanceof Uint8Array))
|
52
|
+
throw new Error("ui8a expected");
|
53
|
+
let v = t.length;
|
54
|
+
if (v < 2 || t[0] != 48)
|
55
|
+
throw new n("Invalid signature tag");
|
56
|
+
if (t[1] !== v - 2)
|
57
|
+
throw new n("Invalid signature: incorrect length");
|
58
|
+
const { d: A, l: O } = k._parseInt(t.subarray(2)), { d: F, l: S } = k._parseInt(O);
|
59
|
+
if (S.length)
|
60
|
+
throw new n("Invalid signature: left bytes after parsing");
|
61
|
+
return { r: A, s: F };
|
62
|
+
},
|
63
|
+
hexFromSig(B) {
|
64
|
+
const n = (x) => Number.parseInt(x[0], 16) & 8 ? "00" + x : x, t = (x) => {
|
65
|
+
const U = x.toString(16);
|
66
|
+
return U.length & 1 ? `0${U}` : U;
|
67
|
+
}, v = n(t(B.s)), A = n(t(B.r)), O = v.length / 2, F = A.length / 2, S = t(O), L = t(F);
|
68
|
+
return `30${t(F + O + 4)}02${L}${A}02${S}${v}`;
|
69
|
+
}
|
70
|
+
}, C = BigInt(0), z = BigInt(1);
|
71
|
+
BigInt(2);
|
72
|
+
const ct = BigInt(3);
|
73
|
+
BigInt(4);
|
74
|
+
function Bt(B) {
|
75
|
+
const n = Et(B), { Fp: t } = n, v = n.toBytes || ((m, e, i) => {
|
76
|
+
const s = e.toAffine();
|
77
|
+
return et(Uint8Array.from([4]), t.toBytes(s.x), t.toBytes(s.y));
|
78
|
+
}), A = n.fromBytes || ((m) => {
|
79
|
+
const e = m.subarray(1), i = t.fromBytes(e.subarray(0, t.BYTES)), s = t.fromBytes(e.subarray(t.BYTES, 2 * t.BYTES));
|
80
|
+
return { x: i, y: s };
|
81
|
+
});
|
82
|
+
function O(m) {
|
83
|
+
const { a: e, b: i } = n, s = t.sqr(m), u = t.mul(s, m);
|
84
|
+
return t.add(t.add(u, t.mul(m, e)), i);
|
85
|
+
}
|
86
|
+
if (!t.eql(t.sqr(n.Gy), O(n.Gx)))
|
87
|
+
throw new Error("bad generator point: equation left != right");
|
88
|
+
function F(m) {
|
89
|
+
return typeof m == "bigint" && C < m && m < n.n;
|
90
|
+
}
|
91
|
+
function S(m) {
|
92
|
+
if (!F(m))
|
93
|
+
throw new Error("Expected valid bigint: 0 < bigint < curve.n");
|
94
|
+
}
|
95
|
+
function L(m) {
|
96
|
+
const { allowedPrivateKeyLengths: e, nByteLength: i, wrapPrivateKey: s, n: u } = n;
|
97
|
+
if (e && typeof m != "bigint") {
|
98
|
+
if (m instanceof Uint8Array && (m = nt(m)), typeof m != "string" || !e.includes(m.length))
|
99
|
+
throw new Error("Invalid key");
|
100
|
+
m = m.padStart(i * 2, "0");
|
101
|
+
}
|
102
|
+
let f;
|
103
|
+
try {
|
104
|
+
f = typeof m == "bigint" ? m : _(Y("private key", m, i));
|
105
|
+
} catch {
|
106
|
+
throw new Error(`private key must be ${i} bytes, hex or bigint, not ${typeof m}`);
|
107
|
+
}
|
108
|
+
return s && (f = ut(f, u)), S(f), f;
|
109
|
+
}
|
110
|
+
const x = /* @__PURE__ */ new Map();
|
111
|
+
function U(m) {
|
112
|
+
if (!(m instanceof y))
|
113
|
+
throw new Error("ProjectivePoint expected");
|
114
|
+
}
|
115
|
+
class y {
|
116
|
+
constructor(e, i, s) {
|
117
|
+
if (this.px = e, this.py = i, this.pz = s, e == null || !t.isValid(e))
|
118
|
+
throw new Error("x required");
|
119
|
+
if (i == null || !t.isValid(i))
|
120
|
+
throw new Error("y required");
|
121
|
+
if (s == null || !t.isValid(s))
|
122
|
+
throw new Error("z required");
|
123
|
+
}
|
124
|
+
// Does not validate if the point is on-curve.
|
125
|
+
// Use fromHex instead, or call assertValidity() later.
|
126
|
+
static fromAffine(e) {
|
127
|
+
const { x: i, y: s } = e || {};
|
128
|
+
if (!e || !t.isValid(i) || !t.isValid(s))
|
129
|
+
throw new Error("invalid affine point");
|
130
|
+
if (e instanceof y)
|
131
|
+
throw new Error("projective point not allowed");
|
132
|
+
const u = (f) => t.eql(f, t.ZERO);
|
133
|
+
return u(i) && u(s) ? y.ZERO : new y(i, s, t.ONE);
|
134
|
+
}
|
135
|
+
get x() {
|
136
|
+
return this.toAffine().x;
|
137
|
+
}
|
138
|
+
get y() {
|
139
|
+
return this.toAffine().y;
|
140
|
+
}
|
141
|
+
/**
|
142
|
+
* Takes a bunch of Projective Points but executes only one
|
143
|
+
* inversion on all of them. Inversion is very slow operation,
|
144
|
+
* so this improves performance massively.
|
145
|
+
* Optimization: converts a list of projective points to a list of identical points with Z=1.
|
146
|
+
*/
|
147
|
+
static normalizeZ(e) {
|
148
|
+
const i = t.invertBatch(e.map((s) => s.pz));
|
149
|
+
return e.map((s, u) => s.toAffine(i[u])).map(y.fromAffine);
|
150
|
+
}
|
151
|
+
/**
|
152
|
+
* Converts hash string or Uint8Array to Point.
|
153
|
+
* @param hex short/long ECDSA hex
|
154
|
+
*/
|
155
|
+
static fromHex(e) {
|
156
|
+
const i = y.fromAffine(A(Y("pointHex", e)));
|
157
|
+
return i.assertValidity(), i;
|
158
|
+
}
|
159
|
+
// Multiplies generator point by privateKey.
|
160
|
+
static fromPrivateKey(e) {
|
161
|
+
return y.BASE.multiply(L(e));
|
162
|
+
}
|
163
|
+
// "Private method", don't use it directly
|
164
|
+
_setWindowSize(e) {
|
165
|
+
this._WINDOW_SIZE = e, x.delete(this);
|
166
|
+
}
|
167
|
+
// A point on curve is valid if it conforms to equation.
|
168
|
+
assertValidity() {
|
169
|
+
if (this.is0()) {
|
170
|
+
if (n.allowInfinityPoint)
|
171
|
+
return;
|
172
|
+
throw new Error("bad point: ZERO");
|
173
|
+
}
|
174
|
+
const { x: e, y: i } = this.toAffine();
|
175
|
+
if (!t.isValid(e) || !t.isValid(i))
|
176
|
+
throw new Error("bad point: x or y not FE");
|
177
|
+
const s = t.sqr(i), u = O(e);
|
178
|
+
if (!t.eql(s, u))
|
179
|
+
throw new Error("bad point: equation left != right");
|
180
|
+
if (!this.isTorsionFree())
|
181
|
+
throw new Error("bad point: not in prime-order subgroup");
|
182
|
+
}
|
183
|
+
hasEvenY() {
|
184
|
+
const { y: e } = this.toAffine();
|
185
|
+
if (t.isOdd)
|
186
|
+
return !t.isOdd(e);
|
187
|
+
throw new Error("Field doesn't support isOdd");
|
188
|
+
}
|
189
|
+
/**
|
190
|
+
* Compare one point to another.
|
191
|
+
*/
|
192
|
+
equals(e) {
|
193
|
+
U(e);
|
194
|
+
const { px: i, py: s, pz: u } = this, { px: f, py: E, pz: h } = e, a = t.eql(t.mul(i, h), t.mul(f, u)), c = t.eql(t.mul(s, h), t.mul(E, u));
|
195
|
+
return a && c;
|
196
|
+
}
|
197
|
+
/**
|
198
|
+
* Flips point to one corresponding to (x, -y) in Affine coordinates.
|
199
|
+
*/
|
200
|
+
negate() {
|
201
|
+
return new y(this.px, t.neg(this.py), this.pz);
|
202
|
+
}
|
203
|
+
// Renes-Costello-Batina exception-free doubling formula.
|
204
|
+
// There is 30% faster Jacobian formula, but it is not complete.
|
205
|
+
// https://eprint.iacr.org/2015/1060, algorithm 3
|
206
|
+
// Cost: 8M + 3S + 3*a + 2*b3 + 15add.
|
207
|
+
double() {
|
208
|
+
const { a: e, b: i } = n, s = t.mul(i, ct), { 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), p = t.mul(u, f);
|
210
|
+
return p = t.add(p, p), c = t.mul(u, E), c = t.add(c, c), h = t.mul(e, 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(p, h), c = t.mul(s, c), b = t.mul(e, b), p = t.sub(d, b), p = t.mul(e, p), p = t.add(p, c), c = t.add(d, d), d = t.add(c, d), d = t.add(d, b), d = t.mul(d, p), a = t.add(a, d), b = t.mul(f, E), b = t.add(b, b), d = t.mul(b, p), h = t.sub(h, d), c = t.mul(b, q), c = t.add(c, c), c = t.add(c, c), new y(h, a, c);
|
211
|
+
}
|
212
|
+
// Renes-Costello-Batina exception-free addition formula.
|
213
|
+
// There is 30% faster Jacobian formula, but it is not complete.
|
214
|
+
// https://eprint.iacr.org/2015/1060, algorithm 1
|
215
|
+
// Cost: 12M + 0S + 3*a + 3*b3 + 23add.
|
216
|
+
add(e) {
|
217
|
+
U(e);
|
218
|
+
const { px: i, py: s, pz: u } = this, { px: f, py: E, pz: h } = e;
|
219
|
+
let a = t.ZERO, c = t.ZERO, d = t.ZERO;
|
220
|
+
const q = n.a, b = t.mul(n.b, ct);
|
221
|
+
let p = t.mul(i, f), T = t.mul(s, E), Z = t.mul(u, h), H = t.add(i, s), r = t.add(f, E);
|
222
|
+
H = t.mul(H, r), r = t.add(p, T), H = t.sub(H, r), r = t.add(i, u);
|
223
|
+
let o = t.add(f, h);
|
224
|
+
return r = t.mul(r, o), o = t.add(p, Z), r = t.sub(r, 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, r), 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(p, p), T = t.add(T, p), Z = t.mul(q, Z), r = t.mul(b, r), T = t.add(T, Z), Z = t.sub(p, Z), Z = t.mul(q, Z), r = t.add(r, Z), p = t.mul(T, r), c = t.add(c, p), p = t.mul(o, r), a = t.mul(H, a), a = t.sub(a, p), p = t.mul(H, T), d = t.mul(o, d), d = t.add(d, p), new y(a, c, d);
|
225
|
+
}
|
226
|
+
subtract(e) {
|
227
|
+
return this.add(e.negate());
|
228
|
+
}
|
229
|
+
is0() {
|
230
|
+
return this.equals(y.ZERO);
|
231
|
+
}
|
232
|
+
wNAF(e) {
|
233
|
+
return P.wNAFCached(this, x, e, (i) => {
|
234
|
+
const s = t.invertBatch(i.map((u) => u.pz));
|
235
|
+
return i.map((u, f) => u.toAffine(s[f])).map(y.fromAffine);
|
236
|
+
});
|
237
|
+
}
|
238
|
+
/**
|
239
|
+
* Non-constant-time multiplication. Uses double-and-add algorithm.
|
240
|
+
* It's faster, but should only be used when you don't care about
|
241
|
+
* an exposed private key e.g. sig verification, which works over *public* keys.
|
242
|
+
*/
|
243
|
+
multiplyUnsafe(e) {
|
244
|
+
const i = y.ZERO;
|
245
|
+
if (e === C)
|
246
|
+
return i;
|
247
|
+
if (S(e), e === z)
|
248
|
+
return this;
|
249
|
+
const { endo: s } = n;
|
250
|
+
if (!s)
|
251
|
+
return P.unsafeLadder(this, e);
|
252
|
+
let { k1neg: u, k1: f, k2neg: E, k2: h } = s.splitScalar(e), a = i, c = i, d = this;
|
253
|
+
for (; f > C || h > C; )
|
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 y(t.mul(c.px, s.beta), c.py, c.pz), a.add(c);
|
256
|
+
}
|
257
|
+
/**
|
258
|
+
* Constant time multiplication.
|
259
|
+
* Uses wNAF method. Windowed method may be 10% faster,
|
260
|
+
* but takes 2x longer to generate and consumes 2x memory.
|
261
|
+
* Uses precomputes when available.
|
262
|
+
* Uses endomorphism for Koblitz curves.
|
263
|
+
* @param scalar by which the point would be multiplied
|
264
|
+
* @returns New point
|
265
|
+
*/
|
266
|
+
multiply(e) {
|
267
|
+
S(e);
|
268
|
+
let i = e, s, u;
|
269
|
+
const { endo: f } = n;
|
270
|
+
if (f) {
|
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: p } = this.wNAF(c);
|
273
|
+
d = P.constTimeNegate(E, d), b = P.constTimeNegate(a, b), b = new y(t.mul(b.px, f.beta), b.py, b.pz), s = d.add(b), u = q.add(p);
|
274
|
+
} else {
|
275
|
+
const { p: E, f: h } = this.wNAF(i);
|
276
|
+
s = E, u = h;
|
277
|
+
}
|
278
|
+
return y.normalizeZ([s, u])[0];
|
279
|
+
}
|
280
|
+
/**
|
281
|
+
* Efficiently calculate `aP + bQ`. Unsafe, can expose private key, if used incorrectly.
|
282
|
+
* Not using Strauss-Shamir trick: precomputation tables are faster.
|
283
|
+
* The trick could be useful if both P and Q are not G (not in our case).
|
284
|
+
* @returns non-zero affine point
|
285
|
+
*/
|
286
|
+
multiplyAndAddUnsafe(e, i, s) {
|
287
|
+
const u = y.BASE, f = (h, a) => a === C || a === z || !h.equals(u) ? h.multiplyUnsafe(a) : h.multiply(a), E = f(this, i).add(f(e, s));
|
288
|
+
return E.is0() ? void 0 : E;
|
289
|
+
}
|
290
|
+
// Converts Projective point to affine (x, y) coordinates.
|
291
|
+
// Can accept precomputed Z^-1 - for example, from invertBatch.
|
292
|
+
// (x, y, z) ∋ (x=x/z, y=y/z)
|
293
|
+
toAffine(e) {
|
294
|
+
const { px: i, py: s, pz: u } = this, f = this.is0();
|
295
|
+
e == null && (e = f ? t.ONE : t.inv(u));
|
296
|
+
const E = t.mul(i, e), h = t.mul(s, e), a = t.mul(u, e);
|
297
|
+
if (f)
|
298
|
+
return { x: t.ZERO, y: t.ZERO };
|
299
|
+
if (!t.eql(a, t.ONE))
|
300
|
+
throw new Error("invZ was invalid");
|
301
|
+
return { x: E, y: h };
|
302
|
+
}
|
303
|
+
isTorsionFree() {
|
304
|
+
const { h: e, isTorsionFree: i } = n;
|
305
|
+
if (e === z)
|
306
|
+
return !0;
|
307
|
+
if (i)
|
308
|
+
return i(y, this);
|
309
|
+
throw new Error("isTorsionFree() has not been declared for the elliptic curve");
|
310
|
+
}
|
311
|
+
clearCofactor() {
|
312
|
+
const { h: e, clearCofactor: i } = n;
|
313
|
+
return e === z ? this : i ? i(y, this) : this.multiplyUnsafe(n.h);
|
314
|
+
}
|
315
|
+
toRawBytes(e = !0) {
|
316
|
+
return this.assertValidity(), v(y, this, e);
|
317
|
+
}
|
318
|
+
toHex(e = !0) {
|
319
|
+
return nt(this.toRawBytes(e));
|
320
|
+
}
|
321
|
+
}
|
322
|
+
y.BASE = new y(n.Gx, n.Gy, t.ONE), y.ZERO = new y(t.ZERO, t.ONE, t.ZERO);
|
323
|
+
const W = n.nBitLength, P = wt(y, n.endo ? Math.ceil(W / 2) : W);
|
324
|
+
return {
|
325
|
+
CURVE: n,
|
326
|
+
ProjectivePoint: y,
|
327
|
+
normPrivateKeyToScalar: L,
|
328
|
+
weierstrassEquation: O,
|
329
|
+
isWithinCurveOrder: F
|
330
|
+
};
|
331
|
+
}
|
332
|
+
function vt(B) {
|
333
|
+
const n = ft(B);
|
334
|
+
return lt(n, {
|
335
|
+
hash: "hash",
|
336
|
+
hmac: "function",
|
337
|
+
randomBytes: "function"
|
338
|
+
}, {
|
339
|
+
bits2int: "function",
|
340
|
+
bits2int_modN: "function",
|
341
|
+
lowS: "boolean"
|
342
|
+
}), Object.freeze({ lowS: !0, ...n });
|
343
|
+
}
|
344
|
+
function Ot(B) {
|
345
|
+
const n = vt(B), { Fp: t, n: v } = n, A = t.BYTES + 1, O = 2 * t.BYTES + 1;
|
346
|
+
function F(r) {
|
347
|
+
return C < r && r < t.ORDER;
|
348
|
+
}
|
349
|
+
function S(r) {
|
350
|
+
return ut(r, v);
|
351
|
+
}
|
352
|
+
function L(r) {
|
353
|
+
return ht(r, v);
|
354
|
+
}
|
355
|
+
const { ProjectivePoint: x, normPrivateKeyToScalar: U, weierstrassEquation: y, isWithinCurveOrder: W } = Bt({
|
356
|
+
...n,
|
357
|
+
toBytes(r, o, l) {
|
358
|
+
const g = o.toAffine(), w = t.toBytes(g.x), R = et;
|
359
|
+
return l ? R(Uint8Array.from([o.hasEvenY() ? 2 : 3]), w) : R(Uint8Array.from([4]), w, t.toBytes(g.y));
|
360
|
+
},
|
361
|
+
fromBytes(r) {
|
362
|
+
const o = r.length, l = r[0], g = r.subarray(1);
|
363
|
+
if (o === A && (l === 2 || l === 3)) {
|
364
|
+
const w = _(g);
|
365
|
+
if (!F(w))
|
366
|
+
throw new Error("Point is not on curve");
|
367
|
+
const R = y(w);
|
368
|
+
let I = t.sqrt(R);
|
369
|
+
const N = (I & z) === z;
|
370
|
+
return (l & 1) === 1 !== N && (I = t.neg(I)), { x: w, y: I };
|
371
|
+
} else if (o === O && l === 4) {
|
372
|
+
const w = t.fromBytes(g.subarray(0, t.BYTES)), R = t.fromBytes(g.subarray(t.BYTES, 2 * t.BYTES));
|
373
|
+
return { x: w, y: R };
|
374
|
+
} else
|
375
|
+
throw new Error(`Point of length ${o} was invalid. Expected ${A} compressed bytes or ${O} uncompressed bytes`);
|
376
|
+
}
|
377
|
+
}), P = (r) => nt(rt(r, n.nByteLength));
|
378
|
+
function m(r) {
|
379
|
+
const o = v >> z;
|
380
|
+
return r > o;
|
381
|
+
}
|
382
|
+
function e(r) {
|
383
|
+
return m(r) ? S(-r) : r;
|
384
|
+
}
|
385
|
+
const i = (r, o, l) => _(r.slice(o, l));
|
386
|
+
class s {
|
387
|
+
constructor(o, l, g) {
|
388
|
+
this.r = o, this.s = l, this.recovery = g, this.assertValidity();
|
389
|
+
}
|
390
|
+
// pair (bytes of r, bytes of s)
|
391
|
+
static fromCompact(o) {
|
392
|
+
const l = n.nByteLength;
|
393
|
+
return o = Y("compactSignature", o, l * 2), new s(i(o, 0, l), i(o, l, 2 * l));
|
394
|
+
}
|
395
|
+
// DER encoded ECDSA signature
|
396
|
+
// https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script
|
397
|
+
static fromDER(o) {
|
398
|
+
const { r: l, s: g } = k.toSig(Y("DER", o));
|
399
|
+
return new s(l, g);
|
400
|
+
}
|
401
|
+
assertValidity() {
|
402
|
+
if (!W(this.r))
|
403
|
+
throw new Error("r must be 0 < r < CURVE.n");
|
404
|
+
if (!W(this.s))
|
405
|
+
throw new Error("s must be 0 < s < CURVE.n");
|
406
|
+
}
|
407
|
+
addRecoveryBit(o) {
|
408
|
+
return new s(this.r, this.s, o);
|
409
|
+
}
|
410
|
+
recoverPublicKey(o) {
|
411
|
+
const { r: l, s: g, recovery: w } = this, R = c(Y("msgHash", o));
|
412
|
+
if (w == null || ![0, 1, 2, 3].includes(w))
|
413
|
+
throw new Error("recovery id invalid");
|
414
|
+
const I = w === 2 || w === 3 ? l + n.n : l;
|
415
|
+
if (I >= t.ORDER)
|
416
|
+
throw new Error("recovery id 2 or 3 invalid");
|
417
|
+
const N = w & 1 ? "03" : "02", D = x.fromHex(N + P(I)), K = L(I), X = S(-R * K), J = S(g * K), $ = x.BASE.multiplyAndAddUnsafe(D, X, J);
|
418
|
+
if (!$)
|
419
|
+
throw new Error("point at infinify");
|
420
|
+
return $.assertValidity(), $;
|
421
|
+
}
|
422
|
+
// Signatures should be low-s, to prevent malleability.
|
423
|
+
hasHighS() {
|
424
|
+
return m(this.s);
|
425
|
+
}
|
426
|
+
normalizeS() {
|
427
|
+
return this.hasHighS() ? new s(this.r, S(-this.s), this.recovery) : this;
|
428
|
+
}
|
429
|
+
// DER-encoded
|
430
|
+
toDERRawBytes() {
|
431
|
+
return at(this.toDERHex());
|
432
|
+
}
|
433
|
+
toDERHex() {
|
434
|
+
return k.hexFromSig({ r: this.r, s: this.s });
|
435
|
+
}
|
436
|
+
// padded bytes of r, then padded bytes of s
|
437
|
+
toCompactRawBytes() {
|
438
|
+
return at(this.toCompactHex());
|
439
|
+
}
|
440
|
+
toCompactHex() {
|
441
|
+
return P(this.r) + P(this.s);
|
442
|
+
}
|
443
|
+
}
|
444
|
+
const u = {
|
445
|
+
isValidPrivateKey(r) {
|
446
|
+
try {
|
447
|
+
return U(r), !0;
|
448
|
+
} catch {
|
449
|
+
return !1;
|
450
|
+
}
|
451
|
+
},
|
452
|
+
normPrivateKeyToScalar: U,
|
453
|
+
/**
|
454
|
+
* Produces cryptographically secure private key from random of size (nBitLength+64)
|
455
|
+
* as per FIPS 186 B.4.1 with modulo bias being neglible.
|
456
|
+
*/
|
457
|
+
randomPrivateKey: () => {
|
458
|
+
const r = n.randomBytes(t.BYTES + 8), o = dt(r, v);
|
459
|
+
return rt(o, n.nByteLength);
|
460
|
+
},
|
461
|
+
/**
|
462
|
+
* Creates precompute table for an arbitrary EC point. Makes point "cached".
|
463
|
+
* Allows to massively speed-up `point.multiply(scalar)`.
|
464
|
+
* @returns cached point
|
465
|
+
* @example
|
466
|
+
* const fast = utils.precompute(8, ProjectivePoint.fromHex(someonesPubKey));
|
467
|
+
* fast.multiply(privKey); // much faster ECDH now
|
468
|
+
*/
|
469
|
+
precompute(r = 8, o = x.BASE) {
|
470
|
+
return o._setWindowSize(r), o.multiply(BigInt(3)), o;
|
471
|
+
}
|
472
|
+
};
|
473
|
+
function f(r, o = !0) {
|
474
|
+
return x.fromPrivateKey(r).toRawBytes(o);
|
475
|
+
}
|
476
|
+
function E(r) {
|
477
|
+
const o = r instanceof Uint8Array, l = typeof r == "string", g = (o || l) && r.length;
|
478
|
+
return o ? g === A || g === O : l ? g === 2 * A || g === 2 * O : r instanceof x;
|
479
|
+
}
|
480
|
+
function h(r, o, l = !0) {
|
481
|
+
if (E(r))
|
482
|
+
throw new Error("first arg must be private key");
|
483
|
+
if (!E(o))
|
484
|
+
throw new Error("second arg must be public key");
|
485
|
+
return x.fromHex(o).multiply(U(r)).toRawBytes(l);
|
486
|
+
}
|
487
|
+
const a = n.bits2int || function(r) {
|
488
|
+
const o = _(r), l = r.length * 8 - n.nBitLength;
|
489
|
+
return l > 0 ? o >> BigInt(l) : o;
|
490
|
+
}, c = n.bits2int_modN || function(r) {
|
491
|
+
return S(a(r));
|
492
|
+
}, d = yt(n.nBitLength);
|
493
|
+
function q(r) {
|
494
|
+
if (typeof r != "bigint")
|
495
|
+
throw new Error("bigint expected");
|
496
|
+
if (!(C <= r && r < d))
|
497
|
+
throw new Error(`bigint expected < 2^${n.nBitLength}`);
|
498
|
+
return rt(r, n.nByteLength);
|
499
|
+
}
|
500
|
+
function b(r, o, l = p) {
|
501
|
+
if (["recovered", "canonical"].some((j) => j in l))
|
502
|
+
throw new Error("sign() legacy options not supported");
|
503
|
+
const { hash: g, randomBytes: w } = n;
|
504
|
+
let { lowS: R, prehash: I, extraEntropy: N } = l;
|
505
|
+
R == null && (R = !0), r = Y("msgHash", r), I && (r = Y("prehashed msgHash", g(r)));
|
506
|
+
const D = c(r), K = U(o), X = [q(K), q(D)];
|
507
|
+
if (N != null) {
|
508
|
+
const j = N === !0 ? w(t.BYTES) : N;
|
509
|
+
X.push(Y("extraEntropy", j, t.BYTES));
|
510
|
+
}
|
511
|
+
const J = et(...X), $ = D;
|
512
|
+
function tt(j) {
|
513
|
+
const G = a(j);
|
514
|
+
if (!W(G))
|
515
|
+
return;
|
516
|
+
const ot = L(G), M = x.BASE.multiply(G).toAffine(), V = S(M.x);
|
517
|
+
if (V === C)
|
518
|
+
return;
|
519
|
+
const Q = S(ot * S($ + V * K));
|
520
|
+
if (Q === C)
|
521
|
+
return;
|
522
|
+
let st = (M.x === V ? 0 : 2) | Number(M.y & z), it = Q;
|
523
|
+
return R && m(Q) && (it = e(Q), st ^= 1), new s(V, it, st);
|
524
|
+
}
|
525
|
+
return { seed: J, k2sig: tt };
|
526
|
+
}
|
527
|
+
const p = { lowS: n.lowS, prehash: !1 }, T = { lowS: n.lowS, prehash: !1 };
|
528
|
+
function Z(r, o, l = p) {
|
529
|
+
const { seed: g, k2sig: w } = b(r, o, l), R = n;
|
530
|
+
return pt(R.hash.outputLen, R.nByteLength, R.hmac)(g, w);
|
531
|
+
}
|
532
|
+
x.BASE._setWindowSize(8);
|
533
|
+
function H(r, o, l, g = T) {
|
534
|
+
var M;
|
535
|
+
const w = r;
|
536
|
+
if (o = Y("msgHash", o), l = Y("publicKey", l), "strict" in g)
|
537
|
+
throw new Error("options.strict was renamed to lowS");
|
538
|
+
const { lowS: R, prehash: I } = g;
|
539
|
+
let N, D;
|
540
|
+
try {
|
541
|
+
if (typeof w == "string" || w instanceof Uint8Array)
|
542
|
+
try {
|
543
|
+
N = s.fromDER(w);
|
544
|
+
} catch (V) {
|
545
|
+
if (!(V instanceof k.Err))
|
546
|
+
throw V;
|
547
|
+
N = s.fromCompact(w);
|
548
|
+
}
|
549
|
+
else if (typeof w == "object" && typeof w.r == "bigint" && typeof w.s == "bigint") {
|
550
|
+
const { r: V, s: Q } = w;
|
551
|
+
N = new s(V, Q);
|
552
|
+
} else
|
553
|
+
throw new Error("PARSE");
|
554
|
+
D = x.fromHex(l);
|
555
|
+
} catch (V) {
|
556
|
+
if (V.message === "PARSE")
|
557
|
+
throw new Error("signature must be Signature instance, Uint8Array or hex string");
|
558
|
+
return !1;
|
559
|
+
}
|
560
|
+
if (R && N.hasHighS())
|
561
|
+
return !1;
|
562
|
+
I && (o = n.hash(o));
|
563
|
+
const { r: K, s: X } = N, J = c(o), $ = L(X), tt = S(J * $), j = S(K * $), G = (M = x.BASE.multiplyAndAddUnsafe(D, tt, j)) == null ? void 0 : M.toAffine();
|
564
|
+
return G ? S(G.x) === K : !1;
|
565
|
+
}
|
566
|
+
return {
|
567
|
+
CURVE: n,
|
568
|
+
getPublicKey: f,
|
569
|
+
getSharedSecret: h,
|
570
|
+
sign: Z,
|
571
|
+
verify: H,
|
572
|
+
ProjectivePoint: x,
|
573
|
+
Signature: s,
|
574
|
+
utils: u
|
575
|
+
};
|
576
|
+
}
|
577
|
+
export {
|
578
|
+
k as DER,
|
579
|
+
Ot as weierstrass,
|
580
|
+
Bt as weierstrassPoints
|
581
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("../../hashes/esm/sha256.cjs");require("../../hashes/esm/utils.cjs");const n=require("./abstract/modular.cjs");require("./abstract/weierstrass.cjs");require("./abstract/utils.cjs");const F=require("./_shortw_utils.cjs");/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const k=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),x=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),G=BigInt(1),u=BigInt(2),h=(t,f)=>(t+f/u)/f;function M(t){const f=k,c=BigInt(3),r=BigInt(6),B=BigInt(11),a=BigInt(22),s=BigInt(23),i=BigInt(44),d=BigInt(88),o=t*t*t%f,e=o*o*t%f,g=n.pow2(e,c,f)*e%f,b=n.pow2(g,c,f)*e%f,l=n.pow2(b,u,f)*o%f,I=n.pow2(l,B,f)*l%f,p=n.pow2(I,a,f)*I%f,_=n.pow2(p,i,f)*p%f,P=n.pow2(_,d,f)*_%f,S=n.pow2(P,i,f)*p%f,v=n.pow2(S,c,f)*e%f,E=n.pow2(v,s,f)*I%f,j=n.pow2(E,r,f)*o%f,q=n.pow2(j,u,f);if(!w.eql(w.sqr(q),t))throw new Error("Cannot find square root");return q}const w=n.Field(k,void 0,void 0,{sqrt:M}),m=F.createCurve({a:BigInt(0),b:BigInt(7),Fp:w,n:x,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const f=x,c=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-G*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),B=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),a=c,s=BigInt("0x100000000000000000000000000000000"),i=h(a*t,f),d=h(-r*t,f);let o=n.mod(t-i*c-d*B,f),e=n.mod(-i*r-d*a,f);const g=o>s,b=e>s;if(g&&(o=f-o),b&&(e=f-e),o>s||e>s)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:g,k1:o,k2neg:b,k2:e}}}},C.sha256);BigInt(0);m.ProjectivePoint;exports.secp256k1=m;
|
@@ -0,0 +1,47 @@
|
|
1
|
+
import { sha256 as F } from "../../hashes/esm/sha256.js";
|
2
|
+
import "../../hashes/esm/utils.js";
|
3
|
+
import { Field as G, mod as w, pow2 as t } from "./abstract/modular.js";
|
4
|
+
import "./abstract/weierstrass.js";
|
5
|
+
import "./abstract/utils.js";
|
6
|
+
import { createCurve as N } from "./_shortw_utils.js";
|
7
|
+
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
8
|
+
const q = BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"), h = BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"), j = BigInt(1), m = BigInt(2), k = (n, f) => (n + f / m) / f;
|
9
|
+
function M(n) {
|
10
|
+
const f = q, e = BigInt(3), r = BigInt(6), I = BigInt(11), a = BigInt(22), s = BigInt(23), i = BigInt(44), g = BigInt(88), o = n * n * n % f, c = o * o * n % f, d = t(c, e, f) * c % f, B = t(d, e, f) * c % f, l = t(B, m, f) * o % f, b = t(l, I, f) * l % f, p = t(b, a, f) * b % f, x = t(p, i, f) * p % f, P = t(x, g, f) * x % f, v = t(P, i, f) * p % f, E = t(v, e, f) * c % f, S = t(E, s, f) * b % f, C = t(S, r, f) * o % f, u = t(C, m, f);
|
11
|
+
if (!_.eql(_.sqr(u), n))
|
12
|
+
throw new Error("Cannot find square root");
|
13
|
+
return u;
|
14
|
+
}
|
15
|
+
const _ = G(q, void 0, void 0, { sqrt: M }), O = N({
|
16
|
+
a: BigInt(0),
|
17
|
+
b: BigInt(7),
|
18
|
+
Fp: _,
|
19
|
+
n: h,
|
20
|
+
// Base point (x, y) aka generator point
|
21
|
+
Gx: BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),
|
22
|
+
Gy: BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),
|
23
|
+
h: BigInt(1),
|
24
|
+
lowS: !0,
|
25
|
+
/**
|
26
|
+
* secp256k1 belongs to Koblitz curves: it has efficiently computable endomorphism.
|
27
|
+
* Endomorphism uses 2x less RAM, speeds up precomputation by 2x and ECDH / key recovery by 20%.
|
28
|
+
* For precomputed wNAF it trades off 1/2 init time & 1/3 ram for 20% perf hit.
|
29
|
+
* Explanation: https://gist.github.com/paulmillr/eb670806793e84df628a7c434a873066
|
30
|
+
*/
|
31
|
+
endo: {
|
32
|
+
beta: BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),
|
33
|
+
splitScalar: (n) => {
|
34
|
+
const f = h, e = BigInt("0x3086d221a7d46bcde86c90e49284eb15"), r = -j * BigInt("0xe4437ed6010e88286f547fa90abfe4c3"), I = BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"), a = e, s = BigInt("0x100000000000000000000000000000000"), i = k(a * n, f), g = k(-r * n, f);
|
35
|
+
let o = w(n - i * e - g * I, f), c = w(-i * r - g * a, f);
|
36
|
+
const d = o > s, B = c > s;
|
37
|
+
if (d && (o = f - o), B && (c = f - c), o > s || c > s)
|
38
|
+
throw new Error("splitScalar: Endomorphism failed, k=" + n);
|
39
|
+
return { k1neg: d, k1: o, k2neg: B, k2: c };
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}, F);
|
43
|
+
BigInt(0);
|
44
|
+
O.ProjectivePoint;
|
45
|
+
export {
|
46
|
+
O as secp256k1
|
47
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function o(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function i(e){if(typeof e!="boolean")throw new Error(`Expected boolean, not ${e}`)}function r(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function u(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");o(e.outputLen),o(e.blockLen)}function s(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function f(e,t){r(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}const a={number:o,bool:i,bytes:r,hash:u,exists:s,output:f};exports.bool=i;exports.bytes=r;exports.default=a;exports.exists=s;exports.hash=u;exports.number=o;exports.output=f;
|