mirror of
https://github.com/aljazceru/lnd-manageJ.git
synced 2026-01-21 23:14:27 +01:00
add /balance endpoint for nodes
This commit is contained in:
@@ -84,6 +84,12 @@ public class NodeController {
|
||||
return new ChannelsForNodeDto(pubkey, channels);
|
||||
}
|
||||
|
||||
@GetMapping("/balance")
|
||||
public BalanceInformationDto getBalance(@PathVariable Pubkey pubkey) {
|
||||
mark("getBalance");
|
||||
return BalanceInformationDto.createFrom(balanceService.getBalanceInformation(pubkey));
|
||||
}
|
||||
|
||||
private List<ChannelId> toSortedList(Set<? extends Channel> channels) {
|
||||
return channels.stream()
|
||||
.map(Channel::getId)
|
||||
|
||||
Reference in New Issue
Block a user