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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Protos.DeterministicKey.Builder
addAllPath(java.lang.Iterable<? extends java.lang.Integer> values)
The path through the key tree.Protos.DeterministicKey.Builder
addPath(int value)
The path through the key tree.Protos.DeterministicKey.Builder
clearChainCode()
Random data that allows us to extend a key.Protos.DeterministicKey.Builder
clearIsFollowing()
Flag indicating that this key is a root of a following chain.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.Protos.DeterministicKey.Builder
clearLookaheadSize()
optional uint32 lookahead_size = 4;
Protos.DeterministicKey.Builder
clearPath()
The path through the key tree.Protos.DeterministicKey.Builder
clearSigsRequiredToSpend()
Number of signatures required to spend.com.google.protobuf.ByteString
getChainCode()
Random data that allows us to extend a key.boolean
getIsFollowing()
Flag indicating that this key is a root of a following chain.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.int
getLookaheadSize()
optional uint32 lookahead_size = 4;
int
getPath(int index)
The path through the key tree.int
getPathCount()
The path through the key tree.java.util.List<java.lang.Integer>
getPathList()
The path through the key tree.int
getSigsRequiredToSpend()
Number of signatures required to spend.boolean
hasChainCode()
Random data that allows us to extend a key.boolean
hasIsFollowing()
Flag indicating that this key is a root of a following chain.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.boolean
hasLookaheadSize()
optional uint32 lookahead_size = 4;
boolean
hasSigsRequiredToSpend()
Number of signatures required to spend.Protos.DeterministicKey.Builder
setChainCode(com.google.protobuf.ByteString value)
Random data that allows us to extend a key.Protos.DeterministicKey.Builder
setIsFollowing(boolean value)
Flag indicating that this key is a root of a following chain.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.Protos.DeterministicKey.Builder
setLookaheadSize(int value)
optional uint32 lookahead_size = 4;
Protos.DeterministicKey.Builder
setPath(int index, int value)
The path through the key tree.Protos.DeterministicKey.Builder
setSigsRequiredToSpend(int value)
Number of signatures required to spend.
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

hasChainCode
public 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:
hasChainCode
in interfaceProtos.DeterministicKeyOrBuilder
 Returns:
 Whether the chainCode field is set.

getChainCode
public 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:
getChainCode
in interfaceProtos.DeterministicKeyOrBuilder
 Returns:
 The chainCode.

setChainCode
public 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.

clearChainCode
public 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.

getPathList
public 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:
getPathList
in interfaceProtos.DeterministicKeyOrBuilder
 Returns:
 A list containing the path.

getPathCount
public 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:
getPathCount
in interfaceProtos.DeterministicKeyOrBuilder
 Returns:
 The count of path.

getPath
public 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:
getPath
in interfaceProtos.DeterministicKeyOrBuilder
 Parameters:
index
 The index of the element to return. Returns:
 The path at the given index.

setPath
public 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.

addPath
public 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.

addAllPath
public 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.

clearPath
public 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.

hasIssuedSubkeys
public 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:
hasIssuedSubkeys
in interfaceProtos.DeterministicKeyOrBuilder
 Returns:
 Whether the issuedSubkeys field is set.

getIssuedSubkeys
public 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:
getIssuedSubkeys
in interfaceProtos.DeterministicKeyOrBuilder
 Returns:
 The issuedSubkeys.

setIssuedSubkeys
public 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.

clearIssuedSubkeys
public 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.

hasLookaheadSize
public boolean hasLookaheadSize()
optional uint32 lookahead_size = 4;
 Specified by:
hasLookaheadSize
in interfaceProtos.DeterministicKeyOrBuilder
 Returns:
 Whether the lookaheadSize field is set.

getLookaheadSize
public int getLookaheadSize()
optional uint32 lookahead_size = 4;
 Specified by:
getLookaheadSize
in interfaceProtos.DeterministicKeyOrBuilder
 Returns:
 The lookaheadSize.

setLookaheadSize
public Protos.DeterministicKey.Builder setLookaheadSize(int value)
optional uint32 lookahead_size = 4;
 Parameters:
value
 The lookaheadSize to set. Returns:
 This builder for chaining.

clearLookaheadSize
public Protos.DeterministicKey.Builder clearLookaheadSize()
optional uint32 lookahead_size = 4;
 Returns:
 This builder for chaining.

hasIsFollowing
public boolean hasIsFollowing()
Flag indicating that this key is a root of a following chain. This chain is following the next nonfollowing 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:
hasIsFollowing
in interfaceProtos.DeterministicKeyOrBuilder
 Returns:
 Whether the isFollowing field is set.

getIsFollowing
public boolean getIsFollowing()
Flag indicating that this key is a root of a following chain. This chain is following the next nonfollowing 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:
getIsFollowing
in interfaceProtos.DeterministicKeyOrBuilder
 Returns:
 The isFollowing.

setIsFollowing
public Protos.DeterministicKey.Builder setIsFollowing(boolean value)
Flag indicating that this key is a root of a following chain. This chain is following the next nonfollowing 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.

clearIsFollowing
public Protos.DeterministicKey.Builder clearIsFollowing()
Flag indicating that this key is a root of a following chain. This chain is following the next nonfollowing 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.

hasSigsRequiredToSpend
public 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 NofM CHECKMULTISIG script. For regular single keychains it will always be 1.
optional uint32 sigsRequiredToSpend = 6 [default = 1];
 Specified by:
hasSigsRequiredToSpend
in interfaceProtos.DeterministicKeyOrBuilder
 Returns:
 Whether the sigsRequiredToSpend field is set.

getSigsRequiredToSpend
public 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 NofM CHECKMULTISIG script. For regular single keychains it will always be 1.
optional uint32 sigsRequiredToSpend = 6 [default = 1];
 Specified by:
getSigsRequiredToSpend
in interfaceProtos.DeterministicKeyOrBuilder
 Returns:
 The sigsRequiredToSpend.

setSigsRequiredToSpend
public 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 NofM 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.

clearSigsRequiredToSpend
public 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 NofM CHECKMULTISIG script. For regular single keychains it will always be 1.
optional uint32 sigsRequiredToSpend = 6 [default = 1];
 Returns:
 This builder for chaining.

