Search in sources :

Example 1 with HDPath

use of org.bitcoinj.crypto.HDPath in project Elastos.DID.Java.SDK by elastos.

the class HDKey method derive.

public HDKey derive(String path) {
    HDPath derivePath = HDPath.parsePath(path);
    DeterministicKey child = key;
    for (ChildNumber childNumber : derivePath) child = HDKeyDerivation.deriveChildKey(child, childNumber);
    return new HDKey(child);
}
Also used : HDPath(org.bitcoinj.crypto.HDPath) ChildNumber(org.bitcoinj.crypto.ChildNumber) DeterministicKey(org.bitcoinj.crypto.DeterministicKey)

Aggregations

ChildNumber (org.bitcoinj.crypto.ChildNumber)1 DeterministicKey (org.bitcoinj.crypto.DeterministicKey)1 HDPath (org.bitcoinj.crypto.HDPath)1