Search code examples
asp.net-web-apiasp.net-corebitcoin

Unable to create wallet of bitcoin from asp.net core web api


Trying to create wallet from the given source by blockchain.info at GIT https://github.com/blockchain/api-v1-client-csharp

I am trying to access src/Info.Blockchain.API/Wallet/WalletCreator.cs in the project using it as API and post request to create the wallet.

The exception reads as:

System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.Http.WinHttpException: A connection with the server could not be established

at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

There might be two possibilities: 1. It is not possible to run the code from developer machine itself (needs hosting and cloud server or can say real ip). 2. Appcode is not having permission to create the wallet.

if anyone has ever worked for it, please suggest the solution.

Thanks


Solution

  • To run the service on localhost, we need to follow these instructions https://github.com/blockchain/service-my-wallet-v3

    basically, node service of blockchain has to run to get the wallet created. We install and run the service as per given github link and it id done.