Steemit Dev Portal: Document Transaction Polling API

in utopian-io •  6 years ago  (edited)

Repository

https://github.com/steemit/devportal

Site

https://developers.steem.io/

Issue

  • What was the issue(s)?
    As an application developer using the Steem blockchain, I want to know the status of transactions I broadcast, so that I can determine if/when my transactions become irreversible.
  • What was the solution?
    The Steemit Dev Portal has several .yml files that contain details about APIs and methods. I just need to add a new .yml file that contains details on a new API called transaction_status_api. That file shall contain details on a single method: transaction_status_api. find_transaction

Once this PR is approved, the final version will look like this:

Notes

To help implement this issue, I am using the following tintoy ref ed1ca68.

# Start the tintoy tag with transaction-status-api enabled ...
docker run -d -p 8090:8090 inertia/tintoy:transaction-status-api

# After waiting for the node to fully sych, check list of methods ...
curl -s --data '{"jsonrpc":"2.0", "method":"jsonrpc.get_methods", "id":1}' http://localhost:8090 | jq

# If we see transaction_status_api.find_transaction, we're ready to test ...
curl -s --data '{"jsonrpc":"2.0", "method":"transaction_status_api.find_transaction", "params": {"transaction_id": "0000000000000000000000000000000000000000"}, "id":1}' http://localhost:8090 | jq

Expected result:

{
  "jsonrpc": "2.0",
  "result": {
    "status": "unknown"
  },
  "id": 1
}

Scrape API

TEST_NODE=http://localhost:8090 rake scrape:api_defs

Once the rake command was executed, I had a new transaction_status_api.yml file to fill in. The rest of the changes are detailed here:

https://github.com/steemit/devportal/pull/395/files

GitHub Account

https://github.com/inertia186

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Hello @inertia,

Sorry but the PR mentioned in the contribution is not yet merged so the contribution cannot be scored.

You can post a contribution about it when the PR is merged and remove the contribution for now.

I will request you to please check the guidelines and make a contribution in the documentation category when the PR is merged in the official documentation.

Your contribution has been evaluated according to Utopian policies and guidelines.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Thought so. We’re kinda in between processes at the moment, so merging is pretty unlikely for the time being.

There is another contribution posted by you and for the same reason it will not be scored.

I am sorry for the inconvenience but the PR needs to be merged for the contribution to be reviewed.

So, for this particular example, I get it. It's highly dependent on being merged for it to be useful to anyone, which is why I included a screen shot showing how it will eventually look once it's merged and deployed.

But for the other one I think you're talking about, the change is entirely presented in the blog entry and just references the pull request. No one has to look at the PR to understand the article.

Thank you for your review, @ms10398! Keep up the good work!

Hi @inertia!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your UA account score is currently 6.470 which ranks you at #166 across all Steem accounts.
Your rank has dropped 1 places in the last three days (old rank 165).

In our last Algorithmic Curation Round, consisting of 339 contributions, your post is ranked at #257.

Evaluation of your UA score:
  • You've built up a nice network.
  • The readers appreciate your great work!
  • Try to work on user engagement: the more people that interact with you via the comments, the higher your UA score!

Feel free to join our @steem-ua Discord server

Approved 😂

  ·  6 years ago (edited)

The sad thing is, at the moment anyway, there’s a snowball’s chance in hell that this will get approval merged anytime soon by the bearded one. And I’m not going to initiate a drive-by.

Anyway, it’s not like it has urgency. My intent here is to develop a repeatable process.

Hi, @inertia!

You just got a 3.28% upvote from SteemPlus!
To get higher upvotes, earn more SteemPlus Points (SPP). On your Steemit wallet, check your SPP balance and click on "How to earn SPP?" to find out all the ways to earn.
If you're not using SteemPlus yet, please check our last posts in here to see the many ways in which SteemPlus can improve your Steem experience on Steemit and Busy.