Class HdKeyGenerator
- java.lang.Object
-
- com.bloxbean.cardano.client.crypto.bip32.HdKeyGenerator
-
public class HdKeyGenerator extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
MASTER_PATH
-
Constructor Summary
Constructors Constructor Description HdKeyGenerator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description HdKeyPair
getAccountKeyPairFromSecretKey(byte[] xprv, DerivationPath derivationPath)
HdKeyPair
getChildKeyPair(HdKeyPair parent, long child, boolean isHardened)
Derive the child key pair (public + private) from the parent key pair.HdPublicKey
getChildPublicKey(HdPublicKey parent, int child)
Derive the public child key from HD parent public keystatic byte[]
getPublicKey(byte[] privateKey)
HdKeyPair
getRootKeyPairFromEntropy(byte[] entropy)
-
-
-
Field Detail
-
MASTER_PATH
public static final java.lang.String MASTER_PATH
- See Also:
- Constant Field Values
-
-
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 keychild
- the child indexisHardened
- 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 keychild
- the child index- Returns:
-
getPublicKey
public static byte[] getPublicKey(byte[] privateKey)
-
-