Exemplo n.º 1
0
 /// <summary>
 /// Amount is a real and is rounded to the nearest 0.00000001.
 /// </summary>
 /// <param name="amount">Amount of transaction fee.</param>
 /// <returns>True if succesfull.</returns>
 public bool SetTxFee(decimal amount)
 {
     return(MakeRequest <bool>("settxfee", EpUtil.DecimalToEp(amount)));
 }
Exemplo n.º 2
0
        /// <summary>
        /// Send bitcoins to multiple addresses in one transaction.
        /// Amounts are double-precision floating point numbers.
        /// </summary>
        /// <param name="fromAccount">The account to send the bitcoins from.</param>
        /// <param name="toBitcoinAddress">A dictionary of address to send bitcoins to. The key is the address, the value is the amount of bitcoins to send.</param>
        /// <param name="minConf"></param>
        /// <param name="comment">A comment to provide with the transaction.</param>
        /// <returns>The transaction ID if succesful.</returns>
        public string SendMany(string fromAccount, Dictionary <string, decimal> toBitcoinAddress, int minConf = 1, string comment = "")
        {
            Dictionary <string, string> toBitcoinAddressEp = toBitcoinAddress.ToDictionary(item => item.Key, item => EpUtil.DecimalToEp(item.Value));

            return(MakeRequest <string>("sendmany", fromAccount, toBitcoinAddressEp, minConf, comment));
        }
Exemplo n.º 3
0
 /// <summary>
 /// Amount is a real and is rounded to 8 decimal places. Returns the transaction ID txid if successful.
 /// </summary>
 /// <param name="bitcoinAddress">Bitcoin address to sent to.</param>
 /// <param name="amount">Amount to send.</param>
 /// <param name="comment">Comment to go with the transaction.</param>
 /// <param name="commentTo">Comment for the 'to' field.</param>
 /// <returns>The transaction ID if succesful.</returns>
 public string SendToAddress(string bitcoinAddress, decimal amount, string comment, string commentTo)
 {
     return(MakeRequest <string>("sendtoaddress", bitcoinAddress, EpUtil.DecimalToEp(amount), comment, commentTo));
 }
Exemplo n.º 4
0
 /// <summary>
 /// Amount is a real and is rounded to 8 decimal places. Will send the given amount to
 /// the given address, ensuring the account has a valid balance using [minconf]
 /// confirmations. Returns the transaction ID if successful (not in JSON object).
 /// </summary>
 /// <param name="fromAccount">From account.</param>
 /// <param name="toBitcoinAddress">Bitcoin address to move bitcoins to.</param>
 /// <param name="amount">Amount to move.</param>
 /// <param name="minConf"></param>
 /// <param name="comment">Comment to go with the transaction.</param>
 /// <param name="commentTo">Comment in the 'to' field.</param>
 /// <returns>The transaction ID if succesful.</returns>
 public string SendFrom(string fromAccount, string toBitcoinAddress, decimal amount, int minConf = 1, string comment = "", string commentTo = "")
 {
     return(MakeRequest <string>("sendfrom", fromAccount, toBitcoinAddress, EpUtil.DecimalToEp(amount), minConf, comment, commentTo));
 }