Package org.bitcoinj.wallet
Class Protos.Transaction.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite.Builder<Protos.Transaction,Protos.Transaction.Builder>
org.bitcoinj.wallet.Protos.Transaction.Builder
- All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,Cloneable,Protos.TransactionOrBuilder
- Enclosing class:
- Protos.Transaction
public static final class Protos.Transaction.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<Protos.Transaction,Protos.Transaction.Builder>
implements Protos.TransactionOrBuilder
Protobuf type
wallet.Transaction-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance, isBuilt -
Method Summary
Modifier and TypeMethodDescriptionaddAllBlockHash(Iterable<? extends com.google.protobuf.ByteString> values) A list of blocks in which the transaction has been observed (on any chain).addAllBlockRelativityOffsets(Iterable<? extends Integer> values) repeated int32 block_relativity_offsets = 11;addAllTransactionInput(Iterable<? extends Protos.TransactionInput> values) repeated .wallet.TransactionInput transaction_input = 6;addAllTransactionOutput(Iterable<? extends Protos.TransactionOutput> values) repeated .wallet.TransactionOutput transaction_output = 7;addBlockHash(com.google.protobuf.ByteString value) A list of blocks in which the transaction has been observed (on any chain).addBlockRelativityOffsets(int value) repeated int32 block_relativity_offsets = 11;addTransactionInput(int index, Protos.TransactionInput value) repeated .wallet.TransactionInput transaction_input = 6;addTransactionInput(int index, Protos.TransactionInput.Builder builderForValue) repeated .wallet.TransactionInput transaction_input = 6;repeated .wallet.TransactionInput transaction_input = 6;addTransactionInput(Protos.TransactionInput.Builder builderForValue) repeated .wallet.TransactionInput transaction_input = 6;addTransactionOutput(int index, Protos.TransactionOutput value) repeated .wallet.TransactionOutput transaction_output = 7;addTransactionOutput(int index, Protos.TransactionOutput.Builder builderForValue) repeated .wallet.TransactionOutput transaction_output = 7;repeated .wallet.TransactionOutput transaction_output = 7;addTransactionOutput(Protos.TransactionOutput.Builder builderForValue) repeated .wallet.TransactionOutput transaction_output = 7;A list of blocks in which the transaction has been observed (on any chain).repeated int32 block_relativity_offsets = 11;Data describing where the transaction is in the chain.Exchange rate that was valid when the transaction was sent.required bytes hash = 2;The nLockTime field is useful for contracts.Memo of the transaction.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];repeated .wallet.TransactionInput transaction_input = 6;repeated .wallet.TransactionOutput transaction_output = 7;millis since epoch the transaction was last updatedSee Wallet.java for detailed description of pool semanticscom.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.Exchange 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;getTransactionOutput(int index) repeated .wallet.TransactionOutput transaction_output = 7;intrepeated .wallet.TransactionOutput transaction_output = 7;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 semanticsData describing where the transaction is in the chain.Exchange rate that was valid when the transaction was sent.removeTransactionInput(int index) repeated .wallet.TransactionInput transaction_input = 6;removeTransactionOutput(int index) repeated .wallet.TransactionOutput transaction_output = 7;setBlockHash(int index, com.google.protobuf.ByteString value) A list of blocks in which the transaction has been observed (on any chain).setBlockRelativityOffsets(int index, int value) repeated int32 block_relativity_offsets = 11;Data describing where the transaction is in the chain.setConfidence(Protos.TransactionConfidence.Builder builderForValue) Data describing where the transaction is in the chain.Exchange rate that was valid when the transaction was sent.setExchangeRate(Protos.ExchangeRate.Builder builderForValue) Exchange rate that was valid when the transaction was sent.setHash(com.google.protobuf.ByteString value) required bytes hash = 2;setLockTime(int value) The nLockTime field is useful for contracts.Memo of the transaction.setMemoBytes(com.google.protobuf.ByteString value) Memo of the transaction.setPool(Protos.Transaction.Pool value) 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];setTransactionInput(int index, Protos.TransactionInput value) repeated .wallet.TransactionInput transaction_input = 6;setTransactionInput(int index, Protos.TransactionInput.Builder builderForValue) repeated .wallet.TransactionInput transaction_input = 6;setTransactionOutput(int index, Protos.TransactionOutput value) repeated .wallet.TransactionOutput transaction_output = 7;setTransactionOutput(int index, Protos.TransactionOutput.Builder builderForValue) repeated .wallet.TransactionOutput transaction_output = 7;setUpdatedAt(long value) millis since epoch the transaction was last updatedsetVersion(int value) See Wallet.java for detailed description of pool semanticsMethods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFromMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
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.
-
setVersion
See Wallet.java for detailed description of pool semantics
required int32 version = 1;- Parameters:
value- The version to set.- Returns:
- This builder for chaining.
-
clearVersion
See Wallet.java for detailed description of pool semantics
required int32 version = 1;- Returns:
- This builder for chaining.
-
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.
-
setHash
required bytes hash = 2;- Parameters:
value- The hash to set.- Returns:
- This builder for chaining.
-
clearHash
required bytes hash = 2;- Returns:
- This builder for chaining.
-
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.
-
setPool
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;- Parameters:
value- The enum numeric value on the wire for pool to set.- Returns:
- This builder for chaining.
-
clearPool
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;- Returns:
- This builder for chaining.
-
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.
-
setLockTime
The nLockTime field is useful for contracts.
optional uint32 lock_time = 4;- Parameters:
value- The lockTime to set.- Returns:
- This builder for chaining.
-
clearLockTime
The nLockTime field is useful for contracts.
optional uint32 lock_time = 4;- Returns:
- This builder for chaining.
-
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.
-
setUpdatedAt
millis since epoch the transaction was last updated
optional int64 updated_at = 5;- Parameters:
value- The updatedAt to set.- Returns:
- This builder for chaining.
-
clearUpdatedAt
millis since epoch the transaction was last updated
optional int64 updated_at = 5;- Returns:
- This builder for chaining.
-
getTransactionInputList
repeated .wallet.TransactionInput transaction_input = 6;- Specified by:
getTransactionInputListin interfaceProtos.TransactionOrBuilder
-
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
-
setTransactionInput
repeated .wallet.TransactionInput transaction_input = 6; -
setTransactionInput
public Protos.Transaction.Builder setTransactionInput(int index, Protos.TransactionInput.Builder builderForValue) repeated .wallet.TransactionInput transaction_input = 6; -
addTransactionInput
repeated .wallet.TransactionInput transaction_input = 6; -
addTransactionInput
repeated .wallet.TransactionInput transaction_input = 6; -
addTransactionInput
public Protos.Transaction.Builder addTransactionInput(Protos.TransactionInput.Builder builderForValue) repeated .wallet.TransactionInput transaction_input = 6; -
addTransactionInput
public Protos.Transaction.Builder addTransactionInput(int index, Protos.TransactionInput.Builder builderForValue) repeated .wallet.TransactionInput transaction_input = 6; -
addAllTransactionInput
public Protos.Transaction.Builder addAllTransactionInput(Iterable<? extends Protos.TransactionInput> values) repeated .wallet.TransactionInput transaction_input = 6; -
clearTransactionInput
repeated .wallet.TransactionInput transaction_input = 6; -
removeTransactionInput
repeated .wallet.TransactionInput transaction_input = 6; -
getTransactionOutputList
repeated .wallet.TransactionOutput transaction_output = 7;- Specified by:
getTransactionOutputListin interfaceProtos.TransactionOrBuilder
-
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
-
setTransactionOutput
repeated .wallet.TransactionOutput transaction_output = 7; -
setTransactionOutput
public Protos.Transaction.Builder setTransactionOutput(int index, Protos.TransactionOutput.Builder builderForValue) repeated .wallet.TransactionOutput transaction_output = 7; -
addTransactionOutput
repeated .wallet.TransactionOutput transaction_output = 7; -
addTransactionOutput
repeated .wallet.TransactionOutput transaction_output = 7; -
addTransactionOutput
public Protos.Transaction.Builder addTransactionOutput(Protos.TransactionOutput.Builder builderForValue) repeated .wallet.TransactionOutput transaction_output = 7; -
addTransactionOutput
public Protos.Transaction.Builder addTransactionOutput(int index, Protos.TransactionOutput.Builder builderForValue) repeated .wallet.TransactionOutput transaction_output = 7; -
addAllTransactionOutput
public Protos.Transaction.Builder addAllTransactionOutput(Iterable<? extends Protos.TransactionOutput> values) repeated .wallet.TransactionOutput transaction_output = 7; -
clearTransactionOutput
repeated .wallet.TransactionOutput transaction_output = 7; -
removeTransactionOutput
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.
-
setBlockHash
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;- Parameters:
value- The blockHash to set.- Returns:
- This builder for chaining.
-
addBlockHash
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;- Parameters:
value- The blockHash to add.- Returns:
- This builder for chaining.
-
addAllBlockHash
public Protos.Transaction.Builder addAllBlockHash(Iterable<? extends com.google.protobuf.ByteString> values) 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;- Parameters:
values- The blockHash to add.- Returns:
- This builder for chaining.
-
clearBlockHash
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;- Returns:
- This builder for chaining.
-
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.
-
setBlockRelativityOffsets
repeated int32 block_relativity_offsets = 11;- Parameters:
value- The blockRelativityOffsets to set.- Returns:
- This builder for chaining.
-
addBlockRelativityOffsets
repeated int32 block_relativity_offsets = 11;- Parameters:
value- The blockRelativityOffsets to add.- Returns:
- This builder for chaining.
-
addAllBlockRelativityOffsets
repeated int32 block_relativity_offsets = 11;- Parameters:
values- The blockRelativityOffsets to add.- Returns:
- This builder for chaining.
-
clearBlockRelativityOffsets
repeated int32 block_relativity_offsets = 11;- Returns:
- This builder for chaining.
-
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.
-
setConfidence
Data describing where the transaction is in the chain.
optional .wallet.TransactionConfidence confidence = 9; -
setConfidence
public Protos.Transaction.Builder setConfidence(Protos.TransactionConfidence.Builder builderForValue) Data describing where the transaction is in the chain.
optional .wallet.TransactionConfidence confidence = 9; -
mergeConfidence
Data describing where the transaction is in the chain.
optional .wallet.TransactionConfidence confidence = 9; -
clearConfidence
Data describing where the transaction is in the chain.
optional .wallet.TransactionConfidence confidence = 9; -
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.
-
setPurpose
optional .wallet.Transaction.Purpose purpose = 10 [default = UNKNOWN];- Parameters:
value- The enum numeric value on the wire for purpose to set.- Returns:
- This builder for chaining.
-
clearPurpose
optional .wallet.Transaction.Purpose purpose = 10 [default = UNKNOWN];- Returns:
- This builder for chaining.
-
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.
-
setExchangeRate
Exchange rate that was valid when the transaction was sent.
optional .wallet.ExchangeRate exchange_rate = 12; -
setExchangeRate
Exchange rate that was valid when the transaction was sent.
optional .wallet.ExchangeRate exchange_rate = 12; -
mergeExchangeRate
Exchange rate that was valid when the transaction was sent.
optional .wallet.ExchangeRate exchange_rate = 12; -
clearExchangeRate
Exchange rate that was valid when the transaction was sent.
optional .wallet.ExchangeRate exchange_rate = 12; -
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.
-
setMemo
Memo of the transaction. It can be used to record the memo of the payment request that initiated the transaction.
optional string memo = 13;- Parameters:
value- The memo to set.- Returns:
- This builder for chaining.
-
clearMemo
Memo of the transaction. It can be used to record the memo of the payment request that initiated the transaction.
optional string memo = 13;- Returns:
- This builder for chaining.
-
setMemoBytes
Memo of the transaction. It can be used to record the memo of the payment request that initiated the transaction.
optional string memo = 13;- Parameters:
value- The bytes for memo to set.- Returns:
- This builder for chaining.
-