
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.
dpos-api-wrapper
Advanced tools
Through this library you can interact with a dposAPI node in an easy way. The library works both in the browser and Node.js.
All available methods are available in the jsdoc
Either download dist/browser/index.js or use gitcdn as follows:
<script type="text/javascript" src="https://unpkg.com/dpos-api-wrapper/dist/browser/index.js"></script>
<script>
dposAPI.nodeAddress = 'http://example.com:5566'; // Set your node url here. (no trailing slash)
// ...
</script>
npm i dpos-api-wrapper -D
var dposAPI = require('dpos-api-wrapper').dposAPI;
dposAPI.nodeAddress= 'http://example.com:5566'; // Set your node url here. (no trailing slash)
![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|---|---|---|---|---|---|
| Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 8+ ✔ |
Node >= 4.x is fully supported :)
All the APIs are designed to be easy to use. You can use both Callbacks or Promises; you decide.
For example you can open a new account by doing. Be aware that all the methods sending a secret over the network are going to be deprecated:
dposAPI.accounts.open('secret', function(error, account) {
if (!error) {
// yay!
console.log(account);
} else {
console.log('error: ', error);
}
// ...
});
or
dposAPI.accounts.open('secret')
.then(function (account) {
console.log(account);
})
.catch(function (error) {
console.log('error: ', error);
});
which can be even shorter if you write your code in TypeScript or ES6
dposAPI.accounts.open('secret')
.then(console.log)
.catch(error => console.log('error: ', error));
In some cases you need to connect to multiple nodes.
To do so, just use the newWrapper method:
var node1 = dposAPI.newWrapper('http://node1:1234');
var node2 = dposAPI.newWrapper('http://node2:1234');
// interact with node1 & node2 using the same APIs available within 'dposAPI' variable.
FAQs
DPOS API Wrapper written in TypeScript
We found that dpos-api-wrapper 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.