Steemit Dev Portal: Document Transaction Polling API

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

H2
H3
H4
Upload from PC
Video gallery
3 columns
2 columns
1 column
9 Comments