Exemplo n.º 1
0
        public static Transaction BuildTransaction(TransactionBuilderOptions options, params Operation[] operations)
        {
            var builder = new TransactionBuilder(options.Source);

            builder.SetFee(options.Fee);
            if (!string.IsNullOrWhiteSpace(options.Memo))
            {
                builder.AddMemo(Memo.Text(options.Memo));
            }

            foreach (var op in operations)
            {
                builder.AddOperation(op);
            }

            var transaction = builder.Build();

            return(transaction);
        }
Exemplo n.º 2
0
        public static Transaction BuildBumpSequenceTransaction(TransactionBuilderOptions options, long bumpTo)
        {
            var bumpToOp = new BumpSequenceOperation.Builder(bumpTo).Build();

            return(BuildTransaction(options, bumpToOp));
        }
Exemplo n.º 3
0
        public static Transaction BuildPaymentTransaction(TransactionBuilderOptions options, KeyPair destination, Asset asset, long amount)
        {
            var paymentOperation = new PaymentOperation.Builder(destination, asset, Amount.FromXdr(amount)).Build();

            return(BuildTransaction(options, paymentOperation));
        }