test

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeTaprootScript

func ComputeTaprootScript(t testing.TB, taprootKey *btcec.PublicKey) []byte

func ParseRPCKeyDescriptor

func ParseRPCKeyDescriptor(t testing.TB,
	rpcDesc *signrpc.KeyDescriptor) keychain.KeyDescriptor

func PubToKeyDesc

func PubToKeyDesc(p *btcec.PublicKey) keychain.KeyDescriptor

func RandBool

func RandBool() bool

RandBool rolls a random boolean.

func RandBytes

func RandBytes(num int) []byte

func RandHash

func RandHash() chainhash.Hash

func RandInt

func RandInt[T constraints.Integer]() T

RandInt makes a random integer of the specified type.

func RandOp

func RandOp(t testing.TB) wire.OutPoint

func RandPrivKey

func RandPrivKey(t testing.TB) *btcec.PrivateKey

func RandPubKey

func RandPubKey(t testing.TB) *btcec.PublicKey

func RandTxWitnesses

func RandTxWitnesses(t testing.TB) wire.TxWitness

func SchnorrKey

func SchnorrKey(t testing.TB, pubKey *btcec.PublicKey) *btcec.PublicKey

func SchnorrPubKey

func SchnorrPubKey(t testing.TB, privKey *btcec.PrivateKey) *btcec.PublicKey

func ScriptHashLock

func ScriptHashLock(t *testing.T, preimage []byte) txscript.TapLeaf

ScriptHashLock returns a simple bitcoin script that locks the funds to a hash lock of the given preimage.

func ScriptSchnorrSig

func ScriptSchnorrSig(t *testing.T, pubKey *btcec.PublicKey) txscript.TapLeaf

ScriptSchnorrSig returns a simple bitcoin script that locks the funds to a Schnorr signature of the given public key.

Types

This section is empty.

Jump to

Keyboard shortcuts

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