@ozdao/prometheus-framework 0.1.66 → 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/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/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/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,57 @@
|
|
1
|
+
import { keccak256 as s } from "../../../../ethereum-cryptography/esm/keccak.js";
|
2
|
+
import { secp256k1 as i } from "./constants.js";
|
3
|
+
import { zeros as n, assertIsUint8Array as u } from "../common/utils.js";
|
4
|
+
import { uint8ArrayEquals as a } from "../../../../web3-utils/lib/esm/uint8array.js";
|
5
|
+
import { bytesToHex as f } from "../../../../web3-utils/lib/esm/converters.js";
|
6
|
+
class e {
|
7
|
+
constructor(r) {
|
8
|
+
if (r.length !== 20)
|
9
|
+
throw new Error("Invalid address length");
|
10
|
+
this.buf = r;
|
11
|
+
}
|
12
|
+
/**
|
13
|
+
* Returns the zero address.
|
14
|
+
*/
|
15
|
+
static zero() {
|
16
|
+
return new e(n(20));
|
17
|
+
}
|
18
|
+
/**
|
19
|
+
* Is address equal to another.
|
20
|
+
*/
|
21
|
+
equals(r) {
|
22
|
+
return a(this.buf, r.buf);
|
23
|
+
}
|
24
|
+
/**
|
25
|
+
* Is address zero.
|
26
|
+
*/
|
27
|
+
isZero() {
|
28
|
+
return this.equals(e.zero());
|
29
|
+
}
|
30
|
+
/**
|
31
|
+
* Returns hex encoding of address.
|
32
|
+
*/
|
33
|
+
toString() {
|
34
|
+
return f(this.buf);
|
35
|
+
}
|
36
|
+
/**
|
37
|
+
* Returns Uint8Array representation of address.
|
38
|
+
*/
|
39
|
+
toArray() {
|
40
|
+
return this.buf;
|
41
|
+
}
|
42
|
+
/**
|
43
|
+
* Returns the ethereum address of a given public key.
|
44
|
+
* Accepts "Ethereum public keys" and SEC1 encoded keys.
|
45
|
+
* @param pubKey The two points of an uncompressed key, unless sanitize is enabled
|
46
|
+
* @param sanitize Accept public keys in other formats
|
47
|
+
*/
|
48
|
+
static publicToAddress(r, o = !1) {
|
49
|
+
let t = r;
|
50
|
+
if (u(t), o && t.length !== 64 && (t = i.ProjectivePoint.fromHex(t).toRawBytes(!1).slice(1)), t.length !== 64)
|
51
|
+
throw new Error("Expected pubKey to be of length 64");
|
52
|
+
return s(t).slice(-20);
|
53
|
+
}
|
54
|
+
}
|
55
|
+
export {
|
56
|
+
e as Address
|
57
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./constants.cjs"),s=require("../common/utils.cjs"),d=require("../common/common.cjs"),x=require("../common/enums.cjs"),u=require("./types.cjs"),g=require("./address.cjs"),b=require("./utils.cjs"),w=require("../../../../web3-utils/lib/esm/converters.cjs");class B{constructor(t,e){var i,n;this.cache={hash:void 0,dataFee:void 0},this.activeCapabilities=[],this.DEFAULT_CHAIN=x.Chain.Mainnet,this.DEFAULT_HARDFORK=x.Hardfork.Merge;const{nonce:r,gasLimit:a,to:h,value:o,data:l,v:f,r:m,s:y,type:C}=t;this._type=Number(s.uint8ArrayToBigInt(s.toUint8Array(C))),this.txOptions=e;const v=s.toUint8Array(h===""?"0x":h),A=s.toUint8Array(f===""?"0x":f),p=s.toUint8Array(m===""?"0x":m),I=s.toUint8Array(y===""?"0x":y);this.nonce=s.uint8ArrayToBigInt(s.toUint8Array(r===""?"0x":r)),this.gasLimit=s.uint8ArrayToBigInt(s.toUint8Array(a===""?"0x":a)),this.to=v.length>0?new g.Address(v):void 0,this.value=s.uint8ArrayToBigInt(s.toUint8Array(o===""?"0x":o)),this.data=s.toUint8Array(l===""?"0x":l),this.v=A.length>0?s.uint8ArrayToBigInt(A):void 0,this.r=p.length>0?s.uint8ArrayToBigInt(p):void 0,this.s=I.length>0?s.uint8ArrayToBigInt(I):void 0,this._validateCannotExceedMaxInteger({value:this.value,r:this.r,s:this.s}),this._validateCannotExceedMaxInteger({gasLimit:this.gasLimit},64),this._validateCannotExceedMaxInteger({nonce:this.nonce},64,!0);const E=this.to===void 0||this.to===null,T=(i=e.allowUnlimitedInitCodeSize)!==null&&i!==void 0?i:!1,_=(n=e.common)!==null&&n!==void 0?n:this._getCommon();E&&_.isActivatedEIP(3860)&&!T&&b.checkMaxInitCodeSize(_,this.data.length)}get type(){return this._type}supports(t){return this.activeCapabilities.includes(t)}validate(t=!1){const e=[];return this.getBaseFee()>this.gasLimit&&e.push(`gasLimit is too low. given ${this.gasLimit}, need at least ${this.getBaseFee()}`),this.isSigned()&&!this.verifySignature()&&e.push("Invalid Signature"),t?e:e.length===0}_validateYParity(){const{v:t}=this;if(t!==void 0&&t!==BigInt(0)&&t!==BigInt(1)){const e=this._errorMsg("The y-parity of the transaction should either be 0 or 1");throw new Error(e)}}_validateHighS(){const{s:t}=this;if(this.common.gteHardfork("homestead")&&t!==void 0&&t>c.SECP256K1_ORDER_DIV_2){const e=this._errorMsg("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");throw new Error(e)}}getBaseFee(){const t=this.common.param("gasPrices","tx");let e=this.getDataFee();if(t&&(e+=t),this.common.gteHardfork("homestead")&&this.toCreationAddress()){const i=this.common.param("gasPrices","txCreation");i&&(e+=i)}return e}getDataFee(){const t=this.common.param("gasPrices","txDataZero"),e=this.common.param("gasPrices","txDataNonZero");let i=BigInt(0);for(let n=0;n<this.data.length;n+=1)this.data[n]===0?i+=t:i+=e;if((this.to===void 0||this.to===null)&&this.common.isActivatedEIP(3860)){const n=BigInt(Math.ceil(this.data.length/32)),r=this.common.param("gasPrices","initCodeWordCost")*n;i+=r}return i}toCreationAddress(){return this.to===void 0||this.to.buf.length===0}isSigned(){const{v:t,r:e,s:i}=this;return!(t===void 0||e===void 0||i===void 0)}verifySignature(){try{const t=this.getSenderPublicKey();return s.unpadUint8Array(t).length!==0}catch{return!1}}getSenderAddress(){return new g.Address(g.Address.publicToAddress(this.getSenderPublicKey()))}sign(t){if(t.length!==32){const o=this._errorMsg("Private key must be 32 bytes in length.");throw new Error(o)}let e=!1;this.type===0&&this.common.gteHardfork("spuriousDragon")&&!this.supports(u.Capability.EIP155ReplayProtection)&&(this.activeCapabilities.push(u.Capability.EIP155ReplayProtection),e=!0);const i=this.getMessageToSign(!0),{v:n,r,s:a}=this._ecsign(i,t),h=this._processSignature(n,r,a);if(e){const o=this.activeCapabilities.indexOf(u.Capability.EIP155ReplayProtection);o>-1&&this.activeCapabilities.splice(o,1)}return h}_getCommon(t,e){var i;if(e!==void 0){const n=s.uint8ArrayToBigInt(s.toUint8Array(e));if(t){if(t.chainId()!==n){const r=this._errorMsg("The chain ID does not match the chain ID of Common");throw new Error(r)}return t.copy()}return d.Common.isSupportedChainId(n)?new d.Common({chain:n,hardfork:this.DEFAULT_HARDFORK}):d.Common.custom({name:"custom-chain",networkId:n,chainId:n},{baseChain:this.DEFAULT_CHAIN,hardfork:this.DEFAULT_HARDFORK})}return(i=t==null?void 0:t.copy())!==null&&i!==void 0?i:new d.Common({chain:this.DEFAULT_CHAIN,hardfork:this.DEFAULT_HARDFORK})}_validateCannotExceedMaxInteger(t,e=256,i=!1){for(const[n,r]of Object.entries(t))switch(e){case 64:if(i){if(r!==void 0&&r>=c.MAX_UINT64){const a=this._errorMsg(`${n} cannot equal or exceed MAX_UINT64 (2^64-1), given ${r}`);throw new Error(a)}}else if(r!==void 0&&r>c.MAX_UINT64){const a=this._errorMsg(`${n} cannot exceed MAX_UINT64 (2^64-1), given ${r}`);throw new Error(a)}break;case 256:if(i){if(r!==void 0&&r>=c.MAX_INTEGER){const a=this._errorMsg(`${n} cannot equal or exceed MAX_INTEGER (2^256-1), given ${r}`);throw new Error(a)}}else if(r!==void 0&&r>c.MAX_INTEGER){const a=this._errorMsg(`${n} cannot exceed MAX_INTEGER (2^256-1), given ${r}`);throw new Error(a)}break;default:{const a=this._errorMsg("unimplemented bits value");throw new Error(a)}}}static _validateNotArray(t){const e=["nonce","gasPrice","gasLimit","to","value","data","v","r","s","type","baseFee","maxFeePerGas","chainId"];for(const[i,n]of Object.entries(t))if(e.includes(i)&&Array.isArray(n))throw new Error(`${i} cannot be an array`)}_getSharedErrorPostfix(){let t="";try{t=this.isSigned()?w.bytesToHex(this.hash()):"not available (unsigned)"}catch{t="error"}let e="";try{e=this.isSigned().toString()}catch{t="error"}let i="";try{i=this.common.hardfork()}catch{i="error"}let n=`tx type=${this.type} hash=${t} nonce=${this.nonce} value=${this.value} `;return n+=`signed=${e} hf=${i}`,n}_ecsign(t,e,i){const n=c.secp256k1.sign(t,e),r=n.toCompactRawBytes(),a=r.subarray(0,32),h=r.subarray(32,64),o=i===void 0?BigInt(n.recovery+27):BigInt(n.recovery+35)+BigInt(i)*BigInt(2);return{r:a,s:h,v:o}}static fromSerializedTx(t,e={}){}static fromTxData(t,e={}){}}exports.BaseTransaction=B;
|
@@ -0,0 +1,272 @@
|
|
1
|
+
import { SECP256K1_ORDER_DIV_2 as D, MAX_INTEGER as A, MAX_UINT64 as C, secp256k1 as M } from "./constants.js";
|
2
|
+
import { uint8ArrayToBigInt as h, toUint8Array as a, unpadUint8Array as S } from "../common/utils.js";
|
3
|
+
import { Common as d } from "../common/common.js";
|
4
|
+
import { Chain as T, Hardfork as F } from "../common/enums.js";
|
5
|
+
import { Capability as g } from "./types.js";
|
6
|
+
import { Address as l } from "./address.js";
|
7
|
+
import { checkMaxInitCodeSize as P } from "./utils.js";
|
8
|
+
import { bytesToHex as B } from "../../../../web3-utils/lib/esm/converters.js";
|
9
|
+
class X {
|
10
|
+
constructor(t, e) {
|
11
|
+
var i, s;
|
12
|
+
this.cache = {
|
13
|
+
hash: void 0,
|
14
|
+
dataFee: void 0
|
15
|
+
}, this.activeCapabilities = [], this.DEFAULT_CHAIN = T.Mainnet, this.DEFAULT_HARDFORK = F.Merge;
|
16
|
+
const { nonce: n, gasLimit: r, to: c, value: o, data: u, v: f, r: m, s: p, type: E } = t;
|
17
|
+
this._type = Number(h(a(E))), this.txOptions = e;
|
18
|
+
const v = a(c === "" ? "0x" : c), y = a(f === "" ? "0x" : f), x = a(m === "" ? "0x" : m), _ = a(p === "" ? "0x" : p);
|
19
|
+
this.nonce = h(a(n === "" ? "0x" : n)), this.gasLimit = h(a(r === "" ? "0x" : r)), this.to = v.length > 0 ? new l(v) : void 0, this.value = h(a(o === "" ? "0x" : o)), this.data = a(u === "" ? "0x" : u), this.v = y.length > 0 ? h(y) : void 0, this.r = x.length > 0 ? h(x) : void 0, this.s = _.length > 0 ? h(_) : void 0, this._validateCannotExceedMaxInteger({ value: this.value, r: this.r, s: this.s }), this._validateCannotExceedMaxInteger({ gasLimit: this.gasLimit }, 64), this._validateCannotExceedMaxInteger({ nonce: this.nonce }, 64, !0);
|
20
|
+
const w = this.to === void 0 || this.to === null, b = (i = e.allowUnlimitedInitCodeSize) !== null && i !== void 0 ? i : !1, I = (s = e.common) !== null && s !== void 0 ? s : this._getCommon();
|
21
|
+
w && I.isActivatedEIP(3860) && !b && P(I, this.data.length);
|
22
|
+
}
|
23
|
+
/**
|
24
|
+
* Returns the transaction type.
|
25
|
+
*
|
26
|
+
* Note: legacy txs will return tx type `0`.
|
27
|
+
*/
|
28
|
+
get type() {
|
29
|
+
return this._type;
|
30
|
+
}
|
31
|
+
/**
|
32
|
+
* Checks if a tx type defining capability is active
|
33
|
+
* on a tx, for example the EIP-1559 fee market mechanism
|
34
|
+
* or the EIP-2930 access list feature.
|
35
|
+
*
|
36
|
+
* Note that this is different from the tx type itself,
|
37
|
+
* so EIP-2930 access lists can very well be active
|
38
|
+
* on an EIP-1559 tx for example.
|
39
|
+
*
|
40
|
+
* This method can be useful for feature checks if the
|
41
|
+
* tx type is unknown (e.g. when instantiated with
|
42
|
+
* the tx factory).
|
43
|
+
*
|
44
|
+
* See `Capabilites` in the `types` module for a reference
|
45
|
+
* on all supported capabilities.
|
46
|
+
*/
|
47
|
+
supports(t) {
|
48
|
+
return this.activeCapabilities.includes(t);
|
49
|
+
}
|
50
|
+
validate(t = !1) {
|
51
|
+
const e = [];
|
52
|
+
return this.getBaseFee() > this.gasLimit && e.push(`gasLimit is too low. given ${this.gasLimit}, need at least ${this.getBaseFee()}`), this.isSigned() && !this.verifySignature() && e.push("Invalid Signature"), t ? e : e.length === 0;
|
53
|
+
}
|
54
|
+
_validateYParity() {
|
55
|
+
const { v: t } = this;
|
56
|
+
if (t !== void 0 && t !== BigInt(0) && t !== BigInt(1)) {
|
57
|
+
const e = this._errorMsg("The y-parity of the transaction should either be 0 or 1");
|
58
|
+
throw new Error(e);
|
59
|
+
}
|
60
|
+
}
|
61
|
+
/**
|
62
|
+
* EIP-2: All transaction signatures whose s-value is greater than secp256k1n/2are considered invalid.
|
63
|
+
* Reasoning: https://ethereum.stackexchange.com/a/55728
|
64
|
+
*/
|
65
|
+
_validateHighS() {
|
66
|
+
const { s: t } = this;
|
67
|
+
if (this.common.gteHardfork("homestead") && t !== void 0 && t > D) {
|
68
|
+
const e = this._errorMsg("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");
|
69
|
+
throw new Error(e);
|
70
|
+
}
|
71
|
+
}
|
72
|
+
/**
|
73
|
+
* The minimum amount of gas the tx must have (DataFee + TxFee + Creation Fee)
|
74
|
+
*/
|
75
|
+
getBaseFee() {
|
76
|
+
const t = this.common.param("gasPrices", "tx");
|
77
|
+
let e = this.getDataFee();
|
78
|
+
if (t && (e += t), this.common.gteHardfork("homestead") && this.toCreationAddress()) {
|
79
|
+
const i = this.common.param("gasPrices", "txCreation");
|
80
|
+
i && (e += i);
|
81
|
+
}
|
82
|
+
return e;
|
83
|
+
}
|
84
|
+
/**
|
85
|
+
* The amount of gas paid for the data in this tx
|
86
|
+
*/
|
87
|
+
getDataFee() {
|
88
|
+
const t = this.common.param("gasPrices", "txDataZero"), e = this.common.param("gasPrices", "txDataNonZero");
|
89
|
+
let i = BigInt(0);
|
90
|
+
for (let s = 0; s < this.data.length; s += 1)
|
91
|
+
this.data[s] === 0 ? i += t : i += e;
|
92
|
+
if ((this.to === void 0 || this.to === null) && this.common.isActivatedEIP(3860)) {
|
93
|
+
const s = BigInt(Math.ceil(this.data.length / 32)), n = this.common.param("gasPrices", "initCodeWordCost") * s;
|
94
|
+
i += n;
|
95
|
+
}
|
96
|
+
return i;
|
97
|
+
}
|
98
|
+
/**
|
99
|
+
* If the tx's `to` is to the creation address
|
100
|
+
*/
|
101
|
+
toCreationAddress() {
|
102
|
+
return this.to === void 0 || this.to.buf.length === 0;
|
103
|
+
}
|
104
|
+
isSigned() {
|
105
|
+
const { v: t, r: e, s: i } = this;
|
106
|
+
return !(t === void 0 || e === void 0 || i === void 0);
|
107
|
+
}
|
108
|
+
/**
|
109
|
+
* Determines if the signature is valid
|
110
|
+
*/
|
111
|
+
verifySignature() {
|
112
|
+
try {
|
113
|
+
const t = this.getSenderPublicKey();
|
114
|
+
return S(t).length !== 0;
|
115
|
+
} catch {
|
116
|
+
return !1;
|
117
|
+
}
|
118
|
+
}
|
119
|
+
/**
|
120
|
+
* Returns the sender's address
|
121
|
+
*/
|
122
|
+
getSenderAddress() {
|
123
|
+
return new l(l.publicToAddress(this.getSenderPublicKey()));
|
124
|
+
}
|
125
|
+
/**
|
126
|
+
* Signs a transaction.
|
127
|
+
*
|
128
|
+
* Note that the signed tx is returned as a new object,
|
129
|
+
* use as follows:
|
130
|
+
* ```javascript
|
131
|
+
* const signedTx = tx.sign(privateKey)
|
132
|
+
* ```
|
133
|
+
*/
|
134
|
+
sign(t) {
|
135
|
+
if (t.length !== 32) {
|
136
|
+
const o = this._errorMsg("Private key must be 32 bytes in length.");
|
137
|
+
throw new Error(o);
|
138
|
+
}
|
139
|
+
let e = !1;
|
140
|
+
this.type === 0 && this.common.gteHardfork("spuriousDragon") && !this.supports(g.EIP155ReplayProtection) && (this.activeCapabilities.push(g.EIP155ReplayProtection), e = !0);
|
141
|
+
const i = this.getMessageToSign(!0), { v: s, r: n, s: r } = this._ecsign(i, t), c = this._processSignature(s, n, r);
|
142
|
+
if (e) {
|
143
|
+
const o = this.activeCapabilities.indexOf(g.EIP155ReplayProtection);
|
144
|
+
o > -1 && this.activeCapabilities.splice(o, 1);
|
145
|
+
}
|
146
|
+
return c;
|
147
|
+
}
|
148
|
+
/**
|
149
|
+
* Does chain ID checks on common and returns a common
|
150
|
+
* to be used on instantiation
|
151
|
+
* @hidden
|
152
|
+
*
|
153
|
+
* @param common - {@link Common} instance from tx options
|
154
|
+
* @param chainId - Chain ID from tx options (typed txs) or signature (legacy tx)
|
155
|
+
*/
|
156
|
+
_getCommon(t, e) {
|
157
|
+
var i;
|
158
|
+
if (e !== void 0) {
|
159
|
+
const s = h(a(e));
|
160
|
+
if (t) {
|
161
|
+
if (t.chainId() !== s) {
|
162
|
+
const n = this._errorMsg("The chain ID does not match the chain ID of Common");
|
163
|
+
throw new Error(n);
|
164
|
+
}
|
165
|
+
return t.copy();
|
166
|
+
}
|
167
|
+
return d.isSupportedChainId(s) ? new d({ chain: s, hardfork: this.DEFAULT_HARDFORK }) : d.custom({
|
168
|
+
name: "custom-chain",
|
169
|
+
networkId: s,
|
170
|
+
chainId: s
|
171
|
+
}, { baseChain: this.DEFAULT_CHAIN, hardfork: this.DEFAULT_HARDFORK });
|
172
|
+
}
|
173
|
+
return (i = t == null ? void 0 : t.copy()) !== null && i !== void 0 ? i : new d({ chain: this.DEFAULT_CHAIN, hardfork: this.DEFAULT_HARDFORK });
|
174
|
+
}
|
175
|
+
/**
|
176
|
+
* Validates that an object with BigInt values cannot exceed the specified bit limit.
|
177
|
+
* @param values Object containing string keys and BigInt values
|
178
|
+
* @param bits Number of bits to check (64 or 256)
|
179
|
+
* @param cannotEqual Pass true if the number also cannot equal one less the maximum value
|
180
|
+
*/
|
181
|
+
_validateCannotExceedMaxInteger(t, e = 256, i = !1) {
|
182
|
+
for (const [s, n] of Object.entries(t))
|
183
|
+
switch (e) {
|
184
|
+
case 64:
|
185
|
+
if (i) {
|
186
|
+
if (n !== void 0 && n >= C) {
|
187
|
+
const r = this._errorMsg(`${s} cannot equal or exceed MAX_UINT64 (2^64-1), given ${n}`);
|
188
|
+
throw new Error(r);
|
189
|
+
}
|
190
|
+
} else if (n !== void 0 && n > C) {
|
191
|
+
const r = this._errorMsg(`${s} cannot exceed MAX_UINT64 (2^64-1), given ${n}`);
|
192
|
+
throw new Error(r);
|
193
|
+
}
|
194
|
+
break;
|
195
|
+
case 256:
|
196
|
+
if (i) {
|
197
|
+
if (n !== void 0 && n >= A) {
|
198
|
+
const r = this._errorMsg(`${s} cannot equal or exceed MAX_INTEGER (2^256-1), given ${n}`);
|
199
|
+
throw new Error(r);
|
200
|
+
}
|
201
|
+
} else if (n !== void 0 && n > A) {
|
202
|
+
const r = this._errorMsg(`${s} cannot exceed MAX_INTEGER (2^256-1), given ${n}`);
|
203
|
+
throw new Error(r);
|
204
|
+
}
|
205
|
+
break;
|
206
|
+
default: {
|
207
|
+
const r = this._errorMsg("unimplemented bits value");
|
208
|
+
throw new Error(r);
|
209
|
+
}
|
210
|
+
}
|
211
|
+
}
|
212
|
+
static _validateNotArray(t) {
|
213
|
+
const e = [
|
214
|
+
"nonce",
|
215
|
+
"gasPrice",
|
216
|
+
"gasLimit",
|
217
|
+
"to",
|
218
|
+
"value",
|
219
|
+
"data",
|
220
|
+
"v",
|
221
|
+
"r",
|
222
|
+
"s",
|
223
|
+
"type",
|
224
|
+
"baseFee",
|
225
|
+
"maxFeePerGas",
|
226
|
+
"chainId"
|
227
|
+
];
|
228
|
+
for (const [i, s] of Object.entries(t))
|
229
|
+
if (e.includes(i) && Array.isArray(s))
|
230
|
+
throw new Error(`${i} cannot be an array`);
|
231
|
+
}
|
232
|
+
/**
|
233
|
+
* Returns the shared error postfix part for _error() method
|
234
|
+
* tx type implementations.
|
235
|
+
*/
|
236
|
+
_getSharedErrorPostfix() {
|
237
|
+
let t = "";
|
238
|
+
try {
|
239
|
+
t = this.isSigned() ? B(this.hash()) : "not available (unsigned)";
|
240
|
+
} catch {
|
241
|
+
t = "error";
|
242
|
+
}
|
243
|
+
let e = "";
|
244
|
+
try {
|
245
|
+
e = this.isSigned().toString();
|
246
|
+
} catch {
|
247
|
+
t = "error";
|
248
|
+
}
|
249
|
+
let i = "";
|
250
|
+
try {
|
251
|
+
i = this.common.hardfork();
|
252
|
+
} catch {
|
253
|
+
i = "error";
|
254
|
+
}
|
255
|
+
let s = `tx type=${this.type} hash=${t} nonce=${this.nonce} value=${this.value} `;
|
256
|
+
return s += `signed=${e} hf=${i}`, s;
|
257
|
+
}
|
258
|
+
// eslint-disable-next-line class-methods-use-this
|
259
|
+
_ecsign(t, e, i) {
|
260
|
+
const s = M.sign(t, e), n = s.toCompactRawBytes(), r = n.subarray(0, 32), c = n.subarray(32, 64), o = i === void 0 ? BigInt(s.recovery + 27) : BigInt(s.recovery + 35) + BigInt(i) * BigInt(2);
|
261
|
+
return { r, s: c, v: o };
|
262
|
+
}
|
263
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
264
|
+
static fromSerializedTx(t, e = {}) {
|
265
|
+
}
|
266
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
267
|
+
static fromTxData(t, e = {}) {
|
268
|
+
}
|
269
|
+
}
|
270
|
+
export {
|
271
|
+
X as BaseTransaction
|
272
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../../../../ethereum-cryptography/esm/secp256k1.cjs"),n=require("../../../../@noble/curves/esm/secp256k1.cjs");var f;const e=(f=n.secp256k1)!==null&&f!==void 0?f:c,s=BigInt("0xffffffffffffffff"),E=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),t=e.CURVE.n,_=t/BigInt(2);exports.MAX_INTEGER=E;exports.MAX_UINT64=s;exports.SECP256K1_ORDER=t;exports.SECP256K1_ORDER_DIV_2=_;exports.secp256k1=e;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import * as o from "../../../../ethereum-cryptography/esm/secp256k1.js";
|
2
|
+
import { secp256k1 as s } from "../../../../@noble/curves/esm/secp256k1.js";
|
3
|
+
var f;
|
4
|
+
const t = (f = s) !== null && f !== void 0 ? f : o, p = BigInt("0xffffffffffffffff"), E = BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"), n = t.CURVE.n, _ = n / BigInt(2);
|
5
|
+
export {
|
6
|
+
E as MAX_INTEGER,
|
7
|
+
p as MAX_UINT64,
|
8
|
+
n as SECP256K1_ORDER,
|
9
|
+
_ as SECP256K1_ORDER_DIV_2,
|
10
|
+
t as secp256k1
|
11
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../../../../ethereum-cryptography/esm/keccak.cjs");require("../../../../web3-errors/lib/esm/errors/rpc_errors.cjs");require("../../../../web3-validator/lib/esm/formats.cjs");const F=require("../../../../web3-validator/lib/esm/validation/string.cjs");require("../../../../web3-validator/lib/esm/default_validator.cjs");require("../../../../web3-types/lib/esm/data_format_types.cjs");require("../../../../web3-types/lib/esm/eth_types.cjs");require("../../../../web3-types/lib/esm/web3_base_provider.cjs");const x=require("../../../../@ethereumjs/rlp/dist/index.cjs"),G=require("./constants.cjs"),v=require("./baseTransaction.cjs"),u=require("./utils.cjs"),t=require("../common/utils.cjs"),I=require("../../../../web3-utils/lib/esm/converters.cjs"),P=require("../../../../web3-utils/lib/esm/uint8array.cjs"),T=2,f=I.hexToBytes(T.toString(16).padStart(2,"0"));class o extends v.BaseTransaction{constructor(e,i={}){var r;super(Object.assign(Object.assign({},e),{type:T}),i),this.DEFAULT_HARDFORK="london";const{chainId:a,accessList:s,maxFeePerGas:n,maxPriorityFeePerGas:c}=e;if(this.common=this._getCommon(i.common,a),this.chainId=this.common.chainId(),!this.common.isActivatedEIP(1559))throw new Error("EIP-1559 not enabled on Common");this.activeCapabilities=this.activeCapabilities.concat([1559,2718,2930]);const d=u.getAccessListData(s??[]);if(this.accessList=d.accessList,this.AccessListJSON=d.AccessListJSON,u.verifyAccessList(this.accessList),this.maxFeePerGas=t.uint8ArrayToBigInt(t.toUint8Array(n===""?"0x":n)),this.maxPriorityFeePerGas=t.uint8ArrayToBigInt(t.toUint8Array(c===""?"0x":c)),this._validateCannotExceedMaxInteger({maxFeePerGas:this.maxFeePerGas,maxPriorityFeePerGas:this.maxPriorityFeePerGas}),v.BaseTransaction._validateNotArray(e),this.gasLimit*this.maxFeePerGas>G.MAX_INTEGER){const h=this._errorMsg("gasLimit * maxFeePerGas cannot exceed MAX_INTEGER (2^256-1)");throw new Error(h)}if(this.maxFeePerGas<this.maxPriorityFeePerGas){const h=this._errorMsg("maxFeePerGas cannot be less than maxPriorityFeePerGas (The total must be the larger of the two)");throw new Error(h)}this._validateYParity(),this._validateHighS(),((r=i==null?void 0:i.freeze)!==null&&r!==void 0?r:!0)&&Object.freeze(this)}static fromTxData(e,i={}){return new o(e,i)}static fromSerializedTx(e,i={}){if(!P.uint8ArrayEquals(e.subarray(0,1),f))throw new Error(`Invalid serialized tx input: not an EIP-1559 transaction (wrong tx type, expected: ${T}, received: ${I.bytesToHex(e.subarray(0,1))}`);const r=x.RLP.decode(e.subarray(1));if(!Array.isArray(r))throw new Error("Invalid serialized tx input: must be array");return o.fromValuesArray(r,i)}static fromValuesArray(e,i={}){if(e.length!==9&&e.length!==12)throw new Error("Invalid EIP-1559 transaction. Only expecting 9 values (for unsigned tx) or 12 values (for signed tx).");const[r,a,s,n,c,d,m,h,y,g,A,b]=e;return this._validateNotArray({chainId:r,v:g}),F.validateNoLeadingZeroes({nonce:a,maxPriorityFeePerGas:s,maxFeePerGas:n,gasLimit:c,value:m,v:g,r:A,s:b}),new o({chainId:t.uint8ArrayToBigInt(r),nonce:a,maxPriorityFeePerGas:s,maxFeePerGas:n,gasLimit:c,to:d,value:m,data:h,accessList:y??[],v:g!==void 0?t.uint8ArrayToBigInt(g):void 0,r:A,s:b},i)}getDataFee(){if(this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork())return this.cache.dataFee.value;let e=super.getDataFee();return e+=BigInt(u.getDataFeeEIP2930(this.accessList,this.common)),Object.isFrozen(this)&&(this.cache.dataFee={value:e,hardfork:this.common.hardfork()}),e}getUpfrontCost(e=BigInt(0)){const i=this.maxPriorityFeePerGas,r=this.maxFeePerGas-e,s=(i<r?i:r)+e;return this.gasLimit*s+this.value}raw(){return[t.bigIntToUnpaddedUint8Array(this.chainId),t.bigIntToUnpaddedUint8Array(this.nonce),t.bigIntToUnpaddedUint8Array(this.maxPriorityFeePerGas),t.bigIntToUnpaddedUint8Array(this.maxFeePerGas),t.bigIntToUnpaddedUint8Array(this.gasLimit),this.to!==void 0?this.to.buf:Uint8Array.from([]),t.bigIntToUnpaddedUint8Array(this.value),this.data,this.accessList,this.v!==void 0?t.bigIntToUnpaddedUint8Array(this.v):Uint8Array.from([]),this.r!==void 0?t.bigIntToUnpaddedUint8Array(this.r):Uint8Array.from([]),this.s!==void 0?t.bigIntToUnpaddedUint8Array(this.s):Uint8Array.from([])]}serialize(){const e=this.raw();return P.uint8ArrayConcat(f,x.RLP.encode(e))}getMessageToSign(e=!0){const i=this.raw().slice(0,9),r=P.uint8ArrayConcat(f,x.RLP.encode(i));return e?l.keccak256(r):r}hash(){if(!this.isSigned()){const e=this._errorMsg("Cannot call hash method if transaction is not signed");throw new Error(e)}return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=l.keccak256(this.serialize())),this.cache.hash):l.keccak256(this.serialize())}getMessageToVerifySignature(){return this.getMessageToSign()}getSenderPublicKey(){if(!this.isSigned()){const s=this._errorMsg("Cannot call this method if transaction is not signed");throw new Error(s)}const e=this.getMessageToVerifySignature(),{v:i,r,s:a}=this;this._validateHighS();try{return t.ecrecover(e,i+BigInt(27),t.bigIntToUnpaddedUint8Array(r),t.bigIntToUnpaddedUint8Array(a))}catch{const n=this._errorMsg("Invalid Signature");throw new Error(n)}}_processSignature(e,i,r){const a=Object.assign(Object.assign({},this.txOptions),{common:this.common});return o.fromTxData({chainId:this.chainId,nonce:this.nonce,maxPriorityFeePerGas:this.maxPriorityFeePerGas,maxFeePerGas:this.maxFeePerGas,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:e-BigInt(27),r:t.uint8ArrayToBigInt(i),s:t.uint8ArrayToBigInt(r)},a)}toJSON(){const e=u.getAccessListJSON(this.accessList);return{chainId:t.bigIntToHex(this.chainId),nonce:t.bigIntToHex(this.nonce),maxPriorityFeePerGas:t.bigIntToHex(this.maxPriorityFeePerGas),maxFeePerGas:t.bigIntToHex(this.maxFeePerGas),gasLimit:t.bigIntToHex(this.gasLimit),to:this.to!==void 0?this.to.toString():void 0,value:t.bigIntToHex(this.value),data:I.bytesToHex(this.data),accessList:e,v:this.v!==void 0?t.bigIntToHex(this.v):void 0,r:this.r!==void 0?t.bigIntToHex(this.r):void 0,s:this.s!==void 0?t.bigIntToHex(this.s):void 0}}errorStr(){let e=this._getSharedErrorPostfix();return e+=` maxFeePerGas=${this.maxFeePerGas} maxPriorityFeePerGas=${this.maxPriorityFeePerGas}`,e}_errorMsg(e){return`${e} (${this.errorStr()})`}}exports.FeeMarketEIP1559Transaction=o;
|
@@ -0,0 +1,285 @@
|
|
1
|
+
import { keccak256 as l } from "../../../../ethereum-cryptography/esm/keccak.js";
|
2
|
+
import "../../../../web3-errors/lib/esm/errors/rpc_errors.js";
|
3
|
+
import "../../../../web3-validator/lib/esm/formats.js";
|
4
|
+
import { validateNoLeadingZeroes as S } from "../../../../web3-validator/lib/esm/validation/string.js";
|
5
|
+
import "../../../../web3-validator/lib/esm/default_validator.js";
|
6
|
+
import "../../../../web3-types/lib/esm/data_format_types.js";
|
7
|
+
import "../../../../web3-types/lib/esm/eth_types.js";
|
8
|
+
import "../../../../web3-types/lib/esm/web3_base_provider.js";
|
9
|
+
import { RLP as x } from "../../../../@ethereumjs/rlp/dist/index.js";
|
10
|
+
import { MAX_INTEGER as w } from "./constants.js";
|
11
|
+
import { BaseTransaction as A } from "./baseTransaction.js";
|
12
|
+
import { getAccessListData as b, verifyAccessList as E, getDataFeeEIP2930 as T, getAccessListJSON as _ } from "./utils.js";
|
13
|
+
import { uint8ArrayToBigInt as h, toUint8Array as L, bigIntToUnpaddedUint8Array as r, ecrecover as O, bigIntToHex as n } from "../common/utils.js";
|
14
|
+
import { hexToBytes as N, bytesToHex as p } from "../../../../web3-utils/lib/esm/converters.js";
|
15
|
+
import { uint8ArrayEquals as C, uint8ArrayConcat as I } from "../../../../web3-utils/lib/esm/uint8array.js";
|
16
|
+
const v = 2, y = N(v.toString(16).padStart(2, "0"));
|
17
|
+
class d extends A {
|
18
|
+
/**
|
19
|
+
* This constructor takes the values, validates them, assigns them and freezes the object.
|
20
|
+
*
|
21
|
+
* It is not recommended to use this constructor directly. Instead use
|
22
|
+
* the static factory methods to assist in creating a Transaction object from
|
23
|
+
* varying data types.
|
24
|
+
*/
|
25
|
+
constructor(e, t = {}) {
|
26
|
+
var i;
|
27
|
+
super(Object.assign(Object.assign({}, e), { type: v }), t), this.DEFAULT_HARDFORK = "london";
|
28
|
+
const { chainId: a, accessList: s, maxFeePerGas: o, maxPriorityFeePerGas: c } = e;
|
29
|
+
if (this.common = this._getCommon(t.common, a), this.chainId = this.common.chainId(), !this.common.isActivatedEIP(1559))
|
30
|
+
throw new Error("EIP-1559 not enabled on Common");
|
31
|
+
this.activeCapabilities = this.activeCapabilities.concat([1559, 2718, 2930]);
|
32
|
+
const g = b(s ?? []);
|
33
|
+
if (this.accessList = g.accessList, this.AccessListJSON = g.AccessListJSON, E(this.accessList), this.maxFeePerGas = h(L(o === "" ? "0x" : o)), this.maxPriorityFeePerGas = h(L(c === "" ? "0x" : c)), this._validateCannotExceedMaxInteger({
|
34
|
+
maxFeePerGas: this.maxFeePerGas,
|
35
|
+
maxPriorityFeePerGas: this.maxPriorityFeePerGas
|
36
|
+
}), A._validateNotArray(e), this.gasLimit * this.maxFeePerGas > w) {
|
37
|
+
const m = this._errorMsg("gasLimit * maxFeePerGas cannot exceed MAX_INTEGER (2^256-1)");
|
38
|
+
throw new Error(m);
|
39
|
+
}
|
40
|
+
if (this.maxFeePerGas < this.maxPriorityFeePerGas) {
|
41
|
+
const m = this._errorMsg("maxFeePerGas cannot be less than maxPriorityFeePerGas (The total must be the larger of the two)");
|
42
|
+
throw new Error(m);
|
43
|
+
}
|
44
|
+
this._validateYParity(), this._validateHighS(), ((i = t == null ? void 0 : t.freeze) !== null && i !== void 0 ? i : !0) && Object.freeze(this);
|
45
|
+
}
|
46
|
+
/**
|
47
|
+
* Instantiate a transaction from a data dictionary.
|
48
|
+
*
|
49
|
+
* Format: { chainId, nonce, maxPriorityFeePerGas, maxFeePerGas, gasLimit, to, value, data,
|
50
|
+
* accessList, v, r, s }
|
51
|
+
*
|
52
|
+
* Notes:
|
53
|
+
* - `chainId` will be set automatically if not provided
|
54
|
+
* - All parameters are optional and have some basic default values
|
55
|
+
*/
|
56
|
+
static fromTxData(e, t = {}) {
|
57
|
+
return new d(e, t);
|
58
|
+
}
|
59
|
+
/**
|
60
|
+
* Instantiate a transaction from the serialized tx.
|
61
|
+
*
|
62
|
+
* Format: `0x02 || rlp([chainId, nonce, maxPriorityFeePerGas, maxFeePerGas, gasLimit, to, value, data,
|
63
|
+
* accessList, signatureYParity, signatureR, signatureS])`
|
64
|
+
*/
|
65
|
+
static fromSerializedTx(e, t = {}) {
|
66
|
+
if (!C(e.subarray(0, 1), y))
|
67
|
+
throw new Error(`Invalid serialized tx input: not an EIP-1559 transaction (wrong tx type, expected: ${v}, received: ${p(e.subarray(0, 1))}`);
|
68
|
+
const i = x.decode(e.subarray(1));
|
69
|
+
if (!Array.isArray(i))
|
70
|
+
throw new Error("Invalid serialized tx input: must be array");
|
71
|
+
return d.fromValuesArray(i, t);
|
72
|
+
}
|
73
|
+
/**
|
74
|
+
* Create a transaction from a values array.
|
75
|
+
*
|
76
|
+
* Format: `[chainId, nonce, maxPriorityFeePerGas, maxFeePerGas, gasLimit, to, value, data,
|
77
|
+
* accessList, signatureYParity, signatureR, signatureS]`
|
78
|
+
*/
|
79
|
+
static fromValuesArray(e, t = {}) {
|
80
|
+
if (e.length !== 9 && e.length !== 12)
|
81
|
+
throw new Error("Invalid EIP-1559 transaction. Only expecting 9 values (for unsigned tx) or 12 values (for signed tx).");
|
82
|
+
const [i, a, s, o, c, g, f, m, P, u, F, G] = e;
|
83
|
+
return this._validateNotArray({ chainId: i, v: u }), S({
|
84
|
+
nonce: a,
|
85
|
+
maxPriorityFeePerGas: s,
|
86
|
+
maxFeePerGas: o,
|
87
|
+
gasLimit: c,
|
88
|
+
value: f,
|
89
|
+
v: u,
|
90
|
+
r: F,
|
91
|
+
s: G
|
92
|
+
}), new d({
|
93
|
+
chainId: h(i),
|
94
|
+
nonce: a,
|
95
|
+
maxPriorityFeePerGas: s,
|
96
|
+
maxFeePerGas: o,
|
97
|
+
gasLimit: c,
|
98
|
+
to: g,
|
99
|
+
value: f,
|
100
|
+
data: m,
|
101
|
+
accessList: P ?? [],
|
102
|
+
v: u !== void 0 ? h(u) : void 0,
|
103
|
+
r: F,
|
104
|
+
s: G
|
105
|
+
}, t);
|
106
|
+
}
|
107
|
+
/**
|
108
|
+
* The amount of gas paid for the data in this tx
|
109
|
+
*/
|
110
|
+
getDataFee() {
|
111
|
+
if (this.cache.dataFee && this.cache.dataFee.hardfork === this.common.hardfork())
|
112
|
+
return this.cache.dataFee.value;
|
113
|
+
let e = super.getDataFee();
|
114
|
+
return e += BigInt(T(this.accessList, this.common)), Object.isFrozen(this) && (this.cache.dataFee = {
|
115
|
+
value: e,
|
116
|
+
hardfork: this.common.hardfork()
|
117
|
+
}), e;
|
118
|
+
}
|
119
|
+
/**
|
120
|
+
* The up front amount that an account must have for this transaction to be valid
|
121
|
+
* @param baseFee The base fee of the block (will be set to 0 if not provided)
|
122
|
+
*/
|
123
|
+
getUpfrontCost(e = BigInt(0)) {
|
124
|
+
const t = this.maxPriorityFeePerGas, i = this.maxFeePerGas - e, s = (t < i ? t : i) + e;
|
125
|
+
return this.gasLimit * s + this.value;
|
126
|
+
}
|
127
|
+
/**
|
128
|
+
* Returns a Uint8Array Array of the raw Uint8Arrays of the EIP-1559 transaction, in order.
|
129
|
+
*
|
130
|
+
* Format: `[chainId, nonce, maxPriorityFeePerGas, maxFeePerGas, gasLimit, to, value, data,
|
131
|
+
* accessList, signatureYParity, signatureR, signatureS]`
|
132
|
+
*
|
133
|
+
* Use {@link FeeMarketEIP1559Transaction.serialize} to add a transaction to a block
|
134
|
+
* with {@link Block.fromValuesArray}.
|
135
|
+
*
|
136
|
+
* For an unsigned tx this method uses the empty Uint8Array values for the
|
137
|
+
* signature parameters `v`, `r` and `s` for encoding. For an EIP-155 compliant
|
138
|
+
* representation for external signing use {@link FeeMarketEIP1559Transaction.getMessageToSign}.
|
139
|
+
*/
|
140
|
+
raw() {
|
141
|
+
return [
|
142
|
+
r(this.chainId),
|
143
|
+
r(this.nonce),
|
144
|
+
r(this.maxPriorityFeePerGas),
|
145
|
+
r(this.maxFeePerGas),
|
146
|
+
r(this.gasLimit),
|
147
|
+
this.to !== void 0 ? this.to.buf : Uint8Array.from([]),
|
148
|
+
r(this.value),
|
149
|
+
this.data,
|
150
|
+
this.accessList,
|
151
|
+
this.v !== void 0 ? r(this.v) : Uint8Array.from([]),
|
152
|
+
this.r !== void 0 ? r(this.r) : Uint8Array.from([]),
|
153
|
+
this.s !== void 0 ? r(this.s) : Uint8Array.from([])
|
154
|
+
];
|
155
|
+
}
|
156
|
+
/**
|
157
|
+
* Returns the serialized encoding of the EIP-1559 transaction.
|
158
|
+
*
|
159
|
+
* Format: `0x02 || rlp([chainId, nonce, maxPriorityFeePerGas, maxFeePerGas, gasLimit, to, value, data,
|
160
|
+
* accessList, signatureYParity, signatureR, signatureS])`
|
161
|
+
*
|
162
|
+
* Note that in contrast to the legacy tx serialization format this is not
|
163
|
+
* valid RLP any more due to the raw tx type preceding and concatenated to
|
164
|
+
* the RLP encoding of the values.
|
165
|
+
*/
|
166
|
+
serialize() {
|
167
|
+
const e = this.raw();
|
168
|
+
return I(y, x.encode(e));
|
169
|
+
}
|
170
|
+
/**
|
171
|
+
* Returns the serialized unsigned tx (hashed or raw), which can be used
|
172
|
+
* to sign the transaction (e.g. for sending to a hardware wallet).
|
173
|
+
*
|
174
|
+
* Note: in contrast to the legacy tx the raw message format is already
|
175
|
+
* serialized and doesn't need to be RLP encoded any more.
|
176
|
+
*
|
177
|
+
* ```javascript
|
178
|
+
* const serializedMessage = tx.getMessageToSign(false) // use this for the HW wallet input
|
179
|
+
* ```
|
180
|
+
*
|
181
|
+
* @param hashMessage - Return hashed message if set to true (default: true)
|
182
|
+
*/
|
183
|
+
getMessageToSign(e = !0) {
|
184
|
+
const t = this.raw().slice(0, 9), i = I(y, x.encode(t));
|
185
|
+
return e ? l(i) : i;
|
186
|
+
}
|
187
|
+
/**
|
188
|
+
* Computes a sha3-256 hash of the serialized tx.
|
189
|
+
*
|
190
|
+
* This method can only be used for signed txs (it throws otherwise).
|
191
|
+
* Use {@link FeeMarketEIP1559Transaction.getMessageToSign} to get a tx hash for the purpose of signing.
|
192
|
+
*/
|
193
|
+
hash() {
|
194
|
+
if (!this.isSigned()) {
|
195
|
+
const e = this._errorMsg("Cannot call hash method if transaction is not signed");
|
196
|
+
throw new Error(e);
|
197
|
+
}
|
198
|
+
return Object.isFrozen(this) ? (this.cache.hash || (this.cache.hash = l(this.serialize())), this.cache.hash) : l(this.serialize());
|
199
|
+
}
|
200
|
+
/**
|
201
|
+
* Computes a sha3-256 hash which can be used to verify the signature
|
202
|
+
*/
|
203
|
+
getMessageToVerifySignature() {
|
204
|
+
return this.getMessageToSign();
|
205
|
+
}
|
206
|
+
/**
|
207
|
+
* Returns the public key of the sender
|
208
|
+
*/
|
209
|
+
getSenderPublicKey() {
|
210
|
+
if (!this.isSigned()) {
|
211
|
+
const s = this._errorMsg("Cannot call this method if transaction is not signed");
|
212
|
+
throw new Error(s);
|
213
|
+
}
|
214
|
+
const e = this.getMessageToVerifySignature(), { v: t, r: i, s: a } = this;
|
215
|
+
this._validateHighS();
|
216
|
+
try {
|
217
|
+
return O(
|
218
|
+
e,
|
219
|
+
t + BigInt(27),
|
220
|
+
// Recover the 27 which was stripped from ecsign
|
221
|
+
r(i),
|
222
|
+
r(a)
|
223
|
+
);
|
224
|
+
} catch {
|
225
|
+
const o = this._errorMsg("Invalid Signature");
|
226
|
+
throw new Error(o);
|
227
|
+
}
|
228
|
+
}
|
229
|
+
_processSignature(e, t, i) {
|
230
|
+
const a = Object.assign(Object.assign({}, this.txOptions), { common: this.common });
|
231
|
+
return d.fromTxData({
|
232
|
+
chainId: this.chainId,
|
233
|
+
nonce: this.nonce,
|
234
|
+
maxPriorityFeePerGas: this.maxPriorityFeePerGas,
|
235
|
+
maxFeePerGas: this.maxFeePerGas,
|
236
|
+
gasLimit: this.gasLimit,
|
237
|
+
to: this.to,
|
238
|
+
value: this.value,
|
239
|
+
data: this.data,
|
240
|
+
accessList: this.accessList,
|
241
|
+
v: e - BigInt(27),
|
242
|
+
r: h(t),
|
243
|
+
s: h(i)
|
244
|
+
}, a);
|
245
|
+
}
|
246
|
+
/**
|
247
|
+
* Returns an object with the JSON representation of the transaction
|
248
|
+
*/
|
249
|
+
toJSON() {
|
250
|
+
const e = _(this.accessList);
|
251
|
+
return {
|
252
|
+
chainId: n(this.chainId),
|
253
|
+
nonce: n(this.nonce),
|
254
|
+
maxPriorityFeePerGas: n(this.maxPriorityFeePerGas),
|
255
|
+
maxFeePerGas: n(this.maxFeePerGas),
|
256
|
+
gasLimit: n(this.gasLimit),
|
257
|
+
to: this.to !== void 0 ? this.to.toString() : void 0,
|
258
|
+
value: n(this.value),
|
259
|
+
data: p(this.data),
|
260
|
+
accessList: e,
|
261
|
+
v: this.v !== void 0 ? n(this.v) : void 0,
|
262
|
+
r: this.r !== void 0 ? n(this.r) : void 0,
|
263
|
+
s: this.s !== void 0 ? n(this.s) : void 0
|
264
|
+
};
|
265
|
+
}
|
266
|
+
/**
|
267
|
+
* Return a compact error string representation of the object
|
268
|
+
*/
|
269
|
+
errorStr() {
|
270
|
+
let e = this._getSharedErrorPostfix();
|
271
|
+
return e += ` maxFeePerGas=${this.maxFeePerGas} maxPriorityFeePerGas=${this.maxPriorityFeePerGas}`, e;
|
272
|
+
}
|
273
|
+
/**
|
274
|
+
* Internal helper function to create an annotated error message
|
275
|
+
*
|
276
|
+
* @param msg Base error message
|
277
|
+
* @hidden
|
278
|
+
*/
|
279
|
+
_errorMsg(e) {
|
280
|
+
return `${e} (${this.errorStr()})`;
|
281
|
+
}
|
282
|
+
}
|
283
|
+
export {
|
284
|
+
d as FeeMarketEIP1559Transaction
|
285
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../../../../ethereum-cryptography/esm/keccak.cjs");require("../../../../web3-errors/lib/esm/errors/rpc_errors.cjs");require("../../../../web3-validator/lib/esm/formats.cjs");const S=require("../../../../web3-validator/lib/esm/validation/string.cjs");require("../../../../web3-validator/lib/esm/default_validator.cjs");require("../../../../web3-types/lib/esm/data_format_types.cjs");require("../../../../web3-types/lib/esm/eth_types.cjs");require("../../../../web3-types/lib/esm/web3_base_provider.cjs");const m=require("../../../../@ethereumjs/rlp/dist/index.cjs"),x=require("./constants.cjs"),d=require("./utils.cjs"),i=require("../common/utils.cjs"),L=require("./baseTransaction.cjs"),v=require("../../../../web3-utils/lib/esm/converters.cjs"),y=require("../../../../web3-utils/lib/esm/uint8array.cjs"),A=1,I=v.hexToBytes(A.toString(16).padStart(2,"0"));class o extends L.BaseTransaction{constructor(t,e={}){var s;super(Object.assign(Object.assign({},t),{type:A}),e),this.DEFAULT_HARDFORK="berlin";const{chainId:n,accessList:r,gasPrice:a}=t;if(this.common=this._getCommon(e.common,n),this.chainId=this.common.chainId(),!this.common.isActivatedEIP(2930))throw new Error("EIP-2930 not enabled on Common");this.activeCapabilities=this.activeCapabilities.concat([2718,2930]);const c=d.getAccessListData(r??[]);if(this.accessList=c.accessList,this.AccessListJSON=c.AccessListJSON,d.verifyAccessList(this.accessList),this.gasPrice=i.uint8ArrayToBigInt(i.toUint8Array(a===""?"0x":a)),this._validateCannotExceedMaxInteger({gasPrice:this.gasPrice}),L.BaseTransaction._validateNotArray(t),this.gasPrice*this.gasLimit>x.MAX_INTEGER){const u=this._errorMsg("gasLimit * gasPrice cannot exceed MAX_INTEGER");throw new Error(u)}this._validateYParity(),this._validateHighS(),((s=e==null?void 0:e.freeze)!==null&&s!==void 0?s:!0)&&Object.freeze(this)}static fromTxData(t,e={}){return new o(t,e)}static fromSerializedTx(t,e={}){if(!y.uint8ArrayEquals(t.subarray(0,1),I))throw new Error(`Invalid serialized tx input: not an EIP-2930 transaction (wrong tx type, expected: ${A}, received: ${v.bytesToHex(t.subarray(0,1))}`);const s=m.RLP.decode(Uint8Array.from(t.subarray(1)));if(!Array.isArray(s))throw new Error("Invalid serialized tx input: must be array");return o.fromValuesArray(s,e)}static fromValuesArray(t,e={}){if(t.length!==8&&t.length!==11)throw new Error("Invalid EIP-2930 transaction. Only expecting 8 values (for unsigned tx) or 11 values (for signed tx).");const[s,n,r,a,c,g,u,l,h,T,b]=t;this._validateNotArray({chainId:s,v:h}),S.validateNoLeadingZeroes({nonce:n,gasPrice:r,gasLimit:a,value:g,v:h,r:T,s:b});const U=[];return new o({chainId:i.uint8ArrayToBigInt(s),nonce:n,gasPrice:r,gasLimit:a,to:c,value:g,data:u,accessList:l??U,v:h!==void 0?i.uint8ArrayToBigInt(h):void 0,r:T,s:b},e)}getDataFee(){if(this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork())return this.cache.dataFee.value;let t=super.getDataFee();return t+=BigInt(d.getDataFeeEIP2930(this.accessList,this.common)),Object.isFrozen(this)&&(this.cache.dataFee={value:t,hardfork:this.common.hardfork()}),t}getUpfrontCost(){return this.gasLimit*this.gasPrice+this.value}raw(){return[i.bigIntToUnpaddedUint8Array(this.chainId),i.bigIntToUnpaddedUint8Array(this.nonce),i.bigIntToUnpaddedUint8Array(this.gasPrice),i.bigIntToUnpaddedUint8Array(this.gasLimit),this.to!==void 0?this.to.buf:Uint8Array.from([]),i.bigIntToUnpaddedUint8Array(this.value),this.data,this.accessList,this.v!==void 0?i.bigIntToUnpaddedUint8Array(this.v):Uint8Array.from([]),this.r!==void 0?i.bigIntToUnpaddedUint8Array(this.r):Uint8Array.from([]),this.s!==void 0?i.bigIntToUnpaddedUint8Array(this.s):Uint8Array.from([])]}serialize(){const t=this.raw();return y.uint8ArrayConcat(I,m.RLP.encode(t))}getMessageToSign(t=!0){const e=this.raw().slice(0,8),s=y.uint8ArrayConcat(I,m.RLP.encode(e));return t?f.keccak256(s):s}hash(){if(!this.isSigned()){const t=this._errorMsg("Cannot call hash method if transaction is not signed");throw new Error(t)}return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=f.keccak256(this.serialize())),this.cache.hash):f.keccak256(this.serialize())}getMessageToVerifySignature(){return this.getMessageToSign()}getSenderPublicKey(){if(!this.isSigned()){const r=this._errorMsg("Cannot call this method if transaction is not signed");throw new Error(r)}const t=this.getMessageToVerifySignature(),{v:e,r:s,s:n}=this;this._validateHighS();try{return i.ecrecover(t,e+BigInt(27),i.bigIntToUnpaddedUint8Array(s),i.bigIntToUnpaddedUint8Array(n))}catch{const a=this._errorMsg("Invalid Signature");throw new Error(a)}}_processSignature(t,e,s){const n=Object.assign(Object.assign({},this.txOptions),{common:this.common});return o.fromTxData({chainId:this.chainId,nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:t-BigInt(27),r:i.uint8ArrayToBigInt(e),s:i.uint8ArrayToBigInt(s)},n)}toJSON(){const t=d.getAccessListJSON(this.accessList);return{chainId:i.bigIntToHex(this.chainId),nonce:i.bigIntToHex(this.nonce),gasPrice:i.bigIntToHex(this.gasPrice),gasLimit:i.bigIntToHex(this.gasLimit),to:this.to!==void 0?this.to.toString():void 0,value:i.bigIntToHex(this.value),data:v.bytesToHex(this.data),accessList:t,v:this.v!==void 0?i.bigIntToHex(this.v):void 0,r:this.r!==void 0?i.bigIntToHex(this.r):void 0,s:this.s!==void 0?i.bigIntToHex(this.s):void 0}}errorStr(){var t,e;let s=this._getSharedErrorPostfix();return s+=` gasPrice=${this.gasPrice} accessListCount=${(e=(t=this.accessList)===null||t===void 0?void 0:t.length)!==null&&e!==void 0?e:0}`,s}_errorMsg(t){return`${t} (${this.errorStr()})`}}exports.AccessListEIP2930Transaction=o;
|