Since my last post, many new versions have been added. Before I start the version of
v0.5.X I would like to tell you about the changes in the version
Before I start, it is worth noting that third-party developers have joined the development. Someone reported on the found bugs, someone suggested pull-requests. Special thanks would like to express @technologiespro. Thanks to him the version 0.4.X was enriched with even more functionality.
Autoreconnect was added to increase the resilience when the connection to the server was broken for a long time. This can be, for example, if you have an Internet connection disconnected.
Auto-reconnect is enabled by default and will try to restore the connection for an infinitely long time. If you do not need this behavior, you should specify this when initializing the
const BitShares = require ("btsdex"); BitShares.init ("wss: //bitshares.openledger.info/ws", false, false);
login and loginFromFile
To access your account, many use the login and password or via the
*.bin-file. This simplifies the interaction: there is no need to remember three different private keys, it is enough to store only one.
I decided to add this to the package
btsdex. If you know only the login and password from your account, just write:
let account = wait for BitShares.login(<login>, <password>);
account the same object of class
BitShares, in which the keys
memo are put.
Another way to get a class object is to use the
const buffer = fs.readFileSync(<bit-file>); let account = wait for BitShares.loginFromFile(buffer, <password>, <accountName>);
assetIssue and assetReserve
BitShares class is enriched with two operations:
asset_issue for issue, and
asset_reserve for burning tokens.
To issue tokens:
let account = wait BitShares.login(<account>, <password>) async account.assetIssue(<toName>, <assetSymbol>, <amount>, <memo>))
memo is not a required parameter.
To burn tokens:
let account = wait BitShares.login(<account>, <password>) async account.assetReserve(<assetSymbol>, <amount>)
Plans for version 0.5.x
It has come to realize that there is very little functionality for adding more than one oeration to a single transaction. How to organize it right is yet to be decided. But I think it will be decided in the next version.
Also, the documentation would like to be made available for editing the community through a pullrequest. Create a separate repository - a bad solution. But the capabilities of the Github page may well come up.
Build packages to connect directly to the browser without compiling.
Some of the functionality of
btsdexwas very useful mainly in the repositories
bitsharesjs. One such proposal has already been approved.
If you like what I am doing, put an star in btsdex!!