Greenfield: Extend LN GetInfo data (#4167)

Matching the data added in btcpayserver/BTCPayServer.Lightning#97.
This commit is contained in:
d11n
2022-09-28 02:34:34 +02:00
committed by GitHub
parent bc195e771e
commit 4bee8e9bfe
4 changed files with 59 additions and 3 deletions

View File

@@ -46,7 +46,14 @@ namespace BTCPayServer.Controllers.Greenfield
return Ok(new LightningNodeInformationData
{
BlockHeight = info.BlockHeight,
NodeURIs = info.NodeInfoList.Select(nodeInfo => nodeInfo).ToArray()
NodeURIs = info.NodeInfoList.Select(nodeInfo => nodeInfo).ToArray(),
Alias = info.Alias,
Color = info.Color,
Version = info.Version,
PeersCount = info.PeersCount,
ActiveChannelsCount = info.ActiveChannelsCount,
InactiveChannelsCount = info.InactiveChannelsCount,
PendingChannelsCount = info.PendingChannelsCount
});
}

View File

@@ -194,6 +194,41 @@
"blockHeight": {
"type": "integer",
"description": "The block height of the lightning node"
},
"alias": {
"type": "string",
"nullable": true,
"description": "The alias of the lightning node"
},
"color": {
"type": "string",
"nullable": true,
"description": "The color attribute of the lightning node"
},
"version": {
"type": "string",
"nullable": true,
"description": "The version name of the lightning node"
},
"peersCount": {
"type": "integer",
"nullable": true,
"description": "The number of peers"
},
"activeChannelsCount": {
"type": "integer",
"nullable": true,
"description": "The number of active channels"
},
"inactiveChannelsCount": {
"type": "integer",
"nullable": true,
"description": "The number of inactive channels"
},
"pendingChannelsCount": {
"type": "integer",
"nullable": true,
"description": "The number of pending channels"
}
}
},