Skip to content

Create Bitcoind and Lnd containers in regtest for testing

License

Notifications You must be signed in to change notification settings

elnosh/btc-docker-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Create Bitcoind and Lnd containers in regtest for testing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages