k2ff / node-blockchain-wallet

An unofficial node.js client for the blockchain.info wallet api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

node-blockchain-wallet

An unofficial node.js client for the blockchain.info wallet api.

Installation

node-blockchain-wallet is available as blockchain-wallet on npm.

npm install blockchain-wallet

Usage

var BlockchainWallet = require('blockchain-wallet'),
    blockchainWallet = new BlockchainWallet("YourGuid", "YourPassword"),
    // Certain API methods require a second password if the wallet is second password protected, while others don't at all.
    transactionBlockchainWallet = new BlockchainWallet("YourGuid", "YourPassword", "YourSecondPassword");

blockchainWallet.list(function(err, data) {
  if(err) {
    throw err;
  }

  console.log(data);
});

// Send a donation to blockchain.info.
transactionBlockchainWallet.payment("1JArS6jzE3AJ9sZ3aFij1BmTcpFGgN86hA", 500, {"note": "Thanks"}, function(err, data) {
  if(err) {
    throw err;
  }

  console.log(data);
});

Reference

A method-by-method reference is available on the wiki.

License

This module is ISC licensed.

About

An unofficial node.js client for the blockchain.info wallet api

License:ISC License


Languages

Language:JavaScript 100.0%