Versions in this module Expand all Collapse all v1 v1.0.2 Apr 11, 2020 Changes in this version + const MaxPsbtKeyLength v1.0.1 Jan 16, 2020 Changes in this version + const MaxPsbtValueLength + const MinTxVersion + const SignFinalized + const SignInvalid + const SignSuccesful + var ErrDuplicateKey = errors.New("Invalid Psbt due to duplicate key") + var ErrIncompletePSBT = errors.New(...) + var ErrInputAlreadyFinalized = errors.New(...) + var ErrInvalidKeydata = errors.New("Invalid key data") + var ErrInvalidMagicBytes = errors.New("Invalid Psbt due to incorrect magic bytes") + var ErrInvalidPrevOutNonWitnessTransaction = errors.New(...) + var ErrInvalidPsbtFormat = errors.New("Invalid PSBT serialization format") + var ErrInvalidRawTxSigned = errors.New(...) + var ErrInvalidSigHashFlags = errors.New("Invalid Sighash Flags") + var ErrInvalidSignatureForInput = errors.New(...) + var ErrNotFinalizable = errors.New("PSBT is not finalizable") + var ErrUnsupportedScriptType = errors.New("Unsupported script type") + func Extract(p *Packet) (*wire.MsgTx, error) + func Finalize(p *Packet, inIndex int) error + func MaybeFinalize(p *Packet, inIndex int) (bool, error) + func MaybeFinalizeAll(p *Packet) error + func SerializeBIP32Derivation(masterKeyFingerprint uint32, bip32Path []uint32) []byte + type Bip32Derivation struct + Bip32Path []uint32 + MasterKeyFingerprint uint32 + PubKey []byte + type Bip32Sorter []*Bip32Derivation + func (s Bip32Sorter) Len() int + func (s Bip32Sorter) Less(i, j int) bool + func (s Bip32Sorter) Swap(i, j int) + type GlobalType uint8 + const ProprietaryGlobalType + const UnsignedTxType + const VersionType + const XpubType + type InputType uint32 + const Bip32DerivationInputType + const FinalScriptSigType + const FinalScriptWitnessType + const NonWitnessUtxoType + const PartialSigType + const ProprietaryInputType + const RedeemScriptInputType + const SighashType + const WitnessScriptInputType + const WitnessUtxoType + type OutputType uint32 + const Bip32DerivationOutputType + const RedeemScriptOutputType + const WitnessScriptOutputType + type PInput struct + Bip32Derivation []*Bip32Derivation + FinalScriptSig []byte + FinalScriptWitness []byte + NonWitnessUtxo *wire.MsgTx + PartialSigs []*PartialSig + RedeemScript []byte + SighashType txscript.SigHashType + Unknowns []*Unknown + WitnessScript []byte + WitnessUtxo *wire.TxOut + func NewPsbtInput(nonWitnessUtxo *wire.MsgTx, witnessUtxo *wire.TxOut) *PInput + func (pi *PInput) IsSane() bool + type POutput struct + Bip32Derivation []*Bip32Derivation + RedeemScript []byte + WitnessScript []byte + func NewPsbtOutput(redeemScript []byte, witnessScript []byte, bip32Derivation []*Bip32Derivation) *POutput + type Packet struct + Inputs []PInput + Outputs []POutput + Unknowns []Unknown + UnsignedTx *wire.MsgTx + func New(inputs []*wire.OutPoint, outputs []*wire.TxOut, version int32, ...) (*Packet, error) + func NewFromRawBytes(r io.Reader, b64 bool) (*Packet, error) + func NewFromUnsignedTx(tx *wire.MsgTx) (*Packet, error) + func (p *Packet) B64Encode() (string, error) + func (p *Packet) IsComplete() bool + func (p *Packet) SanityCheck() error + func (p *Packet) Serialize(w io.Writer) error + type PartialSig struct + PubKey []byte + Signature []byte + type PartialSigSorter []*PartialSig + func (s PartialSigSorter) Len() int + func (s PartialSigSorter) Less(i, j int) bool + func (s PartialSigSorter) Swap(i, j int) + type SignOutcome int + type Unknown struct + Key []byte + Value []byte + type Updater struct + Upsbt *Packet + func NewUpdater(p *Packet) (*Updater, error) + func (p *Updater) AddInBip32Derivation(masterKeyFingerprint uint32, bip32Path []uint32, pubKeyData []byte, ...) error + func (p *Updater) AddInNonWitnessUtxo(tx *wire.MsgTx, inIndex int) error + func (p *Updater) AddInRedeemScript(redeemScript []byte, inIndex int) error + func (p *Updater) AddInSighashType(sighashType txscript.SigHashType, inIndex int) error + func (p *Updater) AddInWitnessScript(witnessScript []byte, inIndex int) error + func (p *Updater) AddInWitnessUtxo(txout *wire.TxOut, inIndex int) error + func (p *Updater) AddOutBip32Derivation(masterKeyFingerprint uint32, bip32Path []uint32, pubKeyData []byte, ...) error + func (p *Updater) AddOutRedeemScript(redeemScript []byte, outIndex int) error + func (p *Updater) AddOutWitnessScript(witnessScript []byte, outIndex int) error + func (u *Updater) Sign(inIndex int, sig []byte, pubKey []byte, redeemScript []byte, ...) (SignOutcome, error)