Add functions to getFreeAddress from a branch and getChangeAddress from a pocket.