Example #1
0
        /// <summary>
        /// Generates a public key from given secret asynchronously
        /// </summary>
        /// <param name="acc">AccountGeneratePublickeyRequest with secret</param>
        /// <returns>AccountGeneratePublicKeyResponse with public key details</returns>
        public async Task <AccountGeneratePublicKeyResponse> GenerateAccountPublickeyAsync(AccountGeneratePublickeyRequest acc)
        {
            _url.Path  = Constants.ApiPostAccountOpen;
            _url.Query = acc.ToQuery();
            var response = await _client.PostJsonAsync <AccountGeneratePublickeyRequest, AccountGeneratePublicKeyResponse>(_url.ToString(), acc);

            ResetPath();
            return(response);
        }
Example #2
0
 /// <summary>
 /// Generates a public key from given secret asynchronously
 /// </summary>
 /// <param name="acc">AccountGeneratePublickeyRequest with secret</param>
 /// <returns>AccountGeneratePublicKeyResponse with public key details</returns>
 public async Task<AccountGeneratePublicKeyResponse> GenerateAccountPublickeyAsync(AccountGeneratePublickeyRequest acc)
 {
     _url.Path = Constants.ApiPostAccountOpen;
     _url.Query = acc.ToQuery();
     var response = await _client.PostJsonAsync<AccountGeneratePublickeyRequest, AccountGeneratePublicKeyResponse>(_url.ToString(), acc);
     ResetPath();
     return response;
 }
Example #3
0
        /// <summary>
        /// Generates a public key from given secret synchronously
        /// </summary>
        /// <param name="acc">AccountGeneratePublickeyRequest with secret</param>
        /// <returns>AccountGeneratePublicKeyResponse with public key details</returns>
        public AccountGeneratePublicKeyResponse GenerateAccountPublickey(AccountGeneratePublickeyRequest acc)
        {
            var response = GenerateAccountPublickeyAsync(acc).GetAwaiter().GetResult();

            return(response);
        }
Example #4
0
        /// <summary>
        /// Generates a public key from given secret synchronously
        /// </summary>
        /// <param name="acc">AccountGeneratePublickeyRequest with secret</param>
        /// <returns>AccountGeneratePublicKeyResponse with public key details</returns>
        public AccountGeneratePublicKeyResponse GenerateAccountPublickey(AccountGeneratePublickeyRequest acc)
        {
            var response = GenerateAccountPublickeyAsync(acc).GetAwaiter().GetResult();

            return response;
        }