builder method

PathPaymentStrictReceiveOperationBuilder builder (
  1. XdrPathPaymentStrictReceiveOp op
)

Builds PathPaymentStrictReceiveOperation operation.

Implementation

static PathPaymentStrictReceiveOperationBuilder builder(XdrPathPaymentStrictReceiveOp op) {
  List<Asset> path = List<Asset>(op.path.length);
  for (int i = 0; i < op.path.length; i++) {
    path[i] = Asset.fromXdr(op.path[i]);
  }
  return PathPaymentStrictReceiveOperationBuilder (
      Asset.fromXdr(op.sendAsset),
      Operation.fromXdrAmount(op.sendMax.int64),
      KeyPair.fromXdrPublicKey(op.destination.accountID).accountId,
      Asset.fromXdr(op.destAsset),
      Operation.fromXdrAmount(op.destAmount.int64))
      .setPath(path);
}