Class Protos.Transaction

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Protos.Transaction.Builder
      Protobuf type wallet.Transaction
      static class  Protos.Transaction.Pool
      This is a bitfield oriented enum, with the following bits: bit 0 - spent bit 1 - appears in alt chain bit 2 - appears in best chain bit 3 - double-spent bit 4 - pending (we would like the tx to go into the best chain) Not all combinations are interesting, just the ones actually used in the enum.
      static class  Protos.Transaction.Purpose
      For what purpose the transaction was created.
      • Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageLite

        com.google.protobuf.GeneratedMessageLite.DefaultInstanceBasedParser<T extends com.google.protobuf.GeneratedMessageLite<T,​?>>, com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,​BuilderType>,​BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,​BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,​BuilderType>,​BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,​BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,​BuilderType>,​BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,​BuilderType>>, com.google.protobuf.GeneratedMessageLite.GeneratedExtension<ContainingType extends com.google.protobuf.MessageLite,​Type extends java.lang.Object>, com.google.protobuf.GeneratedMessageLite.MethodToInvoke, com.google.protobuf.GeneratedMessageLite.SerializedForm
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

        com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
    • Method Detail

      • 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.
      • 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.
      • getTransactionInputOrBuilderList

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

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

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

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

        public java.util.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 java.util.List<java.lang.Integer> getBlockRelativityOffsetsList()
        repeated int32 block_relativity_offsets = 11;
        Specified by:
        getBlockRelativityOffsetsList in interface Protos.TransactionOrBuilder
        Returns:
        A list containing the 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.
      • 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.
      • 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.
      • 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 java.lang.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​(java.nio.ByteBuffer data)
                                            throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Protos.Transaction parseFrom​(java.nio.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​(java.io.InputStream input)
                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

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

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

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

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

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

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