@ozdao/prometheus-framework 0.1.63 → 0.1.67
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/_virtual/_commonjsHelpers.cjs +1 -1
- package/dist/_virtual/_commonjsHelpers.js +5 -3
- package/dist/_virtual/browser-ponyfill.cjs +1 -0
- package/dist/_virtual/browser-ponyfill.js +4 -0
- package/dist/_virtual/crc32.cjs +1 -0
- package/dist/_virtual/crc32.js +4 -0
- package/dist/_virtual/events.cjs +1 -0
- package/dist/_virtual/events.js +4 -0
- package/dist/_virtual/index.cjs +1 -0
- package/dist/_virtual/index.js +4 -0
- package/dist/node_modules/@adraffy/ens-normalize/dist/index.cjs +1 -0
- package/dist/node_modules/@adraffy/ens-normalize/dist/index.js +557 -0
- package/dist/node_modules/@ethereumjs/rlp/dist/index.cjs +1 -0
- package/dist/node_modules/@ethereumjs/rlp/dist/index.js +164 -0
- package/dist/node_modules/@noble/curves/esm/_shortw_utils.cjs +1 -0
- package/dist/node_modules/@noble/curves/esm/_shortw_utils.js +19 -0
- package/dist/node_modules/@noble/curves/esm/abstract/curve.cjs +1 -0
- package/dist/node_modules/@noble/curves/esm/abstract/curve.js +88 -0
- package/dist/node_modules/@noble/curves/esm/abstract/modular.cjs +1 -0
- package/dist/node_modules/@noble/curves/esm/abstract/modular.js +210 -0
- package/dist/node_modules/@noble/curves/esm/abstract/utils.cjs +1 -0
- package/dist/node_modules/@noble/curves/esm/abstract/utils.js +178 -0
- package/dist/node_modules/@noble/curves/esm/abstract/weierstrass.cjs +1 -0
- package/dist/node_modules/@noble/curves/esm/abstract/weierstrass.js +581 -0
- package/dist/node_modules/@noble/curves/esm/secp256k1.cjs +1 -0
- package/dist/node_modules/@noble/curves/esm/secp256k1.js +47 -0
- package/dist/node_modules/@noble/hashes/esm/_assert.cjs +1 -0
- package/dist/node_modules/@noble/hashes/esm/_assert.js +48 -0
- package/dist/node_modules/@noble/hashes/esm/_sha2.cjs +1 -0
- package/dist/node_modules/@noble/hashes/esm/_sha2.js +61 -0
- package/dist/node_modules/@noble/hashes/esm/_u64.cjs +1 -0
- package/dist/node_modules/@noble/hashes/esm/_u64.js +48 -0
- package/dist/node_modules/@noble/hashes/esm/crypto.cjs +1 -0
- package/dist/node_modules/@noble/hashes/esm/crypto.js +4 -0
- package/dist/node_modules/@noble/hashes/esm/hmac.cjs +1 -0
- package/dist/node_modules/@noble/hashes/esm/hmac.js +43 -0
- package/dist/node_modules/@noble/hashes/esm/pbkdf2.cjs +1 -0
- package/dist/node_modules/@noble/hashes/esm/pbkdf2.js +32 -0
- package/dist/node_modules/@noble/hashes/esm/scrypt.cjs +1 -0
- package/dist/node_modules/@noble/hashes/esm/scrypt.js +73 -0
- package/dist/node_modules/@noble/hashes/esm/sha256.cjs +1 -0
- package/dist/node_modules/@noble/hashes/esm/sha256.js +120 -0
- package/dist/node_modules/@noble/hashes/esm/sha3.cjs +1 -0
- package/dist/node_modules/@noble/hashes/esm/sha3.js +118 -0
- package/dist/node_modules/@noble/hashes/esm/sha512.cjs +1 -0
- package/dist/node_modules/@noble/hashes/esm/sha512.js +144 -0
- package/dist/node_modules/@noble/hashes/esm/utils.cjs +1 -0
- package/dist/node_modules/@noble/hashes/esm/utils.js +64 -0
- package/dist/node_modules/abitype/dist/chunk-NHABU752.cjs +1 -0
- package/dist/node_modules/abitype/dist/chunk-NHABU752.js +4 -0
- package/dist/node_modules/abitype/dist/chunk-WP7KDV47.cjs +1 -0
- package/dist/node_modules/abitype/dist/chunk-WP7KDV47.js +11 -0
- package/dist/node_modules/abitype/dist/index.cjs +2 -0
- package/dist/node_modules/abitype/dist/index.js +299 -0
- package/dist/node_modules/crc-32/crc32.cjs +1 -0
- package/dist/node_modules/crc-32/crc32.js +51 -0
- package/dist/node_modules/cross-fetch/dist/browser-ponyfill.cjs +2 -0
- package/dist/node_modules/cross-fetch/dist/browser-ponyfill.js +320 -0
- package/dist/node_modules/ethereum-cryptography/esm/aes.cjs +1 -0
- package/dist/node_modules/ethereum-cryptography/esm/aes.js +61 -0
- package/dist/node_modules/ethereum-cryptography/esm/keccak.cjs +1 -0
- package/dist/node_modules/ethereum-cryptography/esm/keccak.js +9 -0
- package/dist/node_modules/ethereum-cryptography/esm/pbkdf2.cjs +1 -0
- package/dist/node_modules/ethereum-cryptography/esm/pbkdf2.js +15 -0
- package/dist/node_modules/ethereum-cryptography/esm/random.cjs +1 -0
- package/dist/node_modules/ethereum-cryptography/esm/random.js +7 -0
- package/dist/node_modules/ethereum-cryptography/esm/scrypt.cjs +1 -0
- package/dist/node_modules/ethereum-cryptography/esm/scrypt.js +8 -0
- package/dist/node_modules/ethereum-cryptography/esm/secp256k1.cjs +1 -0
- package/dist/node_modules/ethereum-cryptography/esm/secp256k1.js +4 -0
- package/dist/node_modules/ethereum-cryptography/esm/utils.cjs +1 -0
- package/dist/node_modules/ethereum-cryptography/esm/utils.js +35 -0
- package/dist/node_modules/events/events.cjs +1 -0
- package/dist/node_modules/events/events.js +229 -0
- package/dist/node_modules/isomorphic-ws/browser.cjs +1 -0
- package/dist/node_modules/isomorphic-ws/browser.js +6 -0
- package/dist/node_modules/setimmediate/setImmediate.cjs +1 -0
- package/dist/node_modules/setimmediate/setImmediate.js +99 -0
- package/dist/node_modules/web3/lib/esm/abi.cjs +1 -0
- package/dist/node_modules/web3/lib/esm/abi.js +24 -0
- package/dist/node_modules/web3/lib/esm/accounts.cjs +1 -0
- package/dist/node_modules/web3/lib/esm/accounts.js +101 -0
- package/dist/node_modules/web3/lib/esm/index.cjs +1 -0
- package/dist/node_modules/web3/lib/esm/index.js +76 -0
- package/dist/node_modules/web3/lib/esm/version.cjs +1 -0
- package/dist/node_modules/web3/lib/esm/version.js +4 -0
- package/dist/node_modules/web3/lib/esm/web3.cjs +1 -0
- package/dist/node_modules/web3/lib/esm/web3.js +89 -0
- package/dist/node_modules/web3-core/lib/esm/utils.cjs +1 -0
- package/dist/node_modules/web3-core/lib/esm/utils.js +14 -0
- package/dist/node_modules/web3-core/lib/esm/web3_batch_request.cjs +1 -0
- package/dist/node_modules/web3-core/lib/esm/web3_batch_request.js +83 -0
- package/dist/node_modules/web3-core/lib/esm/web3_config.cjs +1 -0
- package/dist/node_modules/web3-core/lib/esm/web3_config.js +343 -0
- package/dist/node_modules/web3-core/lib/esm/web3_context.cjs +1 -0
- package/dist/node_modules/web3-core/lib/esm/web3_context.js +227 -0
- package/dist/node_modules/web3-core/lib/esm/web3_event_emitter.cjs +1 -0
- package/dist/node_modules/web3-core/lib/esm/web3_event_emitter.js +39 -0
- package/dist/node_modules/web3-core/lib/esm/web3_promi_event.cjs +1 -0
- package/dist/node_modules/web3-core/lib/esm/web3_promi_event.js +58 -0
- package/dist/node_modules/web3-core/lib/esm/web3_request_manager.cjs +1 -0
- package/dist/node_modules/web3-core/lib/esm/web3_request_manager.js +240 -0
- package/dist/node_modules/web3-core/lib/esm/web3_subscription_manager.cjs +1 -0
- package/dist/node_modules/web3-core/lib/esm/web3_subscription_manager.js +155 -0
- package/dist/node_modules/web3-core/lib/esm/web3_subscriptions.cjs +1 -0
- package/dist/node_modules/web3-core/lib/esm/web3_subscriptions.js +111 -0
- package/dist/node_modules/web3-errors/lib/esm/error_codes.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/error_codes.js +106 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/account_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/account_errors.js +58 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/connection_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/connection_errors.js +37 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/contract_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/contract_errors.js +49 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/core_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/core_errors.js +16 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/ens_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/ens_errors.js +16 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/generic_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/generic_errors.js +49 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/provider_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/provider_errors.js +28 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/response_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/response_errors.js +30 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/rpc_error_messages.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/rpc_error_messages.js +161 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/rpc_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/rpc_errors.js +129 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/schema_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/schema_errors.js +13 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/signature_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/signature_errors.js +10 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/transaction_errors.cjs +5 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/transaction_errors.js +256 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/utils_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/utils_errors.js +76 -0
- package/dist/node_modules/web3-errors/lib/esm/web3_error_base.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/web3_error_base.js +28 -0
- package/dist/node_modules/web3-eth/lib/esm/constants.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/constants.js +14 -0
- package/dist/node_modules/web3-eth/lib/esm/rpc_method_wrappers.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/rpc_method_wrappers.js +413 -0
- package/dist/node_modules/web3-eth/lib/esm/schemas.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/schemas.js +570 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/decode_signed_transaction.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/decode_signed_transaction.js +31 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/decoding.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/decoding.js +34 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/detect_transaction_type.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/detect_transaction_type.js +90 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/format_transaction.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/format_transaction.js +30 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/get_revert_reason.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/get_revert_reason.js +77 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/get_transaction_error.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/get_transaction_error.js +50 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/get_transaction_gas_pricing.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/get_transaction_gas_pricing.js +79 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/prepare_transaction_for_signing.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/prepare_transaction_for_signing.js +102 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/reject_if_block_timeout.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/reject_if_block_timeout.js +109 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/send_tx_helper.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/send_tx_helper.js +143 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/transaction_builder.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/transaction_builder.js +131 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/try_send_transaction.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/try_send_transaction.js +52 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/wait_for_transaction_receipt.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/wait_for_transaction_receipt.js +61 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_pooling.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_pooling.js +51 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_subscription.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_subscription.js +77 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_for_confirmations.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_for_confirmations.js +42 -0
- package/dist/node_modules/web3-eth/lib/esm/validation.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/validation.js +111 -0
- package/dist/node_modules/web3-eth/lib/esm/web3_eth.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/web3_eth.js +1512 -0
- package/dist/node_modules/web3-eth/lib/esm/web3_subscriptions.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/web3_subscriptions.js +65 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/api/errors_api.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/api/errors_api.js +13 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/api/events_api.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/api/events_api.js +13 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/api/functions_api.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/api/functions_api.js +20 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/api/logs_api.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/api/logs_api.js +14 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/api/parameters_api.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/api/parameters_api.js +22 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/address.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/address.js +47 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/array.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/array.js +72 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/bool.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/bool.js +37 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/bytes.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/bytes.js +66 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/index.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/index.js +59 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/number.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/number.js +85 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/numbersLimits.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/numbersLimits.js +15 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/string.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/string.js +22 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/tuple.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/tuple.js +77 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/utils.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/utils.js +15 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/decode.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/decode.js +16 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/encode.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/encode.js +23 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/utils.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/utils.js +58 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/decode_contract_error_data.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/decode_contract_error_data.js +18 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/utils.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/utils.js +39 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/account.cjs +2 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/account.js +219 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/chains/goerli.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/chains/goerli.js +99 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/chains/mainnet.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/chains/mainnet.js +115 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/chains/sepolia.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/chains/sepolia.js +102 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/common.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/common.js +741 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/1153.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/1153.js +25 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/1559.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/1559.js +29 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2315.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2315.js +28 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2537.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2537.js +181 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2565.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2565.js +20 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2718.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2718.js +14 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2929.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2929.js +87 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2930.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2930.js +24 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3198.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3198.js +20 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3529.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3529.js +29 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3540.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3540.js +16 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3541.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3541.js +15 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3554.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3554.js +20 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3607.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3607.js +16 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3651.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3651.js +16 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3670.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3670.js +16 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3675.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3675.js +16 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3855.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3855.js +21 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3860.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3860.js +26 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/4345.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/4345.js +20 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/4399.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/4399.js +16 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/5133.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/5133.js +20 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/index.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/index.js +49 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/enums.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/enums.js +27 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/arrowGlacier.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/arrowGlacier.js +14 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/berlin.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/berlin.js +10 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/byzantium.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/byzantium.js +59 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/chainstart.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/chainstart.js +441 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/constantinople.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/constantinople.js +71 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/dao.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/dao.js +13 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/grayGlacier.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/grayGlacier.js +14 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/homestead.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/homestead.js +18 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/index.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/index.js +39 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/istanbul.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/istanbul.js +90 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/london.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/london.js +10 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/merge.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/merge.js +15 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/mergeForkIdTransition.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/mergeForkIdTransition.js +10 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/muirGlacier.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/muirGlacier.js +18 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/petersburg.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/petersburg.js +42 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/shanghai.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/shanghai.js +10 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/spuriousDragon.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/spuriousDragon.js +23 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/tangerineWhistle.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/tangerineWhistle.js +46 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/types.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/types.js +7 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/utils.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/utils.js +277 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/schemas.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/schemas.js +25 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/address.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/address.js +57 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/baseTransaction.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/baseTransaction.js +272 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/constants.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/constants.js +11 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/eip1559Transaction.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/eip1559Transaction.js +285 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/eip2930Transaction.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/eip2930Transaction.js +268 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/legacyTransaction.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/legacyTransaction.js +256 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/transactionFactory.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/transactionFactory.js +89 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/types.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/types.js +18 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/utils.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/utils.js +80 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/wallet.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/wallet.js +361 -0
- package/dist/node_modules/web3-eth-contract/lib/esm/contract.cjs +1 -0
- package/dist/node_modules/web3-eth-contract/lib/esm/contract.js +510 -0
- package/dist/node_modules/web3-eth-contract/lib/esm/encoding.cjs +1 -0
- package/dist/node_modules/web3-eth-contract/lib/esm/encoding.js +80 -0
- package/dist/node_modules/web3-eth-contract/lib/esm/index.cjs +1 -0
- package/dist/node_modules/web3-eth-contract/lib/esm/index.js +27 -0
- package/dist/node_modules/web3-eth-contract/lib/esm/log_subscription.cjs +1 -0
- package/dist/node_modules/web3-eth-contract/lib/esm/log_subscription.js +36 -0
- package/dist/node_modules/web3-eth-contract/lib/esm/utils.cjs +1 -0
- package/dist/node_modules/web3-eth-contract/lib/esm/utils.js +90 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/abi/ens/ENSRegistry.cjs +1 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/abi/ens/ENSRegistry.js +168 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/abi/ens/PublicResolver.cjs +1 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/abi/ens/PublicResolver.js +578 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/config.cjs +1 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/config.js +27 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/ens.cjs +1 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/ens.js +241 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/registry.cjs +1 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/registry.js +105 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/resolver.cjs +1 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/resolver.js +95 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/utils.cjs +1 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/utils.js +19 -0
- package/dist/node_modules/web3-eth-iban/lib/esm/iban.cjs +1 -0
- package/dist/node_modules/web3-eth-iban/lib/esm/iban.js +283 -0
- package/dist/node_modules/web3-eth-personal/lib/esm/personal.cjs +1 -0
- package/dist/node_modules/web3-eth-personal/lib/esm/personal.js +265 -0
- package/dist/node_modules/web3-eth-personal/lib/esm/rpc_method_wrappers.cjs +1 -0
- package/dist/node_modules/web3-eth-personal/lib/esm/rpc_method_wrappers.js +93 -0
- package/dist/node_modules/web3-net/lib/esm/net.cjs +1 -0
- package/dist/node_modules/web3-net/lib/esm/net.js +97 -0
- package/dist/node_modules/web3-net/lib/esm/rpc_method_wrappers.cjs +1 -0
- package/dist/node_modules/web3-net/lib/esm/rpc_method_wrappers.js +51 -0
- package/dist/node_modules/web3-providers-http/lib/esm/index.cjs +1 -0
- package/dist/node_modules/web3-providers-http/lib/esm/index.js +98 -0
- package/dist/node_modules/web3-providers-ws/lib/esm/index.cjs +1 -0
- package/dist/node_modules/web3-providers-ws/lib/esm/index.js +70 -0
- package/dist/node_modules/web3-rpc-methods/lib/esm/eth_rpc_methods.cjs +1 -0
- package/dist/node_modules/web3-rpc-methods/lib/esm/eth_rpc_methods.js +407 -0
- package/dist/node_modules/web3-rpc-methods/lib/esm/net_rpc_methods.cjs +1 -0
- package/dist/node_modules/web3-rpc-methods/lib/esm/net_rpc_methods.js +56 -0
- package/dist/node_modules/web3-rpc-methods/lib/esm/personal_rpc_methods.cjs +1 -0
- package/dist/node_modules/web3-rpc-methods/lib/esm/personal_rpc_methods.js +84 -0
- package/dist/node_modules/web3-types/lib/esm/data_format_types.cjs +1 -0
- package/dist/node_modules/web3-types/lib/esm/data_format_types.js +15 -0
- package/dist/node_modules/web3-types/lib/esm/eth_types.cjs +1 -0
- package/dist/node_modules/web3-types/lib/esm/eth_types.js +12 -0
- package/dist/node_modules/web3-types/lib/esm/primitives_types.cjs +1 -0
- package/dist/node_modules/web3-types/lib/esm/primitives_types.js +4 -0
- package/dist/node_modules/web3-types/lib/esm/web3_base_provider.cjs +1 -0
- package/dist/node_modules/web3-types/lib/esm/web3_base_provider.js +89 -0
- package/dist/node_modules/web3-types/lib/esm/web3_base_wallet.cjs +1 -0
- package/dist/node_modules/web3-types/lib/esm/web3_base_wallet.js +8 -0
- package/dist/node_modules/web3-utils/lib/esm/chunk_response_parser.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/chunk_response_parser.js +37 -0
- package/dist/node_modules/web3-utils/lib/esm/converters.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/converters.js +177 -0
- package/dist/node_modules/web3-utils/lib/esm/event_emitter.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/event_emitter.js +91 -0
- package/dist/node_modules/web3-utils/lib/esm/formatter.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/formatter.js +134 -0
- package/dist/node_modules/web3-utils/lib/esm/hash.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/hash.js +107 -0
- package/dist/node_modules/web3-utils/lib/esm/index.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/index.js +107 -0
- package/dist/node_modules/web3-utils/lib/esm/json_rpc.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/json_rpc.js +41 -0
- package/dist/node_modules/web3-utils/lib/esm/objects.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/objects.js +20 -0
- package/dist/node_modules/web3-utils/lib/esm/promise_helpers.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/promise_helpers.js +104 -0
- package/dist/node_modules/web3-utils/lib/esm/random.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/random.js +7 -0
- package/dist/node_modules/web3-utils/lib/esm/socket_provider.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/socket_provider.js +195 -0
- package/dist/node_modules/web3-utils/lib/esm/string_manipulation.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/string_manipulation.js +48 -0
- package/dist/node_modules/web3-utils/lib/esm/uint8array.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/uint8array.js +21 -0
- package/dist/node_modules/web3-utils/lib/esm/uuid.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/uuid.js +17 -0
- package/dist/node_modules/web3-utils/lib/esm/validation.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/validation.js +50 -0
- package/dist/node_modules/web3-utils/lib/esm/web3_deferred_promise.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/web3_deferred_promise.js +114 -0
- package/dist/node_modules/web3-utils/lib/esm/web3_eip1193_provider.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/web3_eip1193_provider.js +86 -0
- package/dist/node_modules/web3-validator/lib/esm/constants.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/constants.js +4 -0
- package/dist/node_modules/web3-validator/lib/esm/default_validator.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/default_validator.js +5 -0
- package/dist/node_modules/web3-validator/lib/esm/errors.cjs +3 -0
- package/dist/node_modules/web3-validator/lib/esm/errors.js +17 -0
- package/dist/node_modules/web3-validator/lib/esm/formats.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/formats.js +31 -0
- package/dist/node_modules/web3-validator/lib/esm/utils.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/utils.js +178 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/abi.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/abi.js +4 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/address.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/address.js +22 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/block.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/block.js +10 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/bloom.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/bloom.js +29 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/boolean.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/boolean.js +5 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/bytes.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/bytes.js +27 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/filter.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/filter.js +26 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/numbers.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/numbers.js +52 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/object.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/object.js +13 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/string.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/string.js +23 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/topic.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/topic.js +6 -0
- package/dist/node_modules/web3-validator/lib/esm/validator.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validator.js +84 -0
- package/dist/node_modules/web3-validator/lib/esm/web3_validator.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/web3_validator.js +31 -0
- package/dist/node_modules/zod/lib/index.cjs +1 -0
- package/dist/node_modules/zod/lib/index.js +2854 -0
- package/dist/prometheus-framework/node_modules/axios/lib/adapters/adapters.cjs +3 -0
- package/dist/prometheus-framework/node_modules/axios/lib/adapters/adapters.js +51 -0
- package/dist/prometheus-framework/node_modules/axios/lib/adapters/xhr.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/adapters/xhr.js +105 -79
- package/dist/prometheus-framework/node_modules/axios/lib/axios.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/axios.js +41 -35
- package/dist/prometheus-framework/node_modules/axios/lib/cancel/CancelToken.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/cancel/CancelToken.js +57 -44
- package/dist/prometheus-framework/node_modules/axios/lib/cancel/CanceledError.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/cancel/CanceledError.js +8 -15
- package/dist/prometheus-framework/node_modules/axios/lib/cancel/isCancel.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/cancel/isCancel.js +3 -6
- package/dist/prometheus-framework/node_modules/axios/lib/core/Axios.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/core/Axios.js +101 -72
- package/dist/prometheus-framework/node_modules/axios/lib/core/AxiosError.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/core/AxiosError.js +19 -19
- package/dist/prometheus-framework/node_modules/axios/lib/core/AxiosHeaders.cjs +2 -0
- package/dist/prometheus-framework/node_modules/axios/lib/core/AxiosHeaders.js +165 -0
- package/dist/prometheus-framework/node_modules/axios/lib/core/InterceptorManager.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/core/InterceptorManager.js +56 -22
- package/dist/prometheus-framework/node_modules/axios/lib/core/buildFullPath.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/core/buildFullPath.js +6 -6
- package/dist/prometheus-framework/node_modules/axios/lib/core/dispatchRequest.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/core/dispatchRequest.js +23 -38
- package/dist/prometheus-framework/node_modules/axios/lib/core/mergeConfig.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/core/mergeConfig.js +62 -58
- package/dist/prometheus-framework/node_modules/axios/lib/core/settle.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/core/settle.js +11 -18
- package/dist/prometheus-framework/node_modules/axios/lib/core/transformData.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/core/transformData.js +11 -9
- package/dist/prometheus-framework/node_modules/axios/lib/defaults/index.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/defaults/index.js +49 -48
- package/dist/prometheus-framework/node_modules/axios/lib/defaults/transitional.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/defaults/transitional.js +2 -2
- package/dist/prometheus-framework/node_modules/axios/lib/env/data.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/env/data.js +2 -7
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/AxiosURLSearchParams.cjs +1 -0
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +33 -0
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/HttpStatusCode.cjs +1 -0
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/HttpStatusCode.js +72 -0
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/bind.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/bind.js +4 -6
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/buildURL.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/buildURL.js +13 -24
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/combineURLs.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/combineURLs.js +4 -4
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/cookies.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/cookies.js +30 -40
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/formDataToJSON.cjs +1 -0
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/formDataToJSON.js +30 -0
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/isAbsoluteURL.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/isAbsoluteURL.js +3 -3
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/isAxiosError.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/isAxiosError.js +4 -11
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/isURLSameOrigin.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/isURLSameOrigin.js +34 -39
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/null.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/null.js +2 -5
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/parseHeaders.cjs +2 -2
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/parseHeaders.js +28 -38
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/parseProtocol.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/parseProtocol.js +4 -7
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/speedometer.cjs +1 -0
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/speedometer.js +19 -0
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/spread.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/spread.js +5 -8
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/toFormData.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/toFormData.js +79 -32
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/toURLEncodedForm.cjs +1 -0
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/toURLEncodedForm.js +13 -0
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/validator.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/validator.js +33 -31
- package/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/Blob.cjs +1 -0
- package/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/Blob.js +4 -0
- package/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/FormData.cjs +1 -0
- package/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/FormData.js +4 -0
- package/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/URLSearchParams.cjs +1 -0
- package/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +5 -0
- package/dist/prometheus-framework/node_modules/axios/lib/platform/browser/index.cjs +1 -0
- package/dist/prometheus-framework/node_modules/axios/lib/platform/browser/index.js +15 -0
- package/dist/prometheus-framework/node_modules/axios/lib/platform/common/utils.cjs +1 -0
- package/dist/prometheus-framework/node_modules/axios/lib/platform/common/utils.js +7 -0
- package/dist/prometheus-framework/node_modules/axios/lib/platform/index.cjs +1 -0
- package/dist/prometheus-framework/node_modules/axios/lib/platform/index.js +9 -0
- package/dist/prometheus-framework/node_modules/axios/lib/utils.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/utils.js +212 -140
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +2 -72
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +72 -2
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +2 -78
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +78 -2
- package/dist/prometheus-framework/src/components/Upload/Upload.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Upload/Upload.vue.js +1 -1
- package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.js +1 -1
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +65 -67
- package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/auth.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/invites.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/invites.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/twofa.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/twofa.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/store/blogposts.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/store/blogposts.js +1 -1
- package/dist/prometheus-framework/src/modules/community/store/reactions.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/store/reactions.js +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Image.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Image.vue.js +6 -7
- package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -4
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +2 -61
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +4 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +61 -2
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/events/store/events.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/store/events.js +1 -1
- package/dist/prometheus-framework/src/modules/events/store/tickets.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/store/tickets.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/store/gallery.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/store/gallery.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/orders.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/departments.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/invites.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/invites.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/memberships.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/organizations.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/organizations.js +1 -1
- package/dist/prometheus-framework/src/modules/payments/components/pages/Payments.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/payments/components/pages/Payments.vue.js +30 -61
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue.js +20 -21
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +28 -33
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/LeftoverAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/LeftoverAdd.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +6 -41
- package/dist/prometheus-framework/src/modules/products/store/categories.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/store/categories.js +1 -1
- package/dist/prometheus-framework/src/modules/products/store/leftovers.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/store/leftovers.js +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.js +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/reports/store/reports.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/store/reports.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/store/spots.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/store/spots.js +1 -1
- package/dist/prometheus-framework/src/modules/users/store/users.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/store/users.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +75 -33
- package/dist/prometheus-framework.cjs.js +29 -30
- package/dist/prometheus-framework.es.js +4123 -3405
- package/dist/style.css +1 -1
- package/package.json +3 -2
- package/src/modules/auth/components/pages/SignIn.vue +2 -2
- package/src/modules/payments/components/pages/Payments.vue +32 -34
- package/src/modules/products/components/blocks/CardLeftover.vue +1 -2
- package/src/modules/products/components/blocks/CardProduct.vue +1 -17
- package/src/modules/products/components/sections/EditProductInfo.vue +3 -5
@@ -0,0 +1,80 @@
|
|
1
|
+
import { toUint8Array as g, setLengthLeft as h } from "../common/utils.js";
|
2
|
+
import { isAccessList as m } from "./types.js";
|
3
|
+
import { bytesToHex as c } from "../../../../web3-utils/lib/esm/converters.js";
|
4
|
+
const I = (t, s) => {
|
5
|
+
const e = t.param("vm", "maxInitCodeSize");
|
6
|
+
if (e && BigInt(s) > e)
|
7
|
+
throw new Error(`the initcode size of this transaction is too large: it is ${s} while the max is ${t.param("vm", "maxInitCodeSize")}`);
|
8
|
+
}, S = (t) => {
|
9
|
+
let s, e;
|
10
|
+
if (m(t)) {
|
11
|
+
s = t;
|
12
|
+
const n = [];
|
13
|
+
for (let o = 0; o < t.length; o += 1) {
|
14
|
+
const r = t[o], a = g(r.address), i = [];
|
15
|
+
for (let l = 0; l < r.storageKeys.length; l += 1)
|
16
|
+
i.push(g(r.storageKeys[l]));
|
17
|
+
n.push([a, i]);
|
18
|
+
}
|
19
|
+
e = n;
|
20
|
+
} else {
|
21
|
+
e = t ?? [];
|
22
|
+
const n = [];
|
23
|
+
for (let o = 0; o < e.length; o += 1) {
|
24
|
+
const r = e[o], a = c(r[0]), i = [];
|
25
|
+
for (let d = 0; d < r[1].length; d += 1)
|
26
|
+
i.push(c(r[1][d]));
|
27
|
+
const l = {
|
28
|
+
address: a,
|
29
|
+
storageKeys: i
|
30
|
+
};
|
31
|
+
n.push(l);
|
32
|
+
}
|
33
|
+
s = n;
|
34
|
+
}
|
35
|
+
return {
|
36
|
+
AccessListJSON: s,
|
37
|
+
accessList: e
|
38
|
+
};
|
39
|
+
}, p = (t) => {
|
40
|
+
for (let s = 0; s < t.length; s += 1) {
|
41
|
+
const e = t[s], n = e[0], o = e[1];
|
42
|
+
if (e[2] !== void 0)
|
43
|
+
throw new Error("Access list item cannot have 3 elements. It can only have an address, and an array of storage slots.");
|
44
|
+
if (n.length !== 20)
|
45
|
+
throw new Error("Invalid EIP-2930 transaction: address length should be 20 bytes");
|
46
|
+
for (let r = 0; r < o.length; r += 1)
|
47
|
+
if (o[r].length !== 32)
|
48
|
+
throw new Error("Invalid EIP-2930 transaction: storage slot length should be 32 bytes");
|
49
|
+
}
|
50
|
+
}, A = (t) => {
|
51
|
+
const s = [];
|
52
|
+
for (let e = 0; e < t.length; e += 1) {
|
53
|
+
const n = t[e], o = {
|
54
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/consistent-type-assertions
|
55
|
+
address: c(h(n[0], 20)),
|
56
|
+
storageKeys: []
|
57
|
+
}, r = n && n[1];
|
58
|
+
for (let a = 0; a < r.length; a += 1) {
|
59
|
+
const i = r[a];
|
60
|
+
o.storageKeys.push(c(h(i, 32)));
|
61
|
+
}
|
62
|
+
s.push(o);
|
63
|
+
}
|
64
|
+
return s;
|
65
|
+
}, w = (t, s) => {
|
66
|
+
const e = s.param("gasPrices", "accessListStorageKeyCost"), n = s.param("gasPrices", "accessListAddressCost");
|
67
|
+
let o = 0;
|
68
|
+
for (let a = 0; a < t.length; a += 1) {
|
69
|
+
const l = t[a][1];
|
70
|
+
o += l.length;
|
71
|
+
}
|
72
|
+
return t.length * Number(n) + o * Number(e);
|
73
|
+
};
|
74
|
+
export {
|
75
|
+
I as checkMaxInitCodeSize,
|
76
|
+
S as getAccessListData,
|
77
|
+
A as getAccessListJSON,
|
78
|
+
w as getDataFeeEIP2930,
|
79
|
+
p as verifyAccessList
|
80
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});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 g=require("../../../web3-types/lib/esm/web3_base_wallet.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");require("../../../web3-validator/lib/esm/formats.cjs");require("../../../web3-validator/lib/esm/default_validator.cjs");const c=require("../../../web3-validator/lib/esm/validation/object.cjs");var n=globalThis&&globalThis.__awaiter||function(h,e,t,r){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function f(o){try{l(r.next(o))}catch(d){a(d)}}function p(o){try{l(r.throw(o))}catch(d){a(d)}}function l(o){o.done?i(o.value):s(o.value).then(f,p)}l((r=r.apply(h,e||[])).next())})};class u extends g.Web3BaseWallet{constructor(){super(...arguments),this._addressMap=new Map,this._defaultKeyName="web3js_wallet"}static getStorage(){let e;try{e=window.localStorage;const t="__storage_test__";return e.setItem(t,t),e.removeItem(t),e}catch(t){return t&&(t.code===22||t.code===1014||t.name==="QuotaExceededError"||t.name==="NS_ERROR_DOM_QUOTA_REACHED")&&!c.isNullish(e)&&e.length!==0?e:void 0}}create(e){for(let t=0;t<e;t+=1)this.add(this._accountProvider.create());return this}add(e){var t;if(typeof e=="string")return this.add(this._accountProvider.privateKeyToAccount(e));let r=this.length;return this.get(e.address)&&(console.warn(`Account ${e.address.toLowerCase()} already exists.`),r=(t=this._addressMap.get(e.address.toLowerCase()))!==null&&t!==void 0?t:r),this._addressMap.set(e.address.toLowerCase(),r),this[r]=e,this}get(e){if(typeof e=="string"){const t=this._addressMap.get(e.toLowerCase());return c.isNullish(t)?void 0:this[t]}return this[e]}remove(e){if(typeof e=="string"){const t=this._addressMap.get(e.toLowerCase());return c.isNullish(t)?!1:(this._addressMap.delete(e.toLowerCase()),this.splice(t,1),!0)}return this[e]?(this.splice(e,1),!0):!1}clear(){return this._addressMap.clear(),this.length=0,this}encrypt(e,t){return n(this,void 0,void 0,function*(){return Promise.all(this.map(r=>n(this,void 0,void 0,function*(){return r.encrypt(e,t)})))})}decrypt(e,t,r){return n(this,void 0,void 0,function*(){const s=yield Promise.all(e.map(i=>n(this,void 0,void 0,function*(){return this._accountProvider.decrypt(i,t,r)})));for(const i of s)this.add(i);return this})}save(e,t){return n(this,void 0,void 0,function*(){const r=u.getStorage();if(!r)throw new Error("Local storage not available.");return r.setItem(t??this._defaultKeyName,JSON.stringify(yield this.encrypt(e))),!0})}load(e,t){return n(this,void 0,void 0,function*(){const r=u.getStorage();if(!r)throw new Error("Local storage not available.");const s=r.getItem(t??this._defaultKeyName);return s&&(yield this.decrypt(JSON.parse(s)||[],e)),this})}}exports.Wallet=u;
|
@@ -0,0 +1,361 @@
|
|
1
|
+
import "../../../web3-types/lib/esm/data_format_types.js";
|
2
|
+
import "../../../web3-types/lib/esm/eth_types.js";
|
3
|
+
import "../../../web3-types/lib/esm/web3_base_provider.js";
|
4
|
+
import { Web3BaseWallet as g } from "../../../web3-types/lib/esm/web3_base_wallet.js";
|
5
|
+
import "../../../web3-errors/lib/esm/errors/rpc_errors.js";
|
6
|
+
import "../../../web3-validator/lib/esm/formats.js";
|
7
|
+
import "../../../web3-validator/lib/esm/default_validator.js";
|
8
|
+
import { isNullish as c } from "../../../web3-validator/lib/esm/validation/object.js";
|
9
|
+
var n = globalThis && globalThis.__awaiter || function(l, e, t, r) {
|
10
|
+
function o(i) {
|
11
|
+
return i instanceof t ? i : new t(function(a) {
|
12
|
+
a(i);
|
13
|
+
});
|
14
|
+
}
|
15
|
+
return new (t || (t = Promise))(function(i, a) {
|
16
|
+
function f(s) {
|
17
|
+
try {
|
18
|
+
d(r.next(s));
|
19
|
+
} catch (u) {
|
20
|
+
a(u);
|
21
|
+
}
|
22
|
+
}
|
23
|
+
function p(s) {
|
24
|
+
try {
|
25
|
+
d(r.throw(s));
|
26
|
+
} catch (u) {
|
27
|
+
a(u);
|
28
|
+
}
|
29
|
+
}
|
30
|
+
function d(s) {
|
31
|
+
s.done ? i(s.value) : o(s.value).then(f, p);
|
32
|
+
}
|
33
|
+
d((r = r.apply(l, e || [])).next());
|
34
|
+
});
|
35
|
+
};
|
36
|
+
class h extends g {
|
37
|
+
constructor() {
|
38
|
+
super(...arguments), this._addressMap = /* @__PURE__ */ new Map(), this._defaultKeyName = "web3js_wallet";
|
39
|
+
}
|
40
|
+
/**
|
41
|
+
* Get the storage object of the browser
|
42
|
+
*
|
43
|
+
* @returns the storage
|
44
|
+
*/
|
45
|
+
static getStorage() {
|
46
|
+
let e;
|
47
|
+
try {
|
48
|
+
e = window.localStorage;
|
49
|
+
const t = "__storage_test__";
|
50
|
+
return e.setItem(t, t), e.removeItem(t), e;
|
51
|
+
} catch (t) {
|
52
|
+
return t && // everything except Firefox
|
53
|
+
(t.code === 22 || // Firefox
|
54
|
+
t.code === 1014 || // test name field too, because code might not be present
|
55
|
+
// everything except Firefox
|
56
|
+
t.name === "QuotaExceededError" || // Firefox
|
57
|
+
t.name === "NS_ERROR_DOM_QUOTA_REACHED") && // acknowledge QuotaExceededError only if there's something already stored
|
58
|
+
!c(e) && e.length !== 0 ? e : void 0;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
/**
|
62
|
+
* Generates one or more accounts in the wallet. If wallets already exist they will not be overridden.
|
63
|
+
*
|
64
|
+
* @param numberOfAccounts - Number of accounts to create. Leave empty to create an empty wallet.
|
65
|
+
* @returns The wallet
|
66
|
+
* ```ts
|
67
|
+
* web3.eth.accounts.wallet.create(2)
|
68
|
+
* > Wallet(2) [
|
69
|
+
* {
|
70
|
+
* address: '0xde38310a42B751AE57d30cFFF4a0A3c52A442fCE',
|
71
|
+
* privateKey: '0x6422c9d28efdcbee93c1d32a5fc6fd6fa081b985487885296cf8c9bbb5872600',
|
72
|
+
* signTransaction: [Function: signTransaction],
|
73
|
+
* sign: [Function: sign],
|
74
|
+
* encrypt: [Function: encrypt]
|
75
|
+
* },
|
76
|
+
* {
|
77
|
+
* address: '0x766BF755246d924B1d017Fdb5390f38a60166691',
|
78
|
+
* privateKey: '0x756530f13c0eb636ebdda655335f5dea9921e3362e2e588b0ad59e556f7751f0',
|
79
|
+
* signTransaction: [Function: signTransaction],
|
80
|
+
* sign: [Function: sign],
|
81
|
+
* encrypt: [Function: encrypt]
|
82
|
+
* },
|
83
|
+
* _accountProvider: {
|
84
|
+
* create: [Function: create],
|
85
|
+
* privateKeyToAccount: [Function: privateKeyToAccount],
|
86
|
+
* decrypt: [Function: decrypt]
|
87
|
+
* },
|
88
|
+
* _addressMap: Map(2) {
|
89
|
+
* '0xde38310a42b751ae57d30cfff4a0a3c52a442fce' => 0,
|
90
|
+
* '0x766bf755246d924b1d017fdb5390f38a60166691' => 1
|
91
|
+
* },
|
92
|
+
* _defaultKeyName: 'web3js_wallet'
|
93
|
+
* ]
|
94
|
+
*
|
95
|
+
* ```
|
96
|
+
*/
|
97
|
+
create(e) {
|
98
|
+
for (let t = 0; t < e; t += 1)
|
99
|
+
this.add(this._accountProvider.create());
|
100
|
+
return this;
|
101
|
+
}
|
102
|
+
/**
|
103
|
+
* Adds an account using a private key or account object to the wallet.
|
104
|
+
*
|
105
|
+
* @param account - A private key or account object
|
106
|
+
* @returns The wallet
|
107
|
+
*
|
108
|
+
* ```ts
|
109
|
+
* web3.eth.accounts.wallet.add('0xbce9b59981303e76c4878b1a6d7b088ec6b9dd5c966b7d5f54d7a749ff683387');
|
110
|
+
* > Wallet(1) [
|
111
|
+
* {
|
112
|
+
* address: '0x85D70633b90e03e0276B98880286D0D055685ed7',
|
113
|
+
* privateKey: '0xbce9b59981303e76c4878b1a6d7b088ec6b9dd5c966b7d5f54d7a749ff683387',
|
114
|
+
* signTransaction: [Function: signTransaction],
|
115
|
+
* sign: [Function: sign],
|
116
|
+
* encrypt: [Function: encrypt]
|
117
|
+
* },
|
118
|
+
* _accountProvider: {
|
119
|
+
* create: [Function: create],
|
120
|
+
* privateKeyToAccount: [Function: privateKeyToAccount],
|
121
|
+
* decrypt: [Function: decrypt]
|
122
|
+
* },
|
123
|
+
* _addressMap: Map(1) { '0x85d70633b90e03e0276b98880286d0d055685ed7' => 0 },
|
124
|
+
* _defaultKeyName: 'web3js_wallet'
|
125
|
+
* ]
|
126
|
+
* ```
|
127
|
+
*/
|
128
|
+
add(e) {
|
129
|
+
var t;
|
130
|
+
if (typeof e == "string")
|
131
|
+
return this.add(this._accountProvider.privateKeyToAccount(e));
|
132
|
+
let r = this.length;
|
133
|
+
return this.get(e.address) && (console.warn(`Account ${e.address.toLowerCase()} already exists.`), r = (t = this._addressMap.get(e.address.toLowerCase())) !== null && t !== void 0 ? t : r), this._addressMap.set(e.address.toLowerCase(), r), this[r] = e, this;
|
134
|
+
}
|
135
|
+
/**
|
136
|
+
* Get the account of the wallet with either the index or public address.
|
137
|
+
*
|
138
|
+
* @param addressOrIndex - A string of the address or number index within the wallet.
|
139
|
+
* @returns The account object or undefined if the account doesn't exist
|
140
|
+
*/
|
141
|
+
get(e) {
|
142
|
+
if (typeof e == "string") {
|
143
|
+
const t = this._addressMap.get(e.toLowerCase());
|
144
|
+
return c(t) ? void 0 : this[t];
|
145
|
+
}
|
146
|
+
return this[e];
|
147
|
+
}
|
148
|
+
/**
|
149
|
+
* Removes an account from the wallet.
|
150
|
+
*
|
151
|
+
* @param addressOrIndex - The account address, or index in the wallet.
|
152
|
+
* @returns true if the wallet was removed. false if it couldn't be found.
|
153
|
+
* ```ts
|
154
|
+
* web3.eth.accounts.wallet.add('0xbce9b59981303e76c4878b1a6d7b088ec6b9dd5c966b7d5f54d7a749ff683387');
|
155
|
+
*
|
156
|
+
* web3.eth.accounts.wallet.remove('0x85D70633b90e03e0276B98880286D0D055685ed7');
|
157
|
+
* > true
|
158
|
+
* web3.eth.accounts.wallet
|
159
|
+
* > Wallet(0) [
|
160
|
+
* _accountProvider: {
|
161
|
+
* create: [Function: create],
|
162
|
+
* privateKeyToAccount: [Function: privateKeyToAccount],
|
163
|
+
* decrypt: [Function: decrypt]
|
164
|
+
* },
|
165
|
+
* _addressMap: Map(0) {},
|
166
|
+
* _defaultKeyName: 'web3js_wallet'
|
167
|
+
* ]
|
168
|
+
* ```
|
169
|
+
*/
|
170
|
+
remove(e) {
|
171
|
+
if (typeof e == "string") {
|
172
|
+
const t = this._addressMap.get(e.toLowerCase());
|
173
|
+
return c(t) ? !1 : (this._addressMap.delete(e.toLowerCase()), this.splice(t, 1), !0);
|
174
|
+
}
|
175
|
+
return this[e] ? (this.splice(e, 1), !0) : !1;
|
176
|
+
}
|
177
|
+
/**
|
178
|
+
* Securely empties the wallet and removes all its accounts.
|
179
|
+
* Use this with *caution as it will remove all accounts stored in local wallet.
|
180
|
+
*
|
181
|
+
* @returns The wallet object
|
182
|
+
* ```ts
|
183
|
+
*
|
184
|
+
* web3.eth.accounts.wallet.clear();
|
185
|
+
* > Wallet(0) [
|
186
|
+
* _accountProvider: {
|
187
|
+
* create: [Function: create],
|
188
|
+
* privateKeyToAccount: [Function: privateKeyToAccount],
|
189
|
+
* decrypt: [Function: decrypt]
|
190
|
+
* },
|
191
|
+
* _addressMap: Map(0) {},
|
192
|
+
* _defaultKeyName: 'web3js_wallet'
|
193
|
+
* ]
|
194
|
+
* ```
|
195
|
+
*/
|
196
|
+
clear() {
|
197
|
+
return this._addressMap.clear(), this.length = 0, this;
|
198
|
+
}
|
199
|
+
/**
|
200
|
+
* Encrypts all wallet accounts to an array of encrypted keystore v3 objects.
|
201
|
+
*
|
202
|
+
* @param password - The password which will be used for encryption
|
203
|
+
* @param options - encryption options
|
204
|
+
* @returns An array of the encrypted keystore v3.
|
205
|
+
*
|
206
|
+
* ```ts
|
207
|
+
* web3.eth.accounts.wallet.create(1)
|
208
|
+
* web3.eth.accounts.wallet.encrypt("abc").then(console.log);
|
209
|
+
* > [
|
210
|
+
* '{"version":3,"id":"fa46e213-a7c3-4844-b903-dd14d39cc7db",
|
211
|
+
* "address":"fa3e41a401609103c241431cbdee8623ae2a321a","crypto":
|
212
|
+
* {"ciphertext":"8d179a911d6146ad2924e86bf493ed89b8ff3596ffec0816e761c542016ab13c",
|
213
|
+
* "cipherparams":{"iv":"acc888c6cf4a19b86846cef0185a7164"},"cipher":"aes-128-ctr",
|
214
|
+
* "kdf":"scrypt","kdfparams":{"n":8192,"r":8,"p":1,"dklen":32,"salt":"6a743c9b367d15f4758e4f3f3378ff0fd443708d1c64854e07588ea5331823ae"},
|
215
|
+
* "mac":"410544c8307e3691fda305eb3722d82c3431f212a87daa119a21587d96698b57"}}'
|
216
|
+
* ]
|
217
|
+
* ```
|
218
|
+
*/
|
219
|
+
encrypt(e, t) {
|
220
|
+
return n(this, void 0, void 0, function* () {
|
221
|
+
return Promise.all(this.map((r) => n(this, void 0, void 0, function* () {
|
222
|
+
return r.encrypt(e, t);
|
223
|
+
})));
|
224
|
+
});
|
225
|
+
}
|
226
|
+
/**
|
227
|
+
* Decrypts keystore v3 objects.
|
228
|
+
*
|
229
|
+
* @param encryptedWallets - An array of encrypted keystore v3 objects to decrypt
|
230
|
+
* @param password - The password to encrypt with
|
231
|
+
* @param options - decrypt options for the wallets
|
232
|
+
* @returns The decrypted wallet object
|
233
|
+
*
|
234
|
+
* ```ts
|
235
|
+
* web3.eth.accounts.wallet.decrypt([
|
236
|
+
* { version: 3,
|
237
|
+
* id: '83191a81-aaca-451f-b63d-0c5f3b849289',
|
238
|
+
* address: '06f702337909c06c82b09b7a22f0a2f0855d1f68',
|
239
|
+
* crypto:
|
240
|
+
* { ciphertext: '7d34deae112841fba86e3e6cf08f5398dda323a8e4d29332621534e2c4069e8d',
|
241
|
+
* cipherparams: { iv: '497f4d26997a84d570778eae874b2333' },
|
242
|
+
* cipher: 'aes-128-ctr',
|
243
|
+
* kdf: 'scrypt',
|
244
|
+
* kdfparams:
|
245
|
+
* { dklen: 32,
|
246
|
+
* salt: '208dd732a27aa4803bb760228dff18515d5313fd085bbce60594a3919ae2d88d',
|
247
|
+
* n: 262144,
|
248
|
+
* r: 8,
|
249
|
+
* p: 1 },
|
250
|
+
* mac: '0062a853de302513c57bfe3108ab493733034bf3cb313326f42cf26ea2619cf9' } },
|
251
|
+
* { version: 3,
|
252
|
+
* id: '7d6b91fa-3611-407b-b16b-396efb28f97e',
|
253
|
+
* address: 'b5d89661b59a9af0b34f58d19138baa2de48baaf',
|
254
|
+
* crypto:
|
255
|
+
* { ciphertext: 'cb9712d1982ff89f571fa5dbef447f14b7e5f142232bd2a913aac833730eeb43',
|
256
|
+
* cipherparams: { iv: '8cccb91cb84e435437f7282ec2ffd2db' },
|
257
|
+
* cipher: 'aes-128-ctr',
|
258
|
+
* kdf: 'scrypt',
|
259
|
+
* kdfparams:
|
260
|
+
* { dklen: 32,
|
261
|
+
* salt: '08ba6736363c5586434cd5b895e6fe41ea7db4785bd9b901dedce77a1514e8b8',
|
262
|
+
* n: 262144,
|
263
|
+
* r: 8,
|
264
|
+
* p: 1 },
|
265
|
+
* mac: 'd2eb068b37e2df55f56fa97a2bf4f55e072bef0dd703bfd917717d9dc54510f0' } }
|
266
|
+
* ], 'test').then(console.log)
|
267
|
+
* > Wallet {
|
268
|
+
* _accountProvider: {
|
269
|
+
* create: [Function: create],
|
270
|
+
* privateKeyToAccount: [Function: privateKeyToAccount],
|
271
|
+
* decrypt: [Function: decrypt]
|
272
|
+
* },
|
273
|
+
* _defaultKeyName: 'web3js_wallet',
|
274
|
+
* _accounts: {
|
275
|
+
* '0x85d70633b90e03e0276b98880286d0d055685ed7': {
|
276
|
+
* address: '0x85D70633b90e03e0276B98880286D0D055685ed7',
|
277
|
+
* privateKey: '0xbce9b59981303e76c4878b1a6d7b088ec6b9dd5c966b7d5f54d7a749ff683387',
|
278
|
+
* signTransaction: [Function: signTransaction],
|
279
|
+
* sign: [Function: sign],
|
280
|
+
* encrypt: [Function: encrypt]
|
281
|
+
* },
|
282
|
+
* '0x06f702337909c06c82b09b7a22f0a2f0855d1f68': {
|
283
|
+
* address: '0x06F702337909C06C82B09B7A22F0a2f0855d1F68',
|
284
|
+
* privateKey: '87a51da18900da7398b3bab03996833138f269f8f66dd1237b98df6b9ce14573',
|
285
|
+
* signTransaction: [Function: signTransaction],
|
286
|
+
* sign: [Function: sign],
|
287
|
+
* encrypt: [Function: encrypt]
|
288
|
+
* },
|
289
|
+
* '0xb5d89661b59a9af0b34f58d19138baa2de48baaf': {
|
290
|
+
* address: '0xB5d89661B59a9aF0b34f58D19138bAa2de48BAaf',
|
291
|
+
* privateKey: '7ee61c5282979aae9dd795bb6a54e8bdc2bfe009acb64eb9a67322eec3b3da6e',
|
292
|
+
* signTransaction: [Function: signTransaction],
|
293
|
+
* sign: [Function: sign],
|
294
|
+
* encrypt: [Function: encrypt]
|
295
|
+
* }
|
296
|
+
* }
|
297
|
+
* }
|
298
|
+
* ```
|
299
|
+
*/
|
300
|
+
decrypt(e, t, r) {
|
301
|
+
return n(this, void 0, void 0, function* () {
|
302
|
+
const o = yield Promise.all(e.map((i) => n(this, void 0, void 0, function* () {
|
303
|
+
return this._accountProvider.decrypt(i, t, r);
|
304
|
+
})));
|
305
|
+
for (const i of o)
|
306
|
+
this.add(i);
|
307
|
+
return this;
|
308
|
+
});
|
309
|
+
}
|
310
|
+
/**
|
311
|
+
* Stores the wallet encrypted and as string in local storage.
|
312
|
+
* **__NOTE:__** Browser only
|
313
|
+
*
|
314
|
+
* @param password - The password to encrypt the wallet
|
315
|
+
* @param keyName - (optional) The key used for the local storage position, defaults to `"web3js_wallet"`.
|
316
|
+
* @returns Will return boolean value true if saved properly
|
317
|
+
* ```ts
|
318
|
+
* web3.eth.accounts.wallet.save('test#!$');
|
319
|
+
* >true
|
320
|
+
* ```
|
321
|
+
*/
|
322
|
+
save(e, t) {
|
323
|
+
return n(this, void 0, void 0, function* () {
|
324
|
+
const r = h.getStorage();
|
325
|
+
if (!r)
|
326
|
+
throw new Error("Local storage not available.");
|
327
|
+
return r.setItem(t ?? this._defaultKeyName, JSON.stringify(yield this.encrypt(e))), !0;
|
328
|
+
});
|
329
|
+
}
|
330
|
+
/**
|
331
|
+
* Loads a wallet from local storage and decrypts it.
|
332
|
+
* **__NOTE:__** Browser only
|
333
|
+
*
|
334
|
+
* @param password - The password to decrypt the wallet.
|
335
|
+
* @param keyName - (optional)The key used for local storage position, defaults to `web3js_wallet"`
|
336
|
+
* @returns Returns the wallet object
|
337
|
+
*
|
338
|
+
* ```ts
|
339
|
+
* web3.eth.accounts.wallet.save('test#!$');
|
340
|
+
* > true
|
341
|
+
* web3.eth.accounts.wallet.load('test#!$');
|
342
|
+
* { defaultKeyName: "web3js_wallet",
|
343
|
+
* length: 0,
|
344
|
+
* _accounts: Accounts {_requestManager: RequestManager, givenProvider: Proxy, providers: {…}, _provider: WebsocketProvider, …},
|
345
|
+
* [[Prototype]]: Object
|
346
|
+
* }
|
347
|
+
* ```
|
348
|
+
*/
|
349
|
+
load(e, t) {
|
350
|
+
return n(this, void 0, void 0, function* () {
|
351
|
+
const r = h.getStorage();
|
352
|
+
if (!r)
|
353
|
+
throw new Error("Local storage not available.");
|
354
|
+
const o = r.getItem(t ?? this._defaultKeyName);
|
355
|
+
return o && (yield this.decrypt(JSON.parse(o) || [], e)), this;
|
356
|
+
});
|
357
|
+
}
|
358
|
+
}
|
359
|
+
export {
|
360
|
+
h as Wallet
|
361
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("../../../web3-core/lib/esm/web3_config.cjs");require("../../../web3-core/lib/esm/web3_request_manager.cjs");require("../../../web3-core/lib/esm/web3_subscription_manager.cjs");require("../../../web3-core/lib/esm/web3_subscriptions.cjs");const L=require("../../../web3-core/lib/esm/web3_context.cjs");require("../../../web3-core/lib/esm/web3_batch_request.cjs");const v=require("../../../web3-types/lib/esm/data_format_types.cjs"),B=require("../../../web3-types/lib/esm/eth_types.cjs");require("../../../web3-types/lib/esm/web3_base_provider.cjs");const E=require("../../../web3-errors/lib/esm/errors/contract_errors.cjs"),R=require("../../../web3-errors/lib/esm/errors/provider_errors.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");require("../../../web3-eth-iban/lib/esm/iban.cjs");const G=require("../../../web3-validator/lib/esm/errors.cjs");require("../../../web3-validator/lib/esm/formats.cjs");const V=require("../../../web3-validator/lib/esm/utils.cjs"),U=require("../../../web3-validator/lib/esm/default_validator.cjs"),I=require("../../../web3-validator/lib/esm/validation/object.cjs");require("../../../web3-core/lib/esm/web3_promi_event.cjs");require("../../../setimmediate/setImmediate.cjs");require("../../../web3-eth/lib/esm/web3_eth.cjs");const $=require("../../../web3-eth/lib/esm/utils/decoding.cjs");require("../../../web3-eth/lib/esm/schemas.cjs");const q=require("../../../web3-eth/lib/esm/constants.cjs"),T=require("../../../web3-eth/lib/esm/rpc_method_wrappers.cjs");require("../../../web3-eth/lib/esm/utils/prepare_transaction_for_signing.cjs");const N=require("../../../web3-eth/lib/esm/web3_subscriptions.cjs");require("../../../web3-eth/lib/esm/utils/transaction_builder.cjs");const j=require("../../../web3-eth-abi/lib/esm/utils.cjs"),k=require("../../../web3-eth-abi/lib/esm/api/events_api.cjs"),H=require("../../../web3-eth-abi/lib/esm/api/functions_api.cjs");require("../../../web3-eth-abi/lib/esm/coders/base/number.cjs");const D=require("../../../web3-eth-abi/lib/esm/decode_contract_error_data.cjs"),F=require("./encoding.cjs"),P=require("./log_subscription.cjs"),b=require("./utils.cjs"),p=require("../../../web3-utils/lib/esm/formatter.cjs"),J=require("../../../web3-utils/lib/esm/hash.cjs"),K=require("../../../web3-utils/lib/esm/converters.cjs");var m=globalThis&&globalThis.__awaiter||function(x,t,n,s){function c(o){return o instanceof n?o:new n(function(i){i(o)})}return new(n||(n=Promise))(function(o,i){function r(u){try{e(s.next(u))}catch(h){i(h)}}function a(u){try{e(s.throw(u))}catch(h){i(h)}}function e(u){u.done?o(u.value):c(u.value).then(r,a)}e((s=s.apply(x,t||[])).next())})};const O={logs:P.LogsSubscription,newHeads:N.NewHeadsSubscription,newBlockHeaders:N.NewHeadsSubscription};class M extends L.Web3Context{constructor(t,n,s,c,o){var i,r,a;const e=b.isContractInitOptions(n)?n:b.isContractInitOptions(s)?s:void 0;let u;b.isWeb3ContractContext(n)?u=n:b.isWeb3ContractContext(s)?u=s:u=c;let h;if(typeof n=="object"&&"provider"in n?h=n.provider:typeof s=="object"&&"provider"in s?h=s.provider:typeof c=="object"&&"provider"in c?h=c.provider:h=M.givenProvider,super(Object.assign(Object.assign({},u),{provider:h,registeredSubscriptions:O})),this.syncWithContext=!1,this._functions={},!I.isNullish(e)&&!I.isNullish(e.data)&&!I.isNullish(e.input)&&this.config.contractDataInputFill!=="both")throw new E.ContractTransactionDataAndInputError({data:e.data,input:e.input});this._overloadedMethodAbis=new Map;const d=p.isDataFormat(c)?c:p.isDataFormat(s)?s:o??v.DEFAULT_RETURN_FORMAT,l=typeof n=="string"?n:void 0;this.config.contractDataInputFill==="both"?this._dataInputFill=this.config.contractDataInputFill:this._dataInputFill=(i=e==null?void 0:e.dataInputFill)!==null&&i!==void 0?i:this.config.contractDataInputFill,this._parseAndSetJsonInterface(t,d),I.isNullish(l)||this._parseAndSetAddress(l,d),this.options={address:l,jsonInterface:this._jsonInterface,gas:(r=e==null?void 0:e.gas)!==null&&r!==void 0?r:e==null?void 0:e.gasLimit,gasPrice:e==null?void 0:e.gasPrice,from:e==null?void 0:e.from,input:e==null?void 0:e.input,data:e==null?void 0:e.data},this.syncWithContext=(a=e==null?void 0:e.syncWithContext)!==null&&a!==void 0?a:!1,u instanceof L.Web3Context&&this.subscribeToContextEvents(u),Object.defineProperty(this.options,"address",{set:f=>this._parseAndSetAddress(f,d),get:()=>this._address}),Object.defineProperty(this.options,"jsonInterface",{set:f=>this._parseAndSetJsonInterface(f,d),get:()=>this._jsonInterface})}get events(){return this._events}get methods(){return this._methods}clone(){let t;return this.options.address?t=new M([...this._jsonInterface,...this._errorsInterface],this.options.address,{gas:this.options.gas,gasPrice:this.options.gasPrice,from:this.options.from,input:this.options.input,data:this.options.data,provider:this.currentProvider,syncWithContext:this.syncWithContext,dataInputFill:this._dataInputFill},this.getContextObject()):t=new M([...this._jsonInterface,...this._errorsInterface],{gas:this.options.gas,gasPrice:this.options.gasPrice,from:this.options.from,input:this.options.input,data:this.options.data,provider:this.currentProvider,syncWithContext:this.syncWithContext,dataInputFill:this._dataInputFill},this.getContextObject()),this.context&&t.subscribeToContextEvents(this.context),t}deploy(t){var n,s,c;let o=this._jsonInterface.find(h=>h.type==="constructor");o||(o={type:"constructor",inputs:[],stateMutability:""});const i=p.format({format:"bytes"},(n=t==null?void 0:t.input)!==null&&n!==void 0?n:this.options.input,v.DEFAULT_RETURN_FORMAT),r=p.format({format:"bytes"},(s=t==null?void 0:t.data)!==null&&s!==void 0?s:this.options.data,v.DEFAULT_RETURN_FORMAT);if((!i||i.trim()==="0x")&&(!r||r.trim()==="0x"))throw new E.Web3ContractError("contract creation without any data provided.");const a=(c=t==null?void 0:t.arguments)!==null&&c!==void 0?c:[],e=Object.assign(Object.assign({},this.options),{input:i,data:r}),u=i??r;return{arguments:a,send:h=>{const d=Object.assign({},h);return this._contractMethodDeploySend(o,a,d,e)},estimateGas:(h,d=v.DEFAULT_RETURN_FORMAT)=>m(this,void 0,void 0,function*(){const l=Object.assign({},h);return this._contractMethodEstimateGas({abi:o,params:a,returnFormat:d,options:l,contractOptions:e})}),encodeABI:()=>F.encodeMethodABI(o,a,p.format({format:"bytes"},u,v.DEFAULT_RETURN_FORMAT))}}getPastEvents(t,n,s){var c;return m(this,void 0,void 0,function*(){const o=typeof t=="string"?t:q.ALL_EVENTS,i=typeof t!="string"&&!p.isDataFormat(t)?t:p.isDataFormat(n)?{}:n,r=p.isDataFormat(t)?t:p.isDataFormat(n)?n:s??v.DEFAULT_RETURN_FORMAT,a=o==="allEvents"||o===q.ALL_EVENTS?q.ALL_EVENTS_ABI:this._jsonInterface.find(g=>"name"in g&&g.name===o);if(!a)throw new E.Web3ContractError(`Event ${o} not found.`);const{fromBlock:e,toBlock:u,topics:h,address:d}=F.encodeEventABI(this.options,a,i??{}),f=(yield T.getLogs(this,{fromBlock:e,toBlock:u,topics:h,address:d},r)).map(g=>typeof g=="string"?g:$.decodeEventABI(a,g,this._jsonInterface,r)),_=(c=i==null?void 0:i.filter)!==null&&c!==void 0?c:{},S=Object.keys(_);return S.length>0?f.filter(g=>typeof g=="string"?!0:S.every(A=>{var w;if(Array.isArray(_[A]))return _[A].some(C=>String(g.returnValues[A]).toUpperCase()===String(C).toUpperCase());const y=(w=a.inputs)===null||w===void 0?void 0:w.filter(C=>C.name===A)[0];return y!=null&&y.indexed&&y.type==="string"&&J.keccak256Wrapper(_[A])===String(g.returnValues[A])?!0:String(g.returnValues[A]).toUpperCase()===String(_[A]).toUpperCase()})):f})}_parseAndSetAddress(t,n=v.DEFAULT_RETURN_FORMAT){this._address=t&&K.toChecksumAddress(p.format({format:"address"},t,n))}_parseAndSetJsonInterface(t,n=v.DEFAULT_RETURN_FORMAT){var s,c,o,i,r;this._functions={},this._methods={},this._events={};let a=[];const e=t.filter(h=>h.type!=="error"),u=t.filter(h=>j.isAbiErrorFragment(h));for(const h of e){const d=Object.assign(Object.assign({},h),{signature:""});if(j.isAbiFunctionFragment(d)){const l=j.jsonInterfaceMethodToString(d),f=H.encodeFunctionSignature(l);d.signature=f,d.constant=(c=(s=d.stateMutability==="view")!==null&&s!==void 0?s:d.stateMutability==="pure")!==null&&c!==void 0?c:d.constant,d.payable=(o=d.stateMutability==="payable")!==null&&o!==void 0?o:d.payable,this._overloadedMethodAbis.set(d.name,[...(i=this._overloadedMethodAbis.get(d.name))!==null&&i!==void 0?i:[],d]);const _=(r=this._overloadedMethodAbis.get(d.name))!==null&&r!==void 0?r:[],S=this._createContractMethod(_,u);this._functions[l]={signature:f,method:S},this._methods[d.name]=this._functions[l].method,this._methods[l]=this._functions[l].method,this._methods[f]=this._functions[l].method}else if(j.isAbiEventFragment(d)){const l=j.jsonInterfaceMethodToString(d),f=k.encodeEventSignature(l),_=this._createContractEvent(d,n);d.signature=f,(!(l in this._events)||d.name==="bound")&&(this._events[l]=_),this._events[d.name]=_,this._events[f]=_}a=[...a,d]}this._events.allEvents=this._createContractEvent(q.ALL_EVENTS_ABI,n),this._jsonInterface=[...a],this._errorsInterface=u}_getAbiParams(t,n){var s;try{return V.transformJsonDataToAbiFormat((s=t.inputs)!==null&&s!==void 0?s:[],n)}catch(c){throw new E.Web3ContractError(`Invalid parameters for method ${t.name}: ${c.message}`)}}_createContractMethod(t,n){const s=t[t.length-1];return(...c)=>{var o,i;let r;const a=(o=this._overloadedMethodAbis.get(s.name))!==null&&o!==void 0?o:[];let e=a[0];const u=n,h=a.filter(l=>{var f;return((f=l.inputs)!==null&&f!==void 0?f:[]).length===c.length});if(a.length===1||h.length===0)r=this._getAbiParams(e,c),U.validator.validate((i=s.inputs)!==null&&i!==void 0?i:[],r);else{const l=[];for(const f of h)try{r=this._getAbiParams(f,c),U.validator.validate(f.inputs,r),e=f;break}catch(_){l.push(_)}if(l.length===h.length)throw new G.Web3ValidatorError(l)}const d={arguments:r,call:(l,f)=>m(this,void 0,void 0,function*(){return this._contractMethodCall(e,r,u,l,f)}),send:l=>this._contractMethodSend(e,r,u,l),estimateGas:(l,f=v.DEFAULT_RETURN_FORMAT)=>m(this,void 0,void 0,function*(){return this._contractMethodEstimateGas({abi:e,params:r,returnFormat:f,options:l})}),encodeABI:()=>F.encodeMethodABI(e,r),createAccessList:(l,f)=>m(this,void 0,void 0,function*(){return this._contractMethodCreateAccessList(e,r,u,l,f)})};return e.stateMutability==="payable",d}}_contractMethodCall(t,n,s,c,o){var i;return m(this,void 0,void 0,function*(){const r=b.getEthTxCallParams({abi:t,params:n,options:Object.assign(Object.assign({},c),{dataInputFill:this._dataInputFill}),contractOptions:Object.assign(Object.assign({},this.options),{from:(i=this.options.from)!==null&&i!==void 0?i:this.config.defaultAccount})});try{const a=yield T.call(this,r,o,v.DEFAULT_RETURN_FORMAT);return F.decodeMethodReturn(t,a)}catch(a){throw a instanceof E.ContractExecutionError&&D.decodeContractErrorData(s,a.innerError),a}})}_contractMethodCreateAccessList(t,n,s,c,o){var i;return m(this,void 0,void 0,function*(){const r=b.getCreateAccessListParams({abi:t,params:n,options:Object.assign(Object.assign({},c),{dataInputFill:this.config.contractDataInputFill}),contractOptions:Object.assign(Object.assign({},this.options),{from:(i=this.options.from)!==null&&i!==void 0?i:this.config.defaultAccount})});try{return T.createAccessList(this,r,o,v.DEFAULT_RETURN_FORMAT)}catch(a){throw a instanceof E.ContractExecutionError&&D.decodeContractErrorData(s,a.innerError),a}})}_contractMethodSend(t,n,s,c,o){var i,r;let a=o??this.options;a=Object.assign(Object.assign({},a),{input:void 0,from:(r=(i=a.from)!==null&&i!==void 0?i:this.defaultAccount)!==null&&r!==void 0?r:void 0});const e=b.getSendTxParams({abi:t,params:n,options:Object.assign(Object.assign({},c),{dataInputFill:this.config.contractDataInputFill}),contractOptions:a}),u=T.sendTransaction(this,e,v.DEFAULT_RETURN_FORMAT,{checkRevertBeforeSending:!1,contractAbi:this._jsonInterface});return u.on("error",h=>{h instanceof E.ContractExecutionError&&D.decodeContractErrorData(s,h.innerError)}),u}_contractMethodDeploySend(t,n,s,c){var o,i;let r=c??this.options;r=Object.assign(Object.assign({},r),{from:(i=(o=r.from)!==null&&o!==void 0?o:this.defaultAccount)!==null&&i!==void 0?i:void 0});const a=b.getSendTxParams({abi:t,params:n,options:Object.assign(Object.assign({},s),{dataInputFill:this.config.contractDataInputFill}),contractOptions:r});return T.sendTransaction(this,a,v.DEFAULT_RETURN_FORMAT,{transactionResolver:e=>{if(e.status===BigInt(0))throw new E.Web3ContractError("code couldn't be stored",e);const u=this.clone();return u.options.address=e.contractAddress,u},contractAbi:this._jsonInterface,checkRevertBeforeSending:!1})}_contractMethodEstimateGas({abi:t,params:n,returnFormat:s,options:c,contractOptions:o}){return m(this,void 0,void 0,function*(){const i=b.getEstimateGasParams({abi:t,params:n,options:Object.assign(Object.assign({},c),{dataInputFill:this.config.contractDataInputFill}),contractOptions:o??this.options});return T.estimateGas(this,i,B.BlockTags.LATEST,s)})}_createContractEvent(t,n=v.DEFAULT_RETURN_FORMAT){return(...s)=>{var c;const{topics:o,fromBlock:i}=F.encodeEventABI(this.options,t,s[0]),r=new P.LogsSubscription({address:this.options.address,topics:o,abi:t,jsonInterface:this._jsonInterface},{subscriptionManager:this.subscriptionManager,returnFormat:n});return I.isNullish(i)||this.getPastEvents(t.name,{fromBlock:i,topics:o},n).then(a=>{a.forEach(e=>r.emit("data",e))}).catch(a=>{r.emit("error",new R.SubscriptionError("Failed to get past events.",a))}),(c=this.subscriptionManager)===null||c===void 0||c.addSubscription(r).catch(a=>{r.emit("error",new R.SubscriptionError("Failed to subscribe.",a))}),r}}subscribeToContextEvents(t){const n=this;this.context=t,n.syncWithContext&&t.on(W.Web3ConfigEvent.CONFIG_CHANGE,s=>{n.setConfig({[s.name]:s.newValue})})}}exports.Contract=M;
|