Package org.bitcoinj.wallet
Class Protos.DeterministicKey.Builder
- java.lang.Object
- 
- com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
- 
- com.google.protobuf.GeneratedMessageLite.Builder<Protos.DeterministicKey,Protos.DeterministicKey.Builder>
- 
- org.bitcoinj.wallet.Protos.DeterministicKey.Builder
 
 
 
- 
- All Implemented Interfaces:
- com.google.protobuf.MessageLite.Builder,- com.google.protobuf.MessageLiteOrBuilder,- java.lang.Cloneable,- Protos.DeterministicKeyOrBuilder
 - Enclosing class:
- Protos.DeterministicKey
 
 public static final class Protos.DeterministicKey.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<Protos.DeterministicKey,Protos.DeterministicKey.Builder> implements Protos.DeterministicKeyOrBuilder Data attached to a Key message that defines the data needed by the BIP32 deterministic key hierarchy algorithm. Protobuf typewallet.DeterministicKey
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Protos.DeterministicKey.BuilderaddAllPath(java.lang.Iterable<? extends java.lang.Integer> values)The path through the key tree.Protos.DeterministicKey.BuilderaddPath(int value)The path through the key tree.Protos.DeterministicKey.BuilderclearChainCode()Random data that allows us to extend a key.Protos.DeterministicKey.BuilderclearIsFollowing()Flag indicating that this key is a root of a following chain.Protos.DeterministicKey.BuilderclearIssuedSubkeys()How many children of this key have been issued, that is, given to the user when they requested a fresh key? For the parents of keys being handed out, this is always less than the true number of children: the difference is called the lookahead zone.Protos.DeterministicKey.BuilderclearLookaheadSize()optional uint32 lookahead_size = 4;Protos.DeterministicKey.BuilderclearPath()The path through the key tree.Protos.DeterministicKey.BuilderclearSigsRequiredToSpend()Number of signatures required to spend.com.google.protobuf.ByteStringgetChainCode()Random data that allows us to extend a key.booleangetIsFollowing()Flag indicating that this key is a root of a following chain.intgetIssuedSubkeys()How many children of this key have been issued, that is, given to the user when they requested a fresh key? For the parents of keys being handed out, this is always less than the true number of children: the difference is called the lookahead zone.intgetLookaheadSize()optional uint32 lookahead_size = 4;intgetPath(int index)The path through the key tree.intgetPathCount()The path through the key tree.java.util.List<java.lang.Integer>getPathList()The path through the key tree.intgetSigsRequiredToSpend()Number of signatures required to spend.booleanhasChainCode()Random data that allows us to extend a key.booleanhasIsFollowing()Flag indicating that this key is a root of a following chain.booleanhasIssuedSubkeys()How many children of this key have been issued, that is, given to the user when they requested a fresh key? For the parents of keys being handed out, this is always less than the true number of children: the difference is called the lookahead zone.booleanhasLookaheadSize()optional uint32 lookahead_size = 4;booleanhasSigsRequiredToSpend()Number of signatures required to spend.Protos.DeterministicKey.BuildersetChainCode(com.google.protobuf.ByteString value)Random data that allows us to extend a key.Protos.DeterministicKey.BuildersetIsFollowing(boolean value)Flag indicating that this key is a root of a following chain.Protos.DeterministicKey.BuildersetIssuedSubkeys(int value)How many children of this key have been issued, that is, given to the user when they requested a fresh key? For the parents of keys being handed out, this is always less than the true number of children: the difference is called the lookahead zone.Protos.DeterministicKey.BuildersetLookaheadSize(int value)optional uint32 lookahead_size = 4;Protos.DeterministicKey.BuildersetPath(int index, int value)The path through the key tree.Protos.DeterministicKey.BuildersetSigsRequiredToSpend(int value)Number of signatures required to spend.- 
Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builderbuild, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFrom
 - 
Methods inherited from class com.google.protobuf.AbstractMessageLite.BuilderaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException
 
- 
 
- 
- 
- 
Method Detail- 
hasChainCodepublic boolean hasChainCode() Random data that allows us to extend a key. Without this, we can't figure out the next key in the chain and should just treat it as a regular ORIGINAL type key. required bytes chain_code = 1;- Specified by:
- hasChainCodein interface- Protos.DeterministicKeyOrBuilder
- Returns:
- Whether the chainCode field is set.
 
 - 
getChainCodepublic com.google.protobuf.ByteString getChainCode() Random data that allows us to extend a key. Without this, we can't figure out the next key in the chain and should just treat it as a regular ORIGINAL type key. required bytes chain_code = 1;- Specified by:
- getChainCodein interface- Protos.DeterministicKeyOrBuilder
- Returns:
- The chainCode.
 
 - 
setChainCodepublic Protos.DeterministicKey.Builder setChainCode(com.google.protobuf.ByteString value) Random data that allows us to extend a key. Without this, we can't figure out the next key in the chain and should just treat it as a regular ORIGINAL type key. required bytes chain_code = 1;- Parameters:
- value- The chainCode to set.
- Returns:
- This builder for chaining.
 
 - 
clearChainCodepublic Protos.DeterministicKey.Builder clearChainCode() Random data that allows us to extend a key. Without this, we can't figure out the next key in the chain and should just treat it as a regular ORIGINAL type key. required bytes chain_code = 1;- Returns:
- This builder for chaining.
 
 - 
getPathListpublic java.util.List<java.lang.Integer> getPathList() The path through the key tree. Each number is encoded in the standard form: high bit set for private derivation and high bit unset for public derivation. repeated uint32 path = 2;- Specified by:
- getPathListin interface- Protos.DeterministicKeyOrBuilder
- Returns:
- A list containing the path.
 
 - 
getPathCountpublic int getPathCount() The path through the key tree. Each number is encoded in the standard form: high bit set for private derivation and high bit unset for public derivation. repeated uint32 path = 2;- Specified by:
- getPathCountin interface- Protos.DeterministicKeyOrBuilder
- Returns:
- The count of path.
 
 - 
getPathpublic int getPath(int index) The path through the key tree. Each number is encoded in the standard form: high bit set for private derivation and high bit unset for public derivation. repeated uint32 path = 2;- Specified by:
- getPathin interface- Protos.DeterministicKeyOrBuilder
- Parameters:
- index- The index of the element to return.
- Returns:
- The path at the given index.
 
 - 
setPathpublic Protos.DeterministicKey.Builder setPath(int index, int value) The path through the key tree. Each number is encoded in the standard form: high bit set for private derivation and high bit unset for public derivation. repeated uint32 path = 2;- Parameters:
- value- The path to set.
- Returns:
- This builder for chaining.
 
 - 
addPathpublic Protos.DeterministicKey.Builder addPath(int value) The path through the key tree. Each number is encoded in the standard form: high bit set for private derivation and high bit unset for public derivation. repeated uint32 path = 2;- Parameters:
- value- The path to add.
- Returns:
- This builder for chaining.
 
 - 
addAllPathpublic Protos.DeterministicKey.Builder addAllPath(java.lang.Iterable<? extends java.lang.Integer> values) The path through the key tree. Each number is encoded in the standard form: high bit set for private derivation and high bit unset for public derivation. repeated uint32 path = 2;- Parameters:
- values- The path to add.
- Returns:
- This builder for chaining.
 
 - 
clearPathpublic Protos.DeterministicKey.Builder clearPath() The path through the key tree. Each number is encoded in the standard form: high bit set for private derivation and high bit unset for public derivation. repeated uint32 path = 2;- Returns:
- This builder for chaining.
 
 - 
hasIssuedSubkeyspublic boolean hasIssuedSubkeys() How many children of this key have been issued, that is, given to the user when they requested a fresh key? For the parents of keys being handed out, this is always less than the true number of children: the difference is called the lookahead zone. These keys are put into Bloom filters so we can spot transactions made by clones of this wallet - for instance when restoring from backup or if the seed was shared between devices. If this field is missing it means we're not issuing subkeys of this key to users. optional uint32 issued_subkeys = 3;- Specified by:
- hasIssuedSubkeysin interface- Protos.DeterministicKeyOrBuilder
- Returns:
- Whether the issuedSubkeys field is set.
 
 - 
getIssuedSubkeyspublic int getIssuedSubkeys() How many children of this key have been issued, that is, given to the user when they requested a fresh key? For the parents of keys being handed out, this is always less than the true number of children: the difference is called the lookahead zone. These keys are put into Bloom filters so we can spot transactions made by clones of this wallet - for instance when restoring from backup or if the seed was shared between devices. If this field is missing it means we're not issuing subkeys of this key to users. optional uint32 issued_subkeys = 3;- Specified by:
- getIssuedSubkeysin interface- Protos.DeterministicKeyOrBuilder
- Returns:
- The issuedSubkeys.
 
 - 
setIssuedSubkeyspublic Protos.DeterministicKey.Builder setIssuedSubkeys(int value) How many children of this key have been issued, that is, given to the user when they requested a fresh key? For the parents of keys being handed out, this is always less than the true number of children: the difference is called the lookahead zone. These keys are put into Bloom filters so we can spot transactions made by clones of this wallet - for instance when restoring from backup or if the seed was shared between devices. If this field is missing it means we're not issuing subkeys of this key to users. optional uint32 issued_subkeys = 3;- Parameters:
- value- The issuedSubkeys to set.
- Returns:
- This builder for chaining.
 
 - 
clearIssuedSubkeyspublic Protos.DeterministicKey.Builder clearIssuedSubkeys() How many children of this key have been issued, that is, given to the user when they requested a fresh key? For the parents of keys being handed out, this is always less than the true number of children: the difference is called the lookahead zone. These keys are put into Bloom filters so we can spot transactions made by clones of this wallet - for instance when restoring from backup or if the seed was shared between devices. If this field is missing it means we're not issuing subkeys of this key to users. optional uint32 issued_subkeys = 3;- Returns:
- This builder for chaining.
 
 - 
hasLookaheadSizepublic boolean hasLookaheadSize() optional uint32 lookahead_size = 4;- Specified by:
- hasLookaheadSizein interface- Protos.DeterministicKeyOrBuilder
- Returns:
- Whether the lookaheadSize field is set.
 
 - 
getLookaheadSizepublic int getLookaheadSize() optional uint32 lookahead_size = 4;- Specified by:
- getLookaheadSizein interface- Protos.DeterministicKeyOrBuilder
- Returns:
- The lookaheadSize.
 
 - 
setLookaheadSizepublic Protos.DeterministicKey.Builder setLookaheadSize(int value) optional uint32 lookahead_size = 4;- Parameters:
- value- The lookaheadSize to set.
- Returns:
- This builder for chaining.
 
 - 
clearLookaheadSizepublic Protos.DeterministicKey.Builder clearLookaheadSize() optional uint32 lookahead_size = 4;- Returns:
- This builder for chaining.
 
 - 
hasIsFollowingpublic boolean hasIsFollowing() Flag indicating that this key is a root of a following chain. This chain is following the next non-following chain. Following/followed chains concept is used for married keychains, where the set of keys combined together to produce a single P2SH multisignature address optional bool isFollowing = 5;- Specified by:
- hasIsFollowingin interface- Protos.DeterministicKeyOrBuilder
- Returns:
- Whether the isFollowing field is set.
 
 - 
getIsFollowingpublic boolean getIsFollowing() Flag indicating that this key is a root of a following chain. This chain is following the next non-following chain. Following/followed chains concept is used for married keychains, where the set of keys combined together to produce a single P2SH multisignature address optional bool isFollowing = 5;- Specified by:
- getIsFollowingin interface- Protos.DeterministicKeyOrBuilder
- Returns:
- The isFollowing.
 
 - 
setIsFollowingpublic Protos.DeterministicKey.Builder setIsFollowing(boolean value) Flag indicating that this key is a root of a following chain. This chain is following the next non-following chain. Following/followed chains concept is used for married keychains, where the set of keys combined together to produce a single P2SH multisignature address optional bool isFollowing = 5;- Parameters:
- value- The isFollowing to set.
- Returns:
- This builder for chaining.
 
 - 
clearIsFollowingpublic Protos.DeterministicKey.Builder clearIsFollowing() Flag indicating that this key is a root of a following chain. This chain is following the next non-following chain. Following/followed chains concept is used for married keychains, where the set of keys combined together to produce a single P2SH multisignature address optional bool isFollowing = 5;- Returns:
- This builder for chaining.
 
 - 
hasSigsRequiredToSpendpublic boolean hasSigsRequiredToSpend() Number of signatures required to spend. This field is needed only for married keychains to reconstruct KeyChain and represents the N value from N-of-M CHECKMULTISIG script. For regular single keychains it will always be 1. optional uint32 sigsRequiredToSpend = 6 [default = 1];- Specified by:
- hasSigsRequiredToSpendin interface- Protos.DeterministicKeyOrBuilder
- Returns:
- Whether the sigsRequiredToSpend field is set.
 
 - 
getSigsRequiredToSpendpublic int getSigsRequiredToSpend() Number of signatures required to spend. This field is needed only for married keychains to reconstruct KeyChain and represents the N value from N-of-M CHECKMULTISIG script. For regular single keychains it will always be 1. optional uint32 sigsRequiredToSpend = 6 [default = 1];- Specified by:
- getSigsRequiredToSpendin interface- Protos.DeterministicKeyOrBuilder
- Returns:
- The sigsRequiredToSpend.
 
 - 
setSigsRequiredToSpendpublic Protos.DeterministicKey.Builder setSigsRequiredToSpend(int value) Number of signatures required to spend. This field is needed only for married keychains to reconstruct KeyChain and represents the N value from N-of-M CHECKMULTISIG script. For regular single keychains it will always be 1. optional uint32 sigsRequiredToSpend = 6 [default = 1];- Parameters:
- value- The sigsRequiredToSpend to set.
- Returns:
- This builder for chaining.
 
 - 
clearSigsRequiredToSpendpublic Protos.DeterministicKey.Builder clearSigsRequiredToSpend() Number of signatures required to spend. This field is needed only for married keychains to reconstruct KeyChain and represents the N value from N-of-M CHECKMULTISIG script. For regular single keychains it will always be 1. optional uint32 sigsRequiredToSpend = 6 [default = 1];- Returns:
- This builder for chaining.
 
 
- 
 
-