Enum Transaction.Purpose

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Transaction.Purpose>
    Enclosing class:
    Transaction

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

      Enum Constants 
      Enum Constant Description
      ASSURANCE_CONTRACT_CLAIM
      Transaction that uses up pledges to an assurance contract
      ASSURANCE_CONTRACT_PLEDGE
      Transaction that makes a pledge to an assurance contract.
      ASSURANCE_CONTRACT_STUB
      Send-to-self transaction that exists just to create an output of the right size we can pledge.
      KEY_ROTATION
      Transaction automatically created and broadcast in order to reallocate money from old to new keys.
      RAISE_FEE
      Raise fee, e.g.
      UNKNOWN
      Used when the purpose of a transaction is genuinely unknown.
      USER_PAYMENT
      Transaction created to satisfy a user payment request.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Transaction.Purpose valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Transaction.Purpose[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • 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 Detail

      • values

        public static Transaction.Purpose[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Transaction.Purpose c : Transaction.Purpose.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Transaction.Purpose valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null