Sha256Hash serverID = getServerID();
// Lock up our entire balance into the channel for this server, minus the reference tx fee.
final BigInteger channelSize = wallet.getBalance().subtract(Transaction.REFERENCE_DEFAULT_MIN_TX_FEE);
final CompletableFuture<Void> future = new CompletableFuture<>();
paymentChannelClient = new PaymentChannelClient(wallet, wallet.getKeys().get(0), channelSize,
serverID, new PaymentChannelClient.ClientConnection() {
@Override
public void sendToServer(Protos.TwoWayChannelMessage paymentMsg) {
Payfile.PayFileMessage msg = Payfile.PayFileMessage.newBuilder()
.setType(Payfile.PayFileMessage.Type.PAYMENT)