Import wallet programatically – Bitcoin Stack Exchange


is there a way to allow the user to import his existing wallet into my app

That looks a bit like this API function:

https://www.blockchain.com/api/blockchain_wallet_api says

Create Wallet API


Create blockchain wallets programmatically

The create_wallet method can be used to create a new blockchain.info bitcoin wallet.

URL: http://localhost:3000/api/v2/create
Method: POST or GET

  • $password The password for the new wallet. Must be at least 10
    characters in length.
  • $api_code An API code with create wallets permission.
  • $priv A private key to add to the wallet (Wallet import
    format preferred). (Optional)
  • $label A label to set for the first> address in the wallet. Alphanumeric only. (Optional)
  • $email An email to associate with the new wallet i.e. the email address of the user
    you are creating this wallet on behalf of. (Optional)

Please create an API code here including permissions to “Create Wallets”.

Your app can read an existing wallet file, extract the private key (or keys) and use this function to create blockchain wallets containing those keys (and hence allowing the spending of all money “in” that existing wallet file)

Maybe there is some feature of this that you find unsuitable – but haven’t explained fully why?

It is not unusual for businesses to require a different arrangement with merchants using their services commercially as a back-end. Whether your use might fit into this category is unclear, but a read of the Terms & Conditions for commercial use of their service might clarify this.