Documentation ¶
Index ¶
- Variables
- func ComputeTaprootScript(t testing.TB, taprootKey *btcec.PublicKey) []byte
- func ComputeTaprootScriptErr(witnessProgram []byte) ([]byte, error)
- func HexPubKey(pk *btcec.PublicKey) string
- func HexSchnorrPubKey(pk *btcec.PublicKey) string
- func HexSignature(sig *schnorr.Signature) string
- func HexTx(t testing.TB, tx *wire.MsgTx) string
- func Parse32Byte(t testing.TB, b string) [32]byte
- func Parse33Byte(t testing.TB, b string) [33]byte
- func ParseChainHash(t testing.TB, hash string) chainhash.Hash
- func ParseHex(t testing.TB, b string) []byte
- func ParseOutPoint(t testing.TB, op string) wire.OutPoint
- func ParsePubKey(t testing.TB, key string) *btcec.PublicKey
- func ParseRPCKeyDescriptor(t testing.TB, rpcDesc *signrpc.KeyDescriptor) keychain.KeyDescriptor
- func ParseSchnorrPubKey(t testing.TB, key string) *btcec.PublicKey
- func ParseSchnorrSig(t testing.TB, sigHex string) *schnorr.Signature
- func ParseTestVectors(t testing.TB, fileName string, target any)
- func ParseTx(t testing.TB, tx string) *wire.MsgTx
- func PubToKeyDesc(p *btcec.PublicKey) keychain.KeyDescriptor
- func RandBool() bool
- func RandBytes(num int) []byte
- func RandHash() chainhash.Hash
- func RandInt[T constraints.Integer]() T
- func RandInt31n(n int32) int32
- func RandIntn(n int) int
- func RandOp(t testing.TB) wire.OutPoint
- func RandPrivKey(_ testing.TB) *btcec.PrivateKey
- func RandPubKey(t testing.TB) *btcec.PublicKey
- func RandRead(t testing.TB, b []byte)
- func RandTxWitnesses(t testing.TB) wire.TxWitness
- func SchnorrKey(t testing.TB, pubKey *btcec.PublicKey) *btcec.PublicKey
- func SchnorrPubKey(t testing.TB, privKey *btcec.PrivateKey) *btcec.PublicKey
- func ScriptHashLock(t *testing.T, preimage []byte) txscript.TapLeaf
- func ScriptSchnorrSig(t *testing.T, pubKey *btcec.PublicKey) txscript.TapLeaf
- func WriteTestFileHex(t testing.TB, fileName string, content []byte)
- func WriteTestVectors(t testing.TB, fileName string, target any)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( HexCompressedPubKeyLen = hex.EncodedLen(btcec.PubKeyBytesLenCompressed) HexTaprootPkScript = hex.EncodedLen(input.P2TRSize) )
Functions ¶
func ComputeTaprootScript ¶
func ComputeTaprootScriptErr ¶ added in v0.3.0
func HexSchnorrPubKey ¶ added in v0.3.0
func HexSchnorrPubKey(pk *btcec.PublicKey) string
func HexSignature ¶ added in v0.3.0
func ParsePubKey ¶ added in v0.3.0
func ParseRPCKeyDescriptor ¶
func ParseRPCKeyDescriptor(t testing.TB, rpcDesc *signrpc.KeyDescriptor) keychain.KeyDescriptor
func ParseSchnorrPubKey ¶ added in v0.3.0
func ParseSchnorrSig ¶ added in v0.3.0
func ParseTestVectors ¶ added in v0.3.0
func PubToKeyDesc ¶
func PubToKeyDesc(p *btcec.PublicKey) keychain.KeyDescriptor
func RandInt ¶
func RandInt[T constraints.Integer]() T
RandInt makes a random integer of the specified type.
func RandInt31n ¶ added in v0.3.0
RandInt31n returns a random 32-bit integer in the range [0, n).
func RandPrivKey ¶
func RandPubKey ¶
func SchnorrKey ¶
func SchnorrPubKey ¶
func ScriptHashLock ¶
ScriptHashLock returns a simple bitcoin script that locks the funds to a hash lock of the given preimage.
func ScriptSchnorrSig ¶
ScriptSchnorrSig returns a simple bitcoin script that locks the funds to a Schnorr signature of the given public key.
func WriteTestFileHex ¶ added in v0.3.0
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.