Class Protos.Transaction

java.lang.Object
com.google.protobuf.AbstractMessageLite<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite<Protos.Transaction,Protos.Transaction.Builder>
org.bitcoinj.wallet.Protos.Transaction
All Implemented Interfaces:
com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, Protos.TransactionOrBuilder
Enclosing class:
Protos

public static final class Protos.Transaction extends com.google.protobuf.GeneratedMessageLite<Protos.Transaction,Protos.Transaction.Builder> implements Protos.TransactionOrBuilder
Protobuf type wallet.Transaction
  • Field Details

    • VERSION_FIELD_NUMBER

      public static final int VERSION_FIELD_NUMBER
      See Also:
    • HASH_FIELD_NUMBER

      public static final int HASH_FIELD_NUMBER
      See Also:
    • POOL_FIELD_NUMBER

      public static final int POOL_FIELD_NUMBER
      See Also:
    • LOCK_TIME_FIELD_NUMBER

      public static final int LOCK_TIME_FIELD_NUMBER
      See Also:
    • UPDATED_AT_FIELD_NUMBER

      public static final int UPDATED_AT_FIELD_NUMBER
      See Also:
    • TRANSACTION_INPUT_FIELD_NUMBER

      public static final int TRANSACTION_INPUT_FIELD_NUMBER
      See Also:
    • TRANSACTION_OUTPUT_FIELD_NUMBER

      public static final int TRANSACTION_OUTPUT_FIELD_NUMBER
      See Also:
    • BLOCK_HASH_FIELD_NUMBER

      public static final int BLOCK_HASH_FIELD_NUMBER
      See Also:
    • BLOCK_RELATIVITY_OFFSETS_FIELD_NUMBER

      public static final int BLOCK_RELATIVITY_OFFSETS_FIELD_NUMBER
      See Also:
    • CONFIDENCE_FIELD_NUMBER

      public static final int CONFIDENCE_FIELD_NUMBER
      See Also:
    • PURPOSE_FIELD_NUMBER

      public static final int PURPOSE_FIELD_NUMBER
      See Also:
    • EXCHANGE_RATE_FIELD_NUMBER

      public static final int EXCHANGE_RATE_FIELD_NUMBER
      See Also:
    • MEMO_FIELD_NUMBER

      public static final int MEMO_FIELD_NUMBER
      See Also:
  • Method Details

    • hasVersion

      public boolean hasVersion()
       See Wallet.java for detailed description of pool semantics
       
      required int32 version = 1;
      Specified by:
      hasVersion in interface Protos.TransactionOrBuilder
      Returns:
      Whether the version field is set.
    • getVersion

      public int getVersion()
       See Wallet.java for detailed description of pool semantics
       
      required int32 version = 1;
      Specified by:
      getVersion in interface Protos.TransactionOrBuilder
      Returns:
      The version.
    • hasHash

      public boolean hasHash()
      required bytes hash = 2;
      Specified by:
      hasHash in interface Protos.TransactionOrBuilder
      Returns:
      Whether the hash field is set.
    • getHash

      public com.google.protobuf.ByteString getHash()
      required bytes hash = 2;
      Specified by:
      getHash in interface Protos.TransactionOrBuilder
      Returns:
      The hash.
    • hasPool

      public boolean hasPool()
       If pool is not present, that means either:
        - This Transaction is either not in a wallet at all (the proto is re-used elsewhere)
        - Or it is stored but for other purposes, for example, because it is the overriding transaction of a double spend.
        - Or the Pool enum got a new value which your software is too old to parse.
       
      optional .wallet.Transaction.Pool pool = 3;
      Specified by:
      hasPool in interface Protos.TransactionOrBuilder
      Returns:
      Whether the pool field is set.
    • getPool

      public Protos.Transaction.Pool getPool()
       If pool is not present, that means either:
        - This Transaction is either not in a wallet at all (the proto is re-used elsewhere)
        - Or it is stored but for other purposes, for example, because it is the overriding transaction of a double spend.
        - Or the Pool enum got a new value which your software is too old to parse.
       
      optional .wallet.Transaction.Pool pool = 3;
      Specified by:
      getPool in interface Protos.TransactionOrBuilder
      Returns:
      The pool.
    • hasLockTime

      public boolean hasLockTime()
       The nLockTime field is useful for contracts.
       
      optional uint32 lock_time = 4;
      Specified by:
      hasLockTime in interface Protos.TransactionOrBuilder
      Returns:
      Whether the lockTime field is set.
    • getLockTime

      public int getLockTime()
       The nLockTime field is useful for contracts.
       
      optional uint32 lock_time = 4;
      Specified by:
      getLockTime in interface Protos.TransactionOrBuilder
      Returns:
      The lockTime.
    • hasUpdatedAt

      public boolean hasUpdatedAt()
       millis since epoch the transaction was last updated
       
      optional int64 updated_at = 5;
      Specified by:
      hasUpdatedAt in interface Protos.TransactionOrBuilder
      Returns:
      Whether the updatedAt field is set.
    • getUpdatedAt

      public long getUpdatedAt()
       millis since epoch the transaction was last updated
       
      optional int64 updated_at = 5;
      Specified by:
      getUpdatedAt in interface Protos.TransactionOrBuilder
      Returns:
      The updatedAt.
    • getTransactionInputList

      public List<Protos.TransactionInput> getTransactionInputList()
      repeated .wallet.TransactionInput transaction_input = 6;
      Specified by:
      getTransactionInputList in interface Protos.TransactionOrBuilder
    • getTransactionInputOrBuilderList

      public List<? extends Protos.TransactionInputOrBuilder> getTransactionInputOrBuilderList()
      repeated .wallet.TransactionInput transaction_input = 6;
    • getTransactionInputCount

      public int getTransactionInputCount()
      repeated .wallet.TransactionInput transaction_input = 6;
      Specified by:
      getTransactionInputCount in interface Protos.TransactionOrBuilder
    • getTransactionInput

      public Protos.TransactionInput getTransactionInput(int index)
      repeated .wallet.TransactionInput transaction_input = 6;
      Specified by:
      getTransactionInput in interface Protos.TransactionOrBuilder
    • getTransactionInputOrBuilder

      public Protos.TransactionInputOrBuilder getTransactionInputOrBuilder(int index)
      repeated .wallet.TransactionInput transaction_input = 6;
    • getTransactionOutputList

      public List<Protos.TransactionOutput> getTransactionOutputList()
      repeated .wallet.TransactionOutput transaction_output = 7;
      Specified by:
      getTransactionOutputList in interface Protos.TransactionOrBuilder
    • getTransactionOutputOrBuilderList

      public List<? extends Protos.TransactionOutputOrBuilder> getTransactionOutputOrBuilderList()
      repeated .wallet.TransactionOutput transaction_output = 7;
    • getTransactionOutputCount

      public int getTransactionOutputCount()
      repeated .wallet.TransactionOutput transaction_output = 7;
      Specified by:
      getTransactionOutputCount in interface Protos.TransactionOrBuilder
    • getTransactionOutput

      public Protos.TransactionOutput getTransactionOutput(int index)
      repeated .wallet.TransactionOutput transaction_output = 7;
      Specified by:
      getTransactionOutput in interface Protos.TransactionOrBuilder
    • getTransactionOutputOrBuilder

      public Protos.TransactionOutputOrBuilder getTransactionOutputOrBuilder(int index)
      repeated .wallet.TransactionOutput transaction_output = 7;
    • getBlockHashList

      public List<com.google.protobuf.ByteString> getBlockHashList()
       A list of blocks in which the transaction has been observed (on any chain). Also, a number used to disambiguate
       ordering within a block.
       
      repeated bytes block_hash = 8;
      Specified by:
      getBlockHashList in interface Protos.TransactionOrBuilder
      Returns:
      A list containing the blockHash.
    • getBlockHashCount

      public int getBlockHashCount()
       A list of blocks in which the transaction has been observed (on any chain). Also, a number used to disambiguate
       ordering within a block.
       
      repeated bytes block_hash = 8;
      Specified by:
      getBlockHashCount in interface Protos.TransactionOrBuilder
      Returns:
      The count of blockHash.
    • getBlockHash

      public com.google.protobuf.ByteString getBlockHash(int index)
       A list of blocks in which the transaction has been observed (on any chain). Also, a number used to disambiguate
       ordering within a block.
       
      repeated bytes block_hash = 8;
      Specified by:
      getBlockHash in interface Protos.TransactionOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The blockHash at the given index.
    • getBlockRelativityOffsetsList

      public List<Integer> getBlockRelativityOffsetsList()
      repeated int32 block_relativity_offsets = 11;
      Specified by:
      getBlockRelativityOffsetsList in interface Protos.TransactionOrBuilder
      Returns:
      A list containing the blockRelativityOffsets.
    • getBlockRelativityOffsetsCount

      public int getBlockRelativityOffsetsCount()
      repeated int32 block_relativity_offsets = 11;
      Specified by:
      getBlockRelativityOffsetsCount in interface Protos.TransactionOrBuilder
      Returns:
      The count of blockRelativityOffsets.
    • getBlockRelativityOffsets

      public int getBlockRelativityOffsets(int index)
      repeated int32 block_relativity_offsets = 11;
      Specified by:
      getBlockRelativityOffsets in interface Protos.TransactionOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The blockRelativityOffsets at the given index.
    • hasConfidence

      public boolean hasConfidence()
       Data describing where the transaction is in the chain.
       
      optional .wallet.TransactionConfidence confidence = 9;
      Specified by:
      hasConfidence in interface Protos.TransactionOrBuilder
      Returns:
      Whether the confidence field is set.
    • getConfidence

      public Protos.TransactionConfidence getConfidence()
       Data describing where the transaction is in the chain.
       
      optional .wallet.TransactionConfidence confidence = 9;
      Specified by:
      getConfidence in interface Protos.TransactionOrBuilder
      Returns:
      The confidence.
    • hasPurpose

      public boolean hasPurpose()
      optional .wallet.Transaction.Purpose purpose = 10 [default = UNKNOWN];
      Specified by:
      hasPurpose in interface Protos.TransactionOrBuilder
      Returns:
      Whether the purpose field is set.
    • getPurpose

      public Protos.Transaction.Purpose getPurpose()
      optional .wallet.Transaction.Purpose purpose = 10 [default = UNKNOWN];
      Specified by:
      getPurpose in interface Protos.TransactionOrBuilder
      Returns:
      The purpose.
    • hasExchangeRate

      public boolean hasExchangeRate()
       Exchange rate that was valid when the transaction was sent.
       
      optional .wallet.ExchangeRate exchange_rate = 12;
      Specified by:
      hasExchangeRate in interface Protos.TransactionOrBuilder
      Returns:
      Whether the exchangeRate field is set.
    • getExchangeRate

      public Protos.ExchangeRate getExchangeRate()
       Exchange rate that was valid when the transaction was sent.
       
      optional .wallet.ExchangeRate exchange_rate = 12;
      Specified by:
      getExchangeRate in interface Protos.TransactionOrBuilder
      Returns:
      The exchangeRate.
    • hasMemo

      public boolean hasMemo()
       Memo of the transaction. It can be used to record the memo of the payment request that initiated the
       transaction.
       
      optional string memo = 13;
      Specified by:
      hasMemo in interface Protos.TransactionOrBuilder
      Returns:
      Whether the memo field is set.
    • getMemo

      public String getMemo()
       Memo of the transaction. It can be used to record the memo of the payment request that initiated the
       transaction.
       
      optional string memo = 13;
      Specified by:
      getMemo in interface Protos.TransactionOrBuilder
      Returns:
      The memo.
    • getMemoBytes

      public com.google.protobuf.ByteString getMemoBytes()
       Memo of the transaction. It can be used to record the memo of the payment request that initiated the
       transaction.
       
      optional string memo = 13;
      Specified by:
      getMemoBytes in interface Protos.TransactionOrBuilder
      Returns:
      The bytes for memo.
    • parseFrom

      public static Protos.Transaction parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Protos.Transaction parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Protos.Transaction parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Protos.Transaction parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Protos.Transaction parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Protos.Transaction parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Protos.Transaction parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Protos.Transaction parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Protos.Transaction parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Protos.Transaction parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Protos.Transaction parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Protos.Transaction parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilder

      public static Protos.Transaction.Builder newBuilder()
    • newBuilder

      public static Protos.Transaction.Builder newBuilder(Protos.Transaction prototype)
    • dynamicMethod

      protected final Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)
      Specified by:
      dynamicMethod in class com.google.protobuf.GeneratedMessageLite<Protos.Transaction,Protos.Transaction.Builder>
    • getDefaultInstance

      public static Protos.Transaction getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<Protos.Transaction> parser()