bitcoin

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TXID = "bff785da9f8169f49be92fa95e31f0890c385bfb1bd24d6b94d7900057c617ae"
	COIN = 100_000_000
)

Variables

This section is empty.

Functions

func Step0CarolCheckSigRedeemScript

func Step0CarolCheckSigRedeemScript(C_ secp256k1.PublicKey) []byte

func Step0CarolPrivateKey

func Step0CarolPrivateKey() *secp256k1.PrivateKey

func Step1BobCarolCreateTx

func Step1BobCarolCreateTx(txInP2SHAddress []byte) (*wire.MsgTx, error)

step1_bob_carol_create_tx

func Step1CarolCreateP2SHAddress

func Step1CarolCreateP2SHAddress(txInRedeemScript []byte) (*btcutil.AddressScriptHash, error)

step1_carol_create_p2sh_address

func Step2CarolSignTx

func Step2CarolSignTx(txInRedeemScript []byte, privateKey *btcec.PrivateKey) (*wire.TxIn, error)

func Step3BobVerifyScript

func Step3BobVerifyScript(txInSignature, txInRedeemScript []byte, tx *wire.MsgTx) error

func VerifyScript

func VerifyScript(pubScriptKey, sig []byte) (txInP2SHAddress *btcutil.AddressScriptHash, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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