Skip to content
/ dpayjs Public
forked from steemit/steem-js

dPay.js the official JavaScript library for dPay blockchain

License

Notifications You must be signed in to change notification settings

dpays/dpayjs

 
 

Repository files navigation

dPay.js

dPay.js the JavaScript API for dPay blockchain

Documentation

Here is full documentation: https://github.com/dpays/dpayjs/tree/master/doc

Browser

<script src="./dpay.min.js"></script>
<script>
dpay.api.getAccounts(['jared', 'michaelx'], function(err, response){
    console.log(err, response);
});
</script>

CDN

https://cdn.benchx.io/lib/latest/dpay.min.js

<script src="//cdn.benchx.io/lib/latest/dpay.min.js"></script>

Webpack

Please have a look at the webpack usage example.

Server

Install

$ npm install dpayjs --save

RPC Servers

https://greatchain.dpays.io By Default
https://jackson.dpays.io
https://jefferson.dpays.io

Examples

Broadcast Vote

var dpay = require('dpayjs');

var wif = dpay.auth.toWif(username, password, 'posting');
dpay.broadcast.vote(wif, voter, author, permlink, weight, function(err, result) {
	console.log(err, result);
});

Get Accounts

dpay.api.getAccounts(['jared', 'michaelx'], function(err, result) {
	console.log(err, result);
});

Get State

dpay.api.getState('/trends/funny', function(err, result) {
	console.log(err, result);
});

Reputation Formatter

var reputation = dpay.formatter.reputation(user.reputation);
console.log(reputation);

Contributions

Patches are welcome! Contributors are listed in the package.json file. Please run the tests before opening a pull request and make sure that you are passing all of them. If you would like to contribute, but don't know what to work on, check the issues list or on dPay Telegram Channel https://t.me/dpayio.

Issues

When you find issues, please report them!

License

MIT

About

dPay.js the official JavaScript library for dPay blockchain

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 99.8%
  • Other 0.2%