use of com.samourai.whirlpool.client.mix.handler.MixDestination in project sparrow by sparrowwallet.
the class SparrowPostmixHandler method computeNextDestination.
protected MixDestination computeNextDestination() throws Exception {
// index
int index = Math.max(getIndexHandler().getAndIncrementUnconfirmed(), startIndex);
// address
WalletNode node = new WalletNode(wallet, keyPurpose, index);
Address address = node.getAddress();
String path = XPubUtil.getInstance().getPath(index, keyPurpose.getPathIndex().num());
log.info("Mixing to external xPub -> receiveAddress=" + address + ", path=" + path);
return new MixDestination(DestinationType.XPUB, index, address.toString(), path);
}
Aggregations