SteemVBS is a steem library that is written in VBScript. It aims to provide interface between VBScript and the Steem Blockchain so that you can easily access steem blockchain via e.g. Microsoft Office VBA or if you are simply a windows administrator.
Repository
https://github.com/DoctorLai/steemvbs/
Adding Real time Voting Power
1 2 3 4 5 6 7 8 9 10 11 | ' test GetAccount_VotingPower Dim SteemIt Set SteemIt = New Steem Dim vp vp = SteemIt.GetAccount_VotingPower("justyy") AssertTrue vp >= 60 And vp <= 100, "justyy vp should be between 60 and 100" Set SteemIt = Nothing |
' test GetAccount_VotingPower Dim SteemIt Set SteemIt = New Steem Dim vp vp = SteemIt.GetAccount_VotingPower("justyy") AssertTrue vp >= 60 And vp <= 100, "justyy vp should be between 60 and 100" Set SteemIt = Nothing
Adding Account Effective Steem Power
1 2 3 4 5 6 7 8 9 10 11 12 | ' test GetAccount_EffectiveSteemPower Dim SteemIt Set SteemIt = New Steem Dim esp esp = SteemIt.GetAccount_EffectiveSteemPower("justyy") WScript.Echo esp AssertTrue esp >= 20000, "justyy esp should be larger than 20000" Set SteemIt = Nothing |
' test GetAccount_EffectiveSteemPower Dim SteemIt Set SteemIt = New Steem Dim esp esp = SteemIt.GetAccount_EffectiveSteemPower("justyy") WScript.Echo esp AssertTrue esp >= 20000, "justyy esp should be larger than 20000" Set SteemIt = Nothing
Adding CreateSuggestedPassword
If you want to get a password for steem accounts.
1 2 3 4 5 6 | Dim x Set x = New Utility WScript.Echo x.CreateSuggestedPassword Set x = Nothing |
Dim x Set x = New Utility WScript.Echo x.CreateSuggestedPassword Set x = Nothing
How to Get Steem Post URL from Comment Permlink
This function returns the steem post url given a comment url.
1 2 3 4 5 6 7 8 9 10 | ' Test GetUrlFromCommentPermLink Dim x Set x = New Utility AssertEqual x.GetUrlFromCommentPermLink("re-tvb-re-justyy-re-tvb-45qr3w-20171011t144205534z"), "https://steemit.com/@tvb/45qr3w", "" AssertEqual x.GetUrlFromCommentPermLink("re-justyy-daily-quality-cn-posts-selected-and-rewarded-promo-cn-20180520t153728557z"), "https://steemit.com/@justyy/daily-quality-cn-posts-selected-and-rewarded-promo-cn", "" Set x = Nothing |
' Test GetUrlFromCommentPermLink Dim x Set x = New Utility AssertEqual x.GetUrlFromCommentPermLink("re-tvb-re-justyy-re-tvb-45qr3w-20171011t144205534z"), "https://steemit.com/@tvb/45qr3w", "" AssertEqual x.GetUrlFromCommentPermLink("re-justyy-daily-quality-cn-posts-selected-and-rewarded-promo-cn-20180520t153728557z"), "https://steemit.com/@justyy/daily-quality-cn-posts-selected-and-rewarded-promo-cn", "" Set x = Nothing
Convert Vests to Steem Power
1 2 3 4 5 6 | Dim SteemIt Set SteemIt = New Steem WScript.Echo SteemIt.VestsToSp(1234234) Set SteemIt = Nothing |
Dim SteemIt Set SteemIt = New Steem WScript.Echo SteemIt.VestsToSp(1234234) Set SteemIt = Nothing
Invalidate Cache
Use Cache properly to speed up your code.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | Dim SteemIt Set SteemIt = New Steem ' fresh WScript.Echo SteemIt.GetAccount_VotingPower("justyy") ' cached WScript.Echo SteemIt.GetAccount_VotingPower("justyy") ' do not use cache SteemIt.Cache = False WScript.Echo SteemIt.GetAccount_VotingPower("justyy") Set SteemIt = Nothing Vests Dim SteemIt Set SteemIt = New Steem WScript.Echo SteemIt.GetAccount_VestingShares("justyy") Set SteemIt = Nothing |
Dim SteemIt Set SteemIt = New Steem ' fresh WScript.Echo SteemIt.GetAccount_VotingPower("justyy") ' cached WScript.Echo SteemIt.GetAccount_VotingPower("justyy") ' do not use cache SteemIt.Cache = False WScript.Echo SteemIt.GetAccount_VotingPower("justyy") Set SteemIt = Nothing Vests Dim SteemIt Set SteemIt = New Steem WScript.Echo SteemIt.GetAccount_VestingShares("justyy") Set SteemIt = Nothing
Delegated Vests
1 2 3 4 5 6 | Dim SteemIt Set SteemIt = New Steem WScript.Echo SteemIt.GetAccount_DelegatedVestingShares("justyy") Set SteemIt = Nothing |
Dim SteemIt Set SteemIt = New Steem WScript.Echo SteemIt.GetAccount_DelegatedVestingShares("justyy") Set SteemIt = Nothing
Received Vests
1 2 3 4 5 6 | Dim SteemIt Set SteemIt = New Steem WScript.Echo SteemIt.GetAccount_ReceivedVestingShares("justyy") Set SteemIt = Nothing |
Dim SteemIt Set SteemIt = New Steem WScript.Echo SteemIt.GetAccount_ReceivedVestingShares("justyy") Set SteemIt = Nothing
Support me and my work as a witness by
Some of my contributions: SteemIt Tools, Bots, APIs and Tutorial
–EOF (The Ultimate Computing & Technology Blog) —
GD Star Rating
loading...
534 wordsloading...
Last Post: The Hamming Distance Implementation in Javascript
Next Post: How to Determine the Version of Microsoft Word using VBScript/JScript?