UNPKG

2.68 kBTypeScriptView Raw
1export declare enum Web3WrapperErrors {
2 TransactionMiningTimeout = "TRANSACTION_MINING_TIMEOUT"
3}
4export interface AbstractBlockRPC {
5 number: string | null;
6 hash: string | null;
7 parentHash: string;
8 nonce: string | null;
9 sha3Uncles: string;
10 logsBloom: string | null;
11 transactionsRoot: string;
12 stateRoot: string;
13 miner: string;
14 difficulty: string;
15 totalDifficulty: string;
16 extraData: string;
17 size: string;
18 gasLimit: string;
19 gasUsed: string;
20 timestamp: string;
21 uncles: string[];
22}
23export interface BlockWithoutTransactionDataRPC extends AbstractBlockRPC {
24 transactions: string[];
25}
26export interface BlockWithTransactionDataRPC extends AbstractBlockRPC {
27 transactions: TransactionRPC[];
28}
29export interface TransactionRPC {
30 hash: string;
31 nonce: string;
32 blockHash: string | null;
33 blockNumber: string | null;
34 transactionIndex: string | null;
35 from: string;
36 to: string | null;
37 value: string;
38 gasPrice?: string;
39 maxFeePerGas?: string;
40 maxPriorityFeePerGas?: string;
41 gas: string;
42 input: string;
43}
44export interface TransactionReceiptRPC {
45 blockHash: string;
46 blockNumber: string;
47 transactionHash: string;
48 transactionIndex: string;
49 from: string;
50 to: string;
51 status: TransactionReceiptStatusRPC;
52 cumulativeGasUsed: string;
53 gasUsed: string;
54 contractAddress: string | null;
55 logs: LogEntryRPC[];
56}
57export interface LogEntryRPC {
58 logIndex: string | null;
59 transactionIndex: string | null;
60 transactionHash: string;
61 blockHash: string | null;
62 blockNumber: string | null;
63 address: string;
64 data: string;
65 topics: string[];
66}
67export declare type TransactionReceiptStatusRPC = null | string | 0 | 1;
68export interface CallTxDataBaseRPC {
69 to?: string;
70 value?: string;
71 gas?: string;
72 gasPrice?: string;
73 maxFeePerGas?: string;
74 maxPriorityFeePerGas?: string;
75 data?: string;
76 nonce?: string;
77 type?: number;
78 accessList?: Array<{
79 address: string;
80 storageKeys: string[];
81 }>;
82}
83export interface TxDataRPC extends CallDataRPC {
84}
85export interface CallDataRPC extends CallTxDataBaseRPC {
86 from?: string;
87}
88export interface GethCallOverridesRPC {
89 [address: string]: {
90 code?: string;
91 nonce?: string;
92 balance?: string;
93 };
94}
95export interface CreateAccessListResponseRPC {
96 accessList: Array<{
97 address: string;
98 storageKeys: string[] | null;
99 }>;
100 gasUsed: string;
101 error?: string;
102}
103export declare enum NodeType {
104 Geth = "GETH",
105 Ganache = "GANACHE"
106}
107//# sourceMappingURL=types.d.ts.map
\No newline at end of file