public IEnumerable <DictionaryObject> GetObjects(string url, params object[] args) { return(Http.GetObjects($"{_host}/{url}", args)); }
public string CalculateFee(DictionaryObject transaction) { return(Http.Post($"{_host}/transactions/calculateFee", transaction)); }
public DictionaryObject GetObject(string url, params object[] args) { return(Http.GetObject($"{_host}/{url}", args)); }
public DictionaryObject[] GetTransactionsByAddress(string address, int limit) { return(Http.GetFlatObjects($"{_host}/transactions/address/{address}/limit/{limit}")); }
public decimal CalculateFee(Transaction transaction) { var response = Http.Post($"{_host}/transactions/calculateFee", transaction.GetJsonWithSignature()).ParseJsonObject().GetInt("feeAmount"); return(response); }
public string Broadcast(DictionaryObject transaction) { return(Http.Post($"{_host}/transactions/broadcast", transaction)); }
public string BatchBroadcast(IEnumerable <Transaction> transactions) { var data = transactions.Select(t => t.GetJsonWithSignature()).ToArray(); return(Http.Post($"{_host}/assets/broadcast/batch-transfer", data)); }
public string Broadcast(Transaction transaction) { return(Http.Post($"{_host}/transactions/broadcast", transaction.GetJsonWithSignature())); }
public string Post(string url, string data) { return(Http.Post(_host + url, data)); }
public Transaction[] GetUnconfirmedTransactions() { return(Http.GetObjects($"{_host}/transactions/unconfirmed").Select(tx => { return Transaction.FromJson(ChainId, tx); }).ToArray()); }
public long GetBlockTimestamp(long height) { return(Http.GetObject($"{_host}/blocks/headers/at/{height}").GetLong("timestamp")); }
public long TransactionsCount(long height) { return(Http.GetObject($"{_host}/blocks/headers/at/{height}").GetInt("transactionCount")); }