-
public interface PsbtInterfaceA Partially Signed Transaction.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classPsbtInterface.Companion
-
Method Summary
Modifier and Type Method Description abstract Psbtcombine(Psbt other)Combines this PsbtwithotherPSBT as described by BIP 174.abstract TransactionextractTx()Extracts the Transactionfrom aPsbtby filling in the available signature information.abstract ULongfee()Calculates transaction fee. abstract FinalizedPsbtResultfinalize()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 StringjsonSerialize()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 Stringserialize()Serialize the PSBT into a base64-encoded string. abstract StringspendUtxo(ULong inputIndex)Returns the spending utxo for this PSBT's input at input_index.abstract UnitwriteToFile(String path)Write the Psbtto a file.-
-
Method Detail
-
combine
abstract 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
abstract 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
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.
MissingUtxowhen UTXO information for any input is not present or is invalid.NegativeFeeif calculated value is negative.FeeOverflowif 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.
-
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
Psbtto a file. Note that the file must not yet exist.
-
-
-
-