11import type { RpcMethod } from '.' ;
22
33// Base types
4- type HexString = `0x${string } `;
5- type Address = `0x${string } `;
6- type Hash32 = `0x${string } `;
7- type BlockTag = 'earliest' | 'finalized' | 'safe' | 'latest' | 'pending' ;
8- type BlockNumberOrTag = HexString | BlockTag ;
9- type BlockNumberOrTagOrHash = HexString | BlockTag | Hash32 ;
4+ export type HexString = `0x${string } `;
5+ export type Address = `0x${string } `;
6+ export type Hash32 = `0x${string } `;
7+ export type BlockTag = 'earliest' | 'finalized' | 'safe' | 'latest' | 'pending' ;
8+ export type BlockNumberOrTag = HexString | BlockTag ;
9+ export type BlockNumberOrTagOrHash = HexString | BlockTag | Hash32 ;
1010
1111// Complex types for method parameters and responses
12- interface AddEthereumChainParameter {
12+ export interface AddEthereumChainParameter {
1313 chainId : HexString ;
1414 chainName : string ;
1515 nativeCurrency : {
@@ -22,7 +22,7 @@ interface AddEthereumChainParameter {
2222 iconUrls ?: string [ ] ;
2323}
2424
25- interface TypedData {
25+ export interface TypedData {
2626 types : {
2727 EIP712Domain : Array < {
2828 name : string ;
@@ -38,22 +38,22 @@ interface TypedData {
3838 message : Record < string , any > ;
3939}
4040
41- interface WatchAssetOptions {
41+ export interface WatchAssetOptions {
4242 address : string ;
4343 symbol ?: string ;
4444 decimals ?: number ;
4545 image ?: string ;
4646 tokenId ?: string ;
4747}
4848
49- interface Call {
49+ export interface Call {
5050 to ?: Address ;
5151 data ?: HexString ;
5252 value ?: HexString ;
5353 capabilities ?: Record < string , any > ;
5454}
5555
56- interface SendCallsParameter {
56+ export interface SendCallsParameter {
5757 version : string ;
5858 id ?: string ;
5959 from : Address ;
@@ -63,12 +63,12 @@ interface SendCallsParameter {
6363 capabilities ?: Record < string , any > ;
6464}
6565
66- interface BatchResult {
66+ export interface BatchResult {
6767 id : string ;
6868 capabilities ?: Record < string , any > ;
6969}
7070
71- interface BatchStatus {
71+ export interface BatchStatus {
7272 version : string ;
7373 id : string ;
7474 chainId : HexString ;
@@ -90,7 +90,7 @@ interface BatchStatus {
9090 capabilities ?: Record < string , any > ;
9191}
9292
93- interface Transaction {
93+ export interface Transaction {
9494 from : Address ;
9595 to ?: Address ;
9696 gas ?: HexString ;
@@ -108,14 +108,14 @@ interface Transaction {
108108 chainId ?: HexString ;
109109}
110110
111- interface Filter {
111+ export interface Filter {
112112 fromBlock ?: HexString ;
113113 toBlock ?: HexString ;
114114 address ?: Address | Address [ ] ;
115115 topics ?: Array < HexString | HexString [ ] | null > ;
116116}
117117
118- interface Log {
118+ export interface Log {
119119 removed ?: boolean ;
120120 logIndex ?: HexString ;
121121 transactionIndex ?: HexString ;
@@ -127,7 +127,7 @@ interface Log {
127127 topics : HexString [ ] ;
128128}
129129
130- interface Block {
130+ export interface Block {
131131 number : HexString ;
132132 hash : Hash32 ;
133133 parentHash : Hash32 ;
@@ -161,7 +161,7 @@ interface Block {
161161 mixHash ?: Hash32 ;
162162}
163163
164- interface TransactionInfo {
164+ export interface TransactionInfo {
165165 blockHash : Hash32 ;
166166 blockNumber : HexString ;
167167 from : Address ;
@@ -187,7 +187,7 @@ interface TransactionInfo {
187187 yParity ?: HexString ;
188188}
189189
190- interface TransactionReceipt {
190+ export interface TransactionReceipt {
191191 transactionHash : Hash32 ;
192192 transactionIndex : HexString ;
193193 blockHash : Hash32 ;
@@ -206,7 +206,7 @@ interface TransactionReceipt {
206206 blobGasPrice ?: HexString ;
207207}
208208
209- interface FeeHistory {
209+ export interface FeeHistory {
210210 oldestBlock : HexString ;
211211 baseFeePerGas : HexString [ ] ;
212212 baseFeePerBlobGas ?: HexString [ ] ;
@@ -215,7 +215,7 @@ interface FeeHistory {
215215 reward ?: HexString [ ] [ ] ;
216216}
217217
218- interface AccountProof {
218+ export interface AccountProof {
219219 address : Address ;
220220 accountProof : HexString [ ] ;
221221 balance : HexString ;
@@ -229,7 +229,7 @@ interface AccountProof {
229229 } > ;
230230}
231231
232- type SyncingStatus =
232+ export type SyncingStatus =
233233 | boolean
234234 | {
235235 startingBlock : HexString ;
0 commit comments