testutil

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2022 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PeerAddrLocal   = "localhost:18886"
	EsploraUrlLocal = "http://localhost:3001"
)
View Source
var (
	DB *sql.DB
)

Functions

func BlindTransaction

func BlindTransaction(
	p *pset.Pset,
	inBlindKeys [][]byte,
	outBlindKeys [][]byte,
	issuanceBlindKeys []pset.IssuanceBlindingPrivateKeys,
) error

func BlindTransactionByIndex

func BlindTransactionByIndex(
	p *pset.Pset,
	inBlindKeys [][]byte,
	outBlindKeysMap map[int][]byte,
	issuanceBlindKeys []pset.IssuanceBlindingPrivateKeys,
) error

func CreateTx

func CreateTx() (string, string, error)

func Faucet

func Faucet(address string) (string, error)

func GenerateMasterPrivateKey

func GenerateMasterPrivateKey() (*hdkeychain.ExtendedKey, error)

func GenerateToAddr

func GenerateToAddr(addr string) error

func GetRawBlock added in v0.1.2

func GetRawBlock(hash string) ([]byte, error)

func GetTransactionHex

func GetTransactionHex(txHash string) (string, error)

func H2b

func H2b(str string) []byte

func MakeNigiriTestServices

func MakeNigiriTestServices(
	peerUrl string,
	esploraUrl string,
	network string,
) (node.NodeService, scanner.Service, <-chan scanner.Report)

func OutputCommand

func OutputCommand(name string, arg ...string) ([]byte, error)

func RunCommand

func RunCommand(name string, arg ...string) error

func RunCommandDetached

func RunCommandDetached(name string, arg ...string) (*exec.Cmd, error)

func SendToAddr

func SendToAddr(addr string) error

func SetupDB added in v0.1.2

func SetupDB() error

func ShutdownDB added in v0.1.2

func ShutdownDB() error

func SignTransaction

func SignTransaction(
	p *pset.Pset,
	privKeys []*btcec.PrivateKey,
	scripts [][]byte,
	forWitness bool,
	opts *signOpts,
) error

func TruncateDB added in v0.1.2

func TruncateDB() error

func Unspents

func Unspents(address string) ([]map[string]interface{}, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL