Interface TransactionInputData

All Known Implementing Classes:
TransactionInputDataUtxo

public interface TransactionInputData
Immutable data for a transaction input. See also RawTransactionSigningRequest.RawInput which can hold an incomplete transaction input, like those sent in the signtransactionwithwallet JSON-RPC request.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bitcoinj.base.Coin
     
    fromTxInput(org.bitcoinj.core.TransactionInput input)
    Create an unsigned transaction input from a bitcoinj (unsigned) TransactionInput.
    fromTxOut(org.bitcoinj.core.TransactionOutput out)
    Create an unsigned transaction input from an unspent transaction output that the signer can redeem
    Create from a UTXO that paid to a script the intended signer can redeem
    of(Utxo.Signable utxo, org.bitcoinj.base.Address address)
    Create from a UTXO that paid to an address the intended signer can redeem
    org.bitcoinj.script.Script
    prevOut ScriptPubKey
    org.bitcoinj.core.TransactionOutPoint
    This probably shouldn't be here but is needed for proper operation with bitcoinj
     
  • Method Details

    • amount

      org.bitcoinj.base.Coin amount()
    • script

      org.bitcoinj.script.Script script()
      prevOut ScriptPubKey
    • toOutPoint

      org.bitcoinj.core.TransactionOutPoint toOutPoint()
      This probably shouldn't be here but is needed for proper operation with bitcoinj
      Returns:
      A Transaction "outpoint" pointing to the utxo this input will spend.
    • toUtxo

    • of

      static TransactionInputData of(Utxo.Signable utxo, org.bitcoinj.base.Address address)
      Create from a UTXO that paid to an address the intended signer can redeem
    • of

      Create from a UTXO that paid to a script the intended signer can redeem
      Parameters:
      utxo - Complete UTXO info
      Returns:
      input ready for signing
    • fromTxOut

      static TransactionInputData fromTxOut(org.bitcoinj.core.TransactionOutput out)
      Create an unsigned transaction input from an unspent transaction output that the signer can redeem
      Parameters:
      out - An unspent transaction output
      Returns:
      transaction input data
    • fromTxInput

      static TransactionInputData fromTxInput(org.bitcoinj.core.TransactionInput input)
      Create an unsigned transaction input from a bitcoinj (unsigned) TransactionInput.
      Parameters:
      input - A transaction input (typically/currently unsigned)
      Returns:
      transaction input data