diff --git a/doc/README.md b/doc/README.md index 2186a439308e4bb4827d76d182e7c1e5f529283a..2f14e4bfb94a0a6754e3f7736af6c4d60e82bacb 100644 --- a/doc/README.md +++ b/doc/README.md @@ -2287,14 +2287,14 @@ Return Example: ``` ### Create Suggested Password -``` +```js var password = hive.formatter.createSuggestedPassword(); console.log(password); // => 'GAz3GYFvvQvgm7t2fQmwMDuXEzDqTzn9' ``` ### Comment Permlink -``` +```js var parentAuthor = 'hiveio'; var parentPermlink = 'announcing-the-launch-of-hive-blockchain'; var commentPermlink = hive.formatter.commentPermlink(parentAuthor, parentPermlink); @@ -2302,10 +2302,23 @@ console.log(commentPermlink); ``` ### Estimate Account Value -``` +```js var hivePower = hive.formatter.estimateAccountValue(account); ``` +|Parameter|Datatype|Description| +|---------|--------|-----------| +|account|object|a hive user object| + + +Call Example: +```js +hive.api.getAccounts(["username"], function(e1, accounts) { + var accountValueInUSD = hive.formatter.estimateAccountValue(accounts[0]) + .catch(function (err) { console.log(err); }) + .then(function (data) { console.log(data); }); +}); + ### Reputation ``` var reputation = hive.formatter.reputation(3512485230915);