Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}
8 changes: 8 additions & 0 deletions testdata/permissions.json
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,14 @@
}
]
},
"/lnrpc.Lightning/ListAliases": {
"permissions": [
{
"entity": "offchain",
"action": "read"
}
]
},
"/neutrinorpc.NeutrinoKit/AddPeer": {
"permissions": [
{
Expand Down
Loading