@ozdao/prometheus-framework 0.1.63 → 0.1.67
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/Select/Select.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +2 -78
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +78 -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 +65 -67
- 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/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.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 +2 -2
- 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/constructor/components/elements/Textarea.vue.cjs +1 -4
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +2 -61
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +4 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +61 -2
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +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 +2 -2
- 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/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/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/blocks/DepartmentMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.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 +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +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 +2 -2
- 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/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.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 +2 -2
- 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/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
- 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/LeftoverAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/LeftoverAdd.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 +2 -2
- 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 +2 -2
- 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 +4123 -3405
- 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,164 @@
|
|
1
|
+
import { __exports as d } from "../../../../_virtual/index.js";
|
2
|
+
Object.defineProperty(d, "__esModule", { value: !0 });
|
3
|
+
var A = d.RLP = d.utils = d.decode = d.encode = void 0;
|
4
|
+
function y(e) {
|
5
|
+
if (Array.isArray(e)) {
|
6
|
+
const t = [];
|
7
|
+
let n = 0;
|
8
|
+
for (let o = 0; o < e.length; o++) {
|
9
|
+
const i = y(e[o]);
|
10
|
+
t.push(i), n += i.length;
|
11
|
+
}
|
12
|
+
return h(x(n, 192), ...t);
|
13
|
+
}
|
14
|
+
const r = p(e);
|
15
|
+
return r.length === 1 && r[0] < 128 ? r : h(x(r.length, 128), r);
|
16
|
+
}
|
17
|
+
d.encode = y;
|
18
|
+
function l(e, r, t) {
|
19
|
+
if (t > e.length)
|
20
|
+
throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");
|
21
|
+
return e.slice(r, t);
|
22
|
+
}
|
23
|
+
function w(e) {
|
24
|
+
if (e[0] === 0)
|
25
|
+
throw new Error("invalid RLP: extra zeros");
|
26
|
+
return L(b(e));
|
27
|
+
}
|
28
|
+
function x(e, r) {
|
29
|
+
if (e < 56)
|
30
|
+
return Uint8Array.from([e + r]);
|
31
|
+
const t = g(e), n = t.length / 2, o = g(r + 55 + n);
|
32
|
+
return Uint8Array.from(c(o + t));
|
33
|
+
}
|
34
|
+
function m(e, r = !1) {
|
35
|
+
if (typeof e > "u" || e === null || e.length === 0)
|
36
|
+
return Uint8Array.from([]);
|
37
|
+
const t = p(e), n = u(t);
|
38
|
+
if (r)
|
39
|
+
return n;
|
40
|
+
if (n.remainder.length !== 0)
|
41
|
+
throw new Error("invalid RLP: remainder must be zero");
|
42
|
+
return n.data;
|
43
|
+
}
|
44
|
+
d.decode = m;
|
45
|
+
function u(e) {
|
46
|
+
let r, t, n, o, i;
|
47
|
+
const s = [], f = e[0];
|
48
|
+
if (f <= 127)
|
49
|
+
return {
|
50
|
+
data: e.slice(0, 1),
|
51
|
+
remainder: e.slice(1)
|
52
|
+
};
|
53
|
+
if (f <= 183) {
|
54
|
+
if (r = f - 127, f === 128 ? n = Uint8Array.from([]) : n = l(e, 1, r), r === 2 && n[0] < 128)
|
55
|
+
throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");
|
56
|
+
return {
|
57
|
+
data: n,
|
58
|
+
remainder: e.slice(r)
|
59
|
+
};
|
60
|
+
} else if (f <= 191) {
|
61
|
+
if (t = f - 182, e.length - 1 < t)
|
62
|
+
throw new Error("invalid RLP: not enough bytes for string length");
|
63
|
+
if (r = w(l(e, 1, t)), r <= 55)
|
64
|
+
throw new Error("invalid RLP: expected string length to be greater than 55");
|
65
|
+
return n = l(e, t, r + t), {
|
66
|
+
data: n,
|
67
|
+
remainder: e.slice(r + t)
|
68
|
+
};
|
69
|
+
} else if (f <= 247) {
|
70
|
+
for (r = f - 191, o = l(e, 1, r); o.length; )
|
71
|
+
i = u(o), s.push(i.data), o = i.remainder;
|
72
|
+
return {
|
73
|
+
data: s,
|
74
|
+
remainder: e.slice(r)
|
75
|
+
};
|
76
|
+
} else {
|
77
|
+
if (t = f - 246, r = w(l(e, 1, t)), r < 56)
|
78
|
+
throw new Error("invalid RLP: encoded list too short");
|
79
|
+
const a = t + r;
|
80
|
+
if (a > e.length)
|
81
|
+
throw new Error("invalid RLP: total length is larger than the data");
|
82
|
+
for (o = l(e, t, a); o.length; )
|
83
|
+
i = u(o), s.push(i.data), o = i.remainder;
|
84
|
+
return {
|
85
|
+
data: s,
|
86
|
+
remainder: e.slice(a)
|
87
|
+
};
|
88
|
+
}
|
89
|
+
}
|
90
|
+
const B = Array.from({ length: 256 }, (e, r) => r.toString(16).padStart(2, "0"));
|
91
|
+
function b(e) {
|
92
|
+
let r = "";
|
93
|
+
for (let t = 0; t < e.length; t++)
|
94
|
+
r += B[e[t]];
|
95
|
+
return r;
|
96
|
+
}
|
97
|
+
function L(e) {
|
98
|
+
const r = Number.parseInt(e, 16);
|
99
|
+
if (Number.isNaN(r))
|
100
|
+
throw new Error("Invalid byte sequence");
|
101
|
+
return r;
|
102
|
+
}
|
103
|
+
function c(e) {
|
104
|
+
if (typeof e != "string")
|
105
|
+
throw new TypeError("hexToBytes: expected string, got " + typeof e);
|
106
|
+
if (e.length % 2)
|
107
|
+
throw new Error("hexToBytes: received invalid unpadded hex");
|
108
|
+
const r = new Uint8Array(e.length / 2);
|
109
|
+
for (let t = 0; t < r.length; t++) {
|
110
|
+
const n = t * 2;
|
111
|
+
r[t] = L(e.slice(n, n + 2));
|
112
|
+
}
|
113
|
+
return r;
|
114
|
+
}
|
115
|
+
function h(...e) {
|
116
|
+
if (e.length === 1)
|
117
|
+
return e[0];
|
118
|
+
const r = e.reduce((n, o) => n + o.length, 0), t = new Uint8Array(r);
|
119
|
+
for (let n = 0, o = 0; n < e.length; n++) {
|
120
|
+
const i = e[n];
|
121
|
+
t.set(i, o), o += i.length;
|
122
|
+
}
|
123
|
+
return t;
|
124
|
+
}
|
125
|
+
function E(e) {
|
126
|
+
return new TextEncoder().encode(e);
|
127
|
+
}
|
128
|
+
function g(e) {
|
129
|
+
if (e < 0)
|
130
|
+
throw new Error("Invalid integer as argument, must be unsigned!");
|
131
|
+
const r = e.toString(16);
|
132
|
+
return r.length % 2 ? `0${r}` : r;
|
133
|
+
}
|
134
|
+
function R(e) {
|
135
|
+
return e.length % 2 ? `0${e}` : e;
|
136
|
+
}
|
137
|
+
function P(e) {
|
138
|
+
return e.length >= 2 && e[0] === "0" && e[1] === "x";
|
139
|
+
}
|
140
|
+
function U(e) {
|
141
|
+
return typeof e != "string" ? e : P(e) ? e.slice(2) : e;
|
142
|
+
}
|
143
|
+
function p(e) {
|
144
|
+
if (e instanceof Uint8Array)
|
145
|
+
return e;
|
146
|
+
if (typeof e == "string")
|
147
|
+
return P(e) ? c(R(U(e))) : E(e);
|
148
|
+
if (typeof e == "number" || typeof e == "bigint")
|
149
|
+
return e ? c(g(e)) : Uint8Array.from([]);
|
150
|
+
if (e == null)
|
151
|
+
return Uint8Array.from([]);
|
152
|
+
throw new Error("toBytes: received unsupported type " + typeof e);
|
153
|
+
}
|
154
|
+
d.utils = {
|
155
|
+
bytesToHex: b,
|
156
|
+
concatBytes: h,
|
157
|
+
hexToBytes: c,
|
158
|
+
utf8ToBytes: E
|
159
|
+
};
|
160
|
+
A = d.RLP = { encode: y, decode: m };
|
161
|
+
export {
|
162
|
+
A as RLP,
|
163
|
+
d as default
|
164
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../../hashes/esm/hmac.cjs"),c=require("../../hashes/esm/utils.cjs"),o=require("./abstract/weierstrass.cjs");/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function s(e){return{hash:e,hmac:(r,...t)=>a.hmac(e,r,c.concatBytes(...t)),randomBytes:c.randomBytes}}function u(e,r){const t=n=>o.weierstrass({...e,...s(n)});return Object.freeze({...t(r),create:t})}exports.createCurve=u;exports.getHash=s;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { hmac as c } from "../../hashes/esm/hmac.js";
|
2
|
+
import { concatBytes as m, randomBytes as n } from "../../hashes/esm/utils.js";
|
3
|
+
import { weierstrass as a } from "./abstract/weierstrass.js";
|
4
|
+
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
5
|
+
function f(r) {
|
6
|
+
return {
|
7
|
+
hash: r,
|
8
|
+
hmac: (t, ...e) => c(r, t, m(...e)),
|
9
|
+
randomBytes: n
|
10
|
+
};
|
11
|
+
}
|
12
|
+
function p(r, t) {
|
13
|
+
const e = (o) => a({ ...r, ...f(o) });
|
14
|
+
return Object.freeze({ ...e(t), create: e });
|
15
|
+
}
|
16
|
+
export {
|
17
|
+
p as createCurve,
|
18
|
+
f as getHash
|
19
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./modular.cjs"),m=require("./utils.cjs");/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const O=BigInt(0),u=BigInt(1);function A(o,p){const w=(t,e)=>{const n=e.negate();return t?n:e},g=t=>{const e=Math.ceil(p/t)+1,n=2**(t-1);return{windows:e,windowSize:n}};return{constTimeNegate:w,unsafeLadder(t,e){let n=o.ZERO,a=t;for(;e>O;)e&u&&(n=n.add(a)),a=a.double(),e>>=u;return n},precomputeWindow(t,e){const{windows:n,windowSize:a}=g(e),s=[];let i=t,d=i;for(let c=0;c<n;c++){d=i,s.push(d);for(let l=1;l<a;l++)d=d.add(i),s.push(d);i=d.double()}return s},wNAF(t,e,n){const{windows:a,windowSize:s}=g(t);let i=o.ZERO,d=o.BASE;const c=BigInt(2**t-1),l=2**t,B=BigInt(t);for(let f=0;f<a;f++){const h=f*s;let r=Number(n&c);n>>=B,r>s&&(r-=l,n+=u);const N=h,S=h+Math.abs(r)-1,F=f%2!==0,I=r<0;r===0?d=d.add(w(F,e[N])):i=i.add(w(I,e[S]))}return{p:i,f:d}},wNAFCached(t,e,n,a){const s=t._WINDOW_SIZE||1;let i=e.get(t);return i||(i=this.precomputeWindow(t,s),s!==1&&e.set(t,a(i))),this.wNAF(s,i,n)}}}function y(o){return b.validateField(o.Fp),m.validateObject(o,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...b.nLength(o.n,o.nBitLength),...o,p:o.Fp.ORDER})}exports.validateBasic=y;exports.wNAF=A;
|
@@ -0,0 +1,88 @@
|
|
1
|
+
import { validateField as F, nLength as S } from "./modular.js";
|
2
|
+
import { validateObject as O } from "./utils.js";
|
3
|
+
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
4
|
+
const A = BigInt(0), g = BigInt(1);
|
5
|
+
function z(i, u) {
|
6
|
+
const l = (t, n) => {
|
7
|
+
const e = n.negate();
|
8
|
+
return t ? e : n;
|
9
|
+
}, h = (t) => {
|
10
|
+
const n = Math.ceil(u / t) + 1, e = 2 ** (t - 1);
|
11
|
+
return { windows: n, windowSize: e };
|
12
|
+
};
|
13
|
+
return {
|
14
|
+
constTimeNegate: l,
|
15
|
+
// non-const time multiplication ladder
|
16
|
+
unsafeLadder(t, n) {
|
17
|
+
let e = i.ZERO, f = t;
|
18
|
+
for (; n > A; )
|
19
|
+
n & g && (e = e.add(f)), f = f.double(), n >>= g;
|
20
|
+
return e;
|
21
|
+
},
|
22
|
+
/**
|
23
|
+
* Creates a wNAF precomputation window. Used for caching.
|
24
|
+
* Default window size is set by `utils.precompute()` and is equal to 8.
|
25
|
+
* Number of precomputed points depends on the curve size:
|
26
|
+
* 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:
|
27
|
+
* - 𝑊 is the window size
|
28
|
+
* - 𝑛 is the bitlength of the curve order.
|
29
|
+
* For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.
|
30
|
+
* @returns precomputed point tables flattened to a single array
|
31
|
+
*/
|
32
|
+
precomputeWindow(t, n) {
|
33
|
+
const { windows: e, windowSize: f } = h(n), s = [];
|
34
|
+
let o = t, d = o;
|
35
|
+
for (let w = 0; w < e; w++) {
|
36
|
+
d = o, s.push(d);
|
37
|
+
for (let a = 1; a < f; a++)
|
38
|
+
d = d.add(o), s.push(d);
|
39
|
+
o = d.double();
|
40
|
+
}
|
41
|
+
return s;
|
42
|
+
},
|
43
|
+
/**
|
44
|
+
* Implements ec multiplication using precomputed tables and w-ary non-adjacent form.
|
45
|
+
* @param W window size
|
46
|
+
* @param precomputes precomputed tables
|
47
|
+
* @param n scalar (we don't check here, but should be less than curve order)
|
48
|
+
* @returns real and fake (for const-time) points
|
49
|
+
*/
|
50
|
+
wNAF(t, n, e) {
|
51
|
+
const { windows: f, windowSize: s } = h(t);
|
52
|
+
let o = i.ZERO, d = i.BASE;
|
53
|
+
const w = BigInt(2 ** t - 1), a = 2 ** t, b = BigInt(t);
|
54
|
+
for (let c = 0; c < f; c++) {
|
55
|
+
const p = c * s;
|
56
|
+
let r = Number(e & w);
|
57
|
+
e >>= b, r > s && (r -= a, e += g);
|
58
|
+
const B = p, m = p + Math.abs(r) - 1, I = c % 2 !== 0, N = r < 0;
|
59
|
+
r === 0 ? d = d.add(l(I, n[B])) : o = o.add(l(N, n[m]));
|
60
|
+
}
|
61
|
+
return { p: o, f: d };
|
62
|
+
},
|
63
|
+
wNAFCached(t, n, e, f) {
|
64
|
+
const s = t._WINDOW_SIZE || 1;
|
65
|
+
let o = n.get(t);
|
66
|
+
return o || (o = this.precomputeWindow(t, s), s !== 1 && n.set(t, f(o))), this.wNAF(s, o, e);
|
67
|
+
}
|
68
|
+
};
|
69
|
+
}
|
70
|
+
function R(i) {
|
71
|
+
return F(i.Fp), O(i, {
|
72
|
+
n: "bigint",
|
73
|
+
h: "bigint",
|
74
|
+
Gx: "field",
|
75
|
+
Gy: "field"
|
76
|
+
}, {
|
77
|
+
nBitLength: "isSafeInteger",
|
78
|
+
nByteLength: "isSafeInteger"
|
79
|
+
}), Object.freeze({
|
80
|
+
...S(i.n, i.nBitLength),
|
81
|
+
...i,
|
82
|
+
p: i.Fp.ORDER
|
83
|
+
});
|
84
|
+
}
|
85
|
+
export {
|
86
|
+
R as validateBasic,
|
87
|
+
z as wNAF
|
88
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./utils.cjs");/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const f=BigInt(0),u=BigInt(1),h=BigInt(2),M=BigInt(3),b=BigInt(4),y=BigInt(5),m=BigInt(8);BigInt(9);BigInt(16);function a(t,o){const r=t%o;return r>=f?r:o+r}function T(t,o,r){if(r<=f||o<f)throw new Error("Expected power/modulo > 0");if(r===u)return f;let n=u;for(;o>f;)o&u&&(n=n*t%r),t=t*t%r,o>>=u;return n}function C(t,o,r){let n=t;for(;o-- >f;)n*=n,n%=r;return n}function N(t,o){if(t===f||o<=f)throw new Error(`invert: expected positive integers, got n=${t} mod=${o}`);let r=a(t,o),n=o,s=f,c=u;for(;r!==f;){const i=n/r,e=n%r,l=s-c*i;n=r,r=e,s=c,c=l}if(n!==u)throw new Error("invert: does not exist");return a(s,o)}function L(t){const o=(t-u)/h;let r,n,s;for(r=t-u,n=0;r%h===f;r/=h,n++);for(s=h;s<t&&T(s,o,t)!==t-u;s++);if(n===1){const d=(t+u)/b;return function(e,l){const w=e.pow(l,d);if(!e.eql(e.sqr(w),l))throw new Error("Cannot find square root");return w}}const c=(r+u)/h;return function(i,e){if(i.pow(e,o)===i.neg(i.ONE))throw new Error("Cannot find square root");let l=n,w=i.pow(i.mul(i.ONE,s),r),v=i.pow(e,c),q=i.pow(e,r);for(;!i.eql(q,i.ONE);){if(i.eql(q,i.ZERO))return i.ZERO;let B=1;for(let E=i.sqr(q);B<l&&!i.eql(E,i.ONE);B++)E=i.sqr(E);const I=i.pow(w,u<<BigInt(l-B-1));w=i.sqr(I),v=i.mul(v,I),q=i.mul(q,w),l=B}return v}}function x(t){if(t%b===M){const o=(t+u)/b;return function(n,s){const c=n.pow(s,o);if(!n.eql(n.sqr(c),s))throw new Error("Cannot find square root");return c}}if(t%m===y){const o=(t-y)/m;return function(n,s){const c=n.mul(s,h),d=n.pow(c,o),i=n.mul(s,d),e=n.mul(n.mul(i,h),d),l=n.mul(i,n.sub(e,n.ONE));if(!n.eql(n.sqr(l),s))throw new Error("Cannot find square root");return l}}return L(t)}const j=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function k(t){const o={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=j.reduce((n,s)=>(n[s]="function",n),o);return g.validateObject(t,r)}function _(t,o,r){if(r<f)throw new Error("Expected power > 0");if(r===f)return t.ONE;if(r===u)return o;let n=t.ONE,s=o;for(;r>f;)r&u&&(n=t.mul(n,s)),s=t.sqr(s),r>>=u;return n}function $(t,o){const r=new Array(o.length),n=o.reduce((c,d,i)=>t.is0(d)?c:(r[i]=c,t.mul(c,d)),t.ONE),s=t.inv(n);return o.reduceRight((c,d,i)=>t.is0(d)?c:(r[i]=t.mul(c,r[i]),t.mul(c,d)),s),r}function S(t,o){const r=o!==void 0?o:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function O(t,o,r=!1,n={}){if(t<=f)throw new Error(`Expected Fp ORDER > 0, got ${t}`);const{nBitLength:s,nByteLength:c}=S(t,o);if(c>2048)throw new Error("Field lengths over 2048 bytes are not supported");const d=x(t),i=Object.freeze({ORDER:t,BITS:s,BYTES:c,MASK:g.bitMask(s),ZERO:f,ONE:u,create:e=>a(e,t),isValid:e=>{if(typeof e!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof e}`);return f<=e&&e<t},is0:e=>e===f,isOdd:e=>(e&u)===u,neg:e=>a(-e,t),eql:(e,l)=>e===l,sqr:e=>a(e*e,t),add:(e,l)=>a(e+l,t),sub:(e,l)=>a(e-l,t),mul:(e,l)=>a(e*l,t),pow:(e,l)=>_(i,e,l),div:(e,l)=>a(e*N(l,t),t),sqrN:e=>e*e,addN:(e,l)=>e+l,subN:(e,l)=>e-l,mulN:(e,l)=>e*l,inv:e=>N(e,t),sqrt:n.sqrt||(e=>d(i,e)),invertBatch:e=>$(i,e),cmov:(e,l,w)=>w?l:e,toBytes:e=>r?g.numberToBytesLE(e,c):g.numberToBytesBE(e,c),fromBytes:e=>{if(e.length!==c)throw new Error(`Fp.fromBytes: expected ${c}, got ${e.length}`);return r?g.bytesToNumberLE(e):g.bytesToNumberBE(e)}});return Object.freeze(i)}function Z(t,o,r=!1){t=g.ensureBytes("privateHash",t);const n=t.length,s=S(o).nByteLength+8;if(s<24||n<s||n>1024)throw new Error(`hashToPrivateScalar: expected ${s}-1024 bytes of input, got ${n}`);const c=r?g.bytesToNumberLE(t):g.bytesToNumberBE(t);return a(c,o-u)+u}exports.Field=O;exports.FpInvertBatch=$;exports.FpPow=_;exports.FpSqrt=x;exports.hashToPrivateScalar=Z;exports.invert=N;exports.mod=a;exports.nLength=S;exports.pow=T;exports.pow2=C;exports.tonelliShanks=L;exports.validateField=k;
|
@@ -0,0 +1,210 @@
|
|
1
|
+
import { bitMask as L, numberToBytesLE as T, numberToBytesBE as _, bytesToNumberLE as y, bytesToNumberBE as m, ensureBytes as $, validateObject as C } from "./utils.js";
|
2
|
+
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
3
|
+
const f = BigInt(0), u = BigInt(1), a = BigInt(2), M = BigInt(3), E = BigInt(4), b = BigInt(5), I = BigInt(8);
|
4
|
+
BigInt(9);
|
5
|
+
BigInt(16);
|
6
|
+
function g(t, o) {
|
7
|
+
const r = t % o;
|
8
|
+
return r >= f ? r : o + r;
|
9
|
+
}
|
10
|
+
function Z(t, o, r) {
|
11
|
+
if (r <= f || o < f)
|
12
|
+
throw new Error("Expected power/modulo > 0");
|
13
|
+
if (r === u)
|
14
|
+
return f;
|
15
|
+
let n = u;
|
16
|
+
for (; o > f; )
|
17
|
+
o & u && (n = n * t % r), t = t * t % r, o >>= u;
|
18
|
+
return n;
|
19
|
+
}
|
20
|
+
function Q(t, o, r) {
|
21
|
+
let n = t;
|
22
|
+
for (; o-- > f; )
|
23
|
+
n *= n, n %= r;
|
24
|
+
return n;
|
25
|
+
}
|
26
|
+
function S(t, o) {
|
27
|
+
if (t === f || o <= f)
|
28
|
+
throw new Error(`invert: expected positive integers, got n=${t} mod=${o}`);
|
29
|
+
let r = g(t, o), n = o, s = f, c = u;
|
30
|
+
for (; r !== f; ) {
|
31
|
+
const i = n / r, e = n % r, l = s - c * i;
|
32
|
+
n = r, r = e, s = c, c = l;
|
33
|
+
}
|
34
|
+
if (n !== u)
|
35
|
+
throw new Error("invert: does not exist");
|
36
|
+
return g(s, o);
|
37
|
+
}
|
38
|
+
function j(t) {
|
39
|
+
const o = (t - u) / a;
|
40
|
+
let r, n, s;
|
41
|
+
for (r = t - u, n = 0; r % a === f; r /= a, n++)
|
42
|
+
;
|
43
|
+
for (s = a; s < t && Z(s, o, t) !== t - u; s++)
|
44
|
+
;
|
45
|
+
if (n === 1) {
|
46
|
+
const d = (t + u) / E;
|
47
|
+
return function(e, l) {
|
48
|
+
const w = e.pow(l, d);
|
49
|
+
if (!e.eql(e.sqr(w), l))
|
50
|
+
throw new Error("Cannot find square root");
|
51
|
+
return w;
|
52
|
+
};
|
53
|
+
}
|
54
|
+
const c = (r + u) / a;
|
55
|
+
return function(i, e) {
|
56
|
+
if (i.pow(e, o) === i.neg(i.ONE))
|
57
|
+
throw new Error("Cannot find square root");
|
58
|
+
let l = n, w = i.pow(i.mul(i.ONE, s), r), B = i.pow(e, c), h = i.pow(e, r);
|
59
|
+
for (; !i.eql(h, i.ONE); ) {
|
60
|
+
if (i.eql(h, i.ZERO))
|
61
|
+
return i.ZERO;
|
62
|
+
let q = 1;
|
63
|
+
for (let v = i.sqr(h); q < l && !i.eql(v, i.ONE); q++)
|
64
|
+
v = i.sqr(v);
|
65
|
+
const N = i.pow(w, u << BigInt(l - q - 1));
|
66
|
+
w = i.sqr(N), B = i.mul(B, N), h = i.mul(h, w), l = q;
|
67
|
+
}
|
68
|
+
return B;
|
69
|
+
};
|
70
|
+
}
|
71
|
+
function k(t) {
|
72
|
+
if (t % E === M) {
|
73
|
+
const o = (t + u) / E;
|
74
|
+
return function(n, s) {
|
75
|
+
const c = n.pow(s, o);
|
76
|
+
if (!n.eql(n.sqr(c), s))
|
77
|
+
throw new Error("Cannot find square root");
|
78
|
+
return c;
|
79
|
+
};
|
80
|
+
}
|
81
|
+
if (t % I === b) {
|
82
|
+
const o = (t - b) / I;
|
83
|
+
return function(n, s) {
|
84
|
+
const c = n.mul(s, a), d = n.pow(c, o), i = n.mul(s, d), e = n.mul(n.mul(i, a), d), l = n.mul(i, n.sub(e, n.ONE));
|
85
|
+
if (!n.eql(n.sqr(l), s))
|
86
|
+
throw new Error("Cannot find square root");
|
87
|
+
return l;
|
88
|
+
};
|
89
|
+
}
|
90
|
+
return j(t);
|
91
|
+
}
|
92
|
+
const A = [
|
93
|
+
"create",
|
94
|
+
"isValid",
|
95
|
+
"is0",
|
96
|
+
"neg",
|
97
|
+
"inv",
|
98
|
+
"sqrt",
|
99
|
+
"sqr",
|
100
|
+
"eql",
|
101
|
+
"add",
|
102
|
+
"sub",
|
103
|
+
"mul",
|
104
|
+
"pow",
|
105
|
+
"div",
|
106
|
+
"addN",
|
107
|
+
"subN",
|
108
|
+
"mulN",
|
109
|
+
"sqrN"
|
110
|
+
];
|
111
|
+
function V(t) {
|
112
|
+
const o = {
|
113
|
+
ORDER: "bigint",
|
114
|
+
MASK: "bigint",
|
115
|
+
BYTES: "isSafeInteger",
|
116
|
+
BITS: "isSafeInteger"
|
117
|
+
}, r = A.reduce((n, s) => (n[s] = "function", n), o);
|
118
|
+
return C(t, r);
|
119
|
+
}
|
120
|
+
function O(t, o, r) {
|
121
|
+
if (r < f)
|
122
|
+
throw new Error("Expected power > 0");
|
123
|
+
if (r === f)
|
124
|
+
return t.ONE;
|
125
|
+
if (r === u)
|
126
|
+
return o;
|
127
|
+
let n = t.ONE, s = o;
|
128
|
+
for (; r > f; )
|
129
|
+
r & u && (n = t.mul(n, s)), s = t.sqr(s), r >>= u;
|
130
|
+
return n;
|
131
|
+
}
|
132
|
+
function z(t, o) {
|
133
|
+
const r = new Array(o.length), n = o.reduce((c, d, i) => t.is0(d) ? c : (r[i] = c, t.mul(c, d)), t.ONE), s = t.inv(n);
|
134
|
+
return o.reduceRight((c, d, i) => t.is0(d) ? c : (r[i] = t.mul(c, r[i]), t.mul(c, d)), s), r;
|
135
|
+
}
|
136
|
+
function x(t, o) {
|
137
|
+
const r = o !== void 0 ? o : t.toString(2).length, n = Math.ceil(r / 8);
|
138
|
+
return { nBitLength: r, nByteLength: n };
|
139
|
+
}
|
140
|
+
function Y(t, o, r = !1, n = {}) {
|
141
|
+
if (t <= f)
|
142
|
+
throw new Error(`Expected Fp ORDER > 0, got ${t}`);
|
143
|
+
const { nBitLength: s, nByteLength: c } = x(t, o);
|
144
|
+
if (c > 2048)
|
145
|
+
throw new Error("Field lengths over 2048 bytes are not supported");
|
146
|
+
const d = k(t), i = Object.freeze({
|
147
|
+
ORDER: t,
|
148
|
+
BITS: s,
|
149
|
+
BYTES: c,
|
150
|
+
MASK: L(s),
|
151
|
+
ZERO: f,
|
152
|
+
ONE: u,
|
153
|
+
create: (e) => g(e, t),
|
154
|
+
isValid: (e) => {
|
155
|
+
if (typeof e != "bigint")
|
156
|
+
throw new Error(`Invalid field element: expected bigint, got ${typeof e}`);
|
157
|
+
return f <= e && e < t;
|
158
|
+
},
|
159
|
+
is0: (e) => e === f,
|
160
|
+
isOdd: (e) => (e & u) === u,
|
161
|
+
neg: (e) => g(-e, t),
|
162
|
+
eql: (e, l) => e === l,
|
163
|
+
sqr: (e) => g(e * e, t),
|
164
|
+
add: (e, l) => g(e + l, t),
|
165
|
+
sub: (e, l) => g(e - l, t),
|
166
|
+
mul: (e, l) => g(e * l, t),
|
167
|
+
pow: (e, l) => O(i, e, l),
|
168
|
+
div: (e, l) => g(e * S(l, t), t),
|
169
|
+
// Same as above, but doesn't normalize
|
170
|
+
sqrN: (e) => e * e,
|
171
|
+
addN: (e, l) => e + l,
|
172
|
+
subN: (e, l) => e - l,
|
173
|
+
mulN: (e, l) => e * l,
|
174
|
+
inv: (e) => S(e, t),
|
175
|
+
sqrt: n.sqrt || ((e) => d(i, e)),
|
176
|
+
invertBatch: (e) => z(i, e),
|
177
|
+
// TODO: do we really need constant cmov?
|
178
|
+
// We don't have const-time bigints anyway, so probably will be not very useful
|
179
|
+
cmov: (e, l, w) => w ? l : e,
|
180
|
+
toBytes: (e) => r ? T(e, c) : _(e, c),
|
181
|
+
fromBytes: (e) => {
|
182
|
+
if (e.length !== c)
|
183
|
+
throw new Error(`Fp.fromBytes: expected ${c}, got ${e.length}`);
|
184
|
+
return r ? y(e) : m(e);
|
185
|
+
}
|
186
|
+
});
|
187
|
+
return Object.freeze(i);
|
188
|
+
}
|
189
|
+
function H(t, o, r = !1) {
|
190
|
+
t = $("privateHash", t);
|
191
|
+
const n = t.length, s = x(o).nByteLength + 8;
|
192
|
+
if (s < 24 || n < s || n > 1024)
|
193
|
+
throw new Error(`hashToPrivateScalar: expected ${s}-1024 bytes of input, got ${n}`);
|
194
|
+
const c = r ? y(t) : m(t);
|
195
|
+
return g(c, o - u) + u;
|
196
|
+
}
|
197
|
+
export {
|
198
|
+
Y as Field,
|
199
|
+
z as FpInvertBatch,
|
200
|
+
O as FpPow,
|
201
|
+
k as FpSqrt,
|
202
|
+
H as hashToPrivateScalar,
|
203
|
+
S as invert,
|
204
|
+
g as mod,
|
205
|
+
x as nLength,
|
206
|
+
Z as pow,
|
207
|
+
Q as pow2,
|
208
|
+
j as tonelliShanks,
|
209
|
+
V as validateField
|
210
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const m=BigInt(0),y=BigInt(1),U=BigInt(2),g=e=>e instanceof Uint8Array,A=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function w(e){if(!g(e))throw new Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=A[e[r]];return t}function B(e){const t=e.toString(16);return t.length&1?`0${t}`:t}function h(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return BigInt(e===""?"0":`0x${e}`)}function b(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);const t=e.length;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(t/2);for(let n=0;n<r.length;n++){const o=n*2,i=e.slice(o,o+2),s=Number.parseInt(i,16);if(Number.isNaN(s)||s<0)throw new Error("Invalid byte sequence");r[n]=s}return r}function $(e){return h(w(e))}function v(e){if(!g(e))throw new Error("Uint8Array expected");return h(w(Uint8Array.from(e).reverse()))}function E(e,t){return b(e.toString(16).padStart(t*2,"0"))}function I(e,t){return E(e,t).reverse()}function N(e){return b(B(e))}function S(e,t,r){let n;if(typeof t=="string")try{n=b(t)}catch(i){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${i}`)}else if(g(t))n=Uint8Array.from(t);else throw new Error(`${e} must be hex string or Uint8Array`);const o=n.length;if(typeof r=="number"&&o!==r)throw new Error(`${e} expected ${r} bytes, got ${o}`);return n}function T(...e){const t=new Uint8Array(e.reduce((n,o)=>n+o.length,0));let r=0;return e.forEach(n=>{if(!g(n))throw new Error("Uint8Array expected");t.set(n,r),r+=n.length}),t}function H(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function k(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function O(e){let t;for(t=0;e>m;e>>=y,t+=1);return t}function j(e,t){return e>>BigInt(t)&y}const V=(e,t,r)=>e|(r?y:m)<<BigInt(t),F=e=>(U<<BigInt(e-1))-y,d=e=>new Uint8Array(e),p=e=>Uint8Array.from(e);function M(e,t,r){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let n=d(e),o=d(e),i=0;const s=()=>{n.fill(1),o.fill(0),i=0},f=(...u)=>r(o,n,...u),c=(u=d())=>{o=f(p([0]),u),n=f(),u.length!==0&&(o=f(p([1]),u),n=f())},x=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let u=0;const a=[];for(;u<t;){n=f();const l=n.slice();a.push(l),u+=n.length}return T(...a)};return(u,a)=>{s(),c(u);let l;for(;!(l=a(x()));)c();return s(),l}}const _={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function q(e,t,r={}){const n=(o,i,s)=>{const f=_[i];if(typeof f!="function")throw new Error(`Invalid validator "${i}", expected function`);const c=e[o];if(!(s&&c===void 0)&&!f(c,e))throw new Error(`Invalid param ${String(o)}=${c} (${typeof c}), expected ${i}`)};for(const[o,i]of Object.entries(t))n(o,i,!1);for(const[o,i]of Object.entries(r))n(o,i,!0);return e}exports.bitGet=j;exports.bitLen=O;exports.bitMask=F;exports.bitSet=V;exports.bytesToHex=w;exports.bytesToNumberBE=$;exports.bytesToNumberLE=v;exports.concatBytes=T;exports.createHmacDrbg=M;exports.ensureBytes=S;exports.equalBytes=H;exports.hexToBytes=b;exports.hexToNumber=h;exports.numberToBytesBE=E;exports.numberToBytesLE=I;exports.numberToHexUnpadded=B;exports.numberToVarBytesBE=N;exports.utf8ToBytes=k;exports.validateObject=q;
|
@@ -0,0 +1,178 @@
|
|
1
|
+
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
2
|
+
const h = BigInt(0), g = BigInt(1), B = BigInt(2), y = (t) => t instanceof Uint8Array, x = Array.from({ length: 256 }, (t, e) => e.toString(16).padStart(2, "0"));
|
3
|
+
function b(t) {
|
4
|
+
if (!y(t))
|
5
|
+
throw new Error("Uint8Array expected");
|
6
|
+
let e = "";
|
7
|
+
for (let r = 0; r < t.length; r++)
|
8
|
+
e += x[t[r]];
|
9
|
+
return e;
|
10
|
+
}
|
11
|
+
function A(t) {
|
12
|
+
const e = t.toString(16);
|
13
|
+
return e.length & 1 ? `0${e}` : e;
|
14
|
+
}
|
15
|
+
function m(t) {
|
16
|
+
if (typeof t != "string")
|
17
|
+
throw new Error("hex string expected, got " + typeof t);
|
18
|
+
return BigInt(t === "" ? "0" : `0x${t}`);
|
19
|
+
}
|
20
|
+
function d(t) {
|
21
|
+
if (typeof t != "string")
|
22
|
+
throw new Error("hex string expected, got " + typeof t);
|
23
|
+
const e = t.length;
|
24
|
+
if (e % 2)
|
25
|
+
throw new Error("padded hex string expected, got unpadded hex of length " + e);
|
26
|
+
const r = new Uint8Array(e / 2);
|
27
|
+
for (let n = 0; n < r.length; n++) {
|
28
|
+
const o = n * 2, i = t.slice(o, o + 2), u = Number.parseInt(i, 16);
|
29
|
+
if (Number.isNaN(u) || u < 0)
|
30
|
+
throw new Error("Invalid byte sequence");
|
31
|
+
r[n] = u;
|
32
|
+
}
|
33
|
+
return r;
|
34
|
+
}
|
35
|
+
function T(t) {
|
36
|
+
return m(b(t));
|
37
|
+
}
|
38
|
+
function N(t) {
|
39
|
+
if (!y(t))
|
40
|
+
throw new Error("Uint8Array expected");
|
41
|
+
return m(b(Uint8Array.from(t).reverse()));
|
42
|
+
}
|
43
|
+
function U(t, e) {
|
44
|
+
return d(t.toString(16).padStart(e * 2, "0"));
|
45
|
+
}
|
46
|
+
function S(t, e) {
|
47
|
+
return U(t, e).reverse();
|
48
|
+
}
|
49
|
+
function k(t) {
|
50
|
+
return d(A(t));
|
51
|
+
}
|
52
|
+
function F(t, e, r) {
|
53
|
+
let n;
|
54
|
+
if (typeof e == "string")
|
55
|
+
try {
|
56
|
+
n = d(e);
|
57
|
+
} catch (i) {
|
58
|
+
throw new Error(`${t} must be valid hex string, got "${e}". Cause: ${i}`);
|
59
|
+
}
|
60
|
+
else if (y(e))
|
61
|
+
n = Uint8Array.from(e);
|
62
|
+
else
|
63
|
+
throw new Error(`${t} must be hex string or Uint8Array`);
|
64
|
+
const o = n.length;
|
65
|
+
if (typeof r == "number" && o !== r)
|
66
|
+
throw new Error(`${t} expected ${r} bytes, got ${o}`);
|
67
|
+
return n;
|
68
|
+
}
|
69
|
+
function $(...t) {
|
70
|
+
const e = new Uint8Array(t.reduce((n, o) => n + o.length, 0));
|
71
|
+
let r = 0;
|
72
|
+
return t.forEach((n) => {
|
73
|
+
if (!y(n))
|
74
|
+
throw new Error("Uint8Array expected");
|
75
|
+
e.set(n, r), r += n.length;
|
76
|
+
}), e;
|
77
|
+
}
|
78
|
+
function H(t, e) {
|
79
|
+
if (t.length !== e.length)
|
80
|
+
return !1;
|
81
|
+
for (let r = 0; r < t.length; r++)
|
82
|
+
if (t[r] !== e[r])
|
83
|
+
return !1;
|
84
|
+
return !0;
|
85
|
+
}
|
86
|
+
function O(t) {
|
87
|
+
if (typeof t != "string")
|
88
|
+
throw new Error(`utf8ToBytes expected string, got ${typeof t}`);
|
89
|
+
return new Uint8Array(new TextEncoder().encode(t));
|
90
|
+
}
|
91
|
+
function V(t) {
|
92
|
+
let e;
|
93
|
+
for (e = 0; t > h; t >>= g, e += 1)
|
94
|
+
;
|
95
|
+
return e;
|
96
|
+
}
|
97
|
+
function _(t, e) {
|
98
|
+
return t >> BigInt(e) & g;
|
99
|
+
}
|
100
|
+
const j = (t, e, r) => t | (r ? g : h) << BigInt(e), q = (t) => (B << BigInt(t - 1)) - g, w = (t) => new Uint8Array(t), p = (t) => Uint8Array.from(t);
|
101
|
+
function C(t, e, r) {
|
102
|
+
if (typeof t != "number" || t < 2)
|
103
|
+
throw new Error("hashLen must be a number");
|
104
|
+
if (typeof e != "number" || e < 2)
|
105
|
+
throw new Error("qByteLen must be a number");
|
106
|
+
if (typeof r != "function")
|
107
|
+
throw new Error("hmacFn must be a function");
|
108
|
+
let n = w(t), o = w(t), i = 0;
|
109
|
+
const u = () => {
|
110
|
+
n.fill(1), o.fill(0), i = 0;
|
111
|
+
}, s = (...f) => r(o, n, ...f), c = (f = w()) => {
|
112
|
+
o = s(p([0]), f), n = s(), f.length !== 0 && (o = s(p([1]), f), n = s());
|
113
|
+
}, E = () => {
|
114
|
+
if (i++ >= 1e3)
|
115
|
+
throw new Error("drbg: tried 1000 values");
|
116
|
+
let f = 0;
|
117
|
+
const a = [];
|
118
|
+
for (; f < e; ) {
|
119
|
+
n = s();
|
120
|
+
const l = n.slice();
|
121
|
+
a.push(l), f += n.length;
|
122
|
+
}
|
123
|
+
return $(...a);
|
124
|
+
};
|
125
|
+
return (f, a) => {
|
126
|
+
u(), c(f);
|
127
|
+
let l;
|
128
|
+
for (; !(l = a(E())); )
|
129
|
+
c();
|
130
|
+
return u(), l;
|
131
|
+
};
|
132
|
+
}
|
133
|
+
const I = {
|
134
|
+
bigint: (t) => typeof t == "bigint",
|
135
|
+
function: (t) => typeof t == "function",
|
136
|
+
boolean: (t) => typeof t == "boolean",
|
137
|
+
string: (t) => typeof t == "string",
|
138
|
+
isSafeInteger: (t) => Number.isSafeInteger(t),
|
139
|
+
array: (t) => Array.isArray(t),
|
140
|
+
field: (t, e) => e.Fp.isValid(t),
|
141
|
+
hash: (t) => typeof t == "function" && Number.isSafeInteger(t.outputLen)
|
142
|
+
};
|
143
|
+
function D(t, e, r = {}) {
|
144
|
+
const n = (o, i, u) => {
|
145
|
+
const s = I[i];
|
146
|
+
if (typeof s != "function")
|
147
|
+
throw new Error(`Invalid validator "${i}", expected function`);
|
148
|
+
const c = t[o];
|
149
|
+
if (!(u && c === void 0) && !s(c, t))
|
150
|
+
throw new Error(`Invalid param ${String(o)}=${c} (${typeof c}), expected ${i}`);
|
151
|
+
};
|
152
|
+
for (const [o, i] of Object.entries(e))
|
153
|
+
n(o, i, !1);
|
154
|
+
for (const [o, i] of Object.entries(r))
|
155
|
+
n(o, i, !0);
|
156
|
+
return t;
|
157
|
+
}
|
158
|
+
export {
|
159
|
+
_ as bitGet,
|
160
|
+
V as bitLen,
|
161
|
+
q as bitMask,
|
162
|
+
j as bitSet,
|
163
|
+
b as bytesToHex,
|
164
|
+
T as bytesToNumberBE,
|
165
|
+
N as bytesToNumberLE,
|
166
|
+
$ as concatBytes,
|
167
|
+
C as createHmacDrbg,
|
168
|
+
F as ensureBytes,
|
169
|
+
H as equalBytes,
|
170
|
+
d as hexToBytes,
|
171
|
+
m as hexToNumber,
|
172
|
+
U as numberToBytesBE,
|
173
|
+
S as numberToBytesLE,
|
174
|
+
A as numberToHexUnpadded,
|
175
|
+
k as numberToVarBytesBE,
|
176
|
+
O as utf8ToBytes,
|
177
|
+
D as validateObject
|
178
|
+
};
|