Hello fellow devs, let me introduce Microsoft .NET class library for steemd's RPC endpoint : Steem.NET
Not everybody is familiar with Python
or JavaScript
. Some Microsoft Visual Studio
developers might get frustrated avaing to move away from their favorite programming language.
That's why I created an easy to use .NET class
exposing nearly all steemd API
, giving you the power to play with any RPC endpoint. The library is really easy to use, check the example below.
I will maintain and improve the library as I am using it.
If you have any comment, request or want to add your own touch to the project, feel free to contact me or join steem.net group on steemitchat.
Here a small code example :
Imports Newtonsoft.Json
Module Test
Public Sub Main()
Using oSteem As New CSteemAPI
Debug.Print(oSteem.get_config.ToString)
Debug.Print(oSteem.get_account_count.ToString)
Dim arrAcct As New ArrayList
arrAcct.Add("arcange")
For Each oAccount In oSteem.get_accounts(arrAcct)
Debug.Print(oAccount.ToString)
Next
Dim oBlock As Linq.JObject
Dim oTrans As Linq.JObject
Dim lLastBlockID As Long = oSteem.get_dynamic_global_properties().Item("last_irreversible_block_num")
For lBlockID As Long = 4000000 To lLastBlockID
oBlock = oSteem.get_block(lBlockID)
If Not oBlock.Item("transactions") Is Nothing Then
Debug.Print(String.Format("Block {0} {1} contains {2} transactions",
oBlock.Item("block_num"),
oBlock.Item("timestamp").ToObject(Of DateTime),
oBlock.Item("transactions").Count))
For Each oTrans In oBlock.Item("transactions")
Debug.Print(String.Format("Transaction is {0} operations",
oTrans.Item("operations").Item(0).Item(0)))
Next
End If
Next
End Using
End Sub
End Module
this code is downloadable from the repository
Full source code can be found on here and is currently available for VB.NET
. I will port it to C#
soon.