@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,1512 @@
|
|
1
|
+
import { DEFAULT_RETURN_FORMAT as r } from "../../../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 "../../../web3-core/lib/esm/web3_config.js";
|
5
|
+
import "../../../web3-core/lib/esm/web3_request_manager.js";
|
6
|
+
import "../../../web3-core/lib/esm/web3_subscription_manager.js";
|
7
|
+
import "../../../web3-core/lib/esm/web3_subscriptions.js";
|
8
|
+
import { Web3Context as T } from "../../../web3-core/lib/esm/web3_context.js";
|
9
|
+
import "../../../web3-core/lib/esm/web3_batch_request.js";
|
10
|
+
import { isSupportedProvider as S } from "../../../web3-core/lib/esm/utils.js";
|
11
|
+
import { TransactionNotFound as g } from "../../../web3-errors/lib/esm/errors/transaction_errors.js";
|
12
|
+
import "../../../web3-errors/lib/esm/errors/rpc_errors.js";
|
13
|
+
import "../../../web3-eth-iban/lib/esm/iban.js";
|
14
|
+
import "../../../web3-validator/lib/esm/formats.js";
|
15
|
+
import "../../../web3-validator/lib/esm/default_validator.js";
|
16
|
+
import "../../../web3-core/lib/esm/web3_promi_event.js";
|
17
|
+
import { getProtocolVersion as y, getSyncing as w, getCoinbase as M, getMining as A, getAccounts as q, getWork as C, submitWork as N, requestAccounts as P, getNodeInfo as _ } from "../../../web3-rpc-methods/lib/esm/eth_rpc_methods.js";
|
18
|
+
import "../../../web3-rpc-methods/lib/esm/net_rpc_methods.js";
|
19
|
+
import "../../../web3-rpc-methods/lib/esm/personal_rpc_methods.js";
|
20
|
+
import { getHashRate as H, getGasPrice as R, getBlockNumber as F, getBalance as L, getStorageAt as U, getCode as I, getBlock as W, getBlockTransactionCount as G, getBlockUncleCount as j, getUncle as D, getTransaction as E, getPendingTransactions as x, getTransactionFromBlock as V, getTransactionReceipt as z, getTransactionCount as J, sendTransaction as K, sendSignedTransaction as Q, sign as X, signTransaction as Y, call as Z, estimateGas as $, getLogs as O, getChainId as tt, getProof as it, getFeeHistory as nt, createAccessList as et, signTypedData as rt } from "./rpc_method_wrappers.js";
|
21
|
+
import { LogsSubscription as p, NewPendingTransactionsSubscription as f, NewHeadsSubscription as l, SyncingSubscription as m } from "./web3_subscriptions.js";
|
22
|
+
import { toChecksumAddress as ot } from "../../../web3-utils/lib/esm/converters.js";
|
23
|
+
import { isNullish as st } from "../../../web3-utils/lib/esm/validation.js";
|
24
|
+
var e = globalThis && globalThis.__awaiter || function(k, t, i, n) {
|
25
|
+
function o(s) {
|
26
|
+
return s instanceof i ? s : new i(function(u) {
|
27
|
+
u(s);
|
28
|
+
});
|
29
|
+
}
|
30
|
+
return new (i || (i = Promise))(function(s, u) {
|
31
|
+
function a(c) {
|
32
|
+
try {
|
33
|
+
d(n.next(c));
|
34
|
+
} catch (h) {
|
35
|
+
u(h);
|
36
|
+
}
|
37
|
+
}
|
38
|
+
function B(c) {
|
39
|
+
try {
|
40
|
+
d(n.throw(c));
|
41
|
+
} catch (h) {
|
42
|
+
u(h);
|
43
|
+
}
|
44
|
+
}
|
45
|
+
function d(c) {
|
46
|
+
c.done ? s(c.value) : o(c.value).then(a, B);
|
47
|
+
}
|
48
|
+
d((n = n.apply(k, t || [])).next());
|
49
|
+
});
|
50
|
+
};
|
51
|
+
const v = {
|
52
|
+
logs: p,
|
53
|
+
newPendingTransactions: f,
|
54
|
+
newHeads: l,
|
55
|
+
syncing: m,
|
56
|
+
pendingTransactions: f,
|
57
|
+
newBlockHeaders: l
|
58
|
+
// the same as newHeads. just for support API like in version 1.x
|
59
|
+
};
|
60
|
+
class b extends T {
|
61
|
+
constructor(t) {
|
62
|
+
if (typeof t == "string" || S(t)) {
|
63
|
+
super({
|
64
|
+
provider: t,
|
65
|
+
registeredSubscriptions: v
|
66
|
+
});
|
67
|
+
return;
|
68
|
+
}
|
69
|
+
if (t.registeredSubscriptions) {
|
70
|
+
super(t);
|
71
|
+
return;
|
72
|
+
}
|
73
|
+
super(Object.assign(Object.assign({}, t), { registeredSubscriptions: v }));
|
74
|
+
}
|
75
|
+
/**
|
76
|
+
* @returns Returns the ethereum protocol version of the node.
|
77
|
+
*
|
78
|
+
* ```ts
|
79
|
+
* web3.eth.getProtocolVersion().then(console.log);
|
80
|
+
* > "63"
|
81
|
+
* ```
|
82
|
+
*/
|
83
|
+
getProtocolVersion() {
|
84
|
+
return e(this, void 0, void 0, function* () {
|
85
|
+
return y(this.requestManager);
|
86
|
+
});
|
87
|
+
}
|
88
|
+
// TODO Add returnFormat parameter
|
89
|
+
/**
|
90
|
+
* Checks if the node is currently syncing.
|
91
|
+
*
|
92
|
+
* @returns Either a {@link SyncingStatusAPI}, or `false`.
|
93
|
+
*
|
94
|
+
* ```ts
|
95
|
+
* web3.eth.isSyncing().then(console.log);
|
96
|
+
* > {
|
97
|
+
* startingBlock: 100,
|
98
|
+
* currentBlock: 312,
|
99
|
+
* highestBlock: 512,
|
100
|
+
* knownStates: 234566,
|
101
|
+
* pulledStates: 123455
|
102
|
+
* }
|
103
|
+
* ```
|
104
|
+
*/
|
105
|
+
isSyncing() {
|
106
|
+
return e(this, void 0, void 0, function* () {
|
107
|
+
return w(this.requestManager);
|
108
|
+
});
|
109
|
+
}
|
110
|
+
// TODO consider adding returnFormat parameter (to format address as bytes)
|
111
|
+
/**
|
112
|
+
* @returns Returns the coinbase address to which mining rewards will go.
|
113
|
+
*
|
114
|
+
* ```ts
|
115
|
+
* web3.eth.getCoinbase().then(console.log);
|
116
|
+
* > "0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe"
|
117
|
+
* ```
|
118
|
+
*/
|
119
|
+
getCoinbase() {
|
120
|
+
return e(this, void 0, void 0, function* () {
|
121
|
+
return M(this.requestManager);
|
122
|
+
});
|
123
|
+
}
|
124
|
+
/**
|
125
|
+
* Checks whether the node is mining or not.
|
126
|
+
*
|
127
|
+
* @returns `true` if the node is mining, otherwise `false`.
|
128
|
+
*
|
129
|
+
* ```ts
|
130
|
+
* web3.eth.isMining().then(console.log);
|
131
|
+
* > true
|
132
|
+
* ```
|
133
|
+
*/
|
134
|
+
isMining() {
|
135
|
+
return e(this, void 0, void 0, function* () {
|
136
|
+
return A(this.requestManager);
|
137
|
+
});
|
138
|
+
}
|
139
|
+
/**
|
140
|
+
* @deprecated Will be removed in the future, please use {@link Web3Eth.getHashRate} method instead.
|
141
|
+
*
|
142
|
+
* @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.
|
143
|
+
* @returns The number of hashes per second that the node is mining with.
|
144
|
+
*
|
145
|
+
* ```ts
|
146
|
+
* web3.eth.getHashrate().then(console.log);
|
147
|
+
* > 493736n
|
148
|
+
*
|
149
|
+
* web3.eth.getHashrate({ number: FMT_NUMBER.HEX , bytes: FMT_BYTES.HEX }).then(console.log);
|
150
|
+
* > "0x788a8"
|
151
|
+
* ```
|
152
|
+
*/
|
153
|
+
getHashrate(t = r) {
|
154
|
+
return e(this, void 0, void 0, function* () {
|
155
|
+
return this.getHashRate(t);
|
156
|
+
});
|
157
|
+
}
|
158
|
+
/**
|
159
|
+
* @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.
|
160
|
+
* @returns The number of hashes per second that the node is mining with.
|
161
|
+
*
|
162
|
+
* ```ts
|
163
|
+
* web3.eth.getHashRate().then(console.log);
|
164
|
+
* > 493736n
|
165
|
+
*
|
166
|
+
* web3.eth.getHashRate({ number: FMT_NUMBER.HEX , bytes: FMT_BYTES.HEX }).then(console.log);
|
167
|
+
* > "0x788a8"
|
168
|
+
* ```
|
169
|
+
*/
|
170
|
+
getHashRate(t = r) {
|
171
|
+
return e(this, void 0, void 0, function* () {
|
172
|
+
return H(this, t);
|
173
|
+
});
|
174
|
+
}
|
175
|
+
/**
|
176
|
+
* @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.
|
177
|
+
* @returns The gas price determined by the last few blocks median gas price.
|
178
|
+
*
|
179
|
+
* ```ts
|
180
|
+
* web3.eth.getGasPrice().then(console.log);
|
181
|
+
* > 20000000000n
|
182
|
+
*
|
183
|
+
* web3.eth.getGasPrice({ number: FMT_NUMBER.HEX , bytes: FMT_BYTES.HEX }).then(console.log);
|
184
|
+
* > "0x4a817c800"
|
185
|
+
* ```
|
186
|
+
*/
|
187
|
+
getGasPrice(t = r) {
|
188
|
+
return e(this, void 0, void 0, function* () {
|
189
|
+
return R(this, t);
|
190
|
+
});
|
191
|
+
}
|
192
|
+
/**
|
193
|
+
* @returns A list of accounts the node controls (addresses are checksummed).
|
194
|
+
*
|
195
|
+
* ```ts
|
196
|
+
* web3.eth.getAccounts().then(console.log);
|
197
|
+
* > ["0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe", "0xDCc6960376d6C6dEa93647383FfB245CfCed97Cf"]
|
198
|
+
* ```
|
199
|
+
*/
|
200
|
+
getAccounts() {
|
201
|
+
var t;
|
202
|
+
return e(this, void 0, void 0, function* () {
|
203
|
+
return ((t = yield q(this.requestManager)) !== null && t !== void 0 ? t : []).map((n) => ot(n));
|
204
|
+
});
|
205
|
+
}
|
206
|
+
/**
|
207
|
+
* @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.
|
208
|
+
* @returns The current block number.
|
209
|
+
*
|
210
|
+
* ```ts
|
211
|
+
* web3.eth.getBlockNumber().then(console.log);
|
212
|
+
* > 2744n
|
213
|
+
*
|
214
|
+
* web3.eth.getBlockNumber({ number: FMT_NUMBER.HEX , bytes: FMT_BYTES.HEX }).then(console.log);
|
215
|
+
* > "0xab8"
|
216
|
+
* ```
|
217
|
+
*/
|
218
|
+
getBlockNumber(t = r) {
|
219
|
+
return e(this, void 0, void 0, function* () {
|
220
|
+
return F(this, t);
|
221
|
+
});
|
222
|
+
}
|
223
|
+
/**
|
224
|
+
* Get the balance of an address at a given block.
|
225
|
+
*
|
226
|
+
* @param address The address to get the balance of.
|
227
|
+
* @param blockNumber ({@link BlockNumberOrTag} defaults to {@link Web3Eth.defaultBlock}) Specifies what block to use as the current state for the balance query.
|
228
|
+
* @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.
|
229
|
+
* @returns The current balance for the given address in `wei`.
|
230
|
+
*
|
231
|
+
* ```ts
|
232
|
+
* web3.eth.getBalance("0x407d73d8a49eeb85d32cf465507dd71d507100c1").then(console.log);
|
233
|
+
* > 1000000000000n
|
234
|
+
*
|
235
|
+
* web3.eth.getBalance("0x407d73d8a49eeb85d32cf465507dd71d507100c1").then(console.log);
|
236
|
+
* > "0xe8d4a51000"
|
237
|
+
* ```
|
238
|
+
*/
|
239
|
+
getBalance(t, i = this.defaultBlock, n = r) {
|
240
|
+
return e(this, void 0, void 0, function* () {
|
241
|
+
return L(this, t, i, n);
|
242
|
+
});
|
243
|
+
}
|
244
|
+
/**
|
245
|
+
* Get the storage at a specific position of an address.
|
246
|
+
*
|
247
|
+
* @param address The address to get the storage from.
|
248
|
+
* @param storageSlot The index position of the storage.
|
249
|
+
* @param blockNumber ({@link BlockNumberOrTag} defaults to {@link Web3Eth.defaultBlock}) Specifies what block to use as the current state for the storage query.
|
250
|
+
* @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.
|
251
|
+
* @returns The value in storage at the given position.
|
252
|
+
*
|
253
|
+
* ```ts
|
254
|
+
* web3.eth.getStorageAt("0x033456732123ffff2342342dd12342434324234234fd234fd23fd4f23d4234", 0).then(console.log);
|
255
|
+
* > "0x033456732123ffff2342342dd12342434324234234fd234fd23fd4f23d4234"
|
256
|
+
*
|
257
|
+
* web3.eth.getStorageAt(
|
258
|
+
* "0x033456732123ffff2342342dd12342434324234234fd234fd23fd4f23d4234",
|
259
|
+
* 0,
|
260
|
+
* undefined,
|
261
|
+
* { number: FMT_NUMBER.HEX , bytes: FMT_BYTES.UINT8ARRAY }
|
262
|
+
* ).then(console.log);
|
263
|
+
* > Uint8Array(31) [
|
264
|
+
* 3, 52, 86, 115, 33, 35, 255, 255,
|
265
|
+
* 35, 66, 52, 45, 209, 35, 66, 67,
|
266
|
+
* 67, 36, 35, 66, 52, 253, 35, 79,
|
267
|
+
* 210, 63, 212, 242, 61, 66, 52
|
268
|
+
* ]
|
269
|
+
* ```
|
270
|
+
*/
|
271
|
+
getStorageAt(t, i, n = this.defaultBlock, o = r) {
|
272
|
+
return e(this, void 0, void 0, function* () {
|
273
|
+
return U(this, t, i, n, o);
|
274
|
+
});
|
275
|
+
}
|
276
|
+
/**
|
277
|
+
* Get the code at a specific address.
|
278
|
+
*
|
279
|
+
* @param address The address to get the code from.
|
280
|
+
* @param blockNumber ({@link BlockNumberOrTag} defaults to {@link Web3Eth.defaultBlock}) Specifies what block to use as the current state for the code query.
|
281
|
+
* @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.
|
282
|
+
* @returns The [data](https://ethereum.org/en/developers/docs/transactions/#the-data-field) at the provided `address`.
|
283
|
+
*
|
284
|
+
* ```ts
|
285
|
+
* web3.eth.getCode("0x033456732123ffff2342342dd12342434324234234fd234fd23fd4f23d4234").then(console.log);
|
286
|
+
* > "0x600160008035811a818181146012578301005b601b6001356025565b8060005260206000f25b600060078202905091905056"
|
287
|
+
*
|
288
|
+
* web3.eth.getCode(
|
289
|
+
* "0x407d73d8a49eeb85d32cf465507dd71d507100c1",
|
290
|
+
* undefined,
|
291
|
+
* { number: FMT_NUMBER.HEX , bytes: FMT_BYTES.UINT8ARRAY }
|
292
|
+
* ).then(console.log);
|
293
|
+
* > Uint8Array(50) [
|
294
|
+
* 96, 1, 96, 0, 128, 53, 129, 26, 129, 129, 129,
|
295
|
+
* 20, 96, 18, 87, 131, 1, 0, 91, 96, 27, 96,
|
296
|
+
* 1, 53, 96, 37, 86, 91, 128, 96, 0, 82, 96,
|
297
|
+
* 32, 96, 0, 242, 91, 96, 0, 96, 7, 130, 2,
|
298
|
+
* 144, 80, 145, 144, 80, 86
|
299
|
+
* ]
|
300
|
+
* ```
|
301
|
+
*/
|
302
|
+
getCode(t, i = this.defaultBlock, n = r) {
|
303
|
+
return e(this, void 0, void 0, function* () {
|
304
|
+
return I(this, t, i, n);
|
305
|
+
});
|
306
|
+
}
|
307
|
+
/**
|
308
|
+
* Retrieves a {@link Block} matching the provided block number, block hash or block tag.
|
309
|
+
*
|
310
|
+
* @param block The {@link BlockNumberOrTag} (defaults to {@link Web3Eth.defaultBlock}) or block hash of the desired block.
|
311
|
+
* @param hydrated If specified `true`, the returned block will contain all transactions as objects. If `false` it will only contain transaction hashes.
|
312
|
+
* @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted (does not format transaction objects or hashes).
|
313
|
+
* @returns A {@link Block} object matching the provided block number or block hash.
|
314
|
+
*
|
315
|
+
* ```ts
|
316
|
+
* web3.eth.getBlock(0).then(console.log);
|
317
|
+
* > {
|
318
|
+
* hash: '0x7dbfdc6a7a67a670cb9b0c3f81ca60c007762f1e4e598cb027a470678ff26d0d',
|
319
|
+
* parentHash: '0x0000000000000000000000000000000000000000000000000000000000000000',
|
320
|
+
* sha3Uncles: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347',
|
321
|
+
* miner: '0x0000000000000000000000000000000000000000',
|
322
|
+
* stateRoot: '0x5ed9882897d363c4632a6e67fba6203df61bd994813dcf048da59be442a9c6c4',
|
323
|
+
* transactionsRoot: '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421',
|
324
|
+
* receiptsRoot: '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421',
|
325
|
+
* logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
|
326
|
+
* difficulty: 1n,
|
327
|
+
* number: 0n,
|
328
|
+
* gasLimit: 30000000n,
|
329
|
+
* gasUsed: 0n,
|
330
|
+
* timestamp: 1658281638n,
|
331
|
+
* extraData: '0x',
|
332
|
+
* mixHash: '0x0000000000000000000000000000000000000000000000000000000000000000',
|
333
|
+
* nonce: 0n,
|
334
|
+
* totalDifficulty: 1n,
|
335
|
+
* baseFeePerGas: 1000000000n,
|
336
|
+
* size: 514n,
|
337
|
+
* transactions: [],
|
338
|
+
* uncles: []
|
339
|
+
* }
|
340
|
+
*
|
341
|
+
* web3.eth.getBlock(
|
342
|
+
* "0x7dbfdc6a7a67a670cb9b0c3f81ca60c007762f1e4e598cb027a470678ff26d0d",
|
343
|
+
* false,
|
344
|
+
* { number: FMT_NUMBER.NUMBER , bytes: FMT_BYTES.HEX }
|
345
|
+
* ).then(console.log);
|
346
|
+
* > {
|
347
|
+
* hash: '0x7dbfdc6a7a67a670cb9b0c3f81ca60c007762f1e4e598cb027a470678ff26d0d',
|
348
|
+
* parentHash: '0x0000000000000000000000000000000000000000000000000000000000000000',
|
349
|
+
* sha3Uncles: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347',
|
350
|
+
* miner: '0x0000000000000000000000000000000000000000',
|
351
|
+
* stateRoot: '0x5ed9882897d363c4632a6e67fba6203df61bd994813dcf048da59be442a9c6c4',
|
352
|
+
* transactionsRoot: '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421',
|
353
|
+
* receiptsRoot: '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421',
|
354
|
+
* logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
|
355
|
+
* difficulty: 1,
|
356
|
+
* number: 0,
|
357
|
+
* gasLimit: 30000000,
|
358
|
+
* gasUsed: 0,
|
359
|
+
* timestamp: 1658281638,
|
360
|
+
* extraData: '0x',
|
361
|
+
* mixHash: '0x0000000000000000000000000000000000000000000000000000000000000000',
|
362
|
+
* nonce: 0,
|
363
|
+
* totalDifficulty: 1,
|
364
|
+
* baseFeePerGas: 1000000000,
|
365
|
+
* size: 514,
|
366
|
+
* transactions: [],
|
367
|
+
* uncles: []
|
368
|
+
* }
|
369
|
+
* ```
|
370
|
+
*/
|
371
|
+
getBlock(t = this.defaultBlock, i = !1, n = r) {
|
372
|
+
return e(this, void 0, void 0, function* () {
|
373
|
+
return W(this, t, i, n);
|
374
|
+
});
|
375
|
+
}
|
376
|
+
/**
|
377
|
+
* @param block The {@link BlockNumberOrTag} (defaults to {@link Web3Eth.defaultBlock}) or block hash of the desired block.
|
378
|
+
* @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.
|
379
|
+
* @returns The number of transactions in the provided block.
|
380
|
+
*
|
381
|
+
* ```ts
|
382
|
+
* web3.eth.getBlockTransactionCount("0x407d73d8a49eeb85d32cf465507dd71d507100c1").then(console.log);
|
383
|
+
* > 1n
|
384
|
+
*
|
385
|
+
* web3.eth.getBlockTransactionCount(
|
386
|
+
* "0x407d73d8a49eeb85d32cf465507dd71d507100c1",
|
387
|
+
* { number: FMT_NUMBER.NUMBER , bytes: FMT_BYTES.HEX }
|
388
|
+
* ).then(console.log);
|
389
|
+
* > 1
|
390
|
+
* ```
|
391
|
+
*/
|
392
|
+
getBlockTransactionCount(t = this.defaultBlock, i = r) {
|
393
|
+
return e(this, void 0, void 0, function* () {
|
394
|
+
return G(this, t, i);
|
395
|
+
});
|
396
|
+
}
|
397
|
+
/**
|
398
|
+
* @param block The {@link BlockNumberOrTag} (defaults to {@link Web3Eth.defaultBlock}) or block hash of the desired block.
|
399
|
+
* @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.
|
400
|
+
* @returns The number of [uncles](https://ethereum.org/en/glossary/#ommer) in the provided block.
|
401
|
+
*
|
402
|
+
* ```ts
|
403
|
+
* web3.eth.getBlockUncleCount("0x407d73d8a49eeb85d32cf465507dd71d507100c1").then(console.log);
|
404
|
+
* > 1n
|
405
|
+
*
|
406
|
+
* web3.eth.getBlockUncleCount(
|
407
|
+
* "0x407d73d8a49eeb85d32cf465507dd71d507100c1",
|
408
|
+
* { number: FMT_NUMBER.NUMBER , bytes: FMT_BYTES.HEX }
|
409
|
+
* ).then(console.log);
|
410
|
+
* > 1
|
411
|
+
* ```
|
412
|
+
*/
|
413
|
+
getBlockUncleCount(t = this.defaultBlock, i = r) {
|
414
|
+
return e(this, void 0, void 0, function* () {
|
415
|
+
return j(this, t, i);
|
416
|
+
});
|
417
|
+
}
|
418
|
+
/**
|
419
|
+
*
|
420
|
+
* @param block The {@link BlockNumberOrTag} (defaults to {@link Web3Eth.defaultBlock}) or block hash of the desired block.
|
421
|
+
* @param uncleIndex The index position of the uncle.
|
422
|
+
* @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.
|
423
|
+
* @returns A blocks [uncle](https://ethereum.org/en/glossary/#ommer) by a given uncle index position.
|
424
|
+
*
|
425
|
+
* ```ts
|
426
|
+
* web3.eth.getUncle(0, 1).then(console.log);
|
427
|
+
* > {
|
428
|
+
* hash: '0x7dbfdc6a7a67a670cb9b0c3f81ca60c007762f1e4e598cb027a470678ff26d0d',
|
429
|
+
* parentHash: '0x0000000000000000000000000000000000000000000000000000000000000000',
|
430
|
+
* sha3Uncles: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347',
|
431
|
+
* miner: '0x0000000000000000000000000000000000000000',
|
432
|
+
* stateRoot: '0x5ed9882897d363c4632a6e67fba6203df61bd994813dcf048da59be442a9c6c4',
|
433
|
+
* transactionsRoot: '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421',
|
434
|
+
* receiptsRoot: '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421',
|
435
|
+
* logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
|
436
|
+
* difficulty: 1n,
|
437
|
+
* number: 0n,
|
438
|
+
* gasLimit: 30000000n,
|
439
|
+
* gasUsed: 0n,
|
440
|
+
* timestamp: 1658281638n,
|
441
|
+
* extraData: '0x',
|
442
|
+
* mixHash: '0x0000000000000000000000000000000000000000000000000000000000000000',
|
443
|
+
* nonce: 0n,
|
444
|
+
* totalDifficulty: 1n,
|
445
|
+
* baseFeePerGas: 1000000000n,
|
446
|
+
* size: 514n,
|
447
|
+
* transactions: [],
|
448
|
+
* uncles: []
|
449
|
+
* }
|
450
|
+
*
|
451
|
+
* web3.eth.getUncle(
|
452
|
+
* "0x7dbfdc6a7a67a670cb9b0c3f81ca60c007762f1e4e598cb027a470678ff26d0d",
|
453
|
+
* 1,
|
454
|
+
* { number: FMT_NUMBER.NUMBER , bytes: FMT_BYTES.HEX }
|
455
|
+
* ).then(console.log);
|
456
|
+
* > {
|
457
|
+
* hash: '0x7dbfdc6a7a67a670cb9b0c3f81ca60c007762f1e4e598cb027a470678ff26d0d',
|
458
|
+
* parentHash: '0x0000000000000000000000000000000000000000000000000000000000000000',
|
459
|
+
* sha3Uncles: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347',
|
460
|
+
* miner: '0x0000000000000000000000000000000000000000',
|
461
|
+
* stateRoot: '0x5ed9882897d363c4632a6e67fba6203df61bd994813dcf048da59be442a9c6c4',
|
462
|
+
* transactionsRoot: '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421',
|
463
|
+
* receiptsRoot: '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421',
|
464
|
+
* logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
|
465
|
+
* difficulty: 1,
|
466
|
+
* number: 0,
|
467
|
+
* gasLimit: 30000000,
|
468
|
+
* gasUsed: 0,
|
469
|
+
* timestamp: 1658281638,
|
470
|
+
* extraData: '0x',
|
471
|
+
* mixHash: '0x0000000000000000000000000000000000000000000000000000000000000000',
|
472
|
+
* nonce: 0,
|
473
|
+
* totalDifficulty: 1,
|
474
|
+
* baseFeePerGas: 1000000000,
|
475
|
+
* size: 514,
|
476
|
+
* transactions: [],
|
477
|
+
* uncles: []
|
478
|
+
* }
|
479
|
+
* ```
|
480
|
+
*/
|
481
|
+
getUncle(t = this.defaultBlock, i, n = r) {
|
482
|
+
return e(this, void 0, void 0, function* () {
|
483
|
+
return D(this, t, i, n);
|
484
|
+
});
|
485
|
+
}
|
486
|
+
/**
|
487
|
+
* @param transactionHash The hash of the desired transaction.
|
488
|
+
* @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.
|
489
|
+
* @returns The desired transaction object.
|
490
|
+
*
|
491
|
+
* ```ts
|
492
|
+
* web3.eth.getTransaction('0x73aea70e969941f23f9d24103e91aa1f55c7964eb13daf1c9360c308a72686dc').then(console.log);
|
493
|
+
* {
|
494
|
+
* hash: '0x73aea70e969941f23f9d24103e91aa1f55c7964eb13daf1c9360c308a72686dc',
|
495
|
+
* type: 0n,
|
496
|
+
* nonce: 0n,
|
497
|
+
* blockHash: '0x43202bd16b6bd54bea1b310736bd78bdbe93a64ad940f7586739d9eb25ad8d00',
|
498
|
+
* blockNumber: 1n,
|
499
|
+
* transactionIndex: 0n,
|
500
|
+
* from: '0x6e599da0bff7a6598ac1224e4985430bf16458a4',
|
501
|
+
* to: '0x6f1df96865d09d21e8f3f9a7fba3b17a11c7c53c',
|
502
|
+
* value: 1n,
|
503
|
+
* gas: 90000n,
|
504
|
+
* gasPrice: 2000000000n,
|
505
|
+
* input: '0x',
|
506
|
+
* v: 2709n,
|
507
|
+
* r: '0x8b336c290f6d7b2af3ccb2c02203a8356cc7d5b150ab19cce549d55636a3a78c',
|
508
|
+
* s: '0x5a83c6f816befc5cd4b0c997a347224a8aa002e5799c4b082a3ec726d0e9531d'
|
509
|
+
* }
|
510
|
+
*
|
511
|
+
* web3.eth.getTransaction(
|
512
|
+
* web3.utils.hexToBytes("0x30755ed65396facf86c53e6217c52b4daebe72aa4941d89635409de4c9c7f9466d4e9aaec7977f05e923889b33c0d0dd27d7226b6e6f56ce737465c5cfd04be400"),
|
513
|
+
* { number: FMT_NUMBER.NUMBER , bytes: FMT_BYTES.HEX }
|
514
|
+
* ).then(console.log);
|
515
|
+
* {
|
516
|
+
* hash: '0x73aea70e969941f23f9d24103e91aa1f55c7964eb13daf1c9360c308a72686dc',
|
517
|
+
* type: 0,
|
518
|
+
* nonce: 0,
|
519
|
+
* blockHash: '0x43202bd16b6bd54bea1b310736bd78bdbe93a64ad940f7586739d9eb25ad8d00',
|
520
|
+
* blockNumber: 1,
|
521
|
+
* transactionIndex: 0,
|
522
|
+
* from: '0x6e599da0bff7a6598ac1224e4985430bf16458a4',
|
523
|
+
* to: '0x6f1df96865d09d21e8f3f9a7fba3b17a11c7c53c',
|
524
|
+
* value: 1,
|
525
|
+
* gas: 90000,
|
526
|
+
* gasPrice: 2000000000,
|
527
|
+
* input: '0x',
|
528
|
+
* v: 2709,
|
529
|
+
* r: '0x8b336c290f6d7b2af3ccb2c02203a8356cc7d5b150ab19cce549d55636a3a78c',
|
530
|
+
* s: '0x5a83c6f816befc5cd4b0c997a347224a8aa002e5799c4b082a3ec726d0e9531d'
|
531
|
+
* }
|
532
|
+
* ```
|
533
|
+
*/
|
534
|
+
getTransaction(t, i = r) {
|
535
|
+
return e(this, void 0, void 0, function* () {
|
536
|
+
const n = yield E(this, t, i);
|
537
|
+
if (!n)
|
538
|
+
throw new g();
|
539
|
+
return n;
|
540
|
+
});
|
541
|
+
}
|
542
|
+
/**
|
543
|
+
* @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.
|
544
|
+
* @returns A list of pending transactions.
|
545
|
+
*
|
546
|
+
* ```ts
|
547
|
+
* web3.eth.getPendingTransactions().then(console.log);
|
548
|
+
* > [
|
549
|
+
* {
|
550
|
+
* hash: '0x73aea70e969941f23f9d24103e91aa1f55c7964eb13daf1c9360c308a72686dc',
|
551
|
+
* type: 0n,
|
552
|
+
* nonce: 0n,
|
553
|
+
* blockHash: '0x0000000000000000000000000000000000000000000000000000000000000000',
|
554
|
+
* blockNumber: null,
|
555
|
+
* transactionIndex: 0n,
|
556
|
+
* from: '0x6e599da0bff7a6598ac1224e4985430bf16458a4',
|
557
|
+
* to: '0x6f1df96865d09d21e8f3f9a7fba3b17a11c7c53c',
|
558
|
+
* value: 1n,
|
559
|
+
* gas: 90000n,
|
560
|
+
* gasPrice: 2000000000n,
|
561
|
+
* input: '0x',
|
562
|
+
* v: 2709n,
|
563
|
+
* r: '0x8b336c290f6d7b2af3ccb2c02203a8356cc7d5b150ab19cce549d55636a3a78c',
|
564
|
+
* s: '0x5a83c6f816befc5cd4b0c997a347224a8aa002e5799c4b082a3ec726d0e9531d'
|
565
|
+
* },
|
566
|
+
* {
|
567
|
+
* hash: '0xdf7756865c2056ce34c4eabe4eff42ad251a9f920a1c620c00b4ea0988731d3f',
|
568
|
+
* type: 0n,
|
569
|
+
* nonce: 1n,
|
570
|
+
* blockHash: '0x0000000000000000000000000000000000000000000000000000000000000000',
|
571
|
+
* blockNumber: null,
|
572
|
+
* transactionIndex: 0n,
|
573
|
+
* from: '0x6e599da0bff7a6598ac1224e4985430bf16458a4',
|
574
|
+
* to: '0x6f1df96865d09d21e8f3f9a7fba3b17a11c7c53c',
|
575
|
+
* value: 1n,
|
576
|
+
* gas: 90000n,
|
577
|
+
* gasPrice: 2000000000n,
|
578
|
+
* input: '0x',
|
579
|
+
* v: 2710n,
|
580
|
+
* r: '0x55ac19fade21db035a1b7ea0a8d49e265e05dbb926e75f273f836ad67ce5c96a',
|
581
|
+
* s: '0x6550036a7c3fd426d5c3d35d96a7075cd673957620b7889846a980d2d017ec08'
|
582
|
+
* }
|
583
|
+
* ]
|
584
|
+
*
|
585
|
+
* * web3.eth.getPendingTransactions({ number: FMT_NUMBER.NUMBER , bytes: FMT_BYTES.HEX }).then(console.log);
|
586
|
+
* > [
|
587
|
+
* {
|
588
|
+
* hash: '0x73aea70e969941f23f9d24103e91aa1f55c7964eb13daf1c9360c308a72686dc',
|
589
|
+
* type: 0,
|
590
|
+
* nonce: 0,
|
591
|
+
* blockHash: '0x0000000000000000000000000000000000000000000000000000000000000000',
|
592
|
+
* blockNumber: null,
|
593
|
+
* transactionIndex: 0,
|
594
|
+
* from: '0x6e599da0bff7a6598ac1224e4985430bf16458a4',
|
595
|
+
* to: '0x6f1df96865d09d21e8f3f9a7fba3b17a11c7c53c',
|
596
|
+
* value: 1,
|
597
|
+
* gas: 90000,
|
598
|
+
* gasPrice: 2000000000,
|
599
|
+
* input: '0x',
|
600
|
+
* v: 2709,
|
601
|
+
* r: '0x8b336c290f6d7b2af3ccb2c02203a8356cc7d5b150ab19cce549d55636a3a78c',
|
602
|
+
* s: '0x5a83c6f816befc5cd4b0c997a347224a8aa002e5799c4b082a3ec726d0e9531d'
|
603
|
+
* },
|
604
|
+
* {
|
605
|
+
* hash: '0xdf7756865c2056ce34c4eabe4eff42ad251a9f920a1c620c00b4ea0988731d3f',
|
606
|
+
* type: 0,
|
607
|
+
* nonce: 1,
|
608
|
+
* blockHash: '0x0000000000000000000000000000000000000000000000000000000000000000',
|
609
|
+
* blockNumber: null,
|
610
|
+
* transactionIndex: 0,
|
611
|
+
* from: '0x6e599da0bff7a6598ac1224e4985430bf16458a4',
|
612
|
+
* to: '0x6f1df96865d09d21e8f3f9a7fba3b17a11c7c53c',
|
613
|
+
* value: 1,
|
614
|
+
* gas: 90000,
|
615
|
+
* gasPrice: 2000000000,
|
616
|
+
* input: '0x',
|
617
|
+
* v: 2710,
|
618
|
+
* r: '0x55ac19fade21db035a1b7ea0a8d49e265e05dbb926e75f273f836ad67ce5c96a',
|
619
|
+
* s: '0x6550036a7c3fd426d5c3d35d96a7075cd673957620b7889846a980d2d017ec08'
|
620
|
+
* }
|
621
|
+
* ]
|
622
|
+
* ```
|
623
|
+
*/
|
624
|
+
getPendingTransactions(t = r) {
|
625
|
+
return e(this, void 0, void 0, function* () {
|
626
|
+
return x(this, t);
|
627
|
+
});
|
628
|
+
}
|
629
|
+
/**
|
630
|
+
* @param block The {@link BlockNumberOrTag} (defaults to {@link Web3Eth.defaultBlock}) or block hash of the desired block.
|
631
|
+
* @param transactionIndex The index position of the transaction.
|
632
|
+
* @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.
|
633
|
+
* @returns The desired transaction object.
|
634
|
+
*
|
635
|
+
* ```ts
|
636
|
+
* web3.eth.getTransactionFromBlock('0x43202bd16b6bd54bea1b310736bd78bdbe93a64ad940f7586739d9eb25ad8d00', 0).then(console.log);
|
637
|
+
* {
|
638
|
+
* hash: '0x73aea70e969941f23f9d24103e91aa1f55c7964eb13daf1c9360c308a72686dc',
|
639
|
+
* type: 0n,
|
640
|
+
* nonce: 0n,
|
641
|
+
* blockHash: '0x43202bd16b6bd54bea1b310736bd78bdbe93a64ad940f7586739d9eb25ad8d00',
|
642
|
+
* blockNumber: 1n,
|
643
|
+
* transactionIndex: 0n,
|
644
|
+
* from: '0x6e599da0bff7a6598ac1224e4985430bf16458a4',
|
645
|
+
* to: '0x6f1df96865d09d21e8f3f9a7fba3b17a11c7c53c',
|
646
|
+
* value: 1n,
|
647
|
+
* gas: 90000n,
|
648
|
+
* gasPrice: 2000000000n,
|
649
|
+
* input: '0x',
|
650
|
+
* v: 2709n,
|
651
|
+
* r: '0x8b336c290f6d7b2af3ccb2c02203a8356cc7d5b150ab19cce549d55636a3a78c',
|
652
|
+
* s: '0x5a83c6f816befc5cd4b0c997a347224a8aa002e5799c4b082a3ec726d0e9531d'
|
653
|
+
* }
|
654
|
+
*
|
655
|
+
* web3.eth.getTransactionFromBlock(
|
656
|
+
* hexToBytes("0x30755ed65396facf86c53e6217c52b4daebe72aa4941d89635409de4c9c7f9466d4e9aaec7977f05e923889b33c0d0dd27d7226b6e6f56ce737465c5cfd04be400"),
|
657
|
+
* 0,
|
658
|
+
* { number: FMT_NUMBER.NUMBER , bytes: FMT_BYTES.HEX }
|
659
|
+
* ).then(console.log);
|
660
|
+
* {
|
661
|
+
* hash: '0x73aea70e969941f23f9d24103e91aa1f55c7964eb13daf1c9360c308a72686dc',
|
662
|
+
* type: 0,
|
663
|
+
* nonce: 0,
|
664
|
+
* blockHash: '0x43202bd16b6bd54bea1b310736bd78bdbe93a64ad940f7586739d9eb25ad8d00',
|
665
|
+
* blockNumber: 1,
|
666
|
+
* transactionIndex: 0,
|
667
|
+
* from: '0x6e599da0bff7a6598ac1224e4985430bf16458a4',
|
668
|
+
* to: '0x6f1df96865d09d21e8f3f9a7fba3b17a11c7c53c',
|
669
|
+
* value: 1,
|
670
|
+
* gas: 90000,
|
671
|
+
* gasPrice: 2000000000,
|
672
|
+
* input: '0x',
|
673
|
+
* v: 2709,
|
674
|
+
* r: '0x8b336c290f6d7b2af3ccb2c02203a8356cc7d5b150ab19cce549d55636a3a78c',
|
675
|
+
* s: '0x5a83c6f816befc5cd4b0c997a347224a8aa002e5799c4b082a3ec726d0e9531d'
|
676
|
+
* }
|
677
|
+
* ```
|
678
|
+
*/
|
679
|
+
getTransactionFromBlock(t = this.defaultBlock, i, n = r) {
|
680
|
+
return e(this, void 0, void 0, function* () {
|
681
|
+
return V(this, t, i, n);
|
682
|
+
});
|
683
|
+
}
|
684
|
+
/**
|
685
|
+
* @param transactionHash Hash of the transaction to retrieve the receipt for.
|
686
|
+
* @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.
|
687
|
+
* @returns The desired {@link TransactionReceipt} object.
|
688
|
+
*
|
689
|
+
* ```ts
|
690
|
+
* web3.eth.getTransactionReceipt("0xdf7756865c2056ce34c4eabe4eff42ad251a9f920a1c620c00b4ea0988731d3f").then(console.log);
|
691
|
+
* > {
|
692
|
+
* transactionHash: '0xdf7756865c2056ce34c4eabe4eff42ad251a9f920a1c620c00b4ea0988731d3f',
|
693
|
+
* transactionIndex: 0n,
|
694
|
+
* blockNumber: 2n,
|
695
|
+
* blockHash: '0xeb1565a08b23429552dafa92e32409f42eb43944f7611963c63ce40e7243941a',
|
696
|
+
* from: '0x6e599da0bff7a6598ac1224e4985430bf16458a4',
|
697
|
+
* to: '0x6f1df96865d09d21e8f3f9a7fba3b17a11c7c53c',
|
698
|
+
* cumulativeGasUsed: 21000n,
|
699
|
+
* gasUsed: 21000n,
|
700
|
+
* logs: [],
|
701
|
+
* logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
|
702
|
+
* status: 1n,
|
703
|
+
* effectiveGasPrice: 2000000000n,
|
704
|
+
* type: 0n
|
705
|
+
* }
|
706
|
+
*
|
707
|
+
* web3.eth.getTransactionReceipt(
|
708
|
+
* "0xdf7756865c2056ce34c4eabe4eff42ad251a9f920a1c620c00b4ea0988731d3f",
|
709
|
+
* { number: FMT_NUMBER.NUMBER , bytes: FMT_BYTES.HEX }
|
710
|
+
* ).then(console.log);
|
711
|
+
* > {
|
712
|
+
* transactionHash: '0xdf7756865c2056ce34c4eabe4eff42ad251a9f920a1c620c00b4ea0988731d3f',
|
713
|
+
* transactionIndex: 0,
|
714
|
+
* blockNumber: 2,
|
715
|
+
* blockHash: '0xeb1565a08b23429552dafa92e32409f42eb43944f7611963c63ce40e7243941a',
|
716
|
+
* from: '0x6e599da0bff7a6598ac1224e4985430bf16458a4',
|
717
|
+
* to: '0x6f1df96865d09d21e8f3f9a7fba3b17a11c7c53c',
|
718
|
+
* cumulativeGasUsed: 21000,
|
719
|
+
* gasUsed: 21000,
|
720
|
+
* logs: [],
|
721
|
+
* logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
|
722
|
+
* status: 1,
|
723
|
+
* effectiveGasPrice: 2000000000,
|
724
|
+
* type: 0n
|
725
|
+
* }
|
726
|
+
* ```
|
727
|
+
*/
|
728
|
+
getTransactionReceipt(t, i = r) {
|
729
|
+
return e(this, void 0, void 0, function* () {
|
730
|
+
const n = yield z(this, t, i);
|
731
|
+
if (!n)
|
732
|
+
throw new g();
|
733
|
+
return n;
|
734
|
+
});
|
735
|
+
}
|
736
|
+
/**
|
737
|
+
* @param address The address to get the number of transactions for.
|
738
|
+
* @param blockNumber ({@link BlockNumberOrTag} defaults to {@link Web3Eth.defaultBlock}) Specifies what block to use as the current state for the query.
|
739
|
+
* @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.
|
740
|
+
* @returns The number of transactions sent from the provided address.
|
741
|
+
*
|
742
|
+
* ```ts
|
743
|
+
* web3.eth.getTransactionCount("0x407d73d8a49eeb85d32cf465507dd71d507100c1").then(console.log);
|
744
|
+
* > 1n
|
745
|
+
*
|
746
|
+
* web3.eth.getTransactionCount(
|
747
|
+
* "0x407d73d8a49eeb85d32cf465507dd71d507100c1",
|
748
|
+
* undefined,
|
749
|
+
* { number: FMT_NUMBER.NUMBER , bytes: FMT_BYTES.HEX }
|
750
|
+
* ).then(console.log);
|
751
|
+
* > 1
|
752
|
+
* ```
|
753
|
+
*/
|
754
|
+
getTransactionCount(t, i = this.defaultBlock, n = r) {
|
755
|
+
return e(this, void 0, void 0, function* () {
|
756
|
+
return J(this, t, i, n);
|
757
|
+
});
|
758
|
+
}
|
759
|
+
/**
|
760
|
+
* @param transaction The {@link Transaction}, {@link TransactionWithFromLocalWalletIndex}, {@link TransactionWithToLocalWalletIndex} or {@link TransactionWithFromAndToLocalWalletIndex} to send. __Note:__ In the `to` and `from` fields when hex strings are used, it is assumed they are addresses, for any other form (number, string number, etc.) it is assumed they are wallet indexes.
|
761
|
+
* @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.
|
762
|
+
* @param options A configuration object used to change the behavior of the `sendTransaction` method.
|
763
|
+
* @returns If `await`ed or `.then`d (i.e. the promise resolves), the transaction hash is returned.
|
764
|
+
* ```ts
|
765
|
+
* const transaction = {
|
766
|
+
* from: '0x6E599DA0bfF7A6598AC1224E4985430Bf16458a4',
|
767
|
+
* to: '0x6f1DF96865D09d21e8f3f9a7fbA3b17A11c7C53C',
|
768
|
+
* value: '0x1'
|
769
|
+
* }
|
770
|
+
*
|
771
|
+
* const transactionHash = await web3.eth.sendTransaction(transaction);
|
772
|
+
* console.log(transactionHash);
|
773
|
+
* > 0xdf7756865c2056ce34c4eabe4eff42ad251a9f920a1c620c00b4ea0988731d3f
|
774
|
+
*
|
775
|
+
* web3.eth.sendTransaction(transaction).then(console.log);
|
776
|
+
* > 0xdf7756865c2056ce34c4eabe4eff42ad251a9f920a1c620c00b4ea0988731d3f
|
777
|
+
*
|
778
|
+
* web3.eth.sendTransaction(transaction).catch(console.log);
|
779
|
+
* > <Some TransactionError>
|
780
|
+
*
|
781
|
+
* // Example using options.ignoreGasPricing = true
|
782
|
+
* web3.eth.sendTransaction(transaction, undefined, { ignoreGasPricing: true }).then(console.log);
|
783
|
+
* > 0xdf7756865c2056ce34c4eabe4eff42ad251a9f920a1c620c00b4ea0988731d3f
|
784
|
+
* ```
|
785
|
+
*
|
786
|
+
*
|
787
|
+
* Otherwise, a {@link Web3PromiEvent} is returned which has several events than can be listened to using the `.on` syntax, such as:
|
788
|
+
* - `sending`
|
789
|
+
* ```ts
|
790
|
+
* web3.eth.sendTransaction(transaction).on('sending', transactionToBeSent => console.log(transactionToBeSent));
|
791
|
+
* > {
|
792
|
+
* from: '0x6E599DA0bfF7A6598AC1224E4985430Bf16458a4',
|
793
|
+
* to: '0x6f1DF96865D09d21e8f3f9a7fbA3b17A11c7C53C',
|
794
|
+
* value: '0x1',
|
795
|
+
* gasPrice: '0x77359400',
|
796
|
+
* maxPriorityFeePerGas: undefined,
|
797
|
+
* maxFeePerGas: undefined
|
798
|
+
* }
|
799
|
+
* ```
|
800
|
+
* - `sent`
|
801
|
+
* ```ts
|
802
|
+
* web3.eth.sendTransaction(transaction).on('sent', sentTransaction => console.log(sentTransaction));
|
803
|
+
* > {
|
804
|
+
* from: '0x6E599DA0bfF7A6598AC1224E4985430Bf16458a4',
|
805
|
+
* to: '0x6f1DF96865D09d21e8f3f9a7fbA3b17A11c7C53C',
|
806
|
+
* value: '0x1',
|
807
|
+
* gasPrice: '0x77359400',
|
808
|
+
* maxPriorityFeePerGas: undefined,
|
809
|
+
* maxFeePerGas: undefined
|
810
|
+
* }
|
811
|
+
* ```
|
812
|
+
* - `transactionHash`
|
813
|
+
* ```ts
|
814
|
+
* web3.eth.sendTransaction(transaction).on('transactionHash', transactionHash => console.log(transactionHash));
|
815
|
+
* > 0xdf7756865c2056ce34c4eabe4eff42ad251a9f920a1c620c00b4ea0988731d3f
|
816
|
+
* ```
|
817
|
+
* - `receipt`
|
818
|
+
* ```ts
|
819
|
+
* web3.eth.sendTransaction(transaction).on('receipt', receipt => console.log(receipt));
|
820
|
+
* > {
|
821
|
+
* transactionHash: '0xdf7756865c2056ce34c4eabe4eff42ad251a9f920a1c620c00b4ea0988731d3f',
|
822
|
+
* transactionIndex: 0n,
|
823
|
+
* blockNumber: 2n,
|
824
|
+
* blockHash: '0xeb1565a08b23429552dafa92e32409f42eb43944f7611963c63ce40e7243941a',
|
825
|
+
* from: '0x6e599da0bff7a6598ac1224e4985430bf16458a4',
|
826
|
+
* to: '0x6f1df96865d09d21e8f3f9a7fba3b17a11c7c53c',
|
827
|
+
* cumulativeGasUsed: 21000n,
|
828
|
+
* gasUsed: 21000n,
|
829
|
+
* logs: [],
|
830
|
+
* logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
|
831
|
+
* status: 1n,
|
832
|
+
* effectiveGasPrice: 2000000000n,
|
833
|
+
* type: 0n
|
834
|
+
* }
|
835
|
+
* ```
|
836
|
+
* - `confirmation`
|
837
|
+
* ```ts
|
838
|
+
* web3.eth.sendTransaction(transaction).on('confirmation', confirmation => console.log(confirmation));
|
839
|
+
* > {
|
840
|
+
* confirmations: 1n,
|
841
|
+
* receipt: {
|
842
|
+
* transactionHash: '0xb4a3a35ae0f3e77ef0ff7be42010d948d011b21a4e341072ee18717b67e99ab8',
|
843
|
+
* transactionIndex: 0n,
|
844
|
+
* blockNumber: 5n,
|
845
|
+
* blockHash: '0xb57fbe6f145cefd86a305a9a024a4351d15d4d39607d7af53d69a319bc3b5548',
|
846
|
+
* from: '0x6e599da0bff7a6598ac1224e4985430bf16458a4',
|
847
|
+
* to: '0x6f1df96865d09d21e8f3f9a7fba3b17a11c7c53c',
|
848
|
+
* cumulativeGasUsed: 21000n,
|
849
|
+
* gasUsed: 21000n,
|
850
|
+
* logs: [],
|
851
|
+
* logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
|
852
|
+
* status: 1n,
|
853
|
+
* effectiveGasPrice: 2000000000n,
|
854
|
+
* type: 0n
|
855
|
+
* },
|
856
|
+
* latestBlockHash: '0xb57fbe6f145cefd86a305a9a024a4351d15d4d39607d7af53d69a319bc3b5548'
|
857
|
+
* }
|
858
|
+
* ```
|
859
|
+
* - `error`
|
860
|
+
* ```ts
|
861
|
+
* web3.eth.sendTransaction(transaction).on('error', error => console.log);
|
862
|
+
* > <Some TransactionError>
|
863
|
+
* ```
|
864
|
+
*/
|
865
|
+
sendTransaction(t, i = r, n) {
|
866
|
+
return K(this, t, i, n);
|
867
|
+
}
|
868
|
+
/**
|
869
|
+
* @param transaction Signed transaction in one of the valid {@link Bytes} format.
|
870
|
+
* @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.
|
871
|
+
* @returns If `await`ed or `.then`d (i.e. the promise resolves), the transaction hash is returned.
|
872
|
+
* ```ts
|
873
|
+
* const signedTransaction = "0xf86580843b9aca0182520894e899f0130fd099c0b896b2ce4e5e15a25b23139a0180820a95a03a42d53ca5b71f845e1cd4c65359b05446a85d16881372d3bfaab8980935cb04a0711497bc8dd3b541152e2fed14fe650a647f1f0edab0d386ad9506f0e642410f"
|
874
|
+
*
|
875
|
+
* const transactionHash = await web3.eth.sendSignedTransaction(signedTransaction);
|
876
|
+
* console.log(transactionHash);
|
877
|
+
* > 0xed8c241ea44d57f4605dc22c63500de46254d6c7844fd65fa438b128c80cf700
|
878
|
+
*
|
879
|
+
* web3.eth.sendSignedTransaction(signedTransaction).then(console.log);
|
880
|
+
* > 0xed8c241ea44d57f4605dc22c63500de46254d6c7844fd65fa438b128c80cf700
|
881
|
+
*
|
882
|
+
* web3.eth.sendSignedTransaction(signedTransaction).catch(console.log);
|
883
|
+
* > <Some TransactionError>
|
884
|
+
* ```
|
885
|
+
*
|
886
|
+
*
|
887
|
+
* Otherwise, a {@link Web3PromiEvent} is returned which has several events than can be listened to using the `.on` syntax, such as:
|
888
|
+
* - `sending`
|
889
|
+
* ```ts
|
890
|
+
* web3.eth.sendSignedTransaction(signedTransaction).on('sending', transactionToBeSent => console.log(transactionToBeSent));
|
891
|
+
* > "0xf86580843b9aca0182520894e899f0130fd099c0b896b2ce4e5e15a25b23139a0180820a95a03a42d53ca5b71f845e1cd4c65359b05446a85d16881372d3bfaab8980935cb04a0711497bc8dd3b541152e2fed14fe650a647f1f0edab0d386ad9506f0e642410f"
|
892
|
+
* ```
|
893
|
+
* - `sent`
|
894
|
+
* ```ts
|
895
|
+
* web3.eth.sendSignedTransaction(signedTransaction).on('sent', sentTransaction => console.log(sentTransaction));
|
896
|
+
* > "0xf86580843b9aca0182520894e899f0130fd099c0b896b2ce4e5e15a25b23139a0180820a95a03a42d53ca5b71f845e1cd4c65359b05446a85d16881372d3bfaab8980935cb04a0711497bc8dd3b541152e2fed14fe650a647f1f0edab0d386ad9506f0e642410f"
|
897
|
+
* ```
|
898
|
+
* - `transactionHash`
|
899
|
+
* ```ts
|
900
|
+
* web3.eth.sendSignedTransaction(signedTransaction).on('transactionHash', transactionHash => console.log(transactionHash));
|
901
|
+
* > 0xed8c241ea44d57f4605dc22c63500de46254d6c7844fd65fa438b128c80cf700
|
902
|
+
* ```
|
903
|
+
* - `receipt`
|
904
|
+
* ```ts
|
905
|
+
* web3.eth.sendSignedTransaction(signedTransaction).on('receipt', receipt => console.log(receipt));
|
906
|
+
* > {
|
907
|
+
* blockHash: '0xff2b1687995d81066361bc6affe4455746120a7d4bb75fc938211a2692a50081',
|
908
|
+
* blockNumber: 1n,
|
909
|
+
* cumulativeGasUsed: 21000n,
|
910
|
+
* effectiveGasPrice: 1000000001n,
|
911
|
+
* from: '0xe899f0130fd099c0b896b2ce4e5e15a25b23139a',
|
912
|
+
* gasUsed: 21000n,
|
913
|
+
* logs: [],
|
914
|
+
* logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
|
915
|
+
* status: 1n,
|
916
|
+
* to: '0xe899f0130fd099c0b896b2ce4e5e15a25b23139a',
|
917
|
+
* transactionHash: '0xed8c241ea44d57f4605dc22c63500de46254d6c7844fd65fa438b128c80cf700',
|
918
|
+
* transactionIndex: 0n,
|
919
|
+
* type: 0n
|
920
|
+
* }
|
921
|
+
* ```
|
922
|
+
* - `confirmation`
|
923
|
+
* ```ts
|
924
|
+
* web3.eth.sendSignedTransaction(signedTransaction).on('confirmation', confirmation => console.log(confirmation));
|
925
|
+
* > {
|
926
|
+
* confirmations: 1n,
|
927
|
+
* receipt: {
|
928
|
+
* blockHash: '0xff2b1687995d81066361bc6affe4455746120a7d4bb75fc938211a2692a50081',
|
929
|
+
* blockNumber: 1n,
|
930
|
+
* cumulativeGasUsed: 21000n,
|
931
|
+
* effectiveGasPrice: 1000000001n,
|
932
|
+
* from: '0xe899f0130fd099c0b896b2ce4e5e15a25b23139a',
|
933
|
+
* gasUsed: 21000n,
|
934
|
+
* logs: [],
|
935
|
+
* logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
|
936
|
+
* status: 1n,
|
937
|
+
* to: '0xe899f0130fd099c0b896b2ce4e5e15a25b23139a',
|
938
|
+
* transactionHash: '0xed8c241ea44d57f4605dc22c63500de46254d6c7844fd65fa438b128c80cf700',
|
939
|
+
* transactionIndex: 0n,
|
940
|
+
* type: 0n
|
941
|
+
* },
|
942
|
+
* latestBlockHash: '0xff2b1687995d81066361bc6affe4455746120a7d4bb75fc938211a2692a50081'
|
943
|
+
* }
|
944
|
+
* ```
|
945
|
+
* - `error`
|
946
|
+
* ```ts
|
947
|
+
* web3.eth.sendSignedTransaction(signedTransaction).on('error', error => console.log(error));
|
948
|
+
* > <Some TransactionError>
|
949
|
+
* ```
|
950
|
+
*/
|
951
|
+
sendSignedTransaction(t, i = r, n) {
|
952
|
+
return Q(this, t, i, n);
|
953
|
+
}
|
954
|
+
/**
|
955
|
+
* @param message Data to sign in one of the valid {@link Bytes} format.
|
956
|
+
* @param address Address to sign data with, can be an address or the index of a local wallet.
|
957
|
+
* @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.
|
958
|
+
* @returns The signed `message`.
|
959
|
+
*
|
960
|
+
* ```ts
|
961
|
+
* // Using an unlocked account managed by connected RPC client
|
962
|
+
* web3.eth.sign("0x48656c6c6f20776f726c64", "0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe").then(console.log);
|
963
|
+
* > "0x30755ed65396facf86c53e6217c52b4daebe72aa4941d89635409de4c9c7f9466d4e9aaec7977f05e923889b33c0d0dd27d7226b6e6f56ce737465c5cfd04be400"
|
964
|
+
*
|
965
|
+
* // Using an unlocked account managed by connected RPC client
|
966
|
+
* web3.eth.sign("0x48656c6c6f20776f726c64", "0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe", { number: FMT_NUMBER.NUMBER , bytes: FMT_BYTES.UINT8ARRAY }).then(console.log);
|
967
|
+
* > Uint8Array(65) [
|
968
|
+
* 48, 117, 94, 214, 83, 150, 250, 207, 134, 197, 62,
|
969
|
+
* 98, 23, 197, 43, 77, 174, 190, 114, 170, 73, 65,
|
970
|
+
* 216, 150, 53, 64, 157, 228, 201, 199, 249, 70, 109,
|
971
|
+
* 78, 154, 174, 199, 151, 127, 5, 233, 35, 136, 155,
|
972
|
+
* 51, 192, 208, 221, 39, 215, 34, 107, 110, 111, 86,
|
973
|
+
* 206, 115, 116, 101, 197, 207, 208, 75, 228, 0
|
974
|
+
* ]
|
975
|
+
* ```
|
976
|
+
*
|
977
|
+
* // Using an indexed account managed by local Web3 wallet
|
978
|
+
* web3.eth.sign("0x48656c6c6f20776f726c64", 0).then(console.log);
|
979
|
+
* > "0x30755ed65396facf86c53e6217c52b4daebe72aa4941d89635409de4c9c7f9466d4e9aaec7977f05e923889b33c0d0dd27d7226b6e6f56ce737465c5cfd04be400"
|
980
|
+
*/
|
981
|
+
sign(t, i, n = r) {
|
982
|
+
return e(this, void 0, void 0, function* () {
|
983
|
+
return X(this, t, i, n);
|
984
|
+
});
|
985
|
+
}
|
986
|
+
/**
|
987
|
+
* @param transaction The transaction object to sign.
|
988
|
+
* @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) Specifies how the return data should be formatted.
|
989
|
+
* @returns {@link SignedTransactionInfoAPI}, an object containing the [RLP](https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/#top) encoded signed transaction (accessed via the `raw` property) and the signed transaction object (accessed via the `tx` property).
|
990
|
+
*
|
991
|
+
* ```ts
|
992
|
+
* const transaction = {
|
993
|
+
* from: '0xe899f0130FD099c0b896B2cE4E5E15A25b23139a',
|
994
|
+
* to: '0xe899f0130FD099c0b896B2cE4E5E15A25b23139a',
|
995
|
+
* value: '0x1',
|
996
|
+
* gas: '21000',
|
997
|
+
* gasPrice: await web3Eth.getGasPrice(),
|
998
|
+
* nonce: '0x1',
|
999
|
+
* type: '0x0'
|
1000
|
+
* }
|
1001
|
+
*
|
1002
|
+
* web3.eth.signTransaction(transaction).then(console.log);
|
1003
|
+
* > {
|
1004
|
+
* raw: '0xf86501843b9aca0182520894e899f0130fd099c0b896b2ce4e5e15a25b23139a0180820a96a0adb3468dbb4dce89fe1785ea9182e85fb56b399b378f82b93af7a8a12a4f9679a027d37d736e9bcf00121f78b2d10e4404fa5c45856d62b746574345f5cd278097',
|
1005
|
+
* tx: {
|
1006
|
+
* type: 0n,
|
1007
|
+
* nonce: 1n,
|
1008
|
+
* gasPrice: 1000000001n,
|
1009
|
+
* gas: 21000n,
|
1010
|
+
* value: 1n,
|
1011
|
+
* v: 2710n,
|
1012
|
+
* r: '0xadb3468dbb4dce89fe1785ea9182e85fb56b399b378f82b93af7a8a12a4f9679',
|
1013
|
+
* s: '0x27d37d736e9bcf00121f78b2d10e4404fa5c45856d62b746574345f5cd278097',
|
1014
|
+
* to: '0xe899f0130fd099c0b896b2ce4e5e15a25b23139a',
|
1015
|
+
* data: '0x'
|
1016
|
+
* }
|
1017
|
+
* }
|
1018
|
+
*
|
1019
|
+
* web3.eth.signTransaction(transaction, { number: FMT_NUMBER.NUMBER , bytes: FMT_BYTES.HEX }).then(console.log);
|
1020
|
+
* > {
|
1021
|
+
* raw: '0xf86501843b9aca0182520894e899f0130fd099c0b896b2ce4e5e15a25b23139a0180820a96a0adb3468dbb4dce89fe1785ea9182e85fb56b399b378f82b93af7a8a12a4f9679a027d37d736e9bcf00121f78b2d10e4404fa5c45856d62b746574345f5cd278097',
|
1022
|
+
* tx: {
|
1023
|
+
* type: 0,
|
1024
|
+
* nonce: 1,
|
1025
|
+
* gasPrice: 1000000001,
|
1026
|
+
* gas: 21000,
|
1027
|
+
* value: 1,
|
1028
|
+
* v: 2710,
|
1029
|
+
* r: '0xadb3468dbb4dce89fe1785ea9182e85fb56b399b378f82b93af7a8a12a4f9679',
|
1030
|
+
* s: '0x27d37d736e9bcf00121f78b2d10e4404fa5c45856d62b746574345f5cd278097',
|
1031
|
+
* to: '0xe899f0130fd099c0b896b2ce4e5e15a25b23139a',
|
1032
|
+
* data: '0x'
|
1033
|
+
* }
|
1034
|
+
* }
|
1035
|
+
* ```
|
1036
|
+
*/
|
1037
|
+
signTransaction(t, i = r) {
|
1038
|
+
return e(this, void 0, void 0, function* () {
|
1039
|
+
return Y(this, t, i);
|
1040
|
+
});
|
1041
|
+
}
|
1042
|
+
// TODO Decide what to do with transaction.to
|
1043
|
+
// https://github.com/ChainSafe/web3.js/pull/4525#issuecomment-982330076
|
1044
|
+
/**
|
1045
|
+
* Executes a message call within the EVM without creating a transaction.
|
1046
|
+
* It does not publish anything to the blockchain and does not consume any gas.
|
1047
|
+
*
|
1048
|
+
* @param transaction - A transaction object where all properties are optional except `to`, however it's recommended to include the `from` property or it may default to `0x0000000000000000000000000000000000000000` depending on your node or provider.
|
1049
|
+
* @param blockNumber ({@link BlockNumberOrTag} defaults to {@link Web3Eth.defaultBlock}) - Specifies what block to use as the current state of the blockchain while processing the transaction.
|
1050
|
+
* @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) - Specifies how the return data from the call should be formatted.
|
1051
|
+
* @returns The returned data of the call, e.g. a smart contract function's return value.
|
1052
|
+
*/
|
1053
|
+
call(t, i = this.defaultBlock, n = r) {
|
1054
|
+
return e(this, void 0, void 0, function* () {
|
1055
|
+
return Z(this, t, i, n);
|
1056
|
+
});
|
1057
|
+
}
|
1058
|
+
/**
|
1059
|
+
* Simulates the transaction within the EVM to estimate the amount of gas to be used by the transaction.
|
1060
|
+
* The transaction will not be added to the blockchain, and actual gas usage can vary when interacting
|
1061
|
+
* with a contract as a result of updating the contract's state.
|
1062
|
+
*
|
1063
|
+
* @param transaction The {@link Transaction} object to estimate the gas for.
|
1064
|
+
* @param blockNumber ({@link BlockNumberOrTag} defaults to {@link Web3Eth.defaultBlock}) - Specifies what block to use as the current state of the blockchain while processing the gas estimation.
|
1065
|
+
* @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) - Specifies how the return data from the call should be formatted.
|
1066
|
+
* @returns The used gas for the simulated transaction execution.
|
1067
|
+
*
|
1068
|
+
* ```ts
|
1069
|
+
* const transaction = {
|
1070
|
+
* from: '0xe899f0130FD099c0b896B2cE4E5E15A25b23139a',
|
1071
|
+
* to: '0xe899f0130FD099c0b896B2cE4E5E15A25b23139a',
|
1072
|
+
* value: '0x1',
|
1073
|
+
* nonce: '0x1',
|
1074
|
+
* type: '0x0'
|
1075
|
+
* }
|
1076
|
+
*
|
1077
|
+
* web3.eth.estimateGas(transaction).then(console.log);
|
1078
|
+
* > 21000n
|
1079
|
+
*
|
1080
|
+
* web3.eth.estimateGas(transaction, { number: FMT_NUMBER.NUMBER , bytes: FMT_BYTES.HEX }).then(console.log);
|
1081
|
+
* > 21000
|
1082
|
+
* ```
|
1083
|
+
*/
|
1084
|
+
estimateGas(t, i = this.defaultBlock, n = r) {
|
1085
|
+
return e(this, void 0, void 0, function* () {
|
1086
|
+
return $(this, t, i, n);
|
1087
|
+
});
|
1088
|
+
}
|
1089
|
+
/**
|
1090
|
+
* Gets past logs, matching the provided `filter`.
|
1091
|
+
*
|
1092
|
+
* @param filter A {@link Filter} object containing the properties for the desired logs.
|
1093
|
+
* @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) - Specifies how the return data from the call should be formatted.
|
1094
|
+
* @returns {@link FilterResultsAPI}, an array of {@link Log} objects.
|
1095
|
+
*
|
1096
|
+
* ```ts
|
1097
|
+
* web3.eth.getPastLogs({
|
1098
|
+
* address: "0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe",
|
1099
|
+
* topics: ["0x033456732123ffff2342342dd12342434324234234fd234fd23fd4f23d4234"]
|
1100
|
+
* }).then(console.log);
|
1101
|
+
* > [{
|
1102
|
+
* data: '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385',
|
1103
|
+
* topics: ['0xfd43ade1c09fade1c0d57a7af66ab4ead7c2c2eb7b11a91ffdd57a7af66ab4ead7', '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385']
|
1104
|
+
* logIndex: 0n,
|
1105
|
+
* transactionIndex: 0n,
|
1106
|
+
* transactionHash: '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385',
|
1107
|
+
* blockHash: '0xfd43ade1c09fade1c0d57a7af66ab4ead7c2c2eb7b11a91ffdd57a7af66ab4ead7',
|
1108
|
+
* blockNumber: 1234n,
|
1109
|
+
* address: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe'
|
1110
|
+
* },
|
1111
|
+
* {...}]
|
1112
|
+
*
|
1113
|
+
* web3.eth.getPastLogs(
|
1114
|
+
* {
|
1115
|
+
* address: "0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe",
|
1116
|
+
* topics: ["0x033456732123ffff2342342dd12342434324234234fd234fd23fd4f23d4234"]
|
1117
|
+
* },
|
1118
|
+
* { number: FMT_NUMBER.NUMBER , bytes: FMT_BYTES.HEX }
|
1119
|
+
* ).then(console.log);
|
1120
|
+
* > [{
|
1121
|
+
* data: '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385',
|
1122
|
+
* topics: ['0xfd43ade1c09fade1c0d57a7af66ab4ead7c2c2eb7b11a91ffdd57a7af66ab4ead7', '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385']
|
1123
|
+
* logIndex: 0,
|
1124
|
+
* transactionIndex: 0,
|
1125
|
+
* transactionHash: '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385',
|
1126
|
+
* blockHash: '0xfd43ade1c09fade1c0d57a7af66ab4ead7c2c2eb7b11a91ffdd57a7af66ab4ead7',
|
1127
|
+
* blockNumber: 1234,
|
1128
|
+
* address: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe'
|
1129
|
+
* },
|
1130
|
+
* {...}]
|
1131
|
+
* ```
|
1132
|
+
*/
|
1133
|
+
getPastLogs(t, i = r) {
|
1134
|
+
return e(this, void 0, void 0, function* () {
|
1135
|
+
return O(this, t, i);
|
1136
|
+
});
|
1137
|
+
}
|
1138
|
+
/**
|
1139
|
+
* Gets work for miners to mine on. Returns the hash of the current block, the seedHash, and the boundary condition to be met ('target').
|
1140
|
+
*
|
1141
|
+
* @returns The mining work as an array of strings with the following structure:
|
1142
|
+
*
|
1143
|
+
* String 32 Bytes - at index 0: current block header pow-hash
|
1144
|
+
* String 32 Bytes - at index 1: the seed hash used for the DAG.
|
1145
|
+
* String 32 Bytes - at index 2: the boundary condition ('target'), 2^256 / difficulty.
|
1146
|
+
*
|
1147
|
+
* ```ts
|
1148
|
+
* web3.eth.getWork().then(console.log);
|
1149
|
+
* > [
|
1150
|
+
* "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
|
1151
|
+
* "0x5EED00000000000000000000000000005EED0000000000000000000000000000",
|
1152
|
+
* "0xd1ff1c01710000000000000000000000d1ff1c01710000000000000000000000"
|
1153
|
+
* ]
|
1154
|
+
* ```
|
1155
|
+
*/
|
1156
|
+
getWork() {
|
1157
|
+
return e(this, void 0, void 0, function* () {
|
1158
|
+
return C(this.requestManager);
|
1159
|
+
});
|
1160
|
+
}
|
1161
|
+
/**
|
1162
|
+
* Used for submitting a proof-of-work solution.
|
1163
|
+
*
|
1164
|
+
* @param nonce The nonce found (8 bytes).
|
1165
|
+
* @param hash The header’s pow-hash (32 bytes).
|
1166
|
+
* @param digest The mix digest (32 bytes).
|
1167
|
+
* @returns Returns `true` if the provided solution is valid, otherwise `false`.
|
1168
|
+
*
|
1169
|
+
* ```ts
|
1170
|
+
* web3.eth.submitWork([
|
1171
|
+
* "0x0000000000000001",
|
1172
|
+
* "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
|
1173
|
+
* "0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000"
|
1174
|
+
* ]).then(console.log);
|
1175
|
+
* > true
|
1176
|
+
* ```
|
1177
|
+
*/
|
1178
|
+
submitWork(t, i, n) {
|
1179
|
+
return e(this, void 0, void 0, function* () {
|
1180
|
+
return N(this.requestManager, t, i, n);
|
1181
|
+
});
|
1182
|
+
}
|
1183
|
+
// TODO - Format addresses
|
1184
|
+
/**
|
1185
|
+
* This method will request/enable the accounts from the current environment and for supporting [EIP 1102](https://eips.ethereum.org/EIPS/eip-1102)
|
1186
|
+
* This method will only work if you’re using the injected provider from a application like Metamask, Status or TrustWallet.
|
1187
|
+
* It doesn’t work if you’re connected to a node with a default Web3.js provider (WebsocketProvider, HttpProvider and IpcProvider).
|
1188
|
+
* For more information about the behavior of this method please read [EIP-1102](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1102.md): Opt-in account exposure.
|
1189
|
+
*
|
1190
|
+
* @returns An array of enabled accounts.
|
1191
|
+
*
|
1192
|
+
* ```ts
|
1193
|
+
* web3.eth.requestAccounts().then(console.log);
|
1194
|
+
* > ['0aae0B295369a9FD31d5F28D9Ec85E40f4cb692BAf', '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe']
|
1195
|
+
* ```
|
1196
|
+
*/
|
1197
|
+
requestAccounts() {
|
1198
|
+
return e(this, void 0, void 0, function* () {
|
1199
|
+
return P(this.requestManager);
|
1200
|
+
});
|
1201
|
+
}
|
1202
|
+
/**
|
1203
|
+
* @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) - Specifies how the return data from the call should be formatted.
|
1204
|
+
* @returns The chain ID of the current connected node as described in the [EIP-695](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-695.md).
|
1205
|
+
*
|
1206
|
+
* ```ts
|
1207
|
+
* web3.eth.getChainId().then(console.log);
|
1208
|
+
* > 61n
|
1209
|
+
*
|
1210
|
+
* web3.eth.getChainId({ number: FMT_NUMBER.NUMBER , bytes: FMT_BYTES.HEX }).then(console.log);
|
1211
|
+
* > 61
|
1212
|
+
* ```
|
1213
|
+
*/
|
1214
|
+
getChainId(t = r) {
|
1215
|
+
return e(this, void 0, void 0, function* () {
|
1216
|
+
return tt(this, t);
|
1217
|
+
});
|
1218
|
+
}
|
1219
|
+
/**
|
1220
|
+
* @returns The current client version.
|
1221
|
+
*
|
1222
|
+
* ```ts
|
1223
|
+
* web3.eth.getNodeInfo().then(console.log);
|
1224
|
+
* > "Mist/v0.9.3/darwin/go1.4.1"
|
1225
|
+
* ```
|
1226
|
+
*/
|
1227
|
+
getNodeInfo() {
|
1228
|
+
return e(this, void 0, void 0, function* () {
|
1229
|
+
return _(this.requestManager);
|
1230
|
+
});
|
1231
|
+
}
|
1232
|
+
/**
|
1233
|
+
* @param address The Address of the account or contract.
|
1234
|
+
* @param storageKeys Array of storage-keys which should be proofed and included. See {@link web3.getStorageAt}.
|
1235
|
+
* @param blockNumber ({@link BlockNumberOrTag} defaults to {@link Web3Eth.defaultBlock}) - Specifies what block to use as the current state of the blockchain while processing the gas estimation.
|
1236
|
+
* @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) - Specifies how the return data from the call should be formatted.
|
1237
|
+
* @returns The account and storage-values of the specified account including the Merkle-proof as described in [EIP-1186](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1186.md).
|
1238
|
+
*
|
1239
|
+
* ```ts
|
1240
|
+
* web3.eth.getProof(
|
1241
|
+
* "0x1234567890123456789012345678901234567890",
|
1242
|
+
* ["0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000001"],
|
1243
|
+
* "latest"
|
1244
|
+
* ).then(console.log);
|
1245
|
+
* > {
|
1246
|
+
* "address": "0x1234567890123456789012345678901234567890",
|
1247
|
+
* "accountProof": [
|
1248
|
+
* "0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021a0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315b61d9f6bd68bfe587ad0eeceb721a07117ef9fc932f1a88e908eaead8565c19b5645dc9e5b1b6e841c5edbdfd71681a069eb2de283f32c11f859d7bcf93da23990d3e662935ed4d6b39ce3673ec84472a0203d26456312bbc4da5cd293b75b840fc5045e493d6f904d180823ec22bfed8ea09287b5c21f2254af4e64fca76acc5cd87399c7f1ede818db4326c98ce2dc2208a06fc2d754e304c48ce6a517753c62b1a9c1d5925b89707486d7fc08919e0a94eca07b1c54f15e299bd58bdfef9741538c7828b5d7d11a489f9c20d052b3471df475a051f9dd3739a927c89e357580a4c97b40234aa01ed3d5e0390dc982a7975880a0a089d613f26159af43616fd9455bb461f4869bfede26f2130835ed067a8b967bfb80",
|
1249
|
+
* "0xf90211a0395d87a95873cd98c21cf1df9421af03f7247880a2554e20738eec2c7507a494a0bcf6546339a1e7e14eb8fb572a968d217d2a0d1f3bc4257b22ef5333e9e4433ca012ae12498af8b2752c99efce07f3feef8ec910493be749acd63822c3558e6671a0dbf51303afdc36fc0c2d68a9bb05dab4f4917e7531e4a37ab0a153472d1b86e2a0ae90b50f067d9a2244e3d975233c0a0558c39ee152969f6678790abf773a9621a01d65cd682cc1be7c5e38d8da5c942e0a73eeaef10f387340a40a106699d494c3a06163b53d956c55544390c13634ea9aa75309f4fd866f312586942daf0f60fb37a058a52c1e858b1382a8893eb9c1f111f266eb9e21e6137aff0dddea243a567000a037b4b100761e02de63ea5f1fcfcf43e81a372dafb4419d126342136d329b7a7ba032472415864b08f808ba4374092003c8d7c40a9f7f9fe9cc8291f62538e1cc14a074e238ff5ec96b810364515551344100138916594d6af966170ff326a092fab0a0d31ac4eef14a79845200a496662e92186ca8b55e29ed0f9f59dbc6b521b116fea090607784fe738458b63c1942bba7c0321ae77e18df4961b2bc66727ea996464ea078f757653c1b63f72aff3dcc3f2a2e4c8cb4a9d36d1117c742833c84e20de994a0f78407de07f4b4cb4f899dfb95eedeb4049aeb5fc1635d65cf2f2f4dfd25d1d7a0862037513ba9d45354dd3e36264aceb2b862ac79d2050f14c95657e43a51b85c80",
|
1250
|
+
* "0xf90171a04ad705ea7bf04339fa36b124fa221379bd5a38ffe9a6112cb2d94be3a437b879a08e45b5f72e8149c01efcb71429841d6a8879d4bbe27335604a5bff8dfdf85dcea00313d9b2f7c03733d6549ea3b810e5262ed844ea12f70993d87d3e0f04e3979ea0b59e3cdd6750fa8b15164612a5cb6567cdfb386d4e0137fccee5f35ab55d0efda0fe6db56e42f2057a071c980a778d9a0b61038f269dd74a0e90155b3f40f14364a08538587f2378a0849f9608942cf481da4120c360f8391bbcc225d811823c6432a026eac94e755534e16f9552e73025d6d9c30d1d7682a4cb5bd7741ddabfd48c50a041557da9a74ca68da793e743e81e2029b2835e1cc16e9e25bd0c1e89d4ccad6980a041dda0a40a21ade3a20fcd1a4abb2a42b74e9a32b02424ff8db4ea708a5e0fb9a09aaf8326a51f613607a8685f57458329b41e938bb761131a5747e066b81a0a16808080a022e6cef138e16d2272ef58434ddf49260dc1de1f8ad6dfca3da5d2a92aaaadc58080",
|
1251
|
+
* "0xf851808080a009833150c367df138f1538689984b8a84fc55692d3d41fe4d1e5720ff5483a6980808080808080808080a0a319c1c415b271afc0adcb664e67738d103ac168e0bc0b7bd2da7966165cb9518080"
|
1252
|
+
* ],
|
1253
|
+
* "balance": 0n,
|
1254
|
+
* "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
|
1255
|
+
* "nonce": 0n,
|
1256
|
+
* "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
|
1257
|
+
* "storageProof": [
|
1258
|
+
* {
|
1259
|
+
* "key": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
1260
|
+
* "value": 0n,
|
1261
|
+
* "proof": []
|
1262
|
+
* },
|
1263
|
+
* {
|
1264
|
+
* "key": "0x0000000000000000000000000000000000000000000000000000000000000001",
|
1265
|
+
* "value": 0n,
|
1266
|
+
* "proof": []
|
1267
|
+
* }
|
1268
|
+
* ]
|
1269
|
+
* }
|
1270
|
+
*
|
1271
|
+
* web3.eth.getProof(
|
1272
|
+
* "0x1234567890123456789012345678901234567890",
|
1273
|
+
* ["0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000001"],
|
1274
|
+
* undefined,
|
1275
|
+
* { number: FMT_NUMBER.NUMBER , bytes: FMT_BYTES.HEX }
|
1276
|
+
* ).then(console.log);
|
1277
|
+
* > {
|
1278
|
+
* "address": "0x1234567890123456789012345678901234567890",
|
1279
|
+
* "accountProof": [
|
1280
|
+
* "0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021a0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315b61d9f6bd68bfe587ad0eeceb721a07117ef9fc932f1a88e908eaead8565c19b5645dc9e5b1b6e841c5edbdfd71681a069eb2de283f32c11f859d7bcf93da23990d3e662935ed4d6b39ce3673ec84472a0203d26456312bbc4da5cd293b75b840fc5045e493d6f904d180823ec22bfed8ea09287b5c21f2254af4e64fca76acc5cd87399c7f1ede818db4326c98ce2dc2208a06fc2d754e304c48ce6a517753c62b1a9c1d5925b89707486d7fc08919e0a94eca07b1c54f15e299bd58bdfef9741538c7828b5d7d11a489f9c20d052b3471df475a051f9dd3739a927c89e357580a4c97b40234aa01ed3d5e0390dc982a7975880a0a089d613f26159af43616fd9455bb461f4869bfede26f2130835ed067a8b967bfb80",
|
1281
|
+
* "0xf90211a0395d87a95873cd98c21cf1df9421af03f7247880a2554e20738eec2c7507a494a0bcf6546339a1e7e14eb8fb572a968d217d2a0d1f3bc4257b22ef5333e9e4433ca012ae12498af8b2752c99efce07f3feef8ec910493be749acd63822c3558e6671a0dbf51303afdc36fc0c2d68a9bb05dab4f4917e7531e4a37ab0a153472d1b86e2a0ae90b50f067d9a2244e3d975233c0a0558c39ee152969f6678790abf773a9621a01d65cd682cc1be7c5e38d8da5c942e0a73eeaef10f387340a40a106699d494c3a06163b53d956c55544390c13634ea9aa75309f4fd866f312586942daf0f60fb37a058a52c1e858b1382a8893eb9c1f111f266eb9e21e6137aff0dddea243a567000a037b4b100761e02de63ea5f1fcfcf43e81a372dafb4419d126342136d329b7a7ba032472415864b08f808ba4374092003c8d7c40a9f7f9fe9cc8291f62538e1cc14a074e238ff5ec96b810364515551344100138916594d6af966170ff326a092fab0a0d31ac4eef14a79845200a496662e92186ca8b55e29ed0f9f59dbc6b521b116fea090607784fe738458b63c1942bba7c0321ae77e18df4961b2bc66727ea996464ea078f757653c1b63f72aff3dcc3f2a2e4c8cb4a9d36d1117c742833c84e20de994a0f78407de07f4b4cb4f899dfb95eedeb4049aeb5fc1635d65cf2f2f4dfd25d1d7a0862037513ba9d45354dd3e36264aceb2b862ac79d2050f14c95657e43a51b85c80",
|
1282
|
+
* "0xf90171a04ad705ea7bf04339fa36b124fa221379bd5a38ffe9a6112cb2d94be3a437b879a08e45b5f72e8149c01efcb71429841d6a8879d4bbe27335604a5bff8dfdf85dcea00313d9b2f7c03733d6549ea3b810e5262ed844ea12f70993d87d3e0f04e3979ea0b59e3cdd6750fa8b15164612a5cb6567cdfb386d4e0137fccee5f35ab55d0efda0fe6db56e42f2057a071c980a778d9a0b61038f269dd74a0e90155b3f40f14364a08538587f2378a0849f9608942cf481da4120c360f8391bbcc225d811823c6432a026eac94e755534e16f9552e73025d6d9c30d1d7682a4cb5bd7741ddabfd48c50a041557da9a74ca68da793e743e81e2029b2835e1cc16e9e25bd0c1e89d4ccad6980a041dda0a40a21ade3a20fcd1a4abb2a42b74e9a32b02424ff8db4ea708a5e0fb9a09aaf8326a51f613607a8685f57458329b41e938bb761131a5747e066b81a0a16808080a022e6cef138e16d2272ef58434ddf49260dc1de1f8ad6dfca3da5d2a92aaaadc58080",
|
1283
|
+
* "0xf851808080a009833150c367df138f1538689984b8a84fc55692d3d41fe4d1e5720ff5483a6980808080808080808080a0a319c1c415b271afc0adcb664e67738d103ac168e0bc0b7bd2da7966165cb9518080"
|
1284
|
+
* ],
|
1285
|
+
* "balance": 0,
|
1286
|
+
* "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
|
1287
|
+
* "nonce": 0,
|
1288
|
+
* "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
|
1289
|
+
* "storageProof": [
|
1290
|
+
* {
|
1291
|
+
* "key": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
1292
|
+
* "value": 0,
|
1293
|
+
* "proof": []
|
1294
|
+
* },
|
1295
|
+
* {
|
1296
|
+
* "key": "0x0000000000000000000000000000000000000000000000000000000000000001",
|
1297
|
+
* "value": 0,
|
1298
|
+
* "proof": []
|
1299
|
+
* }
|
1300
|
+
* ]
|
1301
|
+
* }
|
1302
|
+
* ```
|
1303
|
+
*/
|
1304
|
+
getProof(t, i, n = this.defaultBlock, o = r) {
|
1305
|
+
return e(this, void 0, void 0, function* () {
|
1306
|
+
return it(this, t, i, n, o);
|
1307
|
+
});
|
1308
|
+
}
|
1309
|
+
// TODO Throwing an error with Geth, but not Infura
|
1310
|
+
// TODO gasUsedRatio and reward not formatting
|
1311
|
+
/**
|
1312
|
+
* @param blockCount Number of blocks in the requested range. Between `1` and `1024` blocks can be requested in a single query. Less than requested may be returned if not all blocks are available.
|
1313
|
+
* @param newestBlock Highest number block of the requested range.
|
1314
|
+
* @param rewardPercentiles A monotonically increasing list of percentile values to sample from each block’s effective priority fees per gas in ascending order, weighted by gas used. Example: `['0', '25', '50', '75', '100']` or `['0', '0.5', '1', '1.5', '3', '80']`
|
1315
|
+
* @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) - Specifies how the return data from the call should be formatted.
|
1316
|
+
* @returns `baseFeePerGas` and transaction effective `priorityFeePerGas` history for the requested block range if available.
|
1317
|
+
* The range between `headBlock - 4` and `headBlock` is guaranteed to be available while retrieving data from the `pending` block and older history are optional to support.
|
1318
|
+
* For pre-EIP-1559 blocks the `gasPrice`s are returned as `rewards` and zeroes are returned for the `baseFeePerGas`.
|
1319
|
+
*
|
1320
|
+
* ```ts
|
1321
|
+
* web3.eth.getFeeHistory(4, 'pending', [0, 25, 75, 100]).then(console.log);
|
1322
|
+
* > {
|
1323
|
+
* baseFeePerGas: [
|
1324
|
+
* 22983878621n,
|
1325
|
+
* 21417903463n,
|
1326
|
+
* 19989260230n,
|
1327
|
+
* 17770954829n,
|
1328
|
+
* 18850641304n
|
1329
|
+
* ],
|
1330
|
+
* gasUsedRatio: [
|
1331
|
+
* 0.22746546666666667,
|
1332
|
+
* 0.2331871,
|
1333
|
+
* 0.05610054885262125,
|
1334
|
+
* 0.7430227268212117
|
1335
|
+
* ],
|
1336
|
+
* oldestBlock: 15216343n,
|
1337
|
+
* reward: [
|
1338
|
+
* [ '0x3b9aca00', '0x53724e00', '0x77359400', '0x1d92c03423' ],
|
1339
|
+
* [ '0x3b9aca00', '0x3b9aca00', '0x3b9aca00', '0xee6b2800' ],
|
1340
|
+
* [ '0x3b9aca00', '0x4f86a721', '0x77d9743a', '0x9502f900' ],
|
1341
|
+
* [ '0xcc8ff9e', '0x53724e00', '0x77359400', '0x1ec9771bb3' ]
|
1342
|
+
* ]
|
1343
|
+
* }
|
1344
|
+
*
|
1345
|
+
* web3.eth.getFeeHistory(4, BlockTags.LATEST, [0, 25, 75, 100], { number: FMT_NUMBER.NUMBER , bytes: FMT_BYTES.HEX }).then(console.log);
|
1346
|
+
* > {
|
1347
|
+
* baseFeePerGas: [
|
1348
|
+
* 22983878621,
|
1349
|
+
* 21417903463,
|
1350
|
+
* 19989260230,
|
1351
|
+
* 17770954829,
|
1352
|
+
* 18850641304
|
1353
|
+
* ],
|
1354
|
+
* gasUsedRatio: [
|
1355
|
+
* 0.22746546666666667,
|
1356
|
+
* 0.2331871,
|
1357
|
+
* 0.05610054885262125,
|
1358
|
+
* 0.7430227268212117
|
1359
|
+
* ],
|
1360
|
+
* oldestBlock: 15216343,
|
1361
|
+
* reward: [
|
1362
|
+
* [ '0x3b9aca00', '0x53724e00', '0x77359400', '0x1d92c03423' ],
|
1363
|
+
* [ '0x3b9aca00', '0x3b9aca00', '0x3b9aca00', '0xee6b2800' ],
|
1364
|
+
* [ '0x3b9aca00', '0x4f86a721', '0x77d9743a', '0x9502f900' ],
|
1365
|
+
* [ '0xcc8ff9e', '0x53724e00', '0x77359400', '0x1ec9771bb3' ]
|
1366
|
+
* ]
|
1367
|
+
* }
|
1368
|
+
* ```
|
1369
|
+
*/
|
1370
|
+
getFeeHistory(t, i = this.defaultBlock, n, o = r) {
|
1371
|
+
return e(this, void 0, void 0, function* () {
|
1372
|
+
return nt(this, t, i, n, o);
|
1373
|
+
});
|
1374
|
+
}
|
1375
|
+
/**
|
1376
|
+
* This method generates an access list for a transaction.
|
1377
|
+
*
|
1378
|
+
* @param transaction - A transaction object where all properties are optional except `from`, however it's recommended to include the `to` property.
|
1379
|
+
* @param blockNumber ({@link BlockNumberOrTag} defaults to {@link Web3Eth.defaultBlock}) - Specifies what block to use as the current state of the blockchain while processing the transaction.
|
1380
|
+
* @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) - Specifies how the return data from the createAccessList should be formatted.
|
1381
|
+
* @returns The returned data of the createAccessList, e.g. The generated access list for transaction.
|
1382
|
+
* @example
|
1383
|
+
* ```ts
|
1384
|
+
* web3.eth.createAccessList({
|
1385
|
+
* from: '0xDe95305a63302C3aa4d3A9B42654659AeA72b694',
|
1386
|
+
* data: '0x9a67c8b100000000000000000000000000000000000000000000000000000000000004d0',
|
1387
|
+
* gasPrice: '0x3b9aca00',
|
1388
|
+
* gas: '0x3d0900',
|
1389
|
+
* to: '0x940b25304947ae863568B3804434EC77E2160b87'
|
1390
|
+
* })
|
1391
|
+
* .then(console.log);
|
1392
|
+
*
|
1393
|
+
* > {
|
1394
|
+
* "accessList": [
|
1395
|
+
* {
|
1396
|
+
* "address": "0x15859bdf5aff2080a9968f6a410361e9598df62f",
|
1397
|
+
* "storageKeys": [
|
1398
|
+
* "0x0000000000000000000000000000000000000000000000000000000000000000"
|
1399
|
+
* ]
|
1400
|
+
* }
|
1401
|
+
* ],
|
1402
|
+
* "gasUsed": "0x7671"
|
1403
|
+
* }
|
1404
|
+
* ```
|
1405
|
+
*/
|
1406
|
+
createAccessList(t, i = this.defaultBlock, n = r) {
|
1407
|
+
return e(this, void 0, void 0, function* () {
|
1408
|
+
return et(this, t, i, n);
|
1409
|
+
});
|
1410
|
+
}
|
1411
|
+
/**
|
1412
|
+
* This method sends EIP-712 typed data to the RPC provider to be signed.
|
1413
|
+
*
|
1414
|
+
* @param address The address that corresponds with the private key used to sign the typed data.
|
1415
|
+
* @param typedData The EIP-712 typed data object.
|
1416
|
+
* @param useLegacy A boolean flag determining whether the RPC call uses the legacy method `eth_signTypedData` or the newer method `eth_signTypedData_v4`
|
1417
|
+
* @param returnFormat ({@link DataFormat} defaults to {@link DEFAULT_RETURN_FORMAT}) - Specifies how the signed typed data should be formatted.
|
1418
|
+
* @returns The signed typed data.
|
1419
|
+
*/
|
1420
|
+
signTypedData(t, i, n = !1, o = r) {
|
1421
|
+
return e(this, void 0, void 0, function* () {
|
1422
|
+
return rt(this, t, i, n, o);
|
1423
|
+
});
|
1424
|
+
}
|
1425
|
+
/**
|
1426
|
+
* Lets you subscribe to specific events in the blockchain.
|
1427
|
+
*
|
1428
|
+
* @param name - The subscription you want to subscribe to.
|
1429
|
+
* @param args - Optional additional parameters, depending on the subscription type.
|
1430
|
+
* @returns A subscription object of type {@link RegisteredSubscription}. The object contains:
|
1431
|
+
* - subscription.id: The subscription id, used to identify and unsubscribing the subscription.
|
1432
|
+
* - subscription.subscribe(): Can be used to re-subscribe with the same parameters.
|
1433
|
+
* - subscription.unsubscribe(): Unsubscribes the subscription and returns TRUE in the callback if successful.
|
1434
|
+
* - subscription.args: The subscription arguments, used when re-subscribing.
|
1435
|
+
*
|
1436
|
+
*
|
1437
|
+
* You can use the subscription object to listen on:
|
1438
|
+
*
|
1439
|
+
* - on("data") - Fires on each incoming log with the log object as argument.
|
1440
|
+
* - on("changed") - Fires on each log which was removed from the blockchain. The log will have the additional property "removed: true".
|
1441
|
+
* - on("error") - Fires when an error in the subscription occurs.
|
1442
|
+
* - on("connected") - Fires once after the subscription successfully connected. Returns the subscription id.
|
1443
|
+
*
|
1444
|
+
* @example **Subscribe to Smart Contract events**
|
1445
|
+
* ```ts
|
1446
|
+
* // Subscribe to `logs`
|
1447
|
+
* const logSubscription = web3.eth.subscribe('logs', {
|
1448
|
+
* address: '0x1234567890123456789012345678901234567890',
|
1449
|
+
* topics: ['0x033456732123ffff2342342dd12342434324234234fd234fd23fd4f23d4234']
|
1450
|
+
* });
|
1451
|
+
* logSubscription.on('data', (data: any) => console.log(data));
|
1452
|
+
* logSubscription.on('error', (error: any) => console.log(error));
|
1453
|
+
*
|
1454
|
+
* ```
|
1455
|
+
*
|
1456
|
+
* @example **Subscribe to new block headers**
|
1457
|
+
* ```ts
|
1458
|
+
* // Subscribe to `newBlockHeaders`
|
1459
|
+
* const newBlocksSubscription = await web3.eth.subscribe('newBlockHeaders');
|
1460
|
+
*
|
1461
|
+
* newBlocksSubscription.on('data', async blockhead => {
|
1462
|
+
* console.log('New block header: ', blockhead);
|
1463
|
+
*
|
1464
|
+
* // You do not need the next line, if you like to keep notified for every new block
|
1465
|
+
* await newBlocksSubscription.unsubscribe();
|
1466
|
+
* console.log('Unsubscribed from new block headers.');
|
1467
|
+
* });
|
1468
|
+
* newBlocksSubscription.on('error', error =>
|
1469
|
+
* console.log('Error when subscribing to New block header: ', error),
|
1470
|
+
* );
|
1471
|
+
* ```
|
1472
|
+
*/
|
1473
|
+
subscribe(t, i, n = r) {
|
1474
|
+
var o;
|
1475
|
+
return e(this, void 0, void 0, function* () {
|
1476
|
+
const s = yield (o = this.subscriptionManager) === null || o === void 0 ? void 0 : o.subscribe(t, i, n);
|
1477
|
+
return s instanceof p && t === "logs" && typeof i == "object" && !st(i.fromBlock) && Number.isFinite(Number(i.fromBlock)) && setImmediate(() => {
|
1478
|
+
this.getPastLogs(i).then((u) => {
|
1479
|
+
for (const a of u)
|
1480
|
+
s._processSubscriptionResult(a);
|
1481
|
+
}).catch((u) => {
|
1482
|
+
s._processSubscriptionError(u);
|
1483
|
+
});
|
1484
|
+
}), s;
|
1485
|
+
});
|
1486
|
+
}
|
1487
|
+
static shouldClearSubscription({ sub: t }) {
|
1488
|
+
return !(t instanceof m);
|
1489
|
+
}
|
1490
|
+
/**
|
1491
|
+
* Resets subscriptions.
|
1492
|
+
*
|
1493
|
+
* @param notClearSyncing If `true` it keeps the `syncing` subscription.
|
1494
|
+
* @returns A promise to an array of subscription ids that were cleared.
|
1495
|
+
*
|
1496
|
+
* ```ts
|
1497
|
+
* web3.eth.clearSubscriptions().then(console.log);
|
1498
|
+
* > [...] An array of subscription ids that were cleared
|
1499
|
+
* ```
|
1500
|
+
*/
|
1501
|
+
clearSubscriptions(t = !1) {
|
1502
|
+
var i;
|
1503
|
+
return (i = this.subscriptionManager) === null || i === void 0 ? void 0 : i.unsubscribe(
|
1504
|
+
// eslint-disable-next-line
|
1505
|
+
t ? b.shouldClearSubscription : void 0
|
1506
|
+
);
|
1507
|
+
}
|
1508
|
+
}
|
1509
|
+
export {
|
1510
|
+
b as Web3Eth,
|
1511
|
+
v as registeredSubscriptions
|
1512
|
+
};
|