Package org.bitcoinj.wallet
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 typewallet.Transaction
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classProtos.Transaction.BuilderProtobuf typewallet.Transactionstatic classProtos.Transaction.PoolThis 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 classProtos.Transaction.PurposeFor 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
-
-
Field Summary
Fields Modifier and Type Field Description static intBLOCK_HASH_FIELD_NUMBERstatic intBLOCK_RELATIVITY_OFFSETS_FIELD_NUMBERstatic intCONFIDENCE_FIELD_NUMBERstatic intEXCHANGE_RATE_FIELD_NUMBERstatic intHASH_FIELD_NUMBERstatic intLOCK_TIME_FIELD_NUMBERstatic intMEMO_FIELD_NUMBERstatic intPOOL_FIELD_NUMBERstatic intPURPOSE_FIELD_NUMBERstatic intTRANSACTION_INPUT_FIELD_NUMBERstatic intTRANSACTION_OUTPUT_FIELD_NUMBERstatic intUPDATED_AT_FIELD_NUMBERstatic intVERSION_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.ObjectdynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, java.lang.Object arg0, java.lang.Object arg1)com.google.protobuf.ByteStringgetBlockHash(int index)A list of blocks in which the transaction has been observed (on any chain).intgetBlockHashCount()A list of blocks in which the transaction has been observed (on any chain).java.util.List<com.google.protobuf.ByteString>getBlockHashList()A list of blocks in which the transaction has been observed (on any chain).intgetBlockRelativityOffsets(int index)repeated int32 block_relativity_offsets = 11;intgetBlockRelativityOffsetsCount()repeated int32 block_relativity_offsets = 11;java.util.List<java.lang.Integer>getBlockRelativityOffsetsList()repeated int32 block_relativity_offsets = 11;Protos.TransactionConfidencegetConfidence()Data describing where the transaction is in the chain.static Protos.TransactiongetDefaultInstance()Protos.ExchangeRategetExchangeRate()Exchange rate that was valid when the transaction was sent.com.google.protobuf.ByteStringgetHash()required bytes hash = 2;intgetLockTime()The nLockTime field is useful for contracts.java.lang.StringgetMemo()Memo of the transaction.com.google.protobuf.ByteStringgetMemoBytes()Memo of the transaction.Protos.Transaction.PoolgetPool()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.Protos.Transaction.PurposegetPurpose()optional .wallet.Transaction.Purpose purpose = 10 [default = UNKNOWN];Protos.TransactionInputgetTransactionInput(int index)repeated .wallet.TransactionInput transaction_input = 6;intgetTransactionInputCount()repeated .wallet.TransactionInput transaction_input = 6;java.util.List<Protos.TransactionInput>getTransactionInputList()repeated .wallet.TransactionInput transaction_input = 6;Protos.TransactionInputOrBuildergetTransactionInputOrBuilder(int index)repeated .wallet.TransactionInput transaction_input = 6;java.util.List<? extends Protos.TransactionInputOrBuilder>getTransactionInputOrBuilderList()repeated .wallet.TransactionInput transaction_input = 6;Protos.TransactionOutputgetTransactionOutput(int index)repeated .wallet.TransactionOutput transaction_output = 7;intgetTransactionOutputCount()repeated .wallet.TransactionOutput transaction_output = 7;java.util.List<Protos.TransactionOutput>getTransactionOutputList()repeated .wallet.TransactionOutput transaction_output = 7;Protos.TransactionOutputOrBuildergetTransactionOutputOrBuilder(int index)repeated .wallet.TransactionOutput transaction_output = 7;java.util.List<? extends Protos.TransactionOutputOrBuilder>getTransactionOutputOrBuilderList()repeated .wallet.TransactionOutput transaction_output = 7;longgetUpdatedAt()millis since epoch the transaction was last updatedintgetVersion()See Wallet.java for detailed description of pool semanticsbooleanhasConfidence()Data describing where the transaction is in the chain.booleanhasExchangeRate()Exchange rate that was valid when the transaction was sent.booleanhasHash()required bytes hash = 2;booleanhasLockTime()The nLockTime field is useful for contracts.booleanhasMemo()Memo of the transaction.booleanhasPool()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.booleanhasPurpose()optional .wallet.Transaction.Purpose purpose = 10 [default = UNKNOWN];booleanhasUpdatedAt()millis since epoch the transaction was last updatedbooleanhasVersion()See Wallet.java for detailed description of pool semanticsstatic Protos.Transaction.BuildernewBuilder()static Protos.Transaction.BuildernewBuilder(Protos.Transaction prototype)static Protos.TransactionparseDelimitedFrom(java.io.InputStream input)static Protos.TransactionparseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static Protos.TransactionparseFrom(byte[] data)static Protos.TransactionparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static Protos.TransactionparseFrom(com.google.protobuf.ByteString data)static Protos.TransactionparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static Protos.TransactionparseFrom(com.google.protobuf.CodedInputStream input)static Protos.TransactionparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static Protos.TransactionparseFrom(java.io.InputStream input)static Protos.TransactionparseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static Protos.TransactionparseFrom(java.nio.ByteBuffer data)static Protos.TransactionparseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<Protos.Transaction>parser()-
Methods inherited from class com.google.protobuf.GeneratedMessageLite
createBuilder, createBuilder, dynamicMethod, dynamicMethod, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, emptyProtobufList, equals, getDefaultInstanceForType, getParserForType, getSerializedSize, hashCode, isInitialized, isInitialized, makeImmutable, mergeLengthDelimitedField, mergeUnknownFields, mergeVarintField, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBuilderForType, newMessageInfo, newRepeatedGeneratedExtension, newSingularGeneratedExtension, parseDelimitedFrom, parseDelimitedFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parsePartialFrom, parseUnknownField, registerDefaultInstance, toBuilder, toString, writeTo
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
-
-
-
Field Detail
-
VERSION_FIELD_NUMBER
public static final int VERSION_FIELD_NUMBER
- See Also:
- Constant Field Values
-
HASH_FIELD_NUMBER
public static final int HASH_FIELD_NUMBER
- See Also:
- Constant Field Values
-
POOL_FIELD_NUMBER
public static final int POOL_FIELD_NUMBER
- See Also:
- Constant Field Values
-
LOCK_TIME_FIELD_NUMBER
public static final int LOCK_TIME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
UPDATED_AT_FIELD_NUMBER
public static final int UPDATED_AT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
TRANSACTION_INPUT_FIELD_NUMBER
public static final int TRANSACTION_INPUT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
TRANSACTION_OUTPUT_FIELD_NUMBER
public static final int TRANSACTION_OUTPUT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
BLOCK_HASH_FIELD_NUMBER
public static final int BLOCK_HASH_FIELD_NUMBER
- See Also:
- Constant Field Values
-
BLOCK_RELATIVITY_OFFSETS_FIELD_NUMBER
public static final int BLOCK_RELATIVITY_OFFSETS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
CONFIDENCE_FIELD_NUMBER
public static final int CONFIDENCE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PURPOSE_FIELD_NUMBER
public static final int PURPOSE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
EXCHANGE_RATE_FIELD_NUMBER
public static final int EXCHANGE_RATE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
MEMO_FIELD_NUMBER
public static final int MEMO_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
hasVersion
public boolean hasVersion()
See Wallet.java for detailed description of pool semantics
required int32 version = 1;- Specified by:
hasVersionin interfaceProtos.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:
getVersionin interfaceProtos.TransactionOrBuilder- Returns:
- The version.
-
hasHash
public boolean hasHash()
required bytes hash = 2;- Specified by:
hasHashin interfaceProtos.TransactionOrBuilder- Returns:
- Whether the hash field is set.
-
getHash
public com.google.protobuf.ByteString getHash()
required bytes hash = 2;- Specified by:
getHashin interfaceProtos.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:
hasPoolin interfaceProtos.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:
getPoolin interfaceProtos.TransactionOrBuilder- Returns:
- The pool.
-
hasLockTime
public boolean hasLockTime()
The nLockTime field is useful for contracts.
optional uint32 lock_time = 4;- Specified by:
hasLockTimein interfaceProtos.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:
getLockTimein interfaceProtos.TransactionOrBuilder- Returns:
- The lockTime.
-
hasUpdatedAt
public boolean hasUpdatedAt()
millis since epoch the transaction was last updated
optional int64 updated_at = 5;- Specified by:
hasUpdatedAtin interfaceProtos.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:
getUpdatedAtin interfaceProtos.TransactionOrBuilder- Returns:
- The updatedAt.
-
getTransactionInputList
public java.util.List<Protos.TransactionInput> getTransactionInputList()
repeated .wallet.TransactionInput transaction_input = 6;- Specified by:
getTransactionInputListin interfaceProtos.TransactionOrBuilder
-
getTransactionInputOrBuilderList
public java.util.List<? extends Protos.TransactionInputOrBuilder> getTransactionInputOrBuilderList()
repeated .wallet.TransactionInput transaction_input = 6;
-
getTransactionInputCount
public int getTransactionInputCount()
repeated .wallet.TransactionInput transaction_input = 6;- Specified by:
getTransactionInputCountin interfaceProtos.TransactionOrBuilder
-
getTransactionInput
public Protos.TransactionInput getTransactionInput(int index)
repeated .wallet.TransactionInput transaction_input = 6;- Specified by:
getTransactionInputin interfaceProtos.TransactionOrBuilder
-
getTransactionInputOrBuilder
public Protos.TransactionInputOrBuilder getTransactionInputOrBuilder(int index)
repeated .wallet.TransactionInput transaction_input = 6;
-
getTransactionOutputList
public java.util.List<Protos.TransactionOutput> getTransactionOutputList()
repeated .wallet.TransactionOutput transaction_output = 7;- Specified by:
getTransactionOutputListin interfaceProtos.TransactionOrBuilder
-
getTransactionOutputOrBuilderList
public java.util.List<? extends Protos.TransactionOutputOrBuilder> getTransactionOutputOrBuilderList()
repeated .wallet.TransactionOutput transaction_output = 7;
-
getTransactionOutputCount
public int getTransactionOutputCount()
repeated .wallet.TransactionOutput transaction_output = 7;- Specified by:
getTransactionOutputCountin interfaceProtos.TransactionOrBuilder
-
getTransactionOutput
public Protos.TransactionOutput getTransactionOutput(int index)
repeated .wallet.TransactionOutput transaction_output = 7;- Specified by:
getTransactionOutputin interfaceProtos.TransactionOrBuilder
-
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:
getBlockHashListin interfaceProtos.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:
getBlockHashCountin interfaceProtos.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:
getBlockHashin interfaceProtos.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:
getBlockRelativityOffsetsListin interfaceProtos.TransactionOrBuilder- Returns:
- A list containing the blockRelativityOffsets.
-
getBlockRelativityOffsetsCount
public int getBlockRelativityOffsetsCount()
repeated int32 block_relativity_offsets = 11;- Specified by:
getBlockRelativityOffsetsCountin interfaceProtos.TransactionOrBuilder- Returns:
- The count of blockRelativityOffsets.
-
getBlockRelativityOffsets
public int getBlockRelativityOffsets(int index)
repeated int32 block_relativity_offsets = 11;- Specified by:
getBlockRelativityOffsetsin interfaceProtos.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:
hasConfidencein interfaceProtos.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:
getConfidencein interfaceProtos.TransactionOrBuilder- Returns:
- The confidence.
-
hasPurpose
public boolean hasPurpose()
optional .wallet.Transaction.Purpose purpose = 10 [default = UNKNOWN];- Specified by:
hasPurposein interfaceProtos.TransactionOrBuilder- Returns:
- Whether the purpose field is set.
-
getPurpose
public Protos.Transaction.Purpose getPurpose()
optional .wallet.Transaction.Purpose purpose = 10 [default = UNKNOWN];- Specified by:
getPurposein interfaceProtos.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:
hasExchangeRatein interfaceProtos.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:
getExchangeRatein interfaceProtos.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:
hasMemoin interfaceProtos.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:
getMemoin interfaceProtos.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:
getMemoBytesin interfaceProtos.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
-
newBuilder
public static Protos.Transaction.Builder newBuilder()
-
newBuilder
public static Protos.Transaction.Builder newBuilder(Protos.Transaction prototype)
-
dynamicMethod
protected final java.lang.Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, java.lang.Object arg0, java.lang.Object arg1)- Specified by:
dynamicMethodin classcom.google.protobuf.GeneratedMessageLite<Protos.Transaction,Protos.Transaction.Builder>
-
getDefaultInstance
public static Protos.Transaction getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<Protos.Transaction> parser()
-
-