Package org.bitcoinj.protobuf.wallet
Class Protos.TransactionConfidence.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
-
- com.google.protobuf.GeneratedMessageLite.Builder<Protos.TransactionConfidence,Protos.TransactionConfidence.Builder>
-
- org.bitcoinj.protobuf.wallet.Protos.TransactionConfidence.Builder
-
- All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,java.lang.Cloneable,Protos.TransactionConfidenceOrBuilder
- Enclosing class:
- Protos.TransactionConfidence
public static final class Protos.TransactionConfidence.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<Protos.TransactionConfidence,Protos.TransactionConfidence.Builder> implements Protos.TransactionConfidenceOrBuilder
A description of the confidence we have that a transaction cannot be reversed in the future. Parsing should be lenient, since this could change for different applications yet we should maintain backward compatibility.
Protobuf typewallet.TransactionConfidence
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Protos.TransactionConfidence.BuilderaddAllBroadcastBy(java.lang.Iterable<? extends Protos.PeerAddress> values)repeated .wallet.PeerAddress broadcast_by = 6;Protos.TransactionConfidence.BuilderaddBroadcastBy(int index, Protos.PeerAddress value)repeated .wallet.PeerAddress broadcast_by = 6;Protos.TransactionConfidence.BuilderaddBroadcastBy(int index, Protos.PeerAddress.Builder builderForValue)repeated .wallet.PeerAddress broadcast_by = 6;Protos.TransactionConfidence.BuilderaddBroadcastBy(Protos.PeerAddress value)repeated .wallet.PeerAddress broadcast_by = 6;Protos.TransactionConfidence.BuilderaddBroadcastBy(Protos.PeerAddress.Builder builderForValue)repeated .wallet.PeerAddress broadcast_by = 6;Protos.TransactionConfidence.BuilderclearAppearedAtHeight()If type == BUILDING then this is the chain height at which the transaction was included.Protos.TransactionConfidence.BuilderclearBroadcastBy()repeated .wallet.PeerAddress broadcast_by = 6;Protos.TransactionConfidence.BuilderclearDepth()If type == BUILDING then this is the depth of the transaction in the blockchain.Protos.TransactionConfidence.BuilderclearLastBroadcastedAt()Millis since epoch the transaction was last announced to us.Protos.TransactionConfidence.BuilderclearOverridingTransaction()If set, hash of the transaction that double spent this one into oblivion.Protos.TransactionConfidence.BuilderclearSource()optional .wallet.TransactionConfidence.Source source = 7;Protos.TransactionConfidence.BuilderclearType()This is optional in case we add confidence types to prevent parse errors - backwards compatible.intgetAppearedAtHeight()If type == BUILDING then this is the chain height at which the transaction was included.Protos.PeerAddressgetBroadcastBy(int index)repeated .wallet.PeerAddress broadcast_by = 6;intgetBroadcastByCount()repeated .wallet.PeerAddress broadcast_by = 6;java.util.List<Protos.PeerAddress>getBroadcastByList()repeated .wallet.PeerAddress broadcast_by = 6;intgetDepth()If type == BUILDING then this is the depth of the transaction in the blockchain.longgetLastBroadcastedAt()Millis since epoch the transaction was last announced to us.com.google.protobuf.ByteStringgetOverridingTransaction()If set, hash of the transaction that double spent this one into oblivion.Protos.TransactionConfidence.SourcegetSource()optional .wallet.TransactionConfidence.Source source = 7;Protos.TransactionConfidence.TypegetType()This is optional in case we add confidence types to prevent parse errors - backwards compatible.booleanhasAppearedAtHeight()If type == BUILDING then this is the chain height at which the transaction was included.booleanhasDepth()If type == BUILDING then this is the depth of the transaction in the blockchain.booleanhasLastBroadcastedAt()Millis since epoch the transaction was last announced to us.booleanhasOverridingTransaction()If set, hash of the transaction that double spent this one into oblivion.booleanhasSource()optional .wallet.TransactionConfidence.Source source = 7;booleanhasType()This is optional in case we add confidence types to prevent parse errors - backwards compatible.Protos.TransactionConfidence.BuilderremoveBroadcastBy(int index)repeated .wallet.PeerAddress broadcast_by = 6;Protos.TransactionConfidence.BuildersetAppearedAtHeight(int value)If type == BUILDING then this is the chain height at which the transaction was included.Protos.TransactionConfidence.BuildersetBroadcastBy(int index, Protos.PeerAddress value)repeated .wallet.PeerAddress broadcast_by = 6;Protos.TransactionConfidence.BuildersetBroadcastBy(int index, Protos.PeerAddress.Builder builderForValue)repeated .wallet.PeerAddress broadcast_by = 6;Protos.TransactionConfidence.BuildersetDepth(int value)If type == BUILDING then this is the depth of the transaction in the blockchain.Protos.TransactionConfidence.BuildersetLastBroadcastedAt(long value)Millis since epoch the transaction was last announced to us.Protos.TransactionConfidence.BuildersetOverridingTransaction(com.google.protobuf.ByteString value)If set, hash of the transaction that double spent this one into oblivion.Protos.TransactionConfidence.BuildersetSource(Protos.TransactionConfidence.Source value)optional .wallet.TransactionConfidence.Source source = 7;Protos.TransactionConfidence.BuildersetType(Protos.TransactionConfidence.Type value)This is optional in case we add confidence types to prevent parse errors - backwards compatible.-
Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFrom
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException
-
-
-
-
Method Detail
-
hasType
public boolean hasType()
This is optional in case we add confidence types to prevent parse errors - backwards compatible.
optional .wallet.TransactionConfidence.Type type = 1;- Specified by:
hasTypein interfaceProtos.TransactionConfidenceOrBuilder- Returns:
- Whether the type field is set.
-
getType
public Protos.TransactionConfidence.Type getType()
This is optional in case we add confidence types to prevent parse errors - backwards compatible.
optional .wallet.TransactionConfidence.Type type = 1;- Specified by:
getTypein interfaceProtos.TransactionConfidenceOrBuilder- Returns:
- The type.
-
setType
public Protos.TransactionConfidence.Builder setType(Protos.TransactionConfidence.Type value)
This is optional in case we add confidence types to prevent parse errors - backwards compatible.
optional .wallet.TransactionConfidence.Type type = 1;- Parameters:
value- The enum numeric value on the wire for type to set.- Returns:
- This builder for chaining.
-
clearType
public Protos.TransactionConfidence.Builder clearType()
This is optional in case we add confidence types to prevent parse errors - backwards compatible.
optional .wallet.TransactionConfidence.Type type = 1;- Returns:
- This builder for chaining.
-
hasAppearedAtHeight
public boolean hasAppearedAtHeight()
If type == BUILDING then this is the chain height at which the transaction was included.
optional int32 appeared_at_height = 2;- Specified by:
hasAppearedAtHeightin interfaceProtos.TransactionConfidenceOrBuilder- Returns:
- Whether the appearedAtHeight field is set.
-
getAppearedAtHeight
public int getAppearedAtHeight()
If type == BUILDING then this is the chain height at which the transaction was included.
optional int32 appeared_at_height = 2;- Specified by:
getAppearedAtHeightin interfaceProtos.TransactionConfidenceOrBuilder- Returns:
- The appearedAtHeight.
-
setAppearedAtHeight
public Protos.TransactionConfidence.Builder setAppearedAtHeight(int value)
If type == BUILDING then this is the chain height at which the transaction was included.
optional int32 appeared_at_height = 2;- Parameters:
value- The appearedAtHeight to set.- Returns:
- This builder for chaining.
-
clearAppearedAtHeight
public Protos.TransactionConfidence.Builder clearAppearedAtHeight()
If type == BUILDING then this is the chain height at which the transaction was included.
optional int32 appeared_at_height = 2;- Returns:
- This builder for chaining.
-
hasOverridingTransaction
public boolean hasOverridingTransaction()
If set, hash of the transaction that double spent this one into oblivion. A transaction can be double spent by multiple transactions in the case of several inputs being re-spent by several transactions but we don't bother to track them all, just the first. This only makes sense if type = DEAD.
optional bytes overriding_transaction = 3;- Specified by:
hasOverridingTransactionin interfaceProtos.TransactionConfidenceOrBuilder- Returns:
- Whether the overridingTransaction field is set.
-
getOverridingTransaction
public com.google.protobuf.ByteString getOverridingTransaction()
If set, hash of the transaction that double spent this one into oblivion. A transaction can be double spent by multiple transactions in the case of several inputs being re-spent by several transactions but we don't bother to track them all, just the first. This only makes sense if type = DEAD.
optional bytes overriding_transaction = 3;- Specified by:
getOverridingTransactionin interfaceProtos.TransactionConfidenceOrBuilder- Returns:
- The overridingTransaction.
-
setOverridingTransaction
public Protos.TransactionConfidence.Builder setOverridingTransaction(com.google.protobuf.ByteString value)
If set, hash of the transaction that double spent this one into oblivion. A transaction can be double spent by multiple transactions in the case of several inputs being re-spent by several transactions but we don't bother to track them all, just the first. This only makes sense if type = DEAD.
optional bytes overriding_transaction = 3;- Parameters:
value- The overridingTransaction to set.- Returns:
- This builder for chaining.
-
clearOverridingTransaction
public Protos.TransactionConfidence.Builder clearOverridingTransaction()
If set, hash of the transaction that double spent this one into oblivion. A transaction can be double spent by multiple transactions in the case of several inputs being re-spent by several transactions but we don't bother to track them all, just the first. This only makes sense if type = DEAD.
optional bytes overriding_transaction = 3;- Returns:
- This builder for chaining.
-
hasDepth
public boolean hasDepth()
If type == BUILDING then this is the depth of the transaction in the blockchain. Zero confirmations: depth = 0, one confirmation: depth = 1 etc.
optional int32 depth = 4;- Specified by:
hasDepthin interfaceProtos.TransactionConfidenceOrBuilder- Returns:
- Whether the depth field is set.
-
getDepth
public int getDepth()
If type == BUILDING then this is the depth of the transaction in the blockchain. Zero confirmations: depth = 0, one confirmation: depth = 1 etc.
optional int32 depth = 4;- Specified by:
getDepthin interfaceProtos.TransactionConfidenceOrBuilder- Returns:
- The depth.
-
setDepth
public Protos.TransactionConfidence.Builder setDepth(int value)
If type == BUILDING then this is the depth of the transaction in the blockchain. Zero confirmations: depth = 0, one confirmation: depth = 1 etc.
optional int32 depth = 4;- Parameters:
value- The depth to set.- Returns:
- This builder for chaining.
-
clearDepth
public Protos.TransactionConfidence.Builder clearDepth()
If type == BUILDING then this is the depth of the transaction in the blockchain. Zero confirmations: depth = 0, one confirmation: depth = 1 etc.
optional int32 depth = 4;- Returns:
- This builder for chaining.
-
getBroadcastByList
public java.util.List<Protos.PeerAddress> getBroadcastByList()
repeated .wallet.PeerAddress broadcast_by = 6;- Specified by:
getBroadcastByListin interfaceProtos.TransactionConfidenceOrBuilder
-
getBroadcastByCount
public int getBroadcastByCount()
repeated .wallet.PeerAddress broadcast_by = 6;- Specified by:
getBroadcastByCountin interfaceProtos.TransactionConfidenceOrBuilder
-
getBroadcastBy
public Protos.PeerAddress getBroadcastBy(int index)
repeated .wallet.PeerAddress broadcast_by = 6;- Specified by:
getBroadcastByin interfaceProtos.TransactionConfidenceOrBuilder
-
setBroadcastBy
public Protos.TransactionConfidence.Builder setBroadcastBy(int index, Protos.PeerAddress value)
repeated .wallet.PeerAddress broadcast_by = 6;
-
setBroadcastBy
public Protos.TransactionConfidence.Builder setBroadcastBy(int index, Protos.PeerAddress.Builder builderForValue)
repeated .wallet.PeerAddress broadcast_by = 6;
-
addBroadcastBy
public Protos.TransactionConfidence.Builder addBroadcastBy(Protos.PeerAddress value)
repeated .wallet.PeerAddress broadcast_by = 6;
-
addBroadcastBy
public Protos.TransactionConfidence.Builder addBroadcastBy(int index, Protos.PeerAddress value)
repeated .wallet.PeerAddress broadcast_by = 6;
-
addBroadcastBy
public Protos.TransactionConfidence.Builder addBroadcastBy(Protos.PeerAddress.Builder builderForValue)
repeated .wallet.PeerAddress broadcast_by = 6;
-
addBroadcastBy
public Protos.TransactionConfidence.Builder addBroadcastBy(int index, Protos.PeerAddress.Builder builderForValue)
repeated .wallet.PeerAddress broadcast_by = 6;
-
addAllBroadcastBy
public Protos.TransactionConfidence.Builder addAllBroadcastBy(java.lang.Iterable<? extends Protos.PeerAddress> values)
repeated .wallet.PeerAddress broadcast_by = 6;
-
clearBroadcastBy
public Protos.TransactionConfidence.Builder clearBroadcastBy()
repeated .wallet.PeerAddress broadcast_by = 6;
-
removeBroadcastBy
public Protos.TransactionConfidence.Builder removeBroadcastBy(int index)
repeated .wallet.PeerAddress broadcast_by = 6;
-
hasLastBroadcastedAt
public boolean hasLastBroadcastedAt()
Millis since epoch the transaction was last announced to us.
optional int64 last_broadcasted_at = 8;- Specified by:
hasLastBroadcastedAtin interfaceProtos.TransactionConfidenceOrBuilder- Returns:
- Whether the lastBroadcastedAt field is set.
-
getLastBroadcastedAt
public long getLastBroadcastedAt()
Millis since epoch the transaction was last announced to us.
optional int64 last_broadcasted_at = 8;- Specified by:
getLastBroadcastedAtin interfaceProtos.TransactionConfidenceOrBuilder- Returns:
- The lastBroadcastedAt.
-
setLastBroadcastedAt
public Protos.TransactionConfidence.Builder setLastBroadcastedAt(long value)
Millis since epoch the transaction was last announced to us.
optional int64 last_broadcasted_at = 8;- Parameters:
value- The lastBroadcastedAt to set.- Returns:
- This builder for chaining.
-
clearLastBroadcastedAt
public Protos.TransactionConfidence.Builder clearLastBroadcastedAt()
Millis since epoch the transaction was last announced to us.
optional int64 last_broadcasted_at = 8;- Returns:
- This builder for chaining.
-
hasSource
public boolean hasSource()
optional .wallet.TransactionConfidence.Source source = 7;- Specified by:
hasSourcein interfaceProtos.TransactionConfidenceOrBuilder- Returns:
- Whether the source field is set.
-
getSource
public Protos.TransactionConfidence.Source getSource()
optional .wallet.TransactionConfidence.Source source = 7;- Specified by:
getSourcein interfaceProtos.TransactionConfidenceOrBuilder- Returns:
- The source.
-
setSource
public Protos.TransactionConfidence.Builder setSource(Protos.TransactionConfidence.Source value)
optional .wallet.TransactionConfidence.Source source = 7;- Parameters:
value- The enum numeric value on the wire for source to set.- Returns:
- This builder for chaining.
-
clearSource
public Protos.TransactionConfidence.Builder clearSource()
optional .wallet.TransactionConfidence.Source source = 7;- Returns:
- This builder for chaining.
-
-