Skip to content

Commit

Permalink
Merge pull request #135 from mysteriumnetwork/improvements/node-stats
Browse files Browse the repository at this point in the history
Earnings per service
  • Loading branch information
mdomasevicius authored Oct 12, 2022
2 parents 6f74f10 + 01a1d5b commit 7181542
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ export {
SeriesEntry,
QualityResponse,
ActivityResponse,
EarningsPerServiceResponse,
} from './provider'

export default tequilapi
12 changes: 12 additions & 0 deletions src/provider/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,21 @@ export class ProviderAPI {
public async quality(): Promise<QualityResponse> {
return await this.http.get('/node/provider/quality')
}

public async activity(): Promise<ActivityResponse> {
return await this.http.get('/node/provider/activity-stats')
}

public async earningsPerService(): Promise<EarningsPerServiceResponse> {
return await this.http.get('/node/provider/service-earnings')
}
}

export interface EarningsPerServiceResponse {
public: Tokens
dataTransfer: Tokens
scraping: Tokens
total: Tokens
}

export interface ActivityResponse {
Expand Down

0 comments on commit 7181542

Please sign in to comment.