Package 

Interface PsbtInterface

    • Method Summary

      Modifier and Type Method Description
      abstract Psbt combine(Psbt other) Combines this Psbt with other PSBT as described by BIP 174.
      abstract Transaction extractTx() Extracts the Transaction from a Psbt by filling in the available signature information.
      abstract ULong fee() Calculates transaction fee.
      abstract FinalizedPsbtResult finalize() Finalizes the current PSBT and produces a result indicatingwhether the finalization was successful or not.
      abstract List<Input> input() The corresponding key-value map for each input in the unsigned transaction.
      abstract String jsonSerialize() Serializes the PSBT into a JSON string representation.
      abstract List<Output> output() The corresponding key-value map for each output in the unsigned transaction.
      abstract String serialize() Serialize the PSBT into a base64-encoded string.
      abstract String spendUtxo(ULong inputIndex) Returns the spending utxo for this PSBT's input at input_index.
      abstract Unit writeToFile(String path) Write the Psbt to a file.
      • Methods inherited from class java.lang.Object

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

      • combine

         abstract 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

         abstract 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

         abstract 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

         abstract FinalizedPsbtResult finalize()

        Finalizes the current PSBT and produces a result indicating

        whether the finalization was successful or not.

      • input

         abstract List<Input> input()

        The corresponding key-value map for each input in the unsigned transaction.

      • jsonSerialize

         abstract String jsonSerialize()

        Serializes the PSBT into a JSON string representation.

      • output

         abstract List<Output> output()

        The corresponding key-value map for each output in the unsigned transaction.

      • serialize

         abstract String serialize()

        Serialize the PSBT into a base64-encoded string.

      • spendUtxo

         abstract String spendUtxo(ULong inputIndex)

        Returns the spending utxo for this PSBT's input at input_index.

      • writeToFile

         abstract Unit writeToFile(String path)

        Write the Psbt to a file. Note that the file must not yet exist.