public override sdkxdr.Operation.OperationBody ToOperationBody() { sdkxdr.ChangeTrustOp op = new sdkxdr.ChangeTrustOp(); op.Line = Asset.ToXdr(); sdkxdr.Int64 limit = new sdkxdr.Int64(); limit.InnerValue = ToXdrAmount(Limit); op.Limit = limit; sdkxdr.Operation.OperationBody body = new sdkxdr.Operation.OperationBody(); body.Discriminant = sdkxdr.OperationType.Create(sdkxdr.OperationType.OperationTypeEnum.CHANGE_TRUST); body.ChangeTrustOp = 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); }