how do I get list of all "used" addresses in bitcoinj Bitcoinj generates receiving addresses on demand and change addresses after each transaction. So how do I list all receiving addresses ? I guess I have to deal with KeyChainGroup and BasicKeyChain. I know how to get all issued receive keys

wallet.getActiveKeyChain().getIssuedReceiveKeys();


but cannot find change keys. So where is getIssuedChangeKeys() method or if there is not such method whta is the reason. I'm trying to imagine how recovery would work if the wallet is restored from seed.
This seems to get change addresses:

public List&lt;String&gt; getChangeAddresses() {
    List&lt;String&gt; ret = new ArrayList&lt;&gt;();
    int issuedKeys = wallet.getActiveKeyChain().getIssuedInternalKeys();

    for (int i = 0; i &lt; issuedKeys; i++) {
        ChildNumber childNumber = new ChildNumber(i, false);
        List&lt;ChildNumber&gt; childNumbers = new ArrayList&lt;&gt;();
        childNumbers.add(ChildNumber.ZERO_HARDENED);
        childNumbers.add(ChildNumber.ONE);
        childNumbers.add(childNumber);
        ECKey key = wallet.getKeyByPath(childNumbers);
        ret.add(new Address(params, key.getPubKeyHash()).toBase58());
    }
    return ret;
}