示例#1
0
 /// <summary>
 /// Adds a new transactions on the remote node asynchronously. Secret, Amount and RecipientId are required 
 /// </summary>
 /// <param name="req">Transaction details</param>
 /// <returns>TransactionAddResponse with transactionId</returns>
 public async Task<TransactionAddResponse> AddTransactionAsync(TransactionAddRequest req)
 {
     _url.Path = Constants.ApiPutAddTransaction;
     var response = await _client.PutJsonAsync<TransactionAddRequest, TransactionAddResponse>(_url.ToString(), req);
     ResetPath();
     return response;
 }
示例#2
0
 /// <summary>
 /// Adds a new transactions on the remote node synchronously. Secret, Amount and RecipientId are required 
 /// </summary>
 /// <param name="req">Transaction details</param>
 /// <returns>TransactionAddResponse with transactionId</returns>
 public TransactionAddResponse AddTransaction(TransactionAddRequest req)
 {
     var response = AddTransactionAsync(req).GetAwaiter().GetResult();
     return response;
 }