package builder

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Type Members

  1. case class AddFutureFeeFinalizer(spk: ScriptPubKey, futureFee: CurrencyUnit, changeSPKs: Vector[ScriptPubKey]) extends RawTxFinalizer with Product with Serializable

    Adds a an amount to the output with the given ScriptPubKey and subtracts that amount in equal proportions from the specified change ScriptPubKeys.

    Adds a an amount to the output with the given ScriptPubKey and subtracts that amount in equal proportions from the specified change ScriptPubKeys.

    This can be useful when you want to account for a future spending fee in this transaction to get nice output values on the spending tx.

  2. case class AddWitnessDataFinalizer(inputInfos: Vector[InputInfo]) extends RawTxFinalizer with Product with Serializable

    A finalizer which adds only the witness data included in the wtxid (pubkey in P2WPKH and redeem script in p2sh).

    A finalizer which adds only the witness data included in the wtxid (pubkey in P2WPKH and redeem script in p2sh).

    Note that when used in composition with other finalizers, if AddWitnessDataFinalizer is not last then its effects will be reversed since witness data is not currently kept between finalizers during composition.

  3. case class ChangeFinalizer(inputInfos: Vector[InputInfo], feeRate: FeeUnit, changeSPK: ScriptPubKey) extends RawTxFinalizer with Product with Serializable

    A finalizer which performs fee estimation and adds a change output resulting in the expected fee.

  4. case class DualFundingInput(scriptSignature: ScriptSignature, maxWitnessLen: Int) extends Product with Serializable
  5. case class DualFundingTxFinalizer(offerInputs: Vector[DualFundingInput], offerPayoutSPK: ScriptPubKey, offerChangeSPK: ScriptPubKey, acceptInputs: Vector[DualFundingInput], acceptPayoutSPK: ScriptPubKey, acceptChangeSPK: ScriptPubKey, feeRate: SatoshisPerVirtualByte, fundingSPK: ScriptPubKey) extends RawTxFinalizer with Product with Serializable

    Finalizes a dual-funded transaction given the DualFundingInputs from both parties, their change spks and the funding scriptpubkey for the dual funded protocol.

    Finalizes a dual-funded transaction given the DualFundingInputs from both parties, their change spks and the funding scriptpubkey for the dual funded protocol.

    This includes adding the future fee of spending transactions to the funding output as well as subtracting relevant fees from the change outputs. This finalizer filters dust outputs.

  6. case class FinalizedTxWithSigningInfo(finalizedTx: Transaction, infos: Vector[ScriptSignatureParams[InputInfo]]) extends Product with Serializable

    Contains a finalized tx (output from RawTxFinalizer.buildTx) and the ScriptSignatureParams needed to sign that transaction.

  7. abstract class FinalizerFactory[T <: RawTxFinalizer] extends AnyRef
  8. case class FundRawTxHelper[T <: RawTxFinalizer](txBuilderWithFinalizer: RawTxBuilderWithFinalizer[T], scriptSigParams: Vector[ScriptSignatureParams[InputInfo]], feeRate: FeeUnit, reservedUTXOsCallbackF: Future[Unit]) extends Product with Serializable
  9. case class RawTxBuilder() extends Product with Serializable

    The mutable transaction builder which collects:

    The mutable transaction builder which collects:

    • Unsigned inputs (script signature will be ignored)
    • Destination outputs (change is dealt with in the finalizer)
    • A version number (default is TransactionConstants.validLockVersion)
    • A lock time (default is TransactionConstants.lockTime)

    At a high level, RawTxBuilder is responsible only for the funding inputs and logical outputs (outputs that are intended by this transaction, and not outputs computed from the logical outputs such as change outputs, which are the responsibility of the RawTxFinalizer) of a transaction.

    RawTxBuilder supports inline calls to += and ++= for adding inputs and outputs. Note that RawTxBuilder respects the order in which inputs and outputs are added when generating a RawTxBuilderResult. If you wish to have some other (computed) order, this is the responsibility of either the calling code (to add in the correct order) or of the RawTxFinalizer which may alter the order of inputs and outputs (and should only do so if it is clearly documented that this will occur, otherwise it is safe to assume that RawTxFinalizers will not alter the order of inputs and outputs).

    Once a transaction is done being built and is ready to be passed to a RawTransactionFinalizer, call the result method to receive a RawTxBuilderResult which can be passed into RawTxFinalizer.buildTx.

    If you have access to a finalizer before you are ready to call result, you may call the setFinalizer method to receive an instance of type RawTxBuilderWithFinalizer which is described below, and where you may continue to build and then call buildTx directly.

    Note: RawTxBuilder is not thread safe.

  10. case class RawTxBuilderResult(version: Int32, inputs: Vector[TransactionInput], outputs: Vector[TransactionOutput], lockTime: UInt32) extends Product with Serializable

    Raw Transaction to be finalized by a RawTxFinalizer

  11. case class RawTxBuilderWithFinalizer[F <: RawTxFinalizer](builder: RawTxBuilder, finalizer: F) extends Product with Serializable

    Wraps a RawTxBuilder and RawTxFinalizer pair.

    Wraps a RawTxBuilder and RawTxFinalizer pair.

    Provides access to builder methods for continuing to collect inputs and outputs and also offers direct access to the RawTxFinalizer's buildTx method which completes the RawTxBuilder and then finalized the result.

  12. trait RawTxFinalizer extends AnyRef

    This trait is responsible for converting RawTxBuilderResults into finalized (unsigned) transactions.

    This trait is responsible for converting RawTxBuilderResults into finalized (unsigned) transactions. This process usually includes such things as computation on inputs and outputs to generate things like change outputs, or to reorder inputs or outputs.

    Once a transaction is done being finalized, its txid/wtxid should not change as the RawTxSigner's only responsibility is adding signature data not included in the txid/wtxid.

    RawTxFinalizer may (but is not required to) generate witness data other than signatures (i.e. public keys for P2WPKH and redeem scripts for P2WSH). RawTxFinalizer may not otherwise populate any other kind of script signature or witness data.

    RawTxFinalizers are compose-able through the andThen method which will turn the first RawTxFinalizer's finalized transaction into a RawTxBuilderResult by taking that transactions inputs (in order), outputs (in order), locktime and version and this RawTxBuilderResult is then given to the second RawTxFinalizer.

  13. case class SanityCheckFinalizer(inputInfos: Vector[InputInfo], expectedOutputSPKs: Vector[ScriptPubKey], expectedFeeRate: FeeUnit, changeSPKs: Vector[ScriptPubKey] = Vector.empty) extends RawTxFinalizer with Product with Serializable

    A finalizer who's Future fails if its sanity checks are not passed, otherwise it does nothing.

  14. case class ShufflingNonInteractiveFinalizer(inputInfos: Vector[InputInfo], feeRate: FeeUnit, changeSPK: ScriptPubKey) extends RawTxFinalizer with Product with Serializable

    A finalizer which adds a change output, performs sanity checks, shuffles inputs and outputs, and adds non-signature witness data.

    A finalizer which adds a change output, performs sanity checks, shuffles inputs and outputs, and adds non-signature witness data. This is the standard non-interactive finalizer within the Bitcoin-S wallet.

  15. case class StandardNonInteractiveFinalizer(inputInfos: Vector[InputInfo], feeRate: FeeUnit, changeSPK: ScriptPubKey) extends RawTxFinalizer with Product with Serializable

    A finalizer which adds a change output, performs sanity checks, and adds non-signature witness data.

    A finalizer which adds a change output, performs sanity checks, and adds non-signature witness data. This is the standard non-interactive finalizer within the Bitcoin-S wallet.

  16. case class SubtractFeeFromOutputsFinalizer(inputInfos: Vector[InputInfo], feeRate: FeeUnit, spks: Vector[ScriptPubKey]) extends RawTxFinalizer with Product with Serializable

    Assumes the input transaction has had no fee considerations and subtracts the estimated fee in equal portions from the outputs with the specified ScriptPubKeys

  17. case class SubtractFromOutputFinalizer(spk: ScriptPubKey, subAmt: CurrencyUnit) extends RawTxFinalizer with Product with Serializable

    Subtracts the given fee from the output with the given ScriptPubKey.

    Subtracts the given fee from the output with the given ScriptPubKey. This can be useful if you are constructing a transaction without considering fees and have some after-the-fact external formula for computing fees and they need the removed.

  18. sealed abstract class TxBuilderError extends AnyRef

    Represents an error that can be returned by the TxBuilder if it failed to sign a set of utxos

Value Members

  1. case object BIP69Finalizer extends RawTxFinalizer with Product with Serializable
  2. case object FilterDustFinalizer extends RawTxFinalizer with Product with Serializable

    A simple finalizer that only removes outputs beneath the dust threshold and does nothing else

  3. case object RawFinalizer extends RawTxFinalizer with Product with Serializable

    A trivial finalizer that does no processing

  4. object RawFinalizerFactory extends FinalizerFactory[RawFinalizer.type]
  5. object RawTxBuilderResult extends Serializable
  6. object RawTxBuilderWithFinalizer extends Serializable
  7. object RawTxSigner

    Transactions that have been finalized by a RawTxFinalizer are passed as inputs to a sign function here in order to generate fully signed transactions.

    Transactions that have been finalized by a RawTxFinalizer are passed as inputs to a sign function here in order to generate fully signed transactions.

    In the future sign methods specific to multi-party protocols will be added here to support PSBT and signed transaction construction between multiple parties.

  8. object SanityCheckFinalizer extends Serializable
  9. case object ShuffleFinalizer extends RawTxFinalizer with Product with Serializable

    Shuffles in the inputs and outputs of the Transaction into a random order

  10. case object ShuffleInputsFinalizer extends RawTxFinalizer with Product with Serializable

    Shuffles in the inputs of the Transaction into a random order

  11. case object ShuffleOutputsFinalizer extends RawTxFinalizer with Product with Serializable

    Shuffles in the outputs of the Transaction into a random order

  12. object ShufflingNonInteractiveFinalizer extends FinalizerFactory[ShufflingNonInteractiveFinalizer] with Serializable
  13. object StandardNonInteractiveFinalizer extends FinalizerFactory[StandardNonInteractiveFinalizer] with Serializable
  14. object SubtractFeeFromOutputsFinalizer extends Serializable
  15. object TxBuilderError

Ungrouped