예제 #1
0
    public async Task SendMoney(Decimal coin, String destination)
    {
        IPaymentTransaction paymentTransaction = new PaymentTransaction
        {
            Account     = wallet.Address,
            Destination = destination
        };
        Decimal dec = coin;

        paymentTransaction.Amount = new Currency {
            ValueAsXrp = dec
        };
        paymentTransaction.Sequence = accountInfo.AccountData.Sequence;

        TxSigner signer   = TxSigner.FromSecret(wallet.PrivateKey);
        SignedTx signedTx = signer.SignJson(JObject.Parse(paymentTransaction.ToJson()));

        SubmitBlobRequest request = new SubmitBlobRequest
        {
            TransactionBlob = signedTx.TxBlob
        };

        Submit result = await RippleClientUBC.GetClient().client.SubmitTransactionBlob(request);

        AccountInfo accoun = await RippleClientUBC.GetClient().client.AccountInfo(wallet.Address);

        AccountInfo accountIfo = await RippleClientUBC.GetClient().client.AccountInfo(destination);
    }
예제 #2
0
        private static void Main(System.String[] args)
        {
            try
            {
                UpdateSystem updateSystem = new UpdateSystem();
                updateSystem.Start();

                //var a = Convert.ToString(Console.ReadLine());
                //session.CreateSession(a).Wait();

                // 1046277477:AAHxIx5MkmYSEH9qIiGYlLMTEUcz5Nage6E

                //676537196:AAG4Y1D9JwQAtwXpPJYqPKAnPqA8CBkb2qU
                //965810994:AAE2fkzML2sZFS0BjqlaeQv97Elhi8y823U

                //741970595:AAHSTsVYg_tGhelF_2M7BDKvxf2v9vfTq_E
                RippleClientUBC.GetClient().client = new RippleDotNet.RippleClient("wss://s1.ripple.com:443");
                Bot bot = new Bot("1046277477:AAHxIx5MkmYSEH9qIiGYlLMTEUcz5Nage6E");
                bot._exitEvent.WaitOne();
            }
            catch (Exception e)
            {
                using (FileStream fs = File.Open("log", FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.ReadWrite))
                {
                    fs.Write(Encoding.UTF8.GetBytes(e.Message));
                }
            }
        }
예제 #3
0
    public async Task ChangeWalletUBC(String addr, String pv)
    {
        accountInfo = await RippleClientUBC.GetClient().client.AccountInfo(addr);

        wallet.Address    = addr;
        wallet.PrivateKey = pv;
        Console.WriteLine("Address = " + addr + " \n PrivateKey = " + pv);
    }