コード例 #1
0
 public IEnumerable <DictionaryObject> GetObjects(string url, params object[] args)
 {
     return(Http.GetObjects($"{_host}/{url}", args));
 }
コード例 #2
0
 public string CalculateFee(DictionaryObject transaction)
 {
     return(Http.Post($"{_host}/transactions/calculateFee", transaction));
 }
コード例 #3
0
 public DictionaryObject GetObject(string url, params object[] args)
 {
     return(Http.GetObject($"{_host}/{url}", args));
 }
コード例 #4
0
 public DictionaryObject[] GetTransactionsByAddress(string address, int limit)
 {
     return(Http.GetFlatObjects($"{_host}/transactions/address/{address}/limit/{limit}"));
 }
コード例 #5
0
        public decimal CalculateFee(Transaction transaction)
        {
            var response = Http.Post($"{_host}/transactions/calculateFee", transaction.GetJsonWithSignature()).ParseJsonObject().GetInt("feeAmount");

            return(response);
        }
コード例 #6
0
 public string Broadcast(DictionaryObject transaction)
 {
     return(Http.Post($"{_host}/transactions/broadcast", transaction));
 }
コード例 #7
0
        public string BatchBroadcast(IEnumerable <Transaction> transactions)
        {
            var data = transactions.Select(t => t.GetJsonWithSignature()).ToArray();

            return(Http.Post($"{_host}/assets/broadcast/batch-transfer", data));
        }
コード例 #8
0
 public string Broadcast(Transaction transaction)
 {
     return(Http.Post($"{_host}/transactions/broadcast", transaction.GetJsonWithSignature()));
 }
コード例 #9
0
 public string Post(string url, string data)
 {
     return(Http.Post(_host + url, data));
 }
コード例 #10
0
 public Transaction[] GetUnconfirmedTransactions()
 {
     return(Http.GetObjects($"{_host}/transactions/unconfirmed").Select(tx => {
         return Transaction.FromJson(ChainId, tx);
     }).ToArray());
 }
コード例 #11
0
 public long GetBlockTimestamp(long height)
 {
     return(Http.GetObject($"{_host}/blocks/headers/at/{height}").GetLong("timestamp"));
 }
コード例 #12
0
 public long TransactionsCount(long height)
 {
     return(Http.GetObject($"{_host}/blocks/headers/at/{height}").GetInt("transactionCount"));
 }