# Bitcoin Libraries Lnd Go

> lnd Go libraries: lnrpc (gRPC client), chantools (channel utilities), loopd (Loop client), poold…

lnd Go libraries: lnrpc (gRPC client), chantools (channel utilities),
loopd (Loop client), poold (Pool client), neutrino (BIP157/158 SPV).
USE WHEN: building Go apps integrating with LND, Loop, or running
Neutrino light clients.

- Page: https://ss33.ai/skills/claude-dev-suite/bitcoin-libraries-lnd-go-41006744427
- Publisher: claude-dev-suite
- Category: [Software Development](https://ss33.ai/skills/category/software-development-t44z8z) › [Languages & frameworks](https://ss33.ai/skills/category/software-development-t44z8z/languages-and-frameworks-rgvrso)
- License: MIT
- Source: https://github.com/claude-dev-suite/claude-dev-suite/blob/c32d3d81271b306861865a2397d594087cf0438b/skills/bitcoin/libraries/lnd-go/SKILL.md

## Skill

SKILL.md: https://ss33.ai/api/v1/ss33/download/claude-dev-suite/bitcoin-libraries-lnd-go-41006744427

# LND Go Libraries

LND ecosystem provides several Go modules.

GitHub: `github.com/lightningnetwork/lnd` and `github.com/lightninglabs/`.

## lnrpc (LND gRPC client)

```go
import "github.com/lightningnetwork/lnd/lnrpc"
import "google.golang.org/grpc"

conn, _ := grpc.NewClient("localhost:10009",
    grpc.WithTransportCredentials(creds),
    grpc.WithPerRPCCredentials(macaroon))
client := lnrpc.NewLightningClient(conn)
info, _ := client.GetInfo(ctx, &lnrpc.GetInfoRequest{})
```

`grpc.Dial`/`grpc.DialContext` are deprecated in favour of `grpc.NewClient`
(added in grpc-go v1.63.0; the old entry points still compile and are
promised support "throughout 1.x" as of grpc-go v1.83.2, August 2026).
`NewClient` defaults to the `dns` resolver instead of `passthrough`, so a
custom dialer (Tor SOCKS) needs the passthrough resolver named in the
target, which upstream spells `passthrough:target`. `unix:///path`
targets are unaffected: grpc-go registers dedicated `unix` and
`unix-abstract` resolvers.

## Subservers

- `walletrpc` — wallet ops.
- `routerrpc` — payments.
- `chainrpc` — chain notifications.
- `signrpc` — message signing, scripts.
- `invoicesrpc` — invoice subscriptions.
- `wtclientrpc` — watchtower client.

## neutrino

BIP157/158 light client:
```go
import "github.com/lightninglabs/neutrino"

cfg := neutrino.Config{
    DataDir:      "/path",
    Database:     db,
    ChainParams:  chaincfg.MainNetParams,
    ConnectPeers: []string{"node1:8333"},
}
chainSvc, _ := neutrino.NewChainService(cfg)
```

## chantools

CLI for LND channel recovery:
```bash
chantools recoverloop \
    --rootkey <xprv> \
    --frominactive
```

## loop / pool clients

For Lightning Loop and Pool:
```go
import "github.com/lightninglabs/loop/looprpc"
```

## Use cases

- Backend services that integrate with LND.
- Custom monitoring / analytics tooling.
- Light-client-based apps (Neutrino).

## See also

- [../../lightning/lnd/SKILL.md](../../lightning/lnd/SKILL.md)
- [../../lightning/loop-pool-lit/SKILL.md](../../lightning/loop-pool-lit/SKILL.md)
- [btcd/SKILL.md](../btcd/SKILL.md)
- [btcsuite/SKILL.md](../btcsuite/SKILL.md)
