Class CryptoJDK.Transaction.Bitcoin

java.lang.Object
com.barbantfintech.tools.common.cryptojdk.CryptoJDK.Transaction.Bitcoin
Enclosing class:
CryptoJDK.Transaction

public static class CryptoJDK.Transaction.Bitcoin extends Object
Utility class for creating signed transactions for the Bitcoin blockchain. Provides methods to prepare transactions using specific inputs and outputs, ensuring they are correctly signed before broadcasting.
  • Constructor Details

    • Bitcoin

      public Bitcoin()
  • Method Details

    • generate

      public static String generate(@NonNull Coin coin, @NonNull @NonNull Network network, @NonNull UTXO[] utxos, @NonNull @NonNull TxReceiver[] txReceivers) throws CryptoJDKException
      Prepares a signed transaction ready for broadcasting on the Bitcoin network.
      Parameters:
      coin - The type of coin to be sent (e.g., BTC, BCH).
      network - The Bitcoin network on which the transaction will be broadcast (e.g., Mainnet, Testnet).
      utxos - Array of unspent transaction outputs (inputs) that will fund this transaction.
      txReceivers - Array of receiver objects specifying the outputs of the transaction.
      Returns:
      A string representing the signed transaction ready to be broadcast.
      Throws:
      CryptoJDKException - if an error occurs during the signing process.