Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 641 Bytes

README.md

File metadata and controls

28 lines (19 loc) · 641 Bytes

BTC Docker Test

Create Bitcoind and Lnd containers in regtest. Useful for integration testing.

You need to have Docker installed.

import "github.com/elnosh/btc-docker-test"

ctx := context.Background()

bitcoind, err := btcdocker.NewBitcoind(ctx)
if err != nil {
    // handle err
}

blockchainInfo, err := bitcoind.Client.GetBlockchainInfo()

lnd, err := btcdocker.NewLnd(ctx, bitcoind)
if err != nil {
    // handle err
}

req := lnrpc.GetInfoRequest{}
info, err := lnd.Client.GetInfo(ctx, &req)

Inspired by Bitcoind and Lnd