Create top 100 node per channel count component

This commit is contained in:
nymkappa
2022-08-17 16:19:01 +02:00
parent 2359e44b16
commit 6421bc82f2
12 changed files with 232 additions and 67 deletions

View File

@@ -2,7 +2,7 @@ import { Injectable } from '@angular/core';
import { HttpClient, HttpParams } from '@angular/common/http';
import { Observable } from 'rxjs';
import { StateService } from '../services/state.service';
import { INodesRanking, ITopNodesPerCapacity } from '../interfaces/node-api.interface';
import { INodesRanking, ITopNodesPerCapacity, ITopNodesPerChannels } from '../interfaces/node-api.interface';
@Injectable({
providedIn: 'root'
@@ -69,4 +69,10 @@ export class LightningApiService {
this.apiBasePath + '/api/v1/lightning/nodes/rankings/capacity'
);
}
getTopNodesByChannels$(): Observable<ITopNodesPerChannels[]> {
return this.httpClient.get<ITopNodesPerChannels[]>(
this.apiBasePath + '/api/v1/lightning/nodes/rankings/channels'
);
}
}