/** * External Interfaces for other EthereumJS libraries */ import type { Account, Address, PrefixedHexString } from '@ethereumjs/util'; export interface StorageDump { [key: string]: string; } /** * Object that can contain a set of storage keys associated with an account. */ export interface StorageRange { /** * A dictionary where the keys are hashed storage keys, and the values are * objects containing the preimage of the hashed key (in `key`) and the * storage key (in `value`). Currently, there is no way to retrieve preimages, * so they are always `null`. */ storage: { [key: string]: { key: string | null; value: string; }; }; /** * The next (hashed) storage key after the greatest storage key * contained in `storage`. */ nextKey: string | null; } export declare type AccountFields = Partial>; export declare type StorageProof = { key: PrefixedHexString; proof: PrefixedHexString[]; value: PrefixedHexString; }; export declare type Proof = { address: PrefixedHexString; balance: PrefixedHexString; codeHash: PrefixedHexString; nonce: PrefixedHexString; storageHash: PrefixedHexString; accountProof: PrefixedHexString[]; storageProof: StorageProof[]; }; export declare type AccessListItem = { address: PrefixedHexString; storageKeys: PrefixedHexString[]; }; export declare type AccessListBytesItem = [Uint8Array, Uint8Array[]]; export declare type AccessListBytes = AccessListBytesItem[]; export declare type AccessList = AccessListItem[]; /** * Authorization list types */ export declare type AuthorizationListItem = { chainId: PrefixedHexString; address: PrefixedHexString; nonce: PrefixedHexString[]; yParity: PrefixedHexString; r: PrefixedHexString; s: PrefixedHexString; }; export declare type AuthorizationListBytesItem = [ Uint8Array, Uint8Array, Uint8Array[], Uint8Array, Uint8Array, Uint8Array ]; export declare type AuthorizationListBytes = AuthorizationListBytesItem[]; export declare type AuthorizationList = AuthorizationListItem[]; /** * Verkle related * * Experimental (do not implement) */ export declare type AccessEventFlags = { stemRead: boolean; stemWrite: boolean; chunkRead: boolean; chunkWrite: boolean; chunkFill: boolean; }; /** * Verkle related * * Experimental (do not implement) */ export interface AccessWitnessInterface { touchAndChargeProofOfAbsence(address: Address): bigint; touchAndChargeMessageCall(address: Address): bigint; touchAndChargeValueTransfer(caller: Address, target: Address): bigint; touchAndChargeContractCreateInit(address: Address): bigint; touchAndChargeContractCreateCompleted(address: Address): bigint; touchTxOriginAndComputeGas(origin: Address): bigint; touchTxTargetAndComputeGas(target: Address, { sendsValue }: { sendsValue?: boolean; }): bigint; touchCodeChunksRangeOnReadAndChargeGas(contact: Address, startPc: number, endPc: number): bigint; touchCodeChunksRangeOnWriteAndChargeGas(contact: Address, startPc: number, endPc: number): bigint; touchAddressOnWriteAndComputeGas(address: Address, treeIndex: number | bigint, subIndex: number | Uint8Array): bigint; touchAddressOnReadAndComputeGas(address: Address, treeIndex: number | bigint, subIndex: number | Uint8Array): bigint; touchAddressAndChargeGas(address: Address, treeIndex: number | bigint, subIndex: number | Uint8Array, { isWrite }: { isWrite?: boolean; }): bigint; touchAddress(address: Address, treeIndex: number | bigint, subIndex: number | Uint8Array, { isWrite }: { isWrite?: boolean; }): AccessEventFlags; shallowCopy(): AccessWitnessInterface; merge(accessWitness: AccessWitnessInterface): void; } export interface StateManagerInterface { getAccount(address: Address): Promise; putAccount(address: Address, account?: Account): Promise; deleteAccount(address: Address): Promise; modifyAccountFields(address: Address, accountFields: AccountFields): Promise; putContractCode(address: Address, value: Uint8Array): Promise; getContractCode(address: Address): Promise; getContractCodeSize?(address: Address): Promise; getContractStorage(address: Address, key: Uint8Array): Promise; putContractStorage(address: Address, key: Uint8Array, value: Uint8Array): Promise; clearContractStorage(address: Address): Promise; checkpoint(): Promise; commit(): Promise; revert(): Promise; getStateRoot(): Promise; setStateRoot(stateRoot: Uint8Array, clearCache?: boolean): Promise; getProof?(address: Address, storageSlots: Uint8Array[]): Promise; hasStateRoot(root: Uint8Array): Promise; shallowCopy(downlevelCaches?: boolean): StateManagerInterface; getAppliedKey?(address: Uint8Array): Uint8Array; checkChunkWitnessPresent?(contract: Address, programCounter: number): Promise; } export interface EVMStateManagerInterface extends StateManagerInterface { originalStorageCache: { get(address: Address, key: Uint8Array): Promise; clear(): void; }; dumpStorage(address: Address): Promise; dumpStorageRange(address: Address, startKey: bigint, limit: number): Promise; generateCanonicalGenesis(initState: any): Promise; getProof(address: Address, storageSlots?: Uint8Array[]): Promise; shallowCopy(downlevelCaches?: boolean): EVMStateManagerInterface; } //# sourceMappingURL=interfaces.d.ts.map