web3-types | API | Web3.js (original) (raw)
Type Aliases
AbiBaseFragment: { type: string | FragmentTypes }
Type declaration
readonlytype: string | FragmentTypes
AbiConstructorFragment: AbiBaseFragment & { inputs?: ReadonlyArray<AbiParameter>; stateMutability: string | nonpayable | payable; type: string | constructor }
AbiErrorFragment: AbiBaseFragment & { inputs?: ReadonlyArray<AbiParameter>; name: string; type: string | error }
AbiEventFragment: AbiBaseFragment & { anonymous?: boolean; inputs?: ReadonlyArray<AbiParameter>; name: string; type: string | event }
AbiFallbackFragment: AbiBaseFragment & { constant?: boolean; inputs: never; name: never; outputs: never; payable?: boolean; stateMutability: string | nonpayable | payable | pure | view; type: string | fallback }
AbiFunctionFragment: AbiBaseFragment & { constant?: boolean; inputs?: ReadonlyArray<AbiParameter>; methodNameWithInputs?: string; name: string; outputs?: ReadonlyArray<AbiParameter>; payable?: boolean; signature?: string; stateMutability?: string | nonpayable | payable | pure | view; type: string | function }
AbiInput: string | AbiParameter | { components?: Components; index?: boolean; internalType?: string; name: string; type: string } | {}
AbiParameter: { arrayChildren?: ReadonlyArray<AbiParameter>; arrayLength?: number; baseType?: string; components?: ReadonlyArray<AbiParameter>; indexed?: boolean; internalType?: string; name: string; type: string }
Type declaration
AbiParameter>
optionalreadonlyarrayChildren?: ReadonlyArray<optionalreadonlyarrayLength?: number
optionalreadonlybaseType?: string
AbiParameter>
optionalreadonlycomponents?: ReadonlyArray<optionalreadonlyindexed?: boolean
optionalreadonlyinternalType?: string
readonlyname: string
readonlytype: string
Type declaration
AccessList
optionalreadonlyaccessList?:Numbers
optionalreadonlygasUsed?:
Type parameters
- T: ReadonlyArray<unknown>
ByteTypes: { BYTES_HEX: HexString; BYTES_UINT8ARRAY: Uint8Array }
Type declaration
HexString
BYTES_HEX:BYTES_UINT8ARRAY: Uint8Array
Cipher: aes-128-ctr | aes-128-cbc | aes-256-cbc
CipherOptions: { c?: number; dklen?: number; iv?: Uint8Array | string; kdf?: scrypt | pbkdf2; n?: number; p?: number; r?: number; salt?: Uint8Array | string }
Type declaration
optionalc?: number
optionaldklen?: number
optionaliv?: Uint8Array | string
optionalkdf?: scrypt | pbkdf2
optionaln?: number
optionalp?: number
optionalr?: number
optionalsalt?: Uint8Array | string
Components: { components?: Components[]; indexed?: boolean; name: string; type: string }
Type declaration
Components[]
optionalcomponents?:optionalindexed?: boolean
name: string
type: string
ConnectionEvent: { code: number; reason: string; wasClean?: boolean }
Type declaration
code: number
reason: string
optionalwasClean?: boolean
Type parameters
- Params: ReadonlyArray<unknown> | undefined
ContractMethodOutputParameters<Params>: Params extends readonly [] ? void : Params extends readonly [infer
H, ...infer
R] ? R extends readonly [] ? H extends AbiParameter ? MatchPrimitiveType<H[type], H[components]> : [] : ArrToObjectWithFunctions<[...ContractMethodOutputParametersRecursiveArray<Params>]> & ContractMethodOutputParametersRecursiveRecord<Params> : []
Type parameters
- Params: ReadonlyArray<unknown> | undefined
ConvertToNumber<T, Range>: Range extends unknown ? `${Range}` extends T ? Range : never : never
Type parameters
- T: string
- Range: number = _SolidityIndexRange
Eip1193Compatible<API>: Omit<Omit<Web3BaseProvider, request>, asEIP1193Provider> & { request: any }
Eip1193EventName: connect | disconnect | message | chainChanged | accountsChanged
EthExecutionAPI: { eth_accounts: () => Address[]; eth_blockNumber: () => Uint; eth_call: (transaction: TransactionCallAPI, blockNumber: BlockNumberOrTag) => HexStringBytes; eth_clearSubscriptions: (keepSyncing?: boolean) => void; eth_coinbase: () => Address; eth_compileLLL: (code: string) => HexStringBytes; eth_compileSerpent: (code: string) => HexStringBytes; eth_compileSolidity: (code: string) => CompileResultAPI; eth_estimateGas: (transaction: Partial<TransactionWithSenderAPI>, blockNumber: BlockNumberOrTag) => Uint; eth_feeHistory: (blockCount: Uint, newestBlock: BlockNumberOrTag, rewardPercentiles: number[]) => FeeHistoryResultAPI; eth_gasPrice: () => Uint; eth_getBalance: (address: Address, blockNumber: BlockNumberOrTag) => Uint; eth_getBlockByHash: (blockHash: HexString32Bytes, hydrated: boolean) => BlockAPI; eth_getBlockByNumber: (blockNumber: BlockNumberOrTag, hydrated: boolean) => BlockAPI; eth_getBlockTransactionCountByHash: (blockHash: HexString32Bytes) => Uint; eth_getBlockTransactionCountByNumber: (blockNumber: BlockNumberOrTag) => Uint; eth_getCode: (address: Address, blockNumber: BlockNumberOrTag) => HexStringBytes; eth_getCompilers: () => string[]; eth_getFilterChanges: (filterIdentifier: Uint) => FilterResultsAPI; eth_getFilterLogs: (filterIdentifier: Uint) => FilterResultsAPI; eth_getLogs: (filter: Filter) => FilterResultsAPI; eth_getStorageAt: (address: Address, storageSlot: Uint256, blockNumber: BlockNumberOrTag) => HexStringBytes; eth_getTransactionByBlockHashAndIndex: (blockHash: HexString32Bytes, transactionIndex: Uint) => TransactionInfoAPI | undefined; eth_getTransactionByBlockNumberAndIndex: (blockNumber: BlockNumberOrTag, transactionIndex: Uint) => TransactionInfoAPI | undefined; eth_getTransactionByHash: (transactionHash: HexString32Bytes) => TransactionInfoAPI | undefined; eth_getTransactionCount: (address: Address, blockNumber: BlockNumberOrTag) => Uint; eth_getTransactionReceipt: (transactionHash: HexString32Bytes) => TransactionReceiptAPI | undefined; eth_getUncleByBlockHashAndIndex: (blockHash: HexString32Bytes, uncleIndex: Uint) => BlockAPI; eth_getUncleByBlockNumberAndIndex: (blockNumber: BlockNumberOrTag, uncleIndex: Uint) => BlockAPI; eth_getUncleCountByBlockHash: (blockHash: HexString32Bytes) => Uint; eth_getUncleCountByBlockNumber: (blockNumber: BlockNumberOrTag) => Uint; eth_getWork: () => [HexString32Bytes, HexString32Bytes, HexString32Bytes]; eth_hashrate: () => Uint; eth_maxPriorityFeePerGas: () => Uint; eth_mining: () => boolean; eth_newBlockFilter: () => Uint; eth_newFilter: (filter: Filter) => Uint; eth_newPendingTransactionFilter: () => Uint; eth_protocolVersion: () => string; eth_sendRawTransaction: (transaction: HexStringBytes) => HexString32Bytes; eth_sendTransaction: (transaction: TransactionWithSenderAPI | Partial<TransactionWithSenderAPI>) => HexString32Bytes; eth_sign: (address: Address, message: HexStringBytes) => HexString256Bytes; eth_signTransaction: (transaction: TransactionWithSenderAPI | Partial<TransactionWithSenderAPI>) => HexStringBytes | SignedTransactionInfoAPI; eth_submitHashrate: (hashRate: HexString32Bytes, id: HexString32Bytes) => boolean; eth_submitWork: (nonce: HexString8Bytes, hash: HexString32Bytes, digest: HexString32Bytes) => boolean; eth_subscribe: (...params: [newHeads] | [newPendingTransactions] | [syncing] | [logs, { address?: HexString; topics?: HexString[] }]) => HexString; eth_syncing: () => SyncingStatusAPI; eth_uninstallFilter: (filterIdentifier: Uint) => boolean; eth_unsubscribe: (subscriptionId: HexString) => HexString }
Type declaration
Address[]
eth_accounts: () =>Uint
eth_blockNumber: () =>TransactionCallAPI, blockNumber: BlockNumberOrTag) => HexStringBytes
eth_call: (transaction:- (transaction: TransactionCallAPI, blockNumber: BlockNumberOrTag): HexStringBytes
Parameters
* ##### transaction: [TransactionCallAPI](/api/web3-types/interface/TransactionCallAPI) * ##### blockNumber: [BlockNumberOrTag](/api/web3-types#BlockNumberOrTag)
HexStringBytes
Returns
- (transaction: TransactionCallAPI, blockNumber: BlockNumberOrTag): HexStringBytes
eth_clearSubscriptions: (keepSyncing?: boolean) => void
- (keepSyncing?: boolean): void
Parameters
* ##### optionalkeepSyncing: boolean
Returns void
- (keepSyncing?: boolean): void
Address
eth_coinbase: () =>HexStringBytes
eth_compileLLL: (code: string) =>- (code: string): HexStringBytes
Parameters
* ##### code: string
HexStringBytes
Returns
- (code: string): HexStringBytes
HexStringBytes
eth_compileSerpent: (code: string) =>- (code: string): HexStringBytes
Parameters
* ##### code: string
HexStringBytes
Returns
- (code: string): HexStringBytes
CompileResultAPI
eth_compileSolidity: (code: string) =>- (code: string): CompileResultAPI
Parameters
* ##### code: string
CompileResultAPI
Returns
- (code: string): CompileResultAPI
TransactionWithSenderAPI>, blockNumber: BlockNumberOrTag) => Uint
eth_estimateGas: (transaction: Partial<- (transaction: Partial<TransactionWithSenderAPI>, blockNumber: BlockNumberOrTag): Uint
Parameters
* ##### transaction: Partial<[TransactionWithSenderAPI](/api/web3-types#TransactionWithSenderAPI)\> * ##### blockNumber: [BlockNumberOrTag](/api/web3-types#BlockNumberOrTag)
Uint
Returns
- (transaction: Partial<TransactionWithSenderAPI>, blockNumber: BlockNumberOrTag): Uint
Uint, newestBlock: BlockNumberOrTag, rewardPercentiles: number[]) => FeeHistoryResultAPI
eth_feeHistory: (blockCount:- (blockCount: Uint, newestBlock: BlockNumberOrTag, rewardPercentiles: number[]): FeeHistoryResultAPI
Parameters
* ##### blockCount: [Uint](/api/web3-types#Uint) * ##### newestBlock: [BlockNumberOrTag](/api/web3-types#BlockNumberOrTag) * ##### rewardPercentiles: number\[\]
FeeHistoryResultAPI
Returns
- (blockCount: Uint, newestBlock: BlockNumberOrTag, rewardPercentiles: number[]): FeeHistoryResultAPI
Uint
eth_gasPrice: () =>Address, blockNumber: BlockNumberOrTag) => Uint
eth_getBalance: (address:- (address: Address, blockNumber: BlockNumberOrTag): Uint
Parameters
* ##### address: [Address](/api/web3-types#Address) * ##### blockNumber: [BlockNumberOrTag](/api/web3-types#BlockNumberOrTag)
Uint
Returns
- (address: Address, blockNumber: BlockNumberOrTag): Uint
HexString32Bytes, hydrated: boolean) => BlockAPI
eth_getBlockByHash: (blockHash:- (blockHash: HexString32Bytes, hydrated: boolean): BlockAPI
Parameters
* ##### blockHash: [HexString32Bytes](/api/web3-types#HexString32Bytes) * ##### hydrated: boolean
BlockAPI
Returns
- (blockHash: HexString32Bytes, hydrated: boolean): BlockAPI
BlockNumberOrTag, hydrated: boolean) => BlockAPI
eth_getBlockByNumber: (blockNumber:- (blockNumber: BlockNumberOrTag, hydrated: boolean): BlockAPI
Parameters
* ##### blockNumber: [BlockNumberOrTag](/api/web3-types#BlockNumberOrTag) * ##### hydrated: boolean
BlockAPI
Returns
- (blockNumber: BlockNumberOrTag, hydrated: boolean): BlockAPI
HexString32Bytes) => Uint
eth_getBlockTransactionCountByHash: (blockHash:- (blockHash: HexString32Bytes): Uint
Parameters
* ##### blockHash: [HexString32Bytes](/api/web3-types#HexString32Bytes)
Uint
Returns
- (blockHash: HexString32Bytes): Uint
BlockNumberOrTag) => Uint
eth_getBlockTransactionCountByNumber: (blockNumber:- (blockNumber: BlockNumberOrTag): Uint
Parameters
* ##### blockNumber: [BlockNumberOrTag](/api/web3-types#BlockNumberOrTag)
Uint
Returns
- (blockNumber: BlockNumberOrTag): Uint
Address, blockNumber: BlockNumberOrTag) => HexStringBytes
eth_getCode: (address:- (address: Address, blockNumber: BlockNumberOrTag): HexStringBytes
Parameters
* ##### address: [Address](/api/web3-types#Address) * ##### blockNumber: [BlockNumberOrTag](/api/web3-types#BlockNumberOrTag)
HexStringBytes
Returns
- (address: Address, blockNumber: BlockNumberOrTag): HexStringBytes
eth_getCompilers: () => string[]
- (): string[]
Returns string[]
- (): string[]
Uint) => FilterResultsAPI
eth_getFilterChanges: (filterIdentifier:- (filterIdentifier: Uint): FilterResultsAPI
Parameters
* ##### filterIdentifier: [Uint](/api/web3-types#Uint)
FilterResultsAPI
Returns
- (filterIdentifier: Uint): FilterResultsAPI
Uint) => FilterResultsAPI
eth_getFilterLogs: (filterIdentifier:- (filterIdentifier: Uint): FilterResultsAPI
Parameters
* ##### filterIdentifier: [Uint](/api/web3-types#Uint)
FilterResultsAPI
Returns
- (filterIdentifier: Uint): FilterResultsAPI
Filter) => FilterResultsAPI
eth_getLogs: (filter:- (filter: Filter): FilterResultsAPI
Parameters
* ##### filter: [Filter](/api/web3-types/interface/Filter)
FilterResultsAPI
Returns
- (filter: Filter): FilterResultsAPI
Address, storageSlot: Uint256, blockNumber: BlockNumberOrTag) => HexStringBytes
eth_getStorageAt: (address:- (address: Address, storageSlot: Uint256, blockNumber: BlockNumberOrTag): HexStringBytes
Parameters
* ##### address: [Address](/api/web3-types#Address) * ##### storageSlot: [Uint256](/api/web3-types#Uint256) * ##### blockNumber: [BlockNumberOrTag](/api/web3-types#BlockNumberOrTag)
HexStringBytes
Returns
- (address: Address, storageSlot: Uint256, blockNumber: BlockNumberOrTag): HexStringBytes
HexString32Bytes, transactionIndex: Uint) => TransactionInfoAPI | undefined
eth_getTransactionByBlockHashAndIndex: (blockHash:- (blockHash: HexString32Bytes, transactionIndex: Uint): TransactionInfoAPI | undefined
Parameters
* ##### blockHash: [HexString32Bytes](/api/web3-types#HexString32Bytes) * ##### transactionIndex: [Uint](/api/web3-types#Uint)
TransactionInfoAPI | undefined
Returns
- (blockHash: HexString32Bytes, transactionIndex: Uint): TransactionInfoAPI | undefined
BlockNumberOrTag, transactionIndex: Uint) => TransactionInfoAPI | undefined
eth_getTransactionByBlockNumberAndIndex: (blockNumber:- (blockNumber: BlockNumberOrTag, transactionIndex: Uint): TransactionInfoAPI | undefined
Parameters
* ##### blockNumber: [BlockNumberOrTag](/api/web3-types#BlockNumberOrTag) * ##### transactionIndex: [Uint](/api/web3-types#Uint)
TransactionInfoAPI | undefined
Returns
- (blockNumber: BlockNumberOrTag, transactionIndex: Uint): TransactionInfoAPI | undefined
HexString32Bytes) => TransactionInfoAPI | undefined
eth_getTransactionByHash: (transactionHash:- (transactionHash: HexString32Bytes): TransactionInfoAPI | undefined
Parameters
* ##### transactionHash: [HexString32Bytes](/api/web3-types#HexString32Bytes)
TransactionInfoAPI | undefined
Returns
- (transactionHash: HexString32Bytes): TransactionInfoAPI | undefined
Address, blockNumber: BlockNumberOrTag) => Uint
eth_getTransactionCount: (address:- (address: Address, blockNumber: BlockNumberOrTag): Uint
Parameters
* ##### address: [Address](/api/web3-types#Address) * ##### blockNumber: [BlockNumberOrTag](/api/web3-types#BlockNumberOrTag)
Uint
Returns
- (address: Address, blockNumber: BlockNumberOrTag): Uint
HexString32Bytes) => TransactionReceiptAPI | undefined
eth_getTransactionReceipt: (transactionHash:- (transactionHash: HexString32Bytes): TransactionReceiptAPI | undefined
Parameters
* ##### transactionHash: [HexString32Bytes](/api/web3-types#HexString32Bytes)
TransactionReceiptAPI | undefined
Returns
- (transactionHash: HexString32Bytes): TransactionReceiptAPI | undefined
HexString32Bytes, uncleIndex: Uint) => BlockAPI
eth_getUncleByBlockHashAndIndex: (blockHash:- (blockHash: HexString32Bytes, uncleIndex: Uint): BlockAPI
Parameters
* ##### blockHash: [HexString32Bytes](/api/web3-types#HexString32Bytes) * ##### uncleIndex: [Uint](/api/web3-types#Uint)
BlockAPI
Returns
- (blockHash: HexString32Bytes, uncleIndex: Uint): BlockAPI
BlockNumberOrTag, uncleIndex: Uint) => BlockAPI
eth_getUncleByBlockNumberAndIndex: (blockNumber:- (blockNumber: BlockNumberOrTag, uncleIndex: Uint): BlockAPI
Parameters
* ##### blockNumber: [BlockNumberOrTag](/api/web3-types#BlockNumberOrTag) * ##### uncleIndex: [Uint](/api/web3-types#Uint)
BlockAPI
Returns
- (blockNumber: BlockNumberOrTag, uncleIndex: Uint): BlockAPI
HexString32Bytes) => Uint
eth_getUncleCountByBlockHash: (blockHash:- (blockHash: HexString32Bytes): Uint
Parameters
* ##### blockHash: [HexString32Bytes](/api/web3-types#HexString32Bytes)
Uint
Returns
- (blockHash: HexString32Bytes): Uint
BlockNumberOrTag) => Uint
eth_getUncleCountByBlockNumber: (blockNumber:- (blockNumber: BlockNumberOrTag): Uint
Parameters
* ##### blockNumber: [BlockNumberOrTag](/api/web3-types#BlockNumberOrTag)
Uint
Returns
- (blockNumber: BlockNumberOrTag): Uint
HexString32Bytes, HexString32Bytes, HexString32Bytes]
eth_getWork: () => [- (): [HexString32Bytes, HexString32Bytes, HexString32Bytes]
HexString32Bytes, HexString32Bytes, HexString32Bytes]
Returns [
- (): [HexString32Bytes, HexString32Bytes, HexString32Bytes]
Uint
eth_hashrate: () =>Uint
eth_maxPriorityFeePerGas: () =>eth_mining: () => boolean
- (): boolean
Returns boolean
- (): boolean
Uint
eth_newBlockFilter: () =>Filter) => Uint
eth_newFilter: (filter:Uint
eth_newPendingTransactionFilter: () =>eth_protocolVersion: () => string
- (): string
Returns string
- (): string
HexStringBytes) => HexString32Bytes
eth_sendRawTransaction: (transaction:- (transaction: HexStringBytes): HexString32Bytes
Parameters
* ##### transaction: [HexStringBytes](/api/web3-types#HexStringBytes)
HexString32Bytes
Returns
- (transaction: HexStringBytes): HexString32Bytes
TransactionWithSenderAPI | Partial<TransactionWithSenderAPI>) => HexString32Bytes
eth_sendTransaction: (transaction:- (transaction: TransactionWithSenderAPI | Partial<TransactionWithSenderAPI>): HexString32Bytes
Parameters
* ##### transaction: [TransactionWithSenderAPI](/api/web3-types#TransactionWithSenderAPI) | Partial<[TransactionWithSenderAPI](/api/web3-types#TransactionWithSenderAPI)\>
HexString32Bytes
Returns
- (transaction: TransactionWithSenderAPI | Partial<TransactionWithSenderAPI>): HexString32Bytes
Address, message: HexStringBytes) => HexString256Bytes
eth_sign: (address:- (address: Address, message: HexStringBytes): HexString256Bytes
Parameters
* ##### address: [Address](/api/web3-types#Address) * ##### message: [HexStringBytes](/api/web3-types#HexStringBytes)
HexString256Bytes
Returns
- (address: Address, message: HexStringBytes): HexString256Bytes
TransactionWithSenderAPI | Partial<TransactionWithSenderAPI>) => HexStringBytes | SignedTransactionInfoAPI
eth_signTransaction: (transaction:- (transaction: TransactionWithSenderAPI | Partial<TransactionWithSenderAPI>): HexStringBytes | SignedTransactionInfoAPI
Parameters
* ##### transaction: [TransactionWithSenderAPI](/api/web3-types#TransactionWithSenderAPI) | Partial<[TransactionWithSenderAPI](/api/web3-types#TransactionWithSenderAPI)\>
HexStringBytes | SignedTransactionInfoAPI
Returns
- (transaction: TransactionWithSenderAPI | Partial<TransactionWithSenderAPI>): HexStringBytes | SignedTransactionInfoAPI
HexString32Bytes, id: HexString32Bytes) => boolean
eth_submitHashrate: (hashRate:- (hashRate: HexString32Bytes, id: HexString32Bytes): boolean
Parameters
* ##### hashRate: [HexString32Bytes](/api/web3-types#HexString32Bytes) * ##### id: [HexString32Bytes](/api/web3-types#HexString32Bytes)
Returns boolean
- (hashRate: HexString32Bytes, id: HexString32Bytes): boolean
HexString8Bytes, hash: HexString32Bytes, digest: HexString32Bytes) => boolean
eth_submitWork: (nonce:- (nonce: HexString8Bytes, hash: HexString32Bytes, digest: HexString32Bytes): boolean
Parameters
* ##### nonce: [HexString8Bytes](/api/web3-types#HexString8Bytes) * ##### hash: [HexString32Bytes](/api/web3-types#HexString32Bytes) * ##### digest: [HexString32Bytes](/api/web3-types#HexString32Bytes)
Returns boolean
- (nonce: HexString8Bytes, hash: HexString32Bytes, digest: HexString32Bytes): boolean
HexString; topics?: HexString[] }]) => HexString
eth_subscribe: (...params: [newHeads] | [newPendingTransactions] | [syncing] | [logs, { address?:- (...params: [newHeads] | [newPendingTransactions] | [syncing] | [logs, { address?: HexString; topics?: HexString[] }]): HexString
Parameters
* ##### rest...params: \[newHeads\] | \[newPendingTransactions\] | \[syncing\] | \[logs, { address?: [HexString](/api/web3-types#HexString); topics?: [HexString](/api/web3-types#HexString)\[\] }\]
HexString
Returns
- (...params: [newHeads] | [newPendingTransactions] | [syncing] | [logs, { address?: HexString; topics?: HexString[] }]): HexString
SyncingStatusAPI
eth_syncing: () =>- (): SyncingStatusAPI
SyncingStatusAPI
Returns
- (): SyncingStatusAPI
Uint) => boolean
eth_uninstallFilter: (filterIdentifier:- (filterIdentifier: Uint): boolean
Parameters
* ##### filterIdentifier: [Uint](/api/web3-types#Uint)
Returns boolean
- (filterIdentifier: Uint): boolean
HexString) => HexString
eth_unsubscribe: (subscriptionId:
EthPersonalAPI: { personal_ecRecover: (signedData: HexString, signature: HexString) => Address; personal_importRawKey: (keyData: HexString, passphrase: string) => HexString; personal_listAccounts: () => Address[]; personal_lockAccount: (address: Address) => boolean; personal_newAccount: (password: string) => Address; personal_sendTransaction: (tx: Transaction, passphrase: string) => HexString; personal_sign: (data: HexString, address: Address, passphrase: string) => HexString; personal_signTransaction: (tx: Transaction, passphrase: string) => HexString; personal_unlockAccount: (address: Address, password: string, unlockDuration: number) => boolean }
Type declaration
HexString, signature: HexString) => Address
personal_ecRecover: (signedData:HexString, passphrase: string) => HexString
personal_importRawKey: (keyData:Address[]
personal_listAccounts: () =>Address) => boolean
personal_lockAccount: (address:- (address: Address): boolean
Parameters
* ##### address: [Address](/api/web3-types#Address)
Returns boolean
- (address: Address): boolean
Address
personal_newAccount: (password: string) =>Transaction, passphrase: string) => HexString
personal_sendTransaction: (tx:- (tx: Transaction, passphrase: string): HexString
Parameters
* ##### tx: [Transaction](/api/web3-types/interface/Transaction) * ##### passphrase: string
HexString
Returns
- (tx: Transaction, passphrase: string): HexString
HexString, address: Address, passphrase: string) => HexString
personal_sign: (data:Transaction, passphrase: string) => HexString
personal_signTransaction: (tx:- (tx: Transaction, passphrase: string): HexString
Parameters
* ##### tx: [Transaction](/api/web3-types/interface/Transaction) * ##### passphrase: string
HexString
Returns
- (tx: Transaction, passphrase: string): HexString
Address, password: string, unlockDuration: number) => boolean
personal_unlockAccount: (address:- (address: Address, password: string, unlockDuration: number): boolean
Parameters
* ##### address: [Address](/api/web3-types#Address) * ##### password: string * ##### unlockDuration: number
Returns boolean
- (address: Address, password: string, unlockDuration: number): boolean
FilterAbis<Abis, Filter, Abi>: Abi extends Filter ? Abi : never
Type parameters
- Abis: ContractAbi
- Filter
- Abi = Abis[number]
FilterParams: Omit<Filter, blockHash | filter>
FixedSizeArray<T, N>: GrowToSize<T, [], N>
Type parameters
- T
- N: number
FormatType<T, F>: number extends Extract<T, Numbers> ? NumberTypes[F[number]] | Exclude<T, Numbers> : Uint8Array extends Extract<T, Bytes> ? ByteTypes[F[bytes]] | Exclude<T, Bytes> : T extends object | undefined ? { [ P in keyof T ]: FormatType<T[P], F> } : T
GrowToSize<T, A, N>: { 0: A; 1: GrowToSize<T, _Grow<T, A>, N> }[A[length] extends N ? 0 : 1]
Type parameters
- T
- A: T[]
- N: number
IndexKeysForArray<A>: Exclude<keyof A, keyof []>
Type parameters
- A: readonly unknown[]
JsonEventInterface: { anonymous: boolean; indexed: boolean; inputs: Components[]; name: string; type: event }
Type declaration
anonymous: boolean
indexed: boolean
Components[]
inputs:name: string
type: event
JsonFunctionInterface: { inputs: Components[]; name: string; outputs?: AbiInput[]; stateMutability?: string; type: function }
Type declaration
Components[]
inputs:name: string
AbiInput[]
optionaloutputs?:optionalstateMutability?: string
type: function
JsonRpcId: string | number | undefined
JsonRpcIdentifier: string & (2.0 | 1.0)
Type parameters
- Param = unknown[]
JsonRpcResult: string | number | boolean | Record<string, unknown>
KeyStore: { address: string; crypto: { cipher: Cipher; cipherparams: { iv: string }; ciphertext: string; kdf: pbkdf2 | scrypt; kdfparams: ScryptParams | PBKDF2SHA256Params; mac: HexString }; id: string; version: 3 }
Type declaration
address: string
Cipher; cipherparams: { iv: string }; ciphertext: string; kdf: pbkdf2 | scrypt; kdfparams: ScryptParams | PBKDF2SHA256Params; mac: HexString }
crypto: { cipher:Cipher
cipher:cipherparams: { iv: string }
* ##### iv: string
ciphertext: string
kdf: pbkdf2 | scrypt
ScryptParams | PBKDF2SHA256Params
kdfparams:HexString
mac:
id: string
version: 3
Type parameters
- Type: string
- TypeComponents: ReadonlyArray<AbiParameter> | undefined | unknown
Mutable<T>: { -readonly [ P in keyof T ]: T[P] }
Type parameters
- T
NumberTypes: { NUMBER_BIGINT: bigint; NUMBER_HEX: HexString; NUMBER_NUMBER: number; NUMBER_STR: string }
Type declaration
NUMBER_BIGINT: bigint
HexString
NUMBER_HEX:NUMBER_NUMBER: number
NUMBER_STR: string
Numbers: number | bigint | string | HexString
Optional<T, K>: Pick<Partial<T>, K> & Omit<T, K>
Type parameters
- T
- K: keyof T
PBKDF2SHA256Params: { c: number; dklen: number; prf: hmac-sha256; salt: Uint8Array | string }
Type declaration
c: number
dklen: number
prf: hmac-sha256
salt: Uint8Array | string
PrimitiveAddressType<Type>: Type extends `address[${infer
Size}]` ? _TypedArray<Address, Size> : Type extends address ? Address : never
Type parameters
- Type: string
PrimitiveBooleanType<Type>: Type extends `bool[${infer
Size}]` ? _TypedArray<boolean, Size> : Type extends bool ? boolean : never
Type parameters
- Type: string
PrimitiveBytesType<Type>: Type extends `bytes${string}[${infer
Size}]` ? _TypedArray<Bytes, Size> : Type extends bytes | `bytes${string}` ? Bytes : never
Type parameters
- Type: string
PrimitiveIntegerType<Type>: Type extends `uint${string}[${infer
Size}]` | `int${string}[${infer
Size}]` ? _TypedArray<Numbers, Size> : Type extends uint | int | `int${string}` | `uint${string}` ? Numbers : never
Type parameters
- Type: string
PrimitiveStringType<Type>: Type extends `string${string}[${infer
Size}]` ? _TypedArray<string, Size> : Type extends string | `string${string}` ? string : never
Type parameters
- Type: string
PrimitiveTupleType<Type, TypeComponents>: TypeComponents extends ReadonlyArray<AbiParameter> ? Type extends tuple ? { [ Param in TypeComponents[number] as Param[name] ]: MatchPrimitiveType<Param[type], Param[components]> } : Type extends `tuple[${infer
Size}]` ? _TypedArray<{ [ Param in TypeComponents[number] as Param[name] ]: MatchPrimitiveType<Param[type], Param[components]> }, Size> : never : never
Type parameters
- Type: string
- TypeComponents: ReadonlyArray<AbiParameter> | undefined | unknown = []
ProviderAccounts: string[]
Receipt: Record<string, unknown>
ScryptParams: { dklen: number; n: number; p: number; r: number; salt: Uint8Array | string }
Type declaration
dklen: number
n: number
p: number
r: number
salt: Uint8Array | string
SignResult: SignatureObject & { message?: string; signature: string }
SignTransactionResult: SignatureObject & { rawTransaction: string; transactionHash: string }
SignatureObject: { messageHash: string; r: string; s: string; v: string }
Type declaration
messageHash: string
r: string
s: string
v: string
SyncingStatusAPI: { currentBlock: Uint; highestBlock: Uint; startingBlock: Uint } | boolean
TransactionOutput: { blockNumber?: Numbers; from?: HexString; gas?: Numbers; gasLimit?: string; input: string; nonce: Numbers; to?: HexString; transactionIndex?: Numbers; value: Numbers } & ({ gasPrice?: never; maxFeePerGas: Numbers; maxPriorityFeePerGas: Numbers } | { gasPrice: Numbers; maxFeePerGas?: never; maxPriorityFeePerGas?: never })
TypedObjectAbbreviated: { t: string; v: EncodingTypes }
ValidChains: goerli | kovan | mainnet | rinkeby | ropsten | sepolia
ValueTypes: address | bool | string | int256 | uint256 | bytes | bigint
Web3APIMethod<T>: string & keyof Exclude<T, unknown>
Web3APIParams<API, Method>: API extends Exclude<Web3APISpec, unknown> ? Parameters<API[Method]> : unknown
Web3APIReturnType<API, Method>: API extends Record<string, (...params: any) => any> ? ReturnType<API[Method]> : any
Web3APISpec: Record<string, (...params: any) => any> | unknown
Web3BaseProviderConstructor: new <API>(url: string, net?: Socket) => Web3BaseProvider<API>
Type declaration
- new <API>(url: string, net?: Socket): Web3BaseProvider<API>
Type parameters
* **API**: [Web3APISpec](/api/web3-types#Web3APISpec)
Parameters
* ##### url: string * ##### optionalnet: Socket
Web3BaseProvider<API>
Returns
Web3Eip1193ProviderEventCallback<T>: (data: T) => void
Type parameters
- T
Type declaration
- (data: T): void
Parameters
* ##### data: T
Returns void
Web3NetAPI: { net_listening: () => boolean; net_peerCount: () => HexString; net_version: () => string }
Type declaration
net_listening: () => boolean
- (): boolean
Returns boolean
- (): boolean
HexString
net_peerCount: () =>net_version: () => string
- (): string
Returns string
- (): string
Type declaration
- (error: Error | ProviderRpcError | undefined, result?: JsonRpcSubscriptionResult | JsonRpcNotification<T>): void
Parameters
* ##### error: Error | [ProviderRpcError](/api/web3-types/interface/ProviderRpcError) | undefined * ##### optionalresult: [JsonRpcSubscriptionResult](/api/web3-types/interface/JsonRpcSubscriptionResult) | [JsonRpcNotification](/api/web3-types/interface/JsonRpcNotification)<T\>
Returns void
Type parameters
- ResultType = unknown
Type declaration
- (err?: Error | Web3Error | null | JsonRpcResponseWithError<Error>, response?: JsonRpcResponseWithResult<ResultType>): void
Parameters
* ##### optionalerr: Error | [Web3Error](/api/web3-types/interface/Web3Error) | null | [JsonRpcResponseWithError](/api/web3-types/interface/JsonRpcResponseWithError)<Error\> * ##### optionalresponse: [JsonRpcResponseWithResult](/api/web3-types/interface/JsonRpcResponseWithResult)<ResultType\>
Returns void
Web3ProviderStatus: connecting | connected | disconnected
Web3ValidationErrorObject<K, P, S>: { data?: unknown; instancePath: string; keyword: K; message?: string; params: P; propertyName?: string; schema?: S; schemaPath: string }
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
DEFAULT_RETURN_FORMAT: { bytes: HEX; number: BIGINT } = ...
Type declaration
readonlybytes: HEX
readonlynumber: BIGINT
ETH_DATA_FORMAT: { bytes: HEX; number: HEX } = ...
Type declaration
readonlybytes: HEX
readonlynumber: HEX