
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
An OAuth2 compliant NodeJS Coinbase API library
npm install ncoinbase
var Coinbase = require('ncoinbase').Coinbase,
api = new Coinbase({
"id": "api_id",
"secret": "api_secret",
"redirect_uri": "http://localhost:4000/callback",
"scope": "balance request"
});
// Assuming we pulled the users credentials
// from the database and assigned them to 'user'
credentials = new Credentials(user);
consumer = api.createConsumer(credentials);
req.coinbase.account_balance(function (err, resp) {
console.log("My Account balance is: " + resp.amount );
});
req.coinbase.account_balance()
.then(function (resp) {
console.log("Resp", resp);
res.send(resp);
})
.catch(function (err) {
console.log("Err", err);
res.send("API Request failed: " + err.message);
});
Expired tokens will be automatically refreshed when you attempt an API call. You can, and should, listen for this for the 'updatedCredentials' event and save the new credentials.
consumer.on('updatedCredentials', function (credentials) {
user.credentials = credentials;
user.save();
});
// Let's assume the users credentials are expired
// and we need to use the refresh token.
consumer.account_balance(function (err, resp) {
// This will still work, but before the 'account_balance'
// request is made, the credentials will be refreshed,
// and the 'updatedCredentials' event will be fired.
console.log("I have " + resp.amount + " many bitcoins!!!");
});
git clone https://github.com/mdp/NCoinbase.git
cd NCoinbase
npm install
node example/server.js
Now visit http://localhost:4000 to authenticate
After authenticating you should see your account details on the index page. You can also try http://localhost:4000/my_balance for your account balance.
The example app show several library features
git clone https://github.com/mdp/NCoinbase.git
cd NCoinbase
npm install
npm test
FAQs
Coinbase API consumer
We found that ncoinbase 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.