-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathEtherScanAPI.java
68 lines (49 loc) · 1.39 KB
/
EtherScanAPI.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package io.goodforgod.api.etherscan;
import io.goodforgod.api.etherscan.http.EthHttpClient;
import io.goodforgod.api.etherscan.manager.RequestQueueManager;
import java.util.function.Supplier;
import org.jetbrains.annotations.NotNull;
/**
* EtherScan full API Description <a href="https://etherscan.io/apis">...</a>
*
* @author GoodforGod
* @since 10.05.2023
*/
public interface EtherScanAPI extends AutoCloseable {
@NotNull
AccountAPI account();
@NotNull
ContractAPI contract();
@NotNull
TransactionAPI txs();
@NotNull
BlockAPI block();
@NotNull
LogsAPI logs();
@NotNull
ProxyAPI proxy();
@NotNull
StatisticAPI stats();
@NotNull
GasTrackerAPI gasTracker();
@NotNull
static Builder builder() {
return new EthScanAPIBuilder();
}
interface Builder {
@NotNull
Builder withApiKey(@NotNull String apiKey);
@NotNull
Builder withNetwork(@NotNull EthNetwork network);
@NotNull
Builder withNetwork(@NotNull EthNetworks network);
@NotNull
Builder withQueue(@NotNull RequestQueueManager queueManager);
@NotNull
Builder withHttpClient(@NotNull Supplier<EthHttpClient> httpClientSupplier);
@NotNull
Builder withConverter(@NotNull Supplier<Converter> converterSupplier);
@NotNull
EtherScanAPI build();
}
}