Class Protos.DeterministicKey

java.lang.Object
com.google.protobuf.AbstractMessageLite<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite<Protos.DeterministicKey,Protos.DeterministicKey.Builder>
org.bitcoinj.wallet.Protos.DeterministicKey
All Implemented Interfaces:
com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, Protos.DeterministicKeyOrBuilder
Enclosing class:
Protos

public static final class Protos.DeterministicKey extends com.google.protobuf.GeneratedMessageLite<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 type wallet.DeterministicKey
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    Data attached to a Key message that defines the data needed by the BIP32 deterministic key hierarchy algorithm.

    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

    Fields
    Modifier and Type
    Field
    Description
    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 Type
    Method
    Description
    protected final Object
    dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)
     
    com.google.protobuf.ByteString
    Random data that allows us to extend a key.
     
    boolean
    Flag indicating that this key is a root of a following chain.
    int
    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
    optional uint32 lookahead_size = 4;
    int
    getPath(int index)
    The path through the key tree.
    int
    The path through the key tree.
    The path through the key tree.
    int
    Number of signatures required to spend.
    boolean
    Random data that allows us to extend a key.
    boolean
    Flag indicating that this key is a root of a following chain.
    boolean
    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
    optional uint32 lookahead_size = 4;
    boolean
    Number of signatures required to spend.
     
     
     
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(byte[] data)
     
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.ByteString data)
     
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<Protos.DeterministicKey>
     

    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

    • CHAIN_CODE_FIELD_NUMBER

      public static final int CHAIN_CODE_FIELD_NUMBER
      See Also:
    • PATH_FIELD_NUMBER

      public static final int PATH_FIELD_NUMBER
      See Also:
    • ISSUED_SUBKEYS_FIELD_NUMBER

      public static final int ISSUED_SUBKEYS_FIELD_NUMBER
      See Also:
    • LOOKAHEAD_SIZE_FIELD_NUMBER

      public static final int LOOKAHEAD_SIZE_FIELD_NUMBER
      See Also:
    • ISFOLLOWING_FIELD_NUMBER

      public static final int ISFOLLOWING_FIELD_NUMBER
      See Also:
    • SIGSREQUIREDTOSPEND_FIELD_NUMBER

      public static final int SIGSREQUIREDTOSPEND_FIELD_NUMBER
      See Also:
  • Method Details

    • 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 interface Protos.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 interface Protos.DeterministicKeyOrBuilder
      Returns:
      The chainCode.
    • getPathList

      public List<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 interface Protos.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 interface Protos.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 interface Protos.DeterministicKeyOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The path at the given index.
    • 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 interface Protos.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 interface Protos.DeterministicKeyOrBuilder
      Returns:
      The issuedSubkeys.
    • hasLookaheadSize

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

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

      public 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:
      hasIsFollowing in interface Protos.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 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:
      getIsFollowing in interface Protos.DeterministicKeyOrBuilder
      Returns:
      The isFollowing.
    • 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 N-of-M CHECKMULTISIG script. For regular single keychains it will always be 1.
       
      optional uint32 sigsRequiredToSpend = 6 [default = 1];
      Specified by:
      hasSigsRequiredToSpend in interface Protos.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 N-of-M CHECKMULTISIG script. For regular single keychains it will always be 1.
       
      optional uint32 sigsRequiredToSpend = 6 [default = 1];
      Specified by:
      getSigsRequiredToSpend in interface Protos.DeterministicKeyOrBuilder
      Returns:
      The sigsRequiredToSpend.
    • parseFrom

      public static Protos.DeterministicKey parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Protos.DeterministicKey parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Protos.DeterministicKey parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Protos.DeterministicKey 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.DeterministicKey parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Protos.DeterministicKey parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Protos.DeterministicKey parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Protos.DeterministicKey parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Protos.DeterministicKey parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Protos.DeterministicKey parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Protos.DeterministicKey parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Protos.DeterministicKey parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilder

      public static Protos.DeterministicKey.Builder newBuilder()
    • newBuilder

      public static Protos.DeterministicKey.Builder newBuilder(Protos.DeterministicKey prototype)
    • dynamicMethod

      protected final Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)
      Specified by:
      dynamicMethod in class com.google.protobuf.GeneratedMessageLite<Protos.DeterministicKey,Protos.DeterministicKey.Builder>
    • getDefaultInstance

      public static Protos.DeterministicKey getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<Protos.DeterministicKey> parser()