Example #1
0
        /// <exception cref="ErrorResponseException"/>
        /// <exception cref="UnknownResponseException"/>
        public async Task <WalletModel> GetWalletByPublicAddressAsync(string publicAddress)
        {
            var response = await _api.GetByPublicAddressAsync(publicAddress);

            WalletResponse wallet = ConvertToOrHandleErrorResponse <WalletResponse>(response);

            if (wallet == null)
            {
                return(null);
            }

            return(new WalletModel(wallet.PublicAddress));
        }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='publicAddress'>
 /// </param>
 public static object GetByPublicAddress(this IBlockchainSignServiceAPI operations, string publicAddress)
 {
     return(operations.GetByPublicAddressAsync(publicAddress).GetAwaiter().GetResult());
 }