Package org.bitcoinj.wallet
Interface KeyChainGroupStructure
public interface KeyChainGroupStructure
Defines a structure for hierarchical deterministic wallets.
  
  Use BIP32 for BIP-32 wallets and BIP43 for
  BIP-43-family wallets.
  
  bitcoinj BIP-32 wallets use DeterministicKeyChain.ACCOUNT_ZERO_PATH for ScriptType.P2PKH
  and DeterministicKeyChain.ACCOUNT_ONE_PATH for ScriptType.P2WPKH
  
  BIP-43-family wallets structured via KeyChainGroupStructure will always use account number zero. Currently,
  only BIP-44 (P2PKH) and BIP-84 (P2WPKH) are supported.
- 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final KeyChainGroupStructureOriginal bitcoinjKeyChainGroupStructureimplementation.static final KeyChainGroupStructureKeyChainGroupStructureimplementation for BIP-43 family structures.static final KeyChainGroupStructureDeprecated. - 
Method Summary
Modifier and TypeMethodDescriptionstatic ChildNumberaccount(int accountIndex) Return path component for an accountdefault HDPathaccountPathFor(ScriptType outputScriptType) Deprecated.accountPathFor(ScriptType outputScriptType, Network network) Map desired output script type and network to an account pathdefault HDPathaccountPathFor(ScriptType outputScriptType, NetworkParameters networkParameters) Deprecated.static ChildNumberReturn coin type path component for a network idstatic HDPathpurpose(ScriptType scriptType) Return the (root) path containing "purpose" for the specified scriptType 
- 
Field Details
- 
BIP32
Original bitcoinjKeyChainGroupStructureimplementation. Based on BIP32 "Wallet structure". For this structurenetworkis ignored - 
BIP43
KeyChainGroupStructureimplementation for BIP-43 family structures. Currently, BIP-44 and BIP-84 are supported. Account number is hard-coded to zero. - 
DEFAULT
Deprecated.UseBIP32for BIP-32DefaultKeyChainGroupStructureimplementation. Alias forBIP32 
 - 
 - 
Method Details
- 
accountPathFor
Deprecated.Map desired output script type to an account path. Default to MainNet, BIP-32 Keychains use the same path for MainNet and TestNet- Parameters:
 outputScriptType- the script/address type- Returns:
 - account path
 
 - 
accountPathFor
Map desired output script type and network to an account path- Parameters:
 outputScriptType- output script type (purpose)network- network/coin type- Returns:
 - The HD Path: purpose / coinType / accountIndex
 
 - 
accountPathFor
@Deprecated default HDPath accountPathFor(ScriptType outputScriptType, NetworkParameters networkParameters) Deprecated.Map desired output script type and network to an account path- Parameters:
 outputScriptType- output script type (purpose)networkParameters- network/coin type- Returns:
 - The HD Path: purpose / coinType / accountIndex
 
 - 
purpose
Return the (root) path containing "purpose" for the specified scriptType- Parameters:
 scriptType- script/address type- Returns:
 - An HDPath with a BIP44 "purpose" entry
 
 - 
coinType
Return coin type path component for a network id- Parameters:
 network- network id string, e.g.BitcoinNetwork.ID_MAINNET
 - 
account
Return path component for an account- Parameters:
 accountIndex- account index- Returns:
 - A hardened path component
 
 
 - 
 
BIP32for BIP-32