web3-types
Advanced tools
Comparing version 1.0.3-dev.51bc03d.0 to 1.0.3-dev.6da17e1.0
import { EthExecutionAPI } from './eth_execution_api.js'; | ||
import { AccountObject, Address, BlockNumberOrTag, HexString32Bytes, TransactionInfo, Uint } from '../eth_types.js'; | ||
import { AccountObject, Address, BlockNumberOrTag, Eip712TypedData, HexString256Bytes, HexString32Bytes, TransactionInfo, Uint } from '../eth_types.js'; | ||
export declare type Web3EthExecutionAPI = EthExecutionAPI & { | ||
@@ -9,2 +9,4 @@ eth_pendingTransactions: () => TransactionInfo[]; | ||
eth_getProof: (address: Address, storageKeys: HexString32Bytes[], blockNumber: BlockNumberOrTag) => AccountObject; | ||
eth_signTypedData: (address: Address, typedData: Eip712TypedData, useLegacy: true) => HexString256Bytes; | ||
eth_signTypedData_v4: (address: Address, typedData: Eip712TypedData, useLegacy: false | undefined) => HexString256Bytes; | ||
}; |
@@ -115,14 +115,34 @@ import { Bytes, HexString, Numbers } from './primitives_types.js'; | ||
} | ||
export interface Withdrawals { | ||
readonly index: Numbers; | ||
readonly validatorIndex: Numbers; | ||
readonly address: Address; | ||
readonly amount: Numbers; | ||
} | ||
export interface BlockHeaderOutput { | ||
readonly hash?: HexString32Bytes; | ||
readonly parentHash?: HexString32Bytes; | ||
readonly receiptsRoot?: HexString32Bytes; | ||
readonly miner?: HexString; | ||
readonly stateRoot?: HexString32Bytes; | ||
readonly transactionsRoot?: HexString32Bytes; | ||
readonly withdrawalsRoot?: HexString32Bytes; | ||
readonly logsBloom?: Bytes; | ||
readonly difficulty?: Numbers; | ||
readonly number?: Numbers; | ||
readonly gasLimit: Numbers; | ||
readonly gasUsed: Numbers; | ||
readonly timestamp: Numbers; | ||
readonly number?: Numbers; | ||
readonly difficulty?: Numbers; | ||
readonly extraData?: Bytes; | ||
readonly nonce?: Numbers; | ||
readonly sha3Uncles: HexString32Bytes[]; | ||
readonly baseFeePerGas?: Numbers; | ||
readonly author?: Address; | ||
readonly totalDifficulty?: Numbers; | ||
readonly size?: Numbers; | ||
readonly excessDataGas?: Numbers; | ||
readonly mixHash?: HexString32Bytes; | ||
readonly transactions?: TransactionOutput[]; | ||
readonly miner?: HexString; | ||
readonly baseFeePerGas?: Numbers; | ||
readonly parentHash?: HexString32Bytes; | ||
readonly sha3Uncles: HexString32Bytes[]; | ||
readonly uncles?: Uncles; | ||
readonly withdrawals?: Withdrawals[]; | ||
} | ||
@@ -386,2 +406,15 @@ export interface ReceiptInput { | ||
} | ||
export interface Eip712TypeDetails { | ||
name: string; | ||
type: string; | ||
} | ||
export interface Eip712TypedData { | ||
readonly types: { | ||
EIP712Domain: Eip712TypeDetails[]; | ||
[key: string]: Eip712TypeDetails[]; | ||
}; | ||
readonly primaryType: string; | ||
readonly domain: Record<string, string | number>; | ||
readonly message: Record<string, unknown>; | ||
} | ||
export {}; |
import { EthExecutionAPI } from './eth_execution_api.js'; | ||
import { AccountObject, Address, BlockNumberOrTag, HexString32Bytes, TransactionInfo, Uint } from '../eth_types.js'; | ||
import { AccountObject, Address, BlockNumberOrTag, Eip712TypedData, HexString256Bytes, HexString32Bytes, TransactionInfo, Uint } from '../eth_types.js'; | ||
export declare type Web3EthExecutionAPI = EthExecutionAPI & { | ||
@@ -9,3 +9,5 @@ eth_pendingTransactions: () => TransactionInfo[]; | ||
eth_getProof: (address: Address, storageKeys: HexString32Bytes[], blockNumber: BlockNumberOrTag) => AccountObject; | ||
eth_signTypedData: (address: Address, typedData: Eip712TypedData, useLegacy: true) => HexString256Bytes; | ||
eth_signTypedData_v4: (address: Address, typedData: Eip712TypedData, useLegacy: false | undefined) => HexString256Bytes; | ||
}; | ||
//# sourceMappingURL=web3_eth_execution_api.d.ts.map |
@@ -115,14 +115,34 @@ import { Bytes, HexString, Numbers } from './primitives_types.js'; | ||
} | ||
export interface Withdrawals { | ||
readonly index: Numbers; | ||
readonly validatorIndex: Numbers; | ||
readonly address: Address; | ||
readonly amount: Numbers; | ||
} | ||
export interface BlockHeaderOutput { | ||
readonly hash?: HexString32Bytes; | ||
readonly parentHash?: HexString32Bytes; | ||
readonly receiptsRoot?: HexString32Bytes; | ||
readonly miner?: HexString; | ||
readonly stateRoot?: HexString32Bytes; | ||
readonly transactionsRoot?: HexString32Bytes; | ||
readonly withdrawalsRoot?: HexString32Bytes; | ||
readonly logsBloom?: Bytes; | ||
readonly difficulty?: Numbers; | ||
readonly number?: Numbers; | ||
readonly gasLimit: Numbers; | ||
readonly gasUsed: Numbers; | ||
readonly timestamp: Numbers; | ||
readonly number?: Numbers; | ||
readonly difficulty?: Numbers; | ||
readonly extraData?: Bytes; | ||
readonly nonce?: Numbers; | ||
readonly sha3Uncles: HexString32Bytes[]; | ||
readonly baseFeePerGas?: Numbers; | ||
readonly author?: Address; | ||
readonly totalDifficulty?: Numbers; | ||
readonly size?: Numbers; | ||
readonly excessDataGas?: Numbers; | ||
readonly mixHash?: HexString32Bytes; | ||
readonly transactions?: TransactionOutput[]; | ||
readonly miner?: HexString; | ||
readonly baseFeePerGas?: Numbers; | ||
readonly parentHash?: HexString32Bytes; | ||
readonly sha3Uncles: HexString32Bytes[]; | ||
readonly uncles?: Uncles; | ||
readonly withdrawals?: Withdrawals[]; | ||
} | ||
@@ -386,3 +406,16 @@ export interface ReceiptInput { | ||
} | ||
export interface Eip712TypeDetails { | ||
name: string; | ||
type: string; | ||
} | ||
export interface Eip712TypedData { | ||
readonly types: { | ||
EIP712Domain: Eip712TypeDetails[]; | ||
[key: string]: Eip712TypeDetails[]; | ||
}; | ||
readonly primaryType: string; | ||
readonly domain: Record<string, string | number>; | ||
readonly message: Record<string, unknown>; | ||
} | ||
export {}; | ||
//# sourceMappingURL=eth_types.d.ts.map |
{ | ||
"name": "web3-types", | ||
"version": "1.0.3-dev.51bc03d.0+51bc03d", | ||
"version": "1.0.3-dev.6da17e1.0+6da17e1", | ||
"description": "Provide the common data structures and interfaces for web3 modules.", | ||
@@ -59,3 +59,3 @@ "main": "./lib/commonjs/index.js", | ||
}, | ||
"gitHead": "51bc03dd15dbb9619e77b81c474ab251f9afcfec" | ||
"gitHead": "6da17e177a1e606191545558e180a0c5fb4d18f5" | ||
} |
@@ -22,2 +22,4 @@ /* | ||
BlockNumberOrTag, | ||
Eip712TypedData, | ||
HexString256Bytes, | ||
HexString32Bytes, | ||
@@ -45,2 +47,16 @@ TransactionInfo, | ||
) => AccountObject; | ||
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md | ||
eth_signTypedData: ( | ||
address: Address, | ||
typedData: Eip712TypedData, | ||
useLegacy: true, | ||
) => HexString256Bytes; | ||
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md | ||
eth_signTypedData_v4: ( | ||
address: Address, | ||
typedData: Eip712TypedData, | ||
useLegacy: false | undefined, | ||
) => HexString256Bytes; | ||
}; |
@@ -147,14 +147,38 @@ /* | ||
export interface Withdrawals { | ||
readonly index: Numbers; | ||
readonly validatorIndex: Numbers; | ||
readonly address: Address; | ||
readonly amount: Numbers; | ||
} | ||
export interface BlockHeaderOutput { | ||
readonly hash?: HexString32Bytes; | ||
readonly parentHash?: HexString32Bytes; | ||
readonly receiptsRoot?: HexString32Bytes; | ||
readonly miner?: HexString; | ||
readonly stateRoot?: HexString32Bytes; | ||
readonly transactionsRoot?: HexString32Bytes; | ||
readonly withdrawalsRoot?: HexString32Bytes; | ||
readonly logsBloom?: Bytes; | ||
readonly difficulty?: Numbers; | ||
readonly number?: Numbers; | ||
readonly gasLimit: Numbers; | ||
readonly gasUsed: Numbers; | ||
readonly timestamp: Numbers; | ||
readonly number?: Numbers; | ||
readonly difficulty?: Numbers; | ||
readonly extraData?: Bytes; | ||
readonly nonce?: Numbers; | ||
readonly sha3Uncles: HexString32Bytes[]; | ||
readonly baseFeePerGas?: Numbers; | ||
// These fields are returned when the RPC client is Nethermind, | ||
// but aren't available in other clients such as Geth | ||
readonly author?: Address; | ||
readonly totalDifficulty?: Numbers; | ||
readonly size?: Numbers; | ||
readonly excessDataGas?: Numbers; | ||
readonly mixHash?: HexString32Bytes; | ||
readonly transactions?: TransactionOutput[]; | ||
readonly miner?: HexString; | ||
readonly baseFeePerGas?: Numbers; | ||
readonly parentHash?: HexString32Bytes; | ||
readonly sha3Uncles: HexString32Bytes[]; | ||
readonly uncles?: Uncles; | ||
readonly withdrawals?: Withdrawals[]; | ||
} | ||
@@ -476,1 +500,15 @@ | ||
} | ||
export interface Eip712TypeDetails { | ||
name: string; | ||
type: string; | ||
} | ||
export interface Eip712TypedData { | ||
readonly types: { | ||
EIP712Domain: Eip712TypeDetails[]; | ||
[key: string]: Eip712TypeDetails[]; | ||
}; | ||
readonly primaryType: string; | ||
readonly domain: Record<string, string | number>; | ||
readonly message: Record<string, unknown>; | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
263692
4779