@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,741 @@
|
|
1
|
+
import y from "../../../../crc-32/crc32.js";
|
2
|
+
import { TypeOutput as p } from "./types.js";
|
3
|
+
import { parseGethGenesis as E, toType as g, intToUint8Array as _ } from "./utils.js";
|
4
|
+
import A from "./chains/goerli.js";
|
5
|
+
import C from "./chains/mainnet.js";
|
6
|
+
import x from "./chains/sepolia.js";
|
7
|
+
import { EIPs as H } from "./eips/index.js";
|
8
|
+
import { Hardfork as b, CustomChain as u, Chain as P } from "./enums.js";
|
9
|
+
import { hardforks as F } from "./hardforks/index.js";
|
10
|
+
import { uint8ArrayConcat as B } from "../../../../web3-utils/lib/esm/uint8array.js";
|
11
|
+
import { EventEmitter as T } from "../../../../web3-utils/lib/esm/event_emitter.js";
|
12
|
+
import { hexToBytes as O, bytesToHex as N } from "../../../../web3-utils/lib/esm/converters.js";
|
13
|
+
const { buf: R } = y;
|
14
|
+
class h extends T {
|
15
|
+
constructor(t) {
|
16
|
+
var r, n;
|
17
|
+
super(), this._eips = [], this._customChains = (r = t.customChains) !== null && r !== void 0 ? r : [], this._chainParams = this.setChain(t.chain), this.DEFAULT_HARDFORK = (n = this._chainParams.defaultHardfork) !== null && n !== void 0 ? n : b.Merge, this.HARDFORK_CHANGES = this.hardforks().map((e) => [
|
18
|
+
e.name,
|
19
|
+
F[e.name]
|
20
|
+
]), this._hardfork = this.DEFAULT_HARDFORK, t.hardfork !== void 0 && this.setHardfork(t.hardfork), t.eips && this.setEIPs(t.eips);
|
21
|
+
}
|
22
|
+
/**
|
23
|
+
* Creates a {@link Common} object for a custom chain, based on a standard one.
|
24
|
+
*
|
25
|
+
* It uses all the {@link Chain} parameters from the {@link baseChain} option except the ones overridden
|
26
|
+
* in a provided {@link chainParamsOrName} dictionary. Some usage example:
|
27
|
+
*
|
28
|
+
* ```javascript
|
29
|
+
* Common.custom({chainId: 123})
|
30
|
+
* ```
|
31
|
+
*
|
32
|
+
* There are also selected supported custom chains which can be initialized by using one of the
|
33
|
+
* {@link CustomChains} for {@link chainParamsOrName}, e.g.:
|
34
|
+
*
|
35
|
+
* ```javascript
|
36
|
+
* Common.custom(CustomChains.MaticMumbai)
|
37
|
+
* ```
|
38
|
+
*
|
39
|
+
* Note that these supported custom chains only provide some base parameters (usually the chain and
|
40
|
+
* network ID and a name) and can only be used for selected use cases (e.g. sending a tx with
|
41
|
+
* the `web3-utils/tx` library to a Layer-2 chain).
|
42
|
+
*
|
43
|
+
* @param chainParamsOrName Custom parameter dict (`name` will default to `custom-chain`) or string with name of a supported custom chain
|
44
|
+
* @param opts Custom chain options to set the {@link CustomCommonOpts.baseChain}, selected {@link CustomCommonOpts.hardfork} and others
|
45
|
+
*/
|
46
|
+
static custom(t, r = {}) {
|
47
|
+
var n;
|
48
|
+
const e = (n = r.baseChain) !== null && n !== void 0 ? n : "mainnet", i = Object.assign({}, h._getChainParams(e));
|
49
|
+
if (i.name = "custom-chain", typeof t != "string")
|
50
|
+
return new h(Object.assign({ chain: Object.assign(Object.assign({}, i), t) }, r));
|
51
|
+
if (t === u.PolygonMainnet)
|
52
|
+
return h.custom({
|
53
|
+
name: u.PolygonMainnet,
|
54
|
+
chainId: 137,
|
55
|
+
networkId: 137
|
56
|
+
}, r);
|
57
|
+
if (t === u.PolygonMumbai)
|
58
|
+
return h.custom({
|
59
|
+
name: u.PolygonMumbai,
|
60
|
+
chainId: 80001,
|
61
|
+
networkId: 80001
|
62
|
+
}, r);
|
63
|
+
if (t === u.ArbitrumRinkebyTestnet)
|
64
|
+
return h.custom({
|
65
|
+
name: u.ArbitrumRinkebyTestnet,
|
66
|
+
chainId: 421611,
|
67
|
+
networkId: 421611
|
68
|
+
}, r);
|
69
|
+
if (t === u.ArbitrumOne)
|
70
|
+
return h.custom({
|
71
|
+
name: u.ArbitrumOne,
|
72
|
+
chainId: 42161,
|
73
|
+
networkId: 42161
|
74
|
+
}, r);
|
75
|
+
if (t === u.xDaiChain)
|
76
|
+
return h.custom({
|
77
|
+
name: u.xDaiChain,
|
78
|
+
chainId: 100,
|
79
|
+
networkId: 100
|
80
|
+
}, r);
|
81
|
+
if (t === u.OptimisticKovan)
|
82
|
+
return h.custom({
|
83
|
+
name: u.OptimisticKovan,
|
84
|
+
chainId: 69,
|
85
|
+
networkId: 69
|
86
|
+
}, Object.assign({ hardfork: b.Berlin }, r));
|
87
|
+
if (t === u.OptimisticEthereum)
|
88
|
+
return h.custom({
|
89
|
+
name: u.OptimisticEthereum,
|
90
|
+
chainId: 10,
|
91
|
+
networkId: 10
|
92
|
+
}, Object.assign({ hardfork: b.Berlin }, r));
|
93
|
+
throw new Error(`Custom chain ${t} not supported`);
|
94
|
+
}
|
95
|
+
/**
|
96
|
+
* Static method to load and set common from a geth genesis json
|
97
|
+
* @param genesisJson json of geth configuration
|
98
|
+
* @param { chain, eips, genesisHash, hardfork, mergeForkIdPostMerge } to further configure the common instance
|
99
|
+
* @returns Common
|
100
|
+
*/
|
101
|
+
static fromGethGenesis(t, { chain: r, eips: n, genesisHash: e, hardfork: i, mergeForkIdPostMerge: s }) {
|
102
|
+
var o;
|
103
|
+
const d = E(t, r, s), c = new h({
|
104
|
+
chain: (o = d.name) !== null && o !== void 0 ? o : "custom",
|
105
|
+
customChains: [d],
|
106
|
+
eips: n,
|
107
|
+
hardfork: i ?? d.hardfork
|
108
|
+
});
|
109
|
+
return e !== void 0 && c.setForkHashes(e), c;
|
110
|
+
}
|
111
|
+
/**
|
112
|
+
* Static method to determine if a {@link chainId} is supported as a standard chain
|
113
|
+
* @param chainId bigint id (`1`) of a standard chain
|
114
|
+
* @returns boolean
|
115
|
+
*/
|
116
|
+
static isSupportedChainId(t) {
|
117
|
+
return !!this._getInitializedChains().names[t.toString()];
|
118
|
+
}
|
119
|
+
static _getChainParams(t, r) {
|
120
|
+
let n = t;
|
121
|
+
const e = this._getInitializedChains(r);
|
122
|
+
if (typeof n == "number" || typeof n == "bigint") {
|
123
|
+
if (n = n.toString(), e.names[n]) {
|
124
|
+
const i = e.names[n];
|
125
|
+
return e[i];
|
126
|
+
}
|
127
|
+
throw new Error(`Chain with ID ${n} not supported`);
|
128
|
+
}
|
129
|
+
if (e[n] !== void 0)
|
130
|
+
return e[n];
|
131
|
+
throw new Error(`Chain with name ${n} not supported`);
|
132
|
+
}
|
133
|
+
/**
|
134
|
+
* Sets the chain
|
135
|
+
* @param chain String ('mainnet') or Number (1) chain representation.
|
136
|
+
* Or, a Dictionary of chain parameters for a private network.
|
137
|
+
* @returns The dictionary with parameters set as chain
|
138
|
+
*/
|
139
|
+
setChain(t) {
|
140
|
+
if (typeof t == "number" || typeof t == "bigint" || typeof t == "string")
|
141
|
+
this._chainParams = h._getChainParams(t, this._customChains);
|
142
|
+
else if (typeof t == "object") {
|
143
|
+
if (this._customChains.length > 0)
|
144
|
+
throw new Error("Chain must be a string, number, or bigint when initialized with customChains passed in");
|
145
|
+
const r = ["networkId", "genesis", "hardforks", "bootstrapNodes"];
|
146
|
+
for (const n of r)
|
147
|
+
if (!(n in t))
|
148
|
+
throw new Error(`Missing required chain parameter: ${n}`);
|
149
|
+
this._chainParams = t;
|
150
|
+
} else
|
151
|
+
throw new Error("Wrong input format");
|
152
|
+
for (const r of this.hardforks())
|
153
|
+
if (r.block === void 0)
|
154
|
+
throw new Error("Hardfork cannot have undefined block number");
|
155
|
+
return this._chainParams;
|
156
|
+
}
|
157
|
+
/**
|
158
|
+
* Sets the hardfork to get params for
|
159
|
+
* @param hardfork String identifier (e.g. 'byzantium') or {@link Hardfork} enum
|
160
|
+
*/
|
161
|
+
setHardfork(t) {
|
162
|
+
let r = !1;
|
163
|
+
for (const n of this.HARDFORK_CHANGES)
|
164
|
+
n[0] === t && (this._hardfork !== t && (this._hardfork = t, this.emit("hardforkChanged", t)), r = !0);
|
165
|
+
if (!r)
|
166
|
+
throw new Error(`Hardfork with name ${t} not supported`);
|
167
|
+
}
|
168
|
+
/**
|
169
|
+
* Returns the hardfork based on the block number or an optional
|
170
|
+
* total difficulty (Merge HF) provided.
|
171
|
+
*
|
172
|
+
* An optional TD takes precedence in case the corresponding HF block
|
173
|
+
* is set to `null` or otherwise needs to match (if not an error
|
174
|
+
* will be thrown).
|
175
|
+
*
|
176
|
+
* @param blockNumber
|
177
|
+
* @param td : total difficulty of the parent block (for block hf) OR of the chain latest (for chain hf)
|
178
|
+
* @param timestamp: timestamp in seconds at which block was/is to be minted
|
179
|
+
* @returns The name of the HF
|
180
|
+
*/
|
181
|
+
getHardforkByBlockNumber(t, r, n) {
|
182
|
+
const e = g(t, p.BigInt), i = g(r, p.BigInt), s = g(n, p.Number), o = this.hardforks().filter((f) => (
|
183
|
+
// eslint-disable-next-line no-null/no-null
|
184
|
+
f.block !== null || // eslint-disable-next-line no-null/no-null
|
185
|
+
f.ttd !== null && f.ttd !== void 0 || f.timestamp !== void 0
|
186
|
+
)), d = o.findIndex((f) => f.ttd !== null && f.ttd !== void 0);
|
187
|
+
if (o.slice(d + 1).findIndex((f) => f.ttd !== null && f.ttd !== void 0) >= 0)
|
188
|
+
throw Error("More than one merge hardforks found with ttd specified");
|
189
|
+
let a = o.findIndex((f) => (
|
190
|
+
// eslint-disable-next-line no-null/no-null
|
191
|
+
f.block !== null && f.block > e || s !== void 0 && Number(f.timestamp) > s
|
192
|
+
));
|
193
|
+
if (a === -1)
|
194
|
+
a = o.length;
|
195
|
+
else if (a === 0)
|
196
|
+
throw Error("Must have at least one hardfork at block 0");
|
197
|
+
if (s === void 0) {
|
198
|
+
const f = o.slice(0, a).reverse().findIndex((v) => v.block !== null || v.ttd !== void 0);
|
199
|
+
a -= f;
|
200
|
+
}
|
201
|
+
if (a -= 1, o[a].block === null && o[a].timestamp === void 0)
|
202
|
+
(i == null || BigInt(o[a].ttd) > i) && (a -= 1);
|
203
|
+
else if (d >= 0 && i !== void 0 && i !== null) {
|
204
|
+
if (a >= d && BigInt(o[d].ttd) > i)
|
205
|
+
throw Error("Maximum HF determined by total difficulty is lower than the block number HF");
|
206
|
+
if (a < d && BigInt(o[d].ttd) <= i)
|
207
|
+
throw Error("HF determined by block number is lower than the minimum total difficulty HF");
|
208
|
+
}
|
209
|
+
const l = a;
|
210
|
+
for (; a < o.length - 1 && !(o[a].block !== o[a + 1].block || o[a].timestamp !== o[a + 1].timestamp); a += 1)
|
211
|
+
;
|
212
|
+
if (s) {
|
213
|
+
if (o.slice(0, l).reduce((I, w) => {
|
214
|
+
var k;
|
215
|
+
return Math.max(Number((k = w.timestamp) !== null && k !== void 0 ? k : "0"), I);
|
216
|
+
}, 0) > s)
|
217
|
+
throw Error("Maximum HF determined by timestamp is lower than the block number/ttd HF");
|
218
|
+
if (o.slice(a + 1).reduce((I, w) => {
|
219
|
+
var k;
|
220
|
+
return Math.min(Number((k = w.timestamp) !== null && k !== void 0 ? k : s), I);
|
221
|
+
}, s) < s)
|
222
|
+
throw Error("Maximum HF determined by block number/ttd is lower than timestamp HF");
|
223
|
+
}
|
224
|
+
return o[a].name;
|
225
|
+
}
|
226
|
+
/**
|
227
|
+
* Sets a new hardfork based on the block number or an optional
|
228
|
+
* total difficulty (Merge HF) provided.
|
229
|
+
*
|
230
|
+
* An optional TD takes precedence in case the corresponding HF block
|
231
|
+
* is set to `null` or otherwise needs to match (if not an error
|
232
|
+
* will be thrown).
|
233
|
+
*
|
234
|
+
* @param blockNumber
|
235
|
+
* @param td
|
236
|
+
* @param timestamp
|
237
|
+
* @returns The name of the HF set
|
238
|
+
*/
|
239
|
+
setHardforkByBlockNumber(t, r, n) {
|
240
|
+
const e = this.getHardforkByBlockNumber(t, r, n);
|
241
|
+
return this.setHardfork(e), e;
|
242
|
+
}
|
243
|
+
/**
|
244
|
+
* Internal helper function, returns the params for the given hardfork for the chain set
|
245
|
+
* @param hardfork Hardfork name
|
246
|
+
* @returns Dictionary with hardfork params or null if hardfork not on chain
|
247
|
+
*/
|
248
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
249
|
+
_getHardfork(t) {
|
250
|
+
const r = this.hardforks();
|
251
|
+
for (const n of r)
|
252
|
+
if (n.name === t)
|
253
|
+
return n;
|
254
|
+
return null;
|
255
|
+
}
|
256
|
+
/**
|
257
|
+
* Sets the active EIPs
|
258
|
+
* @param eips
|
259
|
+
*/
|
260
|
+
setEIPs(t = []) {
|
261
|
+
for (const r of t) {
|
262
|
+
if (!(r in H))
|
263
|
+
throw new Error(`${r} not supported`);
|
264
|
+
const n = this.gteHardfork(H[r].minimumHardfork);
|
265
|
+
if (!n)
|
266
|
+
throw new Error(
|
267
|
+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
268
|
+
`${r} cannot be activated on hardfork ${this.hardfork()}, minimumHardfork: ${n}`
|
269
|
+
);
|
270
|
+
if (H[r].requiredEIPs !== void 0) {
|
271
|
+
for (const e of H[r].requiredEIPs)
|
272
|
+
if (!(t.includes(e) || this.isActivatedEIP(e)))
|
273
|
+
throw new Error(
|
274
|
+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
275
|
+
`${r} requires EIP ${e}, but is not included in the EIP list`
|
276
|
+
);
|
277
|
+
}
|
278
|
+
}
|
279
|
+
this._eips = t;
|
280
|
+
}
|
281
|
+
/**
|
282
|
+
* Returns a parameter for the current chain setup
|
283
|
+
*
|
284
|
+
* If the parameter is present in an EIP, the EIP always takes precedence.
|
285
|
+
* Otherwise the parameter if taken from the latest applied HF with
|
286
|
+
* a change on the respective parameter.
|
287
|
+
*
|
288
|
+
* @param topic Parameter topic ('gasConfig', 'gasPrices', 'vm', 'pow')
|
289
|
+
* @param name Parameter name (e.g. 'minGasLimit' for 'gasConfig' topic)
|
290
|
+
* @returns The value requested or `BigInt(0)` if not found
|
291
|
+
*/
|
292
|
+
param(t, r) {
|
293
|
+
let n;
|
294
|
+
for (const e of this._eips)
|
295
|
+
if (n = this.paramByEIP(t, r, e), n !== void 0)
|
296
|
+
return n;
|
297
|
+
return this.paramByHardfork(t, r, this._hardfork);
|
298
|
+
}
|
299
|
+
/**
|
300
|
+
* Returns the parameter corresponding to a hardfork
|
301
|
+
* @param topic Parameter topic ('gasConfig', 'gasPrices', 'vm', 'pow')
|
302
|
+
* @param name Parameter name (e.g. 'minGasLimit' for 'gasConfig' topic)
|
303
|
+
* @param hardfork Hardfork name
|
304
|
+
* @returns The value requested or `BigInt(0)` if not found
|
305
|
+
*/
|
306
|
+
paramByHardfork(t, r, n) {
|
307
|
+
let e = null;
|
308
|
+
for (const i of this.HARDFORK_CHANGES) {
|
309
|
+
if ("eips" in i[1]) {
|
310
|
+
const s = i[1].eips;
|
311
|
+
for (const o of s) {
|
312
|
+
const d = this.paramByEIP(t, r, o);
|
313
|
+
e = typeof d == "bigint" ? d : e;
|
314
|
+
}
|
315
|
+
} else {
|
316
|
+
if (i[1][t] === void 0)
|
317
|
+
throw new Error(`Topic ${t} not defined`);
|
318
|
+
i[1][t][r] !== void 0 && (e = i[1][t][r].v);
|
319
|
+
}
|
320
|
+
if (i[0] === n)
|
321
|
+
break;
|
322
|
+
}
|
323
|
+
return BigInt(e ?? 0);
|
324
|
+
}
|
325
|
+
/**
|
326
|
+
* Returns a parameter corresponding to an EIP
|
327
|
+
* @param topic Parameter topic ('gasConfig', 'gasPrices', 'vm', 'pow')
|
328
|
+
* @param name Parameter name (e.g. 'minGasLimit' for 'gasConfig' topic)
|
329
|
+
* @param eip Number of the EIP
|
330
|
+
* @returns The value requested or `undefined` if not found
|
331
|
+
*/
|
332
|
+
// eslint-disable-next-line class-methods-use-this
|
333
|
+
paramByEIP(t, r, n) {
|
334
|
+
if (!(n in H))
|
335
|
+
throw new Error(`${n} not supported`);
|
336
|
+
const e = H[n];
|
337
|
+
if (!(t in e))
|
338
|
+
throw new Error(`Topic ${t} not defined`);
|
339
|
+
if (e[t][r] === void 0)
|
340
|
+
return;
|
341
|
+
const i = e[t][r].v;
|
342
|
+
return BigInt(i);
|
343
|
+
}
|
344
|
+
/**
|
345
|
+
* Returns a parameter for the hardfork active on block number or
|
346
|
+
* optional provided total difficulty (Merge HF)
|
347
|
+
* @param topic Parameter topic
|
348
|
+
* @param name Parameter name
|
349
|
+
* @param blockNumber Block number
|
350
|
+
* @param td Total difficulty
|
351
|
+
* * @returns The value requested or `BigInt(0)` if not found
|
352
|
+
*/
|
353
|
+
paramByBlock(t, r, n, e, i) {
|
354
|
+
const s = this.getHardforkByBlockNumber(n, e, i);
|
355
|
+
return this.paramByHardfork(t, r, s);
|
356
|
+
}
|
357
|
+
/**
|
358
|
+
* Checks if an EIP is activated by either being included in the EIPs
|
359
|
+
* manually passed in with the {@link CommonOpts.eips} or in a
|
360
|
+
* hardfork currently being active
|
361
|
+
*
|
362
|
+
* Note: this method only works for EIPs being supported
|
363
|
+
* by the {@link CommonOpts.eips} constructor option
|
364
|
+
* @param eip
|
365
|
+
*/
|
366
|
+
isActivatedEIP(t) {
|
367
|
+
if (this.eips().includes(t))
|
368
|
+
return !0;
|
369
|
+
for (const r of this.HARDFORK_CHANGES) {
|
370
|
+
const n = r[1];
|
371
|
+
if (this.gteHardfork(n.name) && "eips" in n && n.eips.includes(t))
|
372
|
+
return !0;
|
373
|
+
}
|
374
|
+
return !1;
|
375
|
+
}
|
376
|
+
/**
|
377
|
+
* Checks if set or provided hardfork is active on block number
|
378
|
+
* @param hardfork Hardfork name or null (for HF set)
|
379
|
+
* @param blockNumber
|
380
|
+
* @returns True if HF is active on block number
|
381
|
+
*/
|
382
|
+
hardforkIsActiveOnBlock(t, r) {
|
383
|
+
const n = g(r, p.BigInt), e = t ?? this._hardfork, i = this.hardforkBlock(e);
|
384
|
+
return typeof i == "bigint" && i !== BigInt(0) && n >= i;
|
385
|
+
}
|
386
|
+
/**
|
387
|
+
* Alias to hardforkIsActiveOnBlock when hardfork is set
|
388
|
+
* @param blockNumber
|
389
|
+
* @returns True if HF is active on block number
|
390
|
+
*/
|
391
|
+
activeOnBlock(t) {
|
392
|
+
return this.hardforkIsActiveOnBlock(null, t);
|
393
|
+
}
|
394
|
+
/**
|
395
|
+
* Sequence based check if given or set HF1 is greater than or equal HF2
|
396
|
+
* @param hardfork1 Hardfork name or null (if set)
|
397
|
+
* @param hardfork2 Hardfork name
|
398
|
+
* @param opts Hardfork options
|
399
|
+
* @returns True if HF1 gte HF2
|
400
|
+
*/
|
401
|
+
hardforkGteHardfork(t, r) {
|
402
|
+
const n = t ?? this._hardfork, e = this.hardforks();
|
403
|
+
let i = -1, s = -1, o = 0;
|
404
|
+
for (const d of e)
|
405
|
+
d.name === n && (i = o), d.name === r && (s = o), o += 1;
|
406
|
+
return i >= s && s !== -1;
|
407
|
+
}
|
408
|
+
/**
|
409
|
+
* Alias to hardforkGteHardfork when hardfork is set
|
410
|
+
* @param hardfork Hardfork name
|
411
|
+
* @returns True if hardfork set is greater than hardfork provided
|
412
|
+
*/
|
413
|
+
gteHardfork(t) {
|
414
|
+
return this.hardforkGteHardfork(null, t);
|
415
|
+
}
|
416
|
+
/**
|
417
|
+
* Returns the hardfork change block for hardfork provided or set
|
418
|
+
* @param hardfork Hardfork name, optional if HF set
|
419
|
+
* @returns Block number or null if unscheduled
|
420
|
+
*/
|
421
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
422
|
+
hardforkBlock(t) {
|
423
|
+
var r;
|
424
|
+
const n = t ?? this._hardfork, e = (r = this._getHardfork(n)) === null || r === void 0 ? void 0 : r.block;
|
425
|
+
return e == null ? null : BigInt(e);
|
426
|
+
}
|
427
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
428
|
+
hardforkTimestamp(t) {
|
429
|
+
var r;
|
430
|
+
const n = t ?? this._hardfork, e = (r = this._getHardfork(n)) === null || r === void 0 ? void 0 : r.timestamp;
|
431
|
+
return e == null ? null : BigInt(e);
|
432
|
+
}
|
433
|
+
/**
|
434
|
+
* Returns the hardfork change block for eip
|
435
|
+
* @param eip EIP number
|
436
|
+
* @returns Block number or null if unscheduled
|
437
|
+
*/
|
438
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
439
|
+
eipBlock(t) {
|
440
|
+
for (const r of this.HARDFORK_CHANGES) {
|
441
|
+
const n = r[1];
|
442
|
+
if ("eips" in n && n.eips.includes(t))
|
443
|
+
return this.hardforkBlock(typeof r[0] == "number" ? String(r[0]) : r[0]);
|
444
|
+
}
|
445
|
+
return null;
|
446
|
+
}
|
447
|
+
/**
|
448
|
+
* Returns the hardfork change total difficulty (Merge HF) for hardfork provided or set
|
449
|
+
* @param hardfork Hardfork name, optional if HF set
|
450
|
+
* @returns Total difficulty or null if no set
|
451
|
+
*/
|
452
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
453
|
+
hardforkTTD(t) {
|
454
|
+
var r;
|
455
|
+
const n = t ?? this._hardfork, e = (r = this._getHardfork(n)) === null || r === void 0 ? void 0 : r.ttd;
|
456
|
+
return e == null ? null : BigInt(e);
|
457
|
+
}
|
458
|
+
/**
|
459
|
+
* True if block number provided is the hardfork (given or set) change block
|
460
|
+
* @param blockNumber Number of the block to check
|
461
|
+
* @param hardfork Hardfork name, optional if HF set
|
462
|
+
* @returns True if blockNumber is HF block
|
463
|
+
* @deprecated
|
464
|
+
*/
|
465
|
+
isHardforkBlock(t, r) {
|
466
|
+
const n = g(t, p.BigInt), e = r ?? this._hardfork, i = this.hardforkBlock(e);
|
467
|
+
return typeof i == "bigint" && i !== BigInt(0) ? i === n : !1;
|
468
|
+
}
|
469
|
+
/**
|
470
|
+
* Returns the change block for the next hardfork after the hardfork provided or set
|
471
|
+
* @param hardfork Hardfork name, optional if HF set
|
472
|
+
* @returns Block timestamp, number or null if not available
|
473
|
+
*/
|
474
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
475
|
+
nextHardforkBlockOrTimestamp(t) {
|
476
|
+
var r, n;
|
477
|
+
const e = t ?? this._hardfork, i = this.hardforks();
|
478
|
+
let s = i.findIndex((a) => a.name === e);
|
479
|
+
if (e === b.Merge && (s -= 1), s < 0)
|
480
|
+
return null;
|
481
|
+
let o = (r = i[s].timestamp) !== null && r !== void 0 ? r : i[s].block;
|
482
|
+
o = // eslint-disable-next-line no-null/no-null
|
483
|
+
o != null ? Number(o) : (
|
484
|
+
// eslint-disable-next-line no-null/no-null
|
485
|
+
null
|
486
|
+
);
|
487
|
+
const d = i.slice(s + 1).find((a) => {
|
488
|
+
var l;
|
489
|
+
let m = (l = a.timestamp) !== null && l !== void 0 ? l : a.block;
|
490
|
+
return m = // eslint-disable-next-line no-null/no-null
|
491
|
+
m != null ? Number(m) : (
|
492
|
+
// eslint-disable-next-line no-null/no-null
|
493
|
+
null
|
494
|
+
), a.name !== b.Merge && // eslint-disable-next-line no-null/no-null
|
495
|
+
m !== null && m !== void 0 && m !== o;
|
496
|
+
});
|
497
|
+
if (d === void 0)
|
498
|
+
return null;
|
499
|
+
const c = (n = d.timestamp) !== null && n !== void 0 ? n : d.block;
|
500
|
+
return c == null ? null : BigInt(c);
|
501
|
+
}
|
502
|
+
/**
|
503
|
+
* Returns the change block for the next hardfork after the hardfork provided or set
|
504
|
+
* @param hardfork Hardfork name, optional if HF set
|
505
|
+
* @returns Block number or null if not available
|
506
|
+
* @deprecated
|
507
|
+
*/
|
508
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
509
|
+
nextHardforkBlock(t) {
|
510
|
+
const r = t ?? this._hardfork;
|
511
|
+
let n = this.hardforkBlock(r);
|
512
|
+
if (n === null && r === b.Merge) {
|
513
|
+
const i = this.hardforks(), s = i.findIndex((o) => o.ttd !== null && o.ttd !== void 0);
|
514
|
+
if (s < 0)
|
515
|
+
throw Error("Merge hardfork should have been found");
|
516
|
+
n = this.hardforkBlock(i[s - 1].name);
|
517
|
+
}
|
518
|
+
return n === null ? null : this.hardforks().reduce((i, s) => {
|
519
|
+
const o = BigInt(
|
520
|
+
// eslint-disable-next-line no-null/no-null
|
521
|
+
s.block === null || s.ttd !== void 0 && s.ttd !== null ? 0 : s.block
|
522
|
+
);
|
523
|
+
return o > n && i === null ? o : i;
|
524
|
+
}, null);
|
525
|
+
}
|
526
|
+
/**
|
527
|
+
* True if block number provided is the hardfork change block following the hardfork given or set
|
528
|
+
* @param blockNumber Number of the block to check
|
529
|
+
* @param hardfork Hardfork name, optional if HF set
|
530
|
+
* @returns True if blockNumber is HF block
|
531
|
+
* @deprecated
|
532
|
+
*/
|
533
|
+
isNextHardforkBlock(t, r) {
|
534
|
+
const n = g(t, p.BigInt), e = r ?? this._hardfork, i = this.nextHardforkBlock(e);
|
535
|
+
return i === null ? !1 : i === n;
|
536
|
+
}
|
537
|
+
/**
|
538
|
+
* Internal helper function to calculate a fork hash
|
539
|
+
* @param hardfork Hardfork name
|
540
|
+
* @param genesisHash Genesis block hash of the chain
|
541
|
+
* @returns Fork hash as hex string
|
542
|
+
*/
|
543
|
+
_calcForkHash(t, r) {
|
544
|
+
let n = new Uint8Array(), e = 0;
|
545
|
+
for (const o of this.hardforks()) {
|
546
|
+
const { block: d, timestamp: c, name: a } = o;
|
547
|
+
let l = c ?? d;
|
548
|
+
if (l = l !== null ? Number(l) : null, typeof l == "number" && l !== 0 && l !== e && a !== b.Merge) {
|
549
|
+
const m = O(l.toString(16).padStart(16, "0"));
|
550
|
+
n = B(n, m), e = l;
|
551
|
+
}
|
552
|
+
if (o.name === t)
|
553
|
+
break;
|
554
|
+
}
|
555
|
+
const i = B(r, n);
|
556
|
+
return N(_(R(i) >>> 0));
|
557
|
+
}
|
558
|
+
/**
|
559
|
+
* Returns an eth/64 compliant fork hash (EIP-2124)
|
560
|
+
* @param hardfork Hardfork name, optional if HF set
|
561
|
+
* @param genesisHash Genesis block hash of the chain, optional if already defined and not needed to be calculated
|
562
|
+
*/
|
563
|
+
forkHash(t, r) {
|
564
|
+
const n = t ?? this._hardfork, e = this._getHardfork(n);
|
565
|
+
if (
|
566
|
+
// eslint-disable-next-line no-null/no-null
|
567
|
+
e === null || // eslint-disable-next-line no-null/no-null
|
568
|
+
(e == null ? void 0 : e.block) === null && (e == null ? void 0 : e.timestamp) === void 0 && (e == null ? void 0 : e.ttd) === void 0
|
569
|
+
) {
|
570
|
+
const i = "No fork hash calculation possible for future hardfork";
|
571
|
+
throw new Error(i);
|
572
|
+
}
|
573
|
+
if ((e == null ? void 0 : e.forkHash) !== null && (e == null ? void 0 : e.forkHash) !== void 0)
|
574
|
+
return e.forkHash;
|
575
|
+
if (!r)
|
576
|
+
throw new Error("genesisHash required for forkHash calculation");
|
577
|
+
return this._calcForkHash(n, r);
|
578
|
+
}
|
579
|
+
/**
|
580
|
+
*
|
581
|
+
* @param forkHash Fork hash as a hex string
|
582
|
+
* @returns Array with hardfork data (name, block, forkHash)
|
583
|
+
*/
|
584
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
585
|
+
hardforkForForkHash(t) {
|
586
|
+
const r = this.hardforks().filter((n) => n.forkHash === t);
|
587
|
+
return r.length >= 1 ? r[r.length - 1] : null;
|
588
|
+
}
|
589
|
+
/**
|
590
|
+
* Sets any missing forkHashes on the passed-in {@link Common} instance
|
591
|
+
* @param common The {@link Common} to set the forkHashes for
|
592
|
+
* @param genesisHash The genesis block hash
|
593
|
+
*/
|
594
|
+
setForkHashes(t) {
|
595
|
+
var r;
|
596
|
+
for (const n of this.hardforks()) {
|
597
|
+
const e = (r = n.timestamp) !== null && r !== void 0 ? r : n.block;
|
598
|
+
// eslint-disable-next-line no-null/no-null
|
599
|
+
(n.forkHash === null || n.forkHash === void 0) && // eslint-disable-next-line no-null/no-null
|
600
|
+
(e != null || typeof n.ttd < "u") && (n.forkHash = this.forkHash(n.name, t));
|
601
|
+
}
|
602
|
+
}
|
603
|
+
/**
|
604
|
+
* Returns the Genesis parameters of the current chain
|
605
|
+
* @returns Genesis dictionary
|
606
|
+
*/
|
607
|
+
genesis() {
|
608
|
+
return this._chainParams.genesis;
|
609
|
+
}
|
610
|
+
/**
|
611
|
+
* Returns the hardforks for current chain
|
612
|
+
* @returns {Array} Array with arrays of hardforks
|
613
|
+
*/
|
614
|
+
hardforks() {
|
615
|
+
return this._chainParams.hardforks;
|
616
|
+
}
|
617
|
+
/**
|
618
|
+
* Returns bootstrap nodes for the current chain
|
619
|
+
* @returns {Dictionary} Dict with bootstrap nodes
|
620
|
+
*/
|
621
|
+
bootstrapNodes() {
|
622
|
+
return this._chainParams.bootstrapNodes;
|
623
|
+
}
|
624
|
+
/**
|
625
|
+
* Returns DNS networks for the current chain
|
626
|
+
* @returns {String[]} Array of DNS ENR urls
|
627
|
+
*/
|
628
|
+
dnsNetworks() {
|
629
|
+
return this._chainParams.dnsNetworks;
|
630
|
+
}
|
631
|
+
/**
|
632
|
+
* Returns the hardfork set
|
633
|
+
* @returns Hardfork name
|
634
|
+
*/
|
635
|
+
hardfork() {
|
636
|
+
return this._hardfork;
|
637
|
+
}
|
638
|
+
/**
|
639
|
+
* Returns the Id of current chain
|
640
|
+
* @returns chain Id
|
641
|
+
*/
|
642
|
+
chainId() {
|
643
|
+
return BigInt(this._chainParams.chainId);
|
644
|
+
}
|
645
|
+
/**
|
646
|
+
* Returns the name of current chain
|
647
|
+
* @returns chain name (lower case)
|
648
|
+
*/
|
649
|
+
chainName() {
|
650
|
+
return this._chainParams.name;
|
651
|
+
}
|
652
|
+
/**
|
653
|
+
* Returns the Id of current network
|
654
|
+
* @returns network Id
|
655
|
+
*/
|
656
|
+
networkId() {
|
657
|
+
return BigInt(this._chainParams.networkId);
|
658
|
+
}
|
659
|
+
/**
|
660
|
+
* Returns the active EIPs
|
661
|
+
* @returns List of EIPs
|
662
|
+
*/
|
663
|
+
eips() {
|
664
|
+
return this._eips;
|
665
|
+
}
|
666
|
+
/**
|
667
|
+
* Returns the consensus type of the network
|
668
|
+
* Possible values: "pow"|"poa"|"pos"
|
669
|
+
*
|
670
|
+
* Note: This value can update along a Hardfork.
|
671
|
+
*/
|
672
|
+
consensusType() {
|
673
|
+
const t = this.hardfork();
|
674
|
+
let r;
|
675
|
+
for (const n of this.HARDFORK_CHANGES)
|
676
|
+
if ("consensus" in n[1] && (r = n[1].consensus.type), n[0] === t)
|
677
|
+
break;
|
678
|
+
return r ?? this._chainParams.consensus.type;
|
679
|
+
}
|
680
|
+
/**
|
681
|
+
* Returns the concrete consensus implementation
|
682
|
+
* algorithm or protocol for the network
|
683
|
+
* e.g. "ethash" for "pow" consensus type,
|
684
|
+
* "clique" for "poa" consensus type or
|
685
|
+
* "casper" for "pos" consensus type.
|
686
|
+
*
|
687
|
+
* Note: This value can update along a Hardfork.
|
688
|
+
*/
|
689
|
+
consensusAlgorithm() {
|
690
|
+
const t = this.hardfork();
|
691
|
+
let r;
|
692
|
+
for (const n of this.HARDFORK_CHANGES)
|
693
|
+
if ("consensus" in n[1] && (r = n[1].consensus.algorithm), n[0] === t)
|
694
|
+
break;
|
695
|
+
return r ?? this._chainParams.consensus.algorithm;
|
696
|
+
}
|
697
|
+
/**
|
698
|
+
* Returns a dictionary with consensus configuration
|
699
|
+
* parameters based on the consensus algorithm
|
700
|
+
*
|
701
|
+
* Expected returns (parameters must be present in
|
702
|
+
* the respective chain json files):
|
703
|
+
*
|
704
|
+
* ethash: empty object
|
705
|
+
* clique: period, epoch
|
706
|
+
* casper: empty object
|
707
|
+
*
|
708
|
+
* Note: This value can update along a Hardfork.
|
709
|
+
*/
|
710
|
+
consensusConfig() {
|
711
|
+
var t;
|
712
|
+
const r = this.hardfork();
|
713
|
+
let n;
|
714
|
+
for (const e of this.HARDFORK_CHANGES)
|
715
|
+
if ("consensus" in e[1] && (n = e[1].consensus[e[1].consensus.algorithm]), e[0] === r)
|
716
|
+
break;
|
717
|
+
return (t = n ?? this._chainParams.consensus[this.consensusAlgorithm()]) !== null && t !== void 0 ? t : {};
|
718
|
+
}
|
719
|
+
/**
|
720
|
+
* Returns a deep copy of this {@link Common} instance.
|
721
|
+
*/
|
722
|
+
copy() {
|
723
|
+
const t = Object.assign(Object.create(Object.getPrototypeOf(this)), this);
|
724
|
+
return t.removeAllListeners(), t;
|
725
|
+
}
|
726
|
+
static _getInitializedChains(t) {
|
727
|
+
const r = {};
|
728
|
+
for (const [e, i] of Object.entries(P))
|
729
|
+
r[i] = e.toLowerCase();
|
730
|
+
const n = { mainnet: C, goerli: A, sepolia: x };
|
731
|
+
if (t)
|
732
|
+
for (const e of t) {
|
733
|
+
const { name: i } = e;
|
734
|
+
r[e.chainId.toString()] = i, n[i] = e;
|
735
|
+
}
|
736
|
+
return n.names = r, n;
|
737
|
+
}
|
738
|
+
}
|
739
|
+
export {
|
740
|
+
h as Common
|
741
|
+
};
|