Utility to create bitcoind
and other containers in regtest. Useful for integration testing.
- bitcoind
- LND
- CLN
You need to have Docker installed.
import (
btcdocker "github.com/elnosh/btc-docker-test"
"github.com/elnosh/btc-docker-test/lnd"
"github.com/elnosh/btc-docker-test/cln"
)
ctx := context.Background()
// create bitcoind container
bitcoind, err := btcdocker.NewBitcoind(ctx)
if err != nil {
// handle err
}
blockchainInfo, err := bitcoind.Client.GetBlockchainInfo()
// create LND container
lnd, err := lnd.NewLnd(ctx, bitcoind)
if err != nil {
// handle err
}
req := lnrpc.GetInfoRequest{}
info, err := lnd.Client.GetInfo(ctx, &req)
// create CLN container
cln, err := cln.NewCLN(ctx, bitcoind)
if err != nil {
// handle err
}