feat: add chain data source and address to about page (#2013)

* feat: add chain data source and address to about page

* fix: only show chainsource for ldk

* fix: redact chain-source address secrets and return complete bitcoind endpoint

* chore: make sanitize function readable and add tests

* fix: align ldk chain data source labels

---------

Co-authored-by: anon <anon@anon.com>
Co-authored-by: im-adithya <imadithyavardhan@gmail.com>
This commit is contained in:
Dunsin 2026-04-06 22:55:13 +01:00 committed by GitHub
parent 17d38850f9
commit e157c288b3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 147 additions and 1 deletions

View file

@ -1349,6 +1349,17 @@ func (api *api) GetInfo(ctx context.Context) (*InfoResponse, error) {
}
info.Network = nodeInfo.Network
if backendType == config.LDKBackendType {
// Only LDK supports this right now. Using a local interface here
// so we don't have to bloat the main LNClient interface for everyone else.
type chainSourceProvider interface {
GetChainDataSource() (string, string)
}
if ldkService, ok := api.svc.GetLNClient().(chainSourceProvider); ok {
info.ChainDataSourceType, info.ChainDataSourceAddress = ldkService.GetChainDataSource()
}
}
}
info.NextBackupReminder, _ = api.cfg.Get("NextBackupReminder", "")

View file

@ -301,6 +301,8 @@ type InfoResponse struct {
Relays []InfoResponseRelay `json:"relays"`
NodeAlias string `json:"nodeAlias"`
MempoolUrl string `json:"mempoolUrl"`
ChainDataSourceType string `json:"chainDataSourceType,omitempty"`
ChainDataSourceAddress string `json:"chainDataSourceAddress,omitempty"`
HideUpdateBanner bool `json:"hideUpdateBanner"`
}