All Projects → NovaCrypto → BIP44

NovaCrypto / BIP44

Licence: GPL-3.0 license
Java microlibrary implementation of BIP0044

Programming Languages

java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to BIP44

vite-app-ios
Vite Official App for iOS
Stars: ✭ 40 (+0%)
Mutual labels:  bip44
Multy-Core
Cross-platform mobile-first library for HD wallets and creating raw transactions of Bitcoin and Ethereum.
Stars: ✭ 23 (-42.5%)
Mutual labels:  bip44
ChainWallet
一个以研究技术为目地的基础项目,也只有最基本 Bitcoin、Ethereum 、EOS 相关的加密算法。
Stars: ✭ 26 (-35%)
Mutual labels:  bip44
go-bip44
A Golang implementation of the BIP44 for Hierarchical Deterministic (HD) addresses.
Stars: ✭ 23 (-42.5%)
Mutual labels:  bip44
mnemonic-sdk
Mnemonic bip39 bip32 bip44 生成助记词 私钥
Stars: ✭ 25 (-37.5%)
Mutual labels:  bip44
python-hdwallet
Python-based library for the implementation of a hierarchical deterministic wallet generator for more than 140+ multiple cryptocurrencies.
Stars: ✭ 210 (+425%)
Mutual labels:  bip44
cashuwallet
Cashu is a cryptocurrency wallet for smartphones. Be your own bank. Accept payments or spend crypto directly from your phone.
Stars: ✭ 35 (-12.5%)
Mutual labels:  bip44
ethereum-hdwallet
CLI and Node.js library for Ethereum HD Wallet derivations from mnemonic
Stars: ✭ 44 (+10%)
Mutual labels:  bip44
ed25519-hd-key
🔐 Key Derivation for ed25519
Stars: ✭ 54 (+35%)
Mutual labels:  bip44
Multy-android
Mobile multy-blockchain wallet client.
Stars: ✭ 17 (-57.5%)
Mutual labels:  bip44
bitcoincashj
A library for working with Bitcoin Cash
Stars: ✭ 38 (-5%)
Mutual labels:  bip44
Multy-IOS
Mobile multy-blockchain wallet client.
Stars: ✭ 25 (-37.5%)
Mutual labels:  bip44

Download Build Status codecov

Install

Repository:

repositories {
    maven {
        url 'https://dl.bintray.com/novacrypto/BIP/'
    }
}

Add dependency:

dependencies {
    compile 'io.github.novacrypto:BIP44:2019.01.27'
}

Usage

Fluent construction

AddressIndex addressIndex = BIP44
                                .m()
                                .purpose44()
                                .coinType(2)
                                .account(1)
                                .external()
                                .address(5);

To string

String path = m().purpose44()
                 .coinType(2)
                 .account(1)
                 .external()
                 .address(5)
                 .toString(); //"m/44'/2'/1'/0/5"

Deriving

Using NovaCrypto/BIP32Derivation keys.

From root

Derive<YourKeyType> derive = new CkdFunctionDerive<>((parent, childIndex) -> {/*your CKD function*/}, yourRootKey);
YourKeyType ketAtPath = derive.derive(addressIndex, AddressIndex.DERIVATION);

Account from root

Account account = m().purpose44()
                     .coinType(2)
                     .account(1);
YourKeyType addressKey = derive
                     .derive(account, Account.DERIVATION);

From account private

Derive<YourKeyType> derive = new CkdFunctionDerive<>((parent, childIndex) -> {/*your CKD function*/}, accountPrivateKey);
YourKeyType addressKey = derive
                     .derive(addressIndex, AddressIndex.DERIVATION_FROM_ACCOUNT);

From account public

Derive<YourKeyType> derive = new CkdFunctionDerive<>((parent, childIndex) -> {/*your CKD function*/}, accountPublicKey);
YourKeyType addressKey = derive
                     .derive(addressIndex, AddressIndex.DERIVATION_FROM_ACCOUNT);

Deriving from NovaCrypto BIP32

Using NovaCrypto/BIP32 keys, which implement Derive<> directly:

WIP

!!! Note that BIP32 is a work in progress and you shouldn't use this just yet for any main net transactions. !!!

From root

PrivateKey addressKey = rootPrivateKey
                     .derive(addressIndex, AddressIndex.DERIVATION);

Account from root

Account account = m().purpose44()
                     .coinType(2)
                     .account(1);
PrivateKey addressKey = rootPrivateKey
                     .derive(account, Account.DERIVATION);

From account private

PrivateKey addressKey = accountPrivateKey
                     .derive(addressIndex, AddressIndex.DERIVATION_FROM_ACCOUNT);

From account public

PublicKey addressKey = accountPublicKey
                     .derive(addressIndex, AddressIndex.DERIVATION_FROM_ACCOUNT);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].