Skip to content

Commit

Permalink
lndclient: add listaliases call
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeTsagk committed Nov 13, 2024
1 parent 895a850 commit 6743d97
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions lightning_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,11 @@ type LightningClient interface {
// from the signature.
VerifyMessage(ctx context.Context, data []byte, signature string) (bool,
string, error)

// ListAliases returns the set of all aliases that have ever existed
// with their confirmed SCID (if it exists) and/or the base SCID (in the
// case of zero conf).
ListAliases(ctx context.Context) ([]*lnrpc.AliasMap, error)
}

// Info contains info about the connected lnd node.
Expand Down Expand Up @@ -4427,3 +4432,17 @@ func (s *lightningClient) SubscribeTransactions(

return txChan, errChan, nil
}

// ListAliases returns the set of all aliases that have ever existed with their
// confirmed SCID (if it exists) and/or the base SCID (in the case of zero
// conf).
func (s *lightningClient) ListAliases(
ctx context.Context) ([]*lnrpc.AliasMap, error) {

res, err := s.client.ListAliases(ctx, &lnrpc.ListAliasesRequest{})
if err != nil {
return nil, err
}

return res.AliasMaps, nil
}

0 comments on commit 6743d97

Please sign in to comment.