bitcoin wallet app – How do I build a webwallet soultion for BTC to allow subscribed users deposit their funds, allow to withdraw whenever required by the user?

0
19


You can use Bitcoin Core JSON-RPC API with any language that is used for web development. There are two ways to do this:

Libraries

There are few libraries that will help you develop web applications for Bitcoin. Example: The best JavaScript libraries supporting Bitcoin Core?

OR

  1. Experiment with Bitcoin Core RPC related to wallets on testnet. Once you understand how things work, run bitcoind with below bitcoin.conf:

    testnet=1
    server=1
    
    test.rpcport=PORT
    rpcuser=USERNAME
    rpcpassword=PASSWORD
    
  2. Run Postman (There is also Postwoman but I have not tried it)

  3. Create a request with URL: https://127.0.0.1:RPC_PORT/

  4. Select ‘basic auth’ and enter RPC credentials

  5. Body(raw):

    {"jsonrpc": "1.0", "id": "curltest", "method": "createwallet", "params": ["DW1",false,false,"",true,true]}
    
  6. This will create a descriptor wallet with name ‘DW’ if you send the request. For using it in your web application, you can click on </> code symbol and copy the code for one of the languages:

Few things related to security: https://github.com/bitcoin/bitcoin/blob/master/doc/JSON-RPC-interface.md

There can be more ways or better ways to achieve the same. I am not a web developer. Just trying to help.



Source link

Leave a reply