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 Unitdestroy()Unitclose()final PointeruniffiClonePointer()Psbtcombine(Psbt other)Combines this PsbtwithotherPSBT as described by BIP 174.TransactionextractTx()Extracts the Transactionfrom aPsbtby filling in the available signature information.ULongfee()Calculates transaction fee. FinalizedPsbtResultfinalize()Finalizes the current PSBT and produces a result indicatingwhether the finalization was successful or not. StringjsonSerialize()Serializes the PSBT into a JSON string representation. Stringserialize()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 newPsbtinstance from a base64-encoded string.
-
-
Method Detail
-
uniffiClonePointer
final Pointer uniffiClonePointer()
-
combine
Psbt combine(Psbt other)
Combines this
PsbtwithotherPSBT 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
Transactionfrom aPsbtby filling in the available signature information.ExtractTxErrorvariants will contain either thePsbtitself or theTransactionthat 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.
MissingUtxowhen UTXO information for any input is not present or is invalid.NegativeFeeif calculated value is negative.FeeOverflowif 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.
-
-
-
-