web3-types
Index
Classes
Enumerations
Interfaces
- AbiCoderStruct
- AbiOutput
- AbiStruct
- AccessListEntry
- AccountObject
- BaseTransactionAPI
- BlockBase
- BlockHeaderOutput
- BlockInput
- BlockOutput
- Common
- CompileResultAPI
- ContractInitOptions
- ContractOptions
- CustomChain
- DecodedParams
- EIP1193Provider
- Eip712TypeDetails
- Eip712TypedData
- EthSubscription
- EventLog
- FeeData
- FeeHistoryBase
- Filter
- JsonRpcError
- JsonRpcNotification
- JsonRpcOptionalRequest
- JsonRpcRequest
- JsonRpcResponseWithError
- JsonRpcResponseWithResult
- JsonRpcSubscriptionResult
- JsonRpcSubscriptionResultOld
- LegacyRequestProvider
- LegacySendAsyncProvider
- LegacySendProvider
- Log
- LogBase
- LogsInput
- LogsOutput
- MetaMaskProvider
- NonPayableCallOptions
- PayableCallOptions
- PopulatedUnsignedBaseTransaction
- PopulatedUnsignedEip1559Transaction
- PopulatedUnsignedEip2930Transaction
- PostInput
- PostOutput
- Proof
- ProviderConnectInfo
- ProviderInfo
- ProviderMessage
- ProviderRpcError
- ReceiptInput
- ReceiptOutput
- SignedTransactionInfoAPI
- SimpleProvider
- SocketRequestItem
- StorageProof
- SubscriptionParams
- SyncInput
- SyncOutput
- Transaction
- Transaction1559SignedAPI
- Transaction1559UnsignedAPI
- Transaction2930SignedAPI
- Transaction2930UnsignedAPI
- TransactionCall
- TransactionCallAPI
- TransactionForAccessList
- TransactionInfo
- TransactionInput
- TransactionLegacySignedAPI
- TransactionLegacyUnsignedAPI
- TransactionReceiptBase
- TransactionWithFromAndToLocalWalletIndex
- TransactionWithFromLocalWalletIndex
- TransactionWithToLocalWalletIndex
- Web3APIPayload
- Web3APIRequest
- Web3AccountProvider
- Web3BaseWalletAccount
- Web3DeferredPromiseInterface
- Web3Error
- Withdrawals
Type Aliases
- AbiBaseFragment
- AbiConstructorFragment
- AbiErrorFragment
- AbiEventFragment
- AbiFallbackFragment
- AbiFragment
- AbiFunctionFragment
- AbiInput
- AbiItem
- AbiParameter
- AccessList
- AccessListResult
- Address
- ArrayToIndexObject
- Block
- BlockAPI
- BlockNumberOrTag
- BlockTag
- ByteTypes
- Bytes
- Cipher
- CipherOptions
- Components
- ConnectionEvent
- ContractAbi
- ContractAbiWithSignature
- ContractConstructor
- ContractConstructorArgs
- ContractEvent
- ContractEvents
- ContractMethod
- ContractMethodInputParameters
- ContractMethodOutputParameters
- ContractMethods
- ConvertToNumber
- DataFormat
- Eip1193Compatible
- Eip1193EventName
- EncodingTypes
- EthExecutionAPI
- EthPersonalAPI
- FeeHistory
- FeeHistoryResultAPI
- FilterAbis
- FilterParams
- FilterResultsAPI
- FixedSizeArray
- FormatType
- GrowToSize
- Hardfork
- HexString
- HexString16Bytes
- HexString256Bytes
- HexString32Bytes
- HexString8Bytes
- HexStringBytes
- HexStringSingleByte
- IndexKeysForArray
- JsonEventInterface
- JsonFunctionInterface
- JsonRpcBatchRequest
- JsonRpcBatchResponse
- JsonRpcId
- JsonRpcIdentifier
- JsonRpcPayload
- JsonRpcResponse
- JsonRpcResult
- KeyStore
- LogAPI
- MatchPrimitiveType
- Mutable
- NumberTypes
- Numbers
- Optional
- PBKDF2SHA256Params
- PopulatedUnsignedTransaction
- PrimitiveAddressType
- PrimitiveBooleanType
- PrimitiveBytesType
- PrimitiveIntegerType
- PrimitiveStringType
- PrimitiveTupleType
- ProviderAccounts
- ProviderChainId
- Receipt
- ScryptParams
- Sha3Input
- SignResult
- SignTransactionResult
- SignatureObject
- SupportedProviders
- SyncingStatusAPI
- Topic
- TransactionHash
- TransactionInfoAPI
- TransactionOutput
- TransactionReceipt
- TransactionReceiptAPI
- TransactionSignedAPI
- TransactionUnsignedAPI
- TransactionWithSenderAPI
- TypedObject
- TypedObjectAbbreviated
- Uint
- Uint256
- Uncles
- ValidChains
- ValueTypes
- Web3APIMethod
- Web3APIParams
- Web3APIReturnType
- Web3APISpec
- Web3BaseProviderConstructor
- Web3Eip1193ProviderEventCallback
- Web3EthExecutionAPI
- Web3NetAPI
- Web3ProviderEventCallback
- Web3ProviderMessageEventCallback
- Web3ProviderRequestCallback
- Web3ProviderStatus
- Web3ValidationErrorObject
Variables
Type Aliases
AbiBaseFragment
Type declaration
- readonlytype: string | FragmentTypes
AbiConstructorFragment
AbiErrorFragment
AbiEventFragment
AbiFallbackFragment
AbiFragment
AbiFunctionFragment
AbiInput
AbiItem
AbiParameter
Type declaration
- optionalreadonlyarrayChildren?: ReadonlyArray<AbiParameter>
- optionalreadonlyarrayLength?: number
- optionalreadonlybaseType?: string
- optionalreadonlycomponents?: ReadonlyArray<AbiParameter>
- optionalreadonlyindexed?: boolean
- optionalreadonlyinternalType?: string
- readonlyname: string
- readonlytype: string
AccessList
AccessListResult
Type declaration
- optionalreadonlyaccessList?: AccessList
- optionalreadonlygasUsed?: Numbers
Address
ArrayToIndexObject
Type parameters
- T: ReadonlyArray<unknown>
Block
BlockAPI
BlockNumberOrTag
BlockTag
ByteTypes
Type declaration
- BYTES_HEX: HexString
- BYTES_UINT8ARRAY: Uint8Array
Bytes
Cipher
CipherOptions
Type declaration
- optionalc?: number
- optionaldklen?: number
- optionaliv?: Uint8Array | string
- optionalkdf?: scrypt | pbkdf2
- optionaln?: number
- optionalp?: number
- optionalr?: number
- optionalsalt?: Uint8Array | string
Components
Type declaration
- optionalcomponents?: Components[]
- optionalindexed?: boolean
- name: string
- type: string
ConnectionEvent
Type declaration
- code: number
- reason: string
- optionalwasClean?: boolean
ContractAbi
ContractAbiWithSignature
ContractConstructor
Type parameters
- Abis: ContractAbi
ContractConstructorArgs
Type parameters
- Abis: ContractAbi
ContractEvent
Type parameters
- Abi: AbiEventFragment
Type declaration
- readonlyAbi: Abi
- readonlyInputs: ContractMethodInputParameters<Abi[inputs]>
ContractEvents
Type parameters
- Abis: ContractAbi
ContractMethod
Type parameters
- Abi: AbiFunctionFragment
Type declaration
- readonlyAbi: Abi
- readonlyInputs: ContractMethodInputParameters<Abi[inputs]>
- readonlyOutputs: ContractMethodOutputParameters<Abi[outputs]>
ContractMethodInputParameters
Type parameters
- Params: ReadonlyArray<unknown> | undefined
ContractMethodOutputParameters
Type parameters
- Params: ReadonlyArray<unknown> | undefined
ContractMethods
Type parameters
- Abis: ContractAbi
ConvertToNumber
Type parameters
- T: string
- Range: number = _SolidityIndexRange
DataFormat
Type declaration
- readonlybytes: FMT_BYTES
- readonlynumber: FMT_NUMBER
Eip1193Compatible
Type parameters
- API: Web3APISpec = EthExecutionAPI
Eip1193EventName
EncodingTypes
EthExecutionAPI
Type declaration
- eth_accounts: () => Address[]- Returns Address[]
 
 
- eth_blockNumber: () => Uint- Returns Uint
 
 
- eth_call: (transaction: TransactionCallAPI, blockNumber: BlockNumberOrTag) => HexStringBytes- Parameters- transaction: TransactionCallAPI
- blockNumber: BlockNumberOrTag
 - Returns HexStringBytes
 
 
- eth_clearSubscriptions: (keepSyncing?: boolean) => void- Parameters- optionalkeepSyncing: boolean
 - Returns void
 
 
- eth_coinbase: () => Address- Returns Address
 
 
- eth_compileLLL: (code: string) => HexStringBytes- Parameters- code: string
 - Returns HexStringBytes
 
 
- eth_compileSerpent: (code: string) => HexStringBytes- Parameters- code: string
 - Returns HexStringBytes
 
 
- eth_compileSolidity: (code: string) => CompileResultAPI- Parameters- code: string
 - Returns CompileResultAPI
 
 
- eth_estimateGas: (transaction: Partial<TransactionWithSenderAPI>, blockNumber: BlockNumberOrTag) => Uint- Parameters- transaction: Partial<TransactionWithSenderAPI>
- blockNumber: BlockNumberOrTag
 - Returns Uint
 
 
- eth_feeHistory: (blockCount: Uint, newestBlock: BlockNumberOrTag, rewardPercentiles: number[]) => FeeHistoryResultAPI- Parameters- blockCount: Uint
- newestBlock: BlockNumberOrTag
- rewardPercentiles: number[]
 - Returns FeeHistoryResultAPI
 
 
- eth_gasPrice: () => Uint- Returns Uint
 
 
- eth_getBalance: (address: Address, blockNumber: BlockNumberOrTag) => Uint- Parameters- address: Address
- blockNumber: BlockNumberOrTag
 - Returns Uint
 
 
- eth_getBlockByHash: (blockHash: HexString32Bytes, hydrated: boolean) => BlockAPI- Parameters- blockHash: HexString32Bytes
- hydrated: boolean
 - Returns BlockAPI
 
 
- eth_getBlockByNumber: (blockNumber: BlockNumberOrTag, hydrated: boolean) => BlockAPI- Parameters- blockNumber: BlockNumberOrTag
- hydrated: boolean
 - Returns BlockAPI
 
 
- eth_getBlockTransactionCountByHash: (blockHash: HexString32Bytes) => Uint- Parameters- blockHash: HexString32Bytes
 - Returns Uint
 
 
- eth_getBlockTransactionCountByNumber: (blockNumber: BlockNumberOrTag) => Uint- Parameters- blockNumber: BlockNumberOrTag
 - Returns Uint
 
 
- eth_getCode: (address: Address, blockNumber: BlockNumberOrTag) => HexStringBytes- Parameters- address: Address
- blockNumber: BlockNumberOrTag
 - Returns HexStringBytes
 
 
- eth_getCompilers: () => string[]- Returns string[]
 
 
- eth_getFilterChanges: (filterIdentifier: Uint) => FilterResultsAPI- Parameters- filterIdentifier: Uint
 - Returns FilterResultsAPI
 
 
- eth_getFilterLogs: (filterIdentifier: Uint) => FilterResultsAPI- Parameters- filterIdentifier: Uint
 - Returns FilterResultsAPI
 
 
- eth_getLogs: (filter: Filter) => FilterResultsAPI- Parameters- filter: Filter
 - Returns FilterResultsAPI
 
 
- eth_getStorageAt: (address: Address, storageSlot: Uint256, blockNumber: BlockNumberOrTag) => HexStringBytes- Parameters- address: Address
- storageSlot: Uint256
- blockNumber: BlockNumberOrTag
 - Returns HexStringBytes
 
 
- eth_getTransactionByBlockHashAndIndex: (blockHash: HexString32Bytes, transactionIndex: Uint) => TransactionInfoAPI | undefined- Parameters- blockHash: HexString32Bytes
- transactionIndex: Uint
 - Returns TransactionInfoAPI | undefined
 
 
- eth_getTransactionByBlockNumberAndIndex: (blockNumber: BlockNumberOrTag, transactionIndex: Uint) => TransactionInfoAPI | undefined- Parameters- blockNumber: BlockNumberOrTag
- transactionIndex: Uint
 - Returns TransactionInfoAPI | undefined
 
 
- eth_getTransactionByHash: (transactionHash: HexString32Bytes) => TransactionInfoAPI | undefined- Parameters- transactionHash: HexString32Bytes
 - Returns TransactionInfoAPI | undefined
 
 
- eth_getTransactionCount: (address: Address, blockNumber: BlockNumberOrTag) => Uint- Parameters- address: Address
- blockNumber: BlockNumberOrTag
 - Returns Uint
 
 
- eth_getTransactionReceipt: (transactionHash: HexString32Bytes) => TransactionReceiptAPI | undefined- Parameters- transactionHash: HexString32Bytes
 - Returns TransactionReceiptAPI | undefined
 
 
- eth_getUncleByBlockHashAndIndex: (blockHash: HexString32Bytes, uncleIndex: Uint) => BlockAPI- Parameters- blockHash: HexString32Bytes
- uncleIndex: Uint
 - Returns BlockAPI
 
 
- eth_getUncleByBlockNumberAndIndex: (blockNumber: BlockNumberOrTag, uncleIndex: Uint) => BlockAPI- Parameters- blockNumber: BlockNumberOrTag
- uncleIndex: Uint
 - Returns BlockAPI
 
 
- eth_getUncleCountByBlockHash: (blockHash: HexString32Bytes) => Uint- Parameters- blockHash: HexString32Bytes
 - Returns Uint
 
 
- eth_getUncleCountByBlockNumber: (blockNumber: BlockNumberOrTag) => Uint- Parameters- blockNumber: BlockNumberOrTag
 - Returns Uint
 
 
- eth_getWork: () => [HexString32Bytes, HexString32Bytes, HexString32Bytes]- Returns [HexString32Bytes, HexString32Bytes, HexString32Bytes]
 
 
- eth_hashrate: () => Uint- Returns Uint
 
 
- eth_maxPriorityFeePerGas: () => Uint- Returns Uint
 
 
- eth_mining: () => boolean- Returns boolean
 
 
- eth_newBlockFilter: () => Uint- Returns Uint
 
 
- eth_newFilter: (filter: Filter) => Uint
- eth_newPendingTransactionFilter: () => Uint- Returns Uint
 
 
- eth_protocolVersion: () => string- Returns string
 
 
- eth_sendRawTransaction: (transaction: HexStringBytes) => HexString32Bytes- Parameters- transaction: HexStringBytes
 - Returns HexString32Bytes
 
 
- eth_sendTransaction: (transaction: TransactionWithSenderAPI | Partial<TransactionWithSenderAPI>) => HexString32Bytes- Parameters- transaction: TransactionWithSenderAPI | Partial<TransactionWithSenderAPI>
 - Returns HexString32Bytes
 
 
- eth_sign: (address: Address, message: HexStringBytes) => HexString256Bytes- Parameters- address: Address
- message: HexStringBytes
 - Returns HexString256Bytes
 
 
- eth_signTransaction: (transaction: TransactionWithSenderAPI | Partial<TransactionWithSenderAPI>) => HexStringBytes | SignedTransactionInfoAPI- Parameters- transaction: TransactionWithSenderAPI | Partial<TransactionWithSenderAPI>
 - Returns HexStringBytes | SignedTransactionInfoAPI
 
 
- eth_submitHashrate: (hashRate: HexString32Bytes, id: HexString32Bytes) => boolean- Parameters- hashRate: HexString32Bytes
- id: HexString32Bytes
 - Returns boolean
 
 
- eth_submitWork: (nonce: HexString8Bytes, hash: HexString32Bytes, digest: HexString32Bytes) => boolean- Parameters- nonce: HexString8Bytes
- hash: HexString32Bytes
- digest: HexString32Bytes
 - Returns boolean
 
 
- eth_subscribe: (...params: [newHeads] | [newPendingTransactions] | [syncing] | [logs, { address?: HexString; topics?: HexString[] }]) => HexString
- eth_syncing: () => SyncingStatusAPI- Returns SyncingStatusAPI
 
 
- eth_uninstallFilter: (filterIdentifier: Uint) => boolean- Parameters- filterIdentifier: Uint
 - Returns boolean
 
 
- eth_unsubscribe: (subscriptionId: HexString) => HexString
EthPersonalAPI
Type declaration
- personal_ecRecover: (signedData: HexString, signature: HexString) => Address
- personal_importRawKey: (keyData: HexString, passphrase: string) => HexString
- personal_listAccounts: () => Address[]- Returns Address[]
 
 
- personal_lockAccount: (address: Address) => boolean- Parameters- address: Address
 - Returns boolean
 
 
- personal_newAccount: (password: string) => Address- Parameters- password: string
 - Returns Address
 
 
- personal_sendTransaction: (tx: Transaction, passphrase: string) => HexString- Parameters- tx: Transaction
- passphrase: string
 - Returns HexString
 
 
- personal_sign: (data: HexString, address: Address, passphrase: string) => HexString
- personal_signTransaction: (tx: Transaction, passphrase: string) => HexString- Parameters- tx: Transaction
- passphrase: string
 - Returns HexString
 
 
- personal_unlockAccount: (address: Address, password: string, unlockDuration: number) => boolean- Parameters- address: Address
- password: string
- unlockDuration: number
 - Returns boolean
 
 
FeeHistory
FeeHistoryResultAPI
FilterAbis
Type parameters
- Abis: ContractAbi
- Filter
- Abi = Abis[number]
FilterParams
FilterResultsAPI
FixedSizeArray
Type parameters
- T
- N: number
FormatType
Type parameters
- T
- F: DataFormat
GrowToSize
Type parameters
- T
- A: T[]
- N: number
Hardfork
HexString
HexString16Bytes
HexString256Bytes
HexString32Bytes
HexString8Bytes
HexStringBytes
HexStringSingleByte
IndexKeysForArray
Type parameters
- A: readonly unknown[]
JsonEventInterface
Type declaration
- anonymous: boolean
- indexed: boolean
- inputs: Components[]
- name: string
- type: event
JsonFunctionInterface
Type declaration
- inputs: Components[]
- name: string
- optionaloutputs?: AbiInput[]
- optionalstateMutability?: string
- type: function
JsonRpcBatchRequest
JsonRpcBatchResponse
Type parameters
- Result = JsonRpcResult
- Error = JsonRpcResult
JsonRpcId
JsonRpcIdentifier
JsonRpcPayload
Type parameters
- Param = unknown[]
JsonRpcResponse
Type parameters
- Result = JsonRpcResult
- Error = JsonRpcResult
JsonRpcResult
KeyStore
Type declaration
- address: string
- crypto: { cipher: Cipher; cipherparams: { iv: string }; ciphertext: string; kdf: pbkdf2 | scrypt; kdfparams: ScryptParams | PBKDF2SHA256Params; mac: HexString }- cipher: Cipher
- cipherparams: { iv: string }- iv: string
 
- ciphertext: string
- kdf: pbkdf2 | scrypt
- kdfparams: ScryptParams | PBKDF2SHA256Params
- mac: HexString
 
- id: string
- version: 3
LogAPI
MatchPrimitiveType
Type parameters
- Type: string
- TypeComponents: ReadonlyArray<AbiParameter> | undefined | unknown
Mutable
Type parameters
- T
NumberTypes
Type declaration
- NUMBER_BIGINT: bigint
- NUMBER_HEX: HexString
- NUMBER_NUMBER: number
- NUMBER_STR: string
Numbers
Optional
Type parameters
- T
- K: keyof T
PBKDF2SHA256Params
Type declaration
- c: number
- dklen: number
- prf: hmac-sha256
- salt: Uint8Array | string
PopulatedUnsignedTransaction
PrimitiveAddressType
Type parameters
- Type: string
PrimitiveBooleanType
Type parameters
- Type: string
PrimitiveBytesType
Type parameters
- Type: string
PrimitiveIntegerType
Type parameters
- Type: string
PrimitiveStringType
Type parameters
- Type: string
PrimitiveTupleType
Type parameters
- Type: string
- TypeComponents: ReadonlyArray<AbiParameter> | undefined | unknown = []
ProviderAccounts
ProviderChainId
Receipt
ScryptParams
Type declaration
- dklen: number
- n: number
- p: number
- r: number
- salt: Uint8Array | string
Sha3Input
SignResult
SignTransactionResult
SignatureObject
Type declaration
- messageHash: string
- r: string
- s: string
- v: string
SupportedProviders
Type parameters
- API: Web3APISpec = Web3EthExecutionAPI
SyncingStatusAPI
Topic
TransactionHash
TransactionInfoAPI
TransactionOutput
TransactionReceipt
TransactionReceiptAPI
TransactionSignedAPI
TransactionUnsignedAPI
TransactionWithSenderAPI
TypedObject
Type declaration
- type: string
- value: EncodingTypes
TypedObjectAbbreviated
Type declaration
- t: string
- v: EncodingTypes
Uint
Uint256
Uncles
ValidChains
ValueTypes
Web3APIMethod
Type parameters
- T: Web3APISpec
Web3APIParams
Type parameters
- API: Web3APISpec
- Method: Web3APIMethod<API>
Web3APIReturnType
Type parameters
- API: Web3APISpec
- Method: Web3APIMethod<API>
Web3APISpec
Web3BaseProviderConstructor
Type declaration
- Type parameters- API: Web3APISpec
 - Parameters- url: string
- optionalnet: Socket
 - Returns Web3BaseProvider<API>
 
Web3Eip1193ProviderEventCallback
Type parameters
- T
Type declaration
- Parameters- data: T
 - Returns void
 
Web3EthExecutionAPI
Web3NetAPI
Web3ProviderEventCallback
Type parameters
- T = JsonRpcResult
Type declaration
- Parameters- error: Error | ProviderRpcError | undefined
- optionalresult: JsonRpcSubscriptionResult | JsonRpcNotification<T>
 - Returns void
 
Web3ProviderMessageEventCallback
Type parameters
- T = JsonRpcResult
Type declaration
- Parameters- optionalresult: JsonRpcSubscriptionResult | JsonRpcNotification<T>
 - Returns void
 
Web3ProviderRequestCallback
Type parameters
- ResultType = unknown
Type declaration
- Parameters- optionalerr: Error | Web3Error | null | JsonRpcResponseWithError<Error>
- optionalresponse: JsonRpcResponseWithResult<ResultType>
 - Returns void
 
Web3ProviderStatus
Web3ValidationErrorObject
Type parameters
- K: string = string
- P = Record<string, any>
- S = unknown
Type declaration
- optionaldata?: unknown
- instancePath: string
- keyword: K
- optionalmessage?: string
- params: P
- optionalpropertyName?: string
- optionalschema?: S
- schemaPath: string
Variables
constDEFAULT_RETURN_FORMAT
Type declaration
- readonlybytes: HEX
- readonlynumber: BIGINT
constETH_DATA_FORMAT
Type declaration
- readonlybytes: HEX
- readonlynumber: HEX
Used to specify how data should be formatted. Bytes can be formatted as hexadecimal strings or Uint8Arrays. Numbers can be formatted as BigInts, hexadecimal strings, primitive numbers, or strings.