For calculating transfer out, execute following code.
constfilter = [dhive.utils.operationOrders.transfer];
// replace account name with real account name.// start can be -1 or something else if you are doing pagination// limit can be set to 100 max
client.database.getAccountHistory('$accountName', $startId,$limit, dhive.utils.makeBitMaskFilter(filter));
Self Votes
For calculating self-votes, load most recent posts from author
Check upvotes of each post & see if user has voted or not
To get user's post, you can use following code
It loads last 100 posts of the user
// replace account name with real account name
client.hivemind.getAccountPosts({ account: '$accountName', sort: 'posts', start_author: null, start_permlink: null, limit: 100 });
Transfer Out
For calculating transfer out, execute following code.
const filter = [dhive.utils.operationOrders.transfer]; // replace account name with real account name. // start can be -1 or something else if you are doing pagination // limit can be set to 100 max client.database.getAccountHistory('$accountName', $startId,$limit, dhive.utils.makeBitMaskFilter(filter));
Self Votes
// replace account name with real account name client.hivemind.getAccountPosts({ account: '$accountName', sort: 'posts', start_author: null, start_permlink: null, limit: 100 });
via Inbox