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 type
wallet.Transaction-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classProtobuf typewallet.Transactionstatic enumThis 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 enumFor 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 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 -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessageLite
memoizedSerializedSize, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionprotected final ObjectdynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) com.google.protobuf.ByteStringgetBlockHash(int index) A list of blocks in which the transaction has been observed (on any chain).intA list of blocks in which the transaction has been observed (on any chain).List<com.google.protobuf.ByteString>A list of blocks in which the transaction has been observed (on any chain).intgetBlockRelativityOffsets(int index) repeated int32 block_relativity_offsets = 11;intrepeated int32 block_relativity_offsets = 11;repeated int32 block_relativity_offsets = 11;Data describing where the transaction is in the chain.static Protos.TransactionExchange rate that was valid when the transaction was sent.com.google.protobuf.ByteStringgetHash()required bytes hash = 2;intThe nLockTime field is useful for contracts.getMemo()Memo of the transaction.com.google.protobuf.ByteStringMemo of the transaction.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.optional .wallet.Transaction.Purpose purpose = 10 [default = UNKNOWN];getTransactionInput(int index) repeated .wallet.TransactionInput transaction_input = 6;intrepeated .wallet.TransactionInput transaction_input = 6;repeated .wallet.TransactionInput transaction_input = 6;getTransactionInputOrBuilder(int index) repeated .wallet.TransactionInput transaction_input = 6;List<? extends Protos.TransactionInputOrBuilder>repeated .wallet.TransactionInput transaction_input = 6;getTransactionOutput(int index) repeated .wallet.TransactionOutput transaction_output = 7;intrepeated .wallet.TransactionOutput transaction_output = 7;repeated .wallet.TransactionOutput transaction_output = 7;getTransactionOutputOrBuilder(int index) repeated .wallet.TransactionOutput transaction_output = 7;List<? extends Protos.TransactionOutputOrBuilder>repeated .wallet.TransactionOutput transaction_output = 7;longmillis since epoch the transaction was last updatedintSee Wallet.java for detailed description of pool semanticsbooleanData describing where the transaction is in the chain.booleanExchange rate that was valid when the transaction was sent.booleanhasHash()required bytes hash = 2;booleanThe 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.booleanoptional .wallet.Transaction.Purpose purpose = 10 [default = UNKNOWN];booleanmillis since epoch the transaction was last updatedbooleanSee Wallet.java for detailed description of pool semanticsstatic Protos.Transaction.Builderstatic Protos.Transaction.BuildernewBuilder(Protos.Transaction prototype) static Protos.TransactionparseDelimitedFrom(InputStream input) static Protos.TransactionparseDelimitedFrom(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(InputStream input) static Protos.TransactionparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Protos.TransactionparseFrom(ByteBuffer data) static Protos.TransactionparseFrom(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, writeToMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
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:
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
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
repeated .wallet.TransactionInput transaction_input = 6;- Specified by:
getTransactionInputListin interfaceProtos.TransactionOrBuilder
-
getTransactionInputOrBuilderList
repeated .wallet.TransactionInput transaction_input = 6; -
getTransactionInputCount
public int getTransactionInputCount()repeated .wallet.TransactionInput transaction_input = 6;- Specified by:
getTransactionInputCountin interfaceProtos.TransactionOrBuilder
-
getTransactionInput
repeated .wallet.TransactionInput transaction_input = 6;- Specified by:
getTransactionInputin interfaceProtos.TransactionOrBuilder
-
getTransactionInputOrBuilder
repeated .wallet.TransactionInput transaction_input = 6; -
getTransactionOutputList
repeated .wallet.TransactionOutput transaction_output = 7;- Specified by:
getTransactionOutputListin interfaceProtos.TransactionOrBuilder
-
getTransactionOutputOrBuilderList
repeated .wallet.TransactionOutput transaction_output = 7; -
getTransactionOutputCount
public int getTransactionOutputCount()repeated .wallet.TransactionOutput transaction_output = 7;- Specified by:
getTransactionOutputCountin interfaceProtos.TransactionOrBuilder
-
getTransactionOutput
repeated .wallet.TransactionOutput transaction_output = 7;- Specified by:
getTransactionOutputin interfaceProtos.TransactionOrBuilder
-
getTransactionOutputOrBuilder
repeated .wallet.TransactionOutput transaction_output = 7; -
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
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
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
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
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
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(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
- Throws:
IOException
-
parseFrom
public static Protos.Transaction parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- 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
-
newBuilder
-
dynamicMethod
protected final Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) - Specified by:
dynamicMethodin classcom.google.protobuf.GeneratedMessageLite<Protos.Transaction,Protos.Transaction.Builder>
-
getDefaultInstance
-
parser
-