File tree 4 files changed +44
-8
lines changed
4 files changed +44
-8
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @siafoundation/explored-js ' : minor
3
+ ' @siafoundation/explored-react ' : minor
4
+ ' @siafoundation/explored-types ' : minor
5
+ ---
6
+
7
+ Added explorerTip API.
Original file line number Diff line number Diff line change @@ -20,6 +20,14 @@ import {
20
20
BlockByIDParams ,
21
21
BlockByIDPayload ,
22
22
BlockByIDResponse ,
23
+ blockMetricsRoute ,
24
+ BlockMetricsParams ,
25
+ BlockMetricsPayload ,
26
+ BlockMetricsResponse ,
27
+ blockMetricsByIDRoute ,
28
+ BlockMetricsByIDParams ,
29
+ BlockMetricsByIDPayload ,
30
+ BlockMetricsByIDResponse ,
23
31
consensusNetworkRoute ,
24
32
ConsensusNetworkParams ,
25
33
ConsensusNetworkPayload ,
@@ -56,6 +64,10 @@ import {
56
64
ExchangeRatePayload ,
57
65
ExchangeRateResponse ,
58
66
exchangeRateRoute ,
67
+ explorerTipRoute ,
68
+ ExplorerTipParams ,
69
+ ExplorerTipPayload ,
70
+ ExplorerTipResponse ,
59
71
hostMetricsRoute ,
60
72
HostMetricsParams ,
61
73
HostMetricsPayload ,
@@ -68,14 +80,6 @@ import {
68
80
HostByPubkeyParams ,
69
81
HostByPubkeyPayload ,
70
82
HostByPubkeyResponse ,
71
- blockMetricsRoute ,
72
- BlockMetricsParams ,
73
- BlockMetricsPayload ,
74
- BlockMetricsResponse ,
75
- blockMetricsByIDRoute ,
76
- BlockMetricsByIDParams ,
77
- BlockMetricsByIDPayload ,
78
- BlockMetricsByIDResponse ,
79
83
OutputSiacoinParams ,
80
84
OutputSiacoinPayload ,
81
85
OutputSiacoinResponse ,
@@ -303,5 +307,11 @@ export function Explored({
303
307
ExchangeRatePayload ,
304
308
ExchangeRateResponse
305
309
> ( axios , 'get' , exchangeRateRoute ) ,
310
+ // Explorer Tip
311
+ explorerTip : buildRequestHandler <
312
+ ExplorerTipParams ,
313
+ ExplorerTipPayload ,
314
+ ExplorerTipResponse
315
+ > ( axios , 'get' , explorerTipRoute ) ,
306
316
}
307
317
}
Original file line number Diff line number Diff line change @@ -39,6 +39,9 @@ import {
39
39
ExchangeRateParams ,
40
40
ExchangeRateResponse ,
41
41
exchangeRateRoute ,
42
+ ExplorerTipParams ,
43
+ ExplorerTipResponse ,
44
+ explorerTipRoute ,
42
45
HostByPubkeyParams ,
43
46
HostByPubkeyResponse ,
44
47
hostByPubkeyRoute ,
@@ -404,3 +407,13 @@ export function useExchangeRate(
404
407
route : exchangeRateRoute ,
405
408
} )
406
409
}
410
+
411
+ // Explorer Tip
412
+ export function useExplorerTip (
413
+ args : HookArgsSwr < ExplorerTipParams , ExplorerTipResponse >
414
+ ) {
415
+ return useGetSwr ( {
416
+ ...args ,
417
+ route : explorerTipRoute ,
418
+ } )
419
+ }
Original file line number Diff line number Diff line change @@ -260,3 +260,9 @@ export const exchangeRateRoute = '/exchange-rate/siacoin/:currency'
260
260
export type ExchangeRateParams = { currency : CurrencyID }
261
261
export type ExchangeRatePayload = void
262
262
export type ExchangeRateResponse = number
263
+
264
+ // Explorer Tip
265
+ export const explorerTipRoute = '/explorer/tip'
266
+ export type ExplorerTipParams = void
267
+ export type ExplorerTipPayload = void
268
+ export type ExplorerTipResponse = ChainIndex
You can’t perform that action at this time.
0 commit comments