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.
-
-
Method Summary
Modifier and Type Method Description Unit
destroy()
Unit
close()
final Pointer
uniffiClonePointer()
Psbt
combine(Psbt other)
Combines this Psbt
withother
PSBT as described by BIP 174.Transaction
extractTx()
Extracts the Transaction
from aPsbt
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.
-
-
-
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 newPsbt
instance from a base64-encoded string.
-
-
Method Detail
-
uniffiClonePointer
final Pointer uniffiClonePointer()
-
combine
Psbt combine(Psbt other)
Combines this
Psbt
withother
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 aPsbt
by filling in the available signature information.ExtractTxError
variants will contain either thePsbt
itself or theTransaction
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.
-
jsonSerialize
String jsonSerialize()
Serializes the PSBT into a JSON string representation.
-
-