Extended keys 

As discussed a number of child keys can be derived from parent key considering the three required inputs are available. We can also create another type of key, called the extended key, which consists of the parent key and the chain code. 

Furthermore, there are two types of extended keys, distinguished by whether the parent key used is a private key or a public key. An extended key can create children which can further create children in the tree structure.

Extended keys are encoded using Base58Check, which helps to easily export and import between wallets. These keys are basically extensions of the parent keys, hence sharing any extended key gives access to the entire branch in the branch.

An extended private key has the xprv prefix in the key's Base58Check, while an extended public key has the xpub prefix in the key's Base58Check. The following diagram show's how extended keys are formed: