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

View File

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