Compare commits

..

No commits in common. "45cb9a2d700e7cff6f5375092fe70af1800b595c" and "59c7fed566ac92e4ee059ad6f7d7ca2b4a5e5573" have entirely different histories.

2 changed files with 101 additions and 101 deletions

View File

@ -31,7 +31,7 @@ import {
SignedEvent, SignedEvent,
RelayMap, RelayMap,
RelayStats, RelayStats,
RelayReadStats, ReadRelay,
RelayInfoObject, RelayInfoObject,
RelayConnectionStatus, RelayConnectionStatus,
RelayConnectionState RelayConnectionState
@ -548,7 +548,7 @@ export class NostrController extends EventEmitter {
const apiTopRelays = data.relay_stats.user_picks.read_relays const apiTopRelays = data.relay_stats.user_picks.read_relays
.slice(0, numberOfTopRelays) .slice(0, numberOfTopRelays)
.map((relay: RelayReadStats) => relay.d) .map((relay: ReadRelay) => relay.d)
if (!apiTopRelays.length) { if (!apiTopRelays.length) {
return Promise.reject(`Couldn't fetch popular relays.`) return Promise.reject(`Couldn't fetch popular relays.`)

View File

@ -19,21 +19,21 @@ export interface RelayStats {
posts: number posts: number
zaps: number zaps: number
zap_amount: number zap_amount: number
daily: RelayDailyStats daily: Daily
daily_totals: RelayDailyTotals daily_totals: DailyTotals
relay_stats: RelayStats relay_stats: RelayStats
} }
export interface RelayStats { export interface RelayStats {
user_picks: RelayUserPicksStats user_picks: UserPicks
written: RelayWrittenStats written: Written
} }
export interface RelayWrittenStats { export interface Written {
last_week: RelayLastWeekStats[] last_week: LastWeek[]
} }
export interface RelayLastWeekStats { export interface LastWeek {
d: string d: string
p: number p: number
ps: number ps: number
@ -41,12 +41,12 @@ export interface RelayLastWeekStats {
es: number es: number
} }
export interface RelayUserPicksStats { export interface UserPicks {
read_relays: RelayReadStats[] read_relays: ReadRelay[]
write_relays: RelayReadStats[] write_relays: ReadRelay[]
} }
export interface RelayReadStats { export interface ReadRelay {
d: string d: string
r: number r: number
w: number w: number
@ -54,100 +54,100 @@ export interface RelayReadStats {
ws: number ws: number
} }
export interface RelayDailyTotals { export interface DailyTotals {
datasets: RelayDailyTotalStatsDataset datasets: Datasets2
} }
export interface RelayDailyTotalStatsDataset { export interface Datasets2 {
kind_0: RelayItemStats[] kind_0: Kind0[]
kind_1: RelayItemStats[] kind_1: Kind0[]
kind_2: RelayItemStats[] kind_2: Kind0[]
kind_3: RelayItemStats[] kind_3: Kind0[]
kind_5: RelayItemStats[] kind_5: Kind0[]
kind_6: RelayItemStats[] kind_6: Kind0[]
kind_7: RelayItemStats[] kind_7: Kind0[]
kind_1984: RelayItemStats[] kind_1984: Kind0[]
kind_9735: RelayItemStats[] kind_9735: Kind0[]
kind_1063: RelayItemStats[] kind_1063: Kind0[]
kind_6969: RelayItemStats[] kind_6969: Kind0[]
kind_9802: RelayItemStats[] kind_9802: Kind0[]
kind_30000: RelayItemStats[] kind_30000: Kind0[]
kind_30001: RelayItemStats[] kind_30001: Kind0[]
kind_30008: RelayItemStats[] kind_30008: Kind0[]
kind_30009: RelayItemStats[] kind_30009: Kind0[]
kind_30017: RelayItemStats[] kind_30017: Kind0[]
kind_30018: RelayItemStats[] kind_30018: Kind0[]
kind_30023: RelayItemStats[] kind_30023: Kind0[]
kind_31337: RelayItemStats[] kind_31337: Kind0[]
totals: RelayItemStats[] totals: Kind0[]
new_profiles: RelayItemStats[] new_profiles: Kind0[]
new_pubkeys: RelayItemStats[] new_pubkeys: Kind0[]
new_contact_lists: RelayItemStats[] new_contact_lists: Kind0[]
new_ln: RelayItemStats[] new_ln: Kind0[]
new_users: RelayItemStats[] new_users: Kind0[]
total_zap_amount: RelayItemStats[] total_zap_amount: Kind0[]
zappers: RelayItemStats[] zappers: Kind0[]
zapped_pubkeys: RelayItemStats[] zapped_pubkeys: Kind0[]
zapped_events: RelayItemStats[] zapped_events: Kind0[]
zap_providers: RelayItemStats[] zap_providers: Kind0[]
} }
export interface RelayDailyStats { export interface Daily {
datasets: RelayDailyStatsDataset datasets: Datasets
} }
export interface RelayDailyStatsDataset { export interface Datasets {
kind_0: RelayItemStats[] kind_0: Kind0[]
kind_1: RelayItemStats[] kind_1: Kind0[]
kind_2: RelayItemStats[] kind_2: Kind0[]
kind_3: RelayItemStats[] kind_3: Kind0[]
kind_5: RelayItemStats[] kind_5: Kind0[]
kind_6: RelayItemStats[] kind_6: Kind0[]
kind_7: RelayItemStats[] kind_7: Kind0[]
kind_1984: RelayItemStats[] kind_1984: Kind0[]
kind_9735: RelayItemStats[] kind_9735: Kind0[]
kind_1063: RelayItemStats[] kind_1063: Kind0[]
kind_6969: RelayItemStats[] kind_6969: Kind0[]
kind_9802: RelayItemStats[] kind_9802: Kind0[]
kind_30000: RelayItemStats[] kind_30000: Kind0[]
kind_30001: RelayItemStats[] kind_30001: Kind0[]
kind_30008: RelayItemStats[] kind_30008: Kind0[]
kind_30009: RelayItemStats[] kind_30009: Kind0[]
kind_30017: RelayItemStats[] kind_30017: Kind0[]
kind_30018: RelayItemStats[] kind_30018: Kind0[]
kind_30023: RelayItemStats[] kind_30023: Kind0[]
kind_31337: RelayItemStats[] kind_31337: Kind0[]
totals: RelayItemStats[] totals: Kind0[]
new_profiles: RelayItemStats[] new_profiles: Kind0[]
new_pubkeys: RelayItemStats[] new_pubkeys: Kind0[]
new_contact_lists: RelayItemStats[] new_contact_lists: Kind0[]
new_ln: RelayItemStats[] new_ln: Kind0[]
new_users: RelayItemStats[] new_users: Kind0[]
max_zap_amount: RelayItemStats[] max_zap_amount: Kind0[]
avg_zap_amount: RelayItemStats[] avg_zap_amount: Kind0[]
total_zap_amount: RelayItemStats[] total_zap_amount: Kind0[]
active_pubkeys: RelayItemStats[] active_pubkeys: Kind0[]
active_pubkeys_total: RelayItemStats[] active_pubkeys_total: Kind0[]
active_pubkeys_week: RelayItemStats[] active_pubkeys_week: Kind0[]
active_pubkeys_total_week: RelayItemStats[] active_pubkeys_total_week: Kind0[]
active_relays: RelayItemStats[] active_relays: Kind0[]
zappers: RelayItemStats[] zappers: Kind0[]
zapped_pubkeys: RelayItemStats[] zapped_pubkeys: Kind0[]
zapped_events: RelayItemStats[] zapped_events: Kind0[]
zap_providers: RelayItemStats[] zap_providers: Kind0[]
retention: RelayRetentionStats retention: Retention
} }
export interface RelayRetentionStats { export interface Retention {
all: RelayRetentionAll[] all: All[]
tr: RelayRetentionAll[] tr: All[]
bio: RelayRetentionAll[] bio: All[]
all_curves: RelayRetentionAllCurve[] all_curves: Allcurve[]
tr_curves: RelayRetentionAllCurve[] tr_curves: Allcurve[]
bio_curves: RelayRetentionAllCurve[] bio_curves: Allcurve[]
} }
export interface RelayRetentionAllCurve { export interface Allcurve {
day: number day: number
'2023-02': number '2023-02': number
'2023-03': number '2023-03': number
@ -157,7 +157,7 @@ export interface RelayRetentionAllCurve {
'2023-07': number '2023-07': number
} }
export interface RelayRetentionAll { export interface All {
d: string d: string
signups: number signups: number
retained: number retained: number
@ -191,9 +191,9 @@ export interface RelayRetentionAll {
lost_followers: number lost_followers: number
} }
export interface RelayItemStats { export interface Kind0 {
d: string // date d: string
c: number // count c: number
} }
export interface RelayFee { export interface RelayFee {