Versions in this module Expand all Collapse all v0 v0.0.3 Sep 11, 2024 Changes in this version + const AcceptedHtlcPenaltyWitnessSize + const AcceptedHtlcPenaltyWitnessSizeConfirmed + const AcceptedHtlcScriptSize + const AcceptedHtlcScriptSizeConfirmed + const AcceptedHtlcSuccessWitnessSize + const AcceptedHtlcSuccessWitnessSizeConfirmed + const AcceptedHtlcTimeoutWitnessSize + const AcceptedHtlcTimeoutWitnessSizeConfirmed + const AnchorCommitWeight + const AnchorScriptSize + const AnchorWitnessSize + const BaseAnchorCommitmentTxSize + const BaseAnchorCommitmentTxWeight + const BaseCommitmentTxSize + const BaseCommitmentTxWeight + const BaseOutputSize + const BaseTaprootCommitmentTxWeight + const BaseTxSize + const CommitWeight + const CommitmentAnchorOutput + const CommitmentDelayOutput + const CommitmentKeyHashOutput + const FundingInputSize + const HTLCSize + const HTLCWeight + const HtlcConfirmedScriptOverhead + const HtlcSuccessWeight + const HtlcSuccessWeightConfirmed + const HtlcTimeoutWeight + const HtlcTimeoutWeightConfirmed + const InputSize + const LeaseWitnessScriptSizeOverhead + const MaxHTLCNumber + const MuSig2PartialSigSize + const MultiSigSize + const MultiSigWitnessSize + const NestedP2WPKHSize + const NestedP2WSHSize + const OfferedHtlcPenaltyWitnessSize + const OfferedHtlcPenaltyWitnessSizeConfirmed + const OfferedHtlcScriptSize + const OfferedHtlcScriptSizeConfirmed + const OfferedHtlcSuccessWitnessSize + const OfferedHtlcSuccessWitnessSizeConfirmed + const OfferedHtlcTimeoutWitnessSize + const OfferedHtlcTimeoutWitnessSizeConfirmed + const P2PKHOutputSize + const P2PKHScriptSigSize + const P2PKHSize + const P2SHOutputSize + const P2SHSize + const P2TROutputSize + const P2TRSize + const P2WKHOutputSize + const P2WKHWitnessSize + const P2WPKHSize + const P2WSHOutputSize + const P2WSHSize + const PubKeyFormatCompressedOdd + const TaprootAcceptedRevokeWitnessSize + const TaprootAnchorWitnessSize + const TaprootBaseControlBlockWitnessSize + const TaprootCommitWeight + const TaprootCommitmentAnchorOutput + const TaprootCommitmentOutput + const TaprootHtlcAcceptedLocalSuccessScriptSize + const TaprootHtlcAcceptedLocalSuccessWitnessSize + const TaprootHtlcAcceptedRemoteSuccessScriptSize + const TaprootHtlcAcceptedRemoteSuccessWitnessSize + const TaprootHtlcOfferedLocalTimeoutScriptSize + const TaprootHtlcOfferedRemoteTimeoutScriptSize + const TaprootHtlcOfferedRemoteTimeoutWitnessSize + const TaprootHtlcSuccessWeight + const TaprootHtlcTimeoutWeight + const TaprootKeyPathCustomSighashWitnessSize + const TaprootKeyPathWitnessSize + const TaprootNUMSHex + const TaprootOfferedLocalTimeoutWitnessSize + const TaprootOfferedRevokeWitnessSize + const TaprootSecondLevelHtlcScriptSize + const TaprootSecondLevelHtlcWitnessSize + const TaprootSecondLevelRevokeWitnessSize + const TaprootSignatureWitnessSize + const TaprootToLocalRevokeScriptSize + const TaprootToLocalRevokeWitnessSize + const TaprootToLocalScriptSize + const TaprootToLocalWitnessSize + const TaprootToRemoteScriptSize + const TaprootToRemoteWitnessSize + const ToLocalPenaltyWitnessSize + const ToLocalScriptSize + const ToLocalTimeoutWitnessSize + const ToRemoteConfirmedScriptSize + const ToRemoteConfirmedWitnessSize + const UnknownWitnessSize + const WitnessCommitmentTxWeight + const WitnessHeaderSize + var ErrTweakOverdose = errors.New("sign descriptor should only have one tweak") + var ErrUnknownScriptType = errors.New("unknown script type") + var SequenceLockTimeSeconds = uint32(1 << 22) + var TaprootNUMSKey = mustParsePubKey(TaprootNUMSHex) + func CommitScriptAnchor(key *btcec.PublicKey) ([]byte, error) + func CommitScriptToRemoteConfirmed(key *btcec.PublicKey) ([]byte, error) + func CommitScriptToSelf(csvTimeout uint32, selfKey, revokeKey *btcec.PublicKey) ([]byte, error) + func CommitScriptUnencumbered(key *btcec.PublicKey) ([]byte, error) + func CommitSpendAnchor(signer Signer, signDesc *SignDescriptor, sweepTx *wire.MsgTx) (wire.TxWitness, error) + func CommitSpendAnchorAnyone(script []byte) (wire.TxWitness, error) + func CommitSpendNoDelay(signer Signer, signDesc *SignDescriptor, sweepTx *wire.MsgTx, tweakless bool) (wire.TxWitness, error) + func CommitSpendRevoke(signer Signer, signDesc *SignDescriptor, sweepTx *wire.MsgTx) (wire.TxWitness, error) + func CommitSpendTimeout(signer Signer, signDesc *SignDescriptor, sweepTx *wire.MsgTx) (wire.TxWitness, error) + func CommitSpendToRemoteConfirmed(signer Signer, signDesc *SignDescriptor, sweepTx *wire.MsgTx) (wire.TxWitness, error) + func ComputeCommitmentPoint(commitSecret []byte) *btcec.PublicKey + func DeriveRevocationPrivKey(revokeBasePriv *btcec.PrivateKey, commitSecret *btcec.PrivateKey) *btcec.PrivateKey + func DeriveRevocationPubkey(revokeBase, commitPoint *btcec.PublicKey) *btcec.PublicKey + func DeserializePartialSignature(scalarBytes []byte) (*musig2.PartialSignature, error) + func EstimateCommitTxWeight(count int, prediction bool) int64 + func FindScriptOutputIndex(tx *wire.MsgTx, script []byte) (bool, uint32) + func GenFundingPkScript(aPub, bPub []byte, amt int64) ([]byte, *wire.TxOut, error) + func GenMultiSigScript(aPub, bPub []byte) ([]byte, error) + func GenTaprootFundingScript(aPub, bPub *btcec.PublicKey, amt int64) ([]byte, *wire.TxOut, error) + func GenerateP2PKH(pubkey []byte) ([]byte, error) + func GenerateP2SH(script []byte) ([]byte, error) + func GenerateUnknownWitness() ([]byte, error) + func HtlcSecondLevelSpend(signer Signer, signDesc *SignDescriptor, sweepTx *wire.MsgTx) (wire.TxWitness, error) + func HtlcSpendRevoke(signer Signer, signDesc *SignDescriptor, revokeTx *wire.MsgTx) (wire.TxWitness, error) + func HtlcSpendSuccess(signer Signer, signDesc *SignDescriptor, sweepTx *wire.MsgTx, csvDelay uint32) (wire.TxWitness, error) + func IsHtlcSpendRevoke(txIn *wire.TxIn, signDesc *SignDescriptor) (bool, error) + func LeaseCommitScriptToRemoteConfirmed(key *btcec.PublicKey, leaseExpiry uint32) ([]byte, error) + func LeaseCommitScriptToSelf(selfKey, revokeKey *btcec.PublicKey, csvTimeout, leaseExpiry uint32) ([]byte, error) + func LeaseSecondLevelHtlcScript(revocationKey, delayKey *btcec.PublicKey, csvDelay, cltvExpiry uint32) ([]byte, error) + func LockTimeToSequence(isSeconds bool, locktime uint32) uint32 + func MakeTaprootCtrlBlock(leafScript []byte, internalKey *btcec.PublicKey, ...) txscript.ControlBlock + func MuSig2CombineKeys(bipVersion MuSig2Version, allSignerPubKeys []*btcec.PublicKey, sortKeys bool, ...) (*musig2.AggregateKey, error) + func MuSig2CombineSig(session MuSig2Session, otherPartialSig *musig2.PartialSignature) (bool, error) + func MuSig2CreateContext(bipVersion MuSig2Version, privKey *btcec.PrivateKey, ...) (MuSig2Context, MuSig2Session, error) + func MuSig2ParsePubKeys(bipVersion MuSig2Version, rawPubKeys [][]byte) ([]*btcec.PublicKey, error) + func MuSig2Sign(session MuSig2Session, msg [32]byte, withSortedKeys bool) (*musig2.PartialSignature, error) + func MultiPrevOutFetcher(inputs []Input) (*txscript.MultiPrevOutFetcher, error) + func NewTxSigHashesV0Only(tx *wire.MsgTx) *txscript.TxSigHashes + func PayToTaprootScript(taprootKey *btcec.PublicKey) ([]byte, error) + func ReadSignDescriptor(r io.Reader, sd *SignDescriptor) error + func ReceiverHTLCScript(cltvExpiry uint32, ...) ([]byte, error) + func ReceiverHTLCScriptTaprootRedeem(senderSig Signature, senderSigHash txscript.SigHashType, ...) (wire.TxWitness, error) + func ReceiverHTLCScriptTaprootRevoke(signer Signer, signDesc *SignDescriptor, sweepTx *wire.MsgTx) (wire.TxWitness, error) + func ReceiverHTLCScriptTaprootTimeout(signer Signer, signDesc *SignDescriptor, sweepTx *wire.MsgTx, cltvExpiry int32, ...) (wire.TxWitness, error) + func ReceiverHtlcSpendRedeem(senderSig Signature, senderSigHash txscript.SigHashType, ...) (wire.TxWitness, error) + func ReceiverHtlcSpendRevoke(signer Signer, signDesc *SignDescriptor, sweepTx *wire.MsgTx) (wire.TxWitness, error) + func ReceiverHtlcSpendRevokeWithKey(signer Signer, signDesc *SignDescriptor, revokeKey *btcec.PublicKey, ...) (wire.TxWitness, error) + func ReceiverHtlcSpendTimeout(signer Signer, signDesc *SignDescriptor, sweepTx *wire.MsgTx, cltvExpiry int32) (wire.TxWitness, error) + func ReceiverHtlcTapLeafSuccess(receiverHtlcKey *btcec.PublicKey, senderHtlcKey *btcec.PublicKey, ...) (txscript.TapLeaf, error) + func ReceiverHtlcTapLeafTimeout(senderHtlcKey *btcec.PublicKey, cltvExpiry uint32) (txscript.TapLeaf, error) + func Ripemd160H(d []byte) []byte + func SecondLevelHtlcScript(revocationKey, delayKey *btcec.PublicKey, csvDelay uint32) ([]byte, error) + func SecondLevelHtlcTapscriptTree(delayKey *btcec.PublicKey, csvDelay uint32) (*txscript.IndexedTapScriptTree, error) + func SenderHTLCScript(senderHtlcKey, receiverHtlcKey, revocationKey *btcec.PublicKey, ...) ([]byte, error) + func SenderHTLCScriptTaprootRedeem(signer Signer, signDesc *SignDescriptor, sweepTx *wire.MsgTx, preimage []byte, ...) (wire.TxWitness, error) + func SenderHTLCScriptTaprootRevoke(signer Signer, signDesc *SignDescriptor, sweepTx *wire.MsgTx) (wire.TxWitness, error) + func SenderHTLCScriptTaprootTimeout(receiverSig Signature, receiverSigHash txscript.SigHashType, signer Signer, ...) (wire.TxWitness, error) + func SenderHTLCTapLeafSuccess(receiverHtlcKey *btcec.PublicKey, paymentHash []byte) (txscript.TapLeaf, error) + func SenderHTLCTapLeafTimeout(senderHtlcKey, receiverHtlcKey *btcec.PublicKey) (txscript.TapLeaf, error) + func SenderHtlcSpendRedeem(signer Signer, signDesc *SignDescriptor, sweepTx *wire.MsgTx, ...) (wire.TxWitness, error) + func SenderHtlcSpendRevoke(signer Signer, signDesc *SignDescriptor, sweepTx *wire.MsgTx) (wire.TxWitness, error) + func SenderHtlcSpendRevokeWithKey(signer Signer, signDesc *SignDescriptor, revokeKey *btcec.PublicKey, ...) (wire.TxWitness, error) + func SenderHtlcSpendTimeout(receiverSig Signature, receiverSigHash txscript.SigHashType, signer Signer, ...) (wire.TxWitness, error) + func SerializePartialSignature(sig *musig2.PartialSignature) ([MuSig2PartialSigSize]byte, error) + func SingleTweakBytes(commitPoint, basePoint *btcec.PublicKey) []byte + func SpendMultiSig(witnessScript, pubA []byte, sigA Signature, pubB []byte, sigB Signature) [][]byte + func TaprootAnchorSpend(signer Signer, signDesc *SignDescriptor, sweepTx *wire.MsgTx) (wire.TxWitness, error) + func TaprootAnchorSpendAny(anchorKey *btcec.PublicKey) (wire.TxWitness, error) + func TaprootCommitRemoteSpend(signer Signer, signDesc *SignDescriptor, sweepTx *wire.MsgTx, ...) (wire.TxWitness, error) + func TaprootCommitScriptToRemote(remoteKey *btcec.PublicKey) (*btcec.PublicKey, error) + func TaprootCommitScriptToSelf(csvTimeout uint32, selfKey, revokeKey *btcec.PublicKey) (*btcec.PublicKey, error) + func TaprootCommitSpendRevoke(signer Signer, signDesc *SignDescriptor, revokeTx *wire.MsgTx, ...) (wire.TxWitness, error) + func TaprootCommitSpendSuccess(signer Signer, signDesc *SignDescriptor, sweepTx *wire.MsgTx, ...) (wire.TxWitness, error) + func TaprootHtlcSpendRevoke(signer Signer, signDesc *SignDescriptor, revokeTx *wire.MsgTx) (wire.TxWitness, error) + func TaprootHtlcSpendSuccess(signer Signer, signDesc *SignDescriptor, sweepTx *wire.MsgTx, ...) (wire.TxWitness, error) + func TaprootLocalCommitDelayScript(csvTimeout uint32, selfKey *btcec.PublicKey) ([]byte, error) + func TaprootLocalCommitRevokeScript(selfKey, revokeKey *btcec.PublicKey) ([]byte, error) + func TaprootOutputKeyAnchor(key *btcec.PublicKey) (*btcec.PublicKey, error) + func TaprootSecondLevelHtlcScript(revokeKey, delayKey *btcec.PublicKey, csvDelay uint32) (*btcec.PublicKey, error) + func TaprootSecondLevelTapLeaf(delayKey *btcec.PublicKey, csvDelay uint32) (txscript.TapLeaf, error) + func TapscriptFullKeyOnly(taprootKey *btcec.PublicKey) *waddrmgr.Tapscript + func TapscriptFullTree(internalKey *btcec.PublicKey, allTreeLeaves ...txscript.TapLeaf) *waddrmgr.Tapscript + func TapscriptPartialReveal(internalKey *btcec.PublicKey, revealedLeaf txscript.TapLeaf, ...) *waddrmgr.Tapscript + func TapscriptRootHashOnly(internalKey *btcec.PublicKey, rootHash []byte) *waddrmgr.Tapscript + func TweakPrivKey(basePriv *btcec.PrivateKey, commitTweak []byte) *btcec.PrivateKey + func TweakPubKey(basePoint, commitPoint *btcec.PublicKey) *btcec.PublicKey + func TweakPubKeyWithTweak(pubKey *btcec.PublicKey, tweakBytes []byte) *btcec.PublicKey + func WitnessPubKeyHash(pubkey []byte) ([]byte, error) + func WitnessScriptHash(witnessScript []byte) ([]byte, error) + func WriteSignDescriptor(w io.Writer, sd *SignDescriptor) error + type AnchorScriptTree struct + SweepLeaf txscript.TapLeaf + func NewAnchorScriptTree(anchorKey *btcec.PublicKey) (*AnchorScriptTree, error) + func (a *AnchorScriptTree) CtrlBlockForPath(path ScriptPath) (*txscript.ControlBlock, error) + func (a *AnchorScriptTree) WitnessScriptForPath(path ScriptPath) ([]byte, error) + func (a *AnchorScriptTree) WitnessScriptToSign() []byte + type BaseInput struct + func MakeBaseInput(outpoint *wire.OutPoint, witnessType WitnessType, ...) BaseInput + func NewBaseInput(outpoint *wire.OutPoint, witnessType WitnessType, ...) *BaseInput + func NewCsvInput(outpoint *wire.OutPoint, witnessType WitnessType, ...) *BaseInput + func NewCsvInputWithCltv(outpoint *wire.OutPoint, witnessType WitnessType, ...) *BaseInput + func (bi *BaseInput) CraftInputScript(signer Signer, txn *wire.MsgTx, hashCache *txscript.TxSigHashes, ...) (*Script, error) + func (i *BaseInput) BlocksToMaturity() uint32 + func (i *BaseInput) HeightHint() uint32 + func (i *BaseInput) OutPoint() *wire.OutPoint + func (i *BaseInput) RequiredLockTime() (uint32, bool) + func (i *BaseInput) RequiredTxOut() *wire.TxOut + func (i *BaseInput) SignDesc() *SignDescriptor + func (i *BaseInput) UnconfParent() *TxInfo + func (i *BaseInput) WitnessType() WitnessType + type CommitScriptTree struct + RevocationLeaf txscript.TapLeaf + SettleLeaf txscript.TapLeaf + func NewLocalCommitScriptTree(csvTimeout uint32, selfKey, revokeKey *btcec.PublicKey) (*CommitScriptTree, error) + func NewRemoteCommitScriptTree(remoteKey *btcec.PublicKey) (*CommitScriptTree, error) + func (c *CommitScriptTree) CtrlBlockForPath(path ScriptPath) (*txscript.ControlBlock, error) + func (c *CommitScriptTree) WitnessScriptForPath(path ScriptPath) ([]byte, error) + func (c *CommitScriptTree) WitnessScriptToSign() []byte + type HtlcScriptTree struct + SuccessTapLeaf txscript.TapLeaf + TimeoutTapLeaf txscript.TapLeaf + func ReceiverHTLCScriptTaproot(cltvExpiry uint32, ...) (*HtlcScriptTree, error) + func SenderHTLCScriptTaproot(senderHtlcKey, receiverHtlcKey, revokeKey *btcec.PublicKey, payHash []byte, ...) (*HtlcScriptTree, error) + func (h *HtlcScriptTree) CtrlBlockForPath(path ScriptPath) (*txscript.ControlBlock, error) + func (h *HtlcScriptTree) WitnessScriptForPath(path ScriptPath) ([]byte, error) + func (h *HtlcScriptTree) WitnessScriptToSign() []byte + type HtlcSecondLevelAnchorInput struct + SignedTx *wire.MsgTx + func MakeHtlcSecondLevelSuccessAnchorInput(signedTx *wire.MsgTx, signDetails *SignDetails, preimage lntypes.Preimage, ...) HtlcSecondLevelAnchorInput + func MakeHtlcSecondLevelSuccessTaprootInput(signedTx *wire.MsgTx, signDetails *SignDetails, preimage lntypes.Preimage, ...) HtlcSecondLevelAnchorInput + func MakeHtlcSecondLevelTimeoutAnchorInput(signedTx *wire.MsgTx, signDetails *SignDetails, heightHint uint32) HtlcSecondLevelAnchorInput + func MakeHtlcSecondLevelTimeoutTaprootInput(signedTx *wire.MsgTx, signDetails *SignDetails, heightHint uint32) HtlcSecondLevelAnchorInput + func (i *HtlcSecondLevelAnchorInput) BlocksToMaturity() uint32 + func (i *HtlcSecondLevelAnchorInput) CraftInputScript(signer Signer, txn *wire.MsgTx, hashCache *txscript.TxSigHashes, ...) (*Script, error) + func (i *HtlcSecondLevelAnchorInput) HeightHint() uint32 + func (i *HtlcSecondLevelAnchorInput) OutPoint() *wire.OutPoint + func (i *HtlcSecondLevelAnchorInput) RequiredLockTime() (uint32, bool) + func (i *HtlcSecondLevelAnchorInput) RequiredTxOut() *wire.TxOut + func (i *HtlcSecondLevelAnchorInput) SignDesc() *SignDescriptor + func (i *HtlcSecondLevelAnchorInput) UnconfParent() *TxInfo + func (i *HtlcSecondLevelAnchorInput) WitnessType() WitnessType + type HtlcSucceedInput struct + func MakeHtlcSucceedInput(outpoint *wire.OutPoint, signDescriptor *SignDescriptor, preimage []byte, ...) HtlcSucceedInput + func MakeTaprootHtlcSucceedInput(op *wire.OutPoint, signDesc *SignDescriptor, preimage []byte, ...) HtlcSucceedInput + func (h *HtlcSucceedInput) CraftInputScript(signer Signer, txn *wire.MsgTx, hashCache *txscript.TxSigHashes, ...) (*Script, error) + func (i *HtlcSucceedInput) BlocksToMaturity() uint32 + func (i *HtlcSucceedInput) HeightHint() uint32 + func (i *HtlcSucceedInput) OutPoint() *wire.OutPoint + func (i *HtlcSucceedInput) RequiredLockTime() (uint32, bool) + func (i *HtlcSucceedInput) RequiredTxOut() *wire.TxOut + func (i *HtlcSucceedInput) SignDesc() *SignDescriptor + func (i *HtlcSucceedInput) UnconfParent() *TxInfo + func (i *HtlcSucceedInput) WitnessType() WitnessType + type Input interface + BlocksToMaturity func() uint32 + CraftInputScript func(signer Signer, txn *wire.MsgTx, hashCache *txscript.TxSigHashes, ...) (*Script, error) + HeightHint func() uint32 + OutPoint func() *wire.OutPoint + RequiredLockTime func() (uint32, bool) + RequiredTxOut func() *wire.TxOut + SignDesc func() *SignDescriptor + UnconfParent func() *TxInfo + WitnessType func() WitnessType + type MockInput struct + func (m *MockInput) BlocksToMaturity() uint32 + func (m *MockInput) CraftInputScript(signer Signer, txn *wire.MsgTx, hashCache *txscript.TxSigHashes, ...) (*Script, error) + func (m *MockInput) HeightHint() uint32 + func (m *MockInput) OutPoint() *wire.OutPoint + func (m *MockInput) RequiredLockTime() (uint32, bool) + func (m *MockInput) RequiredTxOut() *wire.TxOut + func (m *MockInput) SignDesc() *SignDescriptor + func (m *MockInput) UnconfParent() *TxInfo + func (m *MockInput) WitnessType() WitnessType + type MockSigner struct + NetParams *chaincfg.Params + Privkeys []*btcec.PrivateKey + func NewMockSigner(privKeys []*btcec.PrivateKey, netParams *chaincfg.Params) *MockSigner + func (m *MockSigner) ComputeInputScript(tx *wire.MsgTx, signDesc *SignDescriptor) (*Script, error) + func (m *MockSigner) SignOutputRaw(tx *wire.MsgTx, signDesc *SignDescriptor) (Signature, error) + type MuSig2Context interface + CombinedKey func() (*btcec.PublicKey, error) + SigningKeys func() []*btcec.PublicKey + TaprootInternalKey func() (*btcec.PublicKey, error) + type MuSig2Session interface + FinalSig func() *schnorr.Signature + NumRegisteredNonces func() int + PublicNonce func() [musig2.PubNonceSize]byte + RegisterPubNonce func(nonce [musig2.PubNonceSize]byte) (bool, error) + type MuSig2SessionID [sha256.Size]byte + func NewMuSig2SessionID(combinedKey *btcec.PublicKey, publicNonces [musig2.PubNonceSize]byte) MuSig2SessionID + type MuSig2SessionInfo struct + CombinedKey *btcec.PublicKey + HaveAllNonces bool + HaveAllSigs bool + PublicNonce [musig2.PubNonceSize]byte + SessionID [32]byte + TaprootInternalKey *btcec.PublicKey + TaprootTweak bool + Version MuSig2Version + type MuSig2Signer interface + MuSig2Cleanup func(MuSig2SessionID) error + MuSig2CombineSig func(MuSig2SessionID, []*musig2.PartialSignature) (*schnorr.Signature, bool, error) + MuSig2CreateSession func(MuSig2Version, keychain.KeyLocator, []*btcec.PublicKey, *MuSig2Tweaks, ...) (*MuSig2SessionInfo, error) + MuSig2RegisterNonces func(MuSig2SessionID, [][musig2.PubNonceSize]byte) (bool, error) + MuSig2Sign func(MuSig2SessionID, [sha256.Size]byte, bool) (*musig2.PartialSignature, error) + type MuSig2State struct + type MuSig2Tweaks struct + GenericTweaks []musig2.KeyTweakDesc + TaprootBIP0086Tweak bool + TaprootTweak []byte + func (t *MuSig2Tweaks) HasTaprootTweak() bool + func (t *MuSig2Tweaks) ToContextOptions() []musig2.ContextOption + func (t *MuSig2Tweaks) ToV040ContextOptions() []musig2v040.ContextOption + type MuSig2Version uint8 + const MuSig2Version040 + const MuSig2Version100RC2 + type MusigSessionManager struct + func NewMusigSessionManager(keyFetcher PrivKeyFetcher) *MusigSessionManager + func (m *MusigSessionManager) MuSig2Cleanup(sessionID MuSig2SessionID) error + func (m *MusigSessionManager) MuSig2CombineSig(sessionID MuSig2SessionID, partialSigs []*musig2.PartialSignature) (*schnorr.Signature, bool, error) + func (m *MusigSessionManager) MuSig2CreateSession(bipVersion MuSig2Version, keyLoc keychain.KeyLocator, ...) (*MuSig2SessionInfo, error) + func (m *MusigSessionManager) MuSig2RegisterNonces(sessionID MuSig2SessionID, otherSignerNonces [][musig2.PubNonceSize]byte) (bool, error) + func (m *MusigSessionManager) MuSig2Sign(sessionID MuSig2SessionID, msg [sha256.Size]byte, cleanUp bool) (*musig2.PartialSignature, error) + type PrivKeyFetcher func(*keychain.KeyDescriptor) (*btcec.PrivateKey, error) + type Script struct + SigScript []byte + Witness wire.TxWitness + type ScriptDescriptor interface + PkScript func() []byte + WitnessScriptForPath func(path ScriptPath) ([]byte, error) + WitnessScriptToSign func() []byte + type ScriptPath uint8 + const ScriptPathDelay + const ScriptPathRevocation + const ScriptPathSuccess + const ScriptPathTimeout + type ScriptTree struct + InternalKey *btcec.PublicKey + TaprootKey *btcec.PublicKey + TapscriptRoot []byte + TapscriptTree *txscript.IndexedTapScriptTree + func (s *ScriptTree) PkScript() []byte + func (s *ScriptTree) TapScriptTree() *txscript.IndexedTapScriptTree + func (s *ScriptTree) TapTweak() []byte + type SecondLevelScriptTree struct + SuccessTapLeaf txscript.TapLeaf + func TaprootSecondLevelScriptTree(revokeKey, delayKey *btcec.PublicKey, csvDelay uint32) (*SecondLevelScriptTree, error) + func (s *SecondLevelScriptTree) CtrlBlockForPath(path ScriptPath) (*txscript.ControlBlock, error) + func (s *SecondLevelScriptTree) WitnessScriptForPath(path ScriptPath) ([]byte, error) + func (s *SecondLevelScriptTree) WitnessScriptToSign() []byte + type SignDescriptor struct + ControlBlock []byte + DoubleTweak *btcec.PrivateKey + HashType txscript.SigHashType + InputIndex int + KeyDesc keychain.KeyDescriptor + Output *wire.TxOut + PrevOutputFetcher txscript.PrevOutputFetcher + SigHashes *txscript.TxSigHashes + SignMethod SignMethod + SingleTweak []byte + TapTweak []byte + WitnessScript []byte + type SignDetails struct + PeerSig Signature + SigHashType txscript.SigHashType + SignDesc SignDescriptor + type SignMethod uint8 + const TaprootKeySpendBIP0086SignMethod + const TaprootKeySpendSignMethod + const TaprootScriptSpendSignMethod + const WitnessV0SignMethod + func (s SignMethod) PkScriptCompatible(pkScript []byte) bool + func (s SignMethod) String() string + type Signature interface + Serialize func() []byte + Verify func([]byte, *btcec.PublicKey) bool + func ParseSignature(rawSig []byte) (Signature, error) + type Signer interface + ComputeInputScript func(tx *wire.MsgTx, signDesc *SignDescriptor) (*Script, error) + SignOutputRaw func(tx *wire.MsgTx, signDesc *SignDescriptor) (Signature, error) + type StandardWitnessType uint16 + const CommitSpendNoDelayTweakless + const CommitmentAnchor + const CommitmentNoDelay + const CommitmentRevoke + const CommitmentTimeLock + const CommitmentToRemoteConfirmed + const HtlcAcceptedRemoteSuccess + const HtlcAcceptedRevoke + const HtlcAcceptedSuccessSecondLevel + const HtlcAcceptedSuccessSecondLevelInputConfirmed + const HtlcOfferedRemoteTimeout + const HtlcOfferedRevoke + const HtlcOfferedTimeoutSecondLevel + const HtlcOfferedTimeoutSecondLevelInputConfirmed + const HtlcSecondLevelRevoke + const LeaseCommitmentTimeLock + const LeaseCommitmentToRemoteConfirmed + const LeaseHtlcAcceptedSuccessSecondLevel + const LeaseHtlcOfferedTimeoutSecondLevel + const NestedWitnessKeyHash + const TaprootAnchorSweepSpend + const TaprootCommitmentRevoke + const TaprootHtlcAcceptedLocalSuccess + const TaprootHtlcAcceptedRemoteSuccess + const TaprootHtlcAcceptedRevoke + const TaprootHtlcAcceptedSuccessSecondLevel + const TaprootHtlcLocalOfferedTimeout + const TaprootHtlcOfferedRemoteTimeout + const TaprootHtlcOfferedRevoke + const TaprootHtlcOfferedTimeoutSecondLevel + const TaprootHtlcSecondLevelRevoke + const TaprootLocalCommitSpend + const TaprootPubKeySpend + const TaprootRemoteCommitSpend + const WitnessKeyHash + func (wt StandardWitnessType) AddWeightEstimation(e *TxWeightEstimator) error + func (wt StandardWitnessType) SizeUpperBound() (int, bool, error) + func (wt StandardWitnessType) String() string + func (wt StandardWitnessType) WitnessGenerator(signer Signer, descriptor *SignDescriptor) WitnessGenerator + type TapscriptDescriptor interface + CtrlBlockForPath func(path ScriptPath) (*txscript.ControlBlock, error) + TapScriptTree func() *txscript.IndexedTapScriptTree + TapTweak func() []byte + type TxInfo struct + Fee btcutil.Amount + Weight int64 + func (t *TxInfo) String() string + type TxWeightEstimator struct + func (twe *TxWeightEstimator) AddNestedP2WKHInput() *TxWeightEstimator + func (twe *TxWeightEstimator) AddNestedP2WSHInput(witnessSize int) *TxWeightEstimator + func (twe *TxWeightEstimator) AddOutput(pkScript []byte) *TxWeightEstimator + func (twe *TxWeightEstimator) AddP2PKHInput() *TxWeightEstimator + func (twe *TxWeightEstimator) AddP2PKHOutput() *TxWeightEstimator + func (twe *TxWeightEstimator) AddP2SHOutput() *TxWeightEstimator + func (twe *TxWeightEstimator) AddP2TROutput() *TxWeightEstimator + func (twe *TxWeightEstimator) AddP2WKHInput() *TxWeightEstimator + func (twe *TxWeightEstimator) AddP2WKHOutput() *TxWeightEstimator + func (twe *TxWeightEstimator) AddP2WSHOutput() *TxWeightEstimator + func (twe *TxWeightEstimator) AddTaprootKeySpendInput(hashType txscript.SigHashType) *TxWeightEstimator + func (twe *TxWeightEstimator) AddTapscriptInput(leafWitnessSize int, tapscript *waddrmgr.Tapscript) *TxWeightEstimator + func (twe *TxWeightEstimator) AddTxOutput(txOut *wire.TxOut) *TxWeightEstimator + func (twe *TxWeightEstimator) AddWitnessInput(witnessSize int) *TxWeightEstimator + func (twe *TxWeightEstimator) VSize() int + func (twe *TxWeightEstimator) Weight() int + type WitnessGenerator func(tx *wire.MsgTx, hc *txscript.TxSigHashes, inputIndex int) (*Script, error) + type WitnessType interface + AddWeightEstimation func(e *TxWeightEstimator) error + SizeUpperBound func() (int, bool, error) + String func() string + WitnessGenerator func(signer Signer, descriptor *SignDescriptor) WitnessGenerator