Documentation ¶
Index ¶
- type Key
- func (k *Key) CreateP2TR() (string, error)
- func (k *Key) CreateP2wpkh() (string, error)
- func (k *Key) CreateRawTxP2TR(prevHash *chainhash.Hash, prevIndex uint32, prevAmountSat int64, ...) ([]byte, string, error)
- func (k *Key) RedeemP2wpkhTx(prevHash *chainhash.Hash, prevIndex uint32, prevAmountSat int64, ...) ([]byte, string, error)
- func (k *Key) SerializeSchnorrPubKey() []byte
- type RedeemType
- type Script
- type TapScript
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Key ¶
type Key struct { PubKey *btcec.PublicKey Net *chaincfg.Params // contains filtered or unexported fields }
func (*Key) CreateP2TR ¶
P2TR privkey -> pubkey -> shnorr-pubkey => witness program
func (*Key) CreateP2wpkh ¶
P2WPKH privkey -> pubkey hash160(pubkey) => witness program
func (*Key) CreateRawTxP2TR ¶
func (*Key) RedeemP2wpkhTx ¶
func (*Key) SerializeSchnorrPubKey ¶
type RedeemType ¶
type RedeemType = int
const ( RedeemP2wpkh RedeemType = 1 RedeemP2trKeyPath RedeemType = 2 RedeemP2wsh RedeemType = 3 RedeemP2trScriptPath RedeemType = 4 )
type Script ¶
func (*Script) CreateP2wsh ¶
P2WSH sha256(witness script) => witness program
type TapScript ¶
func NewTapScript ¶
Click to show internal directories.
Click to hide internal directories.