public override xdr.Operation.OperationBody ToOperationBody()
        {
            xdr.Operation.OperationBody body = new xdr.Operation.OperationBody
            {
                Discriminant = OperationType.Create(OperationType.OperationTypeEnum.INFLATION)
            };

            return(body);
        }
        /// <summary>
        /// Returns the Account Merge XDR Operation Body
        /// </summary>
        /// <returns></returns>
        public override xdr.Operation.OperationBody ToOperationBody()
        {
            var body        = new xdr.Operation.OperationBody();
            var destination = new AccountID {
                InnerValue = Destination.XdrPublicKey
            };

            body.Destination  = destination;
            body.Discriminant = OperationType.Create(OperationType.OperationTypeEnum.ACCOUNT_MERGE);
            return(body);
        }
        public override xdr.Operation.OperationBody ToOperationBody()
        {
            var op = new CreateAccountOp();
            var destination = new AccountID();
            destination.InnerValue = Destination.XdrPublicKey;
            op.Destination = destination;
            var startingBalance = new Int64();
            startingBalance.InnerValue = ToXdrAmount(StartingBalance);
            op.StartingBalance = startingBalance;

            var body = new xdr.Operation.OperationBody();
            body.Discriminant = OperationType.Create(OperationType.OperationTypeEnum.CREATE_ACCOUNT);
            body.CreateAccountOp = op;
            return body;
        }
        public override xdr.Operation.OperationBody ToOperationBody()
        {
            PaymentOp op = new PaymentOp();

            // destination
            AccountID destination = new AccountID();

            destination.InnerValue = Destination.XdrPublicKey;
            op.Destination         = destination;
            // asset
            op.Asset = Asset.ToXdr();
            // amount
            Int64 amount = new Int64();

            amount.InnerValue = ToXdrAmount(Amount);
            op.Amount         = amount;

            xdr.Operation.OperationBody body = new xdr.Operation.OperationBody();
            body.Discriminant = OperationType.Create(OperationType.OperationTypeEnum.PAYMENT);
            body.PaymentOp    = op;
            return(body);
        }
 /// <summary>
 /// Builder to build the AccountMerge Operation given an XDR OperationBody
 /// </summary>
 /// <param name="op"></param>
 public Builder(xdr.Operation.OperationBody op)
 {
     _destination = KeyPair.FromXdrPublicKey(op.Destination.InnerValue);
 }