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
Modifier and TypeClassDescriptionstatic final class
Protobuf typewallet.Transaction
static enum
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 enum
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 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
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
Fields inherited from class com.google.protobuf.GeneratedMessageLite
memoizedSerializedSize, unknownFields
Fields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode
-
Method Summary
Modifier and TypeMethodDescriptionprotected final Object
dynamicMethod
(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) com.google.protobuf.ByteString
getBlockHash
(int index) A list of blocks in which the transaction has been observed (on any chain).int
A 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).int
getBlockRelativityOffsets
(int index) repeated int32 block_relativity_offsets = 11;
int
repeated int32 block_relativity_offsets = 11;
repeated int32 block_relativity_offsets = 11;
Data describing where the transaction is in the chain.static Protos.Transaction
Exchange rate that was valid when the transaction was sent.com.google.protobuf.ByteString
getHash()
required bytes hash = 2;
int
The nLockTime field is useful for contracts.getMemo()
Memo of the transaction.com.google.protobuf.ByteString
Memo 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;
int
repeated .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;
int
repeated .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;
long
millis since epoch the transaction was last updatedint
See Wallet.java for detailed description of pool semanticsboolean
Data describing where the transaction is in the chain.boolean
Exchange rate that was valid when the transaction was sent.boolean
hasHash()
required bytes hash = 2;
boolean
The nLockTime field is useful for contracts.boolean
hasMemo()
Memo of the transaction.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.boolean
optional .wallet.Transaction.Purpose purpose = 10 [default = UNKNOWN];
boolean
millis since epoch the transaction was last updatedboolean
See Wallet.java for detailed description of pool semanticsstatic Protos.Transaction.Builder
static Protos.Transaction.Builder
newBuilder
(Protos.Transaction prototype) static Protos.Transaction
parseDelimitedFrom
(InputStream input) static Protos.Transaction
parseDelimitedFrom
(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Protos.Transaction
parseFrom
(byte[] data) static Protos.Transaction
parseFrom
(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Protos.Transaction
parseFrom
(com.google.protobuf.ByteString data) static Protos.Transaction
parseFrom
(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Protos.Transaction
parseFrom
(com.google.protobuf.CodedInputStream input) static Protos.Transaction
parseFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Protos.Transaction
parseFrom
(InputStream input) static Protos.Transaction
parseFrom
(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Protos.Transaction
parseFrom
(ByteBuffer data) static Protos.Transaction
parseFrom
(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
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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:
hasVersion
in 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:
getVersion
in interfaceProtos.TransactionOrBuilder
- Returns:
- The version.
-
hasHash
public boolean hasHash()required bytes hash = 2;
- Specified by:
hasHash
in interfaceProtos.TransactionOrBuilder
- Returns:
- Whether the hash field is set.
-
getHash
public com.google.protobuf.ByteString getHash()required bytes hash = 2;
- Specified by:
getHash
in 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:
hasPool
in 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:
getPool
in interfaceProtos.TransactionOrBuilder
- Returns:
- The pool.
-
hasLockTime
public boolean hasLockTime()The nLockTime field is useful for contracts.
optional uint32 lock_time = 4;
- Specified by:
hasLockTime
in 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:
getLockTime
in interfaceProtos.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 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:
getUpdatedAt
in interfaceProtos.TransactionOrBuilder
- Returns:
- The updatedAt.
-
getTransactionInputList
repeated .wallet.TransactionInput transaction_input = 6;
- Specified by:
getTransactionInputList
in interfaceProtos.TransactionOrBuilder
-
getTransactionInputOrBuilderList
repeated .wallet.TransactionInput transaction_input = 6;
-
getTransactionInputCount
public int getTransactionInputCount()repeated .wallet.TransactionInput transaction_input = 6;
- Specified by:
getTransactionInputCount
in interfaceProtos.TransactionOrBuilder
-
getTransactionInput
repeated .wallet.TransactionInput transaction_input = 6;
- Specified by:
getTransactionInput
in interfaceProtos.TransactionOrBuilder
-
getTransactionInputOrBuilder
repeated .wallet.TransactionInput transaction_input = 6;
-
getTransactionOutputList
repeated .wallet.TransactionOutput transaction_output = 7;
- Specified by:
getTransactionOutputList
in interfaceProtos.TransactionOrBuilder
-
getTransactionOutputOrBuilderList
repeated .wallet.TransactionOutput transaction_output = 7;
-
getTransactionOutputCount
public int getTransactionOutputCount()repeated .wallet.TransactionOutput transaction_output = 7;
- Specified by:
getTransactionOutputCount
in interfaceProtos.TransactionOrBuilder
-
getTransactionOutput
repeated .wallet.TransactionOutput transaction_output = 7;
- Specified by:
getTransactionOutput
in 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:
getBlockHashList
in 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:
getBlockHashCount
in 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:
getBlockHash
in 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:
getBlockRelativityOffsetsList
in interfaceProtos.TransactionOrBuilder
- Returns:
- A list containing the blockRelativityOffsets.
-
getBlockRelativityOffsetsCount
public int getBlockRelativityOffsetsCount()repeated int32 block_relativity_offsets = 11;
- Specified by:
getBlockRelativityOffsetsCount
in interfaceProtos.TransactionOrBuilder
- Returns:
- The count of blockRelativityOffsets.
-
getBlockRelativityOffsets
public int getBlockRelativityOffsets(int index) repeated int32 block_relativity_offsets = 11;
- Specified by:
getBlockRelativityOffsets
in 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:
hasConfidence
in 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:
getConfidence
in interfaceProtos.TransactionOrBuilder
- Returns:
- The confidence.
-
hasPurpose
public boolean hasPurpose()optional .wallet.Transaction.Purpose purpose = 10 [default = UNKNOWN];
- Specified by:
hasPurpose
in interfaceProtos.TransactionOrBuilder
- Returns:
- Whether the purpose field is set.
-
getPurpose
optional .wallet.Transaction.Purpose purpose = 10 [default = UNKNOWN];
- Specified by:
getPurpose
in 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:
hasExchangeRate
in 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:
getExchangeRate
in 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:
hasMemo
in 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:
getMemo
in 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:
getMemoBytes
in 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:
dynamicMethod
in classcom.google.protobuf.GeneratedMessageLite<Protos.Transaction,
Protos.Transaction.Builder>
-
getDefaultInstance
-
parser
-