Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
blockchain-api
Advanced tools
Readme
An unofficial node.js client for the blockchain.info wallet api.
npm install blockchain-api
var chain = require('blockchain-api').chain,
blockChain = new chain(); // Basic
let callback = (err, data) => console.log(err, data);
// Basics
blockChain.createWallet({
password : 'MyPass',
api_code : API_KEY,
priv : null,
label : null,
email : null
}, callback);
blockChain.chart('typeChart', callback);
blockChain.stats(callback);
blockChain.ticker(callback);
blockChain.toBTC('USD', 100, callback);
// Exec
/* WALLET */
let wallet = blockChain.wallet(GUID, PASS1, PASS2);
let options = {
from : 'Send from a specific Bitcoin Address (Optional)'
fee : 'Transaction fee value in satoshi (Must be greater than default fee) (Optional)'
note : 'A public note to include with the transaction -- can only be attached to transactions where all outputs are greater than 0.005 BTC.(Optional)'
};
wallet.balance(callback);
wallet.list(callback);
wallet.addressBalance(address, confirmations, callback);
wallet.payment(to, amount, [options,] callback);
wallet.sendMany({
'Adrress1' : 2,
'Adrress2' : 1,
...
}, [options,] callback);
wallet.newAddress(name, callback);
wallet.archiveAddress(address, callback);
wallet.unarchiveAddress(address, callback);
wallet.autoConsolidate(days, callback);
/* QUERY */
let query = blockChain.query();
let params = {}; // Params is no define
query.getDifficulty( params, callback);
query.getBlockCount( params, callback);
query.latesthash( params, callback);
query.bcperBlock( params, callback);
query.totalBc( params, callback);
query.probability( params, callback);
query.hashestowin( params, callback);
query.nextreTarget( params, callback);
query.avgtxSize( params, callback);
query.avgtxValue( params, callback);
query.interval( params, callback);
query.eta( params, callback);
query.avgtxNumber( params, callback);
query.getReceivedByAddress( address, callback);
query.getSentByAddress( address, callback);
query.addressBalance( address, callback);
query.addressFirstseen( address, params, callback);
query.txTotalbtcOutput( hash, params, callback);
query.txTotalbtcInput( hash, params, callback);
query.txFee( hash, params, callback);
query.txResult( hash, address, params, callback);
query.hashtontxid( hash, params, callback);
query.ntxidtohash( hash, params, callback);
query.addressToHash( address, params, callback);
query.hashToAddress =(hash, params, callback);
query.hashPubKey( hash, params, callback);
query.addrPubKey( hash, params, callback);
query.pubKeyAddr( hash, params, callback);
query.newKey( params, callback);
query.unconfirmedCount( params, callback);
query.price24hr( params, callback);
query.marketCap( params, callback);
query.transactionCount24hr( params, callback);
query.btcsent24hr( params, callback);
query.hashRate( params, callback);
/* API */
let api = blockChain.api();
let address = 'address' || [ 'address1', 'address2' ];
api.address(address, callback);
api.unspent(address, callback);
api.rawblock($block_index || $block_hash, callback);
api.rawTx($tx_index || $tx_hash, callback);
api.blockHeight($block_height, callback);
api.latestblock(callback);
api.unconfirmedTransactions(callback);
api.blocks($time_in_milliseconds || $pool_name, callback);
api.inv($hash, callback);
/* Receive Payments */
let receivePayments = blockChain.receivePayments(API_KEY);
receivePayments.receive(xpub, callUrl, callback);
receivePayments.callbackLog(callUrl, callback);
A method-by-method reference is available on the wiki.
FAQs
blockchain.info wallet API client for node.js
We found that blockchain-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).