Class KeyChainGroup.Builder
- Enclosing class:
 - KeyChainGroup
 
KeyChainGroup. Use KeyChainGroup.builder(Network) to acquire an instance.- 
Method Summary
Modifier and TypeMethodDescriptionaddChain(DeterministicKeyChain chain) Add a single chain.build()chains(List<DeterministicKeyChain> chains) Add multiple chains.fromKey(DeterministicKey accountKey, ScriptType outputScriptType) Add chain from a given account key.fromRandom(ScriptType outputScriptType) Add chain from a random source.fromSeed(DeterministicSeed seed, ScriptType outputScriptType) Add chain from a given seed.lookaheadSize(int lookaheadSize) Set a custom lookahead size for all deterministic chainslookaheadThreshold(int lookaheadThreshold) Set a custom lookahead threshold for all deterministic chains 
- 
Method Details
- 
fromRandom
Add chain from a random source.
In the case of P2PKH, just a P2PKH chain is created and activated which is then the default chain for fresh addresses. It can be upgraded to P2WPKH later.
In the case of P2WPKH, both a P2PKH and a P2WPKH chain are created and activated, the latter being the default chain. This behaviour will likely be changed in future such that only a P2WPKH chain is created and activated.
- Parameters:
 outputScriptType- type of addresses (aka output scripts) to generate for receiving
 - 
fromSeed
Add chain from a given seed.
In the case of P2PKH, just a P2PKH chain is created and activated which is then the default chain for fresh addresses. It can be upgraded to P2WPKH later.
In the case of P2WPKH, both a P2PKH and a P2WPKH chain are created and activated, the latter being the default chain. This behaviour will likely be changed in future such that only a P2WPKH chain is created and activated.
- Parameters:
 seed- deterministic seed to derive all keys fromoutputScriptType- type of addresses (aka output scripts) to generate for receiving
 - 
fromKey
Add chain from a given account key.
In the case of P2PKH, just a P2PKH chain is created and activated which is then the default chain for fresh addresses. It can be upgraded to P2WPKH later.
In the case of P2WPKH, both a P2PKH and a P2WPKH chain are created and activated, the latter being the default chain. This behaviour will likely be changed with bitcoinj 0.16 such that only a P2WPKH chain is created and activated.
- Parameters:
 accountKey- deterministic account key to derive all keys fromoutputScriptType- type of addresses (aka output scripts) to generate for receiving
 - 
addChain
Add a single chain.- Parameters:
 chain- to add
 - 
chains
Add multiple chains.- Parameters:
 chains- to add
 - 
lookaheadSize
Set a custom lookahead size for all deterministic chains- Parameters:
 lookaheadSize- lookahead size
 - 
lookaheadThreshold
Set a custom lookahead threshold for all deterministic chains- Parameters:
 lookaheadThreshold- lookahead threshold
 - 
build
 
 -