steemit / devportal

Steem Platform Developer Documentation.
https://developers.steem.io
MIT License
122 stars 74 forks source link

DP: Document Transaction polling API #361

Closed TimCliff closed 5 years ago

TimCliff commented 6 years ago

In Steem issue https://github.com/steemit/steem/issues/2458, a new Transaction polling API was added. This new API should be documented in the dev portal.

inertia186 commented 6 years ago

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