Exemple #1
0
        public override Generated.Operation.OperationBody ToOperationBody()
        {
            var op = new Generated.PaymentOp
            {
                Destination = Destination.AccountId,
                Amount      = new Generated.Int64(Amount),
                Asset       = Asset.ToXDR()
            };

            var body = new Generated.Operation.OperationBody
            {
                PaymentOp    = op,
                Discriminant = Generated.OperationType.Create(Generated.OperationType.OperationTypeEnum.PAYMENT)
            };

            return(body);
        }
Exemple #2
0
 public Builder(Generated.PaymentOp op)
 {
     Destination = KeyPair.FromXdrPublicKey(op.Destination.InnerValue);
     Asset       = Asset.FromXDR(op.Asset);
     Amount      = op.Amount.InnerValue;
 }