SteemJ Dev Diary #4 (04.01.2018) - The DatabaseApi

in #utopian-io4 years ago (edited)

Day #4 of the SteemJ Dev Diary was mainly focused on the MarketHistoryAPI rework and a knowledge transfer with @paatrick.


Latest SteemJ 0.4.x releases: 0.4.3 v0.4.2 v0.4.2pr1 v0.4.1 v0.4.0

SteemJ Dev Diary #4 (04.01.2018) - The DatabaseApi

Hello Steemians and welcome back to day #4 of the SteemJ HF 0.20 Dev Diary!

This series has been introduced to collect feedback from you and to motivate myself to finalize the next SteemJ version as soon as possible. If this is the first part of this series you read, you may want to checkout Day #1 which explains the motivation behind this diary in detail and also provides a first overview of the API changes that come with HF 0.20.

Changes during day #4

The last 2 days have been quite frustrating, because I can't test the changes properly as a Steem Node running HF 0.19.2 is serving the API Endpoint behind As there are only three days left for this diary and the target was to finish as much as possible, I tried to make good use of the time.

After yesterdays rework of the MarketHistoryAPI I had a look at the DatabaseApi today (Tracked in Issue #75.

In commit 362af1 all changes can be seen. I basically moved methods from the 'SteemJ' class into a separate 'DatabaseApi' class, added new methods like 'listWitnesses' and 'findWitnesses' and, in addition, created the '_args' and '_return' for the different methods.

The package structure itself becomes quite clean now:


But there is still a lot to do.

The most important thing for me right now is the possibility to test the parts that have already been changed. Together with @paatrick we planned to spend some hours to setup a Steem Node using the official Steem Docker Image as also the current development state is available as a docker image.

This node should help us a lot :)

A list of all commits made after the last release can be found here:

(A prove that the commits have been made by me can be found here)

General information

What is SteemJ?

SteemJ is a project that allows you to communicate with a Steem node using Java. So far, the project supports most of the API calls and is also able to broadcast most of the common operation types. Further information can be found on GitHub.

Quick Start Guide

Add SteemJ to your project

SteemJ binaries are pushed into the maven central repository and can be integrated with a bunch of build management tools like Maven. The Wiki provides a lot of examples for the most common build tools. If you do not use a build management tool you can download the binaries as described here.

To add this release to your project paste the following snippet into your 'pom.xml'


Start posting

SteemJConfig myConfig = SteemJConfig.getInstance();

myConfig.setDefaultAccount(new AccountName("YOUR-ACCOUNT"));

List<ImmutablePair<PrivateKeyType, String>> privateKeys = new ArrayList<>();
privateKeys.add(new ImmutablePair<>(PrivateKeyType.POSTING, "YOUR-PRIVATE-POSTING-KEY"));

myConfig.getPrivateKeyStorage().addAccount(myConfig.getDefaultAccount(), privateKeys);

steemJ.createComment(new AccountName("steemj"), new Permlink("testofsteemj040"), "Example comment without no link but with a @user .", new String[] { "test" });

Further information

The sample module of the SteemJ project provides showcases for the most common acitivies and operations users want to perform.

Beside that you can find a lot of snippets and examples in the different Wiki sections.


The project became quite big and there is still a lot to do. If you want to support the project simply clone the git repository and submit a pull request. I would really appreciate it =).

git clone

Get in touch!

Most of my projects are pretty time consuming and I always try to provide some useful stuff to the community. What keeps me going for that is your feedback and your support. For that reason I would love to get some Feedback from you <3. Just contact me here on Steemit or ping me on GitHub.

Posted on - Rewarding Open Source Contributors


Your contribution cannot be approved yet because it does not have proof of work. See the Utopian Rules. Please edit your contribution and add proof (links, screenshots, commits, etc) of your work, to reapply for approval.

This is awesome, and I believe I even reviewed you in the past, but as per rules - if your github name doesn't match your steem name, I'll need a screenshot of you logged into github as proof. You may post it under this comment if you don't want to add it to the main post.

You may edit your post here, as shown below:

You can contact us on Discord.

Thank you for the contribution. It has been approved.

You can contact us on Discord.

i want to learn programming

:D That's pretty good. I would say the best way to start is to have an idea / vision of a tool and just start to work on it =) If it is related to Steem / SteemJ feel free to ping me on discord :)

Hey @dez1337 I am @utopian-io. I have just upvoted you!


  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!


Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord

$dez1337 = "helpful post please upload about php and javascript";
echo $dez1337;

:D Yeah, it has been a long time I was working with PHP - But I know that also a Steem api wrapper for PHP is available.

really Steem api wrapper for PHP is available.

learn programming

Congratulations @dez1337! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of posts published

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

Coin Marketplace

STEEM 0.30
TRX 0.06
JST 0.038
BTC 35347.21
ETH 2452.86
USDT 1.00
SBD 3.93