/// <summary> /// Adds a new delegate to an account asynchronously /// </summary> /// <param name="acc">AccountDelegateAddRequest with account details and delegate public key</param> /// <returns>AccountDelegateAddResponse with transaction details</returns> public async Task <AccountDelegateAddResponse> AddAccountDelegateAsync(AccountDelegateAddRequest acc) { _url.Path = Constants.ApiPutAccountDelegateAdd; var response = await _client.PutJsonAsync <AccountDelegateAddRequest, AccountDelegateAddResponse>(_url.ToString(), acc); ResetPath(); return(response); }
/// <summary> /// Adds a new delegate to an account asynchronously /// </summary> /// <param name="acc">AccountDelegateAddRequest with account details and delegate public key</param> /// <returns>AccountDelegateAddResponse with transaction details</returns> public async Task<AccountDelegateAddResponse> AddAccountDelegateAsync(AccountDelegateAddRequest acc) { _url.Path = Constants.ApiPutAccountDelegateAdd; var response = await _client.PutJsonAsync<AccountDelegateAddRequest, AccountDelegateAddResponse>(_url.ToString(), acc); ResetPath(); return response; }
/// <summary> /// Adds a new delegate to an account synchronously /// </summary> /// <param name="acc">AccountDelegateAddRequest with account details and delegate public key</param> /// <returns>AccountDelegateAddResponse with transaction details</returns> public AccountDelegateAddResponse AddAccountDelegate(AccountDelegateAddRequest acc) { var response = AddAccountDelegateAsync(acc).GetAwaiter().GetResult(); return(response); }
/// <summary> /// Adds a new delegate to an account synchronously /// </summary> /// <param name="acc">AccountDelegateAddRequest with account details and delegate public key</param> /// <returns>AccountDelegateAddResponse with transaction details</returns> public AccountDelegateAddResponse AddAccountDelegate(AccountDelegateAddRequest acc) { var response = AddAccountDelegateAsync(acc).GetAwaiter().GetResult(); return response; }