Class BipStandardDeterministicKeyChain

java.lang.Object
org.bitcoinj.wallet.DeterministicKeyChain
org.consensusj.bitcoinj.wallet.BipStandardDeterministicKeyChain
All Implemented Interfaces:
org.bitcoinj.wallet.EncryptableKeyChain, org.bitcoinj.wallet.KeyChain

public class BipStandardDeterministicKeyChain extends org.bitcoinj.wallet.DeterministicKeyChain
Deterministic Keychain for BIP44 and related BIPs

This class adds two things to DeterministicKeyChain:

  1. A constructor that builds the keychain using the correct paths for BIP44, etc.
  2. Methods to get keys and addresses -- functionality that could/should also work with BIP 32
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.bitcoinj.wallet.DeterministicKeyChain

    org.bitcoinj.wallet.DeterministicKeyChain.Builder<T extends org.bitcoinj.wallet.DeterministicKeyChain.Builder<T>>

    Nested classes/interfaces inherited from interface org.bitcoinj.wallet.KeyChain

    org.bitcoinj.wallet.KeyChain.KeyPurpose
  • Field Summary

    Fields inherited from class org.bitcoinj.wallet.DeterministicKeyChain

    ACCOUNT_ONE_PATH, ACCOUNT_ZERO_PATH, BIP44_ACCOUNT_ZERO_PATH, DEFAULT_PASSPHRASE_FOR_MNEMONIC, EXTERNAL_SUBPATH, INTERNAL_SUBPATH, lock, lookaheadSize, lookaheadThreshold
  • Constructor Summary

    Constructors
    Constructor
    Description
    BipStandardDeterministicKeyChain(org.bitcoinj.wallet.DeterministicKeyChain hdChain, org.bitcoinj.base.Network network)
    Construct a BipStandardDeterministicKeyChain from a DeterministicKeyChain THIS IS NOT A WRAPPER, BUT A COPY -- THIS IS PROBABLY NOT WHAT WE WANT!
    BipStandardDeterministicKeyChain(org.bitcoinj.wallet.DeterministicSeed seed, org.bitcoinj.base.ScriptType outputScriptType, org.bitcoinj.base.Network network)
    Constructor for a BIP44-family compliant DeterministicKeyChain
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bitcoinj.base.Address
    address(org.bitcoinj.crypto.HDPath path)
     
    org.bitcoinj.base.Address
    addressFromKey(org.bitcoinj.crypto.ECKey key)
     
    org.bitcoinj.base.Address
    changeAddr(int index)
     
    org.bitcoinj.crypto.DeterministicKey
    changeKey(int index)
     
    org.bitcoinj.crypto.DeterministicKey
    key(org.bitcoinj.crypto.HDPath path)
     
    org.bitcoinj.base.Address
    receivingAddr(int index)
     
    org.bitcoinj.crypto.DeterministicKey
    receivingKey(int index)
     

    Methods inherited from class org.bitcoinj.wallet.DeterministicKeyChain

    addEventListener, addEventListener, builder, checkAESKey, checkPassword, earliestKeyCreationTime, findKeyFromPubHash, findKeyFromPubKey, findRedeemDataByScriptHash, formatAddresses, freshOutputScript, fromProtobuf, getAccountPath, getFilter, getIssuedExternalKeys, getIssuedInternalKeys, getIssuedReceiveKeys, getKey, getKeyByPath, getKeyByPath, getKeyByPath, getKeyCrypter, getKeyLookaheadEpoch, getKeys, getLeafKeys, getLookaheadSize, getLookaheadThreshold, getMnemonicCode, getOutputScriptType, getRedeemData, getRootKey, getSeed, getSigsRequiredToSpend, getWatchingKey, hasKey, isFollowing, isWatching, makeKeyChainFromSeed, markKeyAsUsed, markPubHashAsUsed, markPubKeyAsUsed, maybeLookAhead, maybeLookAheadScripts, numBloomFilterEntries, numKeys, numLeafKeysIssued, removeEventListener, serializeMyselfToProtobuf, serializeToProtobuf, setLookaheadSize, setLookaheadThreshold, setSigsRequiredToSpend, toDecrypted, toDecrypted, toEncrypted, toEncrypted, toString, toString, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.bitcoinj.wallet.KeyChain

    getEarliestKeyCreationTime
  • Constructor Details

    • BipStandardDeterministicKeyChain

      public BipStandardDeterministicKeyChain(org.bitcoinj.wallet.DeterministicSeed seed, org.bitcoinj.base.ScriptType outputScriptType, org.bitcoinj.base.Network network)
      Constructor for a BIP44-family compliant DeterministicKeyChain
      Parameters:
      seed - Seed to use
      outputScriptType - script type for determining the purpose child
      network - used to set coinType, etc
    • BipStandardDeterministicKeyChain

      public BipStandardDeterministicKeyChain(org.bitcoinj.wallet.DeterministicKeyChain hdChain, org.bitcoinj.base.Network network)
      Construct a BipStandardDeterministicKeyChain from a DeterministicKeyChain THIS IS NOT A WRAPPER, BUT A COPY -- THIS IS PROBABLY NOT WHAT WE WANT!
      Parameters:
      hdChain - existing DeterministicKeyChain
      network - network (used for constructing addresses)
  • Method Details

    • addressFromKey

      public org.bitcoinj.base.Address addressFromKey(org.bitcoinj.crypto.ECKey key)
    • receivingAddr

      public org.bitcoinj.base.Address receivingAddr(int index)
    • changeAddr

      public org.bitcoinj.base.Address changeAddr(int index)
    • address

      public org.bitcoinj.base.Address address(org.bitcoinj.crypto.HDPath path)
    • receivingKey

      public org.bitcoinj.crypto.DeterministicKey receivingKey(int index)
    • changeKey

      public org.bitcoinj.crypto.DeterministicKey changeKey(int index)
    • key

      public org.bitcoinj.crypto.DeterministicKey key(org.bitcoinj.crypto.HDPath path)