blockchain-wallet-service

Programmatically interface with your Blockchain.info wallet.

To use this API, you will need to run puny local service which be responsible for managing your Blockchain.info wallet. Your application interacts with this service locally via HTTP API calls.

Embark by completing the following steps:

  1. Go after the installation instructions
  2. Embark the server: $ blockchain-wallet-service begin –port 3000
  3. Reference the documentation and embark interacting with your wallet programmatically!

Note that blockchain-wallet-service is designed to be run locally on the same machine as your application and therefore will only accept connections from localhost . If you modify this service to accept outer connections, be sure to add the suitable firewall rules to prevent unauthorized use.

An API code is required for wallet creation and higher request boundaries. For basic usage, no API code is required. Request an API code here.

If you already have an application that uses Blockchain.info’s Wallet API, you will need to accomplish the steps in the Getting Embarked section above and then, in your application code, substitute calls to blockchain.info/merchant/. with localhost:<port>/merchant/. .

All endpoints present in the API documentation above are supported in Blockchain Wallet API V2. The differences inbetween two are:

  • The "consolidate addresses" endpoint has been omitted

All endpoints can be called with GET or POST , and can only be accessed from localhost .

  • password – main wallet password (required)
  • api_code – blockchain.info wallet api code (required)
  • priv – private key to import into wallet as very first address (optional)
  • label – label to give to the very first address generated in the wallet (optional)
  • email – email to associate with the freshly created wallet (optional)
  • to – bitcoin address to send to (required)
  • amount – amount in satoshi to send (required)
  • password – main wallet password (required)
  • second_password – 2nd wallet password (required, only if 2nd password is enabled)
  • api_code – blockchain.info wallet api code (optional)
  • from – bitcoin address or account index to send from (optional)
  • fee – specify transaction fee in satoshi (optional, otherwise fee is computed)
  • recipients – a URI encodedJSON object, with bitcoin addresses as keys and the satoshi amounts as values (required, see example below)
  • password – main wallet password (required)
  • second_password – 2nd wallet password (required, only if 2nd password is enabled)
  • api_code – blockchain.info wallet api code (optional)
  • from – bitcoin address or account index to send from (optional)
  • fee – specify transaction fee in satoshi (optional, otherwise fee is computed)

URI Encoding a JSON object in JavaScript:

  • password – main wallet password (required)
  • api_code – blockchain.info wallet api code (required)
  • password – main wallet password (required)
  • api_code – blockchain.info wallet api code (optional)

This will upgrade a wallet to an HD (Hierarchical Deterministic) Wallet, which permits the use of accounts. See BIP32 for more information on HD wallets and accounts.

  • password – main wallet password (required)
  • api_code – blockchain.info wallet api code (optional)
  • password – main wallet password (required)
  • api_code – blockchain.info wallet api code (optional)
  • label – label to assign to the freshly created account (optional)
  • password – main wallet password (required)
  • api_code – blockchain.info wallet api code (optional)
  • password – main wallet password (required)
  • api_code – blockchain.info wallet api code (optional)
  • password – main wallet password (required)
  • api_code – blockchain.info wallet api code (optional)
  • password – main wallet password (required)
  • api_code – blockchain.info wallet api code (optional)
  • password – main wallet password (required)
  • api_code – blockchain.info wallet api code (optional)
  • password – main wallet password (required)
  • api_code – blockchain.info wallet api code (optional)
  • password – main wallet password (required)
  • api_code – blockchain.info wallet api code (optional)
  • address – address to fetch balance for (required)
  • password – main wallet password (required)
  • api_code – blockchain.info wallet api code (optional)

Note: unlike the hosted API, there is no option of a confirmations parameter for specifying minimum confirmations.

  • password – main wallet password (required)
  • label – label to give to the address (optional)
  • api_code – blockchain.info wallet api code (optional)
  • address – address to archive (required)
  • password – main wallet password (required)
  • api_code – blockchain.info wallet api code (optional)
  • address – address to unarchive (required)
  • password – main wallet password (required)
  • api_code – blockchain.info wallet api code (optional)

Bitcoind compatible RPC API. Total documentation available here.

Kicking off the RPC server:

View extra options and instructions under Usage.

Differences from server API:

  • Option -rpcssl is not supported
  • Method listsinceblock is not supported
  • Param minConfimations is not supported for methods listreceivedbyaccount and listreceivedbyaddress
  • Param minimumConfirmations is not supported for method getbalance
  • Param confirmations is not supported for method listaccounts
  • Responses signifying transactions have a different format

nodejs and npm are required to install and use this API service. Installation:

For the best stability and spectacle, make sure you are always using the latest version.

To check your version:

To update to the latest version:

If you have issues with the installation process, see the troubleshooting section below.

If you are getting EACCESS or permissions-related errors, it might be necessary to run the install as root, using the sudo instruction.

If you are getting errors concerning node-gyp or python, install with npm install –no-optional

  • If startup fails with /usr/bin/env: knot: No such file or directory , it’s possible knot is not installed, or was installed with a different name (Ubuntu, for example, installs knot as nodejs). If knot was installed with a different name, create a symlink to your knot binary: sudo ln -s /usr/bin/nodejs /usr/bin/knot , or install knot through Knot Version Manager.

If you are watching a TypeError claiming that an object has no method ‘compare’ , it is because you are on a version of Knot older than 0.12, before the compare method was added to Buffers. Attempt upgrading to at least Knot version 0.12.

If you are getting wallet decryption errors despite having correct credentials, then it’s possible that you do not have Java installed, which is required by a dependency of the my-wallet-v3 module. Not having Java installed during the npm install process can result in the inability to decrypt wallets. Download the JDK from here for Mac or by running apt-get install default-jdk on debian-based linux systems.

  • If you are getting a timeout response, extra authorization from your blockchain wallet may be required. This can occur when using an unrecognized browser or IP address. An email authorizing the API access attempt will be sent to the registered user that will require activity in order to authorize future requests.

If this section did not help, please open a github issue or visit our support center.

After installing the service, the guideline blockchain-wallet-service will be available for use.

  • -h, –help – output usage information
  • -V, –version – output the version number
  • -c, –cwd – use the current directory as the wallet service module (development only)

Usage: blockchain-wallet-service commence [options]

This guideline will embark the service, making Blockchain Wallet API V2 available on a specified port.

  • -h, –help – output usage information
  • -p, –port – port number to run the server on (defaults to three thousand )
  • -b, –bind – tie to a specific ip (defaults to 127.0.0.1 , note that strapping to an ip other than this can lead to security vulnerabilities)
  • –ssl-key – the path to your ssl key (optional)
  • –ssl-cert – the path to your ssl certificate (optional)

To open the service to all incoming connections, tie to 0.0.0.0 .

Usage: blockchain-wallet-service start-rpc [options]

This instruction will embark the JSON RPC server.

  • -k, –key – api code to use for server requests (required option)
  • -p, –rpcport – rpc server port (default: 8000)
  • -b, –bind – truss to a specific ip (defaults to 127.0.0.1 , note that cording to an ip other than this can lead to security vulnerabilities)

Get an API code here.

To commence the Wallet API service on port 3000:

  1. Clone this repo
  2. Run yarn –ignore-engines
  3. Run yarn commence
  4. Dev server is now running on port 3000

If you are developing blockchain-wallet-client alongside this module, it is useful to create a symlink to my-wallet-v3 :

Optional parameters can be configured in a .env file:

  • PORT – port number for running dev server (default: three thousand )
  • Truss – ip address to truss the service to (default: 127.0.0.1 )

If you want to use blockchain-wallet-service in your UNIX production server, you just have to run:

Use this within your firewall

Combine open-source packages with your private code and publish to a private registry behind the firewall. npm ♥ enterprise developers

Related video:

admin_en | 1@1.com

Related Posts

Без кейворда Blockchain is being touted around the world as a disruptive technology that could revolutionize finance, trade, legal systems, digital media, and much more. But blockchain tech has one big obstacle: it’s hard to wrap your head around. To help laymen better understand blockchain, we reached out to Bitcoin experts around the globe.

What happens to your bitcoins in case of a chain-split? As we treatment closer to August 1st, we have noticed the enhancing frequency of questions regarding the potential Bitcoin split. In essence, our community is wondering what will happen to Bitcoin and if their bitcoins, protected by TREZOR, will be safe.

Advertisement Understanding Block Chain and Distributed Financial Technology: Fresh Rails for Payments and an Analysis of Article 4A of the UCC Jessie Cheng, Benjamin Geva About the Authors: Jessie Cheng is presently deputy general counsel at Ripple and vice chair of the Payments Subcommittee of the ABA Business Law Section’s Uniform Commercial Code Committee.

Leave a Reply

Your email address will not be published. Required fields are marked *