Class HdKeyGenerator


  • public class HdKeyGenerator
    extends java.lang.Object
    • Constructor Detail

      • HdKeyGenerator

        public HdKeyGenerator()
    • Method Detail

      • getRootKeyPairFromEntropy

        public HdKeyPair getRootKeyPairFromEntropy​(byte[] entropy)
      • getAccountKeyPairFromSecretKey

        public HdKeyPair getAccountKeyPairFromSecretKey​(byte[] xprv,
                                                        DerivationPath derivationPath)
      • getChildKeyPair

        public HdKeyPair getChildKeyPair​(HdKeyPair parent,
                                         long child,
                                         boolean isHardened)
        Derive the child key pair (public + private) from the parent key pair.
        Parameters:
        parent - the parent key
        child - the child index
        isHardened - whether is child index is hardened
        Returns:
      • getChildPublicKey

        public HdPublicKey getChildPublicKey​(HdPublicKey parent,
                                             int child)
        Derive the public child key from HD parent public key
        Parameters:
        parent - the parent key
        child - the child index
        Returns:
      • getPublicKey

        public static byte[] getPublicKey​(byte[] privateKey)