Enum Class Transaction.Purpose

java.lang.Object
java.lang.Enum<Transaction.Purpose>
org.bitcoinj.core.Transaction.Purpose
All Implemented Interfaces:
Serializable, Comparable<Transaction.Purpose>, Constable
Enclosing class:
Transaction

public static enum Transaction.Purpose extends Enum<Transaction.Purpose>
This enum describes the underlying reason the transaction was created. It's useful for rendering wallet GUIs more appropriately.
  • Enum Constant Details

    • UNKNOWN

      public static final Transaction.Purpose UNKNOWN
      Used when the purpose of a transaction is genuinely unknown.
    • USER_PAYMENT

      public static final Transaction.Purpose USER_PAYMENT
      Transaction created to satisfy a user payment request.
    • KEY_ROTATION

      public static final Transaction.Purpose KEY_ROTATION
      Transaction automatically created and broadcast in order to reallocate money from old to new keys.
    • ASSURANCE_CONTRACT_CLAIM

      public static final Transaction.Purpose ASSURANCE_CONTRACT_CLAIM
      Transaction that uses up pledges to an assurance contract
    • ASSURANCE_CONTRACT_PLEDGE

      public static final Transaction.Purpose ASSURANCE_CONTRACT_PLEDGE
      Transaction that makes a pledge to an assurance contract.
    • ASSURANCE_CONTRACT_STUB

      public static final Transaction.Purpose ASSURANCE_CONTRACT_STUB
      Send-to-self transaction that exists just to create an output of the right size we can pledge.
    • RAISE_FEE

      public static final Transaction.Purpose RAISE_FEE
      Raise fee, e.g. child-pays-for-parent.
  • Method Details

    • values

      public static Transaction.Purpose[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Transaction.Purpose valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null