# BIP32Derivation **Repository Path**: wheat235/BIP32Derivation ## Basic Information - **Project Name**: BIP32Derivation - **Description**: BIP32Derivation - **Primary Language**: Java - **License**: GPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-04-17 - **Last Updated**: 2023-04-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README [![Download](https://api.bintray.com/packages/novacrypto/BIP/BIP32derivation/images/download.svg)](https://bintray.com/novacrypto/BIP/BIP32derivation/_latestVersion) [![Build Status](https://travis-ci.org/NovaCrypto/BIP32Derivation.svg?branch=master)](https://travis-ci.org/NovaCrypto/BIP32Derivation) [![codecov](https://codecov.io/gh/NovaCrypto/BIP32derivation/branch/master/graph/badge.svg)](https://codecov.io/gh/NovaCrypto/BIP32derivation) # Install Use either of these repositories: ``` repositories { jcenter() } ``` (coming soon) Or: ``` repositories { maven { url 'https://dl.bintray.com/novacrypto/BIP/' } } ``` Add dependency: ``` dependencies { compile 'io.github.novacrypto:BIP32derivation:2019.01.27@jar' } ``` # Usage ``` Derive derive = new CkdFunctionDerive<>((parent, childIndex) -> {/*your CKD function*/}, yourRootKey); YourKeyType ketAtPath = derive.derive("m/44'/0'/0'/0/0"); ``` ## With own path type If you don't want to use strings to describe paths. ``` Derive derive = new CkdFunctionDerive<>((parent, childIndex) -> {/*your CKD function*/}, yourRootKey); YourKeyType ketAtPath = derive.derive(YourCustomPathType, YourCustomDeriveImplementation); ``` ## Caching ``` CkdFunction ckd = (parent, childIndex) -> {/*your CKD function*/}; CkdFunction ckdWithCache = CkdFunctionResultCacheDecorator.newCacheOf(ckd); Derive derive = new CkdFunctionDerive<>(ckdWithCache, yourRootKey); YourKeyType ketAtPath1 = derive.derive("m/44'/0'/0'/0/0"); YourKeyType ketAtPath2 = derive.derive("m/44'/0'/0'/0/0"); assertSame(ketAtPath1, ketAtPath2); ``` Note you can use [NovaCrypto/BIP44](https://github.com/NovaCrypto/BIP44) to form the path with a fluent syntax.