Class Psbt

  • All Implemented Interfaces:
    java.lang.AutoCloseable , org.bitcoindevkit.Disposable , org.bitcoindevkit.PsbtInterface

    public class Psbt
     implements Disposable, AutoCloseable, PsbtInterface
                        

    A Partially Signed Transaction.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      Psbt(Pointer pointer)
      Psbt(NoPointer noPointer) This constructor can be used to instantiate a fake object.
      Psbt(String psbtBase64) Creates a new Psbt instance from a base64-encoded string.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Unit destroy()
      Unit close()
      final Pointer uniffiClonePointer()
      Psbt combine(Psbt other) Combines this Psbt with other PSBT as described by BIP 174.
      Transaction extractTx() Extracts the Transaction from a Psbt by filling in the available signature information.
      ULong fee() Calculates transaction fee.
      FinalizedPsbtResult finalize() Finalizes the current PSBT and produces a result indicatingwhether the finalization was successful or not.
      String jsonSerialize() Serializes the PSBT into a JSON string representation.
      String serialize() Serialize the PSBT into a base64-encoded string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Psbt

        Psbt(Pointer pointer)
      • Psbt

        Psbt(NoPointer noPointer)
        This constructor can be used to instantiate a fake object.
      • Psbt

        Psbt(String psbtBase64)
        Creates a new Psbt instance from a base64-encoded string.
    • Method Detail

      • combine

         Psbt combine(Psbt other)

        Combines this Psbt with other PSBT as described by BIP 174.

        In accordance with BIP 174 this function is commutative i.e., A.combine(B) == B.combine(A)

      • extractTx

         Transaction extractTx()

        Extracts the Transaction from a Psbt by filling in the available signature information.

        ExtractTxError variants will contain either the Psbt itself or the Transaction that was extracted. These can be extracted from the Errors in order to recover. See the error documentation for info on the variants. In general, it covers large fees.

      • fee

         ULong fee()

        Calculates transaction fee.

        'Fee' being the amount that will be paid for mining a transaction with the current inputs and outputs i.e., the difference in value of the total inputs and the total outputs.

        • MissingUtxo when UTXO information for any input is not present or is invalid.

        • NegativeFee if calculated value is negative.

        • FeeOverflow if an integer overflow occurs.

      • finalize

         FinalizedPsbtResult finalize()

        Finalizes the current PSBT and produces a result indicating

        whether the finalization was successful or not.

      • serialize

         String serialize()

        Serialize the PSBT into a base64-encoded string.