Пример #1
0
        /// <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);
        }
Пример #2
0
 /// <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;
 }
Пример #3
0
        /// <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);
        }
Пример #4
0
        /// <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;
        }