Class Protos.DeterministicKey.Builder

    • 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 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.
      • 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 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.
      • 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 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.
      • 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.
      • setLookaheadSize

        public Protos.DeterministicKey.Builder setLookaheadSize​(int value)
        optional uint32 lookahead_size = 4;
        Parameters:
        value - The lookaheadSize to set.
        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 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.
      • 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 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.
      • clearIsFollowing

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