
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
node-bitcoin is a simple wrapper for the Bitcoin client's JSON-RPC API.
The API is equivalent to the API document here.
The methods are exposed as lower camelcase methods on the bitcoin.Client
object, or you may call the API directly using the cmd
method.
npm install bitcoin
Traverse to ~/.bitcoin
or ~/Library/Application Support/Bitcoin
and add a
file called bitcoin.conf
if it doesn't already exist.
Add these lines to the file:
rpcuser=username
rpcpassword=password
You will use these to login to the server.
Start your Bitcoin client with the -server
argument or run bitcoind
You should now be able to communicate with Bitcoin JSON-RPC API using the node-bitcoin library, try it out!
var bitcoin = require('bitcoin');
var client = new bitcoin.Client('localhost', 8332, 'username', 'password');
var client = new bitcoin.Client({
host: 'localhost',
port: 8332,
user: 'username',
pass: 'password'
});
client.getBalance('*', 6, function(err, balance) {
if (err) return console.log(err);
console.log('Balance:', balance);
});
cmd
client.cmd('getbalance', '*', 6, function(err, balance){
if (err) return console.log(err);
console.log('Balance:', balance);
});
var batch = [];
for (var i = 0; i < 10; ++i) {
batch.push({
method: 'getnewaddress',
params: ['myaccount']
});
}
client.cmd(batch, function(err, address) {
if (err) return console.log(err);
console.log('Address:', address);
});
FAQs
Communicate with bitcoind via JSON-RPC
The npm package bitcoin receives a total of 509 weekly downloads. As such, bitcoin popularity was classified as not popular.
We found that bitcoin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.