A partially signed bitcoin transaction: see https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki.
- Value parameters:
- global
global psbt data containing the transaction to be signed.
- inputs
signing data for each input of the transaction to be signed (order matches the unsigned tx).
- outputs
signing data for each output of the transaction to be signed (order matches the unsigned tx).
- Companion:
- object
- Source:
- Psbt.scala
Value members
Concrete methods
Compute the fees paid by the PSBT. Note that if some inputs have not been updated yet, the fee cannot be computed.
Compute the fees paid by the PSBT. Note that if some inputs have not been updated yet, the fee cannot be computed.
- Source:
- Psbt.scala
Implements the PSBT extractor role: extracts a valid transaction from the psbt data.
Implements the PSBT extractor role: extracts a valid transaction from the psbt data.
- Returns:
a fully signed, ready-to-broadcast transaction.
- Source:
- Psbt.scala
Implements the PSBT finalizer role: finalizes a given non-segwit input. This will clear all fields from the input except the utxo, scriptSig and unknown entries.
Implements the PSBT finalizer role: finalizes a given non-segwit input. This will clear all fields from the input except the utxo, scriptSig and unknown entries.
- Value parameters:
- outPoint
input that should be finalized.
- scriptSig
signature script.
- Returns:
a psbt with the given input finalized.
- Source:
- Psbt.scala
Implements the PSBT finalizer role: finalizes a given non-segwit input. This will clear all fields from the input except the utxo, scriptSig and unknown entries.
Implements the PSBT finalizer role: finalizes a given non-segwit input. This will clear all fields from the input except the utxo, scriptSig and unknown entries.
- Value parameters:
- inputIndex
index of the input that should be finalized.
- scriptSig
signature script.
- Returns:
a psbt with the given input finalized.
- Source:
- Psbt.scala
Implements the PSBT finalizer role: finalizes a given segwit input. This will clear all fields from the input except the utxo, scriptSig, scriptWitness and unknown entries.
Implements the PSBT finalizer role: finalizes a given segwit input. This will clear all fields from the input except the utxo, scriptSig, scriptWitness and unknown entries.
- Value parameters:
- outPoint
input that should be finalized.
- scriptWitness
witness script.
- Returns:
a psbt with the given input finalized.
- Source:
- Psbt.scala
Implements the PSBT finalizer role: finalizes a given segwit input. This will clear all fields from the input except the utxo, scriptSig, scriptWitness and unknown entries.
Implements the PSBT finalizer role: finalizes a given segwit input. This will clear all fields from the input except the utxo, scriptSig, scriptWitness and unknown entries.
- Value parameters:
- inputIndex
index of the input that should be finalized.
- scriptWitness
witness script.
- Returns:
a psbt with the given input finalized.
- Source:
- Psbt.scala
Implements the PSBT signer role: sign a given input. The caller needs to carefully verify that it wants to spend that input, and that the unsigned transaction matches what it expects.
Implements the PSBT signer role: sign a given input. The caller needs to carefully verify that it wants to spend that input, and that the unsigned transaction matches what it expects.
- Value parameters:
- outPoint
input that should be signed.
- priv
private key used to sign the input.
- Returns:
the psbt with a partial signature added (other inputs will not be modified).
- Source:
- Psbt.scala
Implements the PSBT signer role: sign a given input. The caller needs to carefully verify that it wants to spend that input, and that the unsigned transaction matches what it expects.
Implements the PSBT signer role: sign a given input. The caller needs to carefully verify that it wants to spend that input, and that the unsigned transaction matches what it expects.
- Value parameters:
- inputIndex
index of the input that should be signed.
- priv
private key used to sign the input.
- Returns:
the psbt with a partial signature added (other inputs will not be modified).
- Source:
- Psbt.scala
Implements the PSBT updater role; adds information about a given non-segwit utxo.
Implements the PSBT updater role; adds information about a given non-segwit utxo.
- Value parameters:
- derivationPaths
derivation paths for keys used by this utxo.
- inputTx
transaction containing the utxo.
- outputIndex
index of the utxo in the inputTx.
- redeemScript
redeem script if known and applicable (when using p2sh).
- sighashType
sighash type if one should be specified.
- Returns:
psbt with the matching input updated.
- Source:
- Psbt.scala
Add details for a non-segwit output.
Add details for a non-segwit output.
- Value parameters:
- derivationPaths
derivation paths for keys used by this output.
- outputIndex
index of the output in the psbt.
- redeemScript
redeem script if known and applicable (when using p2sh).
- Returns:
psbt with the matching output updated.
- Source:
- Psbt.scala
- Source:
- Psbt.scala
- Source:
- Psbt.scala
Implements the PSBT updater role; adds information about a given segwit utxo. When you have access to the complete input transaction, you should prefer updateWitnessInputTx.
Implements the PSBT updater role; adds information about a given segwit utxo. When you have access to the complete input transaction, you should prefer updateWitnessInputTx.
- Value parameters:
- derivationPaths
derivation paths for keys used by this utxo.
- outPoint
utxo being spent.
- redeemScript
redeem script if known and applicable (when using p2sh-embedded segwit).
- sighashType
sighash type if one should be specified.
- txOut
transaction output for the provided outPoint.
- witnessScript
witness script if known and applicable (when using p2wsh).
- Returns:
psbt with the matching input updated.
- Source:
- Psbt.scala
Implements the PSBT updater role; adds information about a given segwit utxo. Note that we always fill the nonWitnessUtxo (see https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki#cite_note-7).
Implements the PSBT updater role; adds information about a given segwit utxo. Note that we always fill the nonWitnessUtxo (see https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki#cite_note-7).
- Value parameters:
- derivationPaths
derivation paths for keys used by this utxo.
- inputTx
transaction containing the utxo.
- outputIndex
index of the utxo in the inputTx.
- redeemScript
redeem script if known and applicable (when using p2sh-embedded segwit).
- sighashType
sighash type if one should be specified.
- witnessScript
witness script if known and applicable (when using p2wsh).
- Returns:
psbt with the matching input updated.
- Source:
- Psbt.scala
Add details for a segwit output.
Add details for a segwit output.
- Value parameters:
- derivationPaths
derivation paths for keys used by this output.
- outputIndex
index of the output in the psbt.
- redeemScript
redeem script if known and applicable (when using p2sh-embedded segwit).
- witnessScript
witness script if known and applicable (when using p2wsh).
- Returns:
psbt with the matching output updated.
- Source:
- Psbt.scala