/** * Returns list of related addresses * Also useful for finding all change addresses in the wallet * @return a lost of address groupings * @throws JsonRpcStatusException JSON RPC status exception * @throws IOException network error */ public List<List<AddressGroupingItem>> listAddressGroupings() throws JsonRpcStatusException, IOException { // TODO: I'm not sure how to make Jackson mapping work automatically here. List<List<List<Object>>> raw = send("listaddressgroupings"); List<List<AddressGroupingItem>> result = new ArrayList<>(); for (List<List<Object>> rawGrouping : raw) { List<AddressGroupingItem> grouping = new ArrayList<>(); for (List<Object> addressItem : rawGrouping) { AddressGroupingItem item = new AddressGroupingItem(addressItem, getNetParams()); grouping.add(item); } result.add(grouping); } return result; }